From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id C3FBE3855024 for ; Sun, 1 Aug 2021 21:30:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C3FBE3855024 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x0b.wildebeest.org [172.31.17.141]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id C367730291A9; Sun, 1 Aug 2021 23:30:05 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id E70C92E80D59; Sun, 1 Aug 2021 23:30:04 +0200 (CEST) Date: Sun, 1 Aug 2021 23:30:04 +0200 From: Mark Wielaard To: Sergei Trofimovich Cc: debugedit@sourceware.org Subject: Re: [PATCH] use $READELF, not readelf Message-ID: References: <20210801201535.3170290-1-slyfox@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210801201535.3170290-1-slyfox@gentoo.org> X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: debugedit@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: debugedit development mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2021 21:30:09 -0000 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