gdb: remove target_gdbarch
[binutils-gdb.git] / gdb / configure.tgt
index 5e3bd5de7180b913da481ad457023a1a3db26ea0..47a674201f914765fb90846b6bfc853f91a96ce9 100644 (file)
@@ -2,18 +2,26 @@
 # invoked from the autoconf generated configure script.
 
 # This file sets the following shell variables:
-#  gdb_target_obs      target-specific object files to use
-#  gdb_sim             simulator library for target
-#  gdb_osabi           default OS ABI to use with target
-#  build_gdbserver     set to "yes" if gdbserver supports target
-#  gdb_have_gcore      set to "true"/"false" if this target can run gcore
+#  gdb_target_obs         target-specific object files to use
+#  gdb_sim                simulator library for target
+#  gdb_osabi              default OS ABI to use with target
+#  gdb_have_gcore         set to "true"/"false" if this target can run gcore
+#  gdb_require_amd_dbgapi set to "true" if this target requires the amd-dbgapi
+#                         target
 
 # NOTE: Every file added to a gdb_target_obs variable for any target here
-#       must also be added to either ALL_TARGET_OBS or ALL_64_TARGET_OBS
+#       must also be added to either:
+#
+#         - ALL_TARGET_OBS
+#         - ALL_64_TARGET_OBS
+#         - ALL_AMD_DBGAPI_TARGET_OBS
+#
 #      in Makefile.in!
 
 case $targ in
  *-*-irix* | \
+ *-*-solaris2.[01] | *-*-solaris2.[2-9]* | *-*-solaris2.10* | \
+ *-*-netbsdpe* | \
  alpha*-*-osf* | \
  alpha*-*-freebsd* | \
  alpha*-*-kfreebsd*-gnu | \
@@ -25,6 +33,7 @@ case $targ in
  m68*-*-os68k* | \
  mips*-*-pe | \
  rs6000-*-lynxos* | \
+ score-*-* | \
  sh*-*-pe | \
  hppa*-*-hpux* | \
  ia64-*-hpux* | \
@@ -39,7 +48,8 @@ esac
 
 x86_tobjs="x86-tdep.o"
 i386_tobjs="i386-tdep.o arch/i386.o i387-tdep.o ${x86_tobjs}"
-amd64_tobjs="amd64-tdep.o arch/amd64.o ${x86_tobjs}"
+amd64_tobjs="ravenscar-thread.o amd64-ravenscar-thread.o \
+    amd64-tdep.o arch/amd64.o ${x86_tobjs}"
 
 # Here are three sections to get a list of target specific object
 # files according to target triplet $TARG.
@@ -48,7 +58,9 @@ amd64_tobjs="amd64-tdep.o arch/amd64.o ${x86_tobjs}"
 
 case "${targ}" in
 aarch64*-*-*)
-       cpu_obs="aarch64-tdep.o arch/aarch64-insn.o arch/aarch64.o";;
+       cpu_obs="aarch32-tdep.o aarch64-tdep.o arch/aarch32.o \
+                arch/aarch64-insn.o arch/aarch64.o  ravenscar-thread.o \
+                aarch64-ravenscar-thread.o";;
 
 alpha*-*-*)
        # Target: Alpha
@@ -57,11 +69,13 @@ alpha*-*-*)
 
 arc*-*-*)
        # Target: Unidentified ARC target
-       cpu_obs="arc-tdep.o"
+       cpu_obs="arc-tdep.o arch/arc.o"
        ;;
 
 arm*-*-*)
-       cpu_obs="arch/arm.o arch/arm-get-next-pcs.o arm-tdep.o";;
+       cpu_obs="aarch32-tdep.o arch/aarch32.o arch/arm.o \
+                arch/arm-get-next-pcs.o arm-tdep.o arm-none-tdep.o"
+       ;;
 
 hppa*-*-*)
        # Target: HP PA-RISC
@@ -75,11 +89,25 @@ i[34567]86-*-*)
        fi
        ;;
 
+ia16*-*-*)
+       # Target: Intel IA-16
+       cpu_obs="${i386_tobjs}"
+       ;;
+
 ia64*-*-*)
        # Target: Intel IA-64
        cpu_obs="ia64-tdep.o"
        ;;
 
