summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/flag-o-matic.eclass15
1 files changed, 14 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 0d2760d686f2..ed1b6e746cef 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -23,6 +23,8 @@ inherit toolchain-funcs
[[ ${EAPI} == [567] ]] && inherit eutils
+# @FUNCTION: all-flag-vars
+# @DESCRIPTION:
# Return all the flag variables that our high level funcs operate on.
all-flag-vars() {
echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS
@@ -110,7 +112,10 @@ _setup-allowed-flags() {
)
}
-# inverted filters for hardened compiler. This is trying to unpick
+# @FUNCTION: _filter-hardened
+# @INTERNAL
+# @DESCRIPTION:
+# Inverted filters for hardened compiler. This is trying to unpick
# the hardened compiler defaults.
_filter-hardened() {
local f
@@ -144,6 +149,9 @@ _filter-hardened() {
done
}
+# @FUNCTION: _filter-var
+# @INTERNAL
+# @DESCRIPTION:
# Remove occurrences of strings from variable given in $1
# Strings removed are matched as globs, so for example
# '-O*' would remove -O1, -O2 etc.
@@ -336,6 +344,11 @@ replace-cpu-flags() {
return 0
}
+# @FUNCTION: _is_flagq
+# @USAGE: <variable> <flag>
+# @INTERNAL
+# @DESCRIPTION:
+# Returns shell true if <flag> is in a given <variable>, else returns shell false.
_is_flagq() {
local x var="$1[*]"
for x in ${!var} ; do