configure: Re-disable building cross-gdbserver

Message ID alpine.LFD.2.21.2002112049060.18621@redsun52.ssa.fujisawa.hgst.com
State Superseded
Headers

Commit Message

Maciej W. Rozycki Feb. 11, 2020, 9:01 p.m. UTC
  On Tue, 11 Feb 2020, Tom Tromey wrote:

> Maciej> Correct fallout from commit 919adfe84092 ("Move gdbserver to top level") 
> Maciej> and revert to not building `gdbserver' in a cross-configuration, that is 
> Maciej> where host != target, matching the documented behaviour.  We have no way 
> Maciej> to support non-native `gdbserver', and native `gdbserver' is usually of 
> Maciej> no use with cross-GDB of the chosen host.
> 
> Pedro had a different way to do this, that keeps the decision under
> gdbserver's control:
> 
> https://sourceware.org/ml/gdb-patches/2020-02/msg00383.html

 That's actually quite similar to what I considered first, before I 
changed my mind.  Whatever.

 However I would expect `exit' not to be what we want in a sourced script 
(I did this differently; see below).

> Also note that I haven't sent the top-level configury patches upstream
> to gcc yet.  I am going to do this all at once, at the end.  I think
> there's one more patch that will be needed, once gdbserver depends on
> the top-level gdbsupport.

 Ack.

  Maciej
---
 gdbserver/configure.srv |    8 ++++++++
 1 file changed, 8 insertions(+)
  

Patch

Index: binutils-gdb/gdbserver/configure.srv
===================================================================
--- binutils-gdb.orig/gdbserver/configure.srv
+++ binutils-gdb/gdbserver/configure.srv
@@ -36,6 +36,14 @@  srv_linux_obj="linux-low.o nat/linux-osd
 # Input is taken from the "${host}" variable.
 
 case "${host}" in
+  ${target})
+			gdbserver_host=${host}
+			;;
+  *)
+			gdbserver_host=NONE
+			;;
+esac
+case "${gdbserver_host}" in
   aarch64*-*-linux*)	srv_tgtobj="linux-aarch64-low.o"
 			srv_tgtobj="$srv_tgtobj nat/aarch64-linux-hw-point.o"
 			srv_tgtobj="$srv_tgtobj linux-aarch32-low.o"