Source-Changes-HG archive

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

[src/trunk]: src/share/mk Elide -nostdinc from LINK.c when linking object fil...



details:   https://anonhg.NetBSD.org/src/rev/a8efea3b757b
branches:  trunk
changeset: 362361:a8efea3b757b
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jun 05 15:37:52 2018 +0000

description:
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).

diffstat:

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

diffs (27 lines):

diff -r fac743c090dc -r a8efea3b757b share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Tue Jun 05 13:21:37 2018 +0000
+++ b/share/mk/bsd.lib.mk       Tue Jun 05 15:37:52 2018 +0000
@@ -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 @@
 __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 @@
        @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}



Home | Main Index | Thread Index | Old Index