commit: 1b3cea081588bd5e3491b66f65035c5772733eff
Author: Manoj Gupta <manojgupta <AT> google <DOT> com>
AuthorDate: Wed Jun 24 17:40:14 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Jun 24 20:46:24 2020 +0000
URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=1b3cea08
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 <AT> google.com>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
Makefile | 3 +++
gcc-config | 9 +++++++--
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."
;;