Gentoo Archives: gentoo-dev

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-dev@l.g.o
Cc: Sergei Trofimovich <slyfox@g.o>
Subject: [gentoo-dev] [PATCH 2/2] multilib.eclass: populate STRINGS
Date: Sun, 14 Jun 2020 08:38:19
Message-Id: 20200614083744.3710150-2-slyfox@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*STRINGS helpers by Sergei Trofimovich
1 For both multilib and non-multilib profiles binutils provides
2 tools with native CHOST prefix only. For example on amd64 there
3 is only 'x86_64-pc-linux-gnu-strings' and 'strings'.
4
5 autoconf usually uses AC_CHECK_TOOL(STRINGS, strings) autodetection
6 to discover either of these.
7
8 The change overrides STRINGS and friends to 'x86_64-pc-linux-gnu-strings'
9 for multilib setup similar to other environment variables.
10
11 Tested on media-libs/x264 and x11-libs/cairo packages.
12
13 Signed-off-by: Sergei Trofimovich <slyfox@g.o>
14 ---
15 eclass/multilib.eclass | 4 ++++
16 1 file changed, 4 insertions(+)
17
18 diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
19 index 54ff1509ead..342d21a2e1c 100644
20 --- a/eclass/multilib.eclass
21 +++ b/eclass/multilib.eclass
22 @@ -470,6 +470,7 @@ multilib_toolchain_setup() {
23 PKG_CONFIG
24 RANLIB
25 READELF
26 + STRINGS
27 STRIP
28 PKG_CONFIG_LIBDIR
29 PKG_CONFIG_PATH
30 @@ -504,6 +505,7 @@ multilib_toolchain_setup() {
31 #
32 # Make sure ${save_restore_variables[@]} list matches below.
33 export CHOST=$(get_abi_CHOST ${DEFAULT_ABI})
34 +
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 @@ -515,7 +517,9 @@ multilib_toolchain_setup() {
39 export PKG_CONFIG="$(tc-getPKG_CONFIG)"
40 export RANLIB="$(tc-getRANLIB)" # Avoid 'ranlib', use '${CHOST}-ranlib'
41 export READELF="$(tc-getREADELF)" # Avoid 'readelf', use '${CHOST}-readelf'
42 + export STRINGS="$(tc-getSTRINGS)" # Avoid 'strings', use '${CHOST}-strings'
43 export STRIP="$(tc-getSTRIP)" # Avoid 'strip', use '${CHOST}-strip'
44 +
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
48 --
49 2.27.0