public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] gcc-config: Add option to not install cc/f77 wrappers.
@ 2020-02-27 19:22 Manoj Gupta
  2020-02-27 19:40 ` [gentoo-dev] " Manoj Gupta
  0 siblings, 1 reply; 9+ messages in thread
From: Manoj Gupta @ 2020-02-27 19:22 UTC (permalink / raw
  To: gentoo-dev, slyfox, vapier; +Cc: Manoj Gupta

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
-- 
2.25.1.481.gfbce0eb801-goog



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-26 22:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27 19:22 [gentoo-dev] [PATCH] gcc-config: Add option to not install cc/f77 wrappers Manoj Gupta
2020-02-27 19:40 ` [gentoo-dev] " Manoj Gupta
     [not found]   ` <CAHvdr7P-fYebVxuYU1Pdho7f7yMgE987pSjkp+wzzCxJhPxZzA@mail.gmail.com>
2020-03-03  3:03     ` Manoj Gupta
2020-03-03  9:16       ` Sergei Trofimovich
2020-03-11  3:54         ` Manoj Gupta
2020-03-11  7:49           ` Sergei Trofimovich
2020-03-11 16:07             ` Manoj Gupta
2020-05-26 22:13               ` Manoj Gupta
2020-05-26 22:38                 ` Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox