1 |
commit: 218cc249eb2324b802c7a70a91ae5663d8e12594 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 22 11:32:48 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 22 11:32:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=218cc249 |
7 |
|
8 |
gcc-config: clarify comments on how aliases are expanded |
9 |
|
10 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
11 |
|
12 |
gcc-config | 7 +++++-- |
13 |
1 file changed, 5 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/gcc-config b/gcc-config |
16 |
index 87f466c..847cde2 100755 |
17 |
--- a/gcc-config |
18 |
+++ b/gcc-config |
19 |
@@ -251,7 +251,7 @@ update_wrappers() { |
20 |
# - ${CTARGET}-gcc-11.0.0 (no gcc-11.0.0 equivalent) |
21 |
# TODO: is it a gcc or toolchain.eclass bug? |
22 |
# |
23 |
- # Cross directory looks liks: |
24 |
+ # Cross directory looks like: |
25 |
# /usr/x86_64-pc-linux-gnu/ia64-unknown-linux-gnu/gcc-bin/10.1.0 |
26 |
# Contents look like: |
27 |
# - ${CTARGET}-foo (${CTARGET}-gcc |
28 |
@@ -277,7 +277,7 @@ update_wrappers() { |
29 |
[[ -z ${new_wrappers} ]] && return 1 |
30 |
|
31 |
# First delete the wrappers that the old one provided but the |
32 |
- # new one does not. |
33 |
+ # new ones do not. |
34 |
for x in "${old_wrappers[@]}" ; do |
35 |
has "${x}" "${new_wrappers[@]}" && continue |
36 |
rm -f "${EROOT}usr/bin/${x}" "${EROOT}usr/bin/${CTARGET}-${x}" |
37 |
@@ -300,11 +300,14 @@ update_wrappers() { |
38 |
# wrapper (the binary we're 'wrapping') so that we can |
39 |
# sync mtimes together. This makes things like ccache |
40 |
# happy. See Bug #70548 for more info. |
41 |
+ # |
42 |
+ # x=cc:gcc -> ref=/path/to/gcc |
43 |
ref="${ROOT}${GCC_PATH}/${x#*:}" |
44 |
if [[ ${x} == *:* ]] ; then |
45 |
# Only install a wrapper if the reference binary exists ... |
46 |
[[ -x ${ref} ]] || continue |
47 |
fi |
48 |
+ # x=cc:gcc -> x=cc |
49 |
x=${x%:*} |
50 |
if [[ ! -x ${ref} ]] ; then |
51 |
if is_cross_compiler ; then |