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