2 # Copyright (C) 2013-2018 Free Software Foundation, Inc.
4 # This file is part of GDB.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # Variables defined here:
21 # NAT_FILE - The header file with definitions for this native target.
23 # NATDEPFILES - Source files required for native debugging on this
26 # NAT_CDEPS - Dynamic symbols to be exported for libthread_db.
28 # LOADLIBES - Libraries against which GDB will be linked for this
31 # MH_CFLAGS - Additional CFLAGS for this host.
33 # XM_CLIBS - Host-dependent libraries against which GDB will be linked
34 # for this native target.
36 # HAVE_NATIVE_GCORE_HOST - Whether gcore should be installed on this
39 # nat_makefile_frag - Name of the (optional) Makefile fragment file
40 # required to build the native target. The
41 # fragment is incorporated into the Makefile that
42 # configure constructs from Makefile.in.
46 # - To avoid shell expansion of variables, declare them with single
49 # - nat_makefile_frag must contain the full path of the file.
52 # This first case is useful for filling default values for each
56 NAT_FILE='config/nm-linux.h'
57 NATDEPFILES='inf-ptrace.o fork-child.o fork-inferior.o proc-service.o \
58 linux-thread-db.o linux-nat.o linux-osdata.o linux-fork.o \
59 linux-procfs.o linux-ptrace.o linux-waitpid.o \
60 linux-personality.o linux-namespaces.o'
61 NAT_CDEPS='$(srcdir)/proc-service.list'
62 LOADLIBES='-ldl $(RDYNAMIC)'
65 NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o'
66 HAVE_NATIVE_GCORE_HOST=1
70 NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o'
71 HAVE_NATIVE_GCORE_HOST=1
74 NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o'
77 NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o'
80 NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o'
83 NATDEPFILES='fork-inferior.o fork-child.o inf-ptrace.o'
86 NATDEPFILES='fork-child.o fork-inferior.o darwin-nat.o \
90 NATDEPFILES='fork-child.o fork-inferior.o \
91 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
93 HAVE_NATIVE_GCORE_HOST=1
97 # This is where we actually filter by host and host CPU.
100 case ${gdb_host_cpu} in
102 # Host: IBM PowerPC running AIX aix-thread.o is not
103 # listed in NATDEPFILES as it is pulled in by
105 NATDEPFILES="${NATDEPFILES} rs6000-nat.o"
107 # When compiled with cc, for debugging, this argument
108 # should be passed. We have no idea who our current
109 # compiler is though, so we skip it.
110 # MH_CFLAGS='-bnodelcsect'
115 case ${gdb_host_cpu} in
117 # Host: Little-endian Alpha running Linux
118 NATDEPFILES="${NATDEPFILES} linux-nat-trad.o alpha-linux-nat.o"
119 # doublest.c currently assumes some properties of FP arithmetic
120 # on the host which require this.
126 case ${gdb_host_cpu} in
128 # Native config information for GDB on i386
129 # systems running Cygwin.
130 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
135 case ${gdb_host_cpu} in
137 # Native config information for GDB on amd64
138 # systems running Cygwin.
139 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
144 case ${gdb_host_cpu} in
146 # Host: IA86 running Darwin
147 NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \
148 x86-dregs.o amd64-nat.o"
153 case ${gdb_host_cpu} in
155 # Host: FreeBSD/aarch64
156 NATDEPFILES="${NATDEPFILES} aarch64-fbsd-nat.o"
161 NATDEPFILES="${NATDEPFILES} arm-fbsd-nat.o"
166 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
167 x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o"
171 NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o"
175 # Native config information for GDB on PowerPC
176 # systems running FreeBSD.
177 NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o"
180 # Host: FreeBSD/riscv
181 NATDEPFILES="${NATDEPFILES} riscv-fbsd-nat.o"
184 # Host: FreeBSD/sparc64
185 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
186 sparc64-fbsd-nat.o bsd-kvm.o"
191 case ${gdb_host_cpu} in
193 # Host: FreeBSD/amd64
194 NATDEPFILES="${NATDEPFILES} amd64-nat.o amd64-bsd-nat.o \
195 amd64-fbsd-nat.o bsd-kvm.o x86-nat.o x86-dregs.o x86-bsd-nat.o"
200 case ${gdb_host_cpu} in
202 # Host: Intel x86 running DJGPP
203 # We include several header files from config/djgpp
204 MH_CFLAGS='-I$(srcdir)/config/djgpp'
205 NATDEPFILES='go32-nat.o x86-nat.o x86-dregs.o'
211 case ${gdb_host_cpu} in
213 # Host: Intel 386 running the GNU Hurd
214 NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
215 x86-nat.o x86-dregs.o fork-child.o \
216 notify_S.o process_reply_S.o msg_reply_S.o \
217 msg_U.o exc_request_U.o exc_request_S.o'
218 HAVE_NATIVE_GCORE_HOST=1
220 NAT_FILE='nm-i386gnu.h'
221 MH_CFLAGS='-D_GNU_SOURCE'
223 XM_CLIBS='-lshouldbeinlibc'
225 nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
230 case ${gdb_host_cpu} in
232 # Host: AArch64 based machine running GNU/Linux
233 NATDEPFILES="${NATDEPFILES} aarch64-linux-nat.o \
234 aarch32-linux-nat.o aarch64-linux-hw-point.o aarch64-linux.o \
235 aarch64-sve-linux-ptrace.o"
238 # Host: ARM based machine running GNU/Linux
239 NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
243 # Host: Intel 386 running GNU/Linux.
244 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
245 i386-linux-nat.o x86-linux-nat.o linux-btrace.o \
246 x86-linux.o x86-linux-dregs.o"
249 # Host: Intel IA-64 running GNU/Linux
250 NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o"
253 # Host: M32R based machine running GNU/Linux
254 NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o"
257 # Host: Motorola m68k running GNU/Linux.
258 NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o"
262 NATDEPFILES="${NATDEPFILES} linux-nat-trad.o \
263 mips-linux-nat.o mips-linux-watch.o"
266 # Host: Hewlett-Packard PA-RISC machine, running Linux
267 NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o"
270 # Host: PowerPC, running Linux
271 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
274 # Host: RISC-V, running Linux
275 NATDEPFILES="${NATDEPFILES} riscv-linux-nat.o"
278 # Host: S390, running Linux
279 NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
282 # Host: GNU/Linux SPARC
283 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o"
286 # Host: Tilera TILE-Gx running GNU/Linux.
287 NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o"
291 # Host: Xtensa, running GNU/Linux.
292 NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o"
297 case ${gdb_host_cpu} in
299 # Host: GNU/Linux x86-64
300 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
301 amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \
302 x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
305 # Host: GNU/Linux UltraSPARC
306 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
312 case ${gdb_host_cpu} in
314 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
319 case ${gdb_host_cpu} in
321 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
326 case ${gdb_host_cpu} in
329 NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o"
334 NATDEPFILES="${NATDEPFILES} mips-nbsd-nat.o"
338 NATDEPFILES="${NATDEPFILES} nbsd-nat.o hppa-nbsd-nat.o"
341 # Host: NetBSD/powerpc
342 NATDEPFILES="${NATDEPFILES} ppc-nbsd-nat.o bsd-kvm.o"
347 NATDEPFILES="${NATDEPFILES} sh-nbsd-nat.o"
353 case ${gdb_host_cpu} in
356 NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o x86-nat.o \
357 x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
360 # Host: NetBSD/sparc64
361 NATDEPFILES="${NATDEPFILES} sparc64-nbsd-nat.o sparc-nat.o \
369 case ${gdb_host_cpu} in
372 NATDEPFILES="${NATDEPFILES} arm-nbsd-nat.o"
375 # Host: NetBSD/i386 ELF
376 NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-nat.o x86-dregs.o \
377 x86-bsd-nat.o i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o"
381 # Host: NetBSD/m68k ELF
382 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
386 # Host: NetBSD/sparc ELF
387 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-nbsd-nat.o \
392 # Host: NetBSD/vax ELF
393 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
400 case ${gdb_host_cpu} in
402 # Host: Intel 386 running QNX.
403 NATDEPFILES='nto-procfs.o'
404 NAT_FILE='config/nm-nto.h'
409 case ${gdb_host_cpu} in
411 # Host: OpenBSD/i386 ELF
412 NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \
413 i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o"
418 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
423 NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o"
426 # Host: OpenBSD/powerpc
427 NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o"
432 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
438 case ${gdb_host_cpu} in
440 # Host: OpenBSD/amd64
441 NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
442 x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
446 # Host: OpenBSD/mips64
447 NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o"
450 # Host: OpenBSD/sparc64
451 NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \
452 sparc-nat.o bsd-kvm.o"
458 case ${gdb_host_cpu} in
460 # Host: PowerPC64, running Linux
462 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
467 case ${gdb_host_cpu} in
469 # Host: Solaris x86_64
470 NATDEPFILES="${NATDEPFILES} \
471 amd64-nat.o i386-sol2-nat.o"
474 # Host: Solaris SPARC & UltraSPARC
476 NATDEPFILES="${NATDEPFILES} sparc-sol2-nat.o"
481 case ${gdb_host_cpu} in
483 # Target: Cell BE (PowerPC64 + SPU)
484 # This implements a 'pseudo-native' GDB running on the
485 # PPU side of the Cell BE and debugging the SPU side.
489 NATDEPFILES='spu-linux-nat.o \
490 inf-ptrace.o fork-child.o fork-inferior.o \
491 linux-procfs.o linux-ptrace.o linux-waitpid.o \
492 linux-personality.o linux-namespaces.o'