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 7B939138350 for ; Thu, 27 Feb 2020 19:41:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E48B4E08D3; Thu, 27 Feb 2020 19:41:12 +0000 (UTC) Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (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 97FF8E089B for ; Thu, 27 Feb 2020 19:41:12 +0000 (UTC) Received: by mail-lj1-x243.google.com with SMTP id w1so567775ljh.5 for ; Thu, 27 Feb 2020 11:41:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=bG3T498fKZj1DETV6DP8zObvJcueCpv9uRlCCI9XYWc=; b=NO5k60Bsr0YYbXnQ9kmjVE/V2Zx2z8HPSaeddQSxxTBbxjH/e49LtheEXRWX0hYbh9 KtLXbpryjLaOr6c5gGCodc1SJEfz9tVcXqy6IbtmApJ4/RH/q8ZNYQQiNKnA61eytcKU jC+9FF7hJKIQTbMsXWEbsRsBbcCwm/c/zGxKqGPDEa8h5cSQ/CinvtxE5TDGeGSpJYXt LS1gJUkV4Jpx2/Lh02LjZ3lXdNqo/yksQlLZjnsX2NLZZ0MK48FQnKGPSEt5PMYYTtzz 43y5kdLyBeRaMxU9P5rcMdrg+BvqqTNpTmzTKmu232/MJcP3ajpblLTzSpeZEETT+g33 kasQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=bG3T498fKZj1DETV6DP8zObvJcueCpv9uRlCCI9XYWc=; b=HnQXLToym9N47Wx/0fYtDUcQf2MbyuByVKd1XgI8HRA1l9F33bkNORo2hWhyNg2w66 pMQyyXP3I2roYtpSbRKGn0ENlT8U6/Bv2EQpaSmcaUFCdoeFhUsXtl3ksrnNTJhapwTG 091LoxeCMTVrpAtRP2X+0qbsp7JkJUb+bts9pQFES1a7xJgQkOZbRuaOywZKJSd6jYn/ +VQ4NC11X3kYVClHlvZi4B8E01wwImbWZRMNfv8He98Yl52j1wEX1Ga6pwjILFz4Qzvi 5WCbyZOQ6yLIzllBDbGQC6pV31V3uBJrkXEj1oG0kHYoKfy5GGeWcxN1fJFS55MXNkcd U5lQ== X-Gm-Message-State: ANhLgQ052Mfbl/umpwJyc+bd0XAxVArNHSDVvZJZXt9QTNJLbQeG7uAR g0BAlz8/K+Bfifok6WBAsd6UEViOpiY/FKeh5v8BmKqe X-Google-Smtp-Source: ADFU+vv1x8Q46XGuIFsIN++XNNFoY4L0cL7VzREatDUdCW+Y5C7yFmxoyhb7gRLb6A8aW4Qmvv91nFrDtoGP3OHXYEA= X-Received: by 2002:a05:651c:2c8:: with SMTP id f8mr398869ljo.30.1582832470473; Thu, 27 Feb 2020 11:41:10 -0800 (PST) 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 References: <20200227192255.153961-1-manojgupta@google.com> In-Reply-To: <20200227192255.153961-1-manojgupta@google.com> From: Manoj Gupta Date: Thu, 27 Feb 2020 11:40:59 -0800 Message-ID: Subject: [gentoo-dev] Re: [PATCH] gcc-config: Add option to not install cc/f77 wrappers. To: gentoo-dev@lists.gentoo.org, Sergei Trofimovich , vapier@gentoo.org, toolchain@gentoo.org Content-Type: multipart/alternative; boundary="000000000000249d36059f93e7b1" X-Archives-Salt: 7db30efe-78f4-4171-9686-f0541defc7d4 X-Archives-Hash: d8666f0fedb6662ee677ee1095b45c54 --000000000000249d36059f93e7b1 Content-Type: text/plain; charset="UTF-8" On Thu, Feb 27, 2020 at 11:22 AM Manoj Gupta wrote: > gcc-config installs cc/f77 by default. This may be undesired on > systems that want to set their own versions of cc/f77. > > Add option "-n"/"--no-default-vars" to not install the cc/f77 > wrappers. > > Signed-off-by: Manoj Gupta > --- > gcc-config | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/gcc-config b/gcc-config > index f03a46a..6f306db 100755 > --- a/gcc-config > +++ b/gcc-config > @@ -262,7 +262,7 @@ update_wrappers() { > # For all toolchains, we want to create the fully qualified > # `tuple-foo`. Only native ones do we want the simple `foo`. > local all_wrappers=( ${new_wrappers[@]/#/${CTARGET}-} ) > - if ! is_cross_compiler ; then > + if ! is_cross_compiler && [[ "${DEFAULT_PROGS}" == "yes" ]]; then > all_wrappers+=( "${new_wrappers[@]}" ) > # There are a few fun extra progs which we have to handle > #412319 > all_wrappers+=( cc:gcc f77:g77 ) > @@ -951,6 +951,7 @@ FORCE="no" > CC_COMP= > ENV_D="${EROOT}etc/env.d" > GCC_ENV_D="${ENV_D}/gcc" > +DEFAULT_PROGS="yes" > > for x in "$@" ; do > case "${x}" in > @@ -972,6 +973,9 @@ for x in "$@" ; do > -l|--list-profiles) > set_doit list_profiles > ;; > + -n|--no-default-vars) > + DEFAULT_PROGS="no" > + ;; > -S|--split-profile) > if [[ ( $1 != "-S" && $1 != "--split-profile" ) || > $# -eq 1 ]] ; then > usage 1 > -- > > Not sure of the correct mailing list for patches to gcc-config so also adding toolchain@gentoo . --000000000000249d36059f93e7b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Feb 27, 2020 at 11:22 AM Mano= j Gupta <manojgupta@google.com<= /a>> wrote:
g= cc-config installs cc/f77 by default. This may be undesired on
systems that want to set their own versions of cc/f77.

Add option "-n"/"--no-default-vars" to not install the = cc/f77
wrappers.

Signed-off-by: Manoj Gupta <
manojgupta@google.com>
---
=C2=A0gcc-config | 6 +++++-
=C2=A01 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc-config b/gcc-config
index f03a46a..6f306db 100755
--- a/gcc-config
+++ b/gcc-config
@@ -262,7 +262,7 @@ update_wrappers() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # For all toolchains, we want to create the ful= ly qualified
=C2=A0 =C2=A0 =C2=A0 =C2=A0 # `tuple-foo`.=C2=A0 Only native ones do we wan= t the simple `foo`.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 local all_wrappers=3D( ${new_wrappers[@]/#/${CT= ARGET}-} )
-=C2=A0 =C2=A0 =C2=A0 =C2=A0if ! is_cross_compiler ; then
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if ! is_cross_compiler && [[ "${DE= FAULT_PROGS}" =3D=3D "yes" ]]; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 all_wrappers+=3D( &= quot;${new_wrappers[@]}" )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # There are a few f= un extra progs which we have to handle #412319
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 all_wrappers+=3D( c= c:gcc f77:g77 )
@@ -951,6 +951,7 @@ FORCE=3D"no"
=C2=A0CC_COMP=3D
=C2=A0ENV_D=3D"${EROOT}etc/env.d"
=C2=A0GCC_ENV_D=3D"${ENV_D}/gcc"
+DEFAULT_PROGS=3D"yes"

=C2=A0for x in "$@" ; do
=C2=A0 =C2=A0 =C2=A0 =C2=A0 case "${x}" in
@@ -972,6 +973,9 @@ for x in "$@" ; do
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -l|--list-profiles)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 set_doit list_profiles
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ;;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-n|--no-default-var= s)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0DEFAULT_PROGS=3D"no"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -S|--split-profile)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 if [[ ( $1 !=3D "-S" && $1 !=3D "--split-= profile" ) || $# -eq 1 ]] ; then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 usage 1
--


Not sure of the correct mailing= list for patches to gcc-config so also adding toolchain@gentoo .

--000000000000249d36059f93e7b1--