OSDN Git Service

79039abc8e1a58c1c2818376e7aae18d6ee6baef
[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
3 # 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 bfin*-*)
81         cpu_type=bfin
82         ;;
83 ep9312*-*-*)
84         cpu_type=arm
85         ;;
86 fido-*-*)
87         cpu_type=m68k
88         ;;
89 frv*)   cpu_type=frv
90         ;;
91 xscale-*-*)
92         cpu_type=arm
93         ;;
94 i[34567]86-*-*)
95         cpu_type=i386
96         ;;
97 x86_64-*-*)
98         cpu_type=i386
99         ;;
100 ia64-*-*)
101         ;;
102 hppa*-*-* | parisc*-*-*)
103         cpu_type=pa
104         ;;
105 m32r*-*-*)
106         cpu_type=m32r
107         ;;
108 m680[012]0-*-*)
109         cpu_type=m68k
110         ;;
111 m68k-*-*)
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 tic4x-*-*)
141         cpu_type=c4x
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         ;;
250 bfin*-elf*)
251         ;;
252 bfin*-uclinux*)
253         ;;
254 bfin*-linux-uclibc*)
255         # No need to build crtbeginT.o on uClibc systems.  Should probably
256         # be moved to the OS specific section above.
257         extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
258         ;;
259 bfin*-*)
260         ;;
261 c4x-*-rtems* | tic4x-*-rtems*)
262         ;;
263 c4x-* | tic4x-*)
264         ;;
265 cris-*-aout)
266         ;;
267 cris-*-elf | cris-*-none)
268         extra_parts="crtbegin.o crtend.o"
269         ;;
270 cris-*-linux*)
271         ;;
272 crx-*-elf)
273         ;;
274 fido-*-elf)
275         ;;
276 fr30-*-elf)
277         ;;
278 frv-*-elf)
279         ;;
280 frv-*-*linux*)
281         ;;
282 h8300-*-rtemscoff*)
283         ;;
284 h8300-*-rtems*)
285         ;;
286 h8300-*-elf*)
287         ;;
288 h8300-*-*)
289         ;;
290 hppa*64*-*-linux* | parisc*64*-*-linux*)
291         ;;
292 hppa*-*-linux* | parisc*-*-linux*)
293         ;;
294 hppa1.1-*-pro*)
295         ;;
296 hppa1.1-*-osf*)
297         ;;
298 hppa1.1-*-bsd*)
299         ;;
300 hppa[12]*-*-hpux10*)
301         ;;
302 hppa*64*-*-hpux11*)
303         ;;
304 hppa[12]*-*-hpux11*)
305         ;;
306 i[34567]86-*-darwin*)
307         ;;
308 x86_64-*-darwin*)
309         tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
310         ;;
311 i[34567]86-*-elf*)
312         ;;
313 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
314         ;;
315 i[34567]86-*-aout*)
316         ;;
317 i[34567]86-*-beoself* | i[34567]86-*-beos*)
318         ;;
319 i[34567]86-*-freebsd*)
320         ;;
321 x86_64-*-freebsd*)
322         ;;
323 i[34567]86-*-netbsdelf*)
324         ;;
325 i[34567]86-*-netbsd*)
326         ;;
327 x86_64-*-netbsd*)
328         ;;
329 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
330         ;;
331 i[34567]86-*-openbsd*)
332         ;;
333 i[34567]86-*-coff*)
334         ;;
335 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
336         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
337         tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
338         ;;
339 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
340         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
341         tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
342         ;;
343 i[34567]86-*-gnu*)
344         ;;
345 i[34567]86-pc-msdosdjgpp*)
346         ;;
347 i[34567]86-*-lynxos*)
348         ;;
349 i[3456x]86-*-netware*)
350         case /${with_ld} in
351         */nwld)
352                 tmake_file="${tmake_file} i386/t-nwld"
353                 ;;
354         esac
355         ;;
356 i[34567]86-*-nto-qnx*)
357         ;;
358 i[34567]86-*-rtems*)
359         ;;
360 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
361         ;;
362 i[34567]86-*-solaris2*)
363         ;;
364 i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
365        ;;
366 i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
367         ;;
368 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
369         ;;
370 i[34567]86-*-pe)
371         ;;
372 i[34567]86-*-cygwin* | i[34567]86-*-mingw*)
373         extra_parts="crtbegin.o crtend.o crtfastmath.o"
374         tmake_file="i386/t-cygming i386/t-crtfm"
375         ;;
376 x86_64-*-mingw*)
377         ;;
378 i[34567]86-*-uwin*)
379         ;;
380 i[34567]86-*-interix3*)
381         ;;
382 i[34567]86-*-kaos*)
383         ;;
384 ia64*-*-elf*)
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 ns32k-*-netbsdelf*)
473         echo "GCC does not yet support the ${host} target"; exit 1
474         ;;
475 ns32k-*-netbsd*)
476         ;;
477 pdp11-*-bsd)
478         ;;
479 pdp11-*-*)
480         ;;
481 powerpc64-*-linux*)
482         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
483         ;;
484 powerpc64-*-gnu*)
485         tmake_file="${tmake_file} rs6000/t-ldbl128"
486         ;;
487 powerpc-*-beos*)
488         ;;
489 powerpc-*-darwin*)
490         ;;
491 powerpc64-*-darwin*)
492         ;;
493 powerpc*-*-freebsd*)
494         ;;
495 powerpc-*-netbsd*)
496         ;;
497 powerpc-*-chorusos*)
498         ;;
499 powerpc-*-eabispe*)
500         ;;
501 powerpc-*-eabisimaltivec*)
502         ;;
503 powerpc-*-eabisim*)
504         ;;
505 powerpc-*-elf*)
506         ;;
507 powerpc-*-eabialtivec*)
508         ;;
509 powerpc-*-eabi*)
510         ;;
511 powerpc-*-rtems*)
512         ;;
513 powerpc-*-linux*altivec*)
514         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
515         ;;
516 powerpc-*-linux*spe*)
517         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
518         ;;
519 powerpc-*-linux*)
520         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128"
521         ;;
522 powerpc-*-gnu-gnualtivec*)
523         tmake_file="${tmake_file} rs6000/t-ldbl128"
524         ;;
525 powerpc-*-gnu*)
526         tmake_file="${tmake_file} rs6000/t-ldbl128"
527         ;;
528 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
529         ;;
530 powerpc-wrs-windiss*)  # Instruction-level simulator for VxWorks.
531         ;;
532 powerpc-*-lynxos*)
533         ;;
534 powerpcle-*-sysv*)
535         ;;
536 powerpcle-*-elf*)
537         ;;
538 powerpcle-*-eabisim*)
539         ;;
540 powerpcle-*-eabi*)
541         ;;
542 powerpc-*-kaos*)
543         ;;
544 powerpcle-*-kaos*)
545         ;;
546 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
547         ;;
548 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
549         ;;
550 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
551         ;;
552 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
553         ;;
554 s390-*-linux*)
555         ;;
556 s390x-*-linux*)
557         ;;
558 s390x-ibm-tpf*)
559         ;;
560 score-*-elf)
561         ;;
562 sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
563 sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
564   sh-*-linux* | sh[346lbe]*-*-linux* | \
565   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
566    sh64-*-netbsd* | sh64l*-*-netbsd*)
567         case ${host} in
568         sh*-*-linux*)
569                 tmake_file="${tmake_file} sh/t-linux"
570                 ;;
571         esac
572         ;;
573 sh-*-rtemscoff*)
574         ;;
575 sh-*-rtems*)
576         ;;
577 sh-wrs-vxworks)
578         ;;
579 sh-*-*)
580         ;;
581 sparc-*-netbsdelf*)
582         ;;
583 sparc64-*-openbsd*)
584         ;;
585 sparc-*-elf*)
586         ;;
587 sparc-*-linux*)         # SPARC's running GNU/Linux, libc6
588         extra_parts="$extra_parts crtfastmath.o"
589         tmake_file="${tmake_file} sparc/t-crtfm"
590         ;;
591 sparc-*-rtems*)
592         ;;
593 sparc64-*-solaris2* | sparcv9-*-solaris2*)
594         ;;
595 sparc-*-solaris2*)
596         ;;
597 sparc-*-sysv4*)
598         ;;
599 sparc64-*-elf*)
600         ;;
601 sparc-wrs-vxworks)
602         ;;
603 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
604         ;;
605 sparc64-*-linux*)               # 64-bit SPARC's running GNU/Linux
606         extra_parts="$extra_parts crtfastmath.o"
607         tmake_file="${tmake_file} sparc/t-crtfm"
608         ;;
609 sparc64-*-netbsd*)
610         ;;
611 spu-*-elf*)
612         ;;
613 strongarm-*-elf*)
614         ;;
615 strongarm-*-pe)
616         ;;
617 strongarm-*-kaos*)
618         ;;
619 v850e1-*-*)
620         ;;
621 v850e-*-*)
622         ;;
623 v850-*-*)
624         ;;
625 vax-*-bsd*)                     # VAXen running BSD
626         ;;
627 vax-*-sysv*)                    # VAXen running system V
628         ;;
629 vax-*-netbsdelf*)
630         ;;
631 vax-*-netbsd*)
632         ;;
633 vax-*-openbsd*)
634         ;;
635 vax-*-ultrix*)                  # VAXen running ultrix
636         ;;
637 xscale-*-elf)
638         ;;
639 xscale-*-coff)
640         ;;
641 xstormy16-*-elf)
642         ;;
643 xtensa-*-elf*)
644         ;;
645 xtensa-*-linux*)
646         ;;
647 am33_2.0-*-linux*)
648         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
649         ;;
650 m32c-*-elf*)
651         ;;
652 *)
653         echo "*** Configuration ${host} not supported" 1>&2
654         exit 1
655         ;;
656 esac