+loongarch*-*-*)
+       # Target: LoongArch baremetal
+       cpu_obs="loongarch-tdep.o arch/loongarch.o"
+       ;;
+
+riscv*-*-*)
+       cpu_obs="riscv-tdep.o riscv-none-tdep.o arch/riscv.o \
+                ravenscar-thread.o riscv-ravenscar-thread.o";;
+
 x86_64-*-*)
        cpu_obs="${i386_tobjs} ${amd64_tobjs}";;
 
@@ -96,7 +124,7 @@ case "${targ}" in
 *-*-freebsd* | *-*-kfreebsd*-gnu)
        os_obs="fbsd-tdep.o solib-svr4.o";;
 *-*-netbsd* | *-*-knetbsd*-gnu)
-       os_obs="nbsd-tdep.o solib-svr4.o";;
+       os_obs="netbsd-tdep.o solib-svr4.o";;
 *-*-openbsd*)
        os_obs="obsd-tdep.o solib-svr4.o";;
 esac
@@ -117,11 +145,12 @@ aarch64*-*-freebsd*)
 aarch64*-*-linux*)
        # Target: AArch64 linux
        gdb_target_obs="aarch64-linux-tdep.o arch/aarch64.o\
+                       arch/aarch64-mte-linux.o \
+                       arch/aarch64-scalable-linux.o \
                        arch/arm.o arch/arm-linux.o arch/arm-get-next-pcs.o \
                        arm-tdep.o arm-linux-tdep.o \
                        glibc-tdep.o linux-tdep.o solib-svr4.o \
                        symfile-mem.o linux-record.o"
-       build_gdbserver=yes
        ;;
 
 alpha*-*-linux*)
@@ -132,12 +161,18 @@ alpha*-*-linux*)
 alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
        # Target: NetBSD/alpha
        gdb_target_obs="alpha-mdebug-tdep.o alpha-bsd-tdep.o \
-                       alpha-nbsd-tdep.o"
+                       alpha-netbsd-tdep.o"
        ;;
 alpha*-*-openbsd*)
        # Target: OpenBSD/alpha
        gdb_target_obs="alpha-mdebug-tdep.o alpha-bsd-tdep.o \
-                       alpha-nbsd-tdep.o alpha-obsd-tdep.o nbsd-tdep.o"
+                       alpha-netbsd-tdep.o alpha-obsd-tdep.o netbsd-tdep.o"
+       ;;
+
+amdgcn*-*-*)
+       # Target: AMDGPU
+       gdb_require_amd_dbgapi=true
+       gdb_target_obs="amdgpu-tdep.o solib-rocm.o"
        ;;
 
 am33_2.0*-*-linux*)
@@ -151,16 +186,19 @@ arc*-*-elf32)
        gdb_target_obs="arc-newlib-tdep.o"
        ;;
 
+arc*-*-linux*)
+       # Target: ARC machine running Linux
+       gdb_target_obs="arc-linux-tdep.o linux-tdep.o solib-svr4.o"
+       ;;
+
 arm*-wince-pe | arm*-*-mingw32ce*)
        # Target: ARM based machine running Windows CE (win32)
        gdb_target_obs="arm-wince-tdep.o windows-tdep.o"
-       build_gdbserver=yes
        ;;
 arm*-*-linux*)
        # Target: ARM based machine running GNU/Linux
        gdb_target_obs="arch/arm-linux.o arm-linux-tdep.o glibc-tdep.o \
                        solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o"
-       build_gdbserver=yes
        ;;
 arm*-*-freebsd*)
        # Target: FreeBSD/arm
@@ -168,37 +206,34 @@ arm*-*-freebsd*)
        ;;
 arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
        # Target: NetBSD/arm
-       gdb_target_obs="arm-nbsd-tdep.o"
+       gdb_target_obs="arm-netbsd-tdep.o"
        ;;
 arm*-*-openbsd*)
        # Target: OpenBSD/arm
        gdb_target_obs="arm-bsd-tdep.o arm-obsd-tdep.o"
        ;;
-arm*-*-symbianelf*)
-       # Target: SymbianOS/arm
-       gdb_target_obs="arm-symbian-tdep.o"
-       ;;
 arm*-*-*)
        # Target: ARM embedded system
