summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-10-30 20:51:44 +0000
committerMike Frysinger <vapier@gentoo.org>2012-10-30 20:51:44 +0000
commit592956db57c1809a9449300b7b0dbe2a452618fc (patch)
treee876d50bd786695366a87bf3ba9de652293abc8a /eclass
parentstable ppc, bug #439732 (diff)
downloadgentoo-2-592956db57c1809a9449300b7b0dbe2a452618fc.tar.gz
gentoo-2-592956db57c1809a9449300b7b0dbe2a452618fc.tar.bz2
gentoo-2-592956db57c1809a9449300b7b0dbe2a452618fc.zip
strip-flags: revert previous commit as it was unnecessary; fix _is_flagq to handle arrays #440306 by Mr. Bones.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/flag-o-matic.eclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index d50c9d397675..28f51e30f92e 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 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.178 2012/10/30 20:20:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.179 2012/10/30 20:51:44 vapier Exp $
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
@@ -265,8 +265,9 @@ replace-cpu-flags() {
}
_is_flagq() {
- local x
- for x in ${!1} ; do
+ local x var
+ eval var=\""\${$1[*]}"\"
+ for x in ${var} ; do
[[ ${x} == $2 ]] && return 0
done
return 1
@@ -370,7 +371,7 @@ strip-flags() {
done
# In case we filtered out all optimization flags fallback to -O2
- if _is_flagq ${var} "-O*" && ! (_is_flagq new "-O*" || _is_flagq new -O) ; then
+ if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then
new+=( -O2 )
fi