RFR: JDK-8171859: Configure check for modular boot jdk needs to be updated

Erik Joelsson erik.joelsson at oracle.com
Thu Dec 22 09:39:45 UTC 2016


Configure has a check to see if the boot jdk is module aware/enabled. 
Like many others, the build needs to adapt its behavior when using such 
a boot jdk. The current check is no longer compatible with the latest 
JDK 9 builds:

java -version --patch-module foo=bar
WARNING: Unknown module: foo specified in --patch-module

I propose a simple adjustment, to instead specify java.base as the 
module to patch. I also made it explicit that the directory to patch 
from does not exist.

I'm open to suggestions on better tests though, but would prefer if they 
can be as simple as checking for a command line argument.

Bug: https://bugs.openjdk.java.net/browse/JDK-8171859


diff -r 84c58139cbd3 common/autoconf/boot-jdk.m4
--- a/common/autoconf/boot-jdk.m4
+++ b/common/autoconf/boot-jdk.m4
@@ -305,7 +305,9 @@
    BOOT_JDK_SOURCETARGET="-source 8 -target 8"

-  ADD_JVM_ARG_IF_OK([--patch-module foo=bar], dummy, [$JAVA])
+  # Use a non existing directory as the directory will be scanned otherwise
+  # and can potentially take a lot of time.
+  ADD_JVM_ARG_IF_OK([--patch-module 
java.base=SOME_DIR_THAT_DOES_NOT_EXIST], dummy, [$JAVA])
    AC_MSG_CHECKING([if Boot JDK supports modules])
    if test "x$JVM_ARG_OK" = "xtrue"; then


More information about the build-dev mailing list