Re: [rfc/rft] ppc gdbserver: autodetect AltiVec and SPE

Ulrich Weigand
2008-04-21T14:58:36Z

Daniel Jacobowitz wrote:
> On Mon, Apr 21, 2008 at 02:55:26PM +0200, Ulrich Weigand wrote:
> > I'm wondering whether it wouldn't make sense now to drop the
> > configure-time distinction between powerpc-linux and powerpc64-linux
> > for gdbserver (just like there already is no such distinction
> > for GDB itself).
>
> Agreed. We already know that the ppc64 files compile OK with -m32,
> since Thiago's doing it.

OK, I've committed the following patch to implement this merge
(and the same for s390-linux vs. s390x-linux). Tested on
powerpc-linux, powerpc64-linux, s390-linux, and s390x-linux
via local gdbserver testing.

Bye,
Ulrich

ChangeLog:

* configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into single
powerpc*-*-linux* case.
(s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.

diff -urNp gdb-orig/gdb/gdbserver/configure.srv gdb-head/gdb/gdbserver/configure.srv
--- gdb-orig/gdb/gdbserver/configure.srv 2008-04-21 15:15:37.000000000 +0200
+++ gdb-head/gdb/gdbserver/configure.srv 2008-04-21 15:16:50.000000000 +0200
@@ -106,38 +106,22 @@ case "${target}" in
srv_linux_usrregs=yes
srv_linux_thread_db=yes
;;
- powerpc64-*-linux*) srv_regobj="reg-ppc.o powerpc-32.o"
+ powerpc*-*-linux*) srv_regobj="reg-ppc.o powerpc-32.o powerpc-e500.o"
srv_regobj="${srv_regobj} reg-ppc64.o powerpc-64.o"
srv_tgtobj="linux-low.o linux-ppc-low.o"
srv_xmlfiles="rs6000/powerpc-32.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-altivec.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-core.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu.xml"
- srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-64.xml"
- srv_xmlfiles="${srv_xmlfiles} rs6000/power64-core.xml"
- srv_linux_usrregs=yes
- srv_linux_regsets=yes
- srv_linux_thread_db=yes
- ;;
- powerpc-*-linux*) srv_regobj="reg-ppc.o powerpc-32.o powerpc-e500.o"
- srv_tgtobj="linux-low.o linux-ppc-low.o"
- srv_xmlfiles="rs6000/powerpc-32.xml"
- srv_xmlfiles="${srv_xmlfiles} rs6000/power-altivec.xml"
- srv_xmlfiles="${srv_xmlfiles} rs6000/power-core.xml"
- srv_xmlfiles="${srv_xmlfiles} rs6000/power-fpu.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-e500.xml"
srv_xmlfiles="${srv_xmlfiles} rs6000/power-spe.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/powerpc-64.xml"
+ srv_xmlfiles="${srv_xmlfiles} rs6000/power64-core.xml"
srv_linux_usrregs=yes
srv_linux_regsets=yes
srv_linux_thread_db=yes
;;
- s390-*-linux*) srv_regobj=reg-s390.o
- srv_tgtobj="linux-low.o linux-s390-low.o"
- srv_linux_usrregs=yes
- srv_linux_regsets=yes
- srv_linux_thread_db=yes
- ;;
- s390x-*-linux*) srv_regobj="reg-s390.o reg-s390x.o"
+ s390*-*-linux*) srv_regobj="reg-s390.o reg-s390x.o"
srv_tgtobj="linux-low.o linux-s390-low.o"
srv_linux_usrregs=yes
srv_linux_regsets=yes

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com