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