commit: bf1aeae30e2947b4c10d6c9a81e624ff79a6af6c
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 11 20:37:08 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 11 21:00:02 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf1aeae3
flag-o-matic.eclass: Make setup-allowed-flags() internal
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/flag-o-matic.eclass | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index b2510ec5600..8357050193b 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