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