aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-22 12:32:48 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-22 12:32:48 +0100
commit218cc249eb2324b802c7a70a91ae5663d8e12594 (patch)
treeea124802e373da13ce634f248ea516fdc802a610
parentgcc-config: add facts around tool names (diff)
downloadgcc-config-218cc249eb2324b802c7a70a91ae5663d8e12594.tar.gz
gcc-config-218cc249eb2324b802c7a70a91ae5663d8e12594.tar.bz2
gcc-config-218cc249eb2324b802c7a70a91ae5663d8e12594.zip
gcc-config: clarify comments on how aliases are expanded
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rwxr-xr-xgcc-config7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc-config b/gcc-config
index 87f466c..847cde2 100755
--- a/gcc-config
+++ b/gcc-config
@@ -251,7 +251,7 @@ update_wrappers() {
# - ${CTARGET}-gcc-11.0.0 (no gcc-11.0.0 equivalent)
# TODO: is it a gcc or toolchain.eclass bug?
#
- # Cross directory looks liks:
+ # Cross directory looks like:
# /usr/x86_64-pc-linux-gnu/ia64-unknown-linux-gnu/gcc-bin/10.1.0
# Contents look like:
# - ${CTARGET}-foo (${CTARGET}-gcc
@@ -277,7 +277,7 @@ update_wrappers() {
[[ -z ${new_wrappers} ]] && return 1
# First delete the wrappers that the old one provided but the
- # new one does not.
+ # new ones do not.
for x in "${old_wrappers[@]}" ; do
has "${x}" "${new_wrappers[@]}" && continue
rm -f "${EROOT}usr/bin/${x}" "${EROOT}usr/bin/${CTARGET}-${x}"
@@ -300,11 +300,14 @@ update_wrappers() {
# wrapper (the binary we're 'wrapping') so that we can
# sync mtimes together. This makes things like ccache
# happy. See Bug #70548 for more info.
+ #
+ # x=cc:gcc -> ref=/path/to/gcc
ref="${ROOT}${GCC_PATH}/${x#*:}"
if [[ ${x} == *:* ]] ; then
# Only install a wrapper if the reference binary exists ...
[[ -x ${ref} ]] || continue
fi
+ # x=cc:gcc -> x=cc
x=${x%:*}
if [[ ! -x ${ref} ]] ; then
if is_cross_compiler ; then