Looks good to me.

/Erik


On 2017-07-14 13:47, Baesken, Matthias wrote:
After Simons question , I checked   that  the jdk10 builds  still works  with 
gcc 4.7 on linux x86_64 as well .
And created a new webrev  :

http://cr.openjdk.java.net/~mbaesken/webrevs/8184338.1/

- check adjusted to minimum gcc 4.7
- common/doc/building.md    adjusted  (the part talking about gcc versions)


Best regards, Matthias



-----Original Message-----
From: Baesken, Matthias
Sent: Freitag, 14. Juli 2017 08:36
To: 'Simon Nash' <si...@cjnash.com>
Cc: Erik Joelsson <erik.joels...@oracle.com>; 'build-dev@openjdk.java.net' 
<build-dev@openjdk.java.net>; 'hotspot-...@openjdk.java.net' 
<hotspot-...@openjdk.java.net>; Zeller, Arno <arno.zel...@sap.com>
Subject: RE: 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

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?
Hi Simon,
    reason was that  we know gcc-4.8 works nicely because we do a lot of builds 
(+tests) with this compiler .
For gcc 4.7 we just do not know  ( but for old 4.3 / 4.4  it was obvious that 
the current flags do not work any more).
If you are using a gcc  compiler < 4.8 only a warning is reported , it does not 
mean that you cannot build  any more.

My first  suggestion was  :

( e.g. change to minimum gcc   4.6 or gcc  4.7  supporting the flags used in 
the build )
  So if you see a benefit to  test for minimum gcc 4.7 and not 4.8  I am fine 
with this too (Erik what do you think?).
We at SAP just cannot tell  that gcc 4.7 still works (because our builds do not 
use it).

Best regards, Matthias



-----Original Message-----
From: Simon Nash [mailto:si...@cjnash.com]
Sent: Donnerstag, 13. Juli 2017 21:56
To: Baesken, Matthias <matthias.baes...@sap.com>
Cc: Erik Joelsson <erik.joels...@oracle.com>; 'build-dev@openjdk.java.net' 
<build-dev@openjdk.java.net>; 'hotspot-...@openjdk.java.net' 
<hotspot-...@openjdk.java.net>; Zeller, Arno <arno.zel...@sap.com>
Subject: Re: 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

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.joels...@oracle.com]
Sent: Donnerstag, 13. Juli 2017 13:34
To: Baesken, Matthias <matthias.baes...@sap.com>; 'build-dev@openjdk.java.net' 
<build-dev@openjdk.java.net>; 'hotspot-...@openjdk.java.net' 
<hotspot-...@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.joels...@oracle.com]
Sent: Donnerstag, 13. Juli 2017 11:59
To: Baesken, Matthias <matthias.baes...@sap.com>; 'build-dev@openjdk.java.net' 
<build-dev@openjdk.java.net>; 'hotspot-...@openjdk.java.net' 
<hotspot-...@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



Reply via email to