commit: add23a64e7eb4d27bed13f10228721270b83a37f Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Sun Sep 30 12:08:22 2018 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Sun Sep 30 12:13:46 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=add23a64
toolchain.eclass: pass CONFIG_SHELL to emake, bug #664486 Christian reports 'make install' failure caused by limitation of ancient autotools in detecting CONFIG_SHELL: ``` /bin/bash .../gcc-3.3.6/libstdc++-v3/../mkinstalldirs \ .../gcc-3.3.6-r2/image//usr/lib/../lib32 /bin/bash ../libtool --mode=install /bin/bash .../gcc-3.3.6/install-sh \ -c libsupc++.la .../gcc-3.3.6-r2/image//usr/lib/../lib32/libsupc++.la libtool: install: `.../gcc-3.3.6-r2/image//usr/lib/../lib32/libsupc++.la' \ is not a directory ``` We already pass CONFIG_SHELL to top-level ./configure. The workaround is to pass CONFIG_SHELL variable to 'make' as well. Reported-by: Christian Schmidt Fixed-by: Christian Schmidt Bug: https://bugs.gentoo.org/664486 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> eclass/toolchain.eclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index ef0d7ab1f99..e2629d40393 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1350,7 +1350,7 @@ toolchain_src_configure() { addwrite /dev/zero echo "${S}"/configure "${confgcc[@]}" # 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 harmeful. + # use of bash. Newer ones will auto-detect, but this is not harmful. CONFIG_SHELL="${EPREFIX}/bin/bash" \ bash "${S}"/configure "${confgcc[@]}" || die "failed to run configure" @@ -1625,6 +1625,11 @@ toolchain_src_compile() { [[ ! -x /usr/bin/perl ]] \ && find "${WORKDIR}"/build -name '*.[17]' -exec touch {} + + # 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. + # 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): #664486 + CONFIG_SHELL="${EPREFIX}/bin/bash" \ gcc_do_make ${GCC_MAKE_TARGET} }