summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-06-07 12:49:31 +0200
committerFabian Groffen <grobian@gentoo.org>2018-06-07 12:49:31 +0200
commit108a86ab528461f7feb43e967a5d94b87921e6f2 (patch)
tree829d9f44d81678905304966cf2c3427f9640af5b
parentsys-devel/gcc: sync (diff)
downloadprefix-108a86ab528461f7feb43e967a5d94b87921e6f2.tar.gz
prefix-108a86ab528461f7feb43e967a5d94b87921e6f2.tar.bz2
prefix-108a86ab528461f7feb43e967a5d94b87921e6f2.zip
sys-devel/gcc: fix usage of -no-pie and -fno-PIE, bug #657522
Closes: https://bugs.gentoo.org/657522 Package-Manager: Portage-2.3.40.1-prefix, Repoman-2.3.9
-rw-r--r--sys-devel/gcc/gcc-7.3.0-r3.ebuild11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys-devel/gcc/gcc-7.3.0-r3.ebuild b/sys-devel/gcc/gcc-7.3.0-r3.ebuild
index 1448758404..8d4055ed5e 100644
--- a/sys-devel/gcc/gcc-7.3.0-r3.ebuild
+++ b/sys-devel/gcc/gcc-7.3.0-r3.ebuild
@@ -46,6 +46,17 @@ src_configure() {
powerpc*-darwin*)
# bug #381179
filter-flags "-mcpu=*" "-mtune=*"
+ # bug #657522
+ # A bug in configure checks whether -no-pie works, but the
+ # compiler doesn't pass -no-pie onto the linker if -fno-PIE
+ # isn't passed, so the configure check always finds -no-pie
+ # is accepted. (Likewise, when -fno-PIE is passed, the
+ # compiler passes -no_pie onto the linker.)
+ # Since our linker doesn't grok this, avoid above checks to
+ # be run
+ # NOTE: later ld64 does grok -no_pie, not -no-pie (as checked)
+ export gcc_cv_c_no_fpie=no
+ export gcc_cv_no_pie=no
;;
*-solaris*)
# todo: some magic for native vs. GNU linking?