summaryrefslogtreecommitdiff
path: root/mk/wrapper/cmd-sink-mkpie-gcc
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2017-11-16 00:36:10 +0000
committerkhorben <khorben@pkgsrc.org>2017-11-16 00:36:10 +0000
commit3411164e84b709274e6241f571b12b1c9b349641 (patch)
treee52de26be29991ed6d7171e33448182ed693e5de /mk/wrapper/cmd-sink-mkpie-gcc
parentc0f7dacd1b2b9adbd565f546e36f6e483bfce094 (diff)
downloadpkgsrc-3411164e84b709274e6241f571b12b1c9b349641.tar.gz
Obtain the MKPIE flags from the environment
This solves an issue with the command sink component of the MKPIE wrapper for GCC, where the contents of the _MKPIE_CFLAGS.gcc and _MKPIE_LDFLAGS.gcc variables was guessed. It is now communicated to cmd-sink-mkpie-gcc through the environment instead.
Diffstat (limited to 'mk/wrapper/cmd-sink-mkpie-gcc')
-rw-r--r--mk/wrapper/cmd-sink-mkpie-gcc7
1 files changed, 3 insertions, 4 deletions
diff --git a/mk/wrapper/cmd-sink-mkpie-gcc b/mk/wrapper/cmd-sink-mkpie-gcc
index a2a3365f248..f4e8b03e15b 100644
--- a/mk/wrapper/cmd-sink-mkpie-gcc
+++ b/mk/wrapper/cmd-sink-mkpie-gcc
@@ -1,4 +1,4 @@
-# $NetBSD: cmd-sink-mkpie-gcc,v 1.4 2017/11/16 00:31:47 khorben Exp $
+# $NetBSD: cmd-sink-mkpie-gcc,v 1.5 2017/11/16 00:36:10 khorben Exp $
#
# Copyright (c) 2016 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -31,9 +31,8 @@
# Append any optional flags required when linking binaries.
if $test "$dont_link_binary" != "yes"; then
- # XXX obtain these flags from _MKPIE_LDFLAGS.gcc and _MKPIE_CFLAGS.gcc
- MKPIE_FLAGS="-pie"
- $test "$has_source" = "yes" && MKPIE_FLAGS="-fPIC $MKPIE_FLAGS"
+ MKPIE_FLAGS="$MKPIE_LDFLAGS"
+ $test "$has_source" = "yes" && MKPIE_FLAGS="$MKPIE_CFLAGS $MKPIE_FLAGS"
for arg in $MKPIE_FLAGS; do
$debug_log $wrapperlog " (cmd-sink-mkpie-gcc) pop: $arg"
. $buildcmd