[RFR] JDK-8156980: Hotspot build doesn't have -std=gnu++98 gcc option

Erik Joelsson erik.joelsson at oracle.com
Tue Jul 5 06:58:40 UTC 2016


Hello,

In general it looks good. It's nice to see that this also fixes that 
warning output from configure. My only nit is the comment describing the 
parameters for FLAGS_SETUP_GCC6_COMPILER_FLAGS. It indicates that it 
takes named parameters while it actually just takes positional. Please 
either change it to named parameters or fix the comment.

Thanks for fixing this!

/Erik

On 2016-07-05 07:27, Andrew Hughes wrote:
> 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.




More information about the build-dev mailing list