| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 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.75 2004/10/28 01:38:31 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.76 2004/10/30 00:00:14 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" |
| … | |
… | |
| 72 | # |
72 | # |
| 73 | |
73 | |
| 74 | # C[XX]FLAGS that we allow in strip-flags |
74 | # C[XX]FLAGS that we allow in strip-flags |
| 75 | setup-allowed-flags() { |
75 | setup-allowed-flags() { |
| 76 | if [ -z "${ALLOWED_FLAGS}" ] ; then |
76 | if [ -z "${ALLOWED_FLAGS}" ] ; then |
| 77 | export ALLOWED_FLAGS="-O -O1 -O2 -mcpu -march -mtune -fstack-protector -fno-stack-protector -fno-pie -fno-unit-at-a-time -pipe -g" |
77 | export ALLOWED_FLAGS="-pipe" |
|
|
78 | export ALLOWED_FLAGS="${ALLOWED_FLAGS} -O -O0 -O1 -O2 -mcpu -march -mtune" |
|
|
79 | export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fstack-protector -fno-stack-protector" |
|
|
80 | export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-pie -fno-unit-at-a-time" |
|
|
81 | export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g0 -g1 -g2 -g3 -ggdb -ggdb0 -ggdb1 -ggdb2 -ggdb3" |
| 78 | case "${ARCH}" in |
82 | case "${ARCH}" in |
| 79 | mips) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -EL -EB -mabi" ;; |
83 | mips) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -EL -EB -mabi" ;; |
| 80 | amd64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC -m64" ;; |
84 | amd64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC -m64" ;; |
| 81 | x86) ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32" ;; |
85 | x86) ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32" ;; |
| 82 | alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;; |
86 | alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;; |