Check $READELF_FOR_TARGET for readelf in configure
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 7 Oct 2015 13:45:21 +0000 (13:45 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 7 Oct 2015 13:45:21 +0000 (06:45 -0700)
Similar to as, ld, nm and objdump, gcc configure should check
$READELF_FOR_TARGET for readelf.

PR bootstrap/67385
* configure.ac (gcc_cv_readelf): Check $READELF_FOR_TARGET.
* configure: Regenerated.

From-SVN: r228567

gcc/ChangeLog
gcc/configure
gcc/configure.ac

index 23560024d0f4b81df80d10ad9b5b1b2287372204..7d578791196fef92f704684c6b58b8c79aadc5d1 100644 (file)
@@ -1,3 +1,9 @@
+2015-10-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR bootstrap/67385
+       * configure.ac (gcc_cv_readelf): Check $READELF_FOR_TARGET.
+       * configure: Regenerated.
+
 2015-10-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/67850
index f6ae99062c50d366337a58fd7cea5071dafc2e71..6b160ae44a21d9f88ee4b14ee6ebed9381459c4a 100755 (executable)
@@ -22271,9 +22271,11 @@ if test -f $gcc_cv_binutils_srcdir/configure.ac \
        gcc_cv_readelf=../binutils/readelf$build_exeext
 elif test -x readelf$build_exeext; then
        gcc_cv_readelf=./readelf$build_exeext
+elif ( set dummy $READELF_FOR_TARGET; test -x $2 ); then
+        gcc_cv_readelf="$READELF_FOR_TARGET"
 else
-        # Extract the first word of "readelf", so it can be a program name with args.
-set dummy readelf; ac_word=$2
+        # Extract the first word of "$READELF_FOR_TARGET", so it can be a program name with args.
+set dummy $READELF_FOR_TARGET; 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_gcc_cv_readelf+set}" = set; then :
index 88fb9bf178c827f0f8dc9508e69bb7fc03c6b534..be721e6db3b0235dd3ca2524aeecb5914eee3b85 100644 (file)
@@ -2403,8 +2403,10 @@ if test -f $gcc_cv_binutils_srcdir/configure.ac \
        gcc_cv_readelf=../binutils/readelf$build_exeext
 elif test -x readelf$build_exeext; then
        gcc_cv_readelf=./readelf$build_exeext
+elif ( set dummy $READELF_FOR_TARGET; test -x $[2] ); then
+        gcc_cv_readelf="$READELF_FOR_TARGET"
 else
-        AC_PATH_PROG(gcc_cv_readelf, readelf)
+        AC_PATH_PROG(gcc_cv_readelf, $READELF_FOR_TARGET)
 fi])
 
 AC_MSG_CHECKING(what readelf to use)