Source-Changes-HG archive

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

[src/trunk]: src/share/mk Since the objcopy -x removes debugging symbols, del...



details:   https://anonhg.NetBSD.org/src/rev/13a6840501fb
branches:  trunk
changeset: 328604:13a6840501fb
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Apr 09 19:23:09 2014 +0000

description:
Since the objcopy -x removes debugging symbols, delay that if we are building
debugging libraries and do the stripping with the debug symbol separation
step.

diffstat:

 share/mk/bsd.lib.mk |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 6e9527cd97a5 -r 13a6840501fb share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Wed Apr 09 16:59:53 2014 +0000
+++ b/share/mk/bsd.lib.mk       Wed Apr 09 19:23:09 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.350 2014/04/09 16:29:08 christos Exp $
+#      $NetBSD: bsd.lib.mk,v 1.351 2014/04/09 19:23:09 christos Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -622,7 +622,9 @@
            ${_LDFLAGS.${_LIB}} -o ${.TARGET} ${_LIBLDOPTS} \
            -Wl,--whole-archive ${SOLIB} \
            -Wl,--no-whole-archive ${_LDADD.${_LIB}}
+.if !defined(_LIB.so.debug)
        ${OBJCOPY} ${OBJCOPYLIBFLAGS} ${.TARGET}
+.endif
 #  We don't use INSTALL_SYMLINK here because this is just
 #  happening inside the build directory/objdir. XXX Why does
 #  this spend so much effort on libraries that aren't live??? XXX
@@ -641,7 +643,7 @@
 ${_LIB.so.debug}: ${_LIB.so.full}
        ${_MKTARGET_CREATE}
        (  ${OBJCOPY} --only-keep-debug ${_LIB.so.full} ${_LIB.so.debug} \
-       && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
+       && ${OBJCOPY} ${OBJCOPYLIBFLAGS} --strip-debug -p -R .gnu_debuglink \
                --add-gnu-debuglink=${_LIB.so.debug} ${_LIB.so.full} \
        ) || (rm -f ${.TARGET}; false)
 .endif



Home | Main Index | Thread Index | Old Index