$NetBSD: patch-ac,v 1.16 2024/10/22 12:52:02 ryoon Exp $ add runpath to Linux caught during check-shlibs-elf --- nspr/configure.in.orig 2024-10-21 11:31:57.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= @@ -1394,6 +1394,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*) @@ -1563,6 +1566,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 @@ -1892,7 +1898,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 @@ -1955,7 +1961,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