| 1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.37 2004/02/21 07:19:29 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.38 2004/02/26 06:47:23 vapier Exp $ |
| 4 | # |
4 | # |
| 5 | # Author Bart Verwilst <verwilst@gentoo.org> |
5 | # Author Bart Verwilst <verwilst@gentoo.org> |
| 6 | |
6 | |
| 7 | ECLASS=flag-o-matic |
7 | ECLASS=flag-o-matic |
| 8 | INHERITED="$INHERITED $ECLASS" |
8 | INHERITED="$INHERITED $ECLASS" |
| … | |
… | |
| 121 | local newcpu="$1" ; shift |
121 | local newcpu="$1" ; shift |
| 122 | local oldcpu="" |
122 | local oldcpu="" |
| 123 | for oldcpu in "$@" ; do |
123 | for oldcpu in "$@" ; do |
| 124 | replace-flags -march=${oldcpu} -march=${newcpu} |
124 | replace-flags -march=${oldcpu} -march=${newcpu} |
| 125 | replace-flags -mcpu=${oldcpu} -mcpu=${newcpu} |
125 | replace-flags -mcpu=${oldcpu} -mcpu=${newcpu} |
|
|
126 | replace-flags -mtune=${oldcpu} -mtune=${newcpu} |
| 126 | done |
127 | done |
| 127 | return 0 |
128 | return 0 |
| 128 | } |
129 | } |
| 129 | |
130 | |
| 130 | is-flag() { |
131 | is-flag() { |