summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2004-03-16 21:37:09 +0000
committerNed Ludd <solar@gentoo.org>2004-03-16 21:37:09 +0000
commit90b1e9587b6e1709657ea70cdf40761b6f7346f0 (patch)
treee31eb2cef7bcdb8ed3755e1a8e0123044f9d8c94 /eclass
parentVersion bumps so that it PROVIDES virtual/dev-manager. r3->r6, r4->r7, r5->r8... (diff)
downloadhistorical-90b1e9587b6e1709657ea70cdf40761b6f7346f0.tar.gz
historical-90b1e9587b6e1709657ea70cdf40761b6f7346f0.tar.bz2
historical-90b1e9587b6e1709657ea70cdf40761b6f7346f0.zip
long needed filter-ldflags function thanks to Christian Rubbert bug #44825
Diffstat (limited to 'eclass')
-rw-r--r--eclass/flag-o-matic.eclass17
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 114e2856679e..940bd106e81d 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.40 2004/03/12 11:21:15 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.41 2004/03/16 21:37:09 solar Exp $
#
# Author Bart Verwilst <verwilst@gentoo.org>
@@ -49,6 +49,10 @@ INHERITED="$INHERITED $ECLASS"
#### append-ldflags ####
# Add extra flags to your current LDFLAGS
#
+#### filter-ldflags <flags> ####
+# Remove particular flags from LDFLAGS
+# Matches only complete flags
+#
#### etexec-flags ####
# hooked function for hardened-gcc that appends
# -yet_exec {C,CXX,LD}FLAGS when hardened-gcc is installed
@@ -296,6 +300,17 @@ append-ldflags() {
return 0
}
+filter-ldflags() {
+ # we do this fancy spacing stuff so as to not filter
+ # out part of a flag ... we want flag atoms ! :D
+ LDFLAGS=" ${LDFLAGS} "
+ for x in "$@" ; do
+ LDFLAGS="${LDFLAGS// ${x} / }"
+ done
+ LDFLAGS="${LDFLAGS:1:${#LDFLAGS}-2}"
+ return 0
+}
+
etexec-flags() {
has_version sys-devel/hardened-gcc
if [ $? == 0 ] ; then