On Thu, 01 Apr 2021 11:58:07 +0200
Andreas Sturmlechner wrote:
> From 6d1c665d06186dde5361905d5fb2057e044b040e Mon Sep 17 00:00:00 2001
> From: Andreas Sturmlechner
> Date: Wed, 31 Mar 2021 00:22:12 +0200
> Subject: [PATCH 2/5] flag-o-matic.eclass: Make setup-allowed-flags() internal
>
> Signed-off-by: Andreas Sturmlechner
> ---
> 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 ab79f70392d..d511a140592 100644
> --- a/eclass/flag-o-matic.eclass
> +++ b/eclass/flag-o-matic.eclass
> @@ -26,9 +26,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} == [5-7] ]] ||
Minor nit: I'd prefer '[[ ${EAPI} == [567] ]]'
Otherwise the patch is ok.
> + die "Internal function ${FUNCNAME} is not available in
> >=EAPI-8."
> + _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
> @@ -412,7 +426,7 @@ strip-flags() {
> local x y var
>
> local ALLOWED_FLAGS
> - setup-allowed-flags
> + _setup-allowed-flags
>
> set -f # disable pathname expansion
>
> --
> 2.31.0
>
--
Sergei
pgpJn1wjBmoDr.pgp
Description: Цифровая подпись OpenPGP