Source-Changes-HG archive

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

[src/trunk]: src/share/mk Strip the debug symbols via a temporary file, atomi...



details:   https://anonhg.NetBSD.org/src/rev/80020c9a9fb9
branches:  trunk
changeset: 338648:80020c9a9fb9
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jun 02 23:00:25 2015 +0000

description:
Strip the debug symbols via a temporary file, atomically replacing the full
random access archive to avoid races.

diffstat:

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

diffs (19 lines):

diff -r dec0c1c5f49d -r 80020c9a9fb9 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Tue Jun 02 21:03:46 2015 +0000
+++ b/share/mk/bsd.lib.mk       Tue Jun 02 23:00:25 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.356 2014/12/01 01:34:30 erh Exp $
+#      $NetBSD: bsd.lib.mk,v 1.357 2015/06/02 23:00:25 christos Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -641,7 +641,8 @@
        ${_MKTARGET_CREATE}
        (  ${OBJCOPY} --only-keep-debug ${_LIB.so.full} ${_LIB.so.debug} \
        && ${OBJCOPY} --strip-debug -p -R .gnu_debuglink \
-               --add-gnu-debuglink=${_LIB.so.debug} ${_LIB.so.full} \
+           --add-gnu-debuglink=${_LIB.so.debug} ${_LIB.so.full} \
+           ${_LIB.so.full}.tmp && mv -f ${_LIB.so.full}.tmp ${_LIB.so.full} \
        ) || (rm -f ${.TARGET}; false)
 .endif
 



Home | Main Index | Thread Index | Old Index