summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2020-06-24 10:40:14 -0700
committerSergei Trofimovich <slyfox@gentoo.org>2020-06-24 21:46:24 +0100
commit1b3cea081588bd5e3491b66f65035c5772733eff (patch)
tree408bb9b54ab5080b4596fa39ec591e328fee59ce
parentREADME: add 'Releasing' section (diff)
downloadgcc-config-1b3cea081588bd5e3491b66f65035c5772733eff.tar.gz
gcc-config-1b3cea081588bd5e3491b66f65035c5772733eff.tar.bz2
gcc-config-1b3cea081588bd5e3491b66f65035c5772733eff.zip
gcc-config: make USE_CC_WRAPPERS=yes to install cc/f77 links
Add USE_CC_WRAPPERS option to control installation of cc/f77 symlinks. This will let packages other than GCC to install 'cc'. Signed-off-by: Manoj Gupta <manojgupta@google.com> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--Makefile3
-rwxr-xr-xgcc-config9
2 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 61ba0d9..b143b3c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@
# and keep only
# ${CTARGET}-gcc
USE_NATIVE_LINKS ?= yes
+# Install cc/f77 symlinks to gcc/g77.
+USE_CC_WRAPPERS ?= yes
# Prepend toolchain prefix to 'gcc' in c89/c99 wrapeprs.
# Should usually be '${CHOST}-'.
@@ -41,6 +43,7 @@ clean:
-e 's:@GENTOO_LIBDIR@:$(SUBLIBDIR):g' \
-e 's:@PV@:$(PV):g' \
-e 's:@USE_NATIVE_LINKS@:$(USE_NATIVE_LINKS):g' \
+ -e 's:@USE_CC_WRAPPERS@:$(USE_CC_WRAPPERS):g' \
$< > $@
chmod a+rx $@
diff --git a/gcc-config b/gcc-config
index d05dabe..dee6f98 100755
--- a/gcc-config
+++ b/gcc-config
@@ -289,8 +289,10 @@ update_wrappers() {
local all_wrappers=( ${new_wrappers[@]/#/${CTARGET}-} )
if ! is_cross_compiler ; then
all_wrappers+=( "${new_wrappers[@]}" )
- # There are a few fun extra progs which we have to handle #412319
- all_wrappers+=( cc:gcc f77:g77 )
+ if [[ ${USE_CC_WRAPPERS} == "yes" ]]; then
+ # There are a few fun extra progs which we have to handle #412319
+ all_wrappers+=( cc:gcc f77:g77 )
+ fi
fi
# Then install wrappers for anything new to this profile.
@@ -995,6 +997,7 @@ CC_COMP=
ENV_D="${EROOT}etc/env.d"
GCC_ENV_D="${ENV_D}/gcc"
USE_NATIVE_LINKS="@USE_NATIVE_LINKS@"
+USE_CC_WRAPPERS="@USE_CC_WRAPPERS@"
for x in "$@" ; do
case "${x}" in
@@ -1050,6 +1053,8 @@ for x in "$@" ; do
;;
--enable-native-links) USE_NATIVE_LINKS="yes" ;;
--disable-native-links) USE_NATIVE_LINKS="no" ;;
+ --enable-cc-wrappers) USE_CC_WRAPPERS="yes" ;;
+ --disable-cc-wrappers) USE_CC_WRAPPERS="no" ;;
-*)
die "Invalid switch! Run ${argv0} without parameters for help."
;;