summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin F. Quinn <kevquinn@gentoo.org>2006-12-18 14:57:23 +0000
committerKevin F. Quinn <kevquinn@gentoo.org>2006-12-18 14:57:23 +0000
commitee0223012538b615bc2cbee000ff4d4f690e2024 (patch)
tree07c0c2e5e94f880b6a58aaec48b4f2e4f7116be4
parentSorted fixing of make config for normal crtstuff (diff)
downloadkevquinn-ee0223012538b615bc2cbee000ff4d4f690e2024.tar.gz
kevquinn-ee0223012538b615bc2cbee000ff4d4f690e2024.tar.bz2
kevquinn-ee0223012538b615bc2cbee000ff4d4f690e2024.zip
Attempt to get libgcc.a building correctly
svn path=/; revision=123
-rw-r--r--hardened/toolchain/eclass/toolchain.eclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/hardened/toolchain/eclass/toolchain.eclass b/hardened/toolchain/eclass/toolchain.eclass
index 36f0caa..3c2ca31 100644
--- a/hardened/toolchain/eclass/toolchain.eclass
+++ b/hardened/toolchain/eclass/toolchain.eclass
@@ -2194,6 +2194,15 @@ do_gcc_PIE_patches() {
# Lastly, rig it in Makefile.in (the last fall-back)
fixup_crtstuff_for_nopie gcc/Makefile.in
+ # Now fix libgcc.a and friends - add '-fno-PIE' to CFLAGS for the .a's
+ ed "${S}"/gcc/Makefile.in > /dev/null 2>&1 <<EOF || die "Failed to fixup gcc/Makefile.in for libgcc.a and friends"
+/libgcc.a:
+/CFLAGS=
+s/"/"-fno-PIE /
+w
+q
+EOF
+
# adds default pie support (rs6000 too) if DEFAULT_PIE[_SSP] is defined
want_minispecs ||
EPATCH_MULTI_MSG="Applying default pie patches ..." \