]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config.host
* Makefile.def: check-gold depends upon all-binutils.
[thirdparty/gcc.git] / libgcc / config.host
CommitLineData
894a47b4 1# libgcc host-specific configuration file.
99c77e32 2# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3# 2008 Free Software Foundation, Inc.
894a47b4 4
5#This file is part of GCC.
6
7#GCC is free software; you can redistribute it and/or modify it under
8#the terms of the GNU General Public License as published by the Free
9#Software Foundation; either version 2, or (at your option) any later
10#version.
11
12#GCC is distributed in the hope that it will be useful, but WITHOUT
13#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15#for more details.
16
17#You should have received a copy of the GNU General Public License
18#along with GCC; see the file COPYING. If not, write to the Free
19#Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20#02110-1301, USA.
21
22# This is the libgcc host-specific configuration file
23# where a configuration type is mapped to different system-specific
24# definitions and files. This is invoked by the autoconf-generated
25# configure script. Putting it in a separate shell file lets us skip
26# running autoconf when modifying host-specific information.
27
28# This file bears an obvious resemblance to gcc/config.gcc. The cases
29# should be kept similar, to ease moving library-specific settings
30# from config.gcc to this file. That is also why tmake_file is
31# left as tmake_file, rather than hmake_file, even though this library
32# switches on ${host}.
33
34# This file switches on the shell variable ${host}, and also uses the
35# following shell variables:
36#
37# with_* Various variables as set by configure.
38
39# This file sets the following shell variables for use by the
40# autoconf-generated configure script:
41#
42# asm_hidden_op The assembler pseudo-op to use for hide
43# lists for object files implemented in
44# assembly (with -fvisibility=hidden for C).
45# The default is ".hidden".
46# cpu_type The name of the cpu, if different from the first
47# chunk of the canonical host name.
48# extra_parts List of extra object files that should be compiled
49# for this target machine. This may be overridden
50# by setting EXTRA_PARTS in a tmake_file fragment.
51# If either is set, EXTRA_PARTS and
52# EXTRA_MULTILIB_PARTS inherited from the GCC
53# subdirectory will be ignored.
54# tmake_file A list of machine-description-specific
55# makefile-fragments, if different from
56# "$cpu_type/t-$cpu_type".
57
58asm_hidden_op=.hidden
59extra_parts=
60tmake_file=
61
62# Set default cpu_type so it can be updated in each machine entry.
63cpu_type=`echo ${host} | sed 's/-.*$//'`
64case ${host} in
65m32c*-*-*)
66 cpu_type=m32c
67 ;;
68alpha*-*-*)
69 cpu_type=alpha
70 ;;
71am33_2.0-*-linux*)
72 cpu_type=mn10300
73 ;;
74strongarm*-*-*)
75 cpu_type=arm
76 ;;
77arm*-*-*)
78 cpu_type=arm
79 ;;
80bfin*-*)
81 cpu_type=bfin
82 ;;
83ep9312*-*-*)
84 cpu_type=arm
85 ;;
278e2fd1 86fido-*-*)
87 cpu_type=m68k
88 ;;
894a47b4 89frv*) cpu_type=frv
90 ;;
91xscale-*-*)
92 cpu_type=arm
93 ;;
94i[34567]86-*-*)
95 cpu_type=i386
96 ;;
97x86_64-*-*)
98 cpu_type=i386
99 ;;
100ia64-*-*)
101 ;;
102hppa*-*-* | parisc*-*-*)
103 cpu_type=pa
104 ;;
105m32r*-*-*)
106 cpu_type=m32r
107 ;;
108m680[012]0-*-*)
109 cpu_type=m68k
110 ;;
111m68k-*-*)
112 ;;
113mips*-*-*)
114 cpu_type=mips
115 ;;
116powerpc*-*-*)
117 cpu_type=rs6000
118 ;;
119rs6000*-*-*)
120 ;;
121score*-*-*)
122 cpu_type=score
123 ;;
124sparc64*-*-*)
125 cpu_type=sparc
126 ;;
127sparc*-*-*)
128 cpu_type=sparc
129 ;;
130spu*-*-*)
131 cpu_type=spu
132 ;;
133s390*-*-*)
134 cpu_type=s390
135 ;;
136# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
137sh[123456789lbe]*-*-*)
138 cpu_type=sh
139 ;;
894a47b4 140esac
141
142# Common parts for widely ported systems.
143case ${host} in
144*-*-darwin*)
145 asm_hidden_op=.private_extern
146 tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
147 ;;
148*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
149 # This is the place-holder for the generic a.out configuration
150 # of FreeBSD. No actual configuration resides here since
151 # there was only ever a bare-bones ix86 configuration for
152 # a.out and it exists solely in the machine-specific section.
153 # This place-holder must exist to avoid dropping into
154 # the generic ELF configuration of FreeBSD (i.e. it must be
155 # ordered before that section).
156 ;;
157*-*-freebsd*)
158 # This is the generic ELF configuration of FreeBSD. Later
159 # machine-specific sections may refine and add to this
160 # configuration.
161 ;;
162*-*-linux*libc1* | *-*-linux*aout*)
163 # Avoid the generic linux case.
164 ;;
165*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
166 # Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
167 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
168 ;;
169*-*-gnu*)
170 ;;
171*-*-netbsd*)
172 ;;
173*-*-openbsd*)
174 ;;
175*-*-rtems*)
176 ;;
177*-*-vxworks*)
178 ;;
179*-*-elf)
180 ;;
181esac
182
183case ${host} in
184# Support site-specific machine types.
185*local*)
186 rest=`echo ${host} | sed -e "s/$cpu_type-//"`
187 if test -f $srcdir/config/${cpu_type}/t-$rest
188 then tmake_file=${cpu_type}/t-$rest
189 fi
190 ;;
191alpha*-*-unicosmk*)
192 ;;
193alpha*-*-linux*)
194 tmake_file="${tmake_file} alpha/t-crtfm"
cdca0ab7 195 extra_parts="$extra_parts crtfastmath.o"
894a47b4 196 ;;
197alpha*-*-gnu*)
198 ;;
199alpha*-*-freebsd*)
200 ;;
201alpha*-*-netbsd*)
202 ;;
203alpha*-*-openbsd*)
204 ;;
205alpha*-dec-osf[45]*)
206 ;;
207alpha64-dec-*vms*)
208 ;;
209alpha*-dec-*vms*)
210 ;;
211arc-*-elf*)
212 ;;
213arm-*-coff* | armel-*-coff*)
214 ;;
215arm-semi-aof | armel-semi-aof)
216 ;;
217arm-wrs-vxworks)
218 ;;
219arm*-*-freebsd*|strongarm*-*-freebsd*)
220 ;;
221arm*-*-netbsdelf*)
222 ;;
223arm*-*-netbsd*)
224 ;;
225arm*-*-linux*) # ARM GNU/Linux with ELF
226 ;;
227arm*-*-uclinux*) # ARM ucLinux
228 ;;
229arm*-*-ecos-elf)
230 ;;
231arm*-*-eabi* | arm*-*-symbianelf* )
232 ;;
233arm*-*-rtems*)
234 ;;
235arm*-*-elf | ep9312-*-elf)
236 ;;
237arm*-wince-pe*)
238 ;;
239arm-*-pe*)
240 ;;
241arm*-*-kaos*)
242 ;;
243avr-*-rtems*)
244 ;;
245avr-*-*)
246 ;;
247bfin*-elf*)
248 ;;
249bfin*-uclinux*)
250 ;;
bce94ab5 251bfin*-linux-uclibc*)
252 # No need to build crtbeginT.o on uClibc systems. Should probably
253 # be moved to the OS specific section above.
254 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
255 ;;
894a47b4 256bfin*-*)
257 ;;
894a47b4 258cris-*-aout)
259 ;;
877d7f12 260crisv32-*-elf | crisv32-*-none | cris-*-elf | cris-*-none)
7a9b9c95 261 extra_parts="crtbegin.o crtend.o"
894a47b4 262 ;;
877d7f12 263cris-*-linux* | crisv32-*-linux*)
894a47b4 264 ;;
265crx-*-elf)
266 ;;
278e2fd1 267fido-*-elf)
268 ;;
894a47b4 269fr30-*-elf)
270 ;;
271frv-*-elf)
272 ;;
273frv-*-*linux*)
274 ;;
894a47b4 275h8300-*-rtems*)
276 ;;
277h8300-*-elf*)
278 ;;
279h8300-*-*)
280 ;;
281hppa*64*-*-linux* | parisc*64*-*-linux*)
282 ;;
283hppa*-*-linux* | parisc*-*-linux*)
284 ;;
285hppa1.1-*-pro*)
286 ;;
287hppa1.1-*-osf*)
288 ;;
289hppa1.1-*-bsd*)
290 ;;
291hppa[12]*-*-hpux10*)
292 ;;
293hppa*64*-*-hpux11*)
294 ;;
295hppa[12]*-*-hpux11*)
296 ;;
297i[34567]86-*-darwin*)
298 ;;
299x86_64-*-darwin*)
300 tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
301 ;;
302i[34567]86-*-elf*)
303 ;;
cc8ebe39 304x86_64-*-elf*)
305 ;;
894a47b4 306i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
307 ;;
308i[34567]86-*-aout*)
309 ;;
310i[34567]86-*-beoself* | i[34567]86-*-beos*)
311 ;;
312i[34567]86-*-freebsd*)
313 ;;
314x86_64-*-freebsd*)
315 ;;
316i[34567]86-*-netbsdelf*)
317 ;;
318i[34567]86-*-netbsd*)
319 ;;
320x86_64-*-netbsd*)
321 ;;
322i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
323 ;;
324i[34567]86-*-openbsd*)
325 ;;
326i[34567]86-*-coff*)
327 ;;
328i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
6d057ce8 329 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
330 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
894a47b4 331 ;;
332x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
6d057ce8 333 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
334 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
894a47b4 335 ;;
336i[34567]86-*-gnu*)
337 ;;
338i[34567]86-pc-msdosdjgpp*)
339 ;;
340i[34567]86-*-lynxos*)
341 ;;
342i[3456x]86-*-netware*)
343 case /${with_ld} in
344 */nwld)
345 tmake_file="${tmake_file} i386/t-nwld"
346 ;;
347 esac
348 ;;
349i[34567]86-*-nto-qnx*)
350 ;;
351i[34567]86-*-rtems*)
352 ;;
353i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
354 ;;
355i[34567]86-*-solaris2*)
356 ;;
357i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
358 ;;
359i[34567]86-*-sysv4*) # Intel 80386's running system V.4
360 ;;
361i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
362 ;;
8f433c51 363i[34567]86-*-pe)
894a47b4 364 ;;
8f433c51 365i[34567]86-*-cygwin* | i[34567]86-*-mingw*)
9e51385b 366 extra_parts="crtbegin.o crtend.o crtfastmath.o"
367 tmake_file="i386/t-cygming i386/t-crtfm"
8f433c51 368 ;;
369x86_64-*-mingw*)
894a47b4 370 ;;
371i[34567]86-*-uwin*)
372 ;;
373i[34567]86-*-interix3*)
374 ;;
375i[34567]86-*-kaos*)
376 ;;
377ia64*-*-elf*)
75612461 378 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
379 tmake_file="ia64/t-ia64"
894a47b4 380 ;;
381ia64*-*-freebsd*)
382 ;;
383ia64*-*-linux*)
384 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
c11c6ae3 385 tmake_file="ia64/t-ia64"
894a47b4 386 ;;
387ia64*-*-hpux*)
388 ;;
389iq2000*-*-elf*)
390 ;;
391m32r-*-elf*)
392 ;;
393m32rle-*-elf*)
394 ;;
395m32r-*-linux*)
396 ;;
397m32rle-*-linux*)
398 ;;
399m68hc11-*-*|m6811-*-*)
400 ;;
401m68hc12-*-*|m6812-*-*)
402 ;;
403m68k-*-aout*)
404 ;;
405m68k-*-coff*)
406 ;;
407m68020-*-elf* | m68k-*-elf*)
408 ;;
409m68010-*-netbsdelf* | m68k*-*-netbsdelf*)
410 ;;
411m68k*-*-openbsd*)
412 ;;
413m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
414 ;;
415m68k-*-linux*) # Motorola m68k's running GNU/Linux
416 # with ELF format using glibc 2
417 # aka the GNU/Linux C library 6.
418 ;;
419m68k-*-rtems*)
420 ;;
421mcore-*-elf)
422 ;;
423mcore-*-pe*)
424 ;;
425mips-sgi-irix[56]*)
426 ;;
427mips*-*-netbsd*) # NetBSD/mips, either endian.
428 ;;
429mips64*-*-linux*)
430 ;;
431mips*-*-linux*) # Linux MIPS, either endian.
432 ;;
433mips*-*-openbsd*)
434 ;;
435mipsisa32-*-elf* | mipsisa32el-*-elf*)
436 ;;
437mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
438 ;;
439mipsisa64-*-elf* | mipsisa64el-*-elf*)
440 ;;
441mipsisa64sr71k-*-elf*)
442 ;;
443mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
444 ;;
445mips-*-elf* | mipsel-*-elf*)
446 ;;
447mips64-*-elf* | mips64el-*-elf*)
448 ;;
449mips64vr-*-elf* | mips64vrel-*-elf*)
450 ;;
451mips64orion-*-elf* | mips64orionel-*-elf*)
452 ;;
453mips*-*-rtems*)
454 ;;
455mips-wrs-vxworks)
456 ;;
457mips-wrs-windiss) # Instruction-level simulator for VxWorks.
458 ;;
459mipstx39-*-elf* | mipstx39el-*-elf*)
460 ;;
461mmix-knuth-mmixware)
462 ;;
463mn10300-*-*)
464 ;;
465mt-*-elf)
466 ;;
894a47b4 467pdp11-*-bsd)
468 ;;
469pdp11-*-*)
470 ;;
471powerpc64-*-linux*)
472 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
473 ;;
474powerpc64-*-gnu*)
475 tmake_file="${tmake_file} rs6000/t-ldbl128"
476 ;;
477powerpc-*-beos*)
478 ;;
479powerpc-*-darwin*)
480 ;;
481powerpc64-*-darwin*)
482 ;;
483powerpc*-*-freebsd*)
484 ;;
485powerpc-*-netbsd*)
486 ;;
487powerpc-*-chorusos*)
488 ;;
489powerpc-*-eabispe*)
490 ;;
491powerpc-*-eabisimaltivec*)
492 ;;
493powerpc-*-eabisim*)
494 ;;
495powerpc-*-elf*)
496 ;;
497powerpc-*-eabialtivec*)
498 ;;
499powerpc-*-eabi*)
500 ;;
501powerpc-*-rtems*)
502 ;;
503powerpc-*-linux*altivec*)
504 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
505 ;;
506powerpc-*-linux*spe*)
507 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
508 ;;
509powerpc-*-linux*)
510 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
511 ;;
512powerpc-*-gnu-gnualtivec*)
513 tmake_file="${tmake_file} rs6000/t-ldbl128"
514 ;;
515powerpc-*-gnu*)
516 tmake_file="${tmake_file} rs6000/t-ldbl128"
517 ;;
518powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
519 ;;
520powerpc-wrs-windiss*) # Instruction-level simulator for VxWorks.
521 ;;
522powerpc-*-lynxos*)
523 ;;
524powerpcle-*-sysv*)
525 ;;
526powerpcle-*-elf*)
527 ;;
528powerpcle-*-eabisim*)
529 ;;
530powerpcle-*-eabi*)
531 ;;
532powerpc-*-kaos*)
533 ;;
534powerpcle-*-kaos*)
535 ;;
536rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
537 ;;
538rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
539 ;;
540rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
541 ;;
542rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
543 ;;
544s390-*-linux*)
545 ;;
546s390x-*-linux*)
547 ;;
548s390x-ibm-tpf*)
549 ;;
550score-*-elf)
551 ;;
552sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
553sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
554 sh-*-linux* | sh[346lbe]*-*-linux* | \
555 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
556 sh64-*-netbsd* | sh64l*-*-netbsd*)
97f1a704 557 case ${host} in
558 sh*-*-linux*)
559 tmake_file="${tmake_file} sh/t-linux"
560 ;;
561 esac
894a47b4 562 ;;
894a47b4 563sh-*-rtems*)
564 ;;
565sh-wrs-vxworks)
566 ;;
567sh-*-*)
568 ;;
569sparc-*-netbsdelf*)
570 ;;
571sparc64-*-openbsd*)
572 ;;
573sparc-*-elf*)
574 ;;
575sparc-*-linux*) # SPARC's running GNU/Linux, libc6
576 extra_parts="$extra_parts crtfastmath.o"
577 tmake_file="${tmake_file} sparc/t-crtfm"
578 ;;
579sparc-*-rtems*)
580 ;;
581sparc64-*-solaris2* | sparcv9-*-solaris2*)
582 ;;
583sparc-*-solaris2*)
584 ;;
585sparc-*-sysv4*)
586 ;;
587sparc64-*-elf*)
588 ;;
723e1902 589sparc-wrs-vxworks)
590 ;;
894a47b4 591sparc64-*-freebsd*|ultrasparc-*-freebsd*)
592 ;;
593sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
594 extra_parts="$extra_parts crtfastmath.o"
595 tmake_file="${tmake_file} sparc/t-crtfm"
596 ;;
597sparc64-*-netbsd*)
598 ;;
599spu-*-elf*)
600 ;;
601strongarm-*-elf*)
602 ;;
603strongarm-*-pe)
604 ;;
605strongarm-*-kaos*)
606 ;;
607v850e1-*-*)
608 ;;
609v850e-*-*)
610 ;;
611v850-*-*)
612 ;;
613vax-*-bsd*) # VAXen running BSD
614 ;;
615vax-*-sysv*) # VAXen running system V
616 ;;
617vax-*-netbsdelf*)
618 ;;
619vax-*-netbsd*)
620 ;;
621vax-*-openbsd*)
622 ;;
623vax-*-ultrix*) # VAXen running ultrix
624 ;;
625xscale-*-elf)
626 ;;
627xscale-*-coff)
628 ;;
629xstormy16-*-elf)
630 ;;
631xtensa-*-elf*)
632 ;;
633xtensa-*-linux*)
634 ;;
635am33_2.0-*-linux*)
636 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
637 ;;
638m32c-*-elf*)
639 ;;
640*)
641 echo "*** Configuration ${host} not supported" 1>&2
642 exit 1
643 ;;
644esac
e4cbe54f 645
646case ${host} in
647i[34567]86-*-linux* | x86_64-*-linux*)
648 tmake_file="${tmake_file} t-tls"
649 ;;
650esac