commit: 24b15b53b9a98f61cdd83a20eaab78a5381f73dc
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 6 07:45:00 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 6 23:18:06 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24b15b53
toolchain.eclass: don't force bash in src_compile
See: 28053845221891a39248b91a0f45781d4414e8c9
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 9 +++++++--
1 file 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}
}