From: Mark Wielaard <mark@klomp.org>
To: Sergei Trofimovich <slyfox@gentoo.org>
Cc: debugedit@sourceware.org
Subject: Re: [PATCH] use $READELF, not readelf
Date: Sun, 1 Aug 2021 23:30:04 +0200 [thread overview]
Message-ID: <YQcSXLfAdTGFDBJR@wildebeest.org> (raw)
In-Reply-To: <20210801201535.3170290-1-slyfox@gentoo.org>
Hi Sergei,
On Sun, Aug 01, 2021 at 09:15:35PM +0100, Sergei Trofimovich wrote:
> Allow user to specify own readelf. Use detected readelf,
> not 'readelf'.
>
> Noticed as a set of test failures on system with only
> $host-prefixed tools:
>
> debugedit/tests/testsuite.dir/at-groups/4/test-source:
> line 40: readelf: command not found
>
> * configure.ac: Add READELF user override.
> * scripts/find-debuginfo.in: Use @READELF@ instead of 'readelf'.
> * tests/atlocal.in: Populate READELF variable detected by configure.
> * tests/debugedit.at: Use $READELF instad of 'readelf' in tests.
Good idea. I applied it with two small fixups.
We really need tests for the find-debuginfo script.
There was a typo in the substution name.
And the scripts use a special Makefile rule to do the substitutions.
diff --git a/Makefile.am b/Makefile.am
index 98b2f20..2060b96 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,7 +32,8 @@ CLEANFILES = $(bin_SCRIPTS)
# Some standard substitutions for scripts
do_subst = ($(SED) -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
- -e 's,[@]VERSION[@],$(VERSION),g')
+ -e 's,[@]VERSION[@],$(VERSION),g' \
+ -e 's,[@]READELF[@],$(READELF),g')
find-debuginfo: $(top_srcdir)/scripts/find-debuginfo.in Makefile
$(do_subst) < "$(top_srcdir)/scripts/$@.in" > "$@"
diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
index 34f62ed..9c0a735 100755
--- a/scripts/find-debuginfo.in
+++ b/scripts/find-debuginfo.in
@@ -338,7 +338,7 @@ add_minidebug()
# symbol and NOBITS sections so cannot use --keep-only because that is
# too aggressive. Field $2 is the section name, $3 is the section type
# and $8 are the section flags.
- local remove_sections=`@REAADELF@ -W -S "$debuginfo" \
+ local remove_sections=`@READELF@ -W -S "$debuginfo" \
| awk '{ if (index($2,".debug_") != 1 \
&& ($3 == "PROGBITS" || $3 == "NOTE" || $3 == "NOBITS") \
&& index($8,"A") == 0) \
Thanks,
Mark
next prev parent reply other threads:[~2021-08-01 21:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-01 20:15 Sergei Trofimovich
2021-08-01 21:30 ` Mark Wielaard [this message]
2021-08-01 23:47 ` Sergei Trofimovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YQcSXLfAdTGFDBJR@wildebeest.org \
--to=mark@klomp.org \
--cc=debugedit@sourceware.org \
--cc=slyfox@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).