toolchain-glibc.eclass: Always enable stack guard randomization (bug #621742).
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Wed, 14 Jun 2017 15:00:32 +0000 (17:00 +0200)
committerMatthias Maier <tamiko@gentoo.org>
Fri, 16 Jun 2017 08:23:34 +0000 (03:23 -0500)
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
eclass/toolchain-glibc.eclass

index eba829cd2f62808b20cf846daab42396d3684b5f..d1e79975ccff2492561401820f15286821bfcafd 100644 (file)
@@ -780,7 +780,6 @@ glibc_do_configure() {
        [[ -d ports ]] && addons+=",ports"
        popd > /dev/null
 
-       myconf+=( $(use_enable hardened stackguard-randomization) )
        if has_version '<sys-libs/glibc-2.13' ; then
                myconf+=( --enable-old-ssp-compat )
        fi
@@ -789,6 +788,12 @@ glibc_do_configure() {
                myconf+=( --enable-stack-protector=all )
        fi
 
+       if version_is_at_least 2.25 ; then
+               myconf+=( --enable-stackguard-randomization )
+       else
+               myconf+=( $(use_enable hardened stackguard-randomization) )
+       fi
+
        [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
 
        if [[ $1 == "linuxthreads" ]] ; then