| 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.67 2004/08/07 04:24:41 agriffis Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.68 2004/08/08 21:07:21 lv 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" |
| … | |
… | |
| 71 | # |
71 | # |
| 72 | |
72 | |
| 73 | # C[XX]FLAGS that we allow in strip-flags |
73 | # C[XX]FLAGS that we allow in strip-flags |
| 74 | setup-allowed-flags() { |
74 | setup-allowed-flags() { |
| 75 | if [ -z "${ALLOWED_FLAGS}" ] ; then |
75 | if [ -z "${ALLOWED_FLAGS}" ] ; then |
| 76 | export ALLOWED_FLAGS="-O -O1 -O2 -mcpu -march -mtune -fstack-protector -fno-unit-at-a-time -pipe -g" |
76 | export ALLOWED_FLAGS="-O -O1 -O2 -mcpu -march -mtune -fstack-protector -fno-stack-protector -fno-pie -fno-unit-at-a-time -pipe -g" |
| 77 | case "${ARCH}" in |
77 | case "${ARCH}" in |
| 78 | mips) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mips1 -mips2 -mips3 -mips4 -mabi" ;; |
78 | mips) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mips1 -mips2 -mips3 -mips4 -mabi" ;; |
| 79 | amd64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC -m64" ;; |
79 | amd64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC -m64" ;; |
| 80 | x86) ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32" ;; |
80 | x86) ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32" ;; |
| 81 | alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;; |
81 | alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;; |