summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2018-06-19 05:02:10 +0000
committerkhorben <khorben@pkgsrc.org>2018-06-19 05:02:10 +0000
commite1c8c27ed9ad63e8aba66b95381ec2dc6b2f2ed2 (patch)
tree4f239cd0231e5a18822ff78bb74dd3c11f5ceee3 /mk
parentf06b67894c6f05e24edb19fa556ca47216b7cf32 (diff)
downloadpkgsrc-e1c8c27ed9ad63e8aba66b95381ec2dc6b2f2ed2.tar.gz
Disable the flags for PKGSRC_MKPIE when explicitly required
This notably allows emulators/qemu to properly detect support for PIE, and disable it where appropriate. This does not work with cwrappers yet.
Diffstat (limited to 'mk')
-rw-r--r--mk/wrapper/transform-gcc7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/wrapper/transform-gcc b/mk/wrapper/transform-gcc
index 231cd9288d4..66c4550d0f8 100644
--- a/mk/wrapper/transform-gcc
+++ b/mk/wrapper/transform-gcc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-gcc,v 1.32 2016/03/14 20:11:56 markd Exp $
+# $NetBSD: transform-gcc,v 1.33 2018/06/19 05:02:10 khorben Exp $
#
# This file handles the transformations needed for gcc that can be done
# looking at only one argument at a time.
@@ -166,6 +166,11 @@ case $arg in
-errwarn=* |\
-errwarn ) transform_discard_with_warning ;;
+# Disable the flags for PKGSRC_MKPIE.
+-fno-pie |\
+-fno-PIE |\
+-nopie ) MKPIE_CFLAGS=; MKPIE_LDFLAGS=; transform_pass ;;
+
# Unknown options.
-* ) transform_pass_with_warning ;;