Source-Changes-HG archive

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

[src/trunk]: src/share/mk use "${CC} -r" not "${CC} -Wl, -r" as the latter foo...



details:   https://anonhg.NetBSD.org/src/rev/e3d2951cf825
branches:  trunk
changeset: 750027:e3d2951cf825
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Dec 14 08:51:16 2009 +0000

description:
use "${CC} -r" not "${CC} -Wl,-r" as the latter fools GCC on some targets
and it ends up passing "-r -relax" to ld, which causes ld to barf.

diffstat:

 share/mk/bsd.kmodule.mk |  4 ++--
 share/mk/bsd.prog.mk    |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 7700a2e1d424 -r e3d2951cf825 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk   Mon Dec 14 07:31:49 2009 +0000
+++ b/share/mk/bsd.kmodule.mk   Mon Dec 14 08:51:16 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.kmodule.mk,v 1.22 2009/12/14 01:00:46 matt Exp $
+#      $NetBSD: bsd.kmodule.mk,v 1.23 2009/12/14 08:51:16 mrg Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -43,7 +43,7 @@
 
 ${PROG}: ${OBJS} ${DPADD}
        ${_MKTARGET_LINK}
-       ${CC} ${LDFLAGS} -nostdlib -Wl,-T,${KMODSCRIPT},-r,-d \
+       ${CC} ${LDFLAGS} -nostdlib -r -Wl,-T,${KMODSCRIPT},-d \
                -o ${.TARGET} ${OBJS}
 
 ##### Install rules
diff -r 7700a2e1d424 -r e3d2951cf825 share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk      Mon Dec 14 07:31:49 2009 +0000
+++ b/share/mk/bsd.prog.mk      Mon Dec 14 08:51:16 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.prog.mk,v 1.245 2009/12/14 01:00:46 matt Exp $
+#      $NetBSD: bsd.prog.mk,v 1.246 2009/12/14 08:51:16 mrg Exp $
 #      @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
 
 .ifndef HOSTPROG
@@ -309,7 +309,7 @@
 
 ${_P}.ro: ${OBJS.${_P}} ${DPADD}
        ${_MKTARGET_LINK}
-       ${CC} ${LDFLAGS} -nostdlib -Wl,-r,-dc -o ${.TARGET} ${OBJS.${_P}}
+       ${CC} ${LDFLAGS} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS.${_P}}
 
 .if defined(_PROGDEBUG.${_P})
 ${_PROGDEBUG.${_P}}: ${_P}



Home | Main Index | Thread Index | Old Index