1 |
gcc-config installs cc/f77 by default. This may be undesired on |
2 |
systems that want to set their own versions of cc/f77. |
3 |
|
4 |
Add option "-n"/"--no-default-vars" to not install the cc/f77 |
5 |
wrappers. |
6 |
|
7 |
Signed-off-by: Manoj Gupta <manojgupta@××××××.com> |
8 |
--- |
9 |
gcc-config | 6 +++++- |
10 |
1 file changed, 5 insertions(+), 1 deletion(-) |
11 |
|
12 |
diff --git a/gcc-config b/gcc-config |
13 |
index f03a46a..6f306db 100755 |
14 |
--- a/gcc-config |
15 |
+++ b/gcc-config |
16 |
@@ -262,7 +262,7 @@ update_wrappers() { |
17 |
# For all toolchains, we want to create the fully qualified |
18 |
# `tuple-foo`. Only native ones do we want the simple `foo`. |
19 |
local all_wrappers=( ${new_wrappers[@]/#/${CTARGET}-} ) |
20 |
- if ! is_cross_compiler ; then |
21 |
+ if ! is_cross_compiler && [[ "${DEFAULT_PROGS}" == "yes" ]]; then |
22 |
all_wrappers+=( "${new_wrappers[@]}" ) |
23 |
# There are a few fun extra progs which we have to handle #412319 |
24 |
all_wrappers+=( cc:gcc f77:g77 ) |
25 |
@@ -951,6 +951,7 @@ FORCE="no" |
26 |
CC_COMP= |
27 |
ENV_D="${EROOT}etc/env.d" |
28 |
GCC_ENV_D="${ENV_D}/gcc" |
29 |
+DEFAULT_PROGS="yes" |
30 |
|
31 |
for x in "$@" ; do |
32 |
case "${x}" in |
33 |
@@ -972,6 +973,9 @@ for x in "$@" ; do |
34 |
-l|--list-profiles) |
35 |
set_doit list_profiles |
36 |
;; |
37 |
+ -n|--no-default-vars) |
38 |
+ DEFAULT_PROGS="no" |
39 |
+ ;; |
40 |
-S|--split-profile) |
41 |
if [[ ( $1 != "-S" && $1 != "--split-profile" ) || $# -eq 1 ]] ; then |
42 |
usage 1 |
43 |
-- |
44 |
2.25.1.481.gfbce0eb801-goog |