2 # Copyright (C) 2013-2024 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 nat/fork-inferior.o \
59 linux-thread-db.o linux-nat.o nat/linux-osdata.o linux-fork.o \
60 nat/linux-procfs.o nat/linux-ptrace.o nat/linux-waitpid.o \
61 nat/linux-personality.o nat/linux-namespaces.o'
62 NAT_CDEPS='$(srcdir)/proc-service.list'
63 LOADLIBES='-ldl $(RDYNAMIC)'
66 NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o fbsd-nat.o'
67 HAVE_NATIVE_GCORE_HOST=1
71 NATDEPFILES='fork-child.o nat/fork-inferior.o nat/netbsd-nat.o inf-ptrace.o'
72 HAVE_NATIVE_GCORE_HOST=1
75 NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o'
78 NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o nat/windows-nat.o'
81 NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o nat/windows-nat.o'
84 NATDEPFILES='nat/fork-inferior.o fork-child.o inf-ptrace.o'
87 NATDEPFILES='fork-child.o nat/fork-inferior.o darwin-nat.o \
91 NATDEPFILES='fork-child.o nat/fork-inferior.o \
92 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
94 HAVE_NATIVE_GCORE_HOST=1
98 # This is where we actually filter by host and host CPU.
101 case ${gdb_host_cpu} in
103 # Host: IBM PowerPC running AIX aix-thread.o is not
104 # listed in NATDEPFILES as it is pulled in by
106 NATDEPFILES="${NATDEPFILES} rs6000-aix-nat.o"
108 # When compiled with cc, for debugging, this argument
109 # should be passed. We have no idea who our current
110 # compiler is though, so we skip it.
111 # MH_CFLAGS='-bnodelcsect'
116 case ${gdb_host_cpu} in
118 # Host: Little-endian Alpha running Linux
119 NATDEPFILES="${NATDEPFILES} linux-nat-trad.o alpha-linux-nat.o"
120 # doublest.c currently assumes some properties of FP arithmetic
121 # on the host which require this.
127 case ${gdb_host_cpu} in
129 # Native config information for GDB on i386
130 # systems running Cygwin.
131 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
136 case ${gdb_host_cpu} in
138 # Native config information for GDB on amd64
139 # systems running Cygwin.
140 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o amd64-windows-nat.o"
145 case ${gdb_host_cpu} in
147 # Host: IA86 running Darwin
148 NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \
149 nat/x86-dregs.o amd64-nat.o"
154 case ${gdb_host_cpu} in
156 # Host: FreeBSD/aarch64
157 NATDEPFILES="${NATDEPFILES} aarch64-nat.o \
158 nat/aarch64-hw-point.o aarch64-fbsd-nat.o"
163 NATDEPFILES="${NATDEPFILES} arm-fbsd-nat.o"
168 NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
169 nat/x86-xstate.o x86-bsd-nat.o x86-fbsd-nat.o i386-fbsd-nat.o \
174 NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o"
178 # Native config information for GDB on PowerPC
179 # systems running FreeBSD.
180 NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o"
183 # Host: FreeBSD/riscv
184 NATDEPFILES="${NATDEPFILES} riscv-fbsd-nat.o"
187 # Host: FreeBSD/sparc64
188 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
189 sparc64-fbsd-nat.o bsd-kvm.o"
194 case ${gdb_host_cpu} in
196 # Host: FreeBSD/amd64
197 NATDEPFILES="${NATDEPFILES} amd64-nat.o \
198 amd64-fbsd-nat.o bsd-kvm.o x86-nat.o nat/x86-dregs.o \
199 nat/x86-xstate.o x86-bsd-nat.o x86-fbsd-nat.o"
204 case ${gdb_host_cpu} in
206 # Host: Intel x86 running DJGPP
207 # We include several header files from config/djgpp
208 MH_CFLAGS='-I$(srcdir)/config/djgpp'
209 NATDEPFILES='go32-nat.o x86-nat.o nat/x86-dregs.o'
215 case ${gdb_host_cpu} in
217 # Host: Intel 386 running the GNU Hurd
218 NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
219 x86-nat.o nat/x86-dregs.o fork-child.o \
220 nat/fork-inferior.o \
221 notify_S.o process_reply_S.o msg_reply_S.o \
222 msg_U.o exc_request_U.o exc_request_S.o'
223 HAVE_NATIVE_GCORE_HOST=1
225 NAT_FILE='nm-i386gnu.h'
226 MH_CFLAGS='-D_GNU_SOURCE'
228 XM_CLIBS='-lshouldbeinlibc'
230 nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
235 case ${gdb_host_cpu} in
237 # Host: AArch64 based machine running GNU/Linux
238 NATDEPFILES="${NATDEPFILES} aarch64-nat.o aarch64-linux-nat.o \
239 aarch32-linux-nat.o nat/aarch64-hw-point.o \
240 nat/aarch64-linux-hw-point.o \
241 nat/aarch64-linux.o \
242 nat/aarch64-scalable-linux-ptrace.o \
243 nat/aarch64-mte-linux-ptrace.o"
246 # Host: ARC based machine running GNU/Linux
247 NATDEPFILES="${NATDEPFILES} arc-linux-nat.o"
250 # Host: ARM based machine running GNU/Linux
251 NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
255 # Host: Intel 386 running GNU/Linux.
256 NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
258 i386-linux-nat.o x86-linux-nat.o nat/linux-btrace.o \
259 nat/x86-linux.o nat/x86-linux-dregs.o nat/i386-linux.o \
260 nat/x86-linux-tdesc.o arch/i386-linux-tdesc.o \
261 arch/x86-linux-tdesc-features.o"
264 # Host: Intel IA-64 running GNU/Linux
265 NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o"
268 # Host: LoongArch, running GNU/Linux.
269 NATDEPFILES="${NATDEPFILES} loongarch-linux-nat.o linux-nat-trad.o \
270 nat/loongarch-hw-point.o nat/loongarch-linux.o \
271 nat/loongarch-linux-hw-point.o"
274 # Host: M32R based machine running GNU/Linux
275 NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o"
278 # Host: Motorola m68k running GNU/Linux.
279 NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o"
283 NATDEPFILES="${NATDEPFILES} linux-nat-trad.o \
284 mips-linux-nat.o nat/mips-linux-watch.o"
287 # Host: Linux/OpenRISC
288 NATDEPFILES="${NATDEPFILES} or1k-linux-nat.o"
291 # Host: Hewlett-Packard PA-RISC machine, running Linux
292 NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o"
295 # Host: PowerPC, running Linux
296 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
299 # Host: RISC-V, running Linux
300 NATDEPFILES="${NATDEPFILES} riscv-linux-nat.o \
301 nat/riscv-linux-tdesc.o"
304 # Host: S390, running Linux
305 NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
308 # Host: GNU/Linux SPARC
309 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o"
312 # Host: Tilera TILE-Gx running GNU/Linux.
313 NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o"
317 # Host: Xtensa, running GNU/Linux.
318 NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o"
323 case ${gdb_host_cpu} in
325 # Host: GNU/Linux x86-64
326 NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
327 nat/x86-xstate.o amd64-nat.o amd64-linux-nat.o x86-linux-nat.o \
329 nat/x86-linux.o nat/x86-linux-dregs.o nat/x86-linux-tdesc.o \
330 nat/amd64-linux-siginfo.o arch/x86-linux-tdesc-features.o \
331 arch/i386-linux-tdesc.o arch/amd64-linux-tdesc.o"
334 # Host: GNU/Linux UltraSPARC
335 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
341 case ${gdb_host_cpu} in
343 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
348 case ${gdb_host_cpu} in
350 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o amd64-windows-nat.o"
355 case ${gdb_host_cpu} in
358 NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o"
363 NATDEPFILES="${NATDEPFILES} mips-netbsd-nat.o"
367 NATDEPFILES="${NATDEPFILES} netbsd-nat.o hppa-netbsd-nat.o"
370 # Host: NetBSD/powerpc
371 NATDEPFILES="${NATDEPFILES} ppc-netbsd-nat.o bsd-kvm.o"
376 NATDEPFILES="${NATDEPFILES} sh-netbsd-nat.o"
382 case ${gdb_host_cpu} in
385 NATDEPFILES="${NATDEPFILES} netbsd-nat.o amd64-nat.o x86-nat.o \
386 nat/x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-netbsd-nat.o"
389 # Host: NetBSD/sparc64
390 NATDEPFILES="${NATDEPFILES} sparc64-netbsd-nat.o sparc-nat.o \
398 case ${gdb_host_cpu} in
401 NATDEPFILES="${NATDEPFILES} arm-netbsd-nat.o"
404 # Host: NetBSD/i386 ELF
405 NATDEPFILES="${NATDEPFILES} netbsd-nat.o x86-nat.o \
407 x86-bsd-nat.o i386-bsd-nat.o i386-netbsd-nat.o bsd-kvm.o"
411 # Host: NetBSD/m68k ELF
412 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
416 # Host: NetBSD/sparc ELF
417 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-netbsd-nat.o \
422 # Host: NetBSD/vax ELF
423 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
430 case ${gdb_host_cpu} in
432 # Host: OpenBSD/i386 ELF
433 NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \
434 i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o"
439 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
444 NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o"
447 # Host: OpenBSD/powerpc
448 NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o"
453 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
459 case ${gdb_host_cpu} in
461 # Host: OpenBSD/amd64
462 NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
463 x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
467 # Host: OpenBSD/mips64
468 NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o"
471 # Host: OpenBSD/sparc64
472 NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \
473 sparc-nat.o bsd-kvm.o"
479 case ${gdb_host_cpu} in
481 # Host: PowerPC64, running Linux
483 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
488 case ${gdb_host_cpu} in
490 # Host: Solaris x86_64
491 NATDEPFILES="${NATDEPFILES} \
492 amd64-nat.o i386-sol2-nat.o"
495 # Host: Solaris SPARC & UltraSPARC
497 NATDEPFILES="${NATDEPFILES} sparc-sol2-nat.o"