diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-09-25 07:37:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-09-25 07:37:19 +0000 |
commit | 676b422cfffa23b6eb1684c4cb0ac5350cbec31f (patch) | |
tree | 43839a6ebd43a521e092e6fdbe0059e2b1391c2b /eclass/flag-o-matic.eclass | |
parent | ~hppa KEYWORDS (diff) | |
download | historical-676b422cfffa23b6eb1684c4cb0ac5350cbec31f.tar.gz historical-676b422cfffa23b6eb1684c4cb0ac5350cbec31f.tar.bz2 historical-676b422cfffa23b6eb1684c4cb0ac5350cbec31f.zip |
reverse parameter order of replace-cpu-flags #60597
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 2342e1db1dbf..e525eded61f2 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 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.69 2004/09/14 02:06:36 lv Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.70 2004/09/25 07:37:19 vapier Exp $ # # Author Bart Verwilst <verwilst@gentoo.org> @@ -22,7 +22,7 @@ IUSE="${IUSE} debug" #### replace-flags <orig.flag> <new.flag> ### # Replace a flag by another one # -#### replace-cpu-flags <new.cpu> <old.cpus> ### +#### replace-cpu-flags <old.cpus> <new.cpu> ### # Replace march/mcpu flags that specify <old.cpus> # with flags that specify <new.cpu> # @@ -161,13 +161,14 @@ replace-flags() { } replace-cpu-flags() { - local oldcpu newcpu="$1" ; shift - for oldcpu in "$@" ; do + local newcpu="$#" ; newcpu="${!newcpu}" + while [ $# -gt 1 ] ; do # quote to make sure that no globbing is done (particularly on # ${oldcpu} prior to calling replace-flags - replace-flags "-march=${oldcpu}" "-march=${newcpu}" - replace-flags "-mcpu=${oldcpu}" "-mcpu=${newcpu}" - replace-flags "-mtune=${oldcpu}" "-mtune=${newcpu}" + replace-flags "-march=${1}" "-march=${newcpu}" + replace-flags "-mcpu=${1}" "-mcpu=${newcpu}" + replace-flags "-mtune=${1}" "-mtune=${newcpu}" + shift done return 0 } |