/[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.164 Revision 1.165
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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.164 2012/01/13 22:40:29 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.165 2012/01/14 08:05:32 vapier Exp $
4 4
5# @ECLASS: flag-o-matic.eclass 5# @ECLASS: flag-o-matic.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# toolchain@gentoo.org 7# toolchain@gentoo.org
8# @BLURB: common functions to manipulate and query toolchain flags 8# @BLURB: common functions to manipulate and query toolchain flags
12 12
13if [[ ${___ECLASS_ONCE_FLAG_O_MATIC} != "recur -_+^+_- spank" ]] ; then 13if [[ ${___ECLASS_ONCE_FLAG_O_MATIC} != "recur -_+^+_- spank" ]] ; then
14___ECLASS_ONCE_FLAG_O_MATIC="recur -_+^+_- spank" 14___ECLASS_ONCE_FLAG_O_MATIC="recur -_+^+_- spank"
15 15
16inherit eutils toolchain-funcs multilib 16inherit eutils toolchain-funcs multilib
17
18################ DEPRECATED functions ################
19# The following are still present to avoid breaking existing
20# code more than necessary; however they are deprecated. Please
21# use gcc-specs-* from toolchain-funcs.eclass instead, if you
22# need to know which hardened techs are active in the compiler.
23# See bug #100974
24#
25# has_hardened
26# has_pie
27# has_pic
28# has_ssp_all
29# has_ssp
30
31 17
32# {C,CXX,F,FC}FLAGS that we allow in strip-flags 18# {C,CXX,F,FC}FLAGS that we allow in strip-flags
33# Note: shell globs and character lists are allowed 19# Note: shell globs and character lists are allowed
34setup-allowed-flags() { 20setup-allowed-flags() {
35 ALLOWED_FLAGS="-pipe" 21 ALLOWED_FLAGS="-pipe"
525 fi 511 fi
526 done 512 done
527 return 1 513 return 1
528} 514}
529 515
530# DEAD FUNCS. Remove by Dec 2011.
531test_flag() { die "$0: deprecated, please use test-flags()!" ; }
532has_hardened() { die "$0: deprecated, please use gcc-specs-{relro,now}()!" ; }
533has_pic() { die "$0: deprecated, please use gcc-specs-pie()!" ; }
534has_pie() { die "$0: deprecated, please use gcc-specs-pie()!" ; }
535has_ssp_all() { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
536has_ssp() { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
537
538# @FUNCTION: has_m64 516# @FUNCTION: has_m64
539# @DESCRIPTION: 517# @DESCRIPTION:
540# This doesn't test if the flag is accepted, it tests if the flag actually 518# This doesn't test if the flag is accepted, it tests if the flag actually
541# WORKS. Non-multilib gcc will take both -m32 and -m64. If the flag works 519# WORKS. Non-multilib gcc will take both -m32 and -m64. If the flag works
542# return code is 0, else the return code is 1. 520# return code is 0, else the return code is 1.

Legend:
Removed from v.1.164  
changed lines
  Added in v.1.165

  ViewVC Help
Powered by ViewVC 1.1.20