pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/compiler Always add "-fPIC" when linking with PKGSR...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8a20afff5a29
branches: trunk
changeset: 371223:8a20afff5a29
user: khorben <khorben%pkgsrc.org@localhost>
date: Tue Nov 07 16:57:58 2017 +0000
description:
Always add "-fPIC" when linking with PKGSRC_MKPIE
This makes sure a simple "cc -o hello hello.c" will still build a valid
executable. It does not let us detect when CFLAGS or LDFLAGS are
ignored anymore, but it is legitimate for packages to expect it to work
without any additional parameter.
ld(1) does not expect "-fPIC" but it seems to be ignored by our wrappers
in this case, so no disruption is expected there.
diffstat:
mk/compiler/gcc.mk | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 7f6a3841ac61 -r 8a20afff5a29 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk Tue Nov 07 16:53:11 2017 +0000
+++ b/mk/compiler/gcc.mk Tue Nov 07 16:57:58 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.185 2017/10/03 09:38:16 jperkin Exp $
+# $NetBSD: gcc.mk,v 1.186 2017/11/07 16:57:58 khorben Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -336,7 +336,7 @@
# XXX for executables it should be:
#_MKPIE_CFLAGS.gcc= -fPIE
# XXX for libraries a sink wrapper around gcc is required and used instead
-_MKPIE_LDFLAGS.gcc= -pie
+_MKPIE_LDFLAGS.gcc= -fPIC -pie
.endif
.if ${_PKGSRC_MKPIE} == "yes"
Home |
Main Index |
Thread Index |
Old Index