public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@gentoo.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>, Sergei Trofimovich <slyfox@gentoo.org>
Subject: [PATCH] elfutils/configure.ac: use $READELF, not readelf
Date: Sun, 14 Jun 2020 20:28:07 +0100	[thread overview]
Message-ID: <20200614192807.3278156-1-slyfox@gentoo.org> (raw)

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


             reply	other threads:[~2020-06-14 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 19:28 Sergei Trofimovich [this message]
2020-06-15  9:15 ` Mark Wielaard

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=20200614192807.3278156-1-slyfox@gentoo.org \
    --to=slyfox@gentoo.org \
    --cc=elfutils-devel@sourceware.org \
    --cc=mark@klomp.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).