Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Pass -pie to cc, not -Wl, -pie. This way we have a c...
details: https://anonhg.NetBSD.org/src/rev/0957cf1bbb2b
branches: trunk
changeset: 344447:0957cf1bbb2b
user: martin <martin%NetBSD.org@localhost>
date: Wed Mar 30 13:05:09 2016 +0000
description:
Pass -pie to cc, not -Wl,-pie. This way we have a chance to fix specs
for obscure corner cases like -pie -fPIE -static (used for
/usr/tests/lib/csu/h_initfini2 if building with MKPIE=yes).
While there also replace -fPIC with -fPIE for the PIE case, even if
it should be mostly equivalent.
diffstat:
share/mk/bsd.prog.mk | 4 ++--
share/mk/bsd.sys.mk | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 120f24ab097a -r 0957cf1bbb2b share/mk/bsd.prog.mk
--- a/share/mk/bsd.prog.mk Wed Mar 30 07:44:06 2016 +0000
+++ b/share/mk/bsd.prog.mk Wed Mar 30 13:05:09 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prog.mk,v 1.297 2016/03/12 23:08:58 mrg Exp $
+# $NetBSD: bsd.prog.mk,v 1.298 2016/03/30 13:05:09 martin Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.ifndef HOSTPROG
@@ -540,7 +540,7 @@
${_P}.ro: ${OBJS.${_P}} ${_DPADD.${_P}}
${_MKTARGET_LINK}
- ${CC} ${LDFLAGS:N-Wl,-pie} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS.${_P}}
+ ${CC} ${LDFLAGS:N-pie} -nostdlib -r -Wl,-dc -o ${.TARGET} ${OBJS.${_P}}
.if defined(_PROGDEBUG.${_P})
${_PROGDEBUG.${_P}}: ${_P}
diff -r 120f24ab097a -r 0957cf1bbb2b share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk Wed Mar 30 07:44:06 2016 +0000
+++ b/share/mk/bsd.sys.mk Wed Mar 30 13:05:09 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.256 2016/03/22 08:17:27 mrg Exp $
+# $NetBSD: bsd.sys.mk,v 1.257 2016/03/30 13:05:09 martin Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -178,9 +178,9 @@
.if !defined(NOPIE) && (!defined(LDSTATIC) || ${LDSTATIC} != "-static")
# Position Independent Executable flags
-PIE_CFLAGS?= -fPIC
-PIE_LDFLAGS?= -Wl,-pie ${${ACTIVE_CC} == "gcc":? -shared-libgcc :}
-PIE_AFLAGS?= -fPIC
+PIE_CFLAGS?= -fPIE
+PIE_LDFLAGS?= -pie ${${ACTIVE_CC} == "gcc":? -shared-libgcc :}
+PIE_AFLAGS?= -fPIE
.endif
ELF2ECOFF?= elf2ecoff
Home |
Main Index |
Thread Index |
Old Index