aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2016-04-23 19:27:01 +0200
committerMagnus Granberg <zorry@gentoo.org>2016-04-23 19:27:01 +0200
commit8ab745bdff4b392d56bfb27823eec5501827aa3f (patch)
tree24e3c35d7cd599ba0a792e24269365204eabd5ca
parentupdate toolchin.eclass and use pch (diff)
downloadhardened-dev-8ab745bdff4b392d56bfb27823eec5501827aa3f.tar.gz
hardened-dev-8ab745bdff4b392d56bfb27823eec5501827aa3f.tar.bz2
hardened-dev-8ab745bdff4b392d56bfb27823eec5501827aa3f.zip
add more gcc 6 support to toolchain.eclass
-rw-r--r--eclass/toolchain.eclass20
1 files changed, 20 insertions, 0 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ececcdc2..c9520a98 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -626,6 +626,22 @@ do_gcc_PIE_patches() {
# configure to build with the hardened GCC specs as the default
make_gcc_hard() {
+
+ # Gcc >= 6.X we don't need to sed in Makefile
+ # It have configurations options to turn pie/ssp on as default
+ if tc_version_is_at_least 6.0 ; then
+ if use hardened ; then
+ # rebrand to make bug reports easier
+ BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened}
+ if use pie ; then
+ einfo "Updating gcc to use automatic PIE building ..."
+ fi
+ if use ssp ; then
+ einfo "Updating gcc to use automatic SSP building ..."
+ fi
+ return 1
+ fi
+
# we want to be able to control the pie patch logic via something other
# than ALL_CFLAGS...
sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
@@ -2264,6 +2280,10 @@ hardened_gcc_is_stable() {
}
want_minispecs() {
+ # on gcc 6 we don't need minispecs
+ if tc_version_is_at_least 6.0 ; then
+ return 0
+ fi
if tc_version_is_at_least 4.3.2 && use hardened ; then
if ! want_pie ; then
ewarn "PIE_VER or SPECS_VER is not defined in the GCC ebuild."