RFR: libawt_xawt and libawt_headless should not set rpath to $ORIGIN/..

Erik Joelsson erik.joelsson at oracle.com
Thu Dec 22 13:46:34 UTC 2016


The recent removal of the lib/$ARCH directory uncovered an old bug in 
the building of libawt_xawt and libawt_headless (on Solaris and Linux).

Historically, in JDK 7, these two libraries were shipped in a subdir. 
For them to be able to load additional libraries, an rpath of $ORIGIN/.. 
was added to them. When we moved them up to the same dir as most other 
libraries in JDK 8, we forgot to also remove this additional rpath. 
After the removal of the lib/$ARCH dir, the $ORIGIN/.. now points to the 
root JDK dir, which (through some intricate interactions) triggered test 
failures in certain circumstances.

It's clear however that these extra rpaths should just be removed.

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


diff -r fd24639b8a40 make/lib/Awt2dLibraries.gmk
--- a/make/lib/Awt2dLibraries.gmk
+++ b/make/lib/Awt2dLibraries.gmk
@@ -362,7 +362,6 @@
          MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
          LDFLAGS := $(LDFLAGS_JDKLIB) \
              $(call SET_SHARED_LIBRARY_ORIGIN) \
-            $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
              -L$(INSTALL_LIBRARIES_HERE), \
          LIBS :=  $(X_LIBS) $(LIBAWT_XAWT_LIBS), \
@@ -564,8 +563,6 @@
            $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
-      LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
        LIBS_unix := -lawt -ljvm -ljava, \
        LIBS_linux := $(LIBM) $(LIBDL), \


More information about the build-dev mailing list