OSDN Git Service

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