public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR bootstrap/67385: READELF_FOR_TARGET isn't used in gcc configure
@ 2015-08-28 15:53 H.J. Lu
  2015-09-04 14:52 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2015-08-28 15:53 UTC (permalink / raw)
  To: gcc-patches

Similar to as, ld, nm and objdump, gcc configure should check
$READELF_FOR_TARGET for readelf.

OK for trunk?

H.J.
---
	PR bootstrap/67385
	* configure.ac (gcc_cv_readelf): Check $READELF_FOR_TARGET.
	* configure: Regenerated.
---
 gcc/configure    | 6 ++++--
 gcc/configure.ac | 4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/gcc/configure b/gcc/configure
index 0d31383..4d16140 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -22232,9 +22232,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 :
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 846651d..81aba21 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2367,8 +2367,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)
-- 
2.4.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PR bootstrap/67385: READELF_FOR_TARGET isn't used in gcc configure
  2015-08-28 15:53 [PATCH] PR bootstrap/67385: READELF_FOR_TARGET isn't used in gcc configure H.J. Lu
@ 2015-09-04 14:52 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2015-09-04 14:52 UTC (permalink / raw)
  To: GCC Patches, DJ Delorie, Joseph S. Myers

On Fri, Aug 28, 2015 at 8:50 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> Similar to as, ld, nm and objdump, gcc configure should check
> $READELF_FOR_TARGET for readelf.
>
> OK for trunk?
>
> H.J.
> ---
>         PR bootstrap/67385
>         * configure.ac (gcc_cv_readelf): Check $READELF_FOR_TARGET.
>         * configure: Regenerated.
> ---
>  gcc/configure    | 6 ++++--
>  gcc/configure.ac | 4 +++-
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/configure b/gcc/configure
> index 0d31383..4d16140 100755
> --- a/gcc/configure
> +++ b/gcc/configure
> @@ -22232,9 +22232,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 :
> diff --git a/gcc/configure.ac b/gcc/configure.ac
> index 846651d..81aba21 100644
> --- a/gcc/configure.ac
> +++ b/gcc/configure.ac
> @@ -2367,8 +2367,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)
> --
> 2.4.3
>

Any comments, objections, feedbacks?

-- 
H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-04 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-28 15:53 [PATCH] PR bootstrap/67385: READELF_FOR_TARGET isn't used in gcc configure H.J. Lu
2015-09-04 14:52 ` H.J. Lu

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).