Re: [PATCH] Move gdbserver to top level

Pedro Alves
2020-01-24T15:23:15Z

On 1/19/20 7:13 PM, Tom Tromey wrote:
>
> +# Only allow gdbserver on some systems.
> +build_gdbserver=
> +case "$host" in
> +aarch64*-*-linux*)
> + # Target: AArch64 linux
> + build_gdbserver=yes
> + ;;
> +
> +arm*-wince-pe | arm*-*-mingw32ce*)
> + # Target: ARM based machine running Windows CE (win32)
> + build_gdbserver=yes
> + ;;
> +arm*-*-linux*)
> + # Target: ARM based machine running GNU/Linux
> + build_gdbserver=yes
> + ;;
> +bfin-*-*linux*)
> + # Target: Blackfin Linux
> + gdb_target_obs="bfin-tdep.o bfin-linux-tdep.o linux-tdep.o"
> + build_gdbserver=yes
> + ;;
> +i[34567]86-*-nto*)
> + # Target: Intel 386 running qnx6.
> + build_gdbserver=yes
> + ;;
> +i[34567]86-*-linux*)
> + # Target: Intel 386 running GNU/Linux
> + build_gdbserver=yes
> + ;;
> +i[34567]86-*-cygwin*)
> + # Target: Intel 386 running win32
> + build_gdbserver=yes
> + ;;
> +i[34567]86-*-mingw32*)
> + # Target: Intel 386 running win32
> + build_gdbserver=yes
> + ;;
> +ia64-*-linux*)
> + # Target: Intel IA-64 running GNU/Linux
> + build_gdbserver=yes
> + ;;
> +m32r*-*-linux*)
> + # Target: Renesas M32R running GNU/Linux
> + build_gdbserver=yes
> + ;;
> +m68*-*-linux*)
> + # Target: Motorola m68k with a.out and ELF
> + build_gdbserver=yes
> + ;;
> +mips*-*-linux*)
> + # Target: Linux/MIPS
> + build_gdbserver=yes
> + ;;
> +or1k*-*-linux*)
> + # Target: OpenCores OpenRISC 1000 32-bit running Linux
> + build_gdbserver=yes
> + ;;
> +
> +powerpc*-*-linux*)
> + # Target: PowerPC running Linux
> + build_gdbserver=yes
> + ;;
> +s390*-*-linux*)
> + # Target: S390 running Linux
> + build_gdbserver=yes
> + ;;
> +score-*-*)
> + # Target: S+core embedded system
> + build_gdbserver=yes
> + ;;
> +sh*-*-linux*)
> + # Target: GNU/Linux Super-H
> + build_gdbserver=yes
> + ;;
> +sparc-*-linux*)
> + # Target: GNU/Linux SPARC
> + build_gdbserver=yes
> + ;;
> +sparc64-*-linux*)
> + # Target: GNU/Linux UltraSPARC
> + build_gdbserver=yes
> + ;;
> +tilegx-*-linux*)
> + # Target: TILE-Gx
> + build_gdbserver=yes
> + ;;
> +x86_64-*-linux*)
> + # Target: GNU/Linux x86-64
> + build_gdbserver=yes
> + ;;
> +x86_64-*-mingw* | x86_64-*-cygwin*)
> + # Target: MingW/amd64
> + build_gdbserver=yes
> + ;;
> +xtensa*-*-*linux*)
> + # Target: GNU/Linux Xtensa
> + build_gdbserver=yes
> + ;;
> +esac
> +
> +if test "x$build_gdbserver" = x; then
> + noconfigdirs="$noconfigdirs gdbserver"
> +fi

This should really be done by sourcing a file in gdbserver/
If we do that, then the info about whether a system supports
gdbserver is contained under gdbserver/, and does not
require syncing with gcc whenever is changes.

See the section starting at:

# Disable libatomic on unsupported systems.

Thanks,
Pedro Alves