OSDN Git Service

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