summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien.pierre.boogz%sun.com <devnull@localhost>2009-08-11 22:15:53 +0000
committerjulien.pierre.boogz%sun.com <devnull@localhost>2009-08-11 22:15:53 +0000
commit52b0b1a8337266cd3ad4765b456e0c5bd9b92d88 (patch)
treeaed7738080de34f02999fd262d70f05642227fe6
parent97c66b463ea735310ee343d329b27aaa91e17320 (diff)
downloadnss-hg-52b0b1a8337266cd3ad4765b456e0c5bd9b92d88.tar.gz
Fix for bug 508108 . Backport fix for bug 494107 . r=christophe
-rw-r--r--security/coreconf/HP-UX.mk6
-rw-r--r--security/coreconf/Linux.mk17
-rw-r--r--security/coreconf/Linux2.1.mk2
-rw-r--r--security/coreconf/Linux2.2.mk2
-rw-r--r--security/coreconf/Linux2.4.mk2
-rw-r--r--security/coreconf/Linux2.5.mk2
-rw-r--r--security/coreconf/Linux2.6.mk2
-rw-r--r--security/coreconf/SunOS5.mk14
-rw-r--r--security/nss/lib/ckfw/builtins/config.mk14
-rw-r--r--security/nss/lib/ckfw/capi/config.mk6
-rw-r--r--security/nss/lib/freebl/Makefile3
-rw-r--r--security/nss/lib/nss/config.mk23
-rw-r--r--security/nss/lib/smime/config.mk15
-rw-r--r--security/nss/lib/softoken/legacydb/config.mk12
-rw-r--r--security/nss/lib/sqlite/config.mk11
-rw-r--r--security/nss/lib/ssl/config.mk15
-rw-r--r--security/nss/lib/util/config.mk22
17 files changed, 37 insertions, 131 deletions
diff --git a/security/coreconf/HP-UX.mk b/security/coreconf/HP-UX.mk
index ef895337d..535533914 100644
--- a/security/coreconf/HP-UX.mk
+++ b/security/coreconf/HP-UX.mk
@@ -76,7 +76,7 @@ endif
LDFLAGS = -z -Wl,+s
-MKSHLIB = $(LD) $(DSO_LDOPTS)
+MKSHLIB = $(LD) $(DSO_LDOPTS) $(RPATH)
ifdef MAPFILE
MKSHLIB += -c $(MAPFILE)
endif
@@ -84,8 +84,8 @@ PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \
sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,+e ,' > $@
DSO_LDOPTS = -b +h $(notdir $@)
-ifeq ($(OS_TEST),ia64)
- DSO_LDOPTS += +b '$$ORIGIN'
+ifeq ($(USE_64), 1)
+RPATH = +b '$$ORIGIN'
endif
DSO_LDFLAGS =
diff --git a/security/coreconf/Linux.mk b/security/coreconf/Linux.mk
index 11321c76b..e078b4b8f 100644
--- a/security/coreconf/Linux.mk
+++ b/security/coreconf/Linux.mk
@@ -144,7 +144,7 @@ LIBC_TAG = _glibc
ifeq ($(OS_RELEASE),2.0)
OS_REL_CFLAGS += -DLINUX2_0
- MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+ MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH)
ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif
@@ -193,3 +193,18 @@ CPU_TAG = _$(CPU_ARCH)
USE_SYSTEM_ZLIB = 1
ZLIB_LIBS = -lz
+
+# The -rpath '$$ORIGIN' linker option instructs this library to search for its
+# dependencies in the same directory where it resides.
+ifeq ($(BUILD_SUN_PKG), 1)
+ifeq ($(USE_64), 1)
+RPATH = -Wl,-rpath,'$$ORIGIN:/opt/sun/private/lib64:/opt/sun/private/lib'
+else
+RPATH = -Wl,-rpath,'$$ORIGIN:/opt/sun/private/lib'
+endif
+else
+ifdef MOZILLA_CLIENT
+RPATH = -Wl,-rpath,'$$ORIGIN'
+endif
+endif
+
diff --git a/security/coreconf/Linux2.1.mk b/security/coreconf/Linux2.1.mk
index 7569e1b10..e92503aab 100644
--- a/security/coreconf/Linux2.1.mk
+++ b/security/coreconf/Linux2.1.mk
@@ -38,7 +38,7 @@
include $(CORE_DEPTH)/coreconf/Linux.mk
ifeq ($(OS_RELEASE),2.1)
OS_REL_CFLAGS += -DLINUX2_1
- MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+ MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH)
ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE)
endif
diff --git a/security/coreconf/Linux2.2.mk b/security/coreconf/Linux2.2.mk
index 86bffef75..4a6cc1e6c 100644
--- a/security/coreconf/Linux2.2.mk
+++ b/security/coreconf/Linux2.2.mk
@@ -38,7 +38,7 @@
include $(CORE_DEPTH)/coreconf/Linux.mk
OS_REL_CFLAGS += -DLINUX2_1
-MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH)
ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE)
diff --git a/security/coreconf/Linux2.4.mk b/security/coreconf/Linux2.4.mk
index 86bffef75..4a6cc1e6c 100644
--- a/security/coreconf/Linux2.4.mk
+++ b/security/coreconf/Linux2.4.mk
@@ -38,7 +38,7 @@
include $(CORE_DEPTH)/coreconf/Linux.mk
OS_REL_CFLAGS += -DLINUX2_1
-MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH)
ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE)
diff --git a/security/coreconf/Linux2.5.mk b/security/coreconf/Linux2.5.mk
index 86bffef75..4a6cc1e6c 100644
--- a/security/coreconf/Linux2.5.mk
+++ b/security/coreconf/Linux2.5.mk
@@ -38,7 +38,7 @@
include $(CORE_DEPTH)/coreconf/Linux.mk
OS_REL_CFLAGS += -DLINUX2_1
-MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH)
ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE)
diff --git a/security/coreconf/Linux2.6.mk b/security/coreconf/Linux2.6.mk
index 86bffef75..4a6cc1e6c 100644
--- a/security/coreconf/Linux2.6.mk
+++ b/security/coreconf/Linux2.6.mk
@@ -38,7 +38,7 @@
include $(CORE_DEPTH)/coreconf/Linux.mk
OS_REL_CFLAGS += -DLINUX2_1
-MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
+MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) $(RPATH)
ifdef MAPFILE
MKSHLIB += -Wl,--version-script,$(MAPFILE)
diff --git a/security/coreconf/SunOS5.mk b/security/coreconf/SunOS5.mk
index 549e110f5..c3f8e1825 100644
--- a/security/coreconf/SunOS5.mk
+++ b/security/coreconf/SunOS5.mk
@@ -113,7 +113,7 @@ OS_DEFINES += -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -D_REENTRANT
# Purify doesn't like -MDupdate
NOMD_OS_CFLAGS += $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
-MKSHLIB = $(CC) $(DSO_LDOPTS)
+MKSHLIB = $(CC) $(DSO_LDOPTS) $(RPATH)
ifdef NS_USE_GCC
ifeq (GNU,$(findstring GNU,$(shell `$(CC) -print-prog-name=ld` -v 2>&1)))
GCC_USE_GNU_LD = 1
@@ -166,3 +166,15 @@ endif
NOSUCHFILE = /solaris-rm-f-sucks
+ifeq ($(BUILD_SUN_PKG), 1)
+# The -R '$ORIGIN' linker option instructs this library to search for its
+# dependencies in the same directory where it resides.
+ifeq ($(USE_64), 1)
+RPATH = -R '$$ORIGIN:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
+else
+RPATH = -R '$$ORIGIN:/usr/lib/mps/secv1:/usr/lib/mps'
+endif
+else
+RPATH = -R '$$ORIGIN'
+endif
+
diff --git a/security/nss/lib/ckfw/builtins/config.mk b/security/nss/lib/ckfw/builtins/config.mk
index de13c4363..8650f7185 100644
--- a/security/nss/lib/ckfw/builtins/config.mk
+++ b/security/nss/lib/ckfw/builtins/config.mk
@@ -65,17 +65,3 @@ DSO_LDOPTS = -bundle
endif
endif
-ifeq ($(OS_TARGET),SunOS)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-MKSHLIB += -R '$$ORIGIN'
-endif
-
-ifeq ($(OS_ARCH), HP-UX)
-ifneq ($(OS_TEST), ia64)
-# pa-risc
-ifeq ($(USE_64), 1)
-MKSHLIB += +b '$$ORIGIN'
-endif
-endif
-endif
diff --git a/security/nss/lib/ckfw/capi/config.mk b/security/nss/lib/ckfw/capi/config.mk
index 05aa6cc17..8650f7185 100644
--- a/security/nss/lib/ckfw/capi/config.mk
+++ b/security/nss/lib/ckfw/capi/config.mk
@@ -65,9 +65,3 @@ DSO_LDOPTS = -bundle
endif
endif
-ifeq ($(OS_TARGET),SunOS)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-MKSHLIB += -R '$$ORIGIN'
-endif
-
diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile
index 3abd3c646..49f75a5d7 100644
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -218,9 +218,6 @@ endif
ifeq ($(OS_TARGET),SunOS)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-MKSHLIB += -R '$$ORIGIN'
ifdef NS_USE_GCC
ifdef GCC_USE_GNU_LD
MKSHLIB += -Wl,-Bsymbolic,-z,now,-z,text
diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk
index 195448df1..0d04591ea 100644
--- a/security/nss/lib/nss/config.mk
+++ b/security/nss/lib/nss/config.mk
@@ -127,29 +127,6 @@ SHARED_LIBRARY_DIRS = \
../libpkix/pkix_pl_nss/module \
$(NULL)
-ifeq ($(OS_TARGET),SunOS)
-ifeq ($(BUILD_SUN_PKG), 1)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-ifeq ($(USE_64), 1)
-MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
-else
-MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1:/usr/lib/mps'
-endif
-else
-MKSHLIB += -R '$$ORIGIN'
-endif
-endif
-
-ifeq ($(OS_ARCH), HP-UX)
-ifneq ($(OS_TEST), ia64)
-# pa-risc
-ifeq ($(USE_64), 1)
-MKSHLIB += +b '$$ORIGIN'
-endif
-endif
-endif
-
ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET)))
ifndef NS_USE_GCC
# Export 'mktemp' to be backward compatible with NSS 3.2.x and 3.3.x
diff --git a/security/nss/lib/smime/config.mk b/security/nss/lib/smime/config.mk
index 2437c62a5..cc34af9b1 100644
--- a/security/nss/lib/smime/config.mk
+++ b/security/nss/lib/smime/config.mk
@@ -91,18 +91,3 @@ SHARED_LIBRARY_DIRS = \
../pkcs7 \
$(NULL)
-ifeq ($(OS_TARGET),SunOS)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-MKSHLIB += -R '$$ORIGIN'
-endif
-
-ifeq ($(OS_ARCH), HP-UX)
-ifneq ($(OS_TEST), ia64)
-# pa-risc
-ifeq ($(USE_64), 1)
-MKSHLIB += +b '$$ORIGIN'
-endif
-endif
-endif
-
diff --git a/security/nss/lib/softoken/legacydb/config.mk b/security/nss/lib/softoken/legacydb/config.mk
index 1d541b8b1..21195ceba 100644
--- a/security/nss/lib/softoken/legacydb/config.mk
+++ b/security/nss/lib/softoken/legacydb/config.mk
@@ -93,21 +93,9 @@ EXTRA_SHARED_LIBS += \
endif
ifeq ($(OS_TARGET),SunOS)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-MKSHLIB += -R '$$ORIGIN'
OS_LIBS += -lbsm
endif
-ifeq ($(OS_ARCH), HP-UX)
-ifneq ($(OS_TEST), ia64)
-# pa-risc
-ifeq ($(USE_64), 1)
-MKSHLIB += +b '$$ORIGIN'
-endif
-endif
-endif
-
ifeq ($(OS_TARGET),WINCE)
DEFINES += -DDBM_USING_NSPR
endif
diff --git a/security/nss/lib/sqlite/config.mk b/security/nss/lib/sqlite/config.mk
index fa476ff9f..219bb5bfb 100644
--- a/security/nss/lib/sqlite/config.mk
+++ b/security/nss/lib/sqlite/config.mk
@@ -55,17 +55,6 @@ endif
endif
ifeq ($(OS_TARGET),SunOS)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-MKSHLIB += -R '$$ORIGIN'
OS_LIBS += -lbsm
endif
-ifeq ($(OS_ARCH), HP-UX)
-ifneq ($(OS_TEST), ia64)
-# pa-risc
-ifeq ($(USE_64), 1)
-MKSHLIB += +b '$$ORIGIN'
-endif
-endif
-endif
diff --git a/security/nss/lib/ssl/config.mk b/security/nss/lib/ssl/config.mk
index 553110bb0..8e9c205e0 100644
--- a/security/nss/lib/ssl/config.mk
+++ b/security/nss/lib/ssl/config.mk
@@ -115,19 +115,4 @@ ifeq ($(OS_ARCH), BeOS)
EXTRA_SHARED_LIBS += -lbe
endif
-ifeq ($(OS_TARGET),SunOS)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-MKSHLIB += -R '$$ORIGIN'
-endif
-
-ifeq ($(OS_ARCH), HP-UX)
-ifneq ($(OS_TEST), ia64)
-# pa-risc
-ifeq ($(USE_64), 1)
-MKSHLIB += +b '$$ORIGIN'
-endif
-endif
-endif
-
endif
diff --git a/security/nss/lib/util/config.mk b/security/nss/lib/util/config.mk
index b51f3db58..bc025571c 100644
--- a/security/nss/lib/util/config.mk
+++ b/security/nss/lib/util/config.mk
@@ -80,25 +80,3 @@ EXTRA_SHARED_LIBS += \
endif
-ifeq ($(OS_TARGET),SunOS)
-ifeq ($(BUILD_SUN_PKG), 1)
-# The -R '$ORIGIN' linker option instructs this library to search for its
-# dependencies in the same directory where it resides.
-ifeq ($(USE_64), 1)
-MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
-else
-MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1:/usr/lib/mps'
-endif
-else
-MKSHLIB += -R '$$ORIGIN'
-endif
-endif
-
-ifeq ($(OS_ARCH), HP-UX)
-ifneq ($(OS_TEST), ia64)
-# pa-risc
-ifeq ($(USE_64), 1)
-MKSHLIB += +b '$$ORIGIN'
-endif
-endif
-endif