summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-06 08:45:00 +0100
committerSam James <sam@gentoo.org>2022-06-07 00:18:06 +0100
commit24b15b53b9a98f61cdd83a20eaab78a5381f73dc (patch)
tree609ba47aa75aedaf6e526ff805b643b29fd5c140 /eclass/toolchain.eclass
parenttoolchain.eclass: style cleanups, missing dies (diff)
downloadgentoo-24b15b53b9a98f61cdd83a20eaab78a5381f73dc.tar.gz
gentoo-24b15b53b9a98f61cdd83a20eaab78a5381f73dc.tar.bz2
gentoo-24b15b53b9a98f61cdd83a20eaab78a5381f73dc.zip
toolchain.eclass: don't force bash in src_compile
See: 28053845221891a39248b91a0f45781d4414e8c9 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ea1e8f556520..164bb1b16190 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1731,10 +1731,15 @@ toolchain_src_compile() {
unset ADAFLAGS
# Older gcc versions did not detect bash and re-exec itself, so force the
- # use of bash. Newer ones will auto-detect, but this is not harmful.
+ # use of bash for them.
# This needs to be set for compile as well, as it's used in libtool
# generation, which will break install otherwise (at least in 3.3.6): bug #664486
- CONFIG_SHELL="${BROOT}/bin/bash" \
+ local gcc_shell="${BROOT}"/bin/bash
+ if tc_version_is_at_least 11.2 ; then
+ gcc_shell="${BROOT}"/bin/sh
+ fi
+
+ CONFIG_SHELL="${gcc_shell}" \
gcc_do_make ${GCC_MAKE_TARGET}
}