OSDN Git Service

2009-10-23 Kai Tietz <kai.tietz@onevision.com>
[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, 2009 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 3, 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 COPYING3.  If not see
19 #<http://www.gnu.org/licenses/>.
20
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.
26
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}.
32
33 # This file switches on the shell variable ${host}, and also uses the
34 # following shell variables:
35 #
36 #  with_*               Various variables as set by configure.
37
38 # This file sets the following shell variables for use by the
39 # autoconf-generated configure script:
40 #
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".
56
57 asm_hidden_op=.hidden
58 extra_parts=
59 tmake_file=
60
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 m32r*-*-*)
101         cpu_type=m32r
102         ;;
103 m68k-*-*)
104         ;;
105 mep*-*-*)
106         ;;
107 mips*-*-*)
108         cpu_type=mips
109         ;;
110 powerpc*-*-*)
111         cpu_type=rs6000
112         ;;
113 rs6000*-*-*)
114         ;;
115 score*-*-*)
116         cpu_type=score
117         ;;
118 sparc64*-*-*)
119         cpu_type=sparc
120         ;;
121 sparc*-*-*)
122         cpu_type=sparc
123         ;;
124 spu*-*-*)
125         cpu_type=spu
126         ;;
127 s390*-*-*)
128         cpu_type=s390
129         ;;
130 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
131 sh[123456789lbe]*-*-*)
132         cpu_type=sh
133         ;;
134 esac
135
136 # Common parts for widely ported systems.
137 case ${host} in
138 *-*-darwin*)
139   asm_hidden_op=.private_extern
140   tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
141   ;;
142 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
143   # This is the place-holder for the generic a.out configuration
144   # of FreeBSD.  No actual configuration resides here since
145   # there was only ever a bare-bones ix86 configuration for
146   # a.out and it exists solely in the machine-specific section.
147   # This place-holder must exist to avoid dropping into
148   # the generic ELF configuration of FreeBSD (i.e. it must be
149   # ordered before that section).
150   ;;
151 *-*-freebsd*)
152   # This is the generic ELF configuration of FreeBSD.  Later
153   # machine-specific sections may refine and add to this
154   # configuration.
155   ;;
156 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
157   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
158   ;;
159 *-*-netbsd*)
160   ;;
161 *-*-openbsd*)
162   ;;
163 *-*-rtems*)
164   ;;
165 *-*-vxworks*)
166   ;;
167 *-*-elf)
168   ;;
169 esac
170
171 case ${host} in
172 # Support site-specific machine types.
173 *local*)
174         rest=`echo ${host} | sed -e "s/$cpu_type-//"`
175         if test -f $srcdir/config/${cpu_type}/t-$rest
176         then tmake_file=${cpu_type}/t-$rest
177         fi
178         ;;
179 alpha*-*-linux* | alpha*-*-gnu*)
180         tmake_file="${tmake_file} alpha/t-crtfm"
181         extra_parts="$extra_parts crtfastmath.o"
182         ;;
183 alpha*-*-freebsd*)
184         ;;
185 alpha*-*-netbsd*)
186         ;;
187 alpha*-*-openbsd*)
188         ;;
189 alpha*-dec-osf[45]*)
190         ;;
191 alpha64-dec-*vms*)
192         tmake_file="vms/t-vms vms/t-vms64 alpha/t-vms"
193         ;;
194 alpha*-dec-*vms*)
195         tmake_file="vms/t-vms alpha/t-vms"
196         ;;
197 arc-*-elf*)
198         ;;
199 arm-wrs-vxworks)
200         ;;
201 arm*-*-freebsd*)
202         ;;
203 arm*-*-netbsdelf*)
204         ;;
205 arm*-*-netbsd*)
206         ;;
207 arm*-*-linux*)                  # ARM GNU/Linux with ELF
208         ;;
209 arm*-*-uclinux*)                # ARM ucLinux
210         ;;
211 arm*-*-ecos-elf)
212         ;;
213 arm*-*-eabi* | arm*-*-symbianelf* )
214         ;;
215 arm*-*-rtems*)
216         ;;
217 arm*-*-elf)
218         ;;
219 arm*-wince-pe*)
220         ;;
221 arm-*-pe*)
222         ;;
223 avr-*-rtems*)
224         ;;
225 avr-*-*)
226     # Make HImode functions for AVR
227     tmake_file=${cpu_type}/t-avr
228         ;;
229 bfin*-elf*)
230         ;;
231 bfin*-uclinux*)
232         ;;
233 bfin*-linux-uclibc*)
234         # No need to build crtbeginT.o on uClibc systems.  Should probably
235         # be moved to the OS specific section above.
236         extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
237         ;;
238 bfin*-*)
239         ;;
240 crisv32-*-elf | crisv32-*-none | cris-*-elf | cris-*-none)
241         extra_parts="crtbegin.o crtend.o"
242         ;;
243 cris-*-linux* | crisv32-*-linux*)
244         ;;
245 crx-*-elf)
246         ;;
247 fido-*-elf)
248         ;;
249 fr30-*-elf)
250         ;;
251 frv-*-elf)
252         ;;
253 frv-*-*linux*)
254         ;;
255 h8300-*-rtems*)
256         ;;
257 h8300-*-elf*)
258         ;;
259 hppa*64*-*-linux*)
260         ;;
261 hppa*-*-linux*)
262         ;;
263 hppa[12]*-*-hpux10*)
264         ;;
265 hppa*64*-*-hpux11*)
266         ;;
267 hppa[12]*-*-hpux11*)
268         ;;
269 i[34567]86-*-darwin*)
270         ;;
271 x86_64-*-darwin*)
272         tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
273         ;;
274 i[34567]86-*-elf*)
275         ;;
276 x86_64-*-elf*)
277         ;;
278 i[34567]86-*-freebsd*)
279         ;;
280 x86_64-*-freebsd*)
281         ;;
282 i[34567]86-*-netbsdelf*)
283         ;;
284 i[34567]86-*-netbsd*)
285         ;;
286 x86_64-*-netbsd*)
287         ;;
288 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
289         ;;
290 i[34567]86-*-openbsd*)
291         ;;
292 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*)
293         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
294         tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
295         ;;
296 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
297         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
298         tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
299         ;;
300 i[34567]86-pc-msdosdjgpp*)
301         ;;
302 i[34567]86-*-lynxos*)
303         ;;
304 i[3456x]86-*-netware*)
305         case /${with_ld} in
306         */nwld)
307                 tmake_file="${tmake_file} i386/t-nwld"
308                 ;;
309         esac
310         ;;
311 i[34567]86-*-nto-qnx*)
312         ;;
313 i[34567]86-*-rtems*)
314         ;;
315 i[34567]86-*-solaris2*)
316         tmake_file="${tmake_file} i386/t-sol2"
317         case ${host} in
318         *-*-solaris2.1[0-9]*)
319                 # Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
320                 # part of the base system.
321                 extra_parts="gmon.o crtbegin.o crtend.o"
322                 ;;
323         *)
324                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
325                 ;;
326         esac
327         ;;
328 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
329         ;;
330 i[34567]86-*-pe)
331         ;;
332 i[34567]86-*-cygwin* | i[34567]86-*-mingw*)
333         extra_parts="crtbegin.o crtend.o crtfastmath.o"
334         tmake_file="i386/t-cygming i386/t-crtfm"
335         ;;
336 x86_64-*-mingw*)
337         ;;
338 i[34567]86-*-interix3*)
339         ;;
340 ia64*-*-elf*)
341         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
342         tmake_file="ia64/t-ia64"
343         ;;
344 ia64*-*-freebsd*)
345         ;;
346 ia64*-*-linux*)
347         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
348         tmake_file="ia64/t-ia64 t-softfp ia64/t-fprules-softfp ia64/t-softfp-compat"
349         ;;
350 ia64*-*-hpux*)
351         ;;
352 ia64-hp-*vms*)
353         tmake_file="vms/t-vms vms/t-vms64 ia64/t-vms"
354         ;;
355 iq2000*-*-elf*)
356         ;;
357 m32r-*-elf*|m32r-*-rtems*)
358         ;;
359 m32rle-*-elf*)
360         ;;
361 m32r-*-linux*)
362         ;;
363 m32rle-*-linux*)
364         ;;
365 m68hc11-*-*|m6811-*-*)
366         ;;
367 m68hc12-*-*|m6812-*-*)
368         ;;
369 m68k-*-elf*)
370         ;;
371 m68k*-*-netbsdelf*)
372         ;;
373 m68k*-*-openbsd*)
374         ;;
375 m68k-*-uclinux*)                # Motorola m68k/ColdFire running uClinux with uClibc
376         ;;
377 m68k-*-linux*)          # Motorola m68k's running GNU/Linux
378                                 # with ELF format using glibc 2
379                                 # aka the GNU/Linux C library 6.
380         ;;
381 m68k-*-rtems*)
382         ;;
383 mcore-*-elf)
384         ;;
385 mcore-*-pe*)
386         ;;
387 mips-sgi-irix[56]*)
388         ;;
389 mips*-*-netbsd*)                        # NetBSD/mips, either endian.
390         ;;
391 mips64*-*-linux*)
392         ;;
393 mips*-*-linux*)                         # Linux MIPS, either endian.
394         ;;
395 mips*-*-openbsd*)
396         ;;
397 mipsisa32-*-elf* | mipsisa32el-*-elf*)
398         ;;
399 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
400         ;;
401 mipsisa64-*-elf* | mipsisa64el-*-elf*)
402         ;;
403 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
404         ;;
405 mipsisa64sr71k-*-elf*)
406         ;;
407 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
408         ;;
409 mips-*-elf* | mipsel-*-elf*)
410         ;;
411 mips64-*-elf* | mips64el-*-elf*)
412         ;;
413 mips64vr-*-elf* | mips64vrel-*-elf*)
414         ;;
415 mips64orion-*-elf* | mips64orionel-*-elf*)
416         ;;
417 mips*-*-rtems*)
418         ;;
419 mips-wrs-vxworks)
420         ;;
421 mipstx39-*-elf* | mipstx39el-*-elf*)
422         ;;
423 mmix-knuth-mmixware)
424         ;;
425 mn10300-*-*)
426         ;;
427 moxie-*-*)
428         tmake_file=${cpu_type}/t-moxie
429         extra_parts="crtbegin.o crtend.o crti.o crtn.o"
430         ;;
431 pdp11-*-*)
432         ;;
433 picochip-*-*)
434         ;;
435 powerpc-*-darwin*)
436         ;;
437 powerpc64-*-darwin*)
438         ;;
439 powerpc*-*-freebsd*)
440         ;;
441 powerpc-*-netbsd*)
442         ;;
443 powerpc-*-eabispe*)
444         ;;
445 powerpc-*-eabisimaltivec*)
446         ;;
447 powerpc-*-eabisim*)
448         ;;
449 powerpc-*-elf*)
450         ;;
451 powerpc-*-eabialtivec*)
452         ;;
453 powerpc-*-eabi*)
454         ;;
455 powerpc-*-rtems*)
456         ;;
457 powerpc-*-linux* | powerpc64-*-linux*)
458         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"
459         ;;
460 powerpc64-*-gnu*)
461         tmake_file="${tmake_file} rs6000/t-ldbl128 t-softfp"
462         ;;
463 powerpc-*-gnu-gnualtivec*)
464         tmake_file="${tmake_file} rs6000/t-ldbl128"
465         ;;
466 powerpc-*-gnu*)
467         tmake_file="${tmake_file} rs6000/t-ldbl128"
468         ;;
469 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
470         ;;
471 powerpc-*-lynxos*)
472         ;;
473 powerpcle-*-elf*)
474         ;;
475 powerpcle-*-eabisim*)
476         ;;
477 powerpcle-*-eabi*)
478         ;;
479 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
480         ;;
481 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
482         ;;
483 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
484         ;;
485 s390-*-linux*)
486         tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi"
487         ;;
488 s390x-*-linux*)
489         tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux"
490         ;;
491 s390x-ibm-tpf*)
492         tmake_file="${tmake_file} s390/t-crtstuff s390/t-tpf"
493         ;;
494 score-*-elf)
495         ;;
496 sh-*-elf* | sh[12346l]*-*-elf* | \
497 sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
498   sh-*-linux* | sh[2346lbe]*-*-linux* | \
499   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
500    sh64-*-netbsd* | sh64l*-*-netbsd*)
501         case ${host} in
502         sh*-*-linux*)
503                 tmake_file="${tmake_file} sh/t-linux"
504                 ;;
505         esac
506         ;;
507 sh-*-rtems*)
508         ;;
509 sh-wrs-vxworks)
510         ;;
511 sparc-*-netbsdelf*)
512         ;;
513 sparc64-*-openbsd*)
514         ;;
515 sparc-*-elf*)
516         ;;
517 sparc-*-linux*)         # SPARC's running GNU/Linux, libc6
518         extra_parts="$extra_parts crtfastmath.o"
519         tmake_file="${tmake_file} sparc/t-crtfm"
520         ;;
521 sparc-*-rtems*)
522         ;;
523 sparc64-*-solaris2* | sparcv9-*-solaris2*)
524         ;;
525 sparc-*-solaris2*)
526         ;;
527 sparc64-*-elf*)
528         ;;
529 sparc-wrs-vxworks)
530         ;;
531 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
532         ;;
533 sparc64-*-linux*)               # 64-bit SPARC's running GNU/Linux
534         extra_parts="$extra_parts crtfastmath.o"
535         tmake_file="${tmake_file} sparc/t-crtfm"
536         ;;
537 sparc64-*-netbsd*)
538         ;;
539 spu-*-elf*)
540         ;;
541 v850e1-*-*)
542         ;;
543 v850e-*-*)
544         ;;
545 v850-*-*)
546         ;;
547 vax-*-linux*)
548         ;;
549 vax-*-netbsdelf*)
550         ;;
551 vax-*-netbsd*)
552         ;;
553 vax-*-openbsd*)
554         ;;
555 xstormy16-*-elf)
556         ;;
557 xtensa*-*-elf*)
558         ;;
559 xtensa*-*-linux*)
560         ;;
561 am33_2.0-*-linux*)
562         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
563         ;;
564 m32c-*-elf*|m32c-*-rtems*)
565         ;;
566 mep*-*-*)
567         ;;
568 *)
569         echo "*** Configuration ${host} not supported" 1>&2
570         exit 1
571         ;;
572 esac
573
574 case ${host} in
575 i[34567]86-*-linux* | x86_64-*-linux* | \
576   i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | \
577   i[34567]86-*-gnu*)
578         tmake_file="${tmake_file} t-tls"
579         ;;
580 esac
581
582 case ${host} in
583 i[34567]86-*-darwin* | x86_64-*-darwin* | \
584   i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
585   i[34567]86-*-linux* | x86_64-*-linux* | \
586   i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
587         if test "${host_address}" = 32; then
588                 tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp"
589         fi
590         ;;
591 esac
592
593 case ${host} in
594 i[34567]86-*-linux* | x86_64-*-linux*)
595         # Provide backward binary compatibility for 64bit Linux/x86.
596         if test "${host_address}" = 64; then
597                 tmake_file="${tmake_file} i386/${host_address}/t-softfp-compat"
598         fi
599         ;;
600 esac