[gdb, hurd] Repair build after "Convert struct target_ops to C++" changes
[deliverable/binutils-gdb.git] / gdb / configure.nat
CommitLineData
21ea5acd 1# ; -*- mode: sh ; -*-
42a4f53d 2# Copyright (C) 2013-2019 Free Software Foundation, Inc.
21ea5acd
SDJ
3#
4# This file is part of GDB.
5#
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.
10#
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.
15#
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/>.
18
19# Variables defined here:
20#
21# NAT_FILE - The header file with definitions for this native target.
22#
23# NATDEPFILES - Source files required for native debugging on this
24# native target.
25#
26# NAT_CDEPS - Dynamic symbols to be exported for libthread_db.
27#
28# LOADLIBES - Libraries against which GDB will be linked for this
29# native target.
30#
31# MH_CFLAGS - Additional CFLAGS for this host.
32#
33# XM_CLIBS - Host-dependent libraries against which GDB will be linked
34# for this native target.
35#
36# HAVE_NATIVE_GCORE_HOST - Whether gcore should be installed on this
37# native target.
38#
2b351b19
PA
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.
21ea5acd
SDJ
43#
44# Notes:
45#
46# - To avoid shell expansion of variables, declare them with single
47# quotes.
48#
2b351b19 49# - nat_makefile_frag must contain the full path of the file.
21ea5acd
SDJ
50
51
e50f25ec
SDJ
52# This first case is useful for filling default values for each
53# gdb_host.
54case ${gdb_host} in
55 *linux*)
21ea5acd 56 NAT_FILE='config/nm-linux.h'
69872622
TT
57 NATDEPFILES='inf-ptrace.o fork-child.o nat/fork-inferior.o \
58 proc-service.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'
21ea5acd 62 NAT_CDEPS='$(srcdir)/proc-service.list'
21ea5acd 63 LOADLIBES='-ldl $(RDYNAMIC)'
21ea5acd 64 ;;
e50f25ec 65 fbsd*)
69872622 66 NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o fbsd-nat.o'
e50f25ec 67 HAVE_NATIVE_GCORE_HOST=1
21ea5acd
SDJ
68 LOADLIBES='-lkvm'
69 ;;
e50f25ec 70 nbsd*)
69872622 71 NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o'
28ad437d 72 HAVE_NATIVE_GCORE_HOST=1
21ea5acd 73 ;;
e50f25ec 74 obsd*)
69872622 75 NATDEPFILES='fork-child.o nat/fork-inferior.o inf-ptrace.o'
21ea5acd 76 ;;
e50f25ec 77 cygwin*)
69872622 78 NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o'
21ea5acd 79 ;;
e50f25ec 80 mingw*)
69872622 81 NATDEPFILES='x86-nat.o nat/x86-dregs.o windows-nat.o'
21ea5acd 82 ;;
3b912944 83 aix)
69872622 84 NATDEPFILES='nat/fork-inferior.o fork-child.o inf-ptrace.o'
3b912944 85 ;;
848d9074 86 darwin)
69872622 87 NATDEPFILES='fork-child.o nat/fork-inferior.o darwin-nat.o \
848d9074 88 darwin-nat-info.o'
281c4447
RO
89 ;;
90 sol2)
69872622 91 NATDEPFILES='fork-child.o nat/fork-inferior.o \
281c4447
RO
92 procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o \
93 sol-thread.o'
94 HAVE_NATIVE_GCORE_HOST=1
848d9074 95 ;;
e50f25ec 96esac
21ea5acd 97
e50f25ec
SDJ
98# This is where we actually filter by host and host CPU.
99case ${gdb_host} in
100 aix)
101 case ${gdb_host_cpu} in
102 powerpc)
103 # Host: IBM PowerPC running AIX aix-thread.o is not
104 # listed in NATDEPFILES as it is pulled in by
105 # configure.
3b912944 106 NATDEPFILES="${NATDEPFILES} rs6000-nat.o"
e50f25ec
SDJ
107
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'
112 ;;
113 esac
114 ;;
115 alpha-linux)
116 case ${gdb_host_cpu} in
117 alpha)
118 # Host: Little-endian Alpha running Linux
6798487f 119 NATDEPFILES="${NATDEPFILES} linux-nat-trad.o alpha-linux-nat.o"
e50f25ec
SDJ
120 # doublest.c currently assumes some properties of FP arithmetic
121 # on the host which require this.
122 MH_CFLAGS='-mieee'
123 ;;
124 esac
125 ;;
126 cygwin)
127 case ${gdb_host_cpu} in
128 i386)
129 # Native config information for GDB on i386
130 # systems running Cygwin.
131 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
132 ;;
133 esac
134 ;;
135 cygwin64)
136 case ${gdb_host_cpu} in
137 i386)
138 # Native config information for GDB on amd64
139 # systems running Cygwin.
140 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
141 ;;
142 esac
143 ;;
144 darwin)
145 case ${gdb_host_cpu} in
146 i386)
147 # Host: IA86 running Darwin
848d9074 148 NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \
69872622 149 nat/x86-dregs.o amd64-nat.o"
e50f25ec
SDJ
150 ;;
151 esac
152 ;;
153 fbsd)
154 case ${gdb_host_cpu} in
351787dd
JB
155 aarch64)
156 # Host: FreeBSD/aarch64
157 NATDEPFILES="${NATDEPFILES} aarch64-fbsd-nat.o"
158 LOADLIBES=
159 ;;
4f9d9906
JB
160 arm)
161 # Host: FreeBSD/arm
162 NATDEPFILES="${NATDEPFILES} arm-fbsd-nat.o"
163 LOADLIBES=
164 ;;
e50f25ec
SDJ
165 i386)
166 # Host: FreeBSD/i386
69872622 167 NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
e50f25ec 168 x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o"
e50f25ec
SDJ
169 ;;
170 mips)
171 # Host: FreeBSD/mips
172 NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o"
173 LOADLIBES=
174 ;;
175 powerpc)
176 # Native config information for GDB on PowerPC
177 # systems running FreeBSD.
178 NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o"
179 ;;
74792ff7
JB
180 riscv*)
181 # Host: FreeBSD/riscv
182 NATDEPFILES="${NATDEPFILES} riscv-fbsd-nat.o"
183 ;;
e50f25ec
SDJ
184 sparc)
185 # Host: FreeBSD/sparc64
186 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
187 sparc64-fbsd-nat.o bsd-kvm.o"
188 ;;
189 esac
190 ;;
191 fbsd64)
192 case ${gdb_host_cpu} in
193 i386)
194 # Host: FreeBSD/amd64
195 NATDEPFILES="${NATDEPFILES} amd64-nat.o amd64-bsd-nat.o \
69872622
TT
196 amd64-fbsd-nat.o bsd-kvm.o x86-nat.o nat/x86-dregs.o \
197 x86-bsd-nat.o"
e50f25ec
SDJ
198 ;;
199 esac
200 ;;
201 go32)
202 case ${gdb_host_cpu} in
203 i386)
204 # Host: Intel x86 running DJGPP
205 # We include several header files from config/djgpp
206 MH_CFLAGS='-I$(srcdir)/config/djgpp'
69872622 207 NATDEPFILES='go32-nat.o x86-nat.o nat/x86-dregs.o'
e50f25ec
SDJ
208 XM_CLIBS='-ldbg'
209 ;;
210 esac
211 ;;
212 i386gnu)
213 case ${gdb_host_cpu} in
214 i386)
215 # Host: Intel 386 running the GNU Hurd
216 NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
69872622 217 x86-nat.o nat/x86-dregs.o fork-child.o \
21ea5acd
SDJ
218 notify_S.o process_reply_S.o msg_reply_S.o \
219 msg_U.o exc_request_U.o exc_request_S.o'
e50f25ec 220 HAVE_NATIVE_GCORE_HOST=1
21ea5acd 221
e50f25ec
SDJ
222 NAT_FILE='nm-i386gnu.h'
223 MH_CFLAGS='-D_GNU_SOURCE'
21ea5acd 224
e50f25ec 225 XM_CLIBS='-lshouldbeinlibc'
21ea5acd 226
2b351b19 227 nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
e50f25ec
SDJ
228 ;;
229 esac
21ea5acd 230 ;;
e50f25ec
SDJ
231 linux)
232 case ${gdb_host_cpu} in
233 aarch64)
234 # Host: AArch64 based machine running GNU/Linux
235 NATDEPFILES="${NATDEPFILES} aarch64-linux-nat.o \
69872622
TT
236 aarch32-linux-nat.o nat/aarch64-linux-hw-point.o \
237 nat/aarch64-linux.o \
238 nat/aarch64-sve-linux-ptrace.o"
e50f25ec
SDJ
239 ;;
240 arm)
241 # Host: ARM based machine running GNU/Linux
242 NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \
243 aarch32-linux-nat.o"
244 ;;
245 i386)
246 # Host: Intel 386 running GNU/Linux.
69872622
TT
247 NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
248 i386-linux-nat.o x86-linux-nat.o nat/linux-btrace.o \
249 nat/x86-linux.o nat/x86-linux-dregs.o"
e50f25ec
SDJ
250 ;;
251 ia64)
252 # Host: Intel IA-64 running GNU/Linux
253 NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o"
254 ;;
255 m32r)
256 # Host: M32R based machine running GNU/Linux
257 NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o"
258 ;;
259 m68k)
260 # Host: Motorola m68k running GNU/Linux.
261 NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o"
262 ;;
263 mips)
264 # Host: Linux/MIPS
6798487f 265 NATDEPFILES="${NATDEPFILES} linux-nat-trad.o \
69872622 266 mips-linux-nat.o nat/mips-linux-watch.o"
e50f25ec
SDJ
267 ;;
268 pa)
269 # Host: Hewlett-Packard PA-RISC machine, running Linux
270 NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o"
271 ;;
272 powerpc)
273 # Host: PowerPC, running Linux
69872622 274 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
e50f25ec 275 ;;
52a187f8
JW
276 riscv*)
277 # Host: RISC-V, running Linux
278 NATDEPFILES="${NATDEPFILES} riscv-linux-nat.o"
279 ;;
e50f25ec
SDJ
280 s390)
281 # Host: S390, running Linux
282 NATDEPFILES="${NATDEPFILES} s390-linux-nat.o"
283 ;;
284 sparc)
285 # Host: GNU/Linux SPARC
286 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o"
287 ;;
288 tilegx)
289 # Host: Tilera TILE-Gx running GNU/Linux.
290 NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o"
291 NAT_CDEPS=
292 ;;
293 xtensa)
294 # Host: Xtensa, running GNU/Linux.
295 NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o"
296 ;;
297 esac
298 ;;
299 linux64)
300 case ${gdb_host_cpu} in
301 i386)
302 # Host: GNU/Linux x86-64
69872622
TT
303 NATDEPFILES="${NATDEPFILES} x86-nat.o nat/x86-dregs.o \
304 amd64-nat.o amd64-linux-nat.o x86-linux-nat.o \
305 nat/linux-btrace.o \
306 nat/x86-linux.o nat/x86-linux-dregs.o \
307 nat/amd64-linux-siginfo.o"
e50f25ec
SDJ
308 ;;
309 sparc)
310 # Host: GNU/Linux UltraSPARC
311 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \
312 sparc64-linux-nat.o"
313 ;;
314 esac
315 ;;
316 mingw)
317 case ${gdb_host_cpu} in
318 i386)
319 NATDEPFILES="${NATDEPFILES} i386-windows-nat.o"
320 ;;
321 esac
322 ;;
323 mingw64)
324 case ${gdb_host_cpu} in
325 i386)
326 NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o"
327 ;;
328 esac
329 ;;
330 nbsd)
331 case ${gdb_host_cpu} in
332 alpha)
333 # Host: NetBSD/alpha
334 NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o"
335 LOADLIBES='-lkvm'
336 ;;
337 mips)
338 # Host: NetBSD/mips
339 NATDEPFILES="${NATDEPFILES} mips-nbsd-nat.o"
340 ;;
341 pa)
342 # Host: NetBSD/hppa
343 NATDEPFILES="${NATDEPFILES} nbsd-nat.o hppa-nbsd-nat.o"
344 ;;
345 powerpc)
346 # Host: NetBSD/powerpc
347 NATDEPFILES="${NATDEPFILES} ppc-nbsd-nat.o bsd-kvm.o"
348 LOADLIBES='-lkvm'
349 ;;
350 sh)
351 # Host: NetBSD/sh
352 NATDEPFILES="${NATDEPFILES} sh-nbsd-nat.o"
353 ;;
354
355 esac
356 ;;
357 nbsd64)
358 case ${gdb_host_cpu} in
359 i386)
360 # Host: NetBSD/amd64
a379bfd0 361 NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o x86-nat.o \
69872622 362 nat/x86-dregs.o x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o"
e50f25ec
SDJ
363 ;;
364 sparc)
365 # Host: NetBSD/sparc64
366 NATDEPFILES="${NATDEPFILES} sparc64-nbsd-nat.o sparc-nat.o \
367 bsd-kvm.o"
b9c0e1b4 368 LOADLIBES='-lkvm'
e50f25ec
SDJ
369 ;;
370
371 esac
372 ;;
b9c0e1b4 373 nbsdelf)
e50f25ec
SDJ
374 case ${gdb_host_cpu} in
375 arm)
376 # Host: NetBSD/arm
377 NATDEPFILES="${NATDEPFILES} arm-nbsd-nat.o"
378 ;;
379 i386)
380 # Host: NetBSD/i386 ELF
69872622
TT
381 NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-nat.o \
382 nat/x86-dregs.o \
a379bfd0 383 x86-bsd-nat.o i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o"
e50f25ec
SDJ
384 LOADLIBES='-lkvm'
385 ;;
386 m68k)
387 # Host: NetBSD/m68k ELF
388 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
389 LOADLIBES='-lkvm'
390 ;;
391 sparc)
392 # Host: NetBSD/sparc ELF
393 NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-nbsd-nat.o \
394 bsd-kvm.o"
395 LOADLIBES='-lkvm'
396 ;;
397 vax)
398 # Host: NetBSD/vax ELF
399 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
400 LOADLIBES='-lkvm'
401 ;;
402
403 esac
404 ;;
405 nto)
406 case ${gdb_host_cpu} in
407 i386)
408 # Host: Intel 386 running QNX.
409 NATDEPFILES='nto-procfs.o'
410 NAT_FILE='config/nm-nto.h'
411 ;;
412 esac
413 ;;
414 obsd)
415 case ${gdb_host_cpu} in
416 i386)
417 # Host: OpenBSD/i386 ELF
418 NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \
419 i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o"
420 LOADLIBES='-lkvm'
421 ;;
422 m68k)
423 # Host: OpenBSD/m68k
424 NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o"
425 LOADLIBES='-lkvm'
426 ;;
e50f25ec
SDJ
427 pa)
428 # Host: OpenBSD/hppa
429 NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o"
430 ;;
431 powerpc)
432 # Host: OpenBSD/powerpc
433 NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o"
434 LOADLIBES='-lkvm'
435 ;;
436 vax)
437 # Host: OpenBSD/vax
438 NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o"
439 LOADLIBES='-lkvm'
440 ;;
441 esac
442 ;;
443 obsd64)
444 case ${gdb_host_cpu} in
445 i386)
446 # Host: OpenBSD/amd64
447 NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \
448 x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o"
449 LOADLIBES='-lkvm'
450 ;;
451 mips)
452 # Host: OpenBSD/mips64
453 NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o"
454 ;;
455 sparc)
456 # Host: OpenBSD/sparc64
457 NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \
458 sparc-nat.o bsd-kvm.o"
459 LOADLIBES='-lkvm'
460 ;;
461 esac
462 ;;
463 ppc64-linux)
464 case ${gdb_host_cpu} in
465 powerpc)
466 # Host: PowerPC64, running Linux
467 XM_CLIBS=
69872622 468 NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o nat/ppc-linux.o"
e50f25ec
SDJ
469 ;;
470 esac
471 ;;
472 sol2)
473 case ${gdb_host_cpu} in
281c4447
RO
474 i386)
475 # Host: Solaris x86_64
476 NATDEPFILES="${NATDEPFILES} \
8674be79 477 amd64-nat.o i386-sol2-nat.o"
281c4447 478 ;;
e50f25ec
SDJ
479 sparc)
480 # Host: Solaris SPARC & UltraSPARC
481 NAT_FILE='nm-sol2.h'
281c4447 482 NATDEPFILES="${NATDEPFILES} sparc-sol2-nat.o"
e50f25ec
SDJ
483 ;;
484 esac
485 ;;
486 spu-linux)
487 case ${gdb_host_cpu} in
488 powerpc)
489 # Target: Cell BE (PowerPC64 + SPU)
490 # This implements a 'pseudo-native' GDB running on the
491 # PPU side of the Cell BE and debugging the SPU side.
492 NAT_FILE=
493 NAT_CDEPS=
494 LOADLIBES=
d7fcdff9 495 NATDEPFILES='spu-linux-nat.o \
69872622
TT
496 inf-ptrace.o fork-child.o nat/fork-inferior.o \
497 nat/linux-procfs.o nat/linux-ptrace.o \
498 nat/linux-waitpid.o \
499 nat/linux-personality.o nat/linux-namespaces.o'
e50f25ec
SDJ
500 ;;
501 esac
21ea5acd 502 ;;
21ea5acd 503esac
This page took 0.182222 seconds and 4 git commands to generate.