OSDN Git Service

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