commit: 28053845221891a39248b91a0f45781d4414e8c9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 3 03:22:28 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 3 03:22:32 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28053845
toolchain.eclass: only force Bash for < GCC 11
Chosen < 11 just because it's a reasonable enough place to drop, I suspect
they're
fine though.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 8200bc2304b6..eadaa0d83205 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1425,12 +1425,19 @@ toolchain_src_configure() {
# ...and now to do the actual configuration
addwrite /dev/zero
+ local gcc_shell="${BROOT}"/bin/bash
+ # Older gcc versions did not detect bash and re-exec itself, so force
the
+ # use of bash for them.
+ if tc_version_is_at_least 11.2 ; then
+ gcc_shell="${BROOT}"/bin/sh
+ fi
+
if is_jit ; then
einfo "Configuring JIT gcc"
mkdir -p "${WORKDIR}"/build-jit || die
pushd "${WORKDIR}"/build-jit > /dev/null || die
- CONFIG_SHELL="${BROOT}"/bin/bash edo "${BROOT}"/bin/bash
"${S}"/configure \
+ CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure
\
"${confgcc[@]}" \
--disable-libada \
--disable-libsanitizer \
@@ -1445,9 +1452,7 @@ toolchain_src_configure() {
popd > /dev/null || die
fi
- # 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.
- CONFIG_SHELL="${BROOT}"/bin/bash edo "${BROOT}"/bin/bash
"${S}"/configure "${confgcc[@]}"
+ CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure
"${confgcc[@]}"
# Return to whatever directory we were in before
popd > /dev/null || die