From 22b0792bd657bc419dd6ab5c410c666a10ba18b0 Mon Sep 17 00:00:00 2001 From: Ned Ludd Date: Sun, 21 Dec 2003 06:50:15 +0000 Subject: added some more hoolks for PIC/fstack filtering --- eclass/flag-o-matic.eclass | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'eclass') diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 66d9981e3352..e5d6777a932b 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.31 2003/12/10 21:13:25 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.32 2003/12/21 06:50:15 solar Exp $ # # Author Bart Verwilst @@ -48,12 +48,12 @@ INHERITED="$INHERITED $ECLASS" #### etexec-flags #### # hooked function for hardened-gcc that appends # -yet_exec {C,CXX,LD}FLAGS when hardened-gcc is installed -# and a package is filtering -fPIC +# and a package is filtering -fPIC,-fpic, -fPIE, -fpie # #### fstack-flags #### # hooked function for hardened-gcc that appends # -yno_propolice to {C,CXX,LD}FLAGS when hardened-gcc is installed -# and a package is filtering -fstack-protector +# and a package is filtering -fstack-protector, -fstack-protector-all # # C[XX]FLAGS that we allow in strip-flags @@ -93,8 +93,8 @@ filter-flags() { # we do two loops to avoid the first and last char from being chomped. for x in $@ ; do case "${x}" in - -fPIC) etexec-flags;; - -fstack-protector) fstack-flags;; + -fPIC|-fpic|-fPIE|-fpie) etexec-flags;; + -fstack-protector|-fstack-protector-all) fstack-flags;; *) ;; esac done @@ -114,7 +114,7 @@ append-flags() { CFLAGS="${CFLAGS} $@" CXXFLAGS="${CXXFLAGS} $@" for x in $@; do - [ "${x}" = "-fno-stack-protector" ] && fstack-flags + [ "${x}" = "-fno-stack-protector" -o "${x}" = "-fno-stack-protector-all" ] && fstack-flags done return 0 } -- cgit v1.2.3-65-gdbad