This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] configure: Re-disable building cross-gdbserver
- From: "Maciej W. Rozycki" <macro at wdc dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: Pedro Alves <palves at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 11 Feb 2020 21:01:48 +0000
- Subject: Re: [PATCH] configure: Re-disable building cross-gdbserver
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GPepsTvuPnee77VIUCDJ4++rzMExxAgATivQtC4hkJY=; b=YWQfkv36xsTr6/JVgQCoG1Nf11VF+ZXzXizXbMHSIkuEyyqr6UyuBr86glOQJbS57Ap9AlDe7Or1G96NcpFnm/8kTfoydC5JQG2JxASo9eIUROjdxfwRvxdBJOKnxEtMWZq9nJkNa12JtNAuxAxIK17ISuBS26ODTBeAxvVCwBlYTuWIJ300XB9sKGqC31xefAeTbul2Yf9TUkRWR0syz0l1cDUpUZ5riNFf4BcuHF5YZN8K0jSUdvvEHpLd5j8QsPf8SmMvvwQdxVuZLv4+VtllJSy1VHHptUdwfv7yoam/M92UAfrFZ7pakAiMAdpJJ1Qy29wSo5ik4dCu1GMPEA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HTI1oFCbxsiJn0gCtj7SvGORHyRFCkOnyRdNLcjNAopG0Bd4lJc2K7SDGBOPQL/3qkgwqLco59WC1gQUfSg5n7ul+Tyj93G3xbWADkGMCL8OnV+aJZjnBNdEcmlsceIaq4OBfX8OP6oPcdhiV7YdlxLhB6+SWn9pxcKPySvgF9lJjNJaG5fOW15j2eZrjiQnrv5VArRcEtyOWpDVqTlKPxA9DRjDGoazxrr5fSDXvnDHecDezDjYZ6EN9Gx5kWVlU6K8ha1Y7hL42+sz2JNoyb9jni/TDBqByeHJTJi6pgQWvnLYwHf+s7rKCPanr2COkE2Od2Z0loJ5z7K/mkf6WQ==
- Ironport-sdr: Ysgqonx1dC375bSOPTTMv+uFAaLVY1kJ8JI7JJX52zGOkZZMqsx7r2YML8yI6I2EsIVLe27snW 3yLe3mRrj+yng/glmf2yv7A9A6PUHeerr3XkxFREsIs66562D0jnCQEOEezR9qt1xgz1qfLaFI dRO+hxuKmpvHUepAb/lz/DLxM9n2Jzs93qZVRjFLgKnMn5nnCjKtFKxDq/z6X93TJZplKArZvE oi7f0Y9qATJQ+txQbZ+9y4IJ+kYjOdDUcnF4E8vfvdwQYOq5luLvSQzBKOEisNDs9ZP7CRe1zk 4TU=
- References: <alpine.LFD.2.21.2002081532520.18621@redsun52.ssa.fujisawa.hgst.com> <87a75p9mg9.fsf@tromey.com>
- Wdcipoutbound: EOP-TRUE
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(+)
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"