Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Preserve date on original shared library or program...
details: https://anonhg.NetBSD.org/src/rev/53d4dc9894ea
branches: trunk
changeset: 758557:53d4dc9894ea
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Nov 08 06:54:52 2010 +0000
description:
Preserve date on original shared library or program when stripping
the debug symbols and adding the debug-link to .debug.
Use '(rm -f file; false)' in the failure path to force failure.
Based on solution proposed by Nicolas Joly on tech-toolchain in July 2010.
Should fix PR toolchain/44046 from Andreas Gustafsson.
diffstat:
share/mk/bsd.lib.mk | 10 +++++-----
share/mk/bsd.prog.mk | 9 +++++----
2 files changed, 10 insertions(+), 9 deletions(-)
diffs (47 lines):
diff -r 8b1656b74c5e -r 53d4dc9894ea share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk Mon Nov 08 03:20:59 2010 +0000
+++ b/share/mk/bsd.lib.mk Mon Nov 08 06:54:52 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.lib.mk,v 1.308 2010/07/06 05:59:56 mrg Exp $
+# $NetBSD: bsd.lib.mk,v 1.309 2010/11/08 06:54:52 lukem Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk>
@@ -589,10 +589,10 @@
.if defined(_LIB.debug)
${_LIB.debug}: ${_LIB.so}
${_MKTARGET_CREATE}
- ${OBJCOPY} --only-keep-debug ${_LIB.so} ${_LIB.debug}
- ${OBJCOPY} --strip-debug \
- -R .gnu_debuglink --add-gnu-debuglink=${_LIB.debug} ${_LIB.so} \
- || rm -f ${_LIB.debug}
+ ( ${OBJCOPY} --only-keep-debug ${_LIB.so} ${_LIB.debug} \
+ && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
+ --add-gnu-debuglink=${_LIB.debug} ${_LIB.so} \
+ ) || (rm -f ${_LIB.debug}; false)
.endif
.if !empty(LOBJS) # {
diff -r 8b1656b74c5e -r 53d4dc9894ea share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk Mon Nov 08 03:20:59 2010 +0000
+++ b/share/mk/bsd.prog.mk Mon Nov 08 06:54:52 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prog.mk,v 1.250 2010/10/31 11:52:53 mbalmer Exp $
+# $NetBSD: bsd.prog.mk,v 1.251 2010/11/08 06:54:52 lukem Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.ifndef HOSTPROG
@@ -315,9 +315,10 @@
.if defined(_PROGDEBUG.${_P})
${_PROGDEBUG.${_P}}: ${_P}
${_MKTARGET_CREATE}
- ${OBJCOPY} --only-keep-debug ${_P} ${_PROGDEBUG.${_P}}
- ${OBJCOPY} --strip-debug -R .gnu_debuglink --add-gnu-debuglink=${_PROGDEBUG.${_P}} ${_P} \
- || rm -f ${_PROGDEBUG.${_P}}
+ ( ${OBJCOPY} --only-keep-debug ${_P} ${_PROGDEBUG.${_P}} \
+ && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
+ --add-gnu-debuglink=${_PROGDEBUG.${_P}} ${_P} \
+ ) || (rm -f ${_PROGDEBUG.${_P}}; false)
.endif
.endif # defined(OBJS.${_P}) && !empty(OBJS.${_P}) # }
Home |
Main Index |
Thread Index |
Old Index