aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-23 00:41:28 +0100
committerSam James <sam@gentoo.org>2022-09-23 00:45:43 +0100
commit1ff1ed38697ed3b376db5c5157fcec24df67aa91 (patch)
tree81cad78a4a2e80e84f16cf2fc0cb702200551805
parenttests: use sys-apps/gentoo-functions if available (diff)
downloadgcc-config-1ff1ed38697ed3b376db5c5157fcec24df67aa91.tar.gz
gcc-config-1ff1ed38697ed3b376db5c5157fcec24df67aa91.tar.bz2
gcc-config-1ff1ed38697ed3b376db5c5157fcec24df67aa91.zip
gcc-config: create ${CTARGET}-cc symlinkv2.6
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@gentoo.org>
-rwxr-xr-xgcc-config9
1 files changed, 8 insertions, 1 deletions
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