From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>,
Marcus Shawcroft <marcus.shawcroft@gmail.com>
Cc: James Greenhalgh <james.greenhalgh@arm.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFC 0/2] let gdbserver use libiberty
Date: Fri, 20 Jun 2014 10:52:00 -0000 [thread overview]
Message-ID: <53A4124C.8070508@redhat.com> (raw)
In-Reply-To: <87vbrxc5vm.fsf@fleche.redhat.com>
On 06/19/2014 03:48 PM, Tom Tromey wrote:
>>>>>> "Marcus" == Marcus Shawcroft <marcus.shawcroft@gmail.com> writes:
>
> Marcus> An alternative approach to that suggested by James is to have the
> Marcus> gdbserver configure scri[t probe for AR to ensure that something sane
> Marcus> is passed on to the sub-builds.
>
> Marcus> Patch attached.
>
> Marcus> OK ?
>
> Yes, this is ok. Thanks.
>
> Tom
>
I've pushed this.
----------------
From e1d2394b50c7b174f48e38efb398034d75e67c99 Mon Sep 17 00:00:00 2001
From: Marcus Shawcroft <marcus.shawcroft@arm.com>
Date: Fri, 20 Jun 2014 11:48:15 +0100
Subject: [PATCH] Fix gdbserver cross build.
The recent libiberty patch caused issues when cross building
gdbserver. The Makefile ends invoking the build machine's "ar"
instead of the --host version:
ar ./libiberty.a \
./regex.o (...)
ar: illegal option -- .
Usage: ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...
ar -M [<mri-script]
The libiberty configure script does probe for and finds an appropriate
AR. However, gdbserver's configure does not probe for AR and
overrides the AR used in the libiberty build by explicitly passing AR
to the sub-builds.
gdb/gdbserver/
2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
* configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
* Makefile.in (AR, AR_FLAGS): Define.
* configure: Regenerate.
---
gdb/gdbserver/ChangeLog | 6 +++
gdb/gdbserver/Makefile.in | 2 +
gdb/gdbserver/configure | 93 ++++++++++++++++++++++++++++++++++++++++++++++
gdb/gdbserver/configure.ac | 1 +
4 files changed, 102 insertions(+)
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index dda84f9..54556f8 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
+ * Makefile.in (AR, AR_FLAGS): Define.
+ * configure: Regenerate.
+
2014-06-19 Gary Benson <gbenson@redhat.com>
* Makefile.in (i386-dregs.o): New rule.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 76d8965..3674aed 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -50,6 +50,8 @@ INSTALL_DATA = @INSTALL_DATA@
RANLIB = @RANLIB@
CC = @CC@
+AR = @AR@
+AR_FLAGS = rc
# Dependency tracking information.
DEPMODE = @CCDEPMODE@
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 90930bb..33db6e3 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -616,6 +616,7 @@ host_noncanonical
target_noncanonical
ALLOCA
RANLIB
+AR
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
@@ -3916,6 +3917,98 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+ $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
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; 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_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="ar"
+ $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
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index ede38d0..7fa89d6 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -32,6 +32,7 @@ AC_SYS_LARGEFILE
AC_CANONICAL_SYSTEM
AC_PROG_INSTALL
+AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB
AC_ARG_PROGRAM
--
1.9.3
next prev parent reply other threads:[~2014-06-20 10:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 18:49 Tom Tromey
2014-01-20 18:49 ` [RFC 2/2] delete gdbserver's freeargv Tom Tromey
2014-02-07 16:35 ` Pedro Alves
2014-01-20 18:49 ` [RFC 1/2] link gdbserver against libiberty Tom Tromey
2014-01-21 1:49 ` Yao Qi
2014-01-21 2:33 ` Tom Tromey
2014-02-07 14:49 ` Tom Tromey
2014-02-07 16:32 ` Pedro Alves
2014-02-07 21:00 ` Tom Tromey
2014-02-10 13:27 ` Pedro Alves
2014-02-12 16:44 ` Tom Tromey
2014-02-12 16:49 ` Pedro Alves
2014-02-08 2:36 ` Yao Qi
2014-01-21 2:03 ` Yao Qi
2014-01-20 18:54 ` [RFC 0/2] let gdbserver use libiberty Tom Tromey
2014-06-12 20:37 ` Tom Tromey
2014-06-16 13:26 ` James Greenhalgh
2014-06-18 12:27 ` Marcus Shawcroft
2014-06-19 14:48 ` Tom Tromey
2014-06-20 10:52 ` Pedro Alves [this message]
2014-06-20 12:01 ` Gary Benson
2014-06-20 14:16 ` Tom Tromey
2014-06-20 14:44 ` [COMMITTED PATCH] Fix mingw32 build on x86-64 RHEL 6.5 Gary Benson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A4124C.8070508@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=james.greenhalgh@arm.com \
--cc=marcus.shawcroft@gmail.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox