[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] Re: [PATCH] gcc-config: Add option to not install cc/f77 wrappers.
From: Manoj Gupta <manojgupta () google ! com>
Date: 2020-02-27 19:40:59
Message-ID: CAH=QcsjL6aQpUqFoLqvX0iEe+9NWUHyfVs-SSLDfnRpv==P6DA () mail ! gmail ! com
[Download RAW message or body]
On Thu, Feb 27, 2020 at 11:22 AM Manoj Gupta <manojgupta@google.com> 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 <manojgupta@google.com>
> ---
> 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 .
[Attachment #3 (text/html)]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Thu, Feb 27, 2020 at 11:22 AM Manoj Gupta <<a \
href="mailto:manojgupta@google.com">manojgupta@google.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">gcc-config installs \
cc/f77 by default. This may be undesired on<br> systems that want to set their own \
versions of cc/f77.<br> <br>
Add option "-n"/"--no-default-vars" to not install the cc/f77<br>
wrappers.<br>
<br>
Signed-off-by: Manoj Gupta <<a href="mailto:manojgupta@google.com" \
target="_blank">manojgupta@google.com</a>><br>
---<br>
gcc-config | 6 +++++-<br>
1 file changed, 5 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/gcc-config b/gcc-config<br>
index f03a46a..6f306db 100755<br>
--- a/gcc-config<br>
+++ b/gcc-config<br>
@@ -262,7 +262,7 @@ update_wrappers() {<br>
# For all toolchains, we want to create the fully qualified<br>
# `tuple-foo`. Only native ones do we want the simple `foo`.<br>
local all_wrappers=( ${new_wrappers[@]/#/${CTARGET}-} )<br>
- if ! is_cross_compiler ; then<br>
+ if ! is_cross_compiler && [[ "${DEFAULT_PROGS}" == \
"yes" ]]; then<br>
all_wrappers+=( "${new_wrappers[@]}" )<br>
# There are a few fun extra progs which we have to handle \
#412319<br> all_wrappers+=( cc:gcc f77:g77 )<br>
@@ -951,6 +951,7 @@ FORCE="no"<br>
CC_COMP=<br>
ENV_D="${EROOT}etc/env.d"<br>
GCC_ENV_D="${ENV_D}/gcc"<br>
+DEFAULT_PROGS="yes"<br>
<br>
for x in "$@" ; do<br>
case "${x}" in<br>
@@ -972,6 +973,9 @@ for x in "$@" ; do<br>
-l|--list-profiles)<br>
set_doit list_profiles<br>
;;<br>
+ -n|--no-default-vars)<br>
+ DEFAULT_PROGS="no"<br>
+ ;;<br>
-S|--split-profile)<br>
if [[ ( $1 != "-S" && $1 != \
"--split-profile" ) || $# -eq 1 ]] ; then<br> usage 1<br>
-- <br><br></blockquote><div><br></div><div>Not sure of the correct mailing list for \
patches to gcc-config so also adding toolchain@gentoo \
.</div><div><br></div></div></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic