| … | |
… | |
| 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 | # Author Bart Verwilst <verwilst@gentoo.org> |
3 | # Author Bart Verwilst <verwilst@gentoo.org> |
| 4 | # /space/gentoo/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass |
4 | # /space/gentoo/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass |
| 5 | ECLASS=flag-o-matic |
5 | ECLASS=flag-o-matic |
| 6 | |
6 | |
|
|
7 | # |
|
|
8 | #Remove particular flags from C[XX]FLAGS |
|
|
9 | # |
| 7 | filter-flags () { |
10 | filter-flags () { |
| 8 | |
11 | |
| 9 | for x in $1; do |
12 | for x in $1; do |
| 10 | CFLAGS="${CFLAGS/$x}" |
13 | CFLAGS="${CFLAGS/$x}" |
| 11 | CXXFLAGS="${CXXFLAGS/$x}" |
14 | CXXFLAGS="${CXXFLAGS/$x}" |
| 12 | done |
15 | done |
|
|
16 | |
|
|
17 | } |
|
|
18 | |
|
|
19 | # |
|
|
20 | #Add flags to the current C[XX]FLAGS |
|
|
21 | # |
|
|
22 | append-flags () { |
|
|
23 | |
|
|
24 | |
|
|
25 | CFLAGS="$CFLAGS $1" |
|
|
26 | CXXFLAGS="$CXXFLAGS $1" |
| 13 | |
27 | |
| 14 | } |
28 | } |
| 15 | |
29 | |
| 16 | max-optim () { |
30 | max-optim () { |
| 17 | |
31 | |