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
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
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".
61 # Set default cpu_type so it can be updated in each machine entry.
62 cpu_type=`echo ${host} | sed 's/-.*$//'`
87 moxie*) cpu_type=moxie
136 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
137 sh[123456789lbe]*-*-*)
142 # Common parts for widely ported systems.
145 asm_hidden_op=.private_extern
146 tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
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).
158 # This is the generic ELF configuration of FreeBSD. Later
159 # machine-specific sections may refine and add to this
162 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
163 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
178 # Support site-specific machine types.
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
186 tmake_file="${tmake_file} alpha/t-crtfm"
187 extra_parts="$extra_parts crtfastmath.o"
198 tmake_file="vms/t-vms vms/t-vms64 alpha/t-vms"
201 tmake_file="vms/t-vms alpha/t-vms"
209 arm*-*-linux*) # ARM GNU/Linux with ELF
211 arm*-*-uclinux*) # ARM ucLinux
215 arm*-*-eabi* | arm*-*-symbianelf* )
226 # Make HImode functions for AVR
227 tmake_file=${cpu_type}/t-avr
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"
240 crisv32-*-elf | crisv32-*-none | cris-*-elf | cris-*-none)
241 extra_parts="crtbegin.o crtend.o"
243 cris-*-linux* | crisv32-*-linux*)
267 i[34567]86-*-darwin*)
270 tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
276 i[34567]86-*-freebsd*)
277 tmake_file="${tmake_file} i386/t-freebsd"
280 tmake_file="${tmake_file} i386/t-freebsd"
282 i[34567]86-*-netbsdelf*)
286 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
288 i[34567]86-*-openbsd*)
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"
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"
298 i[34567]86-pc-msdosdjgpp*)
300 i[34567]86-*-lynxos*)
302 i[3456x]86-*-netware*)
305 tmake_file="${tmake_file} i386/t-nwld"
309 i[34567]86-*-nto-qnx*)
313 i[34567]86-*-solaris2*)
314 tmake_file="${tmake_file} i386/t-sol2"
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"
322 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
326 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
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"
334 i[34567]86-*-interix3*)
337 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
338 tmake_file="ia64/t-ia64"
341 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
342 tmake_file="ia64/t-ia64"
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"
351 tmake_file="vms/t-vms vms/t-vms64 ia64/t-vms"
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"
360 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
361 tmake_file="lm32/t-lm32 lm32/t-uclinux t-softfp"
363 m32r-*-elf*|m32r-*-rtems*)
377 m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
379 m68k-*-linux*) # Motorola m68k's running GNU/Linux
380 # with ELF format using glibc 2
381 # aka the GNU/Linux C library 6.
388 tmake_file="microblaze/t-microblaze"
392 mips*-*-netbsd*) # NetBSD/mips, either endian.
395 extra_parts="$extra_parts crtfastmath.o"
396 tmake_file="{$tmake_file} mips/t-crtfm"
398 mips*-*-linux*) # Linux MIPS, either endian.
399 extra_parts="$extra_parts crtfastmath.o"
400 tmake_file="{$tmake_file} mips/t-crtfm"
404 mipsisa32-*-elf* | mipsisa32el-*-elf*)
406 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
408 mipsisa64-*-elf* | mipsisa64el-*-elf*)
410 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
412 mipsisa64sr71k-*-elf*)
414 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
416 mips-*-elf* | mipsel-*-elf*)
418 mips64-*-elf* | mips64el-*-elf*)
420 mips64vr-*-elf* | mips64vrel-*-elf*)
422 mips64orion-*-elf* | mips64orionel-*-elf*)
428 mipstx39-*-elf* | mipstx39el-*-elf*)
431 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
432 tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
437 tmake_file="moxie/t-moxie moxie/t-moxie-softfp"
438 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
449 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd t-softfp"
454 tmake_file="${tmake_file} rs6000/t-ppccomm"
456 powerpc-*-eabisimaltivec*)
462 powerpc-*-eabialtivec*)
465 tmake_file="${tmake_file} rs6000/t-ppccomm"
469 powerpc-*-linux* | powerpc64-*-linux*)
470 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"
472 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
478 powerpcle-*-eabisim*)
482 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
484 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
486 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
489 extra_parts="crtbegin.o crtend.o"
493 tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi"
496 tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux"
499 tmake_file="${tmake_file} s390/t-crtstuff s390/t-tpf"
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*)
509 tmake_file="${tmake_file} sh/t-linux"
523 sparc-*-linux*) # SPARC's running GNU/Linux, libc6
524 extra_parts="$extra_parts crtfastmath.o"
525 tmake_file="${tmake_file} sparc/t-crtfm"
527 sparc-*-rtems* | sparc64-*-rtems* )
529 sparc64-*-solaris2* | sparcv9-*-solaris2*)
537 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
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"
566 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
568 m32c-*-elf*|m32c-*-rtems*)
573 echo "*** Configuration ${host} not supported" 1>&2
579 i[34567]86-*-linux* | x86_64-*-linux* | \
580 i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-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"
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"
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"