summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2008-12-22 18:53:47 +0000
committerNed Ludd <solar@gentoo.org>2008-12-22 18:53:47 +0000
commit2c0a34c0564c808c2d435a1dced20f20777a33d5 (patch)
treeded88659f7abf323a78855f676309a600d455fc1 /eclass
parentia64/sparc stable wrt #250913 (diff)
downloadhistorical-2c0a34c0564c808c2d435a1dced20f20777a33d5.tar.gz
historical-2c0a34c0564c808c2d435a1dced20f20777a33d5.tar.bz2
historical-2c0a34c0564c808c2d435a1dced20f20777a33d5.zip
- start getting eclass ready for gcc:4
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass30
1 files changed, 18 insertions, 12 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 950a7cf8fa4a..6b6ee7d1517c 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.367 2008/11/28 09:20:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.368 2008/12/22 18:53:47 solar Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -2127,17 +2127,23 @@ do_gcc_PIE_patches() {
use vanilla && rm -f "${WORKDIR}"/piepatch/*/*uclibc*
- guess_patch_type_in_dir "${WORKDIR}"/piepatch/upstream
-
- # corrects startfile/endfile selection and shared/static/pie flag usage
- EPATCH_MULTI_MSG="Applying upstream pie patches ..." \
- epatch "${WORKDIR}"/piepatch/upstream
- # adds non-default pie support (rs6000)
- EPATCH_MULTI_MSG="Applying non-default pie patches ..." \
- epatch "${WORKDIR}"/piepatch/nondef
- # adds default pie support (rs6000 too) if DEFAULT_PIE[_SSP] is defined
- EPATCH_MULTI_MSG="Applying default pie patches ..." \
- epatch "${WORKDIR}"/piepatch/def
+ if tc_version_is_at_least 4.3.2; then
+ guess_patch_type_in_dir "${WORKDIR}"/piepatch/
+ EPATCH_MULTI_MSG="Applying pie patches ..." \
+ epatch "${WORKDIR}"/piepatch/
+ else
+ guess_patch_type_in_dir "${WORKDIR}"/piepatch/upstream
+
+ # corrects startfile/endfile selection and shared/static/pie flag usage
+ EPATCH_MULTI_MSG="Applying upstream pie patches ..." \
+ epatch "${WORKDIR}"/piepatch/upstream
+ # adds non-default pie support (rs6000)
+ EPATCH_MULTI_MSG="Applying non-default pie patches ..." \
+ epatch "${WORKDIR}"/piepatch/nondef
+ # adds default pie support (rs6000 too) if DEFAULT_PIE[_SSP] is defined
+ EPATCH_MULTI_MSG="Applying default pie patches ..." \
+ epatch "${WORKDIR}"/piepatch/def
+ fi
# we want to be able to control the pie patch logic via something other
# than ALL_CFLAGS...