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 # enable_execute_stack The name of a source file implementing
48 # __enable_execute_stack.
49 # extra_parts List of extra object files that should be compiled
50 # for this target machine. This may be overridden
51 # by setting EXTRA_PARTS in a tmake_file fragment.
52 # If either is set, EXTRA_PARTS and
53 # EXTRA_MULTILIB_PARTS inherited from the GCC
54 # subdirectory will be ignored.
55 # md_unwind_header The name of a header file defining
56 # MD_FALLBACK_FRAME_STATE_FOR.
57 # tmake_file A list of machine-description-specific
58 # makefile-fragments, if different from
59 # "$cpu_type/t-$cpu_type".
65 md_unwind_header=no-unwind.h
67 # Set default cpu_type so it can be updated in each machine entry.
68 cpu_type=`echo ${host} | sed 's/-.*$//'`
93 moxie*) cpu_type=moxie
142 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
143 sh[123456789lbe]*-*-*)
154 # Common parts for widely ported systems.
157 asm_hidden_op=.private_extern
158 tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
161 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
162 # This is the place-holder for the generic a.out configuration
163 # of FreeBSD. No actual configuration resides here since
164 # there was only ever a bare-bones ix86 configuration for
165 # a.out and it exists solely in the machine-specific section.
166 # This place-holder must exist to avoid dropping into
167 # the generic ELF configuration of FreeBSD (i.e. it must be
168 # ordered before that section).
171 # This is the generic ELF configuration of FreeBSD. Later
172 # machine-specific sections may refine and add to this
175 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu*)
176 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
185 tmake_file="$tmake_file t-sol2 t-slibgcc t-slibgcc-elf-ver"
186 if test $with_gnu_ld = yes; then
187 tmake_file="$tmake_file t-slibgcc-gld"
189 tmake_file="$tmake_file t-slibgcc-sld"
191 # Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES.
192 tmake_file="$tmake_file $cpu_type/t-sol2"
193 extra_parts="gmon.o crtbegin.o crtend.o"
195 i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
196 # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
197 # part of the base system.
199 sparc*-*-solaris2.1[0-9]*)
200 # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
201 extra_parts="$extra_parts crt1.o gcrt1.o"
204 tmake_file="$tmake_file t-crtin"
205 extra_parts="$extra_parts crt1.o crti.o crtn.o gcrt1.o"
216 *-*-darwin* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris2* | \
218 enable_execute_stack=enable-execute-stack-mprotect.c
220 i[34567]86-*-mingw* | x86_64-*-mingw*)
221 enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
224 enable_execute_stack=enable-execute-stack-empty.c;
230 tmake_file="${tmake_file} t-crtfm"
231 extra_parts="$extra_parts crtfastmath.o"
232 md_unwind_header=alpha/linux-unwind.h
235 tmake_file="${tmake_file} t-crtfm"
236 extra_parts="$extra_parts crtfastmath.o"
243 tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm t-slibgcc alpha/t-slibgcc-osf"
244 case ${target_thread_file} in
246 tmake_file="${tmake_file} alpha/t-osf-pthread"
249 extra_parts="${extra_parts} qrnnd.o crtfastmath.o gthr-posix.o"
250 md_unwind_header=alpha/osf5-unwind.h
253 tmake_file="vms/t-vms vms/t-vms64 alpha/t-vms"
254 md_unwind_header=alpha/vms-unwind.h
257 tmake_file="vms/t-vms alpha/t-vms"
258 md_unwind_header=alpha/vms-unwind.h
266 arm*-*-linux*) # ARM GNU/Linux with ELF
268 arm*-*-uclinux*) # ARM ucLinux
272 arm*-*-eabi* | arm*-*-symbianelf* )
283 # Make HImode functions for AVR
284 tmake_file=${cpu_type}/t-avr
289 md_unwind_header=bfin/linux-unwind.h
292 # No need to build crtbeginT.o on uClibc systems. Should probably
293 # be moved to the OS specific section above.
294 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
295 md_unwind_header=bfin/linux-unwind.h
299 crisv32-*-elf | crisv32-*-none | cris-*-elf | cris-*-none)
300 extra_parts="crtbegin.o crtend.o"
302 cris-*-linux* | crisv32-*-linux*)
319 md_unwind_header=pa/linux-unwind.h
322 md_unwind_header=pa/hpux-unwind.h
325 md_unwind_header=pa/hpux-unwind.h
328 md_unwind_header=pa/hpux-unwind.h
330 i[34567]86-*-darwin*)
331 tmake_file="$tmake_file i386/t-crtpc i386/t-crtfm"
332 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
335 tmake_file="t-darwin ${cpu_type}/t-darwin64 i386/t-crtpc i386/t-crtfm t-slibgcc-darwin"
336 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
342 i[34567]86-*-freebsd*)
343 tmake_file="${tmake_file} i386/t-freebsd"
346 tmake_file="${tmake_file} i386/t-freebsd"
348 i[34567]86-*-netbsdelf*)
352 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
354 i[34567]86-*-openbsd*)
357 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
358 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm t-dfprules"
359 md_unwind_header=i386/linux-unwind.h
361 i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
362 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
363 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm t-dfprules"
366 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
367 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm t-dfprules"
368 md_unwind_header=i386/linux-unwind.h
370 x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
371 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
372 tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm t-dfprules"
374 i[34567]86-pc-msdosdjgpp*)
376 i[34567]86-*-lynxos*)
378 i[34567]86-*-nto-qnx*)
381 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
382 tmake_file="${tmake_file} t-crtin i386/t-softfp i386/t-crtstuff t-rtems"
384 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
385 tmake_file="$tmake_file i386/t-crtpc i386/t-crtfm"
386 extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
387 md_unwind_header=i386/sol2-unwind.h
389 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
391 i[34567]86-*-cygwin*)
392 extra_parts="crtbegin.o crtend.o crtfastmath.o"
393 tmake_file="i386/t-cygming i386/t-crtfm t-dfprules"
396 extra_parts="crtbegin.o crtend.o crtfastmath.o"
397 tmake_file="i386/t-cygming i386/t-crtfm t-dfprules"
398 md_unwind_header=i386/w32-unwind.h
401 tmake_file="t-dfprules i386/t-crtfm"
402 extra_parts="$extra_parts crtfastmath.o"
404 i[34567]86-*-interix3*)
407 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
408 tmake_file="ia64/t-ia64 t-crtfm"
411 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
412 tmake_file="ia64/t-ia64 t-crtfm"
415 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
416 tmake_file="ia64/t-ia64 t-crtfm t-softfp ia64/t-fprules-softfp ia64/t-softfp-compat"
417 md_unwind_header=ia64/linux-unwind.h
422 tmake_file="vms/t-vms vms/t-vms64 ia64/t-vms"
423 md_unwind_header=ia64/vms-unwind.h
427 lm32-*-elf*|lm32-*-rtems*)
428 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
429 tmake_file="lm32/t-lm32 lm32/t-elf t-softfp"
432 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
433 tmake_file="lm32/t-lm32 lm32/t-uclinux t-softfp"
435 m32r-*-elf*|m32r-*-rtems*)
449 m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
450 md_unwind_header=m68k/linux-unwind.h
452 m68k-*-linux*) # Motorola m68k's running GNU/Linux
453 # with ELF format using glibc 2
454 # aka the GNU/Linux C library 6.
455 md_unwind_header=m68k/linux-unwind.h
462 tmake_file="microblaze/t-microblaze"
465 tmake_file="mips/t-irix6 t-crtfm t-slibgcc mips/t-slibgcc-irix"
466 extra_parts="crtbegin.o crtend.o crtfastmath.o irix-crti.o irix-crtn.o"
467 md_unwind_header=mips/irix6-unwind.h
469 mips*-*-netbsd*) # NetBSD/mips, either endian.
472 extra_parts="$extra_parts crtfastmath.o"
473 tmake_file="{$tmake_file} t-crtfm"
474 md_unwind_header=mips/linux-unwind.h
476 mips*-*-linux*) # Linux MIPS, either endian.
477 extra_parts="$extra_parts crtfastmath.o"
478 tmake_file="{$tmake_file} t-crtfm"
479 md_unwind_header=mips/linux-unwind.h
483 mipsisa32-*-elf* | mipsisa32el-*-elf*)
485 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
487 mipsisa64-*-elf* | mipsisa64el-*-elf*)
489 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
491 mipsisa64sr71k-*-elf*)
493 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
495 mips-*-elf* | mipsel-*-elf*)
497 mips64-*-elf* | mips64el-*-elf*)
499 mips64vr-*-elf* | mips64vrel-*-elf*)
501 mips64orion-*-elf* | mips64orionel-*-elf*)
507 mipstx39-*-elf* | mipstx39el-*-elf*)
510 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
511 tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
516 tmake_file="moxie/t-moxie moxie/t-moxie-softfp"
517 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
525 *-*-darwin9* | *-*-darwin[12][0-9]*)
526 # libSystem contains unwind information for signal frames since
530 md_unwind_header=rs6000/darwin-unwind.h
533 extra_parts="$extra_parts crt2.o"
536 extra_parts="$extra_parts crt2.o"
539 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd t-softfp"
544 tmake_file="${tmake_file} rs6000/t-ppccomm"
546 powerpc-*-eabisimaltivec*)
552 powerpc-*-eabialtivec*)
555 tmake_file="${tmake_file} rs6000/t-ppccomm"
559 powerpc-*-linux* | powerpc64-*-linux*)
560 tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp t-dfprules"
561 md_unwind_header=rs6000/linux-unwind.h
563 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
569 powerpcle-*-eabisim*)
573 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
575 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
577 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
580 extra_parts="crtbegin.o crtend.o"
584 tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi"
585 md_unwind_header=s390/linux-unwind.h
588 tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux"
589 md_unwind_header=s390/linux-unwind.h
592 tmake_file="${tmake_file} s390/t-crtstuff s390/t-tpf"
593 md_unwind_header=s390/tpf-unwind.h
597 sh-*-elf* | sh[12346l]*-*-elf* | \
598 sh-*-linux* | sh[2346lbe]*-*-linux* | \
599 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
600 sh64-*-netbsd* | sh64l*-*-netbsd*)
603 tmake_file="${tmake_file} sh/t-linux"
604 md_unwind_header=sh/linux-unwind.h
621 tmake_file="sparc/t-softmul"
624 tmake_file="${tmake_file} sparc/t-softfp t-crtin t-crtfm"
625 extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
627 sparc-*-linux*) # SPARC's running GNU/Linux, libc6
628 extra_parts="$extra_parts crtfastmath.o"
629 tmake_file="${tmake_file} t-crtfm"
630 md_unwind_header=sparc/linux-unwind.h
632 sparc-*-rtems* | sparc64-*-rtems* )
633 tmake_file="sparc/t-elf t-crtin t-crtfm t-rtems"
634 extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
637 tmake_file="$tmake_file t-crtfm"
638 extra_parts="$extra_parts crtfastmath.o"
639 md_unwind_header=sparc/sol2-unwind.h
642 tmake_file="${tmake_file} t-crtin t-crtfm"
643 extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
647 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
648 tmake_file="$tmake_file t-crtfm"
649 extra_parts=crtfastmath.o
651 sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
652 extra_parts="$extra_parts crtfastmath.o"
653 tmake_file="${tmake_file} t-crtfm"
654 md_unwind_header=sparc/linux-unwind.h
661 tmake_file="${tmake_file} t-gnu-prefix"
676 md_unwind_header=xtensa/linux-unwind.h
679 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
681 m32c-*-elf*|m32c-*-rtems*)
686 echo "*** Configuration ${host} not supported" 1>&2
692 i[34567]86-*-linux* | x86_64-*-linux* | \
693 i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | \
695 tmake_file="${tmake_file} t-tls"
696 if test "$libgcc_cv_cfi" = "yes"; then
697 tmake_file="${tmake_file} t-stack i386/t-stack-i386"
703 i[34567]86-*-darwin* | x86_64-*-darwin* | \
704 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
705 i[34567]86-*-linux* | x86_64-*-linux* | \
706 i[34567]86-*-gnu* | \
707 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
708 i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
709 i[34567]86-*-freebsd* | x86_64-*-freebsd*)
710 if test "${host_address}" = 32; then
711 tmake_file="${tmake_file} t-softfp i386/${host_address}/t-fprules-softfp"
717 i[34567]86-*-linux* | x86_64-*-linux*)
718 # Provide backward binary compatibility for 64bit Linux/x86.
719 if test "${host_address}" = 64; then
720 tmake_file="${tmake_file} i386/${host_address}/t-softfp-compat"