1 |
commit: dd35b529194fdcadf324fd4f0a466a61aa1dfadb |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 22 22:36:50 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 23 08:17:14 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd35b529 |
7 |
|
8 |
multilib.eclass: populate AR, NM, RANLIB, OBJDUMP, STRIP, bug #724558 |
9 |
|
10 |
For both multilib and non-multilib profiles binutils provides |
11 |
tools with native CHOST prefix only. For example on amd64 there |
12 |
is only 'x86_64-pc-linux-gnu-nm' and 'nm'. |
13 |
|
14 |
On abi_x86_32 tools are usually configured with --host=i686-pc-linux-gnu. |
15 |
Configure tries i686-pc-linux-gnu-nm, then falls back to 'nm'. |
16 |
|
17 |
The change overrides NM and friends to 'x86_64-pc-linux-gnu-nm' for |
18 |
multilib setup similar to other environment variables. |
19 |
|
20 |
Reported-by: Kent Fredric |
21 |
Closes: https://bugs.gentoo.org/724558 |
22 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
23 |
|
24 |
eclass/multilib.eclass | 5 +++++ |
25 |
1 file changed, 5 insertions(+) |
26 |
|
27 |
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass |
28 |
index bbaab709b4f..acfb78deab1 100644 |
29 |
--- a/eclass/multilib.eclass |
30 |
+++ b/eclass/multilib.eclass |
31 |
@@ -484,11 +484,16 @@ multilib_toolchain_setup() { |
32 |
# Set the CHOST native first so that we pick up the native |
33 |
# toolchain and not a cross-compiler by accident #202811. |
34 |
export CHOST=$(get_abi_CHOST ${DEFAULT_ABI}) |
35 |
+ export AR="$(tc-getAR)" # Avoid 'ar', use '${CHOST}-ar' |
36 |
export CC="$(tc-getCC) $(get_abi_CFLAGS)" |
37 |
export CXX="$(tc-getCXX) $(get_abi_CFLAGS)" |
38 |
export F77="$(tc-getF77) $(get_abi_CFLAGS)" |
39 |
export FC="$(tc-getFC) $(get_abi_CFLAGS)" |
40 |
export LD="$(tc-getLD) $(get_abi_LDFLAGS)" |
41 |
+ export NM="$(tc-getNM)" # Avoid 'nm', use '${CHOST}-nm' |
42 |
+ export OBJDUMP="$(tc-getOBJDUMP)" # Avoid 'objdump', use '${CHOST}-objdump' |
43 |
+ export RANLIB="$(tc-getRANLIB)" # Avoid 'ranlib', use '${CHOST}-ranlib' |
44 |
+ export STRIP="$(tc-getSTRIP)" # Avoid 'strip', use '${CHOST}-strip' |
45 |
export CHOST=$(get_abi_CHOST $1) |
46 |
export PKG_CONFIG_LIBDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig |
47 |
export PKG_CONFIG_PATH=${EPREFIX}/usr/share/pkgconfig |