diff options
author | Michael Forney <mforney@mforney.org> | 2013-11-01 00:51:04 -0700 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2013-11-05 17:07:10 +0100 |
commit | a45c8043358151085633b15ea615f31f3bd680f7 (patch) | |
tree | d02e1dc4190e4eda3d79001c33a1743f1ed3c784 | |
parent | be86084bd77f5729138577291baad6b29fb44984 (diff) | |
download | elfutils-a45c8043358151085633b15ea615f31f3bd680f7.tar.gz |
Check for prefixed ar, readelf, and nm
Sometimes with cross-compile toolchains, the tools are prefixed with the
target arch. Using AC_CHECK_TOOL looks for tools named like this.
Signed-off-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | config/ChangeLog | 4 | ||||
-rw-r--r-- | config/eu.am | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | libasm/Makefile.am | 2 | ||||
-rw-r--r-- | libdw/ChangeLog | 4 | ||||
-rw-r--r-- | libdw/Makefile.am | 2 | ||||
-rw-r--r-- | libelf/ChangeLog | 4 | ||||
-rw-r--r-- | libelf/Makefile.am | 2 | ||||
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rwxr-xr-x | tests/run-arsymtest.sh | 2 |
12 files changed, 34 insertions, 7 deletions
@@ -1,3 +1,7 @@ +2013-11-01 Michael Forney <mforney@mforney.org> + + * configure.ac: Call AM_PROG_AR and AC_CHECK_TOOL for readelf and nm. + 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com> * NEWS (Version 0.158): New. diff --git a/config/ChangeLog b/config/ChangeLog index 3b1877d7..98bf86fb 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2013-11-01 Michael Forney <mforney@mforney.org> + + * eu.am: Use READELF. + 2013-09-30 Mark Wielaard <mjw@redhat.com> * elfutils.spec.in: Update for readelf NT_SIGINFO and NT_FILE diff --git a/config/eu.am b/config/eu.am index 86e5a4e9..38718c7f 100644 --- a/config/eu.am +++ b/config/eu.am @@ -61,4 +61,4 @@ endif CLEANFILES = *.gcno *.gcda -textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi +textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi diff --git a/configure.ac b/configure.ac index b4c249c3..ee2ce263 100644 --- a/configure.ac +++ b/configure.ac @@ -79,6 +79,10 @@ AC_PROG_CC AC_PROG_RANLIB AC_PROG_YACC AM_PROG_LEX +# Only available since automake 1.12 +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) +AC_CHECK_TOOL([READELF], [readelf]) +AC_CHECK_TOOL([NM], [nm]) AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl old_CFLAGS="$CFLAGS" diff --git a/libasm/Makefile.am b/libasm/Makefile.am index e16d4be0..4d81536b 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -69,7 +69,7 @@ libasm.so: libasm_pic.a libasm.map -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \ -Wl,--soname,$@.$(VERSION) \ ../libebl/libebl.a ../libelf/libelf.so $(libasm_so_LDLIBS) - if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) install: install-am libasm.so diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 3fa6c0ef..7a768fca 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,7 @@ +2013-11-01 Michael Forney <mforney@mforney.org> + + * Makefile.am: Use READELF. + 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com> * libdw.map (ELFUTILS_0.158): New. diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 5fef2e18..bf945608 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -113,7 +113,7 @@ libdw.so: $(srcdir)/libdw.map libdw_pic.a \ -Wl,--version-script,$<,--no-undefined \ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ -ldl $(zip_LIBS) - if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) install: install-am libdw.so diff --git a/libelf/ChangeLog b/libelf/ChangeLog index d9d64218..c2c5fc42 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2013-11-01 Michael Forney <mforney@mforney.org> + + * Makefile.am: Use READELF. + 2013-10-01 Petr Machata <pmachata@redhat.com> * elf.h: Update from glibc. diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 5903ea86..4646fbae 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -106,7 +106,7 @@ libelf.so: libelf_pic.a libelf.map $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \ -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS) - if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) install: install-am libelf.so diff --git a/tests/ChangeLog b/tests/ChangeLog index c549fa0b..5ebc1bd4 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2013-11-01 Michael Forney <mforney@mforney.org> + + * Makefile.am (TESTS_ENVIRONMENT): Use and export NM. + * run-arsymtest.sh: Use NM. + 2013-11-05 Mark Wielaard <mjw@redhat.com> * allfcts.c (main): Correct dwarf_getfuncs return value check. diff --git a/tests/Makefile.am b/tests/Makefile.am index d07cb0b0..bc97523b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -231,7 +231,8 @@ installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \ export abs_srcdir; export abs_builddir; \ export abs_top_builddir; \ export libdir; export bindir; \ - export LC_ALL; export LANG; export VALGRIND_CMD; + export LC_ALL; export LANG; export VALGRIND_CMD; \ + NM=$(NM); export NM; installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \ installed $(tests_rpath) \ '$(program_transform_name)' @@ -244,7 +245,8 @@ TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \ abs_top_builddir=$(abs_top_builddir); \ export abs_srcdir; export abs_builddir; \ export abs_top_builddir; \ - export LC_ALL; export LANG; export VALGRIND_CMD; + export LC_ALL; export LANG; export VALGRIND_CMD; \ + NM=$(NM); export NM; LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \ $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm diff --git a/tests/run-arsymtest.sh b/tests/run-arsymtest.sh index dc016e1f..b0fdfcd6 100755 --- a/tests/run-arsymtest.sh +++ b/tests/run-arsymtest.sh @@ -28,7 +28,7 @@ tempfiles $okfile $tmpfile $testfile result=77 if test -f $lib; then # Generate list using `nm' we check against. - nm -s $lib | + ${NM} -s $lib | sed -e '1,/^Arch/d' -e '/^$/,$d' | sort > $okfile |