-       gdb_sim=../sim/arm/libsim.a
+       gdb_target_obs="arm-pikeos-tdep.o"
        ;;
 
 avr-*-*)
        # Target: AVR
        gdb_target_obs="avr-tdep.o"
-       gdb_sim=../sim/avr/libsim.a
        ;;
 
 bfin-*-*linux*)
        # Target: Blackfin Linux
        gdb_target_obs="bfin-tdep.o bfin-linux-tdep.o linux-tdep.o"
-       gdb_sim=../sim/bfin/libsim.a
-       build_gdbserver=yes
        ;;
 bfin-*-*)
        # Target: Blackfin processor
        gdb_target_obs="bfin-tdep.o"
-       gdb_sim=../sim/bfin/libsim.a
+       ;;
+
+bpf-*-*)
+       # Target: eBPF
+       gdb_target_obs="bpf-tdep.o"
        ;;
 
 cris*)
@@ -206,21 +241,29 @@ cris*)
        gdb_target_obs="cris-tdep.o cris-linux-tdep.o linux-tdep.o solib-svr4.o"
        ;;
 
+csky*-*-linux*)
+       # Target: CSKY running GNU/Linux
+       gdb_target_obs="csky-tdep.o csky-linux-tdep.o glibc-tdep.o \
+                       linux-tdep.o solib-svr4.o"
+       ;;
+
+csky*-*-*)
+       # Target: CSKY bare metal
+       gdb_target_obs="csky-tdep.o"
+       ;;
+
 frv-*-*)
        # Target: Fujitsu FRV processor
        gdb_target_obs="frv-tdep.o frv-linux-tdep.o linux-tdep.o solib-frv.o"
-       gdb_sim=../sim/frv/libsim.a
        ;;
 
 moxie-*-elf | moxie-*-moxiebox | moxie-*-rtems*)
        gdb_target_obs="moxie-tdep.o"
-       gdb_sim=../sim/moxie/libsim.a
        ;;
 
 h8300-*-*)
        # Target: H8300 processor
        gdb_target_obs="h8300-tdep.o"
-       gdb_sim=../sim/h8300/libsim.a
        ;;
 
 hppa*-*-linux*)
@@ -230,7 +273,7 @@ hppa*-*-linux*)
        ;;
 hppa*-*-netbsd*)
        # Target: NetBSD/hppa
-       gdb_target_obs="hppa-bsd-tdep.o hppa-nbsd-tdep.o solib-svr4.o"
+       gdb_target_obs="hppa-bsd-tdep.o hppa-netbsd-tdep.o solib-svr4.o"
        ;;
 hppa*-*-openbsd*)
        # Target: OpenBSD/hppa
@@ -255,7 +298,7 @@ i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
        ;;
 i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
        # Target: NetBSD/i386
-       gdb_target_obs="i386-bsd-tdep.o i386-nbsd-tdep.o "
+       gdb_target_obs="i386-bsd-tdep.o i386-netbsd-tdep.o "
        ;;
 i[34567]86-*-openbsd*)
        # Target: OpenBSD/i386
@@ -265,7 +308,6 @@ i[34567]86-*-nto*)
        # Target: Intel 386 running qnx6.
        gdb_target_obs="solib-svr4.o \
                        i386-nto-tdep.o nto-tdep.o"
-       build_gdbserver=yes
        ;;
 i[34567]86-*-solaris2* | x86_64-*-solaris2*)
        # Target: Solaris x86_64
@@ -283,7 +325,6 @@ i[34567]86-*-linux*)
            # Target: GNU/Linux x86-64
            gdb_target_obs="amd64-linux-tdep.o ${gdb_target_obs}"
        fi
-       build_gdbserver=yes
        ;;
 i[34567]86-*-gnu*)
        # Target: Intel 386 running the GNU Hurd
@@ -291,13 +332,11 @@ i[34567]86-*-gnu*)
        ;;
 i[34567]86-*-cygwin*)
        # Target: Intel 386 running win32
-       gdb_target_obs="i386-cygwin-tdep.o windows-tdep.o"
-       build_gdbserver=yes
+       gdb_target_obs="i386-windows-tdep.o windows-tdep.o"
        ;;
 i[34567]86-*-mingw32*)
        # Target: Intel 386 running win32
