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