summaryrefslogtreecommitdiff
path: root/devel/nspr/patches/patch-ac
blob: c72b2813553796351824024124852f747b22267d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$NetBSD: patch-ac,v 1.15 2021/07/01 07:23:00 wiz Exp $

add runpath to Linux caught during check-shlibs-elf

--- nspr/configure.in.orig	2021-06-30 21:43:23.000000000 +0000
+++ nspr/configure.in
@@ -38,7 +38,7 @@ OBJDIR_NAME=.
 OBJDIR_SUFFIX=OBJ
 NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
 NOSUCHFILE=/no-such-file
-LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
+LIBNSPR='-Wl,-R${prefix}/lib/${MOZILLA_PKG_NAME} -L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
 LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
 CYGWIN_WRAPPER=
 MACOS_SDK_DIR=
@@ -1486,6 +1486,9 @@ tools are selected during the Xcode/Deve
     DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
     MDCPUCFG_H=_freebsd.cfg
     PR_MD_CSRCS=freebsd.c
+    if test "$LIBRUNPATH"; then
+        DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+    fi
     ;;
 
 *-hpux*)
@@ -1662,6 +1665,9 @@ tools are selected during the Xcode/Deve
     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
     DSO_CFLAGS=-fPIC
     DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+    if test "$LIBRUNPATH"; then
+        DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+    fi
     _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
@@ -1991,7 +1997,7 @@ tools are selected during the Xcode/Deve
     AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
     CFLAGS="$CFLAGS -ansi -Wall"
     CXXFLAGS="$CXXFLAGS -ansi -Wall"
-    DLL_SUFFIX=so.1.0
+    DLL_SUFFIX=so
     DSO_CFLAGS=-fPIC
     MDCPUCFG_H=_openbsd.cfg
     PR_MD_CSRCS=openbsd.c
@@ -2070,7 +2076,7 @@ tools are selected during the Xcode/Deve
         if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
             GCC_USE_GNU_LD=1
         fi
-        DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore' 
+        DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs'
         if test -n "$USE_B_DIRECT"; then
             DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
         fi