summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2012-01-17 16:05:59 +0000
committerMagnus Granberg <zorry@gentoo.org>2012-01-17 16:05:59 +0000
commit1cc8bd25deeb04d6eec01bc280da138501d494aa (patch)
treee6e359477a6a1a12ed6d02f63c090c85a1df9365 /eclass
parentVersion bump. (diff)
downloadhistorical-1cc8bd25deeb04d6eec01bc280da138501d494aa.tar.gz
historical-1cc8bd25deeb04d6eec01bc280da138501d494aa.tar.bz2
historical-1cc8bd25deeb04d6eec01bc280da138501d494aa.zip
Add HARD_CFLAGS to CXXFLAGS on toolchain.eclass
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/toolchain.eclass19
2 files changed, 17 insertions, 7 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 13d66ed3938b..2df219c3c503 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.93 2012/01/17 11:20:03 johu Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.94 2012/01/17 16:05:59 zorry Exp $
+
+ 17 Jan 2012; Magnus Granberg <zorry@gentoo.org> toolchain.eclass:
+ Add HARD_CFLAGS to ALL_CXXFLAGS for hardened gcc 4.7
17 Jan 2012; Johannes Huber <johu@gentoo.org> kde4-base.eclass:
Drop kdeenablefinal build feature. Fix source uri calc for KDE SC 4.7.97 aka
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index d4d8c3efca53..2b4df7abfd32 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.514 2011/12/16 18:44:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.515 2012/01/17 16:05:59 zorry Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -1775,11 +1775,18 @@ do_gcc_PIE_patches() {
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...
- sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
- -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
- -i "${S}"/gcc/Makefile.in
+
+ # we want to be able to control the pie patch logic via something other
+ # than ALL_CFLAGS...
+ sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
+ -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
+ -i "${S}"/gcc/Makefile.in
+ # Need to add HARD_CFLAGS to ALL_CXXFLAGS on >= 4.7
+ if tc_version_is_at_least 4.7.0 ; then
+ sed -e '/^ALL_CXXFLAGS/iHARD_CFLAGS = ' \
+ -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |' \
+ -i "${S}"/gcc/Makefile.in
+ fi
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, pie-${PIE_VER}"
}