8221179: Zero builds fail when linking with gold and bundling libffi.so
Reviewed-by: sgehwolf, tbell
--- a/make/hotspot/lib/JvmFeatures.gmk Fri Mar 22 09:05:06 2019 -0400
+++ b/make/hotspot/lib/JvmFeatures.gmk Fri Mar 22 08:14:21 2019 -0700
@@ -47,6 +47,9 @@
ifeq ($(call check-jvm-feature, zero), true)
JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
+ ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
+ JVM_LDFLAGS_FEATURES += $(call SET_EXECUTABLE_ORIGIN,/..)
+ endif
ifeq ($(call isTargetCpu, sparcv9), true)
BUILD_LIBJVM_EXTRA_FILES := $(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
endif