Re: RFR: JDK-8155587: Cross compilation may cause compiler warnings for "build" compiler

2016-05-11 Thread Erik Joelsson



On 2016-05-11 08:05, David Holmes wrote:

Hi Erik,

Seems reasonable. flags.m4 is okay, but the toolchain.m4 changes 
stretch my comprehension of the overall process. As long as this gets 
through jprt with -testset hotspot, then I'm fine with it. :)


I agree this got nasty. I was actually surprised that I managed to solve 
it as quickly as I did. I have run a successful hotspot job with it.


Thanks for reviews, David and Chris.

/Erik

Thanks,
David

On 11/05/2016 2:41 AM, Erik Joelsson wrote:

Hello,

When cross compiling, we compile a subset of the jdk for the build host
to be able to run jmod and jlink. Configure sets up a toolchain for this
through variables prefixed "BUILD_" (BUILD_CC etc). The new nifty macro
we have for conditionally setting compiler flags depending on the
version of the compiler is currently unaware of this. The result is that
if the compiler version for the target and build toolchain differ, the
macro will provide the wrong compiler flags.

This patch makes the version check macro able to handle both the target
and build toolchain. It also fixes the BUILD_CC_DISABLE_WARNING_PREFIX
variable which is currently always empty. The result is that our cross
compile configurations at Oracle no longer emits warnings from the build
toolchain.

Bug: https://bugs.openjdk.java.net/browse/JDK-8155587
Webrev: http://cr.openjdk.java.net/~erikj/8155587/webrev.top.01/

/Erik




Re: RFR: JDK-8155587: Cross compilation may cause compiler warnings for "build" compiler

2016-05-11 Thread David Holmes

Hi Erik,

Seems reasonable. flags.m4 is okay, but the toolchain.m4 changes stretch 
my comprehension of the overall process. As long as this gets through 
jprt with -testset hotspot, then I'm fine with it. :)


Thanks,
David

On 11/05/2016 2:41 AM, Erik Joelsson wrote:

Hello,

When cross compiling, we compile a subset of the jdk for the build host
to be able to run jmod and jlink. Configure sets up a toolchain for this
through variables prefixed "BUILD_" (BUILD_CC etc). The new nifty macro
we have for conditionally setting compiler flags depending on the
version of the compiler is currently unaware of this. The result is that
if the compiler version for the target and build toolchain differ, the
macro will provide the wrong compiler flags.

This patch makes the version check macro able to handle both the target
and build toolchain. It also fixes the BUILD_CC_DISABLE_WARNING_PREFIX
variable which is currently always empty. The result is that our cross
compile configurations at Oracle no longer emits warnings from the build
toolchain.

Bug: https://bugs.openjdk.java.net/browse/JDK-8155587
Webrev: http://cr.openjdk.java.net/~erikj/8155587/webrev.top.01/

/Erik


Re: RFR: JDK-8155587: Cross compilation may cause compiler warnings for "build" compiler

2016-05-10 Thread Chris Plummer

Hi Erik,

I can confirm the changes resolve the issues I was having. I looked at 
the changes, but don't really have the background to comment on them.


thanks,

Chris

On 5/10/16 9:41 AM, Erik Joelsson wrote:

Hello,

When cross compiling, we compile a subset of the jdk for the build 
host to be able to run jmod and jlink. Configure sets up a toolchain 
for this through variables prefixed "BUILD_" (BUILD_CC etc). The new 
nifty macro we have for conditionally setting compiler flags depending 
on the version of the compiler is currently unaware of this. The 
result is that if the compiler version for the target and build 
toolchain differ, the macro will provide the wrong compiler flags.


This patch makes the version check macro able to handle both the 
target and build toolchain. It also fixes the 
BUILD_CC_DISABLE_WARNING_PREFIX variable which is currently always 
empty. The result is that our cross compile configurations at Oracle 
no longer emits warnings from the build toolchain.


Bug: https://bugs.openjdk.java.net/browse/JDK-8155587
Webrev: http://cr.openjdk.java.net/~erikj/8155587/webrev.top.01/

/Erik




RFR: JDK-8155587: Cross compilation may cause compiler warnings for "build" compiler

2016-05-10 Thread Erik Joelsson

Hello,

When cross compiling, we compile a subset of the jdk for the build host 
to be able to run jmod and jlink. Configure sets up a toolchain for this 
through variables prefixed "BUILD_" (BUILD_CC etc). The new nifty macro 
we have for conditionally setting compiler flags depending on the 
version of the compiler is currently unaware of this. The result is that 
if the compiler version for the target and build toolchain differ, the 
macro will provide the wrong compiler flags.


This patch makes the version check macro able to handle both the target 
and build toolchain. It also fixes the BUILD_CC_DISABLE_WARNING_PREFIX 
variable which is currently always empty. The result is that our cross 
compile configurations at Oracle no longer emits warnings from the build 
toolchain.


Bug: https://bugs.openjdk.java.net/browse/JDK-8155587
Webrev: http://cr.openjdk.java.net/~erikj/8155587/webrev.top.01/

/Erik