1# libgcc host-specific configuration file.
2# Copyright (C) 1997-2022 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	;;
94amdgcn*-*-*)
95	cpu_type=gcn
96	tmake_file="${tmake_file} t-softfp-sfdf t-softfp"
97	;;
98arc*-*-*)
99	cpu_type=arc
100	;;
101arm*-*-*)
102	cpu_type=arm
103	;;
104avr-*-*)
105	cpu_type=avr
106	;;    
107bfin*-*)
108	cpu_type=bfin
109	;;
110bpf-*-*)
111        cpu_type=bpf
112        ;;
113cr16-*-*)
114	;;
115csky*-*-*)
116	cpu_type=csky
117	;;
118fido-*-*)
119	cpu_type=m68k
120	;;
121frv*)	cpu_type=frv
122	;;
123ft32*)	cpu_type=ft32
124	;;
125moxie*)	cpu_type=moxie
126	;;
127i[34567]86-*-*)
128	cpu_type=i386
129	;;
130x86_64-*-*)
131	cpu_type=i386
132	;;
133ia64-*-*)
134	;;
135hppa*-*-*)
136	cpu_type=pa
137	;;
138lm32*-*-*)
139	cpu_type=lm32
140	;;
141loongarch*-*-*)
142	cpu_type=loongarch
143	tmake_file="loongarch/t-loongarch"
144	if test "${libgcc_cv_loongarch_hard_float}" = yes; then
145		tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
146	else
147		tmake_file="${tmake_file} t-softfp-sfdf"
148	fi
149	if test "${ac_cv_sizeof_long_double}" = 16; then
150		tmake_file="${tmake_file} loongarch/t-softfp-tf"
151	fi
152	if test "${host_address}" = 64; then
153		tmake_file="${tmake_file} loongarch/t-loongarch64"
154	fi
155	tmake_file="${tmake_file} t-softfp"
156	;;
157m32r*-*-*)
158        cpu_type=m32r
159        ;;
160m68k-*-*)
161	;;
162microblaze*-*-*)
163	cpu_type=microblaze
164	;;
165mips*-*-*)
166	# All MIPS targets provide a full set of FP routines.
167	cpu_type=mips
168	tmake_file="mips/t-mips"
169	if test "${libgcc_cv_mips_hard_float}" = yes; then
170		tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
171	else
172		tmake_file="${tmake_file} t-softfp-sfdf"
173	fi
174	if test "${ac_cv_sizeof_long_double}" = 16; then
175		tmake_file="${tmake_file} mips/t-softfp-tf"
176	fi
177	if test "${host_address}" = 64; then
178		tmake_file="${tmake_file} mips/t-mips64"
179	fi
180	tmake_file="${tmake_file} t-softfp"
181	;;
182nds32*-*)
183	cpu_type=nds32
184	;;
185nios2*-*-*)
186	cpu_type=nios2
187	;;
188or1k*-*-*)
189	cpu_type=or1k
190	;;
191powerpc*-*-*)
192	cpu_type=rs6000
193	;;
194pru-*-*)
195	cpu_type=pru
196	;;
197rs6000*-*-*)
198	;;
199riscv*-*-*)
200	cpu_type=riscv
201	;;
202sparc64*-*-*)
203	cpu_type=sparc
204	;;
205sparc*-*-*)
206	cpu_type=sparc
207	;;
208s390*-*-*)
209	cpu_type=s390
210	;;
211# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
212sh[123456789lbe]*-*-*)
213	cpu_type=sh
214	;;
215tilegx*-*-*)
216	cpu_type=tilegx
217	;;
218tilepro*-*-*)
219	cpu_type=tilepro
220	;;
221v850*-*-*)
222	cpu_type=v850
223	;;
224tic6x-*-*)
225	cpu_type=c6x
226	;;
227esac
228
229# Common parts for widely ported systems.
230case ${host} in
231*-*-darwin*)
232  asm_hidden_op=.private_extern
233  tmake_file="$tmake_file t-darwin ${cpu_type}/t-darwin t-libgcc-pic"
234  # The unwinder is provided by the system shared libraries, do not add one
235  # to the shared libgcc but, for older systems, we build a shared unwinder
236  # separately so that we can construct a libgcc_s.1 to use for binaries
237  # linked against the old libgcc_ext.10.x stubs.
238  case ${host} in
239    *-*-darwin[89]* | *-*-darwin10*)
240      tmake_file="$tmake_file t-darwin-ehs ${cpu_type}/t-darwin-ehs"
241      ;;
242  esac
243  tmake_file="$tmake_file t-slibgcc-darwin"
244  # newer toolsets produce warnings when building for unsupported versions.
245  case ${host} in
246    *-*-darwin1[89]* | *-*-darwin2* )
247      tmake_file="t-darwin-min-8 $tmake_file"
248      ;;
249    *-*-darwin9* | *-*-darwin1[0-7]*)
250      tmake_file="t-darwin-min-5 $tmake_file"
251      ;;
252    *-*-darwin[4-8]*)
253      tmake_file="t-darwin-min-1 $tmake_file"
254      ;;
255    *)
256      # Fall back to configuring for the oldest system known to work with
257      # all archs and the current sources.
258      tmake_file="t-darwin-min-5 $tmake_file"
259      echo "Warning: libgcc configured to support macOS 10.5" 1>&2
260      ;;
261  esac
262  extra_parts="crt3.o libd10-uwfef.a crttms.o crttme.o libemutls_w.a"
263  ;;
264*-*-dragonfly*)
265  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
266  tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
267  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
268  ;;
269*-*-freebsd*)
270  # This is the generic ELF configuration of FreeBSD.  Later
271  # machine-specific sections may refine and add to this
272  # configuration.
273  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"
274  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
275  case ${target_thread_file} in
276    posix)
277      tmake_file="${tmake_file} t-freebsd-thread"
278      # Before 5.0, FreeBSD can't bind shared libraries to -lc
279      # when "optionally" threaded via weak pthread_* checks.
280      case ${host} in
281        *-*-freebsd[34] | *-*-freebsd[34].*)
282          tmake_file="${tmake_file} t-slibgcc-nolc-override"
283          ;;
284      esac
285      ;;
286  esac
287  ;;
288*-*-fuchsia*)
289  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip t-slibgcc t-slibgcc-fuchsia"
290  extra_parts="crtbegin.o crtend.o"
291  ;;
292*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-*-uclinuxfdpiceabi)
293  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"
294  extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
295  if test x$enable_vtable_verify = xyes; then
296    extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
297  fi
298  ;;
299*-*-lynxos*)
300  tmake_file="$tmake_file t-lynx $cpu_type/t-crtstuff t-crtstuff-pic t-libgcc-pic"
301  extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
302  ;;
303*-*-netbsd*)
304  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
305  tmake_file="$tmake_file t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver"
306  tmake_file="$tmake_file t-slibgcc-libgcc"
307  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
308  ;;
309*-*-openbsd*)
310  tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip"
311  case ${target_thread_file} in
312    posix)
313      tmake_file="$tmake_file t-openbsd-thread"
314      ;;
315  esac
316  ;;
317*-*-rtems*)
318  tmake_file="$tmake_file t-rtems"
319  extra_parts="crtbegin.o crtend.o"
320  ;;
321*-*-solaris2*)
322  # Unless linker support and dl_iterate_phdr are present,
323  # unwind-dw2-fde-dip.c automatically falls back to unwind-dw2-fde.c.
324  tmake_file="$tmake_file sol2/t-sol2 t-eh-dw2-dip t-crtstuff-pic t-libgcc-pic t-slibgcc t-slibgcc-elf-ver"
325  if test $with_gnu_ld = yes; then
326    tmake_file="$tmake_file t-slibgcc-gld"
327  else
328    tmake_file="$tmake_file t-slibgcc-sld"
329  fi
330  # Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES.
331  tmake_file="$tmake_file $cpu_type/t-sol2"
332  extra_parts="gmon.o crtbegin.o crtend.o"
333  if test "${libgcc_cv_solaris_crts}" = yes; then
334    # Solaris 11.4 provides crt1.o, crti.o, and crtn.o as part of the
335    # base system.  crtp.o and crtpg.o implement the compiler-dependent parts.
336    extra_parts="$extra_parts crtp.o crtpg.o"
337    # If the Solaris CRTs are present, both ld and gld will have PIE support.
338    extra_parts="$extra_parts crtbeginS.o crtendS.o"
339  else
340    case ${host} in
341      i?86-*-solaris2* | x86_64-*-solaris2*)
342        # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
343        # part of the base system.
344        ;;
345      sparc*-*-solaris2*)
346        # Solaris 10+/SPARC lacks crt1.o and gcrt1.o.
347        extra_parts="$extra_parts crt1.o gcrt1.o"
348        ;;
349    esac
350  fi
351  if test x$enable_vtable_verify = xyes; then
352    extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
353  fi
354  ;;
355*-*-uclinux*)
356  extra_parts="crtbegin.o crtend.o"
357  ;;
358*-*-*vms*)
359  tmake_file="vms/t-vms"
360  extra_parts="crt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o"
361  ;;
362*-*-vxworksae*)
363  tmake_file=t-vxworksae
364  ;;
365*-*-vxworks*)
366  tmake_file=t-vxworks
367  ;;
368*-*-elf)
369  extra_parts="crtbegin.o crtend.o"
370  ;;
371esac
372
373# VxWorks ports rely on specially crafted crtstuff files
374case ${host} in
375*-*-vxworks*)
376  tmake_file="${tmake_file} t-vxcrtstuff"
377  ;;
378esac
379
380case ${host} in
381*-*-darwin* | *-*-dragonfly* | *-*-freebsd* | *-*-netbsd* | *-*-openbsd* | \
382  *-*-solaris2*)
383  enable_execute_stack=enable-execute-stack-mprotect.c
384  ;;
385i[34567]86-*-mingw* | x86_64-*-mingw*)
386  enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
387  ;;
388i[34567]86-*-cygwin* | x86_64-*-cygwin*)
389  enable_execute_stack=config/i386/enable-execute-stack-mingw32.c
390  ;;
391*)
392  enable_execute_stack=enable-execute-stack-empty.c;
393  ;;
394esac
395
396case ${host} in
397aarch64*-*-elf | aarch64*-*-rtems*)
398	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
399	extra_parts="$extra_parts crtfastmath.o"
400	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
401	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
402	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
403	md_unwind_header=aarch64/aarch64-unwind.h
404	;;
405aarch64*-*-freebsd*)
406	extra_parts="$extra_parts crtfastmath.o"
407	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
408	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
409	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
410	md_unwind_header=aarch64/freebsd-unwind.h
411	;;
412aarch64*-*-netbsd*)
413	extra_parts="$extra_parts crtfastmath.o"
414	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
415	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
416	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
417	md_unwind_header=aarch64/aarch64-unwind.h
418	;;
419aarch64*-*-fuchsia*)
420	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
421	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
422	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
423	;;
424aarch64*-*-linux*)
425	extra_parts="$extra_parts crtfastmath.o"
426	md_unwind_header=aarch64/linux-unwind.h
427	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
428	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
429	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
430	;;
431aarch64*-*-vxworks7*)
432	extra_parts="$extra_parts crtfastmath.o"
433	md_unwind_header=aarch64/aarch64-unwind.h
434	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
435	tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc"
436	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
437	;;
438alpha*-*-linux*)
439	tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm alpha/t-linux"
440	extra_parts="$extra_parts crtfastmath.o"
441	md_unwind_header=alpha/linux-unwind.h
442	;;
443alpha*-*-freebsd*)
444	tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm"
445	extra_parts="$extra_parts crtbeginT.o crtfastmath.o"
446	;;
447alpha*-*-netbsd*)
448	tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
449	;;
450alpha*-*-openbsd*)
451	tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
452	;;
453alpha64-dec-*vms*)
454	tmake_file="$tmake_file alpha/t-alpha alpha/t-ieee alpha/t-vms t-slibgcc-vms"
455	extra_parts="$extra_parts vms-dwarf2.o vms-dwarf2eh.o"
456	md_unwind_header=alpha/vms-unwind.h
457	;;
458alpha*-dec-*vms*)
459	tmake_file="$tmake_file alpha/t-alpha alpha/t-ieee alpha/t-vms t-slibgcc-vms"
460	extra_parts="$extra_parts vms-dwarf2.o vms-dwarf2eh.o"
461	md_unwind_header=alpha/vms-unwind.h
462	;;
463amdgcn*-*-amdhsa)
464	tmake_file="$tmake_file gcn/t-amdgcn"
465	extra_parts="crt0.o"
466	;;
467arc*-*-elf*)
468	tmake_file="arc/t-arc"
469	extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o"
470	extra_parts="$extra_parts crttls.o"
471	;;
472arc*-*-linux*)
473	tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc-uClibc arc/t-arc"
474	extra_parts="$extra_parts crti.o crtn.o"
475	extra_parts="$extra_parts crttls.o"
476	md_unwind_header=arc/linux-unwind.h
477	;;
478arm-wrs-vxworks7*)
479	tmake_file="$tmake_file arm/t-arm arm/t-elf arm/t-bpabi arm/t-vxworks7"
480        tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
481	tm_file="$tm_file arm/bpabi-lib.h"
482	unwind_header=config/arm/unwind-arm.h
483	extra_parts="$extra_parts crti.o crtn.o"
484	;;
485arm*-*-freebsd*)                # ARM FreeBSD EABI
486	tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix arm/t-elf"
487	tmake_file="${tmake_file} arm/t-bpabi arm/t-freebsd"
488	tm_file="${tm_file} arm/bpabi-lib.h"
489	unwind_header=config/arm/unwind-arm.h
490	tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
491	;;
492arm*-*-fuchsia*)
493	tmake_file="${tmake_file} arm/t-arm arm/t-elf arm/t-bpabi"
494	tmake_file="${tmake_file} arm/tsoftfp t-softfp"
495	tm_file="${tm_file} arm/bpabi-lib.h"
496	unwind_header=config/arm/unwind-arm.h
497	;;
498arm*-*-netbsdelf*)
499	tmake_file="$tmake_file arm/t-arm"
500	case ${host} in
501	  arm*-*-netbsdelf-*eabi*)
502	    tmake_file="${tmake_file} arm/t-netbsd-eabi"
503	    # GCC 7 vs NetBSD/eabi -> avoid arm unwinder
504	    #unwind_header=config/arm/unwind-arm.h
505	    ;;
506	  *)
507	    tmake_file="${tmake_file} arm/t-netbsd t-slibgcc-gld-nover"
508	    ;;
509	esac
510	;;
511arm*-*-linux* | arm*-*-uclinuxfdpiceabi)
512	tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix t-crtfm"
513	tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
514	tm_file="$tm_file arm/bpabi-lib.h"
515	unwind_header=config/arm/unwind-arm.h
516	tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
517	extra_parts="$extra_parts crtfastmath.o"
518	;;
519arm*-*-uclinux*)		# ARM ucLinux
520	tmake_file="${tmake_file} t-fixedpoint-gnu-prefix t-crtfm"
521	tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
522	tmake_file="${tmake_file} arm/t-bpabi"
523	tm_file="$tm_file arm/bpabi-lib.h"
524	unwind_header=config/arm/unwind-arm.h
525	extra_parts="$extra_parts crti.o crtn.o"
526	;;
527arm*-*-phoenix*)
528	tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp arm/t-phoenix"
529	tmake_file="${tmake_file} arm/t-bpabi"
530	tm_file="$tm_file arm/bpabi-lib.h"
531	extra_parts="crtbegin.o crtend.o crti.o crtn.o"
532	unwind_header=config/arm/unwind-arm.h
533	;;
534arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
535	tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
536	tm_file="$tm_file arm/bpabi-lib.h"
537	case ${host} in
538	arm*-*-eabi* | arm*-*-rtems*)
539	  tmake_file="${tmake_file} arm/t-bpabi t-crtfm"
540	  extra_parts="crtbegin.o crtend.o crti.o crtn.o"
541	  ;;
542	arm*-*-symbianelf*)
543	  tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override"
544	  tm_file="$tm_file arm/symbian-lib.h"
545	  # Symbian OS provides its own startup code.
546	  ;;
547	esac
548	tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
549	extra_parts="$extra_parts crtfastmath.o"
550	unwind_header=config/arm/unwind-arm.h
551	;;
552avr-*-*)
553	# Make HImode functions for AVR
554	tmake_file="${cpu_type}/t-avr t-fpbit"
555	# Make some DFmode functions from libf7, part of avr-libgcc.
556	# This must be prior to adding t-avrlibc.
557	case "y${with_libf7}" in
558	    yno)
559	        # No libf7 support.
560	        ;;
561	    ylibgcc)
562		tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7"
563		;;
564	    ymath)
565		tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7-math"
566		tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7"
567		;;
568	    ymath-symbols | yyes | y)
569		tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7-math-symbols"
570		tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7-math"
571		tmake_file="$tmake_file ${cpu_type}/libf7/t-libf7"
572		;;
573	    *)
574		echo "Error: --with-libf7=${with_libf7} but can only be used with: 'libgcc', 'math', 'math-symbols', 'yes', 'no'" 1>&2
575		exit 1
576		;;
577	esac
578	if test x${with_avrlibc} != xno; then
579	    tmake_file="$tmake_file ${cpu_type}/t-avrlibc"
580	fi
581	tm_file="$tm_file avr/avr-lib.h"
582	if test x${with_fixed_point} = xno; then
583	    fixed_point=no
584	fi
585	;;
586bfin*-elf*)
587	tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
588	extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o"
589        ;;
590bfin*-uclinux*)
591	tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
592	extra_parts="$extra_parts crtbeginS.o crtendS.o crtlibid.o"
593	md_unwind_header=bfin/linux-unwind.h
594        ;;
595bfin*-linux-uclibc*)
596	tmake_file="$tmake_file bfin/t-bfin bfin/t-crtstuff t-libgcc-pic t-fdpbit bfin/t-linux"
597	# No need to build crtbeginT.o on uClibc systems.  Should probably
598	# be moved to the OS specific section above.
599	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
600	md_unwind_header=bfin/linux-unwind.h
601	;;
602bfin*-rtems*)
603	tmake_file="$tmake_file bfin/t-bfin t-fdpbit"
604	extra_parts="$extra_parts crti.o crtn.o"
605	;;
606bfin*-*)
607	tmake_file="$tmake_file bfin/t-bfin t-fdpbit"
608	extra_parts="crtbegin.o crtend.o crti.o crtn.o"
609        ;;
610bpf-*-*)
611        tmake_file="$tmake_file ${cpu_type}/t-${cpu_type}"
612        extra_parts="crti.o crtn.o"
613	;;
614cr16-*-elf)
615	tmake_file="${tmake_file} cr16/t-cr16 cr16/t-crtlibid t-fdpbit"
616	extra_parts="$extra_parts crti.o crtn.o crtlibid.o"
617        ;;
618cris-*-elf)
619	tmake_file="$tmake_file cris/t-cris t-softfp-sfdf t-softfp cris/t-elfmulti"
620	;;
621csky-*-elf*)
622	tmake_file="csky/t-csky t-fdpbit"
623	extra_parts="crtbegin.o crtend.o crti.o crtn.o"
624	;;
625csky-*-linux*)
626	tmake_file="$tmake_file csky/t-csky t-slibgcc-libgcc t-fdpbit csky/t-linux-csky"
627	extra_parts="$extra_parts crti.o crtn.o"
628	md_unwind_header=csky/linux-unwind.h
629	;;
630epiphany-*-elf* | epiphany-*-rtems*)
631	tmake_file="$tmake_file epiphany/t-epiphany t-fdpbit epiphany/t-custom-eqsf"
632	extra_parts="$extra_parts crti.o crtint.o crtrunc.o crtm1reg-r43.o crtm1reg-r63.o crtn.o"
633	;;
634fr30-*-elf)
635	tmake_file="$tmake_file fr30/t-fr30 t-fdpbit"
636	extra_parts="$extra_parts crti.o crtn.o"
637	;;
638frv-*-elf)
639	tmake_file="$tmake_file frv/t-frv t-fdpbit"
640	tm_file="$tm_file frv/elf-lib.h frv/frv-abi.h"
641	# Don't use crtbegin.o, crtend.o.
642	extra_parts="frvbegin.o frvend.o"
643	;;
644frv-*-*linux*)
645	tmake_file="$tmake_file frv/t-frv frv/t-linux t-fdpbit"
646	tm_file="$tm_file frv/elf-lib.h frv/frv-abi.h"
647	;;
648ft32-*-elf)
649	tmake_file="ft32/t-ft32 t-softfp-sfdf t-softfp-excl t-softfp"
650	extra_parts="$extra_parts crti.o crti-hw.o crtn.o"
651	;;
652h8300-*-elf*)
653	tmake_file="$tmake_file h8300/t-h8300 t-fpbit"
654	tm_file="$tm_file h8300/h8300-lib.h"
655	extra_parts="$extra_parts crti.o crtn.o"
656	;;
657h8300-*-linux*)
658	tmake_file="t-linux h8300/t-linux t-softfp-sfdf t-softfp"
659	tm_file="$tm_file h8300/h8300-lib.h"
660	;;
661hppa*64*-*-linux*)
662	tmake_file="$tmake_file pa/t-linux64 pa/t-dimode"
663	tmake_file="$tmake_file pa/t-softfp-sfdftf t-softfp"
664	extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
665	;;
666hppa*-*-linux*)
667	tmake_file="$tmake_file pa/t-linux t-slibgcc-libgcc"
668	# Set the libgcc version number
669	if test x$ac_cv_sjlj_exceptions = xyes; then
670	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
671	else
672	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
673	fi
674	extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
675	md_unwind_header=pa/linux-unwind.h
676	;;
677hppa[12]*-*-hpux10*)
678	tmake_file="$tmake_file pa/t-hpux pa/t-hpux10 t-libgcc-pic t-slibgcc"
679	# Set the libgcc version number
680	if test x$ac_cv_sjlj_exceptions = xyes; then
681	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
682	else
683	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
684	fi
685	tmake_file="$tmake_file pa/t-slibgcc-hpux t-slibgcc-hpux"
686	md_unwind_header=pa/hpux-unwind.h
687	;;
688hppa*64*-*-hpux11*)
689	tmake_file="$tmake_file pa/t-hpux pa/t-pa64 pa/t-dimode"
690	tmake_file="$tmake_file pa/t-stublib t-libgcc-pic t-slibgcc"
691	# Set the libgcc version number
692	if test x$ac_cv_sjlj_exceptions = xyes; then
693	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
694	else
695	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
696	fi
697	tmake_file="$tmake_file pa/t-slibgcc-hpux t-slibgcc-hpux"
698	tmake_file="$tmake_file pa/t-softfp-sfdftf t-softfp"
699	tm_file="$tm_file pa/pa64-hpux-lib.h"
700	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
701		     libgcc_stub.a"
702	md_unwind_header=pa/hpux-unwind.h
703	;;
704hppa[12]*-*-hpux11*)
705	tmake_file="$tmake_file pa/t-hpux pa/t-stublib t-libgcc-pic t-slibgcc"
706	# Set the libgcc version number
707	if test x$ac_cv_sjlj_exceptions = xyes; then
708	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
709	else
710	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
711	fi
712	tmake_file="$tmake_file pa/t-slibgcc-hpux t-slibgcc-hpux"
713	md_unwind_header=pa/hpux-unwind.h
714	;;
715hppa*-*-openbsd*)
716	tmake_file="$tmake_file pa/t-openbsd"
717	;;
718hppa*-*-netbsd*)
719	tmake_file="$tmake_file pa/t-netbsd"
720	;;
721i[34567]86-*-darwin*)
722	tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
723	tm_file="$tm_file i386/darwin-lib.h"
724	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
725	;;
726x86_64-*-darwin*)
727	tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
728	tm_file="$tm_file i386/darwin-lib.h"
729	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
730	;;
731i[34567]86-*-elfiamcu)
732	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"
733	;;
734i[34567]86-*-elf*)
735	tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
736	;;
737x86_64-*-elf* | x86_64-*-rtems*)
738	tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
739	case ${host} in
740	  x86_64-*-rtems*)
741	    extra_parts="$extra_parts crti.o crtn.o"
742	    ;;
743	esac
744	;;
745x86_64-*-fuchsia*)
746	tmake_file="$tmake_file t-libgcc-pic"
747	;;
748i[34567]86-*-dragonfly*)
749	tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
750	md_unwind_header=i386/dragonfly-unwind.h
751	;;
752x86_64-*-dragonfly*)
753	tmake_file="${tmake_file} i386/t-dragonfly i386/t-crtstuff"
754	md_unwind_header=i386/dragonfly-unwind.h
755	;;
756i[34567]86-*-freebsd*)
757	tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff"
758	md_unwind_header=i386/freebsd-unwind.h
759	;;
760x86_64-*-freebsd*)
761	tmake_file="${tmake_file} i386/t-freebsd i386/t-crtstuff"
762	md_unwind_header=i386/freebsd-unwind.h
763	;;
764i[34567]86-*-netbsdelf*)
765	tmake_file="${tmake_file} i386/t-crtstuff"
766	;;
767x86_64-*-netbsd*)
768	tmake_file="${tmake_file} i386/t-crtstuff"
769	;;
770i[34567]86-*-openbsd*)
771	;;
772x86_64-*-openbsd*)
773	;;
774i[34567]86-*-linux*)
775	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
776	tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
777	tm_file="${tm_file} i386/elf-lib.h"
778	md_unwind_header=i386/linux-unwind.h
779	;;
780i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-kopensolaris*-gnu)
781	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
782	tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
783	tm_file="${tm_file} i386/elf-lib.h"
784	;;
785i[34567]86-*-gnu*)
786	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
787	tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
788	tm_file="${tm_file} i386/elf-lib.h"
789	md_unwind_header=i386/gnu-unwind.h
790	;;
791x86_64-*-linux*)
792	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
793	tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
794	tm_file="${tm_file} i386/elf-lib.h"
795	md_unwind_header=i386/linux-unwind.h
796	;;
797x86_64-*-kfreebsd*-gnu)
798	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
799	tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
800	tm_file="${tm_file} i386/elf-lib.h"
801	;;
802i[34567]86-pc-msdosdjgpp*)
803	;;
804i[34567]86-*-lynxos*)
805	;;
806i[34567]86-*-nto-qnx*)
807	tmake_file="$tmake_file i386/t-nto t-libgcc-pic"
808	extra_parts=crtbegin.o
809	;;
810i[34567]86-*-rtems*)
811	tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/t-softfp t-softfp"
812	extra_parts="$extra_parts crti.o crtn.o"
813	;;
814i[34567]86-*-solaris2* | x86_64-*-solaris2*)
815	tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
816	extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
817	tm_file="${tm_file} i386/elf-lib.h"
818	md_unwind_header=i386/sol2-unwind.h
819	;;
820i[4567]86-wrs-vxworks*|x86_64-wrs-vxworks*)
821	;;
822i[34567]86-*-cygwin*)
823	extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
824	if test x$enable_vtable_verify = xyes; then
825		extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
826	fi
827	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
828	if test x$ac_cv_sjlj_exceptions = xyes; then
829		tmake_eh_file="i386/t-sjlj-eh"
830	else
831		tmake_eh_file="i386/t-dw2-eh"
832	fi
833	# Shared libgcc DLL install dir depends on cross/native build.
834	if test x${build} = x${host} ; then
835		tmake_dlldir_file="i386/t-dlldir"
836	else
837		tmake_dlldir_file="i386/t-dlldir-x"
838	fi
839	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"
840	;;
841x86_64-*-cygwin*)
842	extra_parts="crtbegin.o crtbeginS.o crtend.o crtfastmath.o"
843	if test x$enable_vtable_verify = xyes; then
844		extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
845	fi
846	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
847	if test x$ac_cv_sjlj_exceptions = xyes; then
848		tmake_eh_file="i386/t-sjlj-eh"
849	elif test "${host_address}" = 32; then
850	        # biarch -m32 with --disable-sjlj-exceptions
851	     	tmake_eh_file="i386/t-dw2-eh"
852	else
853		tmake_eh_file="i386/t-seh-eh"
854	fi
855	# Shared libgcc DLL install dir depends on cross/native build.
856	if test x${build} = x${host} ; then
857		tmake_dlldir_file="i386/t-dlldir"
858	else
859		tmake_dlldir_file="i386/t-dlldir-x"
860	fi
861	# FIXME - dj - t-chkstk used to be in here, need a 64-bit version of that
862	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"
863	;;
864i[34567]86-*-mingw*)
865	extra_parts="crtbegin.o crtend.o crtfastmath.o"
866	if test x$enable_vtable_verify = xyes; then
867		extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
868	fi
869	case ${target_thread_file} in
870	  win32)
871	    tmake_file="$tmake_file i386/t-gthr-win32"
872	    ;;
873	  posix)
874	    tmake_file="i386/t-mingw-pthread $tmake_file"
875	    ;;
876	esac
877	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
878	if test x$ac_cv_sjlj_exceptions = xyes; then
879		tmake_eh_file="i386/t-sjlj-eh"
880	else
881		tmake_eh_file="i386/t-dw2-eh"
882		md_unwind_header=i386/w32-unwind.h
883	fi
884	# Shared libgcc DLL install dir depends on cross/native build.
885	if test x${build} = x${host} ; then
886		tmake_dlldir_file="i386/t-dlldir"
887	else
888		tmake_dlldir_file="i386/t-dlldir-x"
889	fi
890	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"
891	;;
892x86_64-*-mingw*)
893	case ${target_thread_file} in
894	  win32)
895	    tmake_file="$tmake_file i386/t-gthr-win32"
896	    ;;
897	  posix)
898	    tmake_file="i386/t-mingw-pthread $tmake_file"
899	    ;;
900	esac
901	# This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
902	if test x$ac_cv_sjlj_exceptions = xyes; then
903		tmake_eh_file="i386/t-sjlj-eh"
904	elif test "${host_address}" = 32; then
905	        # biarch -m32 with --disable-sjlj-exceptions
906	     	tmake_eh_file="i386/t-dw2-eh"
907		md_unwind_header=i386/w32-unwind.h
908	else
909		tmake_eh_file="i386/t-seh-eh"
910	fi
911	# Shared libgcc DLL install dir depends on cross/native build.
912	if test x${build} = x${host} ; then
913		tmake_dlldir_file="i386/t-dlldir"
914	else
915		tmake_dlldir_file="i386/t-dlldir-x"
916	fi
917	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"
918	extra_parts="$extra_parts crtbegin.o crtend.o crtfastmath.o"
919	if test x$enable_vtable_verify = xyes; then
920		extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o"
921	fi
922	;;
923ia64*-*-elf*)
924	extra_parts="$extra_parts crtbeginS.o crtendS.o crtfastmath.o"
925	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"
926	;;
927ia64*-*-freebsd*)
928	extra_parts="$extra_parts crtfastmath.o"
929	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"
930	;;
931ia64*-*-linux*)
932	# Don't use crtbeginT.o from *-*-linux* default.
933	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
934	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"
935	if test x$with_system_libunwind != xyes ; then
936		tmake_file="${tmake_file} t-libunwind-elf ia64/t-linux-libunwind"
937	fi
938	md_unwind_header=ia64/linux-unwind.h
939	;;
940ia64*-*-netbsd*)
941	extra_parts="${extra_parts} crtfastmath.o"
942	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"
943	;;
944ia64*-*-hpux*)
945	tmake_file="ia64/t-ia64 ia64/t-ia64-elf ia64/t-hpux t-slibgcc ia64/t-slibgcc-hpux t-slibgcc-hpux"
946	;;
947ia64-hp-*vms*)
948	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"
949	extra_parts="$extra_parts crtinitS.o"
950	md_unwind_header=ia64/vms-unwind.h
951	;;
952iq2000*-*-elf*)
953	tmake_file="iq2000/t-iq2000 t-fdpbit"
954	# Don't use default.
955	extra_parts=
956        ;;
957lm32-*-elf*)
958        extra_parts="$extra_parts crti.o crtn.o"
959        tmake_file="lm32/t-lm32 lm32/t-elf t-softfp-sfdf t-softfp"
960	;;
961lm32-*-rtems*)
962        tmake_file="$tmake_file lm32/t-lm32 lm32/t-elf t-softfp-sfdf t-softfp"
963        extra_parts="$extra_parts crti.o crtn.o"
964	;;
965lm32-*-uclinux*)
966        extra_parts="$extra_parts crtbegin.o crtendS.o crtbeginT.o"
967        tmake_file="lm32/t-lm32 lm32/t-uclinux t-libgcc-pic t-softfp-sfdf t-softfp"
968	;;
969loongarch*-*-linux*)
970	extra_parts="$extra_parts crtfastmath.o"
971	tmake_file="${tmake_file} t-crtfm loongarch/t-crtstuff"
972	case ${host} in
973	  *)
974	    tmake_file="${tmake_file} t-slibgcc-libgcc"
975	    ;;
976	esac
977	md_unwind_header=loongarch/linux-unwind.h
978	;;
979m32r-*-elf*)
980	tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
981	extra_parts="$extra_parts crtinit.o crtfini.o"
982 	;;
983m32rle-*-elf*)
984	tmake_file=t-fdpbit
985	;;
986m68k-*-elf* | fido-*-elf)
987	tmake_file="$tmake_file m68k/t-floatlib"
988	;;
989m5407-*-netbsdelf*)
990	;;
991m68k*-*-netbsdelf* | m68010-*-netbsdelf*)
992	tmake_file="$tmake_file m68k/t-floatlib"
993	;;
994m68k*-*-openbsd*)
995	;;
996m68k-*-uclinux*)	# Motorola m68k/ColdFire running uClinux with uClibc
997	tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
998	md_unwind_header=m68k/linux-unwind.h
999	;;
1000m68k-*-linux*)			# Motorola m68k's running GNU/Linux
1001				# with ELF format using glibc 2
1002				# aka the GNU/Linux C library 6.
1003	tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
1004	# If not configured with setjmp/longjmp exceptions, bump the
1005	# libgcc version number.
1006	if test x$ac_cv_sjlj_exceptions != xyes; then
1007	    tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
1008	fi
1009	md_unwind_header=m68k/linux-unwind.h
1010	;;
1011m68k-*-rtems*)
1012	tmake_file="$tmake_file m68k/t-floatlib"
1013	extra_parts="$extra_parts crti.o crtn.o"
1014	;;
1015mcore-*-elf)
1016	tmake_file="mcore/t-mcore t-fdpbit"
1017	extra_parts="$extra_parts crti.o crtn.o"
1018	;;
1019microblaze*-linux*)
1020	tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit t-slibgcc-libgcc"
1021	;;
1022microblaze*-*-elf)
1023	tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit"
1024	extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o"
1025	;;
1026microblaze*-*-rtems*)
1027	tmake_file="${tmake_file} microblaze/t-microblaze t-fdpbit"
1028	extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o crti.o crtn.o"
1029	;;
1030mips*-*-netbsd*)			# NetBSD/mips, either endian.
1031	if test "${libgcc_cv_mips_hard_float}" = no; then
1032	  # Eat soft float stuff added above since the netbsd libc provides it.
1033	  xtmake_file=
1034	  for t in ${tmake_file}; do
1035	    case $t in
1036	    *softfp*) ;;
1037	    *)	xtmake_file="${xtmake_file} $t";;
1038	    esac
1039	  done
1040	  tmake_file="${xtmake_file}"
1041	fi
1042	;;
1043mips*-*-linux*)				# Linux MIPS, either endian.
1044	extra_parts="$extra_parts crtfastmath.o"
1045	tmake_file="${tmake_file} t-crtfm"
1046	case ${host} in
1047	  mips64r5900* | mipsr5900*)
1048	    # The MIPS16 support code uses floating point
1049	    # instructions that are not supported on r5900.
1050	    ;;
1051	  *)
1052	    tmake_file="${tmake_file} mips/t-mips16 t-slibgcc-libgcc"
1053	    ;;
1054	esac
1055	md_unwind_header=mips/linux-unwind.h
1056	;;
1057mips*-sde-elf*)
1058	tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
1059	case "${with_newlib}" in
1060	  yes)
1061	    # newlib / libgloss.
1062	    ;;
1063	  *)
1064	    # MIPS toolkit libraries.
1065	    tmake_file="$tmake_file mips/t-sdemtk"
1066	    ;;
1067	esac
1068	extra_parts="$extra_parts crti.o crtn.o"
1069	;;
1070mipsisa32-*-elf* | mipsisa32el-*-elf* | \
1071mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
1072mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
1073mipsisa64-*-elf* | mipsisa64el-*-elf* | \
1074mipsisa64r2-*-elf* | mipsisa64r2el-*-elf* | \
1075mipsisa64r6-*-elf* | mipsisa64r6el-*-elf*)
1076	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
1077	extra_parts="$extra_parts crti.o crtn.o"
1078	;;
1079mipsisa64sr71k-*-elf*)
1080	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff t-fdpbit"
1081	extra_parts="$extra_parts crti.o crtn.o"
1082        ;;
1083mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
1084	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
1085	extra_parts="$extra_parts crti.o crtn.o"
1086	;;
1087mips-*-elf* | mipsel-*-elf*)
1088	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
1089	extra_parts="$extra_parts crti.o crtn.o"
1090	;;
1091mipsr5900-*-elf* | mipsr5900el-*-elf*)
1092	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff"
1093	extra_parts="$extra_parts crti.o crtn.o"
1094	;;
1095mips64-*-elf* | mips64el-*-elf* | mipsn64-*-elf* | mipsn64el-*-elf*)
1096	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
1097	extra_parts="$extra_parts crti.o crtn.o"
1098	;;
1099mips64r5900-*-elf* | mips64r5900el-*-elf*)
1100	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff"
1101	extra_parts="$extra_parts crti.o crtn.o"
1102	;;
1103mips64vr-*-elf* | mips64vrel-*-elf*)
1104	tmake_file="$tmake_file mips/t-elf mips/t-vr mips/t-crtstuff"
1105	extra_parts="$extra_parts crti.o crtn.o"
1106        ;;
1107mips64orion-*-elf* | mips64orionel-*-elf*)
1108	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
1109	extra_parts="$extra_parts crti.o crtn.o"
1110	;;
1111mips*-*-rtems*)
1112	tmake_file="$tmake_file mips/t-elf mips/t-crtstuff mips/t-mips16"
1113	extra_parts="$extra_parts crti.o crtn.o"
1114	;;
1115mips-wrs-vxworks)
1116	;;
1117mipstx39-*-elf* | mipstx39el-*-elf*)
1118	tmake_file="$tmake_file mips/t-crtstuff mips/t-mips16"
1119	;;
1120mmix-knuth-mmixware)
1121	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1122	tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
1123	;;
1124mn10300-*-*)
1125	tmake_file=t-fdpbit
1126	;;
1127moxie-*-elf | moxie-*-moxiebox* | moxie-*-uclinux* | moxie-*-rtems*)
1128	tmake_file="$tmake_file moxie/t-moxie t-softfp-sfdf t-softfp-excl t-softfp"
1129	extra_parts="$extra_parts crti.o crtn.o crtbegin.o crtend.o"
1130	;;
1131msp430-*-elf*)
1132	tmake_file="$tm_file t-crtstuff t-fdpbit msp430/t-msp430"
1133	extra_parts="crtbegin.o crtend.o crtbegin_no_eh.o crtend_no_eh.o"
1134	extra_parts="$extra_parts libmul_none.a libmul_16.a libmul_32.a libmul_f5.a"
1135	;;
1136nds32*-linux*)
1137	# Basic makefile fragment and extra_parts for crt stuff.
1138	# We also append c-isr library implementation.
1139	tmake_file="${tmake_file} t-slibgcc-libgcc"
1140	tmake_file="${tmake_file} nds32/t-nds32-glibc nds32/t-crtstuff t-softfp-sfdf t-softfp"
1141	# The header file of defining MD_FALLBACK_FRAME_STATE_FOR.
1142	md_unwind_header=nds32/linux-unwind.h
1143	# Append library definition makefile fragment according to --with-nds32-lib=X setting.
1144	case "${with_nds32_lib}" in
1145	"" | glibc | uclibc )
1146		;;
1147	*)
1148		echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: glibc uclibc" 1>&2
1149		exit 1
1150		;;
1151	esac
1152	;;
1153nds32*-elf*)
1154	# Basic makefile fragment and extra_parts for crt stuff.
1155	# We also append c-isr library implementation.
1156	tmake_file="${tmake_file} nds32/t-nds32 nds32/t-nds32-isr"
1157	extra_parts="crtbegin1.o crtend1.o libnds32_isr.a"
1158	# Append library definition makefile fragment according to --with-nds32-lib=X setting.
1159	case "${with_nds32_lib}" in
1160	"" | newlib)
1161		# Append library definition makefile fragment t-nds32-newlib.
1162		# Append 'soft-fp' software floating point make rule fragment provided by gcc.
1163		tmake_file="${tmake_file} nds32/t-nds32-newlib t-softfp-sfdf t-softfp"
1164		;;
1165	mculib)
1166		# Append library definition makefile fragment t-nds32-mculib.
1167		# The software floating point library is included in mculib.
1168		tmake_file="${tmake_file} nds32/t-nds32-mculib"
1169		;;
1170	*)
1171		echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib" 1>&2
1172		exit 1
1173		;;
1174	esac
1175	;;
1176nios2-*-linux*)
1177	tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-eh-dw2-dip t-slibgcc-libgcc"
1178	tm_file="$tm_file nios2/elf-lib.h"
1179	md_unwind_header=nios2/linux-unwind.h
1180	;;
1181nios2-*-*)
1182	tmake_file="$tmake_file nios2/t-nios2 t-softfp-sfdf t-softfp-excl t-softfp"
1183	extra_parts="$extra_parts crti.o crtn.o"
1184	;;
1185or1k-*-linux*)
1186	tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
1187	tmake_file="$tmake_file t-softfp-sfdf t-softfp"
1188	md_unwind_header=or1k/linux-unwind.h
1189	;;
1190or1k*-*-netbsd*)
1191	tmake_file="$tmake_file or1k/t-or1k"
1192	tmake_file="$tmake_file t-softfp-sfdf t-softfp"
1193	;;
1194or1k-*-*)
1195	tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
1196	tmake_file="$tmake_file t-softfp-sfdf t-softfp"
1197	;;
1198pdp11-*-*)
1199	tmake_file="pdp11/t-pdp11 t-fdpbit"
1200	;;
1201powerpc-*-darwin*)
1202	case ${host} in
1203	*-*-darwin9* | *-*-darwin[12][0-9]*)
1204	  # libSystem contains unwind information for signal frames since
1205	  # Darwin 9.
1206	  ;;
1207	*)
1208	  md_unwind_header=rs6000/darwin-unwind.h
1209	  ;;
1210	esac
1211	#��We build the darwin10 EH shim for Rosetta (running on x86 machines).
1212	tm_file="$tm_file i386/darwin-lib.h"
1213	tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble"
1214	extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
1215	;;
1216powerpc64-*-darwin*)
1217	#��We build the darwin10 EH shim for Rosetta (running on x86 machines).
1218	tm_file="$tm_file i386/darwin-lib.h"
1219	tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble"
1220	extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
1221	;;
1222powerpc*-*-freebsd*)
1223	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-freebsd t-softfp-sfdf t-softfp-excl t-softfp"
1224	extra_parts="$extra_parts crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1225	case ${host} in
1226	powerpc64*)
1227	  tmake_file="${tmake_file} rs6000/t-freebsd64"
1228	  md_unwind_header=rs6000/freebsd-unwind.h
1229	  ;;
1230	esac
1231	;;
1232powerpc*-*-netbsd*)
1233	tmake_file="${tmake_file} rs6000/t-netbsd rs6000/t-crtstuff"
1234	;;
1235powerpc-*-eabispe*)
1236	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1237	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1238	;;
1239powerpc-*-eabisimaltivec*)
1240	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1241	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1242	;;
1243powerpc-*-eabisim*)
1244	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1245	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1246	;;
1247powerpc-*-elf*)
1248	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1249	extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1250	;;
1251powerpc-*-eabialtivec*)
1252	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1253	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1254	;;
1255powerpc-xilinx-eabi*)
1256	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1257	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1258	;;
1259powerpc-*-eabi*)
1260	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1261	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1262	;;
1263powerpc-*-rtems*)
1264	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1265	extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1266	;;
1267powerpc*-*-linux*)
1268	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"
1269	tmake_file="${tmake_file} t-stack rs6000/t-stack-rs6000"
1270	case $ppc_fp_type in
1271	64)
1272		;;
1273	hard)
1274		tmake_file="${tmake_file} t-hardfp-sfdf t-hardfp"
1275		;;
1276	soft)
1277		tmake_file="${tmake_file} t-softfp-sfdf ${ppc_fp_compat} t-softfp"
1278		;;
1279	e500v1)
1280		tmake_file="${tmake_file} rs6000/t-e500v1-fp ${ppc_fp_compat} t-softfp t-hardfp"
1281		;;
1282	e500v2)
1283		tmake_file="${tmake_file} t-hardfp-sfdf rs6000/t-e500v2-fp ${ppc_fp_compat} t-softfp t-hardfp"
1284		;;
1285	*)
1286		echo "Unknown ppc_fp_type $ppc_fp_type" 1>&2
1287		exit 1
1288		;;
1289	esac
1290
1291	if test $libgcc_cv_powerpc_float128 = yes; then
1292		tmake_file="${tmake_file} rs6000/t-float128"
1293	fi
1294
1295	if test $libgcc_cv_powerpc_float128_hw = yes; then
1296		tmake_file="${tmake_file} rs6000/t-float128-hw"
1297	fi
1298
1299	if test $libgcc_cv_powerpc_3_1_float128_hw = yes; then
1300		tmake_file="${tmake_file} rs6000/t-float128-p10-hw"
1301	fi
1302
1303	extra_parts="$extra_parts ecrti.o ecrtn.o ncrti.o ncrtn.o"
1304	md_unwind_header=rs6000/linux-unwind.h
1305	;;
1306powerpc*-wrs-vxworks7*)
1307        tmake_file="$tmake_file rs6000/t-vxworks rs6000/t-savresfgpr t-dfprules rs6000/t-ppc64-fp"
1308        tmake_file="rs6000/t-crtstuff ${tmake_file}"
1309        case $ppc_fp_type in
1310        64)
1311                ;;
1312        hard)
1313                tmake_file="${tmake_file} t-hardfp-sfdf"
1314                ;;
1315        soft)
1316                tmake_file="${tmake_file} t-softfp-sfdf t-softfp"
1317                ;;
1318        *)
1319                echo "Unknown ppc_fp_type $ppc_fp_type" 1>&2
1320                exit 1
1321                ;;
1322        esac
1323        ;;
1324powerpc-wrs-vxworks*)
1325	tmake_file="$tmake_file rs6000/t-vxworks rs6000/t-savresfgpr t-fdpbit"
1326	;;
1327powerpc-*-lynxos*)
1328	tmake_file="$tmake_file rs6000/t-lynx t-fdpbit"
1329	;;
1330powerpcle-*-elf*)
1331	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1332	extra_parts="$extra_parts crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1333	;;
1334powerpcle-*-eabisim*)
1335	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1336	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1337	;;
1338powerpcle-*-eabi*)
1339	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
1340	extra_parts="$extra_parts crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
1341	;;
1342pru-*-*)
1343	tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp t-gnu-prefix pru/t-pru"
1344	tm_file="$tm_file pru/pru-abi.h"
1345	;;
1346riscv*-*-linux*)
1347	tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address} t-slibgcc-libgcc"
1348	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
1349	md_unwind_header=riscv/linux-unwind.h
1350	;;
1351riscv*-*-freebsd*)
1352	tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address} t-slibgcc-libgcc"
1353	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o crtendS.o crtbeginT.o"
1354	;;
1355riscv*-*-netbsd*)
1356	tmake_file="${tmake_file} riscv/t-netbsd"
1357	case ${host} in
1358	riscv64*)
1359		tmake_file="${tmake_file} riscv/t-netbsd64"
1360		;;
1361	esac
1362	;;
1363riscv*-*-*)
1364	tmake_file="${tmake_file} riscv/t-softfp${host_address} t-softfp riscv/t-elf riscv/t-elf${host_address}"
1365	extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
1366	;;
1367rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
1368	md_unwind_header=rs6000/aix-unwind.h
1369	tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble"
1370	;;
1371rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
1372	md_unwind_header=rs6000/aix-unwind.h
1373	tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble"
1374	;;
1375rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
1376	md_unwind_header=rs6000/aix-unwind.h
1377	tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble rs6000/t-aix-cxa"
1378	extra_parts="crtcxa.o crtcxa_s.o crtdbase.o crtcxa_64.o crtcxa_64_s.o crtdbase_64.o"
1379	;;
1380rl78-*-elf)
1381	tmake_file="$tm_file t-fdpbit rl78/t-rl78"
1382	;;
1383rx-*-elf)
1384	tmake_file="rx/t-rx t-fdpbit"
1385	tm_file="$tm_file rx/rx-abi.h rx/rx-lib.h"
1386	;;
1387rx-*-linux*)
1388	tmake_file="rx/t-rx t-fdpbit"
1389	tm_file="$tm_file rx/rx-lib.h"
1390	;;
1391s390-*-linux*)
1392	tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi t-stack s390/t-stack-s390"
1393	md_unwind_header=s390/linux-unwind.h
1394	;;
1395s390x-*-linux*)
1396	tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux t-stack s390/t-stack-s390"
1397	if test "${host_address}" = 32; then
1398	   tmake_file="${tmake_file} s390/32/t-floattodi"
1399	fi
1400	md_unwind_header=s390/linux-unwind.h
1401	;;
1402s390x-ibm-tpf*)
1403	tmake_file="${tmake_file} s390/t-crtstuff t-libgcc-pic t-eh-dw2-dip s390/t-tpf"
1404	extra_parts="crtbeginS.o crtendS.o"
1405	md_unwind_header=s390/tpf-unwind.h
1406	;;
1407sh-*-elf* | sh[12346l]*-*-elf*)
1408	tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
1409	extra_parts="$extra_parts crt1.o crti.o crtn.o crtbeginS.o crtendS.o \
1410		libic_invalidate_array_4-100.a \
1411		libic_invalidate_array_4-200.a \
1412		libic_invalidate_array_4a.a \
1413		libgcc-Os-4-200.a libgcc-4-300.a"
1414	case ${host} in
1415	sh*-superh-elf)
1416		tmake_file="$tmake_file sh/t-superh"
1417		extra_parts="$extra_parts crt1-mmu.o gcrt1-mmu.o gcrt1.o"
1418 		;;
1419 	esac
1420	;;
1421sh-*-linux* | sh[2346lbe]*-*-linux*)
1422	tmake_file="${tmake_file} sh/t-sh t-slibgcc-libgcc sh/t-linux t-fdpbit"
1423	md_unwind_header=sh/linux-unwind.h
1424	;;
1425sh-*-netbsdelf* | shl*-*-netbsdelf*)
1426	tmake_file="$tmake_file sh/t-sh sh/t-netbsd"
1427
1428	# NetBSD's C library includes a fast software FP library that
1429	# has support for setting/setting the rounding mode, exception
1430	# mask, etc.  Therefore, we don't want to include software FP
1431	# in libgcc.
1432	;;
1433sh-*-rtems*)
1434	tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
1435	extra_parts="$extra_parts crt1.o crti.o crtn.o crtbeginS.o crtendS.o \
1436		libic_invalidate_array_4-100.a \
1437		libic_invalidate_array_4-200.a \
1438		libic_invalidate_array_4a.a \
1439		libgcc-Os-4-200.a libgcc-4-300.a"
1440	;;
1441sh-wrs-vxworks)
1442	tmake_file="$tmake_file sh/t-sh t-crtstuff-pic t-fdpbit"
1443	;;
1444sparc-*-netbsdelf*)
1445	;;
1446sparc64-*-openbsd*)
1447	;;
1448sparc-*-elf*)
1449	case ${host} in
1450	*-leon[3-9]*)
1451		;;
1452	*)
1453	  	tmake_file="sparc/t-softmul"
1454	  	;;
1455	esac
1456	tmake_file="${tmake_file} t-fdpbit t-crtfm"
1457	extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1458	;;
1459sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
1460	tmake_file="${tmake_file} t-crtfm"
1461	if test "${host_address}" = 64; then
1462		tmake_file="$tmake_file sparc/t-linux64"
1463	fi
1464	case ${host} in
1465	*-leon*)
1466		tmake_file="${tmake_file} t-fdpbit"
1467		;;
1468	*)
1469		tmake_file="${tmake_file} sparc/t-linux"
1470		;;
1471	esac
1472	case ${host} in
1473	*-leon[3-9]*)
1474		;;
1475	*)
1476		if test "${host_address}" = 32; then
1477			tmake_file="$tmake_file sparc/t-softmul"
1478		fi
1479	  	;;
1480	esac
1481	extra_parts="$extra_parts crtfastmath.o"
1482	md_unwind_header=sparc/linux-unwind.h
1483	;;
1484sparc-*-rtems*)
1485	tmake_file="$tmake_file sparc/t-elf sparc/t-softmul t-crtfm t-fdpbit"
1486	extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1487	;;
1488sparc*-*-solaris2*)
1489	tmake_file="$tmake_file t-crtfm"
1490	extra_parts="$extra_parts crtfastmath.o"
1491	md_unwind_header=sparc/sol2-unwind.h
1492	;;
1493sparc64-*-elf*)
1494	tmake_file="${tmake_file} t-crtfm"
1495	extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1496	;;
1497sparc64-*-rtems*)
1498	tmake_file="$tmake_file t-crtfm"
1499	extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
1500	;;
1501sparc-wrs-vxworks)
1502	;;
1503sparc64-*-freebsd*|ultrasparc-*-freebsd*)
1504	tmake_file="$tmake_file t-crtfm"
1505	extra_parts="$extra_parts crtfastmath.o"
1506	;;
1507sparc64-*-linux*)		# 64-bit SPARC's running GNU/Linux
1508	extra_parts="$extra_parts crtfastmath.o"
1509	tmake_file="${tmake_file} t-crtfm sparc/t-linux"
1510	if test "${host_address}" = 64; then
1511		tmake_file="${tmake_file} sparc/t-linux64"
1512	fi
1513	if test "${host_address}" = 32; then
1514		tmake_file="${tmake_file} sparc/t-softmul"
1515	fi
1516	md_unwind_header=sparc/linux-unwind.h
1517	;;
1518sparc64-*-netbsd*)
1519	;;
1520tic6x-*-uclinux)
1521	tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp \
1522		c6x/t-elf  c6x/t-uclinux t-crtstuff-pic t-libgcc-pic \
1523		t-slibgcc t-slibgcc-gld t-slibgcc-elf-ver t-gnu-prefix"
1524	tm_file="$tm_file c6x/c6x-abi.h"
1525	extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o"
1526	unwind_header=config/c6x/unwind-c6x.h
1527	;;
1528tic6x-*-elf)
1529	tmake_file="${tmake_file} t-softfp-sfdf t-softfp-excl t-softfp t-gnu-prefix c6x/t-elf"
1530	tm_file="$tm_file c6x/c6x-abi.h"
1531	extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o"
1532	unwind_header=config/c6x/unwind-c6x.h
1533	;;
1534tilegx*-*-linux*)
1535	if test "${host_address}" = 64; then
1536		tmake_file="${tmake_file} tilegx/t-softfp"
1537	fi
1538	tmake_file="${tmake_file} tilegx/t-crtstuff t-softfp-sfdf t-softfp tilegx/t-tilegx"
1539	md_unwind_header=tilepro/linux-unwind.h
1540        ;;
1541tilepro*-*-linux*)
1542	tmake_file="${tmake_file} tilepro/t-crtstuff t-softfp-sfdf t-softfp tilepro/t-tilepro t-slibgcc-libgcc"
1543	md_unwind_header=tilepro/linux-unwind.h
1544        ;;
1545v850*-*-*)
1546	tmake_file="${tmake_file} v850/t-v850 t-fdpbit"
1547	;;
1548vax-*-linux*)
1549	tmake_file="$tmake_file vax/t-linux"
1550	;;
1551vax-*-netbsdelf*)
1552	;;
1553vax-*-openbsd*)
1554	;;
1555visium-*-elf*)
1556        extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
1557        tmake_file="visium/t-visium t-fdpbit"
1558        ;;
1559xstormy16-*-elf)
1560	tmake_file="stormy16/t-stormy16 t-fdpbit"
1561	;;
1562xtensa*-*-elf*)
1563	tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-elf"
1564	extra_parts="$extra_parts crti.o crtn.o"
1565	;;
1566xtensa*-*-linux*)
1567	tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
1568	md_unwind_header=xtensa/linux-unwind.h
1569	;;
1570xtensa*-*-uclinux*)
1571	tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc"
1572	md_unwind_header=xtensa/linux-unwind.h
1573	extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o"
1574	;;
1575am33_2.0-*-linux*)
1576	# Don't need crtbeginT.o from *-*-linux* default.
1577	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
1578	tmake_file="$tmake_file t-fdpbit"
1579	;;
1580m32c-*-elf*|m32c-*-rtems*)
1581	tmake_file="$tmake_file m32c/t-m32c"
1582 	;;
1583nvptx-*)
1584	tmake_file="$tmake_file nvptx/t-nvptx"
1585	extra_parts="crt0.o"
1586	;;
1587*)
1588	echo "*** Configuration ${host} not supported" 1>&2
1589	exit 1
1590	;;
1591esac
1592
1593case ${host} in
1594i[34567]86-*-* | x86_64-*-*)
1595	case ${host} in
1596	*-musl*)
1597		tmake_file="${tmake_file} i386/t-cpuinfo-static"
1598		;;
1599	*)
1600		tmake_file="${tmake_file} i386/t-cpuinfo"
1601		;;
1602	esac
1603	;;
1604esac
1605
1606case ${host} in
1607i[34567]86-*-linux* | x86_64-*-linux* | \
1608  i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
1609  i[34567]86-*-gnu*)
1610	tmake_file="${tmake_file} t-tls i386/t-linux i386/t-msabi t-slibgcc-libgcc"
1611	if test "$libgcc_cv_cfi" = "yes"; then
1612		tmake_file="${tmake_file} t-stack i386/t-stack-i386"
1613	fi
1614	;;
1615esac
1616
1617case ${host} in
1618i[34567]86-*-elfiamcu | i[34567]86-*-rtems*)
1619	# These use soft-fp for SFmode and DFmode, not just TFmode.
1620	;;
1621i[34567]86-*-* | x86_64-*-*)
1622  	tmake_file="${tmake_file} t-softfp-tf"
1623	tmake_file="${tmake_file} i386/${host_address}/t-softfp i386/t-softfp t-softfp"
1624	;;
1625esac
1626
1627case ${host} in
1628i[34567]86-*-linux* | x86_64-*-linux*)
1629	# Provide backward binary compatibility for 64bit Linux/x86.
1630	if test "${host_address}" = 64; then
1631		tmake_file="${tmake_file} i386/${host_address}/t-softfp-compat"
1632	fi
1633	tm_file="${tm_file} i386/value-unwind.h"
1634	;;
1635aarch64*-*-*)
1636	# ILP32 needs an extra header for unwinding
1637	tm_file="${tm_file} aarch64/value-unwind.h"
1638	;;
1639esac
1640
1641# The vxworks threads implementation relies on a few extra sources,
1642# which we arrange to add after everything else:
1643
1644case ${target_thread_file} in
1645vxworks)
1646	case ${host} in
1647	*-*-vxworksae)
1648		tmake_file="${tmake_file} t-gthr-vxworksae"
1649		;;
1650	*-*-vxworks*)
1651		tmake_file="${tmake_file} t-gthr-vxworks"
1652		;;
1653	esac
1654esac
1655
1656case ${host} in
1657*-*-musl*)
1658  # The gthr weak references are unsafe with static linking
1659  tmake_file="$tmake_file t-gthr-noweak"
1660  ;;
1661esac
1662