summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-05-22 23:36:50 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-05-23 09:17:14 +0100
commitdd35b529194fdcadf324fd4f0a466a61aa1dfadb (patch)
treebca3088cecef81b0fc92a54e4dc1cac8af329812
parentdev-ruby/faraday_middleware: remove duplicate description (diff)
downloadgentoo-dd35b529194fdcadf324fd4f0a466a61aa1dfadb.tar.gz
gentoo-dd35b529194fdcadf324fd4f0a466a61aa1dfadb.tar.bz2
gentoo-dd35b529194fdcadf324fd4f0a466a61aa1dfadb.zip
multilib.eclass: populate AR, NM, RANLIB, OBJDUMP, STRIP, bug #724558
For both multilib and non-multilib profiles binutils provides tools with native CHOST prefix only. For example on amd64 there is only 'x86_64-pc-linux-gnu-nm' and 'nm'. On abi_x86_32 tools are usually configured with --host=i686-pc-linux-gnu. Configure tries i686-pc-linux-gnu-nm, then falls back to 'nm'. The change overrides NM and friends to 'x86_64-pc-linux-gnu-nm' for multilib setup similar to other environment variables. Reported-by: Kent Fredric Closes: https://bugs.gentoo.org/724558 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--eclass/multilib.eclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index bbaab709b4f..acfb78deab1 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -484,11 +484,16 @@ multilib_toolchain_setup() {
# Set the CHOST native first so that we pick up the native
# toolchain and not a cross-compiler by accident #202811.
export CHOST=$(get_abi_CHOST ${DEFAULT_ABI})
+ export AR="$(tc-getAR)" # Avoid 'ar', use '${CHOST}-ar'
export CC="$(tc-getCC) $(get_abi_CFLAGS)"
export CXX="$(tc-getCXX) $(get_abi_CFLAGS)"
export F77="$(tc-getF77) $(get_abi_CFLAGS)"
export FC="$(tc-getFC) $(get_abi_CFLAGS)"
export LD="$(tc-getLD) $(get_abi_LDFLAGS)"
+ export NM="$(tc-getNM)" # Avoid 'nm', use '${CHOST}-nm'
+ export OBJDUMP="$(tc-getOBJDUMP)" # Avoid 'objdump', use '${CHOST}-objdump'
+ export RANLIB="$(tc-getRANLIB)" # Avoid 'ranlib', use '${CHOST}-ranlib'
+ export STRIP="$(tc-getSTRIP)" # Avoid 'strip', use '${CHOST}-strip'
export CHOST=$(get_abi_CHOST $1)
export PKG_CONFIG_LIBDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig
export PKG_CONFIG_PATH=${EPREFIX}/usr/share/pkgconfig