2 # Copyright (C) 2013-2017 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'
73 NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o'
76 NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o'
79 NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o'
82 NATDEPFILES='fork-inferior.o fork-child.o inf-ptrace.o'
85 NATDEPFILES='fork-child.o fork-inferior.o darwin-nat.o \
90 # This is where we actually filter by host and host CPU.
93 case ${gdb_host_cpu} in
95 # Host: IBM PowerPC running AIX aix-thread.o is not
96 # listed in NATDEPFILES as it is pulled in by
98 NATDEPFILES="${NATDEPFILES} rs6000-nat.o"
100 # When compiled with cc, for debugging, this argument
101 # should be passed. We have no idea who our current
102 # compiler is though, so we skip it.
103 # MH_CFLAGS='-bnodelcsect'
108 case ${gdb_host_cpu} in
110 # Host: Little-endian Alpha running Linux
111 NATDEPFILES="${NATDEPFILES} alpha-linux-nat.o"
112 # doublest.c currently assumes some properties of FP arithmetic
113 # on the host which require this.
119 case ${gdb_host_cpu} in
121 # Native config information for GDB on i386
122 # systems running Cygwin.
123 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
128 case ${gdb_host_cpu} in
130 # Native config information for GDB on amd64
131 # systems running Cygwin.
132 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
137 case ${gdb_host_cpu} in
139 # Host: IA86 running Darwin
140 NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \
141 x86-dregs.o amd64-nat.o"
146 case ${gdb_host_cpu} in
148 # Host: FreeBSD/aarch64
149 NATDEPFILES="${NATDEPFILES} aarch64-fbsd-nat.o"
154 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
155 x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o"
160 NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o"
164 # Native config information for GDB on PowerPC
165 # systems running FreeBSD.
166 NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o"
169 # Host: FreeBSD/sparc64
170 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
171 sparc64-fbsd-nat.o bsd-kvm.o"
176 case ${gdb_host_cpu} in
178 # Host: FreeBSD/amd64
179 NATDEPFILES="${NATDEPFILES} amd64-nat.o amd64-bsd-nat.o \
180 amd64-fbsd-nat.o bsd-kvm.o x86-nat.o x86-dregs.o x86-bsd-nat.o"
185 case ${gdb_host_cpu} in
187 # Host: Intel x86 running DJGPP
188 # We include several header files from config/djgpp
189 MH_CFLAGS='-I$(srcdir)/config/djgpp'
190 NATDEPFILES='go32-nat.o x86-nat.o x86-dregs.o'
196 case ${gdb_host_cpu} in
198 # Host: Intel 386 running the GNU Hurd
199 NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
200 x86-nat.o x86-dregs.o fork-child.o \
201 notify_S.o process_reply_S.o msg_reply_S.o \
202 msg_U.o exc_request_U.o exc_request_S.o'
203 HAVE_NATIVE_GCORE_HOST=1
205 NAT_FILE='nm-i386gnu.h'
206 MH_CFLAGS='-D_GNU_SOURCE'
208 XM_CLIBS='-lshouldbeinlibc'
210 nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
215 case ${gdb_host_cpu} in
218 NATDEPFILES='fork-child.o i386-v4-nat.o i386-sol2-nat.o \
219 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
220 HAVE_NATIVE_GCORE_HOST=1
225 case ${gdb_host_cpu} in
227 # Host: AArch64 based machine running GNU/Linux
228 NATDEPFILES="${NATDEPFILES} aarch64-linux-nat.o \
229 aarch32-linux-nat.o aarch64-linux-hw-point.o aarch64-linux.o"
232 # Host: ARM based machine running GNU/Linux
233 NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
237 # Host: Intel 386 running GNU/Linux.
238 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
239 i386-linux-nat.o x86-linux-nat.o linux-btrace.o \
240 x86-linux.o x86-linux-dregs.o"
243 # Host: Intel IA-64 running GNU/Linux
244 NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o"
247 # Host: M32R based machine running GNU/Linux
248 NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o"
251 # Host: Motorola m68k running GNU/Linux.
252 NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o"
256 NATDEPFILES="${NATDEPFILES} mips-linux-nat.o \
260 # Host: Hewlett-Packard PA-RISC machine, running Linux
261 NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o"
264 # Host: PowerPC, running Linux
265 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o"
268 # Host: S390, running Linux
269 NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
272 # Host: GNU/Linux SPARC
273 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o"
276 # Host: Tilera TILE-Gx running GNU/Linux.
277 NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o"
281 # Host: Xtensa, running GNU/Linux.
282 NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o"
287 case ${gdb_host_cpu} in
289 # Host: GNU/Linux x86-64
290 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
291 amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \
292 x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
295 # Host: GNU/Linux UltraSPARC
296 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
302 case ${gdb_host_cpu} in
304 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
309 case ${gdb_host_cpu} in
311 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
316 case ${gdb_host_cpu} in
319 NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o"
324 NATDEPFILES="${NATDEPFILES} mips-nbsd-nat.o"
328 NATDEPFILES="${NATDEPFILES} nbsd-nat.o hppa-nbsd-nat.o"
331 # Host: NetBSD/powerpc
332 NATDEPFILES="${NATDEPFILES} ppc-nbsd-nat.o bsd-kvm.o"
337 NATDEPFILES="${NATDEPFILES} sh-nbsd-nat.o"
343 case ${gdb_host_cpu} in
346 NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o x86-nat.o \
347 x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
350 # Host: NetBSD/sparc64
351 NATDEPFILES="${NATDEPFILES} sparc64-nbsd-nat.o sparc-nat.o \
359 case ${gdb_host_cpu} in
362 NATDEPFILES="${NATDEPFILES} arm-nbsd-nat.o"
365 # Host: NetBSD/i386 ELF
366 NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-nat.o x86-dregs.o \
367 x86-bsd-nat.o i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o"
371 # Host: NetBSD/m68k ELF
372 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
376 # Host: NetBSD/sparc ELF
377 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-nbsd-nat.o \
382 # Host: NetBSD/vax ELF
383 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
390 case ${gdb_host_cpu} in
392 # Host: Intel 386 running QNX.
393 NATDEPFILES='nto-procfs.o'
394 NAT_FILE='config/nm-nto.h'
399 case ${gdb_host_cpu} in
401 # Host: OpenBSD/i386 ELF
402 NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \
403 i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o"
408 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
413 NATDEPFILES="${NATDEPFILES} m88k-bsd-nat.o"
417 NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o"
420 # Host: OpenBSD/powerpc
421 NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o"
426 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
432 case ${gdb_host_cpu} in
434 # Host: OpenBSD/amd64
435 NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
436 x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
440 # Host: OpenBSD/mips64
441 NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o"
444 # Host: OpenBSD/sparc64
445 NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \
446 sparc-nat.o bsd-kvm.o"
452 case ${gdb_host_cpu} in
454 # Host: PowerPC64, running Linux
456 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
461 case ${gdb_host_cpu} in
463 # Host: Solaris SPARC & UltraSPARC
465 NATDEPFILES='sparc-sol2-nat.o \
467 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
468 HAVE_NATIVE_GCORE_HOST=1
473 case ${gdb_host_cpu} in
475 # Host: Solaris x86_64
476 NATDEPFILES='fork-child.o amd64-nat.o i386-v4-nat.o i386-sol2-nat.o \
477 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
478 HAVE_NATIVE_GCORE_HOST=1
483 case ${gdb_host_cpu} in
485 # Target: Cell BE (PowerPC64 + SPU)
486 # This implements a 'pseudo-native' GDB running on the
487 # PPU side of the Cell BE and debugging the SPU side.
491 NATDEPFILES='spu-linux-nat.o fork-child.o inf-ptrace.o \
492 linux-procfs.o linux-ptrace.o linux-waitpid.o \
493 linux-personality.o linux-namespaces.o'