On Wed, 3 May 2023 13:34:12 GMT, Erik Joelsson <er...@openjdk.org> wrote:

>> This PR is branched from the makefile changes for 
>> https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for 
>> handling the JDK/hotspot static libraries:
>> 
>> - Introduce new make target(s) for creating image/bundle containing hotspot 
>> libjvm.a and JDK static libraries
>> 
>> - For libjvm.a specifically, exclude operator_new.o
>> 
>> - Filter out "external" .o files (those are the .o files included from a 
>> different JDK library and needed when creating the .so shared library only) 
>> from JDK .a libraries; That's to avoid linker failures caused by duplicate 
>> symbols
>>   - For libjli.a: Not include inflate.o inftrees.o inffast.o zadler32.o 
>> zcrc32.o zutil.o (compiled from zlib sources) if zlib is built as JDK bundled
>>  - For libawt_xawt.a and libawt_head.a: Not include systemScale.o, since 
>> it's provided in libawt.a
>>  
>> - Handle long arguments case for static build in 
>> make/common/NativeCompilation.gmk
>> 
>> - Address @erikj79's comment in 
>> https://github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for 
>> LIBJLI_STATIC_EXCLUDE_OBJS
>
> The current target user of the .a libraries is GraalVM, so we should check 
> with them that the changes to the contents of the `.a` files isn't impacting 
> them in a bad way. @dougxc what do you think?

Thanks a lot for the multiple iterations of the discussions and reviews in this 
PR thread. All the input, especially 
https://github.com/openjdk/jdk/pull/13768#pullrequestreview-1415436469 from 
@erikj79 helped shaped this change.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13768#issuecomment-1542387929

Reply via email to