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

David Holmes david.holmes at oracle.com
Tue May 26 13:32:12 UTC 2020


Re-directing to the build-dev list.

David

On 26/05/2020 11:14 pm, Fedor wrote:
> Hello all!
> 
> I've tried to crossbuild jdk using current 
> http://hg.openjdk.java.net/jdk/jdk/ sources and noticed that build 
> requires write permissions to bootstrap jdk.
> The problem is it tries to write/rewrite class list into bootstrap jdk 
> directory.
> 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 -Duser.country=US \
>              -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
>              build.tools.classlist.HelloClasslist $(LOG_DEBUG)
> -       $(GREP) -v HelloClasslist $@.raw > 
> $(INTERIM_IMAGE_DIR)/lib/classlist
> -       $(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 -Duser.country=US \
>              --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,
> Fedor
> 


More information about the build-dev mailing list