diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-04-11 22:37:08 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-04-11 21:00:02 +0000 |
commit | bf1aeae30e2947b4c10d6c9a81e624ff79a6af6c (patch) | |
tree | 81460c9272e01a3f1bfe03600149811682e93eea /eclass/flag-o-matic.eclass | |
parent | flag-o-matic.eclass: SUPPORTED_EAPIS: 5,6,7; drop eutils, multilib (diff) | |
download | gentoo-bf1aeae30e2947b4c10d6c9a81e624ff79a6af6c.tar.gz gentoo-bf1aeae30e2947b4c10d6c9a81e624ff79a6af6c.tar.bz2 gentoo-bf1aeae30e2947b4c10d6c9a81e624ff79a6af6c.zip |
flag-o-matic.eclass: Make setup-allowed-flags() internal
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
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 |