-       gdb_target_obs="i386-cygwin-tdep.o windows-tdep.o"
-       build_gdbserver=yes
+       gdb_target_obs="i386-windows-tdep.o windows-tdep.o"
        ;;
 i[34567]86-*-go32* | i[34567]86-*-msdosdjgpp*)
        # Target: i386 running DJGPP/go32.
@@ -308,7 +347,6 @@ ia64-*-linux*)
        # Target: Intel IA-64 running GNU/Linux
        gdb_target_obs="ia64-linux-tdep.o linux-tdep.o \
                        solib-svr4.o symfile-mem.o"
-       build_gdbserver=yes
        ;;
 ia64-*-*vms*)
        # Target: Intel IA-64 running OpenVMS
@@ -317,20 +355,21 @@ ia64-*-*vms*)
 
 iq2000-*-*)
        gdb_target_obs="iq2000-tdep.o"
-       gdb_sim=../sim/iq2000/libsim.a
        ;;
 
 lm32-*-*)              
        gdb_target_obs="lm32-tdep.o" 
-       gdb_sim=../sim/lm32/libsim.a
+       ;;
+
+loongarch*-*-linux*)
+       # Target: LoongArch running Linux
+       gdb_target_obs="loongarch-linux-tdep.o glibc-tdep.o \
+                       linux-tdep.o solib-svr4.o"
        ;;
 
 m32c-*-*)
        # Target: Renesas M32C family
        gdb_target_obs="m32c-tdep.o"
-       # There may also be a SID / CGEN simulator for this,
-       # but we do have DJ Delorie's mini-sim.
-       gdb_sim=../sim/m32c/libsim.a
        ;;
 
 m32r*-*-linux*)
@@ -338,19 +377,15 @@ m32r*-*-linux*)
        gdb_target_obs="m32r-tdep.o m32r-linux-tdep.o \
                        glibc-tdep.o solib-svr4.o symfile-mem.o \
                        linux-tdep.o"
-       gdb_sim=../sim/m32r/libsim.a
-       build_gdbserver=yes
        ;;
 m32r*-*-*)
        # Target: Renesas m32r processor
        gdb_target_obs="m32r-tdep.o"
-       gdb_sim=../sim/m32r/libsim.a
        ;;
 
 m68hc11*-*-*|m6811*-*-*)
        # Target: Motorola 68HC11 processor
        gdb_target_obs="m68hc11-tdep.o"
-       gdb_sim=../sim/m68hc11/libsim.a
        ;;
 
 m68*-*-aout* | m68*-*-coff* | m68*-*-elf* | m68*-*-rtems* | m68*-*-uclinux* | \
@@ -362,7 +397,6 @@ m68*-*-linux*)
        # Target: Motorola m68k with a.out and ELF
        gdb_target_obs="m68k-tdep.o m68k-linux-tdep.o solib-svr4.o \
                        linux-tdep.o glibc-tdep.o symfile-mem.o"
-       build_gdbserver=yes
        ;;
 m68*-*-netbsd* | m68*-*-knetbsd*-gnu)
        # Target: NetBSD/m68k
@@ -383,30 +417,24 @@ microblaze*-linux-*|microblaze*-*-linux*)
        # Target: Xilinx MicroBlaze running Linux
        gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o solib-svr4.o \
                        symfile-mem.o linux-tdep.o"
-       gdb_sim=../sim/microblaze/libsim.a
        ;;
 microblaze*-*-*)
        # Target: Xilinx MicroBlaze running standalone
        gdb_target_obs="microblaze-tdep.o"
-       gdb_sim=../sim/microblaze/libsim.a
        ;;
 
 mips*-*-linux*)
        # Target: Linux/MIPS
        gdb_target_obs="mips-tdep.o mips-linux-tdep.o glibc-tdep.o \
                        solib-svr4.o symfile-mem.o linux-tdep.o"
-       gdb_sim=../sim/mips/libsim.a
-       build_gdbserver=yes
        ;;
 mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
        # Target: MIPS running NetBSD
-       gdb_target_obs="mips-tdep.o mips-nbsd-tdep.o"
-       gdb_sim=../sim/mips/libsim.a
+       gdb_target_obs="mips-tdep.o mips-netbsd-tdep.o"
        ;;
 mips*-*-freebsd*)
        # Target: MIPS running FreeBSD
        gdb_target_obs="mips-tdep.o mips-fbsd-tdep.o"
-       gdb_sim=../sim/mips/libsim.a
        ;;
 mips64*-*-openbsd*)
        # Target: OpenBSD/mips64
@@ -415,28 +443,23 @@ mips64*-*-openbsd*)
 mips*-sde*-elf*)
        # Target: MIPS SDE
        gdb_target_obs="mips-tdep.o mips-sde-tdep.o"
-       gdb_sim=../sim/mips/libsim.a
        ;;
 mips*-*-elf)
        # Target: MIPS ELF
        gdb_target_obs="mips-tdep.o"
-       gdb_sim=../sim/mips/libsim.a
        ;;
 mips*-*-*)
        # Target: MIPS
        gdb_target_obs="mips-tdep.o"
-       gdb_sim=../sim/mips/libsim.a
        ;;
 
 mn10300-*-*)
        # Target: Matsushita mn10300
        gdb_target_obs="mn10300-tdep.o"
-       gdb_sim=../sim/mn10300/libsim.a
        ;;
 
-msp430*-*-elf)
+msp430-*-elf*)
        gdb_target_obs="msp430-tdep.o"
-       gdb_sim=../sim/msp430/libsim.a
        ;;
 
 nds32*-*-elf)
@@ -455,10 +478,15 @@ nios2*-*-*)
        gdb_target_obs="nios2-tdep.o"
        ;;
 
+or1k*-*-linux*)
+       # Target: OpenCores OpenRISC 1000 32-bit running Linux
+       gdb_target_obs="or1k-tdep.o or1k-linux-tdep.o solib-svr4.o \
+                       symfile-mem.o glibc-tdep.o linux-tdep.o"
+       ;;
+
 or1k-*-* | or1knd-*-*)
        # Target: OpenCores OpenRISC 1000 32-bit implementation bare metal
        gdb_target_obs="or1k-tdep.o"
-       gdb_sim=../sim/or1k/libsim.a
        ;;
 
 powerpc*-*-freebsd*)
@@ -470,9 +498,8 @@ powerpc*-*-freebsd*)
 
 powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
        # Target: NetBSD/powerpc
-       gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc-nbsd-tdep.o \
+       gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc-netbsd-tdep.o \
                        ravenscar-thread.o ppc-ravenscar-thread.o"
-       gdb_sim=../sim/ppc/libsim.a
        ;;
 powerpc-*-openbsd*)
        # Target: OpenBSD/powerpc
@@ -488,14 +515,11 @@ powerpc-*-aix* | rs6000-*-* | powerpc64-*-aix*)
 powerpc*-*-linux*)
        # Target: PowerPC running Linux
        gdb_target_obs="rs6000-tdep.o ppc-linux-tdep.o ppc-sysv-tdep.o \
-                       ppc64-tdep.o solib-svr4.o solib-spu.o \
-                       spu-multiarch.o \
+                       ppc64-tdep.o solib-svr4.o \
                        glibc-tdep.o symfile-mem.o linux-tdep.o \
                        ravenscar-thread.o ppc-ravenscar-thread.o \
                        linux-record.o \
                        arch/ppc-linux-common.o"
-       gdb_sim=../sim/ppc/libsim.a
-       build_gdbserver=yes
        ;;
 powerpc-*-lynx*178)
        # Target: PowerPC running Lynx178.
@@ -507,43 +531,38 @@ powerpc*-*-*)
        # Target: PowerPC running eabi
        gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o solib-svr4.o \
                        ravenscar-thread.o ppc-ravenscar-thread.o"
-       gdb_sim=../sim/ppc/libsim.a
        ;;
 
 s390*-*-linux*)
        # Target: S390 running Linux
        gdb_target_obs="s390-linux-tdep.o s390-tdep.o solib-svr4.o \
                        linux-tdep.o linux-record.o symfile-mem.o"
-       build_gdbserver=yes
+       ;;
+
+riscv*-*-freebsd*)
+       # Target: FreeBSD/riscv
+       gdb_target_obs="riscv-fbsd-tdep.o"
        ;;
 
 riscv*-*-linux*)
        # Target: Linux/RISC-V
