diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-08-29 11:27:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-29 12:02:26 +0200 |
commit | 34ca8dd9adb62c1154f979887a38483d73da978b (patch) | |
tree | 86907a50ccfefcd088c6c04e56f08542dfaf0caa | |
parent | cc9c380b157d03ca10d66c66f4500ddaf5e42f7e (diff) |
fdo#54015: At least FreeBSD ld requires -z origin when RPATH contains $ORIGIN
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>:
* bulk replacement of "-Wl,-z,origin,-rpath,..." with
"-Wl,-z,origin -Wl,rpath,..."
* additional hunk for directory/c-sdk/config/FreeBSD.mk in
moz/seamonkey-source-1.1.14.patch did not apply and has been dropped
Change-Id: Ie60c696f041108e819ce8f799cff6f58e63a5ad7
-rw-r--r-- | berkeleydb/makefile.mk | 6 | ||||
-rw-r--r-- | cairo/cairo/makefile.mk | 2 | ||||
-rw-r--r-- | cairo/pixman/makefile.mk | 4 | ||||
-rw-r--r-- | libxmlsec/makefile.mk | 4 | ||||
-rw-r--r-- | libxslt/makefile.mk | 4 | ||||
-rw-r--r-- | moz/seamonkey-source-1.1.14.patch | 35 | ||||
-rw-r--r-- | nss/nss.patch | 28 | ||||
-rw-r--r-- | odk/settings/settings.mk | 4 | ||||
-rw-r--r-- | redland/raptor/makefile.mk | 2 | ||||
-rw-r--r-- | redland/rasqal/makefile.mk | 2 | ||||
-rw-r--r-- | redland/redland/makefile.mk | 2 | ||||
-rw-r--r-- | registry/workben/makefile.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 4 | ||||
-rw-r--r-- | solenv/inc/unxgcc.mk | 8 | ||||
-rw-r--r-- | stlport/STLport-4.5.patch | 4 |
15 files changed, 71 insertions, 42 deletions
diff --git a/berkeleydb/makefile.mk b/berkeleydb/makefile.mk index 6ee001dd7c64..eff14b8515e9 100644 --- a/berkeleydb/makefile.mk +++ b/berkeleydb/makefile.mk @@ -89,14 +89,14 @@ CXXFLAGS+=-g .ENDIF .IF "$(GUI)"=="UNX" -.IF "$(OS)$(COM)"=="LINUXGCC" -LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN' +.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" +LDFLAGS:=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN' .EXPORT: LDFLAGS #The current dir when linking is unxlngi6.pro/misc/build/db-4.2.52.NC/out # the map file is in unxlngi6.pro/misc/build/db-4.2.52.NC LDFLAGSVERSION:= -Wl,--version-script=../db_4_7_gcc4.map .EXPORT: LDFLAGSVERSION -.ENDIF # "$(OS)$(COM)"=="LINUXGCC" +.ENDIF # "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" .IF "$(OS)$(COM)"=="SOLARISC52" LDFLAGS:=$(ARCH_FLAGS) -R\''$$$$ORIGIN'\' .EXPORT: LDFLAGS diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk index 2b079d054ef7..e5d0b941900e 100644 --- a/cairo/cairo/makefile.mk +++ b/cairo/cairo/makefile.mk @@ -137,7 +137,7 @@ OUT2INC+=src$/cairo-quartz.h .ELSE # ----------- Unix --------------------------------------------------------- .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" -cairo_LDFLAGS+=-Wl,-rpath,\$$$$ORIGIN:\$$$$ORIGIN/../ure-link/lib -Wl,-z,noexecstack +cairo_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN:\$$$$ORIGIN/../ure-link/lib -Wl,-z,noexecstack .ELIF "$(OS)$(COM)"=="SOLARISC52" cairo_LDFLAGS+=-Wl,-R\$$$$ORIGIN:\$$$$ORIGIN/../ure-link/lib .ENDIF # "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" diff --git a/cairo/pixman/makefile.mk b/cairo/pixman/makefile.mk index a584b520de94..316d2d60af2f 100644 --- a/cairo/pixman/makefile.mk +++ b/cairo/pixman/makefile.mk @@ -97,8 +97,8 @@ BUILD_DIR=$(CONFIGURE_DIR) .ELSE # ----------- Unix --------------------------------------------------------- .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" -LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-z,noexecstack -.ENDIF # "$(OS)$(COM)"=="LINUXGCC" +LDFLAGS:=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-z,noexecstack +.ENDIF # "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" .IF "$(OS)$(COM)"=="SOLARISC52" LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' diff --git a/libxmlsec/makefile.mk b/libxmlsec/makefile.mk index 2f0550f07df1..38ce01359baf 100644 --- a/libxmlsec/makefile.mk +++ b/libxmlsec/makefile.mk @@ -154,8 +154,8 @@ xmlsec_CPPFLAGS+=$(EXTRA_CDEFS) .ENDIF .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" -xmlsec_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -.ENDIF # "$(OS)$(COM)"=="LINUXGCC" +xmlsec_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' +.ENDIF # "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" .IF "$(OS)$(COM)"=="SOLARISC52" xmlsec_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' .ENDIF # "$(OS)$(COM)"=="SOLARISC52" diff --git a/libxslt/makefile.mk b/libxslt/makefile.mk index 7c86a4cce6e1..670ebb952219 100644 --- a/libxslt/makefile.mk +++ b/libxslt/makefile.mk @@ -103,8 +103,8 @@ BUILD_DIR=$(CONFIGURE_DIR) .ELSE .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" -LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec -.ENDIF # "$(OS)$(COM)"=="LINUXGCC" +LDFLAGS:=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec +.ENDIF # "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" .IF "$(OS)$(COM)"=="SOLARISC52" LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' .ENDIF # "$(OS)$(COM)"=="SOLARISC52" diff --git a/moz/seamonkey-source-1.1.14.patch b/moz/seamonkey-source-1.1.14.patch index 6931c897147e..a23bcaa99d4c 100644 --- a/moz/seamonkey-source-1.1.14.patch +++ b/moz/seamonkey-source-1.1.14.patch @@ -86,16 +86,23 @@ PYTHON = @MOZ_PYTHON@ --- misc/mozilla/config/config.mk 2008-01-29 20:30:22.000000000 +0100 +++ misc/build/mozilla/config/config.mk 2008-08-14 16:22:21.000000000 +0200 -@@ -758,6 +758,23 @@ +@@ -758,6 +758,30 @@ endif # +# Shared library RUNPATH linker option(s) +# ++ifeq ($(OS_ARCH),FreeBSD) ++EXTRA_DSO_LDOPTS += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib ++ifdef IS_COMPONENT ++EXTRA_DSO_LDOPTS += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN/..:\$$ORIGIN/../../ure-link/lib ++endif # IS_COMPONENT ++endif # FreeBSD ++ +ifeq ($(OS_ARCH),Linux) -+EXTRA_DSO_LDOPTS += -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib ++EXTRA_DSO_LDOPTS += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib +ifdef IS_COMPONENT -+EXTRA_DSO_LDOPTS += -Wl,-rpath,\$$ORIGIN/..:\$$ORIGIN/../../ure-link/lib ++EXTRA_DSO_LDOPTS += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN/..:\$$ORIGIN/../../ure-link/lib +endif # IS_COMPONENT +endif # Linux + @@ -510,7 +517,7 @@ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' -+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-rpath,'$\$ORIGIN:$\$ORIGIN/../ure-link/lib'" ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,origin -Wl,-rpath,'$\$ORIGIN:$\$ORIGIN/../ure-link/lib'" OS_LIBS="$OS_LIBS -lc" _OPTIMIZE_FLAGS=-O2 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that @@ -579,7 +586,7 @@ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' -+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-rpath,'$\$ORIGIN:$\$ORIGIN/../ure-link/lib'" ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,origin -Wl,-rpath,'$\$ORIGIN:$\$ORIGIN/../ure-link/lib'" OS_LIBS="$OS_LIBS -lc" _OPTIMIZE_FLAGS=-O2 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that @@ -5793,12 +5800,16 @@ else --- misc/mozilla/nsprpub/lib/ds/Makefile.in 2006-12-22 14:47:17.000000000 +0100 +++ misc/build/mozilla/nsprpub/lib/ds/Makefile.in 2008-08-14 16:22:21.000000000 +0200 -@@ -79,18 +79,22 @@ +@@ -79,18 +79,26 @@ OS_LIBS = -lc endif ++ifeq ($(OS_ARCH),FreeBSD) ++MKSHLIB += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib ++endif ++ +ifeq ($(OS_ARCH),Linux) -+MKSHLIB += -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib ++MKSHLIB += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib +endif + ifeq ($(OS_ARCH),SunOS) @@ -5821,12 +5832,16 @@ # dependencies in the same directory where it resides. --- misc/mozilla/nsprpub/lib/libc/src/Makefile.in 2006-12-22 14:47:17.000000000 +0100 +++ misc/build/mozilla/nsprpub/lib/libc/src/Makefile.in 2008-08-14 16:22:21.000000000 +0200 -@@ -89,18 +89,22 @@ +@@ -89,18 +89,26 @@ OS_LIBS = -lc endif ++ifeq ($(OS_ARCH),FreeBSD) ++MKSHLIB += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib ++endif ++ +ifeq ($(OS_ARCH),Linux) -+MKSHLIB += -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib ++MKSHLIB += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib +endif + ifeq ($(OS_ARCH),SunOS) @@ -5885,7 +5900,7 @@ DSO_CFLAGS = -fPIC DSO_LDOPTS = -shared $(ARCHFLAG) -+DSO_LDOPTS += -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib ++DSO_LDOPTS += -Wl,-z,origin -Wl,-rpath,\$$ORIGIN:\$$ORIGIN/../ure-link/lib DSO_LDFLAGS = LDFLAGS += $(ARCHFLAG) diff --git a/nss/nss.patch b/nss/nss.patch index 636c3231286c..19ee7c5e803b 100644 --- a/nss/nss.patch +++ b/nss/nss.patch @@ -5,7 +5,7 @@ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC - DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' -+ DSO_LDOPTS='-shared -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)' ++ DSO_LDOPTS='-shared -Wl,-z,origin -Wl,-rpath,\$$ORIGIN -Wl,-soname -Wl,$(notdir $@)' _OPTIMIZE_FLAGS=-O2 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that # combo is not yet good at debugging inlined @@ -26,6 +26,16 @@ RANLIB = ranlib ifndef CPU_ARCH +--- misc/nss-3.13.5/mozilla/security/coreconf/FreeBSD.mk 2009-11-23 05:06:29.000000000 -0500 ++++ misc/build/nss-3.13.5/mozilla/security/coreconf/FreeBSD.mk 2012-08-28 20:27:20.000000000 -0400 +@@ -57,6 +57,7 @@ + + DSO_CFLAGS = -fPIC + DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) ++DSO_LDOPTS += '-Wl,-z,origin -Wl,-rpath,$$ORIGIN' + + # + # The default implementation strategy for FreeBSD is pthreads. --- misc/nss-3.13.5/mozilla/security/coreconf/Linux.mk 2010-01-15 23:19:00.000000000 +0100 +++ misc/build/nss-3.13.5/mozilla/security/coreconf/Linux.mk 2010-06-11 16:35:54.981151732 +0200 @@ -46,8 +46,11 @@ @@ -47,7 +57,7 @@ # we don't use -z defs there. ZDEFS_FLAG = -Wl,-z,defs -DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -+DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) '-Wl,-rpath,$$ORIGIN' ++DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) '-Wl,-z,origin -Wl,-rpath,$$ORIGIN' LDFLAGS += $(ARCHFLAG) # INCLUDES += -I/usr/include -Y/usr/include/linux @@ -100,7 +110,7 @@ ifndef BUILD_OPT --- misc/nss-3.13.5/mozilla/security/nss/cmd/platlibs.mk 2010-02-04 19:59:10.000000000 +0100 +++ misc/build/nss-3.13.5/mozilla/security/nss/cmd/platlibs.mk 2010-06-11 16:35:55.004869805 +0200 -@@ -41,27 +41,28 @@ +@@ -41,27 +41,32 @@ ifeq ($(OS_ARCH), SunOS) ifeq ($(BUILD_SUN_PKG), 1) ifeq ($(USE_64), 1) @@ -117,22 +127,26 @@ endif endif ++ifeq ($(OS_ARCH), FreeBSD) ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' ++endif ++ ifeq ($(OS_ARCH), Linux) ifeq ($(BUILD_SUN_PKG), 1) ifeq ($(USE_64), 1) -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' -+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' else -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' -+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' endif else ifeq ($(USE_64), 1) -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:$$ORIGIN/../lib' -+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' else -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib' -+EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN' ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' endif endif endif diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk index f2eeb144925a..489701028f57 100644 --- a/odk/settings/settings.mk +++ b/odk/settings/settings.mk @@ -345,7 +345,7 @@ CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_G CC_OUTPUT_SWITCH=-o -LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' +LIBRARY_LINK_FLAGS=-shared '-Wl,-z,origin -Wl,-rpath,$$ORIGIN' ifeq "$(PROCTYPE)" "ppc" LIBRARY_LINK_FLAGS+=-fPIC @@ -580,7 +580,7 @@ CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK CC_OUTPUT_SWITCH=-o -LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' +LIBRARY_LINK_FLAGS=-shared '-Wl,-z,origin -Wl,-rpath,$$ORIGIN' COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined diff --git a/redland/raptor/makefile.mk b/redland/raptor/makefile.mk index 635ac56a916d..fa759f5956e8 100644 --- a/redland/raptor/makefile.mk +++ b/redland/raptor/makefile.mk @@ -118,7 +118,7 @@ BUILD_DIR=$(CONFIGURE_DIR)$/src .ELSE # "WNT" .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" -LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec +LDFLAGS:=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec .ENDIF # "$(OS)$(COM)"=="LINUXGCC" .IF "$(OS)$(COM)"=="SOLARISC52" LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' diff --git a/redland/rasqal/makefile.mk b/redland/rasqal/makefile.mk index 1209c5af7117..9911e2f16424 100644 --- a/redland/rasqal/makefile.mk +++ b/redland/rasqal/makefile.mk @@ -98,7 +98,7 @@ BUILD_DIR=$(CONFIGURE_DIR)$/src .ELSE # "WNT" .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" -LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec +LDFLAGS:=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec .ENDIF # "$(OS)$(COM)"=="LINUXGCC" .IF "$(OS)$(COM)"=="SOLARISC52" LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' diff --git a/redland/redland/makefile.mk b/redland/redland/makefile.mk index 683ce3df260e..1fe3d6d6d987 100644 --- a/redland/redland/makefile.mk +++ b/redland/redland/makefile.mk @@ -98,7 +98,7 @@ BUILD_DIR=$(CONFIGURE_DIR)$/librdf .ELSE # "WNT" .IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" -LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec +LDFLAGS:=-Wl,-z,origin -Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' -Wl,-noinhibit-exec .ENDIF # "$(OS)$(COM)"=="LINUXGCC" .IF "$(OS)$(COM)"=="SOLARISC52" LDFLAGS:=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' diff --git a/registry/workben/makefile.mk b/registry/workben/makefile.mk index c0e07eab3f28..32b8b0e92dd5 100644 --- a/registry/workben/makefile.mk +++ b/registry/workben/makefile.mk @@ -54,8 +54,8 @@ APP2OBJS= $(OBJ)$/test.obj APP2RPATH=NONE .IF "$(GUI)"=="UNX" && "$(OS)"!="MACOSX" -.IF "$(OS)"=="LINUX" -APP2LINKFLAGS=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../lib'\' +.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" +APP2LINKFLAGS=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../lib'\' .ENDIF .IF "$(OS)"=="SOLARIS" diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index bb0db92449b3..cb1493dbc037 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -297,7 +297,7 @@ gb_Library_LAYER := \ $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):OXT) \ define gb_Library__get_rpath -$(if $(1),$(strip '-Wl,-rpath,$(1)' '-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)')) +$(if $(1),$(strip '-Wl,-z,origin -Wl,-rpath,$(1)' '-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)')) endef define gb_Library_get_rpath @@ -338,7 +338,7 @@ gb_Executable_LAYER := \ define gb_Executable_get_rpath -'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \ +'-Wl,-z,origin -Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \ -Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION) endef diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk index 0e98de77f47d..3ac4956ff216 100644 --- a/solenv/inc/unxgcc.mk +++ b/solenv/inc/unxgcc.mk @@ -191,11 +191,11 @@ LINKFLAGS_SYSBASE:=-Wl,--sysroot=$(SYSBASE) # entry. This will cause both, DT_RPATH and DT_RUNPATH entries, to be created # LINKFLAGSDEFS*=-Wl,-z,defs -LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\',--enable-new-dtags -LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\',--enable-new-dtags +LINKFLAGSRUNPATH_URELIB=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN'\',--enable-new-dtags +LINKFLAGSRUNPATH_UREBIN=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\',--enable-new-dtags #TODO: drop $ORIGIN once no URE executable is also shipped in OOo -LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\',--enable-new-dtags -LINKFLAGSRUNPATH_SDKBIN=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\',--enable-new-dtags +LINKFLAGSRUNPATH_OOO=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\',--enable-new-dtags +LINKFLAGSRUNPATH_SDKBIN=-Wl,-z,origin -Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\',--enable-new-dtags LINKFLAGSRUNPATH_OXT= LINKFLAGSRUNPATH_NONE= # flag -Wl,-z,noexecstack sets the NX bit on the stack diff --git a/stlport/STLport-4.5.patch b/stlport/STLport-4.5.patch index 0a0027594ad3..dd6b499ee156 100644 --- a/stlport/STLport-4.5.patch +++ b/stlport/STLport-4.5.patch @@ -137,7 +137,7 @@ +# +# +LINK=ar cr -+DYN_LINK=${CXX} -Wl,-rpath,'$$ORIGIN' ${PTHREAD_LIBS} -fexceptions -shared -o ++DYN_LINK=${CXX} -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' ${PTHREAD_LIBS} -fexceptions -shared -o + +OBJEXT=o +DYNEXT=so @@ -449,7 +449,7 @@ +# +# +LINK=ar cr -+DYN_LINK=$(CXX) -Wl,-rpath,'$$ORIGIN' -fexceptions -shared -o ++DYN_LINK=$(CXX) -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' -fexceptions -shared -o + +OBJEXT=o +DYNEXT=so |