$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