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'
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 \
91 # This is where we actually filter by host and host CPU.
94 case ${gdb_host_cpu} in
96 # Host: IBM PowerPC running AIX aix-thread.o is not
97 # listed in NATDEPFILES as it is pulled in by
99 NATDEPFILES="${NATDEPFILES} rs6000-nat.o"
101 # When compiled with cc, for debugging, this argument
102 # should be passed. We have no idea who our current
103 # compiler is though, so we skip it.
104 # MH_CFLAGS='-bnodelcsect'
109 case ${gdb_host_cpu} in
111 # Host: Little-endian Alpha running Linux
112 NATDEPFILES="${NATDEPFILES} alpha-linux-nat.o"
113 # doublest.c currently assumes some properties of FP arithmetic
114 # on the host which require this.
120 case ${gdb_host_cpu} in
122 # Native config information for GDB on i386
123 # systems running Cygwin.
124 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
129 case ${gdb_host_cpu} in
131 # Native config information for GDB on amd64
132 # systems running Cygwin.
133 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
138 case ${gdb_host_cpu} in
140 # Host: IA86 running Darwin
141 NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \
142 x86-dregs.o amd64-nat.o"
147 case ${gdb_host_cpu} in
149 # Host: FreeBSD/aarch64
150 NATDEPFILES="${NATDEPFILES} aarch64-fbsd-nat.o"
155 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
156 x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o"
161 NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o"
165 # Native config information for GDB on PowerPC
166 # systems running FreeBSD.
167 NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o"
170 # Host: FreeBSD/sparc64
171 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
172 sparc64-fbsd-nat.o bsd-kvm.o"
177 case ${gdb_host_cpu} in
179 # Host: FreeBSD/amd64
180 NATDEPFILES="${NATDEPFILES} amd64-nat.o amd64-bsd-nat.o \
181 amd64-fbsd-nat.o bsd-kvm.o x86-nat.o x86-dregs.o x86-bsd-nat.o"
186 case ${gdb_host_cpu} in
188 # Host: Intel x86 running DJGPP
189 # We include several header files from config/djgpp
190 MH_CFLAGS='-I$(srcdir)/config/djgpp'
191 NATDEPFILES='go32-nat.o x86-nat.o x86-dregs.o'
197 case ${gdb_host_cpu} in
199 # Host: Intel 386 running the GNU Hurd
200 NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
201 x86-nat.o x86-dregs.o fork-child.o \
202 notify_S.o process_reply_S.o msg_reply_S.o \
203 msg_U.o exc_request_U.o exc_request_S.o'
204 HAVE_NATIVE_GCORE_HOST=1
206 NAT_FILE='nm-i386gnu.h'
207 MH_CFLAGS='-D_GNU_SOURCE'
209 XM_CLIBS='-lshouldbeinlibc'
211 nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
216 case ${gdb_host_cpu} in
219 NATDEPFILES='fork-child.o fork-inferior.o \
220 i386-v4-nat.o i386-sol2-nat.o \
221 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
222 HAVE_NATIVE_GCORE_HOST=1
227 case ${gdb_host_cpu} in
229 # Host: AArch64 based machine running GNU/Linux
230 NATDEPFILES="${NATDEPFILES} aarch64-linux-nat.o \
231 aarch32-linux-nat.o aarch64-linux-hw-point.o aarch64-linux.o"
234 # Host: ARM based machine running GNU/Linux
235 NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
239 # Host: Intel 386 running GNU/Linux.
240 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
241 i386-linux-nat.o x86-linux-nat.o linux-btrace.o \
242 x86-linux.o x86-linux-dregs.o"
245 # Host: Intel IA-64 running GNU/Linux
246 NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o"
249 # Host: M32R based machine running GNU/Linux
250 NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o"
253 # Host: Motorola m68k running GNU/Linux.
254 NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o"
258 NATDEPFILES="${NATDEPFILES} mips-linux-nat.o \
262 # Host: Hewlett-Packard PA-RISC machine, running Linux
263 NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o"
266 # Host: PowerPC, running Linux
267 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o"
270 # Host: S390, running Linux
271 NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
274 # Host: GNU/Linux SPARC
275 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o"
278 # Host: Tilera TILE-Gx running GNU/Linux.
279 NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o"
283 # Host: Xtensa, running GNU/Linux.
284 NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o"
289 case ${gdb_host_cpu} in
291 # Host: GNU/Linux x86-64
292 NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \
293 amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \
294 x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o"
297 # Host: GNU/Linux UltraSPARC
298 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
304 case ${gdb_host_cpu} in
306 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
311 case ${gdb_host_cpu} in
313 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
318 case ${gdb_host_cpu} in
321 NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o"
326 NATDEPFILES="${NATDEPFILES} mips-nbsd-nat.o"
330 NATDEPFILES="${NATDEPFILES} nbsd-nat.o hppa-nbsd-nat.o"
333 # Host: NetBSD/powerpc
334 NATDEPFILES="${NATDEPFILES} ppc-nbsd-nat.o bsd-kvm.o"
339 NATDEPFILES="${NATDEPFILES} sh-nbsd-nat.o"
345 case ${gdb_host_cpu} in
348 NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o x86-nat.o \
349 x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
352 # Host: NetBSD/sparc64
353 NATDEPFILES="${NATDEPFILES} sparc64-nbsd-nat.o sparc-nat.o \
361 case ${gdb_host_cpu} in
364 NATDEPFILES="${NATDEPFILES} arm-nbsd-nat.o"
367 # Host: NetBSD/i386 ELF
368 NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-nat.o x86-dregs.o \
369 x86-bsd-nat.o i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o"
373 # Host: NetBSD/m68k ELF
374 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
378 # Host: NetBSD/sparc ELF
379 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-nbsd-nat.o \
384 # Host: NetBSD/vax ELF
385 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
392 case ${gdb_host_cpu} in
394 # Host: Intel 386 running QNX.
395 NATDEPFILES='nto-procfs.o'
396 NAT_FILE='config/nm-nto.h'
401 case ${gdb_host_cpu} in
403 # Host: OpenBSD/i386 ELF
404 NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \
405 i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o"
410 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
415 NATDEPFILES="${NATDEPFILES} m88k-bsd-nat.o"
419 NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o"
422 # Host: OpenBSD/powerpc
423 NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o"
428 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
434 case ${gdb_host_cpu} in
436 # Host: OpenBSD/amd64
437 NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
438 x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
442 # Host: OpenBSD/mips64
443 NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o"
446 # Host: OpenBSD/sparc64
447 NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \
448 sparc-nat.o bsd-kvm.o"
454 case ${gdb_host_cpu} in
456 # Host: PowerPC64, running Linux
458 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o"
463 case ${gdb_host_cpu} in
465 # Host: Solaris SPARC & UltraSPARC
467 NATDEPFILES='sparc-sol2-nat.o \
468 fork-child.o fork-inferior.o \
469 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
470 HAVE_NATIVE_GCORE_HOST=1
475 case ${gdb_host_cpu} in
477 # Host: Solaris x86_64
478 NATDEPFILES='fork-child.o fork-inferior.o \
479 amd64-nat.o i386-v4-nat.o i386-sol2-nat.o \
480 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o'
481 HAVE_NATIVE_GCORE_HOST=1
486 case ${gdb_host_cpu} in
488 # Target: Cell BE (PowerPC64 + SPU)
489 # This implements a 'pseudo-native' GDB running on the
490 # PPU side of the Cell BE and debugging the SPU side.
494 NATDEPFILES='spu-linux-nat.o fork-child.o inf-ptrace.o \
495 linux-procfs.o linux-ptrace.o linux-waitpid.o \
496 linux-personality.o linux-namespaces.o'