summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-03 04:22:28 +0100
committerSam James <sam@gentoo.org>2022-06-03 04:22:32 +0100
commit28053845221891a39248b91a0f45781d4414e8c9 (patch)
tree9f268fb930ebda834a3bcfeab034b76d93396567
parentsci-mathematics/petsc: fix configuration with USE=mumps (diff)
downloadgentoo-28053845221891a39248b91a0f45781d4414e8c9.tar.gz
gentoo-28053845221891a39248b91a0f45781d4414e8c9.tar.bz2
gentoo-28053845221891a39248b91a0f45781d4414e8c9.zip
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@gentoo.org>
-rw-r--r--eclass/toolchain.eclass13
1 files 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