-       gdb_target_obs="riscv-linux-tdep.o riscv-tdep.o glibc-tdep.o \
+       gdb_target_obs="riscv-linux-tdep.o glibc-tdep.o \
                        linux-tdep.o solib-svr4.o symfile-mem.o linux-record.o"
        ;;
 
 riscv*-*-*)
        # Target: RISC-V architecture
-       gdb_target_obs="riscv-tdep.o"
+       gdb_target_obs=""
        ;;
 
 rl78-*-elf)
        # Target: Renesas rl78
        gdb_target_obs="rl78-tdep.o"
-       gdb_sim=../sim/rl78/libsim.a
        ;;
 
-rx-*-elf)
+rx-*-*)
        # Target: Renesas RX
        gdb_target_obs="rx-tdep.o"
-       gdb_sim=../sim/rx/libsim.a
-       ;;
-
-score-*-*)
-       # Target: S+core embedded system
-       gdb_target_obs="score-tdep.o"
-       build_gdbserver=yes
        ;;
 
 sh*-*-linux*)
@@ -551,44 +570,38 @@ sh*-*-linux*)
        gdb_target_obs="sh-tdep.o sh-linux-tdep.o \
                        solib-svr4.o symfile-mem.o \
                        glibc-tdep.o linux-tdep.o"
-       gdb_sim=../sim/sh/libsim.a
-       build_gdbserver=yes
        ;;
-sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
+sh*-*-netbsd* | sh*-*-knetbsd*-gnu)
        # Target: NetBSD/sh
-       gdb_target_obs="sh-tdep.o sh-nbsd-tdep.o"
-       gdb_sim=../sim/sh/libsim.a
+       gdb_target_obs="sh-tdep.o sh-netbsd-tdep.o"
        ;;
 sh*-*-openbsd*)
        # Target: OpenBSD/sh
-       gdb_target_obs="sh-tdep.o sh-nbsd-tdep.o"
+       gdb_target_obs="sh-tdep.o sh-netbsd-tdep.o"
        ;;
 sh*)
        # Target: Embedded Renesas Super-H processor
        gdb_target_obs="sh-tdep.o"
-       gdb_sim=../sim/sh/libsim.a
        ;;
 
 sparc-*-linux*)
        # Target: GNU/Linux SPARC
-       gdb_target_obs="sparc-tdep.o sparc-sol2-tdep.o sol2-tdep.o \
+       gdb_target_obs="sparc-tdep.o \
                        sparc-linux-tdep.o solib-svr4.o symfile-mem.o \
                        linux-tdep.o \
                        ravenscar-thread.o sparc-ravenscar-thread.o"
        if test "x$enable_64_bit_bfd" = "xyes"; then
            # Target: GNU/Linux UltraSPARC
-           gdb_target_obs="sparc64-tdep.o sparc64-sol2-tdep.o \
+           gdb_target_obs="sparc64-tdep.o \
                            sparc64-linux-tdep.o ${gdb_target_obs}"
        fi
-       build_gdbserver=yes
        ;;
 sparc64-*-linux*)
        # Target: GNU/Linux UltraSPARC
-       gdb_target_obs="sparc64-tdep.o sparc64-sol2-tdep.o sol2-tdep.o \
-                       sparc64-linux-tdep.o sparc-tdep.o sparc-sol2-tdep.o \
+       gdb_target_obs="sparc64-tdep.o \
+                       sparc64-linux-tdep.o sparc-tdep.o \
                        sparc-linux-tdep.o solib-svr4.o linux-tdep.o \
                        ravenscar-thread.o sparc-ravenscar-thread.o"
-       build_gdbserver=yes
        ;;
 sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu)
        # Target: FreeBSD/sparc64
@@ -597,26 +610,26 @@ sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu)
        ;;
 sparc-*-netbsd* | sparc-*-knetbsd*-gnu)
        # Target: NetBSD/sparc
-       gdb_target_obs="sparc-tdep.o sparc-nbsd-tdep.o \
+       gdb_target_obs="sparc-tdep.o sparc-netbsd-tdep.o \
                        ravenscar-thread.o sparc-ravenscar-thread.o"
        ;;
 sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu)
        # Target: NetBSD/sparc64
