> This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/VM static libraries: > > - Create libjvm.a together with other JDK static libraries when building > 'static-libs-image' (or 'static-libs-bundles') target, include it in > 'images/static-libs/lib'; > - 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 .a libraries; That's to avoid linker errors due to the duplicate symbols > problems from the related .o files; > - 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;
Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: - Separate building libjvm.a from static-libs-image target, based on input from @jerboaa and @olpaw: - Add a new java-static-libs-image target in Main.gmk for creating the JDK .a static libraries and libjvm.a super set. The static libraries are placed in images/static-libs/lib. The existing static-libs-image target is not affected and will not include hotspot libjvm.a. - Add java-static-libs-bundles target in Bundles.gmk. The created .tar.gz bundle contains JDK .a static libraries and hotspot libjvm.a. - Add StaticJvmLibsImage.gmk for placing libjvm.a into images/static-libs/lib. - Further cleanup after incorporating erikj79's suggestion to only build libjvm.a for $(JVM_VARIANT_MAIN) for now: - Change HOTSPOT_VARIANT_STATIC_LIBS_TARGETS to HOTSPOT_VARIANT_MAIN_STATIC_LIBS_TARGETS in Main.gmk. - Change hotspot-$v-static-libs to hotspot-$(JVM_VARIANT_MAIN)-static-libs in Main.gmk. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13768/files - new: https://git.openjdk.org/jdk/pull/13768/files/84861990..e49d7b4e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13768&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13768&range=04-05 Stats: 78 lines in 4 files changed: 64 ins; 8 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/13768.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/13768/head:pull/13768 PR: https://git.openjdk.org/jdk/pull/13768