]> xenbits.xensource.com Git - people/liuw/freebsd.git/commitdiff
META MODE: Don't double stage SYMLINKS for libraries.
authorbdrewery <bdrewery@FreeBSD.org>
Fri, 13 Nov 2015 01:47:56 +0000 (01:47 +0000)
committerbdrewery <bdrewery@FreeBSD.org>
Fri, 13 Nov 2015 01:47:56 +0000 (01:47 +0000)
meta.stage.mk is handling ${SYMLINKS:T} for stage_libs already.  The logic in
bsd.sys.mk to handle ${SYMLINKS} was brought in r247817 when it was moved out
of bsd.prog.mk and bsd.lib.mk into bsd.sys.mk.  The logic previously was
limited to bsd.prog.mk.

This fixes a race, seen easily in lib/libthr, where libpthread_p.a is created
by both stage_libs and stage_symlinks resulting in 'ln: File exists'.

Sponsored by: EMC / Isilon Storage Division

share/mk/bsd.sys.mk

index cad2b2f796450d0533a619ebc8eddc02f9f25b31..4a4e0800d1b296746d5c63609935082ad944ab54 100644 (file)
@@ -276,7 +276,8 @@ STAGE_SETS+= links
 STAGE_LINKS.links= ${LINKS}
 .endif
 
-.if !empty(SYMLINKS)
+# Don't handle SYMLINKS for libraries since stage_libs is already doing so.
+.if !empty(SYMLINKS) && empty(_LIBS)
 STAGE_TARGETS+= stage_symlinks
 STAGE_SETS+= links
 STAGE_SYMLINKS.links= ${SYMLINKS}