toolchain.eclass: add USE=ssp for gcc-6 to control default stack-protector-strong...
authorMike Frysinger <vapier@gentoo.org>
Sat, 29 Aug 2015 22:46:14 +0000 (18:46 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 29 Aug 2015 22:46:21 +0000 (18:46 -0400)
eclass/toolchain.eclass

index ce21d9aada8e340bab64386945dda77ac199f930..d93f51d7025851cfc86d2d90dd27374c14679ca7 100644 (file)
@@ -152,7 +152,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
        # the older versions, we don't want to bother supporting it.  #448024
        tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize )
        tc_version_is_at_least 4.9 && IUSE+=" cilk"
-       tc_version_is_at_least 6.0 && IUSE+=" pie"
+       tc_version_is_at_least 6.0 && IUSE+=" pie +ssp"
 fi
 
 IUSE+=" ${IUSE_DEF[*]/#/+}"
@@ -1193,7 +1193,11 @@ toolchain_src_configure() {
        fi
 
        if tc_version_is_at_least 6.0 ; then
-               confgcc+=( $(use_enable pie default-pie) )
+               confgcc+=(
+                       $(use_enable pie default-pie)
+                       # This defaults to -fstack-protector-strong.
+                       $(use_enable ssp default-ssp)
+               )
        fi
 
        # Disable gcc info regeneration -- it ships with generated info pages