1 |
commit: add23a64e7eb4d27bed13f10228721270b83a37f |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 30 12:08:22 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 30 12:13:46 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=add23a64 |
7 |
|
8 |
toolchain.eclass: pass CONFIG_SHELL to emake, bug #664486 |
9 |
|
10 |
Christian reports 'make install' failure caused by limitation |
11 |
of ancient autotools in detecting CONFIG_SHELL: |
12 |
|
13 |
``` |
14 |
/bin/bash .../gcc-3.3.6/libstdc++-v3/../mkinstalldirs \ |
15 |
.../gcc-3.3.6-r2/image//usr/lib/../lib32 |
16 |
/bin/bash ../libtool --mode=install /bin/bash .../gcc-3.3.6/install-sh \ |
17 |
-c libsupc++.la .../gcc-3.3.6-r2/image//usr/lib/../lib32/libsupc++.la |
18 |
libtool: install: `.../gcc-3.3.6-r2/image//usr/lib/../lib32/libsupc++.la' \ |
19 |
is not a directory |
20 |
``` |
21 |
|
22 |
We already pass CONFIG_SHELL to top-level ./configure. |
23 |
The workaround is to pass CONFIG_SHELL variable to 'make' as well. |
24 |
|
25 |
Reported-by: Christian Schmidt |
26 |
Fixed-by: Christian Schmidt |
27 |
Bug: https://bugs.gentoo.org/664486 |
28 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
29 |
|
30 |
eclass/toolchain.eclass | 7 ++++++- |
31 |
1 file changed, 6 insertions(+), 1 deletion(-) |
32 |
|
33 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
34 |
index ef0d7ab1f99..e2629d40393 100644 |
35 |
--- a/eclass/toolchain.eclass |
36 |
+++ b/eclass/toolchain.eclass |
37 |
@@ -1350,7 +1350,7 @@ toolchain_src_configure() { |
38 |
addwrite /dev/zero |
39 |
echo "${S}"/configure "${confgcc[@]}" |
40 |
# Older gcc versions did not detect bash and re-exec itself, so force the |
41 |
- # use of bash. Newer ones will auto-detect, but this is not harmeful. |
42 |
+ # use of bash. Newer ones will auto-detect, but this is not harmful. |
43 |
CONFIG_SHELL="${EPREFIX}/bin/bash" \ |
44 |
bash "${S}"/configure "${confgcc[@]}" || die "failed to run configure" |
45 |
|
46 |
@@ -1625,6 +1625,11 @@ toolchain_src_compile() { |
47 |
[[ ! -x /usr/bin/perl ]] \ |
48 |
&& find "${WORKDIR}"/build -name '*.[17]' -exec touch {} + |
49 |
|
50 |
+ # Older gcc versions did not detect bash and re-exec itself, so force the |
51 |
+ # use of bash. Newer ones will auto-detect, but this is not harmful. |
52 |
+ # This needs to be set for compile as well, as it's used in libtool |
53 |
+ # generation, which will break install otherwise (at least in 3.3.6): #664486 |
54 |
+ CONFIG_SHELL="${EPREFIX}/bin/bash" \ |
55 |
gcc_do_make ${GCC_MAKE_TARGET} |
56 |
} |