1 # libgcc host-specific configuration file.
2 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3 # 2008, 2009, 2010, 2011 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 # md_unwind_header The name of a header file defining
54 # MD_FALLBACK_FRAME_STATE_FOR.
55 # tmake_file A list of machine-description-specific
56 # makefile-fragments, if different from
57 # "$cpu_type/t-$cpu_type".
62 md_unwind_header=no-unwind.h
64 # Set default cpu_type so it can be updated in each machine entry.
65 cpu_type=`echo ${host} | sed 's/-.*$//'`
90 moxie*) cpu_type=moxie
139 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
140 sh[123456789lbe]*-*-*)
145 # Common parts for widely ported systems.
148 asm_hidden_op=.private_extern
149 tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
151 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
152 # This is the place-holder for the generic a.out configuration
153 # of FreeBSD. No actual configuration resides here since
154 # there was only ever a bare-bones ix86 configuration for
155 # a.out and it exists solely in the machine-specific section.
156 # This place-holder must exist to avoid dropping into
157 # the generic ELF configuration of FreeBSD (i.e. it must be
158 # ordered before that section).
161 # This is the generic ELF configuration of FreeBSD. Later
162 # machine-specific sections may refine and add to this
165 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
166 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
175 tmake_file="$tmake_file t-sol2 t-slibgcc t-slibgcc-elf-ver"
176 if test $with_gnu_ld = yes; then
177 tmake_file="$tmake_file t-slibgcc-gld"
179 tmake_file="$tmake_file t-slibgcc-sld"
181 # Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES.
182 tmake_file="$tmake_file $cpu_type/t-sol2"
183 extra_parts="gmon.o crtbegin.o crtend.o"
185 i?86-*-solaris2.1[0-9]*)
186 # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
187 # part of the base system.
189 sparc*-*-solaris2.1[0-9]*)
190 # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
191 extra_parts="$extra_parts crt1.o gcrt1.o"
194 tmake_file="$tmake_file t-crtin"
195 extra_parts="$extra_parts crt1.o crti.o crtn.o gcrt1.o"
206 # Support site-specific machine types.
208 rest=`echo ${host} | sed -e "s/$cpu_type-//"`
209 if test -f $srcdir/config/${cpu_type}/t-$rest
210 then tmake_file=${cpu_type}/t-$rest
214 tmake_file="${tmake_file} alpha/t-crtfm"
215 extra_parts="$extra_parts crtfastmath.o"
216 md_unwind_header=alpha/linux-unwind.h
225 tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee alpha/t-crtfm t-slibgcc alpha/t-slibgcc-osf"
226 case ${target_thread_file} in
228 tmake_file="${tmake_file} alpha/t-osf-pthread"
231 extra_parts="${extra_parts} qrnnd.o crtfastmath.o gthr-posix.o"
232 md_unwind_header=alpha/osf5-unwind.h
235 tmake_file="vms/t-vms vms/t-vms64 alpha/t-vms"
236 md_unwind_header=alpha/vms-unwind.h
239 tmake_file="vms/t-vms alpha/t-vms"
240 md_unwind_header=alpha/vms-unwind.h
248 arm*-*-linux*) # ARM GNU/Linux with ELF
250 arm*-*-uclinux*) # ARM ucLinux
254 arm*-*-eabi* | arm*-*-symbianelf* )
265 # Make HImode functions for AVR
266 tmake_file=${cpu_type}/t-avr
271 md_unwind_header=bfin/linux-unwind.h
274 # No need to build crtbeginT.o on uClibc systems. Should probably
275 # be moved to the OS specific section above.
276 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
277 md_unwind_header=bfin/linux-unwind.h
281 crisv32-*-elf | crisv32-*-none | cris-*-elf | cris-*-none)
282 extra_parts="crtbegin.o crtend.o"
284 cris-*-linux* | crisv32-*-linux*)
301 md_unwind_header=pa/pa32-linux.h
304 md_unwind_header=pa/hpux-unwind.h
307 md_unwind_header=pa/hpux-unwind.h
310 md_unwind_header=pa/hpux-unwind.h
312 i[34567]86-*-darwin*)
315 tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
321 i[34567]86-*-freebsd*)
322 tmake_file="${tmake_file} i386/t-freebsd"
325 tmake_file="${tmake_file} i386/t-freebsd"
327 i[34567]86-*-netbsdelf*)
331 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
333 i[34567]86-*-openbsd*)
335 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
336 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
337 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
338 md_unwind_header=i386/linux-unwind.h
340 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
341 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
342 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm"
343 md_unwind_header=i386/linux-unwind.h
345 i[34567]86-pc-msdosdjgpp*)
347 i[34567]86-*-lynxos*)
349 i[3456x]86-*-netware*)
352 tmake_file="${tmake_file} i386/t-nwld"
356 i[34567]86-*-nto-qnx*)
359 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
360 tmake_file="${tmake_file} t-crtin i386/t-softfp i386/t-crtstuff t-rtems"
362 i[34567]86-*-solaris2*)
363 tmake_file="$tmake_file i386/t-crtfm"
364 extra_parts="$extra_parts crtfastmath.o"
365 md_unwind_header=i386/sol2-unwind.h
367 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
369 i[34567]86-*-cygwin*)
370 extra_parts="crtbegin.o crtend.o crtfastmath.o"
371 tmake_file="i386/t-cygming i386/t-crtfm"
374 extra_parts="crtbegin.o crtend.o crtfastmath.o"
375 tmake_file="i386/t-cygming i386/t-crtfm"
376 md_unwind_header=i386/w32-unwind.h
380 i[34567]86-*-interix3*)
383 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
384 tmake_file="ia64/t-ia64"
387 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
388 tmake_file="ia64/t-ia64"
391 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
392 tmake_file="ia64/t-ia64 t-softfp ia64/t-fprules-softfp ia64/t-softfp-compat"
393 md_unwind_header=ia64/linux-unwind.h
398 tmake_file="vms/t-vms vms/t-vms64 ia64/t-vms"
399 md_unwind_header=ia64/vms-unwind.h
403 lm32-*-elf*|lm32-*-rtems*)
404 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
405 tmake_file="lm32/t-lm32 lm32/t-elf t-softfp"
408 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
409 tmake_file="lm32/t-lm32 lm32/t-uclinux t-softfp"
411 m32r-*-elf*|m32r-*-rtems*)
425 m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
426 md_unwind_header=m68k/linux-unwind.h
428 m68k-*-linux*) # Motorola m68k's running GNU/Linux
429 # with ELF format using glibc 2
430 # aka the GNU/Linux C library 6.
431 md_unwind_header=m68k/linux-unwind.h
438 tmake_file="microblaze/t-microblaze"
441 tmake_file="mips/t-irix6 t-slibgcc mips/t-slibgcc-irix"
442 extra_parts="crtbegin.o crtend.o irix-crti.o irix-crtn.o"
444 mips*-*-netbsd*) # NetBSD/mips, either endian.
447 extra_parts="$extra_parts crtfastmath.o"
448 tmake_file="{$tmake_file} mips/t-crtfm"
449 md_unwind_header=mips/linux-unwind.h
451 mips*-*-linux*) # Linux MIPS, either endian.
452 extra_parts="$extra_parts crtfastmath.o"
453 tmake_file="{$tmake_file} mips/t-crtfm"
454 md_unwind_header=mips/linux-unwind.h
458 mipsisa32-*-elf* | mipsisa32el-*-elf*)
460 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
462 mipsisa64-*-elf* | mipsisa64el-*-elf*)
464 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
466 mipsisa64sr71k-*-elf*)
468 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
470 mips-*-elf* | mipsel-*-elf*)
472 mips64-*-elf* | mips64el-*-elf*)
474 mips64vr-*-elf* | mips64vrel-*-elf*)
476 mips64orion-*-elf* | mips64orionel-*-elf*)
482 mipstx39-*-elf* | mipstx39el-*-elf*)
485 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
486 tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
491 tmake_file="moxie/t-moxie moxie/t-moxie-softfp"
492 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
500 *-*-darwin9* | *-*-darwin[12][0-9]*)
501 # libSystem contains unwind information for signal frames since
505 md_unwind_header=rs6000/darwin-unwind.h
512 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd t-softfp"
517 tmake_file="${tmake_file} rs6000/t-ppccomm"
519 powerpc-*-eabisimaltivec*)
525 powerpc-*-eabialtivec*)
528 tmake_file="${tmake_file} rs6000/t-ppccomm"
532 powerpc-*-linux* | powerpc64-*-linux*)
533 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp"
534 md_unwind_header=rs6000/linux-unwind.h
536 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
542 powerpcle-*-eabisim*)
546 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
548 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
550 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
553 extra_parts="crtbegin.o crtend.o"
557 tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi"
558 md_unwind_header=s390/linux-unwind.h
561 tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux"
562 md_unwind_header=s390/linux-unwind.h
565 tmake_file="${tmake_file} s390/t-crtstuff s390/t-tpf"
566 md_unwind_header-s390/tpf-unwind.h
570 sh-*-elf* | sh[12346l]*-*-elf* | \
571 sh-*-linux* | sh[2346lbe]*-*-linux* | \
572 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
573 sh64-*-netbsd* | sh64l*-*-netbsd*)
576 tmake_file="${tmake_file} sh/t-linux"
577 md_unwind_header=sh/linux-unwind.h
594 tmake_file="sparc/t-softmul"
597 tmake_file="${tmake_file} sparc/t-softfp t-crtin t-crtfm"
598 extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
600 sparc-*-linux*) # SPARC's running GNU/Linux, libc6
601 extra_parts="$extra_parts crtfastmath.o"
602 tmake_file="${tmake_file} t-crtfm"
603 md_unwind_header=sparc/linux.h
605 sparc-*-rtems* | sparc64-*-rtems* )
606 tmake_file="sparc/t-elf t-crtin t-crtfm t-rtems"
607 extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
610 tmake_file="$tmake_file t-crtfm"
611 extra_parts="$extra_parts crtfastmath.o"
612 md_unwind_header=sparc/sol2-unwind.h
615 tmake_file="${tmake_file} t-crtin t-crtfm"
616 extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
620 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
622 sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
623 extra_parts="$extra_parts crtfastmath.o"
624 tmake_file="${tmake_file} t-crtfm"
625 md_unwind_header=sparc/linux-unwind.h
648 md_unwind_header=xtensa/linux-unwind.h
651 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
653 m32c-*-elf*|m32c-*-rtems*)
658 echo "*** Configuration ${host} not supported" 1>&2
664 i[34567]86-*-linux* | x86_64-*-linux* | \
665 i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | \
667 tmake_file="${tmake_file} t-tls"
668 if test "$libgcc_cv_cfi" = "yes"; then
669 tmake_file="${tmake_file} t-stack i386/t-stack-i386"
675 i[34567]86-*-darwin* | x86_64-*-darwin* | \
676 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
677 i[34567]86-*-linux* | x86_64-*-linux* | \
678 i[34567]86-*-gnu* | \
679 i[34567]86-*-solaris2* | \
680 i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
681 i[34567]86-*-freebsd* | x86_64-*-freebsd*)
682 if test "${host_address}" = 32; then
683 tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp"
689 i[34567]86-*-linux* | x86_64-*-linux*)
690 # Provide backward binary compatibility for 64bit Linux/x86.
691 if test "${host_address}" = 64; then
692 tmake_file="${tmake_file} i386/${host_address}/t-softfp-compat"