RFR: [XS] 8184338 : switch minimum supported gcc version to 4.8 - was : RE: jdk10 build : usage of -fno-var-tracking-assignments g++ flag in hotspot build
matthias.baesken at sap.com
Thu Jul 13 13:40:52 UTC 2017
Hi Erik, I prepared the change :
Asking for review(s) ...
Best regards, Matthias
From: Erik Joelsson [mailto:erik.joelsson at oracle.com]
Sent: Donnerstag, 13. Juli 2017 13:34
To: Baesken, Matthias <matthias.baesken at sap.com>; 'build-dev at openjdk.java.net' <build-dev at openjdk.java.net>; 'hotspot-dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>
Subject: Re: jdk10 build : usage of -fno-var-tracking-assignments g++ flag in hotspot build
That would be the correct place. If you prepare the change and send the
review I can sponsor the push.
On 2017-07-13 13:16, Baesken, Matthias wrote:
> Hi Erik,
>> AFAIK, the only reason we support GCC versions older than 4.9 is for you
>> guys at SAP, so if you would suggest dropping support, that would of
>> course be the simplest solution.
> for jdk10 it is fine for us to use minimum gcc 4.8 . That would be probably the most simple solution to avoid running into the "-fno-var-tracking-assignments" issue
> ( I now and then run into it when I forget to set the PATH to gcc-4.8 one should use for compiling on the SLES11 machine, so I pick up instead the default gcc 4.3.4 from the machine ,
> configure works nicely and then the build fails in the middle of the HS make )
> Is there right place to adjust I think, I guess we need someone for Oracle to regenerate the generated-configure.sh files ?
> Best regards, Matthias
> -----Original Message-----
> From: Erik Joelsson [mailto:erik.joelsson at oracle.com]
> Sent: Donnerstag, 13. Juli 2017 11:59
> To: Baesken, Matthias <matthias.baesken at sap.com>; 'build-dev at openjdk.java.net' <build-dev at openjdk.java.net>; 'hotspot-dev at openjdk.java.net' <hotspot-dev at openjdk.java.net>
> Subject: Re: jdk10 build : usage of -fno-var-tracking-assignments g++ flag in hotspot build
> Hello Matthias,
> AFAIK, the only reason we support GCC versions older than 4.9 is for you
> guys at SAP, so if you would suggest dropping support, that would of
> course be the simplest solution.
> If you want to keep support but make the use of this flag optional, the
> preferred method is to add a test in flags.m4. We have macros defined
> for this. FLAGS_COMPILER_CHECK_ARGUMENTS or
> FLAGS_CXX_COMPILER_CHECK_ARGUMENTS would be suitable in this case. Use
> it to check if the flag is valid for the current compiler. If so, you
> can define a variable
> and empty otherwise, and in the makefile use this variable in the
> We want to avoid static shell expressions in the makefiles if possible
> and keep that kind of logic in configure. It's also better to explicitly
> check for features rather than versions.
> On 2017-07-13 11:21, Baesken, Matthias wrote:
>> Hello, when building jdk10 on Suse Linux 11 with default gcc/g++ 4.3.4 installed, I was running into
>> compilation errors because of the missing support for g++ flag -fno-var-tracking-assignments .
>> It seems gcc-4.6 has the -fvar-tracking-assignments / -fnovar-tracking-assignments flags , see
>> I have no gcc-4.6 at hand but could verify that gcc-4.7 and gcc-4.8 "know" the flag.
>> There are various solutions one could do to avoid the compilation error .
>> 1) disallow usage of old gcc versions here :
>> ( e.g. change to minimum gcc 4.6 or gcc 4.7 supporting the flags used in the build )
>> 2) remove the flag -fno-var-tracking-assignments for older gcc versions here :
>> (in a similar way it was done : http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/37e693211deb )
>> hotspot/make/lib/JvmOverrideFiles.gmk-32-ifeq ($(TOOLCHAIN_TYPE), gcc)
>> hotspot/make/lib/JvmOverrideFiles.gmk:33: BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments -O0
>> hotspot/make/lib/JvmOverrideFiles.gmk:34: BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments
>> What is your preferred solution ?
>> Thanks, Matthias
More information about the build-dev