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'
86 # This is where we actually filter by host and host CPU.
89 case ${gdb_host_cpu} in
91 # Host: IBM PowerPC running AIX aix-thread.o is not
92 # listed in NATDEPFILES as it is pulled in by
94 NATDEPFILES="${NATDEPFILES} rs6000-nat.o"
96 # When compiled with cc, for debugging, this argument
97 # should be passed. We have no idea who our current
98 # compiler is though, so we skip it.
99 # MH_CFLAGS='-bnodelcsect'
104 case ${gdb_host_cpu} in
106 # Host: Little-endian Alpha running Linux
107 NATDEPFILES="${NATDEPFILES} alpha-linux-nat.o"
108 # doublest.c currently assumes some properties of FP arithmetic
109 # on the host which require this.
115 case ${gdb_host_cpu} in
117 # Native config information for GDB on i386
118 # systems running Cygwin.
119 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
124 case ${gdb_host_cpu} in
126 # Native config information for GDB on amd64
127 # systems running Cygwin.
128 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
133 case ${gdb_host_cpu} in
135 # Host: IA86 running Darwin
136 NATDEPFILES='fork-child.o darwin-nat.o \
137 i386-darwin-nat.o x86-nat.o x86-dregs.o amd64-nat.o \
143 case ${gdb_host_cpu} in
146 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
147 x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o"
152 NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o"
156 # Native config information for GDB on PowerPC
157 # systems running FreeBSD.
158 NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o"
161 # Host: FreeBSD/sparc64
162 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
163 sparc64-fbsd-nat.o bsd-kvm.o"
168 case ${gdb_host_cpu} in
170 # Host: FreeBSD/amd64
171 NATDEPFILES="${NATDEPFILES} amd64-nat.o amd64-bsd-nat.o \
172 amd64-fbsd-nat.o bsd-kvm.o x86-nat.o x86-dregs.o x86-bsd-nat.o"
177 case ${gdb_host_cpu} in
179 # Host: Intel x86 running DJGPP
180 # We include several header files from config/djgpp
181 MH_CFLAGS='-I$(srcdir)/config/djgpp'
182 NATDEPFILES='go32-nat.o x86-nat.o x86-dregs.o'
188 case ${gdb_host_cpu} in
190 # Host: Intel 386 running the GNU Hurd
191 NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
192 x86-nat.o x86-dregs.o fork-child.o \
193 notify_S.o process_reply_S.o msg_reply_S.o \
194 msg_U.o exc_request_U.o exc_request_S.o'
195 HAVE_NATIVE_GCORE_HOST=1
197 NAT_FILE='nm-i386gnu.h'
198 MH_CFLAGS='-D_GNU_SOURCE'
200 XM_CLIBS='-lshouldbeinlibc'
202 nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
207 case ${gdb_host_cpu} in
210 NATDEPFILES='fork-child.o i386-v4-nat.o i386-sol2-nat.o \
211 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
212 HAVE_NATIVE_GCORE_HOST=1
217 case ${gdb_host_cpu} in
219 # Host: AArch64 based machine running GNU/Linux
220 NATDEPFILES="${NATDEPFILES} aarch64-linux-nat.o \
221 aarch32-linux-nat.o aarch64-linux-hw-point.o aarch64-linux.o"
224 # Host: ARM based machine running GNU/Linux
225 NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
229 # Host: Intel 386 running GNU/Linux.
230 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
231 i386-linux-nat.o x86-linux-nat.o linux-btrace.o \
232 x86-linux.o x86-linux-dregs.o"
235 # Host: Intel IA-64 running GNU/Linux
236 NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o"
239 # Host: M32R based machine running GNU/Linux
240 NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o"
243 # Host: Motorola m68k running GNU/Linux.
244 NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o"
248 NATDEPFILES="${NATDEPFILES} mips-linux-nat.o \
252 # Host: Hewlett-Packard PA-RISC machine, running Linux
253 NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o"
256 # Host: PowerPC, running Linux
257 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o"
260 # Host: S390, running Linux
261 NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
264 # Host: GNU/Linux SPARC
265 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o"
268 # Host: Tilera TILE-Gx running GNU/Linux.
269 NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o"
273 # Host: Xtensa, running GNU/Linux.
274 NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o"
279 case ${gdb_host_cpu} in
281 # Host: GNU/Linux x86-64
282 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
283 amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \
284 x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
287 # Host: GNU/Linux UltraSPARC
288 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
294 case ${gdb_host_cpu} in
296 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
301 case ${gdb_host_cpu} in
303 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
308 case ${gdb_host_cpu} in
311 NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o"
316 NATDEPFILES="${NATDEPFILES} mips-nbsd-nat.o"
320 NATDEPFILES="${NATDEPFILES} nbsd-nat.o hppa-nbsd-nat.o"
323 # Host: NetBSD/powerpc
324 NATDEPFILES="${NATDEPFILES} ppc-nbsd-nat.o bsd-kvm.o"
329 NATDEPFILES="${NATDEPFILES} sh-nbsd-nat.o"
335 case ${gdb_host_cpu} in
338 NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o \
339 x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
342 # Host: NetBSD/sparc64
343 NATDEPFILES="${NATDEPFILES} sparc64-nbsd-nat.o sparc-nat.o \
350 case ${gdb_host_cpu} in
353 NATDEPFILES="${NATDEPFILES} arm-nbsd-nat.o"
356 # Host: NetBSD/i386 ELF
357 NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-bsd-nat.o \
358 i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o"
362 # Host: NetBSD/m68k ELF
363 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
367 # Host: NetBSD/sparc ELF
368 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-nbsd-nat.o \
373 # Host: NetBSD/vax ELF
374 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
381 case ${gdb_host_cpu} in
383 # Host: Intel 386 running QNX.
384 NATDEPFILES='nto-procfs.o'
385 NAT_FILE='config/nm-nto.h'
390 case ${gdb_host_cpu} in
392 # Host: OpenBSD/i386 ELF
393 NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \
394 i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o"
399 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
404 NATDEPFILES="${NATDEPFILES} m88k-bsd-nat.o"
408 NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o"
411 # Host: OpenBSD/powerpc
412 NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o"
417 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
423 case ${gdb_host_cpu} in
425 # Host: OpenBSD/amd64
426 NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
427 x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
431 # Host: OpenBSD/mips64
432 NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o"
435 # Host: OpenBSD/sparc64
436 NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \
437 sparc-nat.o bsd-kvm.o"
443 case ${gdb_host_cpu} in
445 # Host: PowerPC64, running Linux
447 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
452 case ${gdb_host_cpu} in
454 # Host: Solaris SPARC & UltraSPARC
456 NATDEPFILES='sparc-sol2-nat.o \
458 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
459 HAVE_NATIVE_GCORE_HOST=1
464 case ${gdb_host_cpu} in
466 # Host: Solaris x86_64
467 NATDEPFILES='fork-child.o amd64-nat.o i386-v4-nat.o i386-sol2-nat.o \
468 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
469 HAVE_NATIVE_GCORE_HOST=1
474 case ${gdb_host_cpu} in
476 # Target: Cell BE (PowerPC64 + SPU)
477 # This implements a 'pseudo-native' GDB running on the
478 # PPU side of the Cell BE and debugging the SPU side.
482 NATDEPFILES='spu-linux-nat.o fork-child.o inf-ptrace.o \
483 linux-procfs.o linux-ptrace.o linux-waitpid.o \
484 linux-personality.o linux-namespaces.o'