[RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option
Andrew Hughes
gnu.andrew at redhat.com
Tue Jul 5 05:27:21 UTC 2016
Webrev: http://cr.openjdk.java.net/~andrew/8156980/webrev.01/
Bug: https://bugs.openjdk.java.net/browse/JDK-8156980
With "8151841: Build needs additional flags to compile with GCC 6",
we added a number of compiler flags which were needed to build
OpenJDK with GCC 6. Checks for these flags were added to configure,
and the flags passed to the JDK and HotSpot builds by CFLAGS/CXXFLAGS_JDK
and hotspot-spec.gmk.in respectively.
Following "8152666: The new Hotspot Build System" and
"8150601: Remove the old Hotspot build system", the hotspot-spec.gmk.in
file was removed, so the flags were no longer passed to the HotSpot
build. HotSpot now uses JVM_CFLAGS via the same configure process
as the JDK obtains CFLAGS_JDK and CXXFLAGS_JDK[*].
This webrev fixes the regression introduced by 8152666 by adding
the flags to JVM_CFLAGS. It also adapts FLAGS_SETUP_GCC6_COMPILER_FLAGS
to take a prefix, as other macros in flags.m4 do, and calls
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS before the version check.
The lack of the latter lead to configure executing:
if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION
with OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION ever being set, causing
test to print an error.
With this fix, the flags again make it into the build.
[*] It should really be CXXFLAGS_JVM as they are flags for the C++ compiler.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the build-dev
mailing list