| 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.12 2003/02/16 04:26:21 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.13 2003/03/04 22:07:17 verwilst 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" |
| … | |
… | |
| 26 | # good options. |
26 | # good options. |
| 27 | # |
27 | # |
| 28 | #### get-flag <flag> #### |
28 | #### get-flag <flag> #### |
| 29 | # Find and echo the value for a particular flag |
29 | # Find and echo the value for a particular flag |
| 30 | # |
30 | # |
|
|
31 | |
|
|
32 | ALLOWED_FLAGS="-O -mcpu -march -pipe -g" |
|
|
33 | |
| 31 | |
34 | |
| 32 | filter-flags () { |
35 | filter-flags () { |
| 33 | |
36 | |
| 34 | for x in $1 |
37 | for x in $1 |
| 35 | do |
38 | do |
| … | |
… | |
| 68 | |
71 | |
| 69 | strip-flags() { |
72 | strip-flags() { |
| 70 | |
73 | |
| 71 | local NEW_CFLAGS="" |
74 | local NEW_CFLAGS="" |
| 72 | local NEW_CXXFLAGS="" |
75 | local NEW_CXXFLAGS="" |
| 73 | |
|
|
| 74 | local ALLOWED_FLAGS="-O -mcpu -march -pipe -g" |
|
|
| 75 | |
76 | |
| 76 | set -f |
77 | set -f |
| 77 | |
78 | |
| 78 | for x in ${CFLAGS} |
79 | for x in ${CFLAGS} |
| 79 | do |
80 | do |