-       gdb_target_obs="sparc64-tdep.o sparc64-nbsd-tdep.o sparc-tdep.o \
-                       sparc-nbsd-tdep.o \
+       gdb_target_obs="sparc64-tdep.o sparc64-netbsd-tdep.o sparc-tdep.o \
+                       sparc-netbsd-tdep.o \
                        ravenscar-thread.o sparc-ravenscar-thread.o"
        ;;
 sparc-*-openbsd*)
        # Target: OpenBSD/sparc
-       gdb_target_obs="sparc-tdep.o sparc-nbsd-tdep.o sparc-obsd-tdep.o \
-                       nbsd-tdep.o bsd-uthread.o \
+       gdb_target_obs="sparc-tdep.o sparc-netbsd-tdep.o sparc-obsd-tdep.o \
+                       netbsd-tdep.o bsd-uthread.o \
                        ravenscar-thread.o sparc-ravenscar-thread.o"
        ;;
 sparc64-*-openbsd*)
        # Target: OpenBSD/sparc64
-       gdb_target_obs="sparc64-tdep.o sparc64-nbsd-tdep.o sparc64-obsd-tdep.o \
-                       sparc-tdep.o sparc-nbsd-tdep.o sparc-obsd-tdep.o \
-                       nbsd-tdep.o bsd-uthread.o \
+       gdb_target_obs="sparc64-tdep.o sparc64-netbsd-tdep.o sparc64-obsd-tdep.o \
+                       sparc-tdep.o sparc-netbsd-tdep.o sparc-obsd-tdep.o \
+                       netbsd-tdep.o bsd-uthread.o \
                        ravenscar-thread.o sparc-ravenscar-thread.o"
        ;;
 sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
@@ -629,7 +642,6 @@ sparc-*-*)
        # Target: SPARC
        gdb_target_obs="sparc-tdep.o \
                        ravenscar-thread.o sparc-ravenscar-thread.o"
-       gdb_sim=../sim/erc32/libsim.a
        ;;
 sparc64-*-*)
        # Target: UltraSPARC
@@ -637,10 +649,9 @@ sparc64-*-*)
                        ravenscar-thread.o sparc-ravenscar-thread.o"
        ;;
 
-spu*-*-*)
-       # Target: Cell BE SPU
-       gdb_target_obs="spu-tdep.o"
-       build_gdbserver=yes
+s12z-*-*)
+       # Target: Freescale S12z
+       gdb_target_obs="s12z-tdep.o"
        ;;
 
 tic6x-*-*linux)
@@ -658,7 +669,6 @@ tilegx-*-linux*)
        # Target: TILE-Gx
        gdb_target_obs="tilegx-tdep.o tilegx-linux-tdep.o solib-svr4.o \
                        symfile-mem.o glibc-tdep.o linux-tdep.o"
-       build_gdbserver=yes
        ;;
 
 xstormy16-*-*)
@@ -669,13 +679,11 @@ xstormy16-*-*)
 
 ft32-*-elf)
        gdb_target_obs="ft32-tdep.o"
-       gdb_sim=../sim/ft32/libsim.a
        ;;
 
 v850*-*-elf | v850*-*-rtems*)
        # Target: NEC V850 processor
        gdb_target_obs="v850-tdep.o"
-       gdb_sim=../sim/v850/libsim.a
        ;;
 
 vax-*-netbsd* | vax-*-knetbsd*-gnu)
@@ -711,7 +719,6 @@ x86_64-*-linux*)
        gdb_target_obs="amd64-linux-tdep.o ${i386_tobjs}  \
                        i386-linux-tdep.o glibc-tdep.o \
                        solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o"
-       build_gdbserver=yes
        ;;
 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
        # Target: FreeBSD/amd64
@@ -721,13 +728,12 @@ x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
 x86_64-*-mingw* | x86_64-*-cygwin*)
         # Target: MingW/amd64
        gdb_target_obs="amd64-windows-tdep.o \
-                        ${i386_tobjs} i386-cygwin-tdep.o \
+                        ${i386_tobjs} i386-windows-tdep.o \
                         windows-tdep.o"
-       build_gdbserver=yes
         ;;
 x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
        # Target: NetBSD/amd64
-       gdb_target_obs="amd64-nbsd-tdep.o ${i386_tobjs}"
+       gdb_target_obs="amd64-netbsd-tdep.o ${i386_tobjs}"
        ;;
 x86_64-*-openbsd*)
        # Target: OpenBSD/amd64
@@ -738,10 +744,13 @@ x86_64-*-openbsd*)
 x86_64-*-rtems*)
        gdb_target_obs="${amd64_tobjs} ${i386_tobjs} i386-bsd-tdep.o"
        ;;
-xtensa*-*-linux*)
+xtensa*-*-*linux*)
        # Target: GNU/Linux Xtensa
        gdb_target_obs="xtensa-linux-tdep.o symfile-mem.o linux-tdep.o"
-       build_gdbserver=yes
+       ;;
+z80*)
+       # Target: Z80
+       gdb_target_obs="z80-tdep.o"
        ;;
 
 esac
@@ -750,6 +759,43 @@ esac
 
 gdb_target_obs="${cpu_obs} ${os_obs} ${gdb_target_obs}"
 
+# Get the sim settings.
+# NB: Target matching is aligned with sim/configure.ac.  Changes must be kept
+# in sync with that file.
+
+case "${targ}" in
+aarch64*-*-*)          gdb_sim=aarch64 ;;
+arm*-*-*)              gdb_sim=arm ;;
+avr*-*-*)              gdb_sim=avr ;;
+bfin-*-*)              gdb_sim=bfin ;;
+bpf-*-*)               gdb_sim=bpf ;;
+cris-*-*|cris32-*-*)   gdb_sim=cris ;;
+frv-*-*)               gdb_sim=frv ;;
+ft32-*-*)              gdb_sim=ft32 ;;
+h8300*-*-*)            gdb_sim=h8300 ;;
+iq2000-*-*)            gdb_sim=iq2000 ;;
+lm32-*-*)              gdb_sim=lm32 ;;
+m32c-*-*)              gdb_sim=m32c ;;
+m32r-*-*)              gdb_sim=m32r ;;
+m68hc11-*-*|m6811-*-*) gdb_sim=m68hc11 ;;
+microblaze*-*-*)       gdb_sim=microblaze ;;
+mips*-*-*)             gdb_sim=mips ;;
+mn10300*-*-*)          gdb_sim=mn10300 ;;
+moxie-*-*)             gdb_sim=moxie ;;
+msp430*-*-*)           gdb_sim=msp430 ;;
+or1k*-*-*)             gdb_sim=or1k ;;
+powerpc*-*-*)          gdb_sim=ppc ;;
+riscv*-*-*)            gdb_sim=riscv ;;
+rl78-*-*)              gdb_sim=rl78 ;;
+rx-*-*)                        gdb_sim=rx ;;
+sh*-*-*)               gdb_sim=sh ;;
+sparc-*-*)             gdb_sim=erc32 ;;
+v850*-*-*)             gdb_sim=v850 ;;
+esac
+if test "x$gdb_sim" != "x"; then
+  gdb_sim="../sim/${gdb_sim}/libsim.a"
+fi
+
 # map target onto default OS ABI
 
 case "${targ}" in
@@ -764,11 +810,9 @@ m68*-*-openbsd* | m88*-*-openbsd* | vax-*-openbsd*) ;;
 *-*-*-gnu*)    ;; # prevent non-GNU kernels to match the Hurd rule below
 *-*-gnu*)      gdb_osabi=GDB_OSABI_HURD ;;
 *-*-mingw32ce*)        gdb_osabi=GDB_OSABI_WINCE ;;
-*-*-mingw* | *-*-cygwin*)
-               gdb_osabi=GDB_OSABI_CYGWIN ;;
+*-*-mingw*)    gdb_osabi=GDB_OSABI_WINDOWS ;;
+*-*-cygwin*)   gdb_osabi=GDB_OSABI_CYGWIN ;;
 *-*-dicos*)    gdb_osabi=GDB_OSABI_DICOS ;;
-*-*-symbianelf*)
-               gdb_osabi=GDB_OSABI_SYMBIAN ;;
 powerpc-*-aix* | rs6000-*-* | powerpc64-*-aix*)
                 gdb_osabi=GDB_OSABI_AIX ;;
 esac