/[gentoo-x86]/eclass/flag-o-matic.eclass
Gentoo

Diff of /eclass/flag-o-matic.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.76 Revision 1.79
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.76 2004/10/30 00:00:14 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.79 2004/12/25 18:45:56 chriswhite Exp $
4# 4#
5# Author Bart Verwilst <verwilst@gentoo.org> 5# Author Bart Verwilst <verwilst@gentoo.org>
6 6
7ECLASS=flag-o-matic 7ECLASS=flag-o-matic
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
83 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" ;;
84 amd64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC -m64" ;; 84 amd64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC -m64" ;;
85 x86) ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32" ;; 85 x86) ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32" ;;
86 alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;; 86 alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;;
87 ia64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;; 87 ia64) ALLOWED_FLAGS="${ALLOWED_FLAGS} -fPIC" ;;
88 sparc) ALLOWED_FLAGS="${ALLOWED_FLAGS} -m32 -m64" ;;
89 ppc) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mabi" ;;
88 esac 90 esac
89 fi 91 fi
90 # allow a bunch of flags that negate features / control ABI 92 # allow a bunch of flags that negate features / control ABI
91 ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all" 93 ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all"
92 case "${ARCH}" in 94 case "${ARCH}" in
420 422
421etexec-flags() { 423etexec-flags() {
422 # if you're not using a hardened compiler you wont need this 424 # if you're not using a hardened compiler you wont need this
423 # PIC/no-pic kludge in the first place. 425 # PIC/no-pic kludge in the first place.
424 has_hardened || return 0 426 has_hardened || return 0
425 # this kludge breaks on amd64, and probably other -fPIC dependant
426 # archs.
427 use amd64 && return 0 427 use amd64 && return 0
428 use mips && return 0
428 429
429 if has_pie || has_pic; then 430 if has_pie || has_pic; then
430 [ -z "`is-flag -fno-pic`" ] && 431 [ -z "`is-flag -fno-pic`" ] &&
431 export CFLAGS="${CFLAGS} `test_flag -fno-pic`" 432 export CFLAGS="${CFLAGS} `test_flag -fno-pic`"
432 [ -z "`is-flag -nopie`" ] && 433 [ -z "`is-flag -nopie`" ] &&

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.79

  ViewVC Help
Powered by ViewVC 1.1.20