* [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, bug #725304
@ 2020-05-25 13:06 Sergei Trofimovich
2020-05-25 13:06 ` [gentoo-dev] [PATCH 2/2] multilib.eclass: populate READELF, " Sergei Trofimovich
2020-05-25 15:30 ` [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, " Mike Gilbert
0 siblings, 2 replies; 4+ messages in thread
From: Sergei Trofimovich @ 2020-05-25 13:06 UTC (permalink / raw
To: gentoo-dev; +Cc: Sergei Trofimovich
Bug: https://bugs.gentoo.org/725304
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
eclass/toolchain-funcs.eclass | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 1bc6cbbc108..709c3baca53 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -85,6 +85,10 @@ tc-getNM() { tc-getPROG NM nm "$@"; }
# @USAGE: [toolchain prefix]
# @RETURN: name of the archiver indexer
tc-getRANLIB() { tc-getPROG RANLIB ranlib "$@"; }
+# @FUNCTION: tc-getREADELF
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the ELF enspector
+tc-getREADELF() { tc-getPROG READELF readelf "$@"; }
# @FUNCTION: tc-getOBJCOPY
# @USAGE: [toolchain prefix]
# @RETURN: name of the object copier
@@ -158,6 +162,10 @@ tc-getBUILD_NM() { tc-getBUILD_PROG NM nm "$@"; }
# @USAGE: [toolchain prefix]
# @RETURN: name of the archiver indexer for building binaries to run on the build machine
tc-getBUILD_RANLIB() { tc-getBUILD_PROG RANLIB ranlib "$@"; }
+# @FUNCTION: tc-getBUILD_READELF
+# @USAGE: [toolchain prefix]
+# @RETURN: name of the ELF enspector for building binaries to run on the build machine
+tc-getBUILD_READELF() { tc-getBUILD_PROG READELF readelf "$@"; }
# @FUNCTION: tc-getBUILD_OBJCOPY
# @USAGE: [toolchain prefix]
# @RETURN: name of the object copier for building binaries to run on the build machine
@@ -376,6 +384,7 @@ tc-env_build() {
NM=$(tc-getBUILD_NM) \
PKG_CONFIG=$(tc-getBUILD_PKG_CONFIG) \
RANLIB=$(tc-getBUILD_RANLIB) \
+ READELF=$(tc-getBUILD_READELF) \
"$@"
}
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-dev] [PATCH 2/2] multilib.eclass: populate READELF, bug #725304
2020-05-25 13:06 [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, bug #725304 Sergei Trofimovich
@ 2020-05-25 13:06 ` Sergei Trofimovich
2020-05-25 15:30 ` [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, " Mike Gilbert
1 sibling, 0 replies; 4+ messages in thread
From: Sergei Trofimovich @ 2020-05-25 13:06 UTC (permalink / raw
To: gentoo-dev; +Cc: Sergei Trofimovich
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-readelf' and 'readelf'.
meson build system uses 'readelf' or $READELF binaries
and relies on meson.eclass to populate READELF.
The change overrides READELF and friends to 'x86_64-pc-linux-gnu-readelf'
for multilib setup similar to other environment variables.
Tested on net-libs/gssdp package.
Closes: https://bugs.gentoo.org/725304
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 b79718bb193..ed54568aa2d 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -468,6 +468,7 @@ multilib_toolchain_setup() {
NM
OBJDUMP
RANLIB
+ READELF
STRIP
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
@@ -510,6 +511,7 @@ multilib_toolchain_setup() {
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 READELF="$(tc-getREADELF)" # Avoid 'readelf', use '${CHOST}-readelf'
export STRIP="$(tc-getSTRIP)" # Avoid 'strip', use '${CHOST}-strip'
export CHOST=$(get_abi_CHOST $1)
export PKG_CONFIG_LIBDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, bug #725304
2020-05-25 13:06 [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, bug #725304 Sergei Trofimovich
2020-05-25 13:06 ` [gentoo-dev] [PATCH 2/2] multilib.eclass: populate READELF, " Sergei Trofimovich
@ 2020-05-25 15:30 ` Mike Gilbert
2020-05-25 20:48 ` Sergei Trofimovich
1 sibling, 1 reply; 4+ messages in thread
From: Mike Gilbert @ 2020-05-25 15:30 UTC (permalink / raw
To: Gentoo Dev; +Cc: Sergei Trofimovich
On Mon, May 25, 2020 at 9:06 AM Sergei Trofimovich <slyfox@gentoo.org> wrote:
>
> Bug: https://bugs.gentoo.org/725304
> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Both patches look good to me.
However, I think you should remove the bug number from the summary
line; it makes the summary too long and the Bug tag later in the
commit message is sufficient.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, bug #725304
2020-05-25 15:30 ` [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, " Mike Gilbert
@ 2020-05-25 20:48 ` Sergei Trofimovich
0 siblings, 0 replies; 4+ messages in thread
From: Sergei Trofimovich @ 2020-05-25 20:48 UTC (permalink / raw
To: Mike Gilbert; +Cc: Gentoo Dev
On Mon, 25 May 2020 11:30:29 -0400
Mike Gilbert <floppym@gentoo.org> wrote:
> On Mon, May 25, 2020 at 9:06 AM Sergei Trofimovich <slyfox@gentoo.org> wrote:
> >
> > Bug: https://bugs.gentoo.org/725304
> > Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
>
> Both patches look good to me.
>
> However, I think you should remove the bug number from the summary
> line; it makes the summary too long and the Bug tag later in the
> commit message is sufficient.
Sounds good! Dropped bug number and pushed as:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ccdea417c4a259a03a745e3a977ac56827be5ae4
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bd13f6d55a51f2a1f4da69a41df7973fa7503cc
--
Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-25 20:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-25 13:06 [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, bug #725304 Sergei Trofimovich
2020-05-25 13:06 ` [gentoo-dev] [PATCH 2/2] multilib.eclass: populate READELF, " Sergei Trofimovich
2020-05-25 15:30 ` [gentoo-dev] [PATCH 1/2] toolchain-funcs.eclass: export tc-get*READELF helpers, " Mike Gilbert
2020-05-25 20:48 ` Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox