maintainer-feedback requested: [Bug 271080] java/openjdk8: fix build with clang 16
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 271080] java/openjdk8: fix build with clang 16"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 26 Apr 2023 12:58:04 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-java (Nobody) <java@FreeBSD.org> for maintainer-feedback: Bug 271080: java/openjdk8: fix build with clang 16 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271080 --- Description --- Since clang 16 (and gcc 11) the default C++ standard is now gnu++17. Because java/openjdk8's build infrastructure does not explicitly set its C++ standard, this leads to several errors: /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u362-b09.1/hotspot/src/share/vm /adlc/arena.cpp:82:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register Chunk *k = _first; ^~~~~~~~~ /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u362-b09.1/hotspot/src/share/vm /adlc/arena.cpp:96:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register Chunk *k = _chunk; // Get filled-up chunk address ^~~~~~~~~ 2 errors generated. /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u362-b09.1/hotspot/src/share/vm /adlc/adlparse.cpp:4567:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register char c; ^~~~~~~~~ /wrkdirs/usr/ports/java/openjdk8/work/jdk8u-jdk8u362-b09.1/hotspot/src/share/vm /adlc/adlparse.cpp:4765:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register char c; ^~~~~~~~~ For newer versions of OpenJDK this has been fixed by removing the 'register' keyword, but upstream has not yet backported it to OpenJDK 8. To work around the errors, define the register keyword away using a command line flag.