RFR: JDK-8160926: FLAGS_COMPILER_CHECK_ARGUMENTS doesn't handle cross-compilation
Erik Joelsson
erik.joelsson at oracle.com
Tue Feb 5 00:36:44 UTC 2019
Please review this fix for configure flags checking. The macros for
checking compiler capabilities were not able to handle cross compilation
very well. With this fix, they accept an optional PREFIX argument,
instructing them to check the compiler with the given prefix (which is
either empty or BUILD_). Using this, I have moved all calls to the
macros into BUILD/TARGET specific macro bodies so that we correctly
check both the build and target compilers for valid flags.
I have verified by running cross compilation configurations of
linux-aarch64 using both the same and different versions of GCC for
build and target, and compared the output in both configure.log and the
spec files. I've also run tier1 (equivalent to submission forest) and a
COMPARE_BUILD run on Oracle's main platforms as well.
The change unfortunately required adding another prefix type format
since our compiler/tool variables use <empty>/BUILD_ as prefix and the
existing formats were TARGET_/BUILD_ and <empty>/OPENJDK_TARGET_. I
think we could benefit greatly from unifying these.
I've also touched some white space nearby my changes as well as fixed a
trivial error message about "linker" not being found by quoting the
LINKER_NAME assignment in toolchain.m4.
Bug: https://bugs.openjdk.java.net/browse/JDK-8160926
Webrev: http://cr.openjdk.java.net/~erikj/8160926/webrev.01
/Erik
More information about the build-dev
mailing list