summaryrefslogtreecommitdiffstats
path: root/patches/glibc-2.8/generic/configure_in-sane_readelf.diff
blob: ee7a727b8db66aa584a84f42a2842654181f475c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
 configure.in |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: glibc-2.8-20080811/configure.in
===================================================================
--- glibc-2.8-20080811.orig/configure.in
+++ glibc-2.8-20080811/configure.in
@@ -1354,6 +1354,8 @@ EOF
     fi
   fi
 
+  AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
+
   AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
 		 libc_cv_initfini_array, [dnl
   cat > conftest.c <<EOF
@@ -1365,7 +1367,7 @@ EOF
   if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
 		     -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
   then
-    if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
+    if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
       libc_cv_initfini_array=yes
     else
       libc_cv_initfini_array=no
@@ -1550,7 +1552,7 @@ dnl cross-platform since the gcc used ca
 dnl introducing new options this is not easily doable.  Instead use a tool
 dnl which always is cross-platform: readelf.  To detect whether -z combreloc
 dnl look for a section named .rel.dyn.
-    if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+    if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
       libc_cv_z_combreloc=yes
     else
       libc_cv_z_combreloc=no