* [gentoo-dev] [PATCH] multilib.eclass: populate AR and NM in multilib_toolchain_setup(), bug #724558
@ 2020-05-22 22:42 Sergei Trofimovich
2020-05-23 8:19 ` [gentoo-dev] " Sergei Trofimovich
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Trofimovich @ 2020-05-22 22:42 UTC (permalink / raw
To: gentoo-dev; +Cc: Sergei Trofimovich
For both multilib and non-multilib profiles binutils provides
tools with native ABI 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 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>
---
eclass/multilib.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index bbaab709b4f..25e90dea44c 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -484,11 +484,13 @@ 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 CHOST=$(get_abi_CHOST $1)
export PKG_CONFIG_LIBDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig
export PKG_CONFIG_PATH=${EPREFIX}/usr/share/pkgconfig
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-dev] Re: [PATCH] multilib.eclass: populate AR and NM in multilib_toolchain_setup(), bug #724558
2020-05-22 22:42 [gentoo-dev] [PATCH] multilib.eclass: populate AR and NM in multilib_toolchain_setup(), bug #724558 Sergei Trofimovich
@ 2020-05-23 8:19 ` Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2020-05-23 8:19 UTC (permalink / raw
To: gentoo-dev
On Fri, 22 May 2020 23:42:48 +0100
Sergei Trofimovich <slyfox@gentoo.org> wrote:
> For both multilib and non-multilib profiles binutils provides
> tools with native ABI 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 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>
> ---
> eclass/multilib.eclass | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
> index bbaab709b4f..25e90dea44c 100644
> --- a/eclass/multilib.eclass
> +++ b/eclass/multilib.eclass
> @@ -484,11 +484,13 @@ 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 CHOST=$(get_abi_CHOST $1)
> export PKG_CONFIG_LIBDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig
> export PKG_CONFIG_PATH=${EPREFIX}/usr/share/pkgconfig
Also added OBJDUMP, RANLIB and STRIP as they are used in most
libraries used by autotools. Pushed as:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd35b529194fdcadf324fd4f0a466a61aa1dfadb
--
Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-23 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22 22:42 [gentoo-dev] [PATCH] multilib.eclass: populate AR and NM in multilib_toolchain_setup(), bug #724558 Sergei Trofimovich
2020-05-23 8:19 ` [gentoo-dev] " Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox