1 |
commit: 28053845221891a39248b91a0f45781d4414e8c9 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 3 03:22:28 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 3 03:22:32 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28053845 |
7 |
|
8 |
toolchain.eclass: only force Bash for < GCC 11 |
9 |
|
10 |
Chosen < 11 just because it's a reasonable enough place to drop, I suspect they're |
11 |
fine though. |
12 |
|
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
eclass/toolchain.eclass | 13 +++++++++---- |
16 |
1 file changed, 9 insertions(+), 4 deletions(-) |
17 |
|
18 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
19 |
index 8200bc2304b6..eadaa0d83205 100644 |
20 |
--- a/eclass/toolchain.eclass |
21 |
+++ b/eclass/toolchain.eclass |
22 |
@@ -1425,12 +1425,19 @@ toolchain_src_configure() { |
23 |
# ...and now to do the actual configuration |
24 |
addwrite /dev/zero |
25 |
|
26 |
+ local gcc_shell="${BROOT}"/bin/bash |
27 |
+ # Older gcc versions did not detect bash and re-exec itself, so force the |
28 |
+ # use of bash for them. |
29 |
+ if tc_version_is_at_least 11.2 ; then |
30 |
+ gcc_shell="${BROOT}"/bin/sh |
31 |
+ fi |
32 |
+ |
33 |
if is_jit ; then |
34 |
einfo "Configuring JIT gcc" |
35 |
|
36 |
mkdir -p "${WORKDIR}"/build-jit || die |
37 |
pushd "${WORKDIR}"/build-jit > /dev/null || die |
38 |
- CONFIG_SHELL="${BROOT}"/bin/bash edo "${BROOT}"/bin/bash "${S}"/configure \ |
39 |
+ CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure \ |
40 |
"${confgcc[@]}" \ |
41 |
--disable-libada \ |
42 |
--disable-libsanitizer \ |
43 |
@@ -1445,9 +1452,7 @@ toolchain_src_configure() { |
44 |
popd > /dev/null || die |
45 |
fi |
46 |
|
47 |
- # Older gcc versions did not detect bash and re-exec itself, so force the |
48 |
- # use of bash. Newer ones will auto-detect, but this is not harmful. |
49 |
- CONFIG_SHELL="${BROOT}"/bin/bash edo "${BROOT}"/bin/bash "${S}"/configure "${confgcc[@]}" |
50 |
+ CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure "${confgcc[@]}" |
51 |
|
52 |
# Return to whatever directory we were in before |
53 |
popd > /dev/null || die |