summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin F. Quinn <kevquinn@gentoo.org>2006-12-19 12:02:52 +0000
committerKevin F. Quinn <kevquinn@gentoo.org>2006-12-19 12:02:52 +0000
commite151ad828c31ab5f56807f6da97b772ebf1dd421 (patch)
tree2b0f3c612a015d970ec7f14a788b1a1b83cd17d2 /hardened
parentCreate pieworld branch - toolchain that ends up with crt*, lib*.a built -fPIE... (diff)
downloadkevquinn-e151ad828c31ab5f56807f6da97b772ebf1dd421.tar.gz
kevquinn-e151ad828c31ab5f56807f6da97b772ebf1dd421.tar.bz2
kevquinn-e151ad828c31ab5f56807f6da97b772ebf1dd421.zip
Roll back to pre-crtstuff hacks
svn path=/; revision=128
Diffstat (limited to 'hardened')
-rw-r--r--hardened/toolchain/branches/pieworld/eclass/toolchain.eclass46
1 files changed, 0 insertions, 46 deletions
diff --git a/hardened/toolchain/branches/pieworld/eclass/toolchain.eclass b/hardened/toolchain/branches/pieworld/eclass/toolchain.eclass
index 3c2ca31..2420907 100644
--- a/hardened/toolchain/branches/pieworld/eclass/toolchain.eclass
+++ b/hardened/toolchain/branches/pieworld/eclass/toolchain.eclass
@@ -2135,26 +2135,8 @@ update_gcc_for_libssp() {
-i "${S}"/gcc/Makefile.in || die "Failed to update gcc!"
}
-fixup_crtstuff_for_nopie() {
- # First try modifying an existing assignmet; if that fails, insert
- # a new one.
- if [[ -f "${S}"/$1 ]]; then
- if grep -q '^CRTSTUFF_T_CFLAGS =' "${S}"/$1; then
- sed -e 's/^CRTSTUFF_T_CFLAGS =/CRTSTUFF_T_CFLAGS = -fno-PIE /' \
- -i "${S}"/$1 ||
- die "Failed to modify $1 for no-PIE crtstuff"
- else
- sed -e '1 iCRTSTUFF_T_CFLAGS = -fno-PIE' \
- -i "${S}"/$1 ||
- die "Failed to add to $1 for no-PIE crtstuff"
- fi
- fi
-}
-
# do various updates to PIE logic
do_gcc_PIE_patches() {
- local arch
-
if ! want_pie || \
(want_boundschecking && [[ ${HTB_EXCLUSIVE} == "true" ]])
then
@@ -2175,34 +2157,6 @@ do_gcc_PIE_patches() {
# adds non-default pie support (rs6000)
EPATCH_MULTI_MSG="Applying non-default pie patches ..." \
epatch "${WORKDIR}"/piepatch/nondef
-
- # Force crt{begin,end}.o to be built normally; for all linux
- # If Gentoo/FreeBSD ever want hardened, need to do the same to t-freebsd
- # If an arch has t-crtstuff, it'll take precedence over t-linux*. If the
- # arch doesn't have t-crtstuff, try t-linux/t-linux64; then try the
- # generic t-linux.
- einfo "Fixing up make configuration to build crtstuff properly with pie compiler"
- for arch in $(ls -1 "${S}"/gcc/config); do
- [[ -d "${S}"/gcc/config/${arch} ]] || continue
- fixup_crtstuff_for_nopie gcc/config/${arch}/t-crtstuff
- fixup_crtstuff_for_nopie gcc/config/${arch}/t-linux
- fixup_crtstuff_for_nopie gcc/config/${arch}/t-linux64
- done
- fixup_crtstuff_for_nopie gcc/config/t-linux
- # powerpc (32) is an exception - it sets CRTSTUFF_T_CFLAGS in t-ppccomm
- fixup_crtstuff_for_nopie gcc/config/rs6000/t-ppccomm
- # 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 ..." \