Module Name:    src
Committed By:   christos
Date:           Tue Jun  2 23:00:25 UTC 2015

Modified Files:
        src/share/mk: bsd.lib.mk

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


To generate a diff of this commit:
cvs rdiff -u -r1.356 -r1.357 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.356 src/share/mk/bsd.lib.mk:1.357
--- src/share/mk/bsd.lib.mk:1.356	Sun Nov 30 20:34:30 2014
+++ src/share/mk/bsd.lib.mk	Tue Jun  2 19:00:25 2015
@@ -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 @@ ${_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 \
-		--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
 

Reply via email to