Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8220283

ZGC fails to build on GCC 4.4.7: ATTRIBUTE_ALIGNED compatibility issue

XMLWordPrintable

    • b12
    • generic
    • linux_redhat_6.0

        When trying to build jdk/jdk with GCC 4.4.7, the base compiler on CentOS 6/RHEL 6, compilation fails with:

        In file included from /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMark.hpp:27,
                         from /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zLiveMap.inline.hpp:29,
                         from /home/openjdk/openjdk-head/test/hotspot/gtest/gc/z/test_zLiveMap.cpp:25:
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStack.hpp:76: error: expected ‘)’ before ‘+’ token
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStack.hpp:76: error: requested alignment is not a constant
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStack.hpp:77: error: expected ‘)’ before ‘+’ token
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStack.hpp:77: error: requested alignment is not a constant
        In file included from /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMark.hpp:28,
                         from /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zLiveMap.inline.hpp:29,
                         from /home/openjdk/openjdk-head/test/hotspot/gtest/gc/z/test_zLiveMap.cpp:25:
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStackAllocator.hpp:53: error: expected ‘)’ before ‘+’ token
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStackAllocator.hpp:53: error: requested alignment is not a constant
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStackAllocator.hpp:54: error: expected ‘)’ before ‘+’ token
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkStackAllocator.hpp:54: error: requested alignment is not a constant
        In file included from /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMark.hpp:29,
                         from /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zLiveMap.inline.hpp:29,
                         from /home/openjdk/openjdk-head/test/hotspot/gtest/gc/z/test_zLiveMap.cpp:25:
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkTerminate.hpp:34: error: expected ‘)’ before ‘+’ token
        /home/openjdk/openjdk-head/src/hotspot/share/gc/z/zMarkTerminate.hpp:34: error: requested alignment is not a constant

        That is due to ATTRIBUTE_ALIGNED being defined as:

        #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x+0)))

              sgehwolf Severin Gehwolf
              sgehwolf Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: