Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-config:master commit in: /
Date: Thu, 22 Sep 2022 23:46:23
Message-Id: 1663890343.1ff1ed38697ed3b376db5c5157fcec24df67aa91.sam@gentoo
1 commit: 1ff1ed38697ed3b376db5c5157fcec24df67aa91
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 22 23:41:28 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 22 23:45:43 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=1ff1ed38
7
8 gcc-config: create ${CTARGET}-cc symlink
9
10 We need this because configure scripts may look for ${CTARGET}-cc first,
11 and while this wasn't a problem in the past, LLVM installs fallback
12 symlinks in /usr/lib/llvm/${SLOT}/bin for the benefit of llvm-only profiles,
13 and configure has started finding these rather than falling back to say,
14 ${CTARGET}-gcc like it has been all this time.
15
16 Bug: https://bugs.gentoo.org/870577
17 Bug: https://bugs.gentoo.org/872416
18 Signed-off-by: Sam James <sam <AT> gentoo.org>
19
20 gcc-config | 9 ++++++++-
21 1 file changed, 8 insertions(+), 1 deletion(-)
22
23 diff --git a/gcc-config b/gcc-config
24 index 65a7ceb..512c41c 100755
25 --- a/gcc-config
26 +++ b/gcc-config
27 @@ -332,9 +332,16 @@ update_wrappers() {
28 rm -f "${EROOT}usr/bin/${x}"
29 fi
30 done
31 - # legacy cruft, make sure we dont leave it laying around #143205
32 +
33 + # Legacy cruft, make sure we don't leave it laying around, as we used to install
34 + # genuine wrappers like python-exec, bug #143205
35 rm -f "${EROOT}usr/bin/${CTARGET}-cc" "${EROOT}usr/bin"/{${CTARGET}-,}g{cc,++}{32,64}
36
37 + # But create our own ${CTARGET}-cc in /usr/bin to avoid fallbacks
38 + # to the symlinks LLVM creates (sys-devel/clang-toolchain-symlinks).
39 + # bug #872416.
40 + atomic_ln "${EROOT}usr/bin/${CTARGET}-gcc" "${EROOT}usr/bin" "${CTARGET}-cc"
41 +
42 # handle the canonical cpp wrapper
43 if ! is_cross_compiler ; then
44 if [[ ${USE_NATIVE_LINKS} == yes ]]; then