Message ID | 23ccb2bf-7e7a-3896-cc87-fd5398a158ca@redhat.com |
---|---|
State | Committed |
Headers | show |
On Wed, 12 Feb 2020, Pedro Alves wrote: > > That's actually quite similar to what I considered first, before I > > changed my mind. Whatever. > > Doing it in gdbserver/ has the advantage that it stays under gdbserver's > control, so it doesn't need syncing code with the gcc tree. I know of at > least one off-tree port that uses gdbserver in a host != target scenario, > so I imagine that this condition will evolve over time. Sure, that makes sense to me. > > case "${host}" in > > + ${target}) > > + gdbserver_host=${host} > > + ;; > > + *) > > + gdbserver_host=NONE > > + ;; > if/else reads more to-the-point to me, so I tweaked it that > way, and merged it in (to binutils-gdb), like below. Great, thanks for handling this! > I'm sorry for not noticing your earlier patch. No worries, I'm glad we've got this sorted. Maciej
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 09707067730..709ef23674c 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Maciej W. Rozycki <macro@wdc.com> + Pedro Alves <palves@redhat.com> + + Skip building gdbserver in a cross-configuration. + * configure.srv: Set $gdbserver_host depending on whether $target + is $host. Use $gdbserver_host instead of $host. + 2020-02-11 Simon Marchi <simon.marchi@efficios.com> * configure: Re-generate. diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv index 2e83cbdc07f..375ac0aeb2a 100644 --- a/gdbserver/configure.srv +++ b/gdbserver/configure.srv @@ -33,9 +33,16 @@ ipa_ppc_linux_regobj="powerpc-32l-ipa.o powerpc-altivec32l-ipa.o powerpc-vsx32l- # these files over and over again. srv_linux_obj="linux-low.o nat/linux-osdata.o nat/linux-procfs.o nat/linux-ptrace.o nat/linux-waitpid.o nat/linux-personality.o nat/linux-namespaces.o fork-child.o nat/fork-inferior.o" -# Input is taken from the "${host}" variable. +# Input is taken from the "${host}" and "${target}" variables. -case "${host}" in +# GDBserver can only debug native programs. +if test "${target}" = "${host}"; then + gdbserver_host=${host} +else + gdbserver_host= +fi + +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"