eclass/toolchain-glibc.eclass: use tc-enables-pie instead of gcc-specs-pie
authorMatthias Maier <tamiko@gentoo.org>
Wed, 14 Jun 2017 15:20:39 +0000 (10:20 -0500)
committerMatthias Maier <tamiko@gentoo.org>
Fri, 16 Jun 2017 08:23:35 +0000 (03:23 -0500)
eclass/toolchain-glibc.eclass

index d1e79975ccff2492561401820f15286821bfcafd..1667f1ac7ad6086ffe3a97c6d02a82301855a946 100644 (file)
@@ -266,7 +266,7 @@ setup_flags() {
                tc-enables-ssp && append-flags $(test-flags -fno-stack-protector)
        fi
 
-       if use hardened && gcc-specs-pie ; then
+       if use hardened && tc-enables-pie ; then
                # Force PIC macro definition for all compilations since they're all
                # either -fPIC or -fPIE with the default-PIE compiler.
                append-cppflags -DPIC
@@ -535,7 +535,7 @@ toolchain-glibc_pkg_pretend() {
                ewarn "hypervisor, which is probably not what you want."
        fi
 
-       use hardened && ! gcc-specs-pie && \
+       use hardened && ! tc-enables-pie && \
                ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
 
        # Make sure host system is up to date #394453