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