RFR: JDK-8167387: libjimage.so has a bad runpath

Tim Bell tim.bell at oracle.com
Mon Oct 10 16:52:32 UTC 2016


Erik:

> 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

Looks good to me.

Tim


>
> Patch:
>
> 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 @@
>      CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
>      CFLAGS_unix := -UDEBUG, \
>      MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
> -    LDFLAGS := $(LDFLAGS_JDKLIB) \
> +    LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
>          $(call SET_SHARED_LIBRARY_ORIGIN), \
>      LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \
>          -export:JIMAGE_PackageToModule \





More information about the build-dev mailing list