On 2016-10-10 18:00, Erik Joelsson wrote:
On Solaris libjimage.so has a weird extra runpath set, pointing into the install directory of Solaris Studio.

JDK-8160630 changed libjimage to be compiled as C++ library as it should be. I forgot to add the linker flags LDFLAGS_CXX_JDK to the LDFLAGS of that library. All other C++ libraries in the JDK has these flags set. On Solaris one of them is -norunpath, which seems to be the missing option here.

Verified that the below fix results in a binary without the extra runpath.

Bug: https://bugs.openjdk.java.net/browse/JDK-8167387


diff --git a/make/lib/CoreLibraries.gmk b/make/lib/CoreLibraries.gmk
--- a/make/lib/CoreLibraries.gmk
+++ b/make/lib/CoreLibraries.gmk
@@ -255,7 +255,7 @@
     CFLAGS_unix := -UDEBUG, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
         -export:JIMAGE_PackageToModule \


Looks good to me.


Reply via email to