--- old/make/common/Program.gmk 2012-08-09 16:38:36.186850718 -0400 +++ new/make/common/Program.gmk 2012-08-09 16:38:36.020850720 -0400 @@ -126,6 +126,26 @@ endif # PLATFORM # +# Applications expect to be able to link against libjawt without invoking +# System.loadLibrary("jawt") first. This was the behaviour described in the +# devloper documentation of JAWT and what worked with OpenJDK6. +# +ifeq ($(PLATFORM), solaris) + ifeq ($(ARCH_DATA_MODEL), 32) + LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH) + LDFLAGS += -R \$$ORIGIN/../jre/lib/$(LIBARCH) + else # ! ARCH_DATA_MODEL 64-bit + LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH) + LDFLAGS += -R \$$ORIGIN/../../jre/lib/$(LIBARCH) + endif # ARCH_DATA_MODEL +endif # PLATFORM SOLARIS +ifeq ($(PLATFORM), linux) + LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH) + LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH) +endif # PLATFORM LINUX + + +# # Launcher specific files. # FILES_o = $(OBJDIR)/main.$(OBJECT_SUFFIX) --- old/make/sun/jawt/Makefile 2012-08-09 16:38:39.001850692 -0400 +++ new/make/sun/jawt/Makefile 2012-08-09 16:38:38.787850694 -0400 @@ -31,6 +31,13 @@ include $(BUILDDIR)/common/Defs.gmk # +# libjawt links to other programs, but nothing links to it directly. An RPATH +# entry has been added to the launcher so third-party programs linked against +# it will be able to find it no matter where the JDK or the third-party program +# is located. +# + +# # Files # ifeq ($(PLATFORM), windows)