RFR: 8220283: ZGC fails to build on GCC 4.4.7: ATTRIBUTE_ALIGNED compatibility issue
Severin Gehwolf
sgehwolf at redhat.com
Thu Mar 7 17:23:05 UTC 2019
Hi,
In order to be able to build recent JDKs on CentOS 6/RHEL 6 we've
discovered that a few fixes would be needed in the codebase. One such
instance is being caused by ZGC's use of ATTRIBUTE_ALIGNED:
#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x+0)))
Used as:
ZMarkStackList _published ATTRIBUTE_ALIGNED(ZCacheLineSize);
This trips up GCC 4.4.7 with:
src/hotspot/share/gc/z/zMarkStack.hpp:77: error: requested alignment is not a constant
Although, 4.4.7 isn't a supported compiler version, the fix would be
this one-liner:
http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8220283/01/webrev/
Bug: https://bugs.openjdk.java.net/browse/JDK-8220283
Testing: tier1 tests on Linux x86_64, jdk/submit (ongoing)
Thoughts?
Thanks,
Severin
More information about the hotspot-dev
mailing list