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

Erik Joelsson erik.joelsson at oracle.com
Tue May 10 16:41:35 UTC 2016


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 

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


More information about the build-dev mailing list