aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-11-09 18:57:30 +0000
committerDJ Delorie <dj@redhat.com>2011-11-09 18:57:30 +0000
commitb121d7d4e41eebde43ebd368704897b7b1d96d6e (patch)
tree11d275f0009c93132468caf0f6e6bb66c6dd7217
parent0f3ed5491d872aca5cf09f2b6a90689cd382551b (diff)
downloadgdb-b121d7d4e41eebde43ebd368704897b7b1d96d6e.zip
gdb-b121d7d4e41eebde43ebd368704897b7b1d96d6e.tar.gz
gdb-b121d7d4e41eebde43ebd368704897b7b1d96d6e.tar.bz2
2011-11-09 Roland McGrath <mcgrathr@google.com>
* configure.ac: Add tool checks for READELF and READELF_FOR_TARGET. * configure: Rebuild. * Makefile.def (flags_to_pass): Add READELF_FOR_TARGET. * Makefile.tpl (READELF, READELF_FOR_TARGET): New variables. (HOST_EXPORTS): Add READELF, READELF_FOR_TARGET. (BASE_FLAGS_TO_PASS): Add READELF_FOR_TARGET. (BASE_TARGET_EXPORTS, EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS): Add READELF. * Makefile.in: Rebuild.
-rw-r--r--ChangeLog12
-rw-r--r--Makefile.def1
-rw-r--r--Makefile.in8
-rw-r--r--Makefile.tpl7
-rwxr-xr-xconfigure420
-rw-r--r--configure.ac3
6 files changed, 451 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 005e875..27e4379 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-11-09 Roland McGrath <mcgrathr@google.com>
+
+ * configure.ac: Add tool checks for READELF and READELF_FOR_TARGET.
+ * configure: Rebuild.
+ * Makefile.def (flags_to_pass): Add READELF_FOR_TARGET.
+ * Makefile.tpl (READELF, READELF_FOR_TARGET): New variables.
+ (HOST_EXPORTS): Add READELF, READELF_FOR_TARGET.
+ (BASE_FLAGS_TO_PASS): Add READELF_FOR_TARGET.
+ (BASE_TARGET_EXPORTS, EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS):
+ Add READELF.
+ * Makefile.in: Rebuild.
+
2011-11-08 Richard Henderson <rth@redhat.com>
* configure.ac: Test for libitm directory present first.
diff --git a/Makefile.def b/Makefile.def
index 5116341..9e41ff5 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -259,6 +259,7 @@ flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= NM_FOR_TARGET ; };
flags_to_pass = { flag= OBJDUMP_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
+flags_to_pass = { flag= READELF_FOR_TARGET ; };
flags_to_pass = { flag= STRIP_FOR_TARGET ; };
flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
flags_to_pass = { flag= WINDMC_FOR_TARGET ; };
diff --git a/Makefile.in b/Makefile.in
index 821499d..038f801 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -206,6 +206,7 @@ HOST_EXPORTS = \
WINDMC="$(WINDMC)"; export WINDMC; \
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ READELF="$(READELF)"; export READELF; \
AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
@@ -213,6 +214,7 @@ HOST_EXPORTS = \
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
+ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
@@ -285,6 +287,7 @@ BASE_TARGET_EXPORTS = \
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
@@ -397,6 +400,7 @@ LIPO = @LIPO@
NM = @NM@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
+READELF = @READELF@
STRIP = @STRIP@
WINDRES = @WINDRES@
WINDMC = @WINDMC@
@@ -555,6 +559,7 @@ LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
WINDMC_FOR_TARGET=@WINDMC_FOR_TARGET@
@@ -767,6 +772,7 @@ BASE_FLAGS_TO_PASS = \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
+ "READELF_FOR_TARGET=$(READELF_FOR_TARGET)" \
"STRIP_FOR_TARGET=$(STRIP_FOR_TARGET)" \
"WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
"WINDMC_FOR_TARGET=$(WINDMC_FOR_TARGET)" \
@@ -815,6 +821,7 @@ EXTRA_HOST_FLAGS = \
'NM=$(NM)' \
'OBJDUMP=$(OBJDUMP)' \
'RANLIB=$(RANLIB)' \
+ 'READELF=$(READELF)' \
'STRIP=$(STRIP)' \
'WINDRES=$(WINDRES)' \
'WINDMC=$(WINDMC)'
@@ -855,6 +862,7 @@ EXTRA_TARGET_FLAGS = \
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
+ 'READELF=$$(READELF_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
diff --git a/Makefile.tpl b/Makefile.tpl
index 2944d60..ae263e6 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -209,6 +209,7 @@ HOST_EXPORTS = \
WINDMC="$(WINDMC)"; export WINDMC; \
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ READELF="$(READELF)"; export READELF; \
AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
@@ -216,6 +217,7 @@ HOST_EXPORTS = \
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
+ READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
@@ -288,6 +290,7 @@ BASE_TARGET_EXPORTS = \
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
+ READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
@@ -400,6 +403,7 @@ LIPO = @LIPO@
NM = @NM@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
+READELF = @READELF@
STRIP = @STRIP@
WINDRES = @WINDRES@
WINDMC = @WINDMC@
@@ -493,6 +497,7 @@ LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
+READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
WINDMC_FOR_TARGET=@WINDMC_FOR_TARGET@
@@ -612,6 +617,7 @@ EXTRA_HOST_FLAGS = \
'NM=$(NM)' \
'OBJDUMP=$(OBJDUMP)' \
'RANLIB=$(RANLIB)' \
+ 'READELF=$(READELF)' \
'STRIP=$(STRIP)' \
'WINDRES=$(WINDRES)' \
'WINDMC=$(WINDMC)'
@@ -652,6 +658,7 @@ EXTRA_TARGET_FLAGS = \
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
+ 'READELF=$$(READELF_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
diff --git a/configure b/configure
index 40922de..9a0086c 100755
--- a/configure
+++ b/configure
@@ -571,6 +571,7 @@ RAW_CXX_FOR_TARGET
WINDMC_FOR_TARGET
WINDRES_FOR_TARGET
STRIP_FOR_TARGET
+READELF_FOR_TARGET
RANLIB_FOR_TARGET
OBJDUMP_FOR_TARGET
NM_FOR_TARGET
@@ -585,6 +586,7 @@ GCJ_FOR_TARGET
GCC_FOR_TARGET
CXX_FOR_TARGET
CC_FOR_TARGET
+READELF
OBJDUMP
OBJCOPY
WINDMC
@@ -815,6 +817,7 @@ WINDRES
WINDMC
OBJCOPY
OBJDUMP
+READELF
CC_FOR_TARGET
CXX_FOR_TARGET
GCC_FOR_TARGET
@@ -829,6 +832,7 @@ LIPO_FOR_TARGET
NM_FOR_TARGET
OBJDUMP_FOR_TARGET
RANLIB_FOR_TARGET
+READELF_FOR_TARGET
STRIP_FOR_TARGET
WINDRES_FOR_TARGET
WINDMC_FOR_TARGET'
@@ -1577,6 +1581,7 @@ Some influential environment variables:
WINDMC WINDMC for the host
OBJCOPY OBJCOPY for the host
OBJDUMP OBJDUMP for the host
+ READELF READELF for the host
CC_FOR_TARGET
CC for the target
CXX_FOR_TARGET
@@ -1605,6 +1610,8 @@ Some influential environment variables:
OBJDUMP for the target
RANLIB_FOR_TARGET
RANLIB for the target
+ READELF_FOR_TARGET
+ READELF for the target
STRIP_FOR_TARGET
STRIP for the target
WINDRES_FOR_TARGET
@@ -9612,6 +9619,147 @@ fi
+if test -n "$READELF"; then
+ ac_cv_prog_READELF=$READELF
+elif test -n "$ac_cv_prog_READELF"; then
+ READELF=$ac_cv_prog_READELF
+fi
+
+if test -n "$ac_cv_prog_READELF"; then
+ for ncn_progname in readelf; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_READELF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ done
+fi
+
+for ncn_progname in readelf; do
+ if test -n "$ncn_tool_prefix"; then
+ # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_READELF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ncn_tool_prefix}${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ if test -z "$ac_cv_prog_READELF" && test $build = $host ; then
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_READELF+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ test -n "$ac_cv_prog_READELF" && break
+done
+
+if test -z "$ac_cv_prog_READELF" ; then
+ set dummy readelf
+ if test $build = $host ; then
+ READELF="$2"
+ else
+ READELF="${ncn_tool_prefix}$2"
+ fi
+fi
+
+
+
@@ -12451,6 +12599,236 @@ fi
+if test -z "$ac_cv_path_READELF_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readelf in $with_build_time_tools" >&5
+$as_echo_n "checking for readelf in $with_build_time_tools... " >&6; }
+ if test -x $with_build_time_tools/readelf; then
+ READELF_FOR_TARGET=`cd $with_build_time_tools && pwd`/readelf
+ ac_cv_path_READELF_FOR_TARGET=$READELF_FOR_TARGET
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_READELF_FOR_TARGET" >&5
+$as_echo "$ac_cv_path_READELF_FOR_TARGET" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ elif test $build != $host && test $have_gcc_for_target = yes; then
+ READELF_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=readelf`
+ test $READELF_FOR_TARGET = readelf && READELF_FOR_TARGET=
+ test -n "$READELF_FOR_TARGET" && ac_cv_path_READELF_FOR_TARGET=$READELF_FOR_TARGET
+ fi
+fi
+if test -z "$ac_cv_path_READELF_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_READELF_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $READELF_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_READELF_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+READELF_FOR_TARGET=$ac_cv_path_READELF_FOR_TARGET
+if test -n "$READELF_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
+$as_echo "$READELF_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_READELF_FOR_TARGET" ; then
+
+
+if test -n "$READELF_FOR_TARGET"; then
+ ac_cv_prog_READELF_FOR_TARGET=$READELF_FOR_TARGET
+elif test -n "$ac_cv_prog_READELF_FOR_TARGET"; then
+ READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_READELF_FOR_TARGET"; then
+ for ncn_progname in readelf; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_READELF_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF_FOR_TARGET"; then
+ ac_cv_prog_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF_FOR_TARGET="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
+if test -n "$READELF_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
+$as_echo "$READELF_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ done
+fi
+
+if test -z "$ac_cv_prog_READELF_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in readelf; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
+ if test -x $with_build_time_tools/${ncn_progname}; then
+ ac_cv_prog_READELF_FOR_TARGET=$with_build_time_tools/${ncn_progname}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_READELF_FOR_TARGET"; then
+ for ncn_progname in readelf; do
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_READELF_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF_FOR_TARGET"; then
+ ac_cv_prog_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
+if test -n "$READELF_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
+$as_echo "$READELF_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ if test -z "$ac_cv_prog_READELF_FOR_TARGET" && test $build = $target ; then
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_READELF_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF_FOR_TARGET"; then
+ ac_cv_prog_READELF_FOR_TARGET="$READELF_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF_FOR_TARGET="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF_FOR_TARGET=$ac_cv_prog_READELF_FOR_TARGET
+if test -n "$READELF_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF_FOR_TARGET" >&5
+$as_echo "$READELF_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ test -n "$ac_cv_prog_READELF_FOR_TARGET" && break
+ done
+fi
+
+if test -z "$ac_cv_prog_READELF_FOR_TARGET" ; then
+ set dummy readelf
+ if test $build = $target ; then
+ READELF_FOR_TARGET="$2"
+ else
+ READELF_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+else
+ READELF_FOR_TARGET="$ac_cv_prog_READELF_FOR_TARGET"
+fi
+
+else
+ READELF_FOR_TARGET=$ac_cv_path_READELF_FOR_TARGET
+fi
+
+
+
+
if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strip in $with_build_time_tools" >&5
@@ -13775,6 +14153,48 @@ $as_echo "pre-installed" >&6; }
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target readelf" >&5
+$as_echo_n "checking where to find the target readelf... " >&6; }
+if test "x${build}" != "x${host}" ; then
+ if expr "x$READELF_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $READELF_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ else
+ # Canadian cross, just use what we found
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" binutils "*) ;;
+ *) ok=no ;;
+ esac
+
+ if test $ok = yes; then
+ # An in-tree tool is available and we can use it
+ READELF_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/readelf'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+ elif expr "x$READELF_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $READELF_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ READELF_FOR_TARGET='$(READELF)'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+ else
+ # We need a cross tool
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target strip" >&5
$as_echo_n "checking where to find the target strip... " >&6; }
if test "x${build}" != "x${host}" ; then
diff --git a/configure.ac b/configure.ac
index ea697d3..9d48e90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3063,6 +3063,7 @@ NCN_STRICT_CHECK_TOOLS(WINDRES, windres)
NCN_STRICT_CHECK_TOOLS(WINDMC, windmc)
NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy)
NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump)
+NCN_STRICT_CHECK_TOOLS(READELF, readelf)
AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
@@ -3096,6 +3097,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo)
ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm)
ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump)
ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib)
+ACX_CHECK_INSTALLED_TARGET_TOOL(READELF_FOR_TARGET, readelf)
ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc)
@@ -3125,6 +3127,7 @@ GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump])
GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib])
+GCC_TARGET_TOOL(readelf, READELF_FOR_TARGET, READELF, [binutils/readelf])
GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip-new])
GCC_TARGET_TOOL(windres, WINDRES_FOR_TARGET, WINDRES, [binutils/windres])
GCC_TARGET_TOOL(windmc, WINDMC_FOR_TARGET, WINDMC, [binutils/windmc])