1 |
On Thu, 01 Apr 2021 11:58:07 +0200 |
2 |
Andreas Sturmlechner <asturm@g.o> wrote: |
3 |
|
4 |
> From 6d1c665d06186dde5361905d5fb2057e044b040e Mon Sep 17 00:00:00 2001 |
5 |
> From: Andreas Sturmlechner <asturm@g.o> |
6 |
> Date: Wed, 31 Mar 2021 00:22:12 +0200 |
7 |
> Subject: [PATCH 2/5] flag-o-matic.eclass: Make setup-allowed-flags() internal |
8 |
> |
9 |
> Signed-off-by: Andreas Sturmlechner <asturm@g.o> |
10 |
> --- |
11 |
> eclass/flag-o-matic.eclass | 16 +++++++++++++++- |
12 |
> 1 file changed, 15 insertions(+), 1 deletion(-) |
13 |
> |
14 |
> diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass |
15 |
> index ab79f70392d..d511a140592 100644 |
16 |
> --- a/eclass/flag-o-matic.eclass |
17 |
> +++ b/eclass/flag-o-matic.eclass |
18 |
> @@ -26,9 +26,23 @@ all-flag-vars() { |
19 |
> echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS |
20 |
> } |
21 |
> |
22 |
> +# @FUNCTION: setup-allowed-flags |
23 |
> +# @INTERNAL |
24 |
> +# @DESCRIPTION: |
25 |
> # {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags |
26 |
> # Note: shell globs and character lists are allowed |
27 |
> setup-allowed-flags() { |
28 |
> + [[ ${EAPI} == [5-7] ]] || |
29 |
|
30 |
Minor nit: I'd prefer '[[ ${EAPI} == [567] ]]' |
31 |
|
32 |
Otherwise the patch is ok. |
33 |
|
34 |
> + die "Internal function ${FUNCNAME} is not available in >=EAPI-8." |
35 |
> + _setup-allowed-flags |
36 |
> +} |
37 |
> + |
38 |
> +# @FUNCTION: _setup-allowed-flags |
39 |
> +# @INTERNAL |
40 |
> +# @DESCRIPTION: |
41 |
> +# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags |
42 |
> +# Note: shell globs and character lists are allowed |
43 |
> +_setup-allowed-flags() { |
44 |
> ALLOWED_FLAGS=( |
45 |
> -pipe -O '-O[12sg]' -mcpu -march -mtune |
46 |
> '-fstack-protector*' '-fsanitize*' '-fstack-check*' -fno-stack-check |
47 |
> @@ -412,7 +426,7 @@ strip-flags() { |
48 |
> local x y var |
49 |
> |
50 |
> local ALLOWED_FLAGS |
51 |
> - setup-allowed-flags |
52 |
> + _setup-allowed-flags |
53 |
> |
54 |
> set -f # disable pathname expansion |
55 |
> |
56 |
> -- |
57 |
> 2.31.0 |
58 |
> |
59 |
|
60 |
|
61 |
-- |
62 |
|
63 |
Sergei |