Module Name:    src
Committed By:   christos
Date:           Tue Jun  5 15:37:52 UTC 2018

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

Log Message:
Elide -nostdinc from LINK.c when linking object files since clang complains
about unused argument. Note that we can't remove CPPFLAGS from LINK.c because
it is used in the "shuttle rules" (from .c to executable).


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 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.373 src/share/mk/bsd.lib.mk:1.374
--- src/share/mk/bsd.lib.mk:1.373	Mon Jun  4 20:56:51 2018
+++ src/share/mk/bsd.lib.mk	Tue Jun  5 11:37:52 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.373 2018/06/05 00:56:51 christos Exp $
+#	$NetBSD: bsd.lib.mk,v 1.374 2018/06/05 15:37:52 christos Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -560,7 +560,7 @@ __archivesymlinkpic: .USE
 __buildstdlib: .USE
 	@echo building standard ${.TARGET:T:S/.o//:S/lib//} library
 	@rm -f ${.TARGET}
-	@${LINK.c} -nostdlib ${LDFLAGS} -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
+	@${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
 .endif
 
 .if !target(__buildproflib)
@@ -568,7 +568,7 @@ __buildproflib: .USE
 	@echo building profiled ${.TARGET:T:S/.o//:S/lib//} library
 	${_MKTARGET_BUILD}
 	@rm -f ${.TARGET}
-	@${LINK.c} -nostdlib ${LDFLAGS} -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*po} | ${TSORT}`
+	@${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*po} | ${TSORT}`
 .endif
 
 DPSRCS+=	${_YLSRCS}

Reply via email to