| 1 |
# Copyright 1999-2002 Gentoo Technologies, Inc.
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# Author Bart Verwilst <verwilst@gentoo.org>
|
| 4 |
# /space/gentoo/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass
|
| 5 |
ECLASS=flag-o-matic
|
| 6 |
|
| 7 |
#
|
| 8 |
#Remove particular flags from C[XX]FLAGS
|
| 9 |
#
|
| 10 |
filter-flags () {
|
| 11 |
|
| 12 |
for x in $1; do
|
| 13 |
CFLAGS="${CFLAGS/$x}"
|
| 14 |
CXXFLAGS="${CXXFLAGS/$x}"
|
| 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"
|
| 27 |
|
| 28 |
}
|
| 29 |
|
| 30 |
max-optim () {
|
| 31 |
|
| 32 |
for x in $CFLAGS; do
|
| 33 |
echo $x
|
| 34 |
done
|
| 35 |
|
| 36 |
}
|