* [PATCH] elfutils/configure.ac: use $READELF, not readelf
@ 2020-06-14 19:28 Sergei Trofimovich
2020-06-15 9:15 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Trofimovich @ 2020-06-14 19:28 UTC (permalink / raw)
To: elfutils-devel; +Cc: Mark Wielaard, Sergei Trofimovich
Allow user to specify own readelf. Use detected readelf,
not 'readelf'.
Noticed when was building elfutils on tuple-prefixed toolchain:
```
checking whether the compiler generates build-ids...
./configure: line 5197: readelf: command not found
no
```
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 74cc749d..8d3bcb7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,7 +200,7 @@ fi
# We really want build-ids. Warn and force generating them if gcc was
# configure without --enable-linker-build-id
AC_CACHE_CHECK([whether the compiler generates build-ids], ac_cv_buildid, [dnl
-AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; readelf -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
+AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))])
if test "$ac_cv_buildid" = "no"; then
AC_MSG_WARN([compiler doesn't generate build-id by default])
LDFLAGS="$LDFLAGS -Wl,--build-id"
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] elfutils/configure.ac: use $READELF, not readelf
2020-06-14 19:28 [PATCH] elfutils/configure.ac: use $READELF, not readelf Sergei Trofimovich
@ 2020-06-15 9:15 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2020-06-15 9:15 UTC (permalink / raw)
To: Sergei Trofimovich, elfutils-devel
Hi Sergei,
On Sun, 2020-06-14 at 20:28 +0100, Sergei Trofimovich wrote:
> Allow user to specify own readelf. Use detected readelf,
> not 'readelf'.
You are absolutely right. We have an explicit AC_CHECK_TOOL for
readelf, so we should use the result whenever we use READELF.
Added ChangeLog entry and pushed to master.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-15 9:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 19:28 [PATCH] elfutils/configure.ac: use $READELF, not readelf Sergei Trofimovich
2020-06-15 9:15 ` Mark Wielaard
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).