From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E94B01382C5 for ; Thu, 1 Apr 2021 09:58:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B7F12E0AE4; Thu, 1 Apr 2021 09:58:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7BEBDE0A8E for ; Thu, 1 Apr 2021 09:58:13 +0000 (UTC) From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org, Sergei Trofimovich Subject: Re: [gentoo-dev] [PATCH v2 2/5] flag-o-matic.eclass: get rid of eutils in In-Reply-To: <2537255.vuYhMxLoTh@tuxbook> References: <5252907.rdbgypaU67@tuxbook> <20210331083321.24e5ead5@sf> <2537255.vuYhMxLoTh@tuxbook> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2529334.lGaqSPkdTl"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: 465fb3ba-08c8-4391-8205-e393e2f088df X-Archives-Hash: 055639fe7a0617bb0ddfd2e06bc0ee0a --nextPart2529334.lGaqSPkdTl Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org, Sergei Trofimovich Subject: Re: [gentoo-dev] [PATCH v2 2/5] flag-o-matic.eclass: get rid of eutils in In-Reply-To: <2537255.vuYhMxLoTh@tuxbook> References: <5252907.rdbgypaU67@tuxbook> <20210331083321.24e5ead5@sf> <2537255.vuYhMxLoTh@tuxbook> >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] ]] || + 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 --nextPart2529334.lGaqSPkdTl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEE/x0UfMgLbk/MiQ+AUIqgAODug+AFAmBlmS9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZG MUQxNDdDQzgwQjZFNEZDQzg5MEY4MDUwOEFBMDAwRTBFRTgzRTAACgkQUIqgAODu g+B97Qf/VifzNmt4FvpkONnhN1QN49+VED0OqCHvNqq24PVUjM3lQhclTKeYHWu5 DK53TpU6LSv4XqxGV+U5Y0ScvA9Ac2IZHY1efGhCci9XIAJF+IjrrJg9FLbSoPCM IGEcgjylP2XA+rt4Ibz7aa8HadusnxE5VVyKOBHksbUpyN3g8kFzyztlLasc0xwg n186O2/p4s5ICbVwqM/W/ez2jyeni1ao33GGPgZ6Ns4vWm91lfsHo8PnpNol7gur Mh52xBC+N0Y0aMuk/j/qoAKdU/GjV73Uxpmm7lIQaaNLe2q8Htq5jKFF0Q/dbVpy 47+tHEahbRJ/dNzN5R3n1qgX8bvlZA== =Ntfy -----END PGP SIGNATURE----- --nextPart2529334.lGaqSPkdTl--