diff options
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index b2510ec56009..8357050193bd 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -28,9 +28,23 @@ all-flag-vars() { echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS } +# @FUNCTION: setup-allowed-flags +# @INTERNAL +# @DESCRIPTION: # {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags # Note: shell globs and character lists are allowed setup-allowed-flags() { + [[ ${EAPI} == [567] ]] || + die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}." + _setup-allowed-flags "$@" +} + +# @FUNCTION: _setup-allowed-flags +# @INTERNAL +# @DESCRIPTION: +# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags +# Note: shell globs and character lists are allowed +_setup-allowed-flags() { ALLOWED_FLAGS=( -pipe -O '-O[12sg]' -mcpu -march -mtune '-fstack-protector*' '-fsanitize*' '-fstack-check*' -fno-stack-check @@ -414,7 +428,7 @@ strip-flags() { local x y var local ALLOWED_FLAGS - setup-allowed-flags + _setup-allowed-flags set -f # disable pathname expansion |