have filter-flags filter out LDFLAGS too #395619
authorMike Frysinger <vapier@gentoo.org>
Fri, 13 Jan 2012 22:40:29 +0000 (22:40 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 13 Jan 2012 22:40:29 +0000 (22:40 +0000)
eclass/flag-o-matic.eclass

index 0328b63c16d8b945cdb4c0ce23937b1266cc5cf5..f53c5765e7806f3b1b99719d6b56bf3deb8f55ad 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.163 2011/12/28 06:28:55 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.164 2012/01/13 22:40:29 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -113,14 +113,13 @@ _filter-var() {
 # @FUNCTION: filter-flags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Remove particular <flags> from {C,CPP,CXX,F,FC}FLAGS.  Accepts shell globs.
+# Remove particular <flags> from {C,CPP,CXX,F,FC,LD}FLAGS.  Accepts shell globs.
 filter-flags() {
        _filter-hardened "$@"
-       _filter-var CFLAGS "$@"
-       _filter-var CPPFLAGS "$@"
-       _filter-var CXXFLAGS "$@"
-       _filter-var FFLAGS "$@"
-       _filter-var FCFLAGS "$@"
+       local v
+       for v in C CPP CXX F FC LD ; do
+               _filter-var ${v}FLAGS "$@"
+       done
        return 0
 }