[gcc]
[official-gcc.git] / libgcc / config.host
blobb279a6458f9a6df702cffd3634e690bbeaa99875
1 # libgcc host-specific configuration file.
2 # Copyright (C) 1997-2017 Free Software Foundation, Inc.
4 #This file is part of GCC.
6 #GCC is free software; you can redistribute it and/or modify it under
7 #the terms of the GNU General Public License as published by the Free
8 #Software Foundation; either version 3, or (at your option) any later
9 #version.
11 #GCC is distributed in the hope that it will be useful, but WITHOUT
12 #ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 #FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 #for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with GCC; see the file COPYING3.  If not see
18 #<http://www.gnu.org/licenses/>.
20 # This is the libgcc host-specific configuration file
21 # where a configuration type is mapped to different system-specific
22 # definitions and files.  This is invoked by the autoconf-generated
23 # configure script.  Putting it in a separate shell file lets us skip
24 # running autoconf when modifying host-specific information.
26 # This file bears an obvious resemblance to gcc/config.gcc.  The cases
27 # should be kept similar, to ease moving library-specific settings
28 # from config.gcc to this file.  That is also why tmake_file is
29 # left as tmake_file, rather than hmake_file, even though this library
30 # switches on ${host}.
32 # This file switches on the shell variable ${host}, and also uses the
33 # following shell variables:
35 #  with_*               Various variables as set by configure.
37 # This file sets the following shell variables for use by the
38 # autoconf-generated configure script:
40 #  asm_hidden_op        The assembler pseudo-op to use for hide
41 #                       lists for object files implemented in
42 #                       assembly (with -fvisibility=hidden for C).
43 #                       The default is ".hidden".
44 #  cpu_type             The name of the cpu, if different from the first
45 #                       chunk of the canonical host name.
46 #  enable_execute_stack The name of a source file implementing
47 #                       __enable_execute_stack.
48 #  extra_parts          List of extra object files that should be compiled
49 #                       for this target machine.  This may be overridden
50 #                       by setting EXTRA_PARTS in a tmake_file fragment.
51 #                       If either is set, EXTRA_PARTS and
52 #                       EXTRA_MULTILIB_PARTS inherited from the GCC
53 #                       subdirectory will be ignored.
54 #  md_unwind_header     The name of a header file defining
55 #                       MD_FALLBACK_FRAME_STATE_FOR.
56 #  sfp_machine_header   The name of a sfp-machine.h header file for soft-fp.
57 #                       Defaults to "$cpu_type/sfp-machine.h" if it exists,
58 #                       no-sfp-machine.h otherwise.
59 #  tmake_file           A list of machine-description-specific
60 #                       makefile fragments.
61 #  tm_defines           List of target macros to define for all compilations.
62 #  tm_file              A list of target macro files used only for code
63 #                       built for the target, not the host.  These files
64 #                       are relative to $srcdir/config and must not have
65 #                       the same names as files in $srcdir/../gcc/config.
66 #  unwind_header        The name of the header file declaring the unwind
67 #                       runtime interface routines.
69 asm_hidden_op=.hidden
70 enable_execute_stack=
71 extra_parts=
72 tmake_file=
73 tm_file=
74 tm_define=
75 md_unwind_header=no-unwind.h
76 unwind_header=unwind-generic.h
78 # Set default cpu_type so it can be updated in each machine entry.
79 cpu_type=`echo ${host} | sed 's/-.*$//'`
80 case ${host} in
81 m32c*-*-*)
82         cpu_type=m32c
83         tmake_file=t-fdpbit
84         ;;
85 aarch64*-*-*)
86         cpu_type=aarch64
87         ;;
88 alpha*-*-*)
89         cpu_type=alpha
90         ;;
91 am33_2.0-*-linux*)
92         cpu_type=mn10300
93         ;;
94 arc*-*-*)
95         cpu_type=arc
96         ;;
97 arm*-*-*)
98         cpu_type=arm
99         ;;
100 avr-*-*)
101         cpu_type=avr
102         ;;    
103 bfin*-*)
104         cpu_type=bfin
105         ;;
106 cr16-*-*)
107         ;;
108 crisv32-*-*)
109         cpu_type=cris
110         ;;
111 fido-*-*)
112         cpu_type=m68k
113         ;;
114 frv*)   cpu_type=frv
115         ;;
116 ft32*)  cpu_type=ft32
117         ;;
118 moxie*) cpu_type=moxie
119         ;;
120 i[34567]86-*-*)
121         cpu_type=i386
122         ;;
123 x86_64-*-*)
124         cpu_type=i386
125         ;;
126 ia64-*-*)
127         ;;
128 hppa*-*-*)
129         cpu_type=pa
130         ;;
131 lm32*-*-*)
132         cpu_type=lm32
133         ;;
134 m32r*-*-*)
135         cpu_type=m32r
136         ;;
137 m68k-*-*)
138         ;;
139 microblaze*-*-*)
140         cpu_type=microblaze
141         ;;
142 mips*-*-*)
143         # All MIPS targets provide a full set of FP routines.
144         cpu_type=mips
145         tmake_file="mips/t-mips"
146         if test "${libgcc_cv_mips_hard_float}" = yes; then
147                 tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
148         else
149                 tmake_file="${tmake_file} t-softfp-sfdf"
150         fi
151         if test "${ac_cv_sizeof_long_double}" = 16; then
152                 tmake_file="${tmake_file} mips/t-softfp-tf"
153         fi
154         if test "${host_address}" = 64; then
155                 tmake_file="${tmake_file} mips/t-mips64"
156         fi
157         tmake_file="${tmake_file} t-softfp"
158         ;;
159 nds32*-*)
160         cpu_type=nds32
161         ;;
162 nios2*-*-*)
163         cpu_type=nios2
164         ;;
165 powerpc*-*-*)
166         cpu_type=rs6000
167         ;;
168 rs6000*-*-*)
169         ;;
170 riscv*-*-*)
171         cpu_type=riscv
172         ;;
173 sparc64*-*-*)
174         cpu_type=sparc
175         ;;
176 sparc*-*-*)
177         cpu_type=sparc
178         ;;
179 spu*-*-*)
180         cpu_type=spu
181         ;;
182 s390*-*-*)
183         cpu_type=s390
184         ;;
185 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
186 sh[123456789lbe]*-*-*)
187         cpu_type=sh
188         ;;
189 tilegx*-*-*)
190         cpu_type=tilegx
191         ;;
192 tilepro*-*-*)
193         cpu_type=tilepro
194         ;;
195 v850*-*-*)
196         cpu_type=v850
197         ;;
198 tic6x-*-*)
199         cpu_type=c6x
200         ;;
201 esac
203 # Common parts for widely ported systems.
204 case ${host} in
205 *-*-darwin*)
206   asm_hidden_op=.private_extern
207   tmake_file="$tmake_file t-darwin ${cpu_type}/t-darwin t-libgcc-pic t-slibgcc-darwin"
208   extra_parts="crt3.o crttms.o crttme.o"
209   ;;
210 *-*-dragonfly*)
211   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
212   tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
213   extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
214   ;;
215 *-*-freebsd*)
216   # This is the generic ELF configuration of FreeBSD.  Later
217   # machine-specific sections may refine and add to this
218   # configuration.
219   tmake_file="$tmake_file t-freebsd t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
220   extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
221   case ${target_thread_file} in
222     posix)
223       tmake_file="${tmake_file} t-freebsd-thread"
224       # Before 5.0, FreeBSD can't bind shared libraries to -lc
225       # when "optionally" threaded via weak pthread_* checks.
226       case ${host} in
227         *-*-freebsd[34] | *-*-freebsd[34].*)
228           tmake_file="${tmake_file} t-slibgcc-nolc-override"
229           ;;
230       esac
231       ;;
232   esac
233   ;;
234 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
235   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-linux"
236   extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
237   if test x$enable_vtable_verify = xyes; then
238     extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
239   fi
240   ;;
241 *-*-lynxos*)
242   tmake_file="$tmake_file t-lynx $cpu_type/t-crtstuff t-crtstuff-pic t-libgcc-pic"
243   extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
244   ;;
245 *-*-netbsd*)
246   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
247   tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
248   # NetBSD 1.7 and later are set up to use GCC's crtstuff for
249   # ELF configurations.  We will clear extra_parts in the
250   # a.out configurations.
251   case ${host} in
252     *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
253       extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
254       ;;
255   esac
256   ;;
257 *-*-openbsd*)
258   tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
259   case ${target_thread_file} in
260     posix)
261       tmake_file="$tmake_file t-openbsd-thread"
262       ;;
263   esac
264   ;;
265 *-*-rtems*)
266   tmake_file="$tmake_file t-rtems"
267   extra_parts="crtbegin.o crtend.o"
268   ;;
269 *-*-solaris2*)
270   # Unless linker support and dl_iterate_phdr are present,
271   # unwind-dw2-fde-dip.c automatically falls back to unwind-dw2-fde.c.
272   tmake_file="$tmake_file sol2/t-sol2 t-eh-dw2-dip t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-elf-ver"
273   if test $with_gnu_ld = yes; then
274     tmake_file="$tmake_file t-slibgcc-gld"
275   else
276     tmake_file="$tmake_file t-slibgcc-sld"
277   fi
278   # Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES.
279   tmake_file="$tmake_file $cpu_type/t-sol2"
280   extra_parts="gmon.o crtbegin.o crtend.o"
281   if test "${libgcc_cv_solaris_crts}" = yes; then
282     # Solaris 11.x and 12 provide crt1.o, crti.o, and crtn.o as part of the
283     # base system.  crtp.o and crtpg.o implement the compiler-dependent parts.
284     extra_parts="$extra_parts crtp.o crtpg.o"
285     # If the Solaris CRTs are present, both ld and gld will have PIE support.
286     extra_parts="$extra_parts crtbeginS.o crtendS.o"
287   else
288     case ${host} in
289       i?86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
290         # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
291         # part of the base system.
292         ;;
293       sparc*-*-solaris2.1[0-9]*)
294         # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
295         extra_parts="$extra_parts crt1.o gcrt1.o"
296         ;;
297     esac
298   fi
299   if test x$enable_vtable_verify = xyes; then
300     extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
301   fi
302   ;;
303 *-*-uclinux*)
304   extra_parts="crtbegin.o crtend.o"
305   ;;
306 *-*-*vms*)
307   tmake_file="vms/t-vms"
308   extra_parts="crt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o"
309   ;;
310 *-*-vxworks*)
311   tmake_file=t-vxworks
312   ;;
313 *-*-elf)
314   extra_parts="crtbegin.o crtend.o"
315   ;;
316 esac
318 case ${host} in
319 *-*-darwin* | *-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | \
320   *-*-solaris2*)
321   enable_execute_stack=enable-execute-stack-mprotect.c
322   ;;
323 i[34567]86-*-mingw* | x86_64-*-mingw*)
324   enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
325   ;;
327   enable_execute_stack=enable-execute-stack-empty.c;
328   ;;
329 esac
331 case ${host} in
332 aarch64*-*-elf | aarch64*-*-rtems*)
333         extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
334         extra_parts="$extra_parts crtfastmath.o"
335         tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
336         tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
337         md_unwind_header=aarch64/aarch64-unwind.h
338         ;;
339 aarch64*-*-freebsd*)
340         extra_parts="$extra_parts crtfastmath.o"
341         tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
342         tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
343         md_unwind_header=aarch64/freebsd-unwind.h
344         ;;
345 aarch64*-*-linux*)
346         extra_parts="$extra_parts crtfastmath.o"
347         md_unwind_header=aarch64/linux-unwind.h
348         tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
349         tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
350         ;;
351 alpha*-*-linux*)
352         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm alpha/t-linux"
353         extra_parts="$extra_parts crtfastmath.o"
354         md_unwind_header=alpha/linux-unwind.h
355         ;;
356 alpha*-*-freebsd*)
357         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm"
358         extra_parts="$extra_parts crtbeginT.o crtfastmath.o"
359         ;;
360 alpha*-*-netbsd*)
361         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
362         ;;
363 alpha*-*-openbsd*)
364         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
365         ;;
366 alpha64-dec-*vms*)
367         tmake_file="$tmake_file alpha/t-alpha alpha/t-ieee alpha/t-vms t-slibgcc-vms"
368         extra_parts="$extra_parts vms-dwarf2.o vms-dwarf2eh.o"
369         md_unwind_header=alpha/vms-unwind.h
370         ;;
371 alpha*-dec-*vms*)
372         tmake_file="$tmake_file alpha/t-alpha alpha/t-ieee alpha/t-vms t-slibgcc-vms"
373         extra_parts="$extra_parts vms-dwarf2.o vms-dwarf2eh.o"
374         md_unwind_header=alpha/vms-unwind.h
375         ;;
376 arc*-*-elf*)
377         tmake_file="arc/t-arc"
378         extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o"
379         extra_parts="$extra_parts crttls.o"
380         ;;
381 arc*-*-linux-uclibc*)
382         tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc-uClibc arc/t-arc"
383         extra_parts="$extra_parts crti.o crtn.o"
384         extra_parts="$extra_parts crttls.o"
385         ;;
386 arm-wrs-vxworks)
387         tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
388         extra_parts="$extra_parts crti.o crtn.o"
389         ;;
390 arm*-*-freebsd*)                # ARM FreeBSD EABI
391         tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf"
392         tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd t-slibgcc-libgcc"
393         tm_file="${tm_file} arm/bpabi-lib.h"
394         unwind_header=config/arm/unwind-arm.h
395         tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
396         ;;
397 arm*-*-netbsdelf*)
398         tmake_file="$tmake_file arm/t-arm arm/t-netbsd t-slibgcc-gld-nover"
399         ;;
400 arm*-*-linux*)                  # ARM GNU/Linux with ELF
401         tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
402         tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
403         tm_file="$tm_file arm/bpabi-lib.h"
404         unwind_header=config/arm/unwind-arm.h
405         tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
406         extra_parts="$extra_parts crtfastmath.o"
407         ;;
408 arm*-*-uclinux*)                # ARM ucLinux
409         tmake_file="${tmake_file} t-fixedpoint-gnu-prefix t-crtfm"
410         tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
411         tmake_file="${tmake_file} arm/t-bpabi"
412         tm_file="$tm_file arm/bpabi-lib.h"
413         unwind_header=config/arm/unwind-arm.h
414         extra_parts="$extra_parts crti.o crtn.o"
415         ;;
416 arm*-*-phoenix*)
417         tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp arm/t-phoenix"
418         tmake_file="${tmake_file} arm/t-bpabi"
419         tm_file="$tm_file arm/bpabi-lib.h"
420         extra_parts="crtbegin.o crtend.o crti.o crtn.o"
421         unwind_header=config/arm/unwind-arm.h
422         ;;
423 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
424         tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
425         tm_file="$tm_file arm/bpabi-lib.h"
426         case ${host} in
427         arm*-*-eabi* | arm*-*-rtems*)
428           tmake_file="${tmake_file} arm/t-bpabi t-crtfm"
429           extra_parts="crtbegin.o crtend.o crti.o crtn.o"
430           ;;
431         arm*-*-symbianelf*)
432           tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override"
433           tm_file="$tm_file arm/symbian-lib.h"
434           # Symbian OS provides its own startup code.
435           ;;
436         esac
437         tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
438         extra_parts="$extra_parts crtfastmath.o"
439         unwind_header=config/arm/unwind-arm.h
440         ;;
441 avr-*-*)
442         # Make HImode functions for AVR
443         tmake_file="${cpu_type}/t-avr t-fpbit"
444         if test x${with_avrlibc} != xno; then
445             tmake_file="$tmake_file ${cpu_type}/t-avrlibc"
446         fi
447         tm_file="$tm_file avr/avr-lib.h"
448         ;;
449 bfin*-elf*)
450         tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
451         extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o"
452         ;;
453 bfin*-uclinux*)
454         tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
455         extra_parts="$extra_parts crtbeginS.o crtendS.o crtlibid.o"
456         md_unwind_header=bfin/linux-unwind.h
457         ;;
458 bfin*-linux-uclibc*)
459         tmake_file="$tmake_file bfin/t-bfin bfin/t-crtstuff t-libgcc-pic t-fdpbit bfin/t-linux"
460         # No need to build crtbeginT.o on uClibc systems.  Should probably
461         # be moved to the OS specific section above.
462         extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
463         md_unwind_header=bfin/linux-unwind.h
464         ;;
465 bfin*-rtems*)
466         tmake_file="$tmake_file bfin/t-bfin t-fdpbit"
467         extra_parts="$extra_parts crti.o crtn.o"
468         ;;
469 bfin*-*)
470         tmake_file="$tmake_file bfin/t-bfin t-fdpbit"
471         extra_parts="crtbegin.o crtend.o crti.o crtn.o"
472         ;;
473 cr16-*-elf)
474         tmake_file="${tmake_file} cr16/t-cr16 cr16/t-crtlibid t-fdpbit"
475         extra_parts="$extra_parts crti.o crtn.o crtlibid.o"
476         ;;
477 crisv32-*-elf)
478         tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp"
479         ;;
480 cris-*-elf)
481         tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp cris/t-elfmulti"
482         ;;
483 cris-*-linux* | crisv32-*-linux*)
484         tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp cris/t-linux"
485         ;;
486 epiphany-*-elf*)
487         tmake_file="epiphany/t-epiphany t-fdpbit epiphany/t-custom-eqsf"
488         extra_parts="$extra_parts crti.o crtint.o crtrunc.o crtm1reg-r43.o crtm1reg-r63.o crtn.o"
489         ;;
490 fr30-*-elf)
491         tmake_file="$tmake_file fr30/t-fr30 t-fdpbit"
492         extra_parts="$extra_parts crti.o crtn.o"
493         ;;
494 frv-*-elf)
495         tmake_file="$tmake_file frv/t-frv t-fdpbit"
496         tm_file="$tm_file frv/elf-lib.h frv/frv-abi.h"
497         # Don't use crtbegin.o, crtend.o.
498         extra_parts="frvbegin.o frvend.o"
499         ;;
500 frv-*-*linux*)
501         tmake_file="$tmake_file frv/t-frv frv/t-linux t-fdpbit"
502         tm_file="$tm_file frv/elf-lib.h frv/frv-abi.h"
503         ;;
504 ft32-*-elf)
505         tmake_file="ft32/t-ft32 t-softfp-sfdf t-softfp-excl t-softfp"
506         extra_parts="$extra_parts crti.o crti-hw.o crtn.o"
507         ;;
508 h8300-*-elf*)
509         tmake_file="$tmake_file h8300/t-h8300 t-fpbit"
510         tm_file="$tm_file h8300/h8300-lib.h"
511         extra_parts="$extra_parts crti.o crtn.o"
512         ;;
513 h8300-*-linux*)
514         tmake_file="t-linux h8300/t-linux t-softfp-sfdf t-softfp"
515         tm_file="$tm_file h8300/h8300-lib.h"
516         ;;
517 hppa*64*-*-linux*)
518         tmake_file="$tmake_file pa/t-linux pa/t-linux64"
519         extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
520         ;;
521 hppa*-*-linux*)
522         tmake_file="$tmake_file pa/t-linux t-slibgcc-libgcc"
523         # Set the libgcc version number
524         if test x$ac_cv_sjlj_exceptions = xyes; then
525             tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
526         else
527             tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
528         fi
529         extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
530         md_unwind_header=pa/linux-unwind.h
531         ;;
532 hppa[12]*-*-hpux10*)
533         tmake_file="$tmake_file pa/t-hpux pa/t-hpux10 t-libgcc-pic t-slibgcc"
534         # Set the libgcc version number
535         if test x$ac_cv_sjlj_exceptions = xyes; then
536             tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
537         else
538             tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
539         fi
540         tmake_file="$tmake_file pa/t-slibgcc-hpux t-slibgcc-hpux"
541         md_unwind_header=pa/hpux-unwind.h
542         ;;
543 hppa*64*-*-hpux11*)
544         tmake_file="$tmake_file pa/t-hpux pa/t-pa64 pa/t-stublib t-libgcc-pic t-slibgcc"
545         # Set the libgcc version number
546         if test x$ac_cv_sjlj_exceptions = xyes; then
547             tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
548         else
549             tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
550         fi
551         tmake_file="$tmake_file pa/t-slibgcc-hpux t-slibgcc-hpux"
552         tm_file="$tm_file pa/pa64-hpux-lib.h"
553         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
554                      libgcc_stub.a"
555         md_unwind_header=pa/hpux-unwind.h
556         ;;
557 hppa[12]*-*-hpux11*)
558         tmake_file="$tmake_file pa/t-hpux pa/t-stublib t-libgcc-pic t-slibgcc"
559         # Set the libgcc version number
560         if test x$ac_cv_sjlj_exceptions = xyes; then
561             tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
562         else
563             tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
564         fi
565         tmake_file="$tmake_file pa/t-slibgcc-hpux t-slibgcc-hpux"
566         extra_parts="libgcc_stub.a"
567         md_unwind_header=pa/hpux-unwind.h
568         ;;
569 hppa*-*-openbsd*)
570         tmake_file="$tmake_file pa/t-openbsd"
571         ;;
572 i[34567]86-*-darwin*)
573         tmake_file="$tmake_file i386/t-crtpc t-crtfm"
574         tm_file="$tm_file i386/darwin-lib.h"
575         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
576         ;;
577 x86_64-*-darwin*)
578         tmake_file="$tmake_file i386/t-crtpc t-crtfm"
579         tm_file="$tm_file i386/darwin-lib.h"
580         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
581         ;;
582 i[34567]86-*-elfiamcu)
583         tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/32/t-iamcu i386/t-softfp t-softfp t-dfprules"
584         ;;
585 i[34567]86-*-elf*)
586         tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
587         ;;
588 x86_64-*-elf* | x86_64-*-rtems*)
589         tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
590         ;;
591 i[34567]86-*-dragonfly*)
592         tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
593         md_unwind_header=i386/dragonfly-unwind.h
594         ;;
595 x86_64-*-dragonfly*)
596         tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
597         md_unwind_header=i386/dragonfly-unwind.h
598         ;;
599 i[34567]86-*-freebsd*)
600         tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff"
601         md_unwind_header=i386/freebsd-unwind.h
602         ;;
603 x86_64-*-freebsd*)
604         tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff"
605         md_unwind_header=i386/freebsd-unwind.h
606         ;;
607 i[34567]86-*-netbsdelf*)
608         tmake_file="${tmake_file} i386/t-crtstuff"
609         ;;
610 x86_64-*-netbsd*)
611         tmake_file="${tmake_file} i386/t-crtstuff"
612         ;;
613 i[34567]86-*-openbsd*)
614         ;;
615 x86_64-*-openbsd*)
616         ;;
617 i[34567]86-*-linux*)
618         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
619         tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
620         tm_file="${tm_file} i386/elf-lib.h"
621         md_unwind_header=i386/linux-unwind.h
622         ;;
623 i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
624         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
625         tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
626         tm_file="${tm_file} i386/elf-lib.h"
627         ;;
628 x86_64-*-linux*)
629         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
630         tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
631         tm_file="${tm_file} i386/elf-lib.h"
632         md_unwind_header=i386/linux-unwind.h
633         ;;
634 x86_64-*-kfreebsd*-gnu)
635         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
636         tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
637         tm_file="${tm_file} i386/elf-lib.h"
638         ;;
639 i[34567]86-pc-msdosdjgpp*)
640         ;;
641 i[34567]86-*-lynxos*)
642         ;;
643 i[34567]86-*-nto-qnx*)
644         tmake_file="$tmake_file i386/t-nto t-libgcc-pic"
645         extra_parts=crtbegin.o
646         ;;
647 i[34567]86-*-rtems*)
648         tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/t-softfp t-softfp"
649         extra_parts="$extra_parts crti.o crtn.o"
650         ;;
651 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
652         tmake_file="$tmake_file i386/t-crtpc t-crtfm"
653         extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
654         tm_file="${tm_file} i386/elf-lib.h"
655         md_unwind_header=i386/sol2-unwind.h
656         ;;
657 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
658         ;;
659 i[34567]86-*-cygwin*)
660         extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
661         if test x$enable_vtable_verify = xyes; then
662                 extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
663         fi
664         # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
665         if test x$ac_cv_sjlj_exceptions = xyes; then
666                 tmake_eh_file="i386/t-sjlj-eh"
667         else
668                 tmake_eh_file="i386/t-dw2-eh"
669         fi
670         # Shared libgcc DLL install dir depends on cross/native build.
671         if test x${build} = x${host} ; then
672                 tmake_dlldir_file="i386/t-dlldir"
673         else
674                 tmake_dlldir_file="i386/t-dlldir-x"
675         fi
676         tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin t-crtfm i386/t-chkstk t-dfprules"
677         ;;
678 x86_64-*-cygwin*)
679         extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
680         if test x$enable_vtable_verify = xyes; then
681                 extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
682         fi
683         # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
684         if test x$ac_cv_sjlj_exceptions = xyes; then
685                 tmake_eh_file="i386/t-sjlj-eh"
686         elif test "${host_address}" = 32; then
687                 # biarch -m32 with --disable-sjlj-exceptions
688                 tmake_eh_file="i386/t-dw2-eh"
689         else
690                 tmake_eh_file="i386/t-seh-eh"
691         fi
692         # Shared libgcc DLL install dir depends on cross/native build.
693         if test x${build} = x${host} ; then
694                 tmake_dlldir_file="i386/t-dlldir"
695         else
696                 tmake_dlldir_file="i386/t-dlldir-x"
697         fi
698         # FIXME - dj - t-chkstk used to be in here, need a 64-bit version of that
699         tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin t-crtfm t-dfprules i386/t-chkstk"
700         ;;
701 i[34567]86-*-mingw*)
702         extra_parts="crtbegin.o crtend.o crtfastmath.o"
703         if test x$enable_vtable_verify = xyes; then
704                 extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
705         fi
706         case ${target_thread_file} in
707           win32)
708             tmake_file="$tmake_file i386/t-gthr-win32"
709             ;;
710           posix)
711             tmake_file="i386/t-mingw-pthread $tmake_file"
712             ;;
713         esac
714         # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
715         if test x$ac_cv_sjlj_exceptions = xyes; then
716                 tmake_eh_file="i386/t-sjlj-eh"
717         else
718                 tmake_eh_file="i386/t-dw2-eh"
719                 md_unwind_header=i386/w32-unwind.h
720         fi
721         # Shared libgcc DLL install dir depends on cross/native build.
722         if test x${build} = x${host} ; then
723                 tmake_dlldir_file="i386/t-dlldir"
724         else
725                 tmake_dlldir_file="i386/t-dlldir-x"
726         fi
727         tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-mingw32 t-crtfm i386/t-chkstk t-dfprules"
728         ;;
729 x86_64-*-mingw*)
730         case ${target_thread_file} in
731           win32)
732             tmake_file="$tmake_file i386/t-gthr-win32"
733             ;;
734           posix)
735             tmake_file="i386/t-mingw-pthread $tmake_file"
736             ;;
737         esac
738         # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
739         if test x$ac_cv_sjlj_exceptions = xyes; then
740                 tmake_eh_file="i386/t-sjlj-eh"
741         elif test "${host_address}" = 32; then
742                 # biarch -m32 with --disable-sjlj-exceptions
743                 tmake_eh_file="i386/t-dw2-eh"
744                 md_unwind_header=i386/w32-unwind.h
745         else
746                 tmake_eh_file="i386/t-seh-eh"
747         fi
748         # Shared libgcc DLL install dir depends on cross/native build.
749         if test x${build} = x${host} ; then
750                 tmake_dlldir_file="i386/t-dlldir"
751         else
752                 tmake_dlldir_file="i386/t-dlldir-x"
753         fi
754         tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-mingw32 t-dfprules t-crtfm i386/t-chkstk"
755         extra_parts="$extra_parts crtbegin.o crtend.o crtfastmath.o"
756         if test x$enable_vtable_verify = xyes; then
757                 extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
758         fi
759         ;;
760 ia64*-*-elf*)
761         extra_parts="$extra_parts crtbeginS.o crtendS.o crtfastmath.o"
762         tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat"
763         ;;
764 ia64*-*-freebsd*)
765         extra_parts="$extra_parts crtfastmath.o"
766         tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf ia64/t-eh-ia64 t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat"
767         ;;
768 ia64*-*-linux*)
769         # Don't use crtbeginT.o from *-*-linux* default.
770         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
771         tmake_file="$tmake_file ia64/t-ia64 ia64/t-ia64-elf t-crtfm t-softfp-tf ia64/t-softfp t-softfp ia64/t-softfp-compat ia64/t-eh-ia64 t-libunwind ia64/t-linux"
772         if test x$with_system_libunwind != xyes ; then
773                 tmake_file="${tmake_file} t-libunwind-elf ia64/t-linux-libunwind"
774         fi
775         md_unwind_header=ia64/linux-unwind.h
776         ;;
777 ia64*-*-hpux*)
778         tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux"
779         ;;
780 ia64-hp-*vms*)
781         tmake_file="$tmake_file ia64/t-ia64 ia64/t-eh-ia64 ia64/t-vms t-slibgcc-vms t-softfp-tf ia64/t-softfp t-softfp"
782         extra_parts="$extra_parts crtinitS.o"
783         md_unwind_header=ia64/vms-unwind.h
784         ;;
785 iq2000*-*-elf*)
786         tmake_file="iq2000/t-iq2000 t-fdpbit"
787         # Don't use default.
788         extra_parts=
789         ;;
790 lm32-*-elf*)
791         extra_parts="$extra_parts crti.o crtn.o"
792         tmake_file="lm32/t-lm32 lm32/t-elf t-softfp-sfdf t-softfp"
793         ;;
794 lm32-*-rtems*)
795         tmake_file="$tmake_file lm32/t-lm32 lm32/t-elf t-softfp-sfdf t-softfp"
796         extra_parts="$extra_parts crti.o crtn.o"
797         ;;
798 lm32-*-uclinux*)
799         extra_parts="$extra_parts crtbegin.o crtendS.o crtbeginT.o"
800         tmake_file="lm32/t-lm32 lm32/t-uclinux t-libgcc-pic t-softfp-sfdf t-softfp"
801         ;;      
802 m32r-*-elf*)
803         tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
804         extra_parts="$extra_parts crtinit.o crtfini.o"
805         ;;
806 m32rle-*-elf*)
807         tmake_file=t-fdpbit
808         ;;
809 m32r-*-linux*)
810         tmake_file="$tmake_file m32r/t-linux t-fdpbit"
811         ;;
812 m32rle-*-linux*)
813         tmake_file="$tmake_file m32r/t-linux t-fdpbit"
814         ;;
815 m68k-*-elf* | fido-*-elf)
816         tmake_file="$tmake_file m68k/t-floatlib"
817         ;;
818 m68k*-*-netbsdelf*)
819         ;;
820 m68k*-*-openbsd*)
821         ;;
822 m68k-*-uclinux*)        # Motorola m68k/ColdFire running uClinux with uClibc
823         tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
824         md_unwind_header=m68k/linux-unwind.h
825         ;;
826 m68k-*-linux*)                  # Motorola m68k's running GNU/Linux
827                                 # with ELF format using glibc 2
828                                 # aka the GNU/Linux C library 6.
829         tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
830         # If not configured with setjmp/longjmp exceptions, bump the
831         # libgcc version number.
832         if test x$ac_cv_sjlj_exceptions != xyes; then
833             tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
834         fi
835         md_unwind_header=m68k/linux-unwind.h
836         ;;
837 m68k-*-rtems*)
838         tmake_file="$tmake_file m68k/t-floatlib"
839         extra_parts="$extra_parts crti.o crtn.o"
840         ;;
841 mcore-*-elf)
842         tmake_file="mcore/t-mcore t-fdpbit"
843         extra_parts="$extra_parts crti.o crtn.o"
844         ;;
845 microblaze*-linux*)
846         tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit t-slibgcc-libgcc"
847         ;;
848 microblaze*-*-elf)
849         tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit"
850         extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o"
851         ;;
852 microblaze*-*-rtems*)
853         tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit"
854         extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o"
855         ;;
856 mips*-*-netbsd*)                        # NetBSD/mips, either endian.
857         ;;
858 mips*-*-linux*)                         # Linux MIPS, either endian.
859         extra_parts="$extra_parts crtfastmath.o"
860         tmake_file="${tmake_file} t-crtfm"
861         case ${host} in
862           mips64r5900* | mipsr5900*)
863             # The MIPS16 support code uses floating point
864             # instructions that are not supported on r5900.
865             ;;
866           *)
867             tmake_file="${tmake_file} mips/t-mips16 t-slibgcc-libgcc"
868             ;;
869         esac
870         md_unwind_header=mips/linux-unwind.h
871         ;;
872 mips*-sde-elf*)
873         tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
874         case "${with_newlib}" in
875           yes)
876             # newlib / libgloss.
877             ;;
878           *)
879             # MIPS toolkit libraries.
880             tmake_file="$tmake_file mips/t-sdemtk"
881             ;;
882         esac
883         extra_parts="$extra_parts crti.o crtn.o"
884         ;;
885 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
886 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
887 mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
888 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
889 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf* | \
890 mipsisa64r6-*-elf* | mipsisa64r6el-*-elf*)
891         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
892         extra_parts="$extra_parts crti.o crtn.o"
893         ;;
894 mipsisa64sr71k-*-elf*)
895         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff t-fdpbit"
896         extra_parts="$extra_parts crti.o crtn.o"
897         ;;
898 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
899         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
900         extra_parts="$extra_parts crti.o crtn.o"
901         ;;
902 mips-*-elf* | mipsel-*-elf*)
903         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
904         extra_parts="$extra_parts crti.o crtn.o"
905         ;;
906 mipsr5900-*-elf* | mipsr5900el-*-elf*)
907         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff"
908         extra_parts="$extra_parts crti.o crtn.o"
909         ;;
910 mips64-*-elf* | mips64el-*-elf*)
911         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
912         extra_parts="$extra_parts crti.o crtn.o"
913         ;;
914 mips64r5900-*-elf* | mips64r5900el-*-elf*)
915         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff"
916         extra_parts="$extra_parts crti.o crtn.o"
917         ;;
918 mips64vr-*-elf* | mips64vrel-*-elf*)
919         tmake_file="$tmake_file mips/t-elf mips/t-vr mips/t-crtstuff"
920         extra_parts="$extra_parts crti.o crtn.o"
921         ;;
922 mips64orion-*-elf* | mips64orionel-*-elf*)
923         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
924         extra_parts="$extra_parts crti.o crtn.o"
925         ;;
926 mips*-*-rtems*)
927         tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
928         extra_parts="$extra_parts crti.o crtn.o"
929         ;;
930 mips-wrs-vxworks)
931         ;;
932 mipstx39-*-elf* | mipstx39el-*-elf*)
933         tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
934         ;;
935 mmix-knuth-mmixware)
936         extra_parts="crti.o crtn.o crtbegin.o crtend.o"
937         tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
938         ;;
939 mn10300-*-*)
940         tmake_file=t-fdpbit
941         ;;
942 moxie-*-elf | moxie-*-moxiebox* | moxie-*-uclinux* | moxie-*-rtems*)
943         tmake_file="$tmake_file moxie/t-moxie t-softfp-sfdf t-softfp-excl t-softfp"
944         extra_parts="$extra_parts crti.o crtn.o crtbegin.o crtend.o"
945         ;;
946 msp430*-*-elf)
947         tmake_file="$tm_file t-crtstuff t-fdpbit msp430/t-msp430"
948         extra_parts="$extra_parts libmul_none.a libmul_16.a libmul_32.a libmul_f5.a"
949         ;;
950 nds32*-elf*)
951         # Basic makefile fragment and extra_parts for crt stuff.
952         # We also append c-isr library implementation.
953         tmake_file="${tmake_file} nds32/t-nds32 nds32/t-nds32-isr"
954         extra_parts="crtbegin1.o crtend1.o libnds32_isr.a"
955         # Append library definition makefile fragment according to --with-nds32-lib=X setting.
956         case "${with_nds32_lib}" in
957         "" | newlib)
958                 # Append library definition makefile fragment t-nds32-newlib.
959                 # Append 'soft-fp' software floating point make rule fragment provided by gcc.
960                 tmake_file="${tmake_file} nds32/t-nds32-newlib t-softfp-sfdf t-softfp"
961                 ;;
962         mculib)
963                 # Append library definition makefile fragment t-nds32-mculib.
964                 # The software floating point library is included in mculib.
965                 tmake_file="${tmake_file} nds32/t-nds32-mculib"
966                 ;;
967         *)
968                 echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib" 1>&2
969                 exit 1
970                 ;;
971         esac
972         ;;
973 nios2-*-linux*)
974         tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc"
975         md_unwind_header=nios2/linux-unwind.h
976         ;;
977 nios2-*-*)
978         tmake_file="$tmake_file nios2/t-nios2 t-softfp-sfdf t-softfp-excl t-softfp"
979         extra_parts="$extra_parts crti.o crtn.o"
980         ;;
981 pdp11-*-*)
982         tmake_file="pdp11/t-pdp11 t-fdpbit"
983         ;;
984 powerpc-*-darwin*)
985         case ${host} in
986         *-*-darwin9* | *-*-darwin[12][0-9]*)
987           # libSystem contains unwind information for signal frames since
988           # Darwin 9.
989           ;;
990         *)
991           md_unwind_header=rs6000/darwin-unwind.h
992           ;;
993         esac
994         tmake_file="$tmake_file rs6000/t-ibm-ldouble"
995         extra_parts="$extra_parts crt2.o"
996         ;;
997 powerpc64-*-darwin*)
998         tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble"
999         extra_parts="$extra_parts crt2.o"
1000         ;;
1001 powerpc*-*-freebsd*)
1002         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-freebsd t-softfp-sfdf t-softfp-excl t-softfp"
1003         extra_parts="$extra_parts crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1004         case ${host} in
1005         powerpc64*)
1006           tmake_file="${tmake_file} rs6000/t-freebsd64"
1007           md_unwind_header=rs6000/freebsd-unwind.h
1008           ;;
1009         esac
1010         ;;
1011 powerpc-*-netbsd*)
1012         tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff"
1013         ;;
1014 powerpc-*-eabispe*)
1015         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1016         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1017         ;;
1018 powerpc-*-eabisimaltivec*)
1019         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1020         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1021         ;;
1022 powerpc-*-eabisim*)
1023         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1024         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1025         ;;
1026 powerpc-*-elf*)
1027         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1028         extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1029         ;;
1030 powerpc-*-eabialtivec*)
1031         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1032         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1033         ;;
1034 powerpc-xilinx-eabi*)
1035         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1036         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1037         ;;
1038 powerpc-*-eabi*)
1039         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1040         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1041         ;;
1042 powerpc-*-rtems*)
1043         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1044         extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1045         ;;
1046 powerpc*-*-linux*)
1047         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc"
1048         tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000"
1049         case $ppc_fp_type in
1050         64)
1051                 ;;
1052         hard)
1053                 tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
1054                 ;;
1055         soft)
1056                 tmake_file="${tmake_file} t-softfp-sfdf ${ppc_fp_compat} t-softfp"
1057                 ;;
1058         e500v1)
1059                 tmake_file="${tmake_file} rs6000/t-e500v1-fp ${ppc_fp_compat} t-softfp t-hardfp"
1060                 ;;
1061         e500v2)
1062                 tmake_file="${tmake_file} t-hardfp-sfdf rs6000/t-e500v2-fp ${ppc_fp_compat} t-softfp t-hardfp"
1063                 ;;
1064         *)
1065                 echo "Unknown ppc_fp_type $ppc_fp_type" 1>&2
1066                 exit 1
1067                 ;;
1068         esac
1070         if test $libgcc_cv_powerpc_float128 = yes; then
1071                 tmake_file="${tmake_file} rs6000/t-float128"
1072         fi
1074         if test $libgcc_cv_powerpc_float128_hw = yes; then
1075                 tmake_file="${tmake_file} rs6000/t-float128-hw"
1076         fi
1078         extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o"
1079         md_unwind_header=rs6000/linux-unwind.h
1080         ;;
1081 powerpc-wrs-vxworks|powerpc-wrs-vxworksae|powerpc-wrs-vxworksmils)
1082         tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr t-fdpbit"
1083         ;;
1084 powerpc-*-lynxos*)
1085         tmake_file="$tmake_file rs6000/t-lynx t-fdpbit"
1086         ;;
1087 powerpcle-*-elf*)
1088         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1089         extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1090         ;;
1091 powerpcle-*-eabisim*)
1092         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1093         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1094         ;;
1095 powerpcle-*-eabi*)
1096         tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1097         extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1098         ;;
1099 riscv*-*-linux*)
1100         tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address}"
1101         extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
1102         md_unwind_header=riscv/linux-unwind.h
1103         ;;
1104 riscv*-*-*)
1105         tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address}"
1106         extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
1107         ;;
1108 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
1109         md_unwind_header=rs6000/aix-unwind.h
1110         tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble"
1111         ;;
1112 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
1113         md_unwind_header=rs6000/aix-unwind.h
1114         tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble"
1115         ;;
1116 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
1117         md_unwind_header=rs6000/aix-unwind.h
1118         tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble rs6000/t-aix-cxa"
1119         extra_parts="crtcxa.o crtcxa_s.o crtdbase.o"
1120         ;;
1121 rl78-*-elf)
1122         tmake_file="$tm_file t-fdpbit rl78/t-rl78"
1123         ;;
1124 rx-*-elf)
1125         tmake_file="rx/t-rx t-fdpbit"
1126         tm_file="$tm_file rx/rx-abi.h rx/rx-lib.h"
1127         ;;
1128 s390-*-linux*)
1129         tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi t-stack s390/t-stack-s390"
1130         md_unwind_header=s390/linux-unwind.h
1131         ;;
1132 s390x-*-linux*)
1133         tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux t-stack s390/t-stack-s390"
1134         if test "${host_address}" = 32; then
1135            tmake_file="${tmake_file} s390/32/t-floattodi"
1136         fi
1137         md_unwind_header=s390/linux-unwind.h
1138         ;;
1139 s390x-ibm-tpf*)
1140         tmake_file="${tmake_file} s390/t-crtstuff t-libgcc-pic t-eh-dw2-dip"
1141         extra_parts="crtbeginS.o crtendS.o"
1142         md_unwind_header=s390/tpf-unwind.h
1143         ;;
1144 sh-*-elf* | sh[12346l]*-*-elf*)
1145         tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
1146         extra_parts="$extra_parts crt1.o crti.o crtn.o crtbeginS.o crtendS.o \
1147                 libic_invalidate_array_4-100.a \
1148                 libic_invalidate_array_4-200.a \
1149                 libic_invalidate_array_4a.a \
1150                 libgcc-Os-4-200.a libgcc-4-300.a"
1151         case ${host} in
1152         sh*-superh-elf)
1153                 tmake_file="$tmake_file sh/t-superh"
1154                 extra_parts="$extra_parts crt1-mmu.o gcrt1-mmu.o gcrt1.o"
1155                 ;;
1156         esac
1157         ;;
1158 sh-*-linux* | sh[2346lbe]*-*-linux*)
1159         tmake_file="${tmake_file} sh/t-sh t-slibgcc-libgcc sh/t-linux t-fdpbit"
1160         md_unwind_header=sh/linux-unwind.h
1161         ;;
1162 sh-*-netbsdelf* | shl*-*-netbsdelf*)
1163         tmake_file="$tmake_file sh/t-sh sh/t-netbsd"
1165         # NetBSD's C library includes a fast software FP library that
1166         # has support for setting/setting the rounding mode, exception
1167         # mask, etc.  Therefore, we don't want to include software FP
1168         # in libgcc.
1169         ;;
1170 sh-*-rtems*)
1171         tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
1172         extra_parts="$extra_parts crt1.o crti.o crtn.o crtbeginS.o crtendS.o \
1173                 libic_invalidate_array_4-100.a \
1174                 libic_invalidate_array_4-200.a \
1175                 libic_invalidate_array_4a.a \
1176                 libgcc-Os-4-200.a libgcc-4-300.a"
1177         ;;
1178 sh-wrs-vxworks)
1179         tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
1180         ;;
1181 sparc-*-netbsdelf*)
1182         ;;
1183 sparc64-*-openbsd*)
1184         ;;
1185 sparc-*-elf*)
1186         case ${host} in
1187         *-leon[3-9]*)
1188                 ;;
1189         *)
1190                 tmake_file="sparc/t-softmul"
1191                 ;;
1192         esac
1193         tmake_file="${tmake_file} t-fdpbit t-crtfm"
1194         extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1195         ;;
1196 sparc-*-linux*)         # SPARC's running GNU/Linux, libc6
1197         tmake_file="${tmake_file} t-crtfm"
1198         if test "${host_address}" = 64; then
1199                 tmake_file="$tmake_file sparc/t-linux64"
1200         fi
1201         case ${host} in
1202         *-leon*)
1203                 tmake_file="${tmake_file} t-fdpbit"
1204                 ;;
1205         *)
1206                 tmake_file="${tmake_file} sparc/t-linux"
1207                 ;;
1208         esac
1209         case ${host} in
1210         *-leon[3-9]*)
1211                 ;;
1212         *)
1213                 if test "${host_address}" = 32; then
1214                         tmake_file="$tmake_file sparc/t-softmul"
1215                 fi
1216                 ;;
1217         esac
1218         extra_parts="$extra_parts crtfastmath.o"
1219         md_unwind_header=sparc/linux-unwind.h
1220         ;;
1221 sparc-*-rtems*)
1222         tmake_file="$tmake_file sparc/t-elf sparc/t-softmul t-crtfm t-fdpbit"
1223         extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1224         ;;
1225 sparc*-*-solaris2*)
1226         tmake_file="$tmake_file t-crtfm"
1227         extra_parts="$extra_parts crtfastmath.o"
1228         md_unwind_header=sparc/sol2-unwind.h
1229         ;;
1230 sparc64-*-elf*)
1231         tmake_file="${tmake_file} t-crtfm"
1232         extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1233         ;;
1234 sparc64-*-rtems*)
1235         tmake_file="$tmake_file t-crtfm"
1236         extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1237         ;;
1238 sparc-wrs-vxworks)
1239         ;;
1240 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
1241         tmake_file="$tmake_file t-crtfm"
1242         extra_parts="$extra_parts crtfastmath.o"
1243         ;;
1244 sparc64-*-linux*)               # 64-bit SPARC's running GNU/Linux
1245         extra_parts="$extra_parts crtfastmath.o"
1246         tmake_file="${tmake_file} t-crtfm sparc/t-linux"
1247         if test "${host_address}" = 64; then
1248                 tmake_file="${tmake_file} sparc/t-linux64"
1249         fi
1250         if test "${host_address}" = 32; then
1251                 tmake_file="${tmake_file} sparc/t-softmul"
1252         fi
1253         md_unwind_header=sparc/linux-unwind.h
1254         ;;
1255 sparc64-*-netbsd*)
1256         ;;
1257 spu-*-elf*)
1258         tmake_file="$tmake_file spu/t-elf t-libgcc-pic t-fdpbit"
1259         extra_parts="$extra_parts \
1260                 libgcc_cachemgr.a libgcc_cachemgr_nonatomic.a \
1261                 libgcc_cache8k.a libgcc_cache16k.a libgcc_cache32k.a \
1262                 libgcc_cache64k.a libgcc_cache128k.a"
1263         ;;
1264 tic6x-*-uclinux)
1265         tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp \
1266                 c6x/t-elf  c6x/t-uclinux t-crtstuff-pic t-libgcc-pic \
1267                 t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-gnu-prefix"
1268         tm_file="$tm_file c6x/c6x-abi.h"
1269         extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o"
1270         unwind_header=config/c6x/unwind-c6x.h
1271         ;;
1272 tic6x-*-elf)
1273         tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp t-gnu-prefix c6x/t-elf"
1274         tm_file="$tm_file c6x/c6x-abi.h"
1275         extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o"
1276         unwind_header=config/c6x/unwind-c6x.h
1277         ;;
1278 tilegx*-*-linux*)
1279         if test "${host_address}" = 64; then
1280                 tmake_file="${tmake_file} tilegx/t-softfp"
1281         fi
1282         tmake_file="${tmake_file} tilegx/t-crtstuff t-softfp-sfdf t-softfp tilegx/t-tilegx"
1283         md_unwind_header=tilepro/linux-unwind.h
1284         ;;
1285 tilepro*-*-linux*)
1286         tmake_file="${tmake_file} tilepro/t-crtstuff t-softfp-sfdf t-softfp tilepro/t-tilepro t-slibgcc-libgcc"
1287         md_unwind_header=tilepro/linux-unwind.h
1288         ;;
1289 v850*-*-*)
1290         tmake_file="${tmake_file} v850/t-v850 t-fdpbit"
1291         ;;
1292 vax-*-linux*)
1293         tmake_file="$tmake_file vax/t-linux"
1294         ;;
1295 vax-*-netbsdelf*)
1296         ;;
1297 vax-*-openbsd*)
1298         ;;
1299 visium-*-elf*)
1300         extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
1301         tmake_file="visium/t-visium t-fdpbit"
1302         ;;
1303 xstormy16-*-elf)
1304         tmake_file="stormy16/t-stormy16 t-fdpbit"
1305         ;;
1306 xtensa*-*-elf*)
1307         tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-elf"
1308         extra_parts="$extra_parts crti.o crtn.o"
1309         ;;
1310 xtensa*-*-linux*)
1311         tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
1312         md_unwind_header=xtensa/linux-unwind.h
1313         ;;
1314 xtensa*-*-uclinux*)
1315         tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
1316         md_unwind_header=xtensa/linux-unwind.h
1317         extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o"
1318         ;;
1319 am33_2.0-*-linux*)
1320         # Don't need crtbeginT.o from *-*-linux* default.
1321         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
1322         tmake_file="$tmake_file t-fdpbit"
1323         ;;
1324 m32c-*-elf*|m32c-*-rtems*)
1325         tmake_file="$tmake_file m32c/t-m32c"
1326         ;;
1327 nvptx-*)
1328         tmake_file="$tmake_file nvptx/t-nvptx"
1329         extra_parts="crt0.o"
1330         ;;
1332         echo "*** Configuration ${host} not supported" 1>&2
1333         exit 1
1334         ;;
1335 esac
1337 case ${host} in
1338 i[34567]86-*-* | x86_64-*-*)
1339         case ${host} in
1340         *-musl*)
1341                 tmake_file="${tmake_file} i386/t-cpuinfo-static"
1342                 ;;
1343         *)
1344                 tmake_file="${tmake_file} i386/t-cpuinfo"
1345                 ;;
1346         esac
1347         ;;
1348 esac
1350 case ${host} in
1351 i[34567]86-*-linux* | x86_64-*-linux* | \
1352   i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
1353   i[34567]86-*-gnu*)
1354         tmake_file="${tmake_file} t-tls i386/t-linux t-slibgcc-libgcc"
1355         if test "$libgcc_cv_cfi" = "yes"; then
1356                 tmake_file="${tmake_file} t-stack i386/t-stack-i386"
1357         fi
1358         ;;
1359 esac
1361 case ${host} in
1362 i[34567]86-*-elfiamcu | i[34567]86-*-rtems*)
1363         # These use soft-fp for SFmode and DFmode, not just TFmode.
1364         ;;
1365 i[34567]86-*-* | x86_64-*-*)
1366         tmake_file="${tmake_file} t-softfp-tf"
1367         if test "${host_address}" = 32; then
1368                 tmake_file="${tmake_file} i386/${host_address}/t-softfp"
1369         fi
1370         tmake_file="${tmake_file} i386/t-softfp t-softfp"
1371         ;;
1372 esac
1374 case ${host} in
1375 i[34567]86-*-linux* | x86_64-*-linux*)
1376         # Provide backward binary compatibility for 64bit Linux/x86.
1377         if test "${host_address}" = 64; then
1378                 tmake_file="${tmake_file} i386/${host_address}/t-softfp-compat"
1379         fi
1380         tm_file="${tm_file} i386/value-unwind.h"
1381         ;;
1382 aarch64*-*-*)
1383         # ILP32 needs an extra header for unwinding
1384         tm_file="${tm_file} aarch64/value-unwind.h"
1385         ;;
1386 esac