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

Erik Joelsson erik.joelsson at oracle.com
Fri Jul 14 06:45:05 UTC 2017


 From my point of view, the minimum version is a bit arbitrary. We have 
identified that we likely need 4.6 or newer now, so we could set the 
limit to 4.6 or 4.7 if needed. Supporting very old compilers have a 
cost. The setting here will only cause a warning to be printed that 
essentially means we don't test builds with this old compiler and we 
won't make any effort in keeping it working. I would expect 4.7 to 
continue to work for a time anyway.

Eventually though, we will upgrade the recommended toolchain and we will 
start using newer compiler features that will make older compilers 
obsolete for real.

/Erik


On 2017-07-13 21:56, Simon Nash wrote:
> I am currently building JDK 9 for arm32 (hard float and soft float) using
> a Linaro GCC 4.7 cross-compiler (binary download).  What is the reason 
> that
> this cannot be supported for JDK 10?
>
> Best regards,
> Simon
>
> On 13/07/2017 14:40, Baesken, Matthias wrote:
>> Hi Erik, I prepared the change :
>>
>> http://cr.openjdk.java.net/~mbaesken/webrevs/8184338/
>>
>> bug :
>>
>> https://bugs.openjdk.java.net/browse/JDK-8184338
>>
>> Asking for review(s) ...
>>
>>
>> Best regards, Matthias
>>
>>
>>
>>
>> -----Original Message-----
>> 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
>>
>> Hello,
>>
>> That would be the correct place. If you prepare the change and send 
>> the review I can sponsor the push.
>>
>> /Erik
>>
>> 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 )
>>>
>>> autoconf/toolchain.m4
>>>
>>> TOOLCHAIN_MINIMUM_VERSION_gcc="4.8"
>>>
>>> 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
>>> "CXXFLAGS_GCC_NO_VAR_TRACKING_ASSIGNMENTS=-fno-var-tracking-assignment"
>>> and empty otherwise, and in the makefile use this variable in the
>>> assignement.
>>>
>>> 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.
>>>
>>> /Erik
>>>
>>>
>>> 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
>>>>
>>>> https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/Option-Summary.html#Option-Summary 
>>>>
>>>>
>>>> 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 :
>>>>
>>>> autoconf/toolchain.m4
>>>>
>>>> TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
>>>>
>>>> ( 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
>>>> hotspot/make/lib/JvmOverrideFiles.gmk-35-endif
>>>>
>>>> What is your preferred solution ?
>>>>
>>>>
>>>> Thanks, Matthias
>>>>
>>>>
>>
>




More information about the build-dev mailing list