-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
None
-
Affects Version/s: openjdk8u
-
Component/s: infrastructure
-
None
-
Fix Understood
-
generic
-
generic
Both C and C++ compiles in the legacy HotSpot build still used by 8u take the same set of flags. So -std=gnu++98 ends up getting passed to the C compiler where it makes no sense.
In gcc, this has been throwing a warning for a long time:
cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C
With clang builds, this is instead an error.
2026-01-09T18:17:34.1713580Z error: invalid argument '-std=gnu++98' not allowed with 'C'
This escalates the problem for newer MacOS builds which need the -std flag for the C++ code to compile. Otherwise, it is assumed to be C++11 code e.g.
g1BlockOffsetTable.inline.hpp:55:57: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
The same issue causes the build to fail with clang on Linux too (tested locally)
This only affects 8u as the HotSpot build in 9 and later uses the same infrastructure as the rest of the build.
In gcc, this has been throwing a warning for a long time:
cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C
With clang builds, this is instead an error.
2026-01-09T18:17:34.1713580Z error: invalid argument '-std=gnu++98' not allowed with 'C'
This escalates the problem for newer MacOS builds which need the -std flag for the C++ code to compile. Otherwise, it is assumed to be C++11 code e.g.
g1BlockOffsetTable.inline.hpp:55:57: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
The same issue causes the build to fail with clang on Linux too (tested locally)
This only affects 8u as the HotSpot build in 9 and later uses the same infrastructure as the rest of the build.
- relates to
-
JDK-8374948 [8u] saproc & jsig builds add duplicate linker flags on Darwin/MacOS
-
- New
-
- links to
-
Review(master)
openjdk/jdk8u-dev/741