> 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: > > - Build hotspot libjvm.a and JDK static libraries for > static-libs-image/static-libs-bundles targets; This change does not affect > the graal-builder-image target > > - 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
Jiangli Zhou has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 13 additional commits since the last revision: - Merge branch 'master' into JDK-8307194 - Merge branch 'master' into JDK-8307194 - Address comments from @erikj79: - Fix to use $(STATIC_LIBS_GRAAL_IMAGE_DIR) in GraalBuilderImage.gmk. - Split the long line at 1281 in Main.gmk. - Fix whitspace errors. - Reflect on @erikj79 suggestions/input on static-libs-image/graal-builder-image and supporting libjvm.a for different JVM_VARIANTS: - Remove the new java-static-libs and java-static-libs-bundles targets. Delete the new make/StaticJvmLibsImage.gmk. - Restore HOTSPOT_VARIANT_STATIC_LIBS_TARGETS and related definitions from previous revision for different $(JVM_VARIANTS). - Change the existing static-libs-image target to build libjvm.a in addition to JDK static libraries. The libjvm.a is placed under images/static-libs/lib/<JVM_VARIANTS>. When building multiple JVM variants, each variant contains its own libjvm.a under images/static-libs/lib/<variant> directory. - Add a new static-libs-graal-image target, which is used by graal-builder-image. Hotspot libjvm.a is not created when building static-libs-graal-image and graal-builder-image targets. - Fix whitespace error in make/StaticJvmLibsImage.gmk. - - 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. - Update to create and use only hotspot-$(JVM_VARIANT_MAIN)-static-libs, based on @erikj79 input. - Update make/StaticLibsImage.gmk thanks Co-authored-by: Erik Joelsson <37597443+erik...@users.noreply.github.com> - Update make/StaticLibsImage.gmk Thanks Co-authored-by: Erik Joelsson <37597443+erik...@users.noreply.github.com> - ... and 3 more: https://git.openjdk.org/jdk/compare/54e2bacc...ba2e9ce6 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/13768/files - new: https://git.openjdk.org/jdk/pull/13768/files/36526d4f..ba2e9ce6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=13768&range=11 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13768&range=10-11 Stats: 125 lines in 7 files changed: 26 ins; 96 del; 3 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