commit: 1ff1ed38697ed3b376db5c5157fcec24df67aa91
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 22 23:41:28 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 23:45:43 2022 +0000
URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=1ff1ed38
gcc-config: create ${CTARGET}-cc symlink
We need this because configure scripts may look for ${CTARGET}-cc first,
and while this wasn't a problem in the past, LLVM installs fallback
symlinks in /usr/lib/llvm/${SLOT}/bin for the benefit of llvm-only profiles,
and configure has started finding these rather than falling back to say,
${CTARGET}-gcc like it has been all this time.
Bug: https://bugs.gentoo.org/870577
Bug: https://bugs.gentoo.org/872416
Signed-off-by: Sam James <sam <AT> gentoo.org>
gcc-config | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gcc-config b/gcc-config
index 65a7ceb..512c41c 100755
--- a/gcc-config
+++ b/gcc-config
@@ -332,9 +332,16 @@ update_wrappers() {
rm -f "${EROOT}usr/bin/${x}"
fi
done
- # legacy cruft, make sure we dont leave it laying around #143205
+
+ # Legacy cruft, make sure we don't leave it laying around, as we used
to install
+ # genuine wrappers like python-exec, bug #143205
rm -f "${EROOT}usr/bin/${CTARGET}-cc"
"${EROOT}usr/bin"/{${CTARGET}-,}g{cc,++}{32,64}
+ # But create our own ${CTARGET}-cc in /usr/bin to avoid fallbacks
+ # to the symlinks LLVM creates (sys-devel/clang-toolchain-symlinks).
+ # bug #872416.
+ atomic_ln "${EROOT}usr/bin/${CTARGET}-gcc" "${EROOT}usr/bin"
"${CTARGET}-cc"
+
# handle the canonical cpp wrapper
if ! is_cross_compiler ; then
if [[ ${USE_NATIVE_LINKS} == yes ]]; then