Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Patched per PR 7283; this causes shared libraries w...



details:   https://anonhg.NetBSD.org/src/rev/df65efe8e6c8
branches:  trunk
changeset: 467864:df65efe8e6c8
user:      fair <fair%NetBSD.org@localhost>
date:      Tue Mar 30 09:30:43 1999 +0000

description:
Patched per PR 7283; this causes shared libraries which depend on
other shared libraries to load against the ones just built when
DESTDIR is set (i.e. -L${DESTDIR}${LIBDIR} ), rather than what's
installed in /usr/lib (previous behavior definitely violated the
Principle of Least Astonishment!).

diffstat:

 share/mk/bsd.lib.mk |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r d17ece44dc9f -r df65efe8e6c8 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Tue Mar 30 09:01:58 1999 +0000
+++ b/share/mk/bsd.lib.mk       Tue Mar 30 09:30:43 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.151 1999/02/24 14:42:36 drochner Exp $
+#      $NetBSD: bsd.lib.mk,v 1.152 1999/03/30 09:30:43 fair Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .if !target(__initialized__)
@@ -242,10 +242,19 @@
     ${SHLIB_LDSTARTFILE} ${SHLIB_LDENDFILE}
        @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
        @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+.if defined(DESTDIR)
+       $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
+           ${SHLIB_LDSTARTFILE} \
+           --whole-archive lib${LIB}_pic.a \
+           -nostdlib -L${DESTDIR}${LIBDIR} -R${LIBDIR} \
+           --no-whole-archive ${LDADD} \
+           ${SHLIB_LDENDFILE}
+.else
        $(LD) -x -shared ${SHLIB_SHFLAGS} -o ${.TARGET} \
            ${SHLIB_LDSTARTFILE} \
            --whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD} \
            ${SHLIB_LDENDFILE}
+.endif
 .if ${OBJECT_FMT} == "ELF"
        rm -f lib${LIB}.so.${SHLIB_MAJOR}
        ln -s lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \



Home | Main Index | Thread Index | Old Index