suggesting fix: cross-compilation is requiring write permissions to bootstrap jdk

Fedor fedor.burdun at
Tue May 26 13:14:04 UTC 2020

Hello all!

I've tried to crossbuild jdk using current sources and noticed that build 
requires write permissions to bootstrap jdk.
The problem is it tries to write/rewrite class list into bootstrap jdk 
I would like to suggest the fix below to solve this problem:

diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk
--- a/make/GenerateLinkOptData.gmk
+++ b/make/GenerateLinkOptData.gmk
@@ -69,10 +69,10 @@
             -Duser.language=en \
             -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
-       $(GREP) -v HelloClasslist $@.raw > 
-       $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
+       $(GREP) -v HelloClasslist $@.raw > $@.classlist
+       $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump 
-XX:SharedClassListFile=$@.classlist -XX:SharedArchiveFile=$@.jsa \
             -Xmx128M -Xms128M $(LOG_INFO)
-       $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java 
-XX:DumpLoadedClassList=$@.raw \
+       $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java 
-XX:DumpLoadedClassList=$@.raw -XX:SharedClassListFile=$@.classlist 
-XX:SharedArchiveFile=$@.jsa \
             -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
             -Duser.language=en \
             --module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \

Please correct me in case if it is wrong alias, or I need to file bug 
first, or something else.

Best Regards,

More information about the jdk-dev mailing list