Commit | Line | Data |
---|---|---|
21ea5acd SDJ |
1 | # ; -*- mode: sh ; -*- |
2 | # Copyright (C) 2013-2017 Free Software Foundation, Inc. | |
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. | |
54 | case ${gdb_host} in | |
55 | *linux*) | |
21ea5acd | 56 | NAT_FILE='config/nm-linux.h' |
2090129c | 57 | NATDEPFILES='inf-ptrace.o fork-child.o fork-inferior.o proc-service.o \ |
e50f25ec SDJ |
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' | |
21ea5acd | 61 | NAT_CDEPS='$(srcdir)/proc-service.list' |
21ea5acd | 62 | LOADLIBES='-ldl $(RDYNAMIC)' |
21ea5acd | 63 | ;; |
e50f25ec | 64 | fbsd*) |
2090129c | 65 | NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o fbsd-nat.o' |
e50f25ec | 66 | HAVE_NATIVE_GCORE_HOST=1 |
21ea5acd SDJ |
67 | LOADLIBES='-lkvm' |
68 | ;; | |
e50f25ec | 69 | nbsd*) |
2090129c | 70 | NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o' |
21ea5acd | 71 | ;; |
e50f25ec | 72 | obsd*) |
2090129c | 73 | NATDEPFILES='fork-child.o fork-inferior.o inf-ptrace.o' |
21ea5acd | 74 | ;; |
e50f25ec SDJ |
75 | cygwin*) |
76 | NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o' | |
21ea5acd | 77 | ;; |
e50f25ec SDJ |
78 | mingw*) |
79 | NATDEPFILES='x86-nat.o x86-dregs.o windows-nat.o' | |
21ea5acd | 80 | ;; |
3b912944 SM |
81 | aix) |
82 | NATDEPFILES='fork-inferior.o fork-child.o inf-ptrace.o' | |
83 | ;; | |
848d9074 SM |
84 | darwin) |
85 | NATDEPFILES='fork-child.o fork-inferior.o darwin-nat.o \ | |
86 | darwin-nat-info.o' | |
87 | ;; | |
e50f25ec | 88 | esac |
21ea5acd | 89 | |
e50f25ec SDJ |
90 | # This is where we actually filter by host and host CPU. |
91 | case ${gdb_host} in | |
92 | aix) | |
93 | case ${gdb_host_cpu} in | |
94 | powerpc) | |
95 | # Host: IBM PowerPC running AIX aix-thread.o is not | |
96 | # listed in NATDEPFILES as it is pulled in by | |
97 | # configure. | |
3b912944 | 98 | NATDEPFILES="${NATDEPFILES} rs6000-nat.o" |
e50f25ec SDJ |
99 | |
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' | |
104 | ;; | |
105 | esac | |
106 | ;; | |
107 | alpha-linux) | |
108 | case ${gdb_host_cpu} in | |
109 | alpha) | |
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. | |
114 | MH_CFLAGS='-mieee' | |
115 | ;; | |
116 | esac | |
117 | ;; | |
118 | cygwin) | |
119 | case ${gdb_host_cpu} in | |
120 | i386) | |
121 | # Native config information for GDB on i386 | |
122 | # systems running Cygwin. | |
123 | NATDEPFILES="${NATDEPFILES} i386-windows-nat.o" | |
124 | ;; | |
125 | esac | |
126 | ;; | |
127 | cygwin64) | |
128 | case ${gdb_host_cpu} in | |
129 | i386) | |
130 | # Native config information for GDB on amd64 | |
131 | # systems running Cygwin. | |
132 | NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o" | |
133 | ;; | |
134 | esac | |
135 | ;; | |
136 | darwin) | |
137 | case ${gdb_host_cpu} in | |
138 | i386) | |
139 | # Host: IA86 running Darwin | |
848d9074 SM |
140 | NATDEPFILES="${NATDEPFILES} i386-darwin-nat.o x86-nat.o \ |
141 | x86-dregs.o amd64-nat.o" | |
e50f25ec SDJ |
142 | ;; |
143 | esac | |
144 | ;; | |
145 | fbsd) | |
146 | case ${gdb_host_cpu} in | |
147 | i386) | |
148 | # Host: FreeBSD/i386 | |
149 | NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \ | |
150 | x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o" | |
151 | NAT_FILE='nm-fbsd.h' | |
152 | ;; | |
153 | mips) | |
154 | # Host: FreeBSD/mips | |
155 | NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o" | |
156 | LOADLIBES= | |
157 | ;; | |
158 | powerpc) | |
159 | # Native config information for GDB on PowerPC | |
160 | # systems running FreeBSD. | |
161 | NATDEPFILES="${NATDEPFILES} ppc-fbsd-nat.o bsd-kvm.o" | |
162 | ;; | |
163 | sparc) | |
164 | # Host: FreeBSD/sparc64 | |
165 | NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \ | |
166 | sparc64-fbsd-nat.o bsd-kvm.o" | |
167 | ;; | |
168 | esac | |
169 | ;; | |
170 | fbsd64) | |
171 | case ${gdb_host_cpu} in | |
172 | i386) | |
173 | # Host: FreeBSD/amd64 | |
174 | NATDEPFILES="${NATDEPFILES} amd64-nat.o amd64-bsd-nat.o \ | |
175 | amd64-fbsd-nat.o bsd-kvm.o x86-nat.o x86-dregs.o x86-bsd-nat.o" | |
176 | ;; | |
177 | esac | |
178 | ;; | |
179 | go32) | |
180 | case ${gdb_host_cpu} in | |
181 | i386) | |
182 | # Host: Intel x86 running DJGPP | |
183 | # We include several header files from config/djgpp | |
184 | MH_CFLAGS='-I$(srcdir)/config/djgpp' | |
185 | NATDEPFILES='go32-nat.o x86-nat.o x86-dregs.o' | |
186 | XM_CLIBS='-ldbg' | |
187 | ;; | |
188 | esac | |
189 | ;; | |
190 | i386gnu) | |
191 | case ${gdb_host_cpu} in | |
192 | i386) | |
193 | # Host: Intel 386 running the GNU Hurd | |
194 | NATDEPFILES='i386-gnu-nat.o gnu-nat.o \ | |
21ea5acd SDJ |
195 | x86-nat.o x86-dregs.o fork-child.o \ |
196 | notify_S.o process_reply_S.o msg_reply_S.o \ | |
197 | msg_U.o exc_request_U.o exc_request_S.o' | |
e50f25ec | 198 | HAVE_NATIVE_GCORE_HOST=1 |
21ea5acd | 199 | |
e50f25ec SDJ |
200 | NAT_FILE='nm-i386gnu.h' |
201 | MH_CFLAGS='-D_GNU_SOURCE' | |
21ea5acd | 202 | |
e50f25ec | 203 | XM_CLIBS='-lshouldbeinlibc' |
21ea5acd | 204 | |
2b351b19 | 205 | nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn" |
e50f25ec SDJ |
206 | ;; |
207 | esac | |
21ea5acd | 208 | ;; |
e50f25ec SDJ |
209 | i386sol2) |
210 | case ${gdb_host_cpu} in | |
211 | i386) | |
212 | # Host: Solaris x86 | |
213 | NATDEPFILES='fork-child.o i386-v4-nat.o i386-sol2-nat.o \ | |
21ea5acd | 214 | procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o' |
e50f25ec SDJ |
215 | HAVE_NATIVE_GCORE_HOST=1 |
216 | ;; | |
217 | esac | |
218 | ;; | |
219 | linux) | |
220 | case ${gdb_host_cpu} in | |
221 | aarch64) | |
222 | # Host: AArch64 based machine running GNU/Linux | |
223 | NATDEPFILES="${NATDEPFILES} aarch64-linux-nat.o \ | |
224 | aarch32-linux-nat.o aarch64-linux-hw-point.o aarch64-linux.o" | |
225 | ;; | |
226 | arm) | |
227 | # Host: ARM based machine running GNU/Linux | |
228 | NATDEPFILES="${NATDEPFILES} arm-linux-nat.o \ | |
229 | aarch32-linux-nat.o" | |
230 | ;; | |
231 | i386) | |
232 | # Host: Intel 386 running GNU/Linux. | |
233 | NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \ | |
234 | i386-linux-nat.o x86-linux-nat.o linux-btrace.o \ | |
235 | x86-linux.o x86-linux-dregs.o" | |
236 | ;; | |
237 | ia64) | |
238 | # Host: Intel IA-64 running GNU/Linux | |
239 | NATDEPFILES="${NATDEPFILES} ia64-linux-nat.o" | |
240 | ;; | |
241 | m32r) | |
242 | # Host: M32R based machine running GNU/Linux | |
243 | NATDEPFILES="${NATDEPFILES} m32r-linux-nat.o" | |
244 | ;; | |
245 | m68k) | |
246 | # Host: Motorola m68k running GNU/Linux. | |
247 | NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o" | |
248 | ;; | |
249 | mips) | |
250 | # Host: Linux/MIPS | |
251 | NATDEPFILES="${NATDEPFILES} mips-linux-nat.o \ | |
252 | mips-linux-watch.o" | |
253 | ;; | |
254 | pa) | |
255 | # Host: Hewlett-Packard PA-RISC machine, running Linux | |
256 | NATDEPFILES="${NATDEPFILES} hppa-linux-nat.o" | |
257 | ;; | |
258 | powerpc) | |
259 | # Host: PowerPC, running Linux | |
260 | NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o" | |
261 | ;; | |
262 | s390) | |
263 | # Host: S390, running Linux | |
264 | NATDEPFILES="${NATDEPFILES} s390-linux-nat.o" | |
265 | ;; | |
266 | sparc) | |
267 | # Host: GNU/Linux SPARC | |
268 | NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-linux-nat.o" | |
269 | ;; | |
270 | tilegx) | |
271 | # Host: Tilera TILE-Gx running GNU/Linux. | |
272 | NATDEPFILES="${NATDEPFILES} tilegx-linux-nat.o" | |
273 | NAT_CDEPS= | |
274 | ;; | |
275 | xtensa) | |
276 | # Host: Xtensa, running GNU/Linux. | |
277 | NATDEPFILES="${NATDEPFILES} xtensa-linux-nat.o" | |
278 | ;; | |
279 | esac | |
280 | ;; | |
281 | linux64) | |
282 | case ${gdb_host_cpu} in | |
283 | i386) | |
284 | # Host: GNU/Linux x86-64 | |
285 | NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \ | |
286 | amd64-nat.o amd64-linux-nat.o x86-linux-nat.o linux-btrace.o \ | |
287 | x86-linux.o x86-linux-dregs.o amd64-linux-siginfo.o" | |
288 | ;; | |
289 | sparc) | |
290 | # Host: GNU/Linux UltraSPARC | |
291 | NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc64-nat.o \ | |
292 | sparc64-linux-nat.o" | |
293 | ;; | |
294 | esac | |
295 | ;; | |
296 | mingw) | |
297 | case ${gdb_host_cpu} in | |
298 | i386) | |
299 | NATDEPFILES="${NATDEPFILES} i386-windows-nat.o" | |
300 | ;; | |
301 | esac | |
302 | ;; | |
303 | mingw64) | |
304 | case ${gdb_host_cpu} in | |
305 | i386) | |
306 | NATDEPFILES="${NATDEPFILES} amd64-windows-nat.o" | |
307 | ;; | |
308 | esac | |
309 | ;; | |
310 | nbsd) | |
311 | case ${gdb_host_cpu} in | |
312 | alpha) | |
313 | # Host: NetBSD/alpha | |
314 | NATDEPFILES="${NATDEPFILES} alpha-bsd-nat.o bsd-kvm.o" | |
315 | LOADLIBES='-lkvm' | |
316 | ;; | |
317 | mips) | |
318 | # Host: NetBSD/mips | |
319 | NATDEPFILES="${NATDEPFILES} mips-nbsd-nat.o" | |
320 | ;; | |
321 | pa) | |
322 | # Host: NetBSD/hppa | |
323 | NATDEPFILES="${NATDEPFILES} nbsd-nat.o hppa-nbsd-nat.o" | |
324 | ;; | |
325 | powerpc) | |
326 | # Host: NetBSD/powerpc | |
327 | NATDEPFILES="${NATDEPFILES} ppc-nbsd-nat.o bsd-kvm.o" | |
328 | LOADLIBES='-lkvm' | |
329 | ;; | |
330 | sh) | |
331 | # Host: NetBSD/sh | |
332 | NATDEPFILES="${NATDEPFILES} sh-nbsd-nat.o" | |
333 | ;; | |
334 | ||
335 | esac | |
336 | ;; | |
337 | nbsd64) | |
338 | case ${gdb_host_cpu} in | |
339 | i386) | |
340 | # Host: NetBSD/amd64 | |
341 | NATDEPFILES="${NATDEPFILES} nbsd-nat.o amd64-nat.o \ | |
342 | x86-bsd-nat.o amd64-bsd-nat.o amd64-nbsd-nat.o" | |
343 | ;; | |
344 | sparc) | |
345 | # Host: NetBSD/sparc64 | |
346 | NATDEPFILES="${NATDEPFILES} sparc64-nbsd-nat.o sparc-nat.o \ | |
347 | bsd-kvm.o" | |
b9c0e1b4 | 348 | LOADLIBES='-lkvm' |
e50f25ec SDJ |
349 | ;; |
350 | ||
351 | esac | |
352 | ;; | |
b9c0e1b4 | 353 | nbsdelf) |
e50f25ec SDJ |
354 | case ${gdb_host_cpu} in |
355 | arm) | |
356 | # Host: NetBSD/arm | |
357 | NATDEPFILES="${NATDEPFILES} arm-nbsd-nat.o" | |
358 | ;; | |
359 | i386) | |
360 | # Host: NetBSD/i386 ELF | |
361 | NATDEPFILES="${NATDEPFILES} nbsd-nat.o x86-bsd-nat.o \ | |
362 | i386-bsd-nat.o i386-nbsd-nat.o bsd-kvm.o" | |
363 | LOADLIBES='-lkvm' | |
364 | ;; | |
365 | m68k) | |
366 | # Host: NetBSD/m68k ELF | |
367 | NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o" | |
368 | LOADLIBES='-lkvm' | |
369 | ;; | |
370 | sparc) | |
371 | # Host: NetBSD/sparc ELF | |
372 | NATDEPFILES="${NATDEPFILES} sparc-nat.o sparc-nbsd-nat.o \ | |
373 | bsd-kvm.o" | |
374 | LOADLIBES='-lkvm' | |
375 | ;; | |
376 | vax) | |
377 | # Host: NetBSD/vax ELF | |
378 | NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o" | |
379 | LOADLIBES='-lkvm' | |
380 | ;; | |
381 | ||
382 | esac | |
383 | ;; | |
384 | nto) | |
385 | case ${gdb_host_cpu} in | |
386 | i386) | |
387 | # Host: Intel 386 running QNX. | |
388 | NATDEPFILES='nto-procfs.o' | |
389 | NAT_FILE='config/nm-nto.h' | |
390 | ;; | |
391 | esac | |
392 | ;; | |
393 | obsd) | |
394 | case ${gdb_host_cpu} in | |
395 | i386) | |
396 | # Host: OpenBSD/i386 ELF | |
397 | NATDEPFILES="${NATDEPFILES} obsd-nat.o x86-bsd-nat.o \ | |
398 | i386-bsd-nat.o i386-obsd-nat.o bsd-kvm.o" | |
399 | LOADLIBES='-lkvm' | |
400 | ;; | |
401 | m68k) | |
402 | # Host: OpenBSD/m68k | |
403 | NATDEPFILES="${NATDEPFILES} m68k-bsd-nat.o bsd-kvm.o" | |
404 | LOADLIBES='-lkvm' | |
405 | ;; | |
406 | m88k) | |
407 | # Host: OpenBSD/m88k | |
408 | NATDEPFILES="${NATDEPFILES} m88k-bsd-nat.o" | |
409 | ;; | |
410 | pa) | |
411 | # Host: OpenBSD/hppa | |
412 | NATDEPFILES="${NATDEPFILES} obsd-nat.o hppa-obsd-nat.o" | |
413 | ;; | |
414 | powerpc) | |
415 | # Host: OpenBSD/powerpc | |
416 | NATDEPFILES="${NATDEPFILES} obsd-nat.o ppc-obsd-nat.o bsd-kvm.o" | |
417 | LOADLIBES='-lkvm' | |
418 | ;; | |
419 | vax) | |
420 | # Host: OpenBSD/vax | |
421 | NATDEPFILES="${NATDEPFILES} vax-bsd-nat.o bsd-kvm.o" | |
422 | LOADLIBES='-lkvm' | |
423 | ;; | |
424 | esac | |
425 | ;; | |
426 | obsd64) | |
427 | case ${gdb_host_cpu} in | |
428 | i386) | |
429 | # Host: OpenBSD/amd64 | |
430 | NATDEPFILES="${NATDEPFILES} obsd-nat.o amd64-nat.o \ | |
431 | x86-bsd-nat.o amd64-bsd-nat.o amd64-obsd-nat.o bsd-kvm.o" | |
432 | LOADLIBES='-lkvm' | |
433 | ;; | |
434 | mips) | |
435 | # Host: OpenBSD/mips64 | |
436 | NATDEPFILES="${NATDEPFILES} obsd-nat.o mips64-obsd-nat.o" | |
437 | ;; | |
438 | sparc) | |
439 | # Host: OpenBSD/sparc64 | |
440 | NATDEPFILES="${NATDEPFILES} obsd-nat.o sparc64-obsd-nat.o \ | |
441 | sparc-nat.o bsd-kvm.o" | |
442 | LOADLIBES='-lkvm' | |
443 | ;; | |
444 | esac | |
445 | ;; | |
446 | ppc64-linux) | |
447 | case ${gdb_host_cpu} in | |
448 | powerpc) | |
449 | # Host: PowerPC64, running Linux | |
450 | XM_CLIBS= | |
451 | NATDEPFILES="${NATDEPFILES} ppc-linux-nat.o ppc-linux.o" | |
452 | ;; | |
453 | esac | |
454 | ;; | |
455 | sol2) | |
456 | case ${gdb_host_cpu} in | |
457 | sparc) | |
458 | # Host: Solaris SPARC & UltraSPARC | |
459 | NAT_FILE='nm-sol2.h' | |
460 | NATDEPFILES='sparc-sol2-nat.o \ | |
461 | fork-child.o \ | |
21ea5acd | 462 | procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o' |
e50f25ec SDJ |
463 | HAVE_NATIVE_GCORE_HOST=1 |
464 | ;; | |
465 | esac | |
466 | ;; | |
467 | sol2-64) | |
468 | case ${gdb_host_cpu} in | |
469 | i386) | |
470 | # Host: Solaris x86_64 | |
471 | NATDEPFILES='fork-child.o amd64-nat.o i386-v4-nat.o i386-sol2-nat.o \ | |
472 | procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o' | |
473 | HAVE_NATIVE_GCORE_HOST=1 | |
474 | ;; | |
475 | esac | |
476 | ;; | |
477 | spu-linux) | |
478 | case ${gdb_host_cpu} in | |
479 | powerpc) | |
480 | # Target: Cell BE (PowerPC64 + SPU) | |
481 | # This implements a 'pseudo-native' GDB running on the | |
482 | # PPU side of the Cell BE and debugging the SPU side. | |
483 | NAT_FILE= | |
484 | NAT_CDEPS= | |
485 | LOADLIBES= | |
486 | NATDEPFILES='spu-linux-nat.o fork-child.o inf-ptrace.o \ | |
21ea5acd SDJ |
487 | linux-procfs.o linux-ptrace.o linux-waitpid.o \ |
488 | linux-personality.o linux-namespaces.o' | |
e50f25ec SDJ |
489 | ;; |
490 | esac | |
21ea5acd | 491 | ;; |
21ea5acd | 492 | esac |