Gentoo Archives: gentoo-dev

From: Manoj Gupta <manojgupta@××××××.com>
To: gentoo-dev@l.g.o, Sergei Trofimovich <slyfox@g.o>, vapier@g.o, toolchain@g.o
Subject: [gentoo-dev] Re: [PATCH] gcc-config: Add option to not install cc/f77 wrappers.
Date: Thu, 27 Feb 2020 19:41:16
Message-Id: CAH=QcsjL6aQpUqFoLqvX0iEe+9NWUHyfVs-SSLDfnRpv==P6DA@mail.gmail.com
In Reply to: [gentoo-dev] [PATCH] gcc-config: Add option to not install cc/f77 wrappers. by Manoj Gupta
1 On Thu, Feb 27, 2020 at 11:22 AM Manoj Gupta <manojgupta@××××××.com> wrote:
2
3 > gcc-config installs cc/f77 by default. This may be undesired on
4 > systems that want to set their own versions of cc/f77.
5 >
6 > Add option "-n"/"--no-default-vars" to not install the cc/f77
7 > wrappers.
8 >
9 > Signed-off-by: Manoj Gupta <manojgupta@××××××.com>
10 > ---
11 > gcc-config | 6 +++++-
12 > 1 file changed, 5 insertions(+), 1 deletion(-)
13 >
14 > diff --git a/gcc-config b/gcc-config
15 > index f03a46a..6f306db 100755
16 > --- a/gcc-config
17 > +++ b/gcc-config
18 > @@ -262,7 +262,7 @@ update_wrappers() {
19 > # For all toolchains, we want to create the fully qualified
20 > # `tuple-foo`. Only native ones do we want the simple `foo`.
21 > local all_wrappers=( ${new_wrappers[@]/#/${CTARGET}-} )
22 > - if ! is_cross_compiler ; then
23 > + if ! is_cross_compiler && [[ "${DEFAULT_PROGS}" == "yes" ]]; then
24 > all_wrappers+=( "${new_wrappers[@]}" )
25 > # There are a few fun extra progs which we have to handle
26 > #412319
27 > all_wrappers+=( cc:gcc f77:g77 )
28 > @@ -951,6 +951,7 @@ FORCE="no"
29 > CC_COMP=
30 > ENV_D="${EROOT}etc/env.d"
31 > GCC_ENV_D="${ENV_D}/gcc"
32 > +DEFAULT_PROGS="yes"
33 >
34 > for x in "$@" ; do
35 > case "${x}" in
36 > @@ -972,6 +973,9 @@ for x in "$@" ; do
37 > -l|--list-profiles)
38 > set_doit list_profiles
39 > ;;
40 > + -n|--no-default-vars)
41 > + DEFAULT_PROGS="no"
42 > + ;;
43 > -S|--split-profile)
44 > if [[ ( $1 != "-S" && $1 != "--split-profile" ) ||
45 > $# -eq 1 ]] ; then
46 > usage 1
47 > --
48 >
49 >
50 Not sure of the correct mailing list for patches to gcc-config so also
51 adding toolchain@gentoo .