]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config.gcc
Enable gcc support for UINTR
[thirdparty/gcc.git] / gcc / config.gcc
CommitLineData
a89ea0df 1# GCC target-specific configuration file.
8d9254fc 2# Copyright (C) 1997-2020 Free Software Foundation, Inc.
61ed06c3 3
1322177d 4#This file is part of GCC.
61ed06c3 5
1322177d
LB
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
9dcd6f09 8#Software Foundation; either version 3, or (at your option) any later
1322177d 9#version.
61ed06c3 10
1322177d
LB
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.
61ed06c3
HPN
15
16#You should have received a copy of the GNU General Public License
9dcd6f09
NC
17#along with GCC; see the file COPYING3. If not see
18#<http://www.gnu.org/licenses/>.
61ed06c3 19
a89ea0df
NN
20# This is the GCC target-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 target-specific information.
61ed06c3 25
fa958513
DJ
26# When you change the cases in the OS or target switches, consider
27# updating ../libgcc/config.host also.
28
b01bc573 29# This file switches on the shell variable ${target}, and also uses the
61ed06c3
HPN
30# following shell variables:
31#
32# with_* Various variables as set by configure.
33#
615be2cf 34# enable_threads Either the name, yes or no depending on whether
61ed06c3
HPN
35# threads support was requested.
36#
2121a768 37# default_use_cxa_atexit
c5dde55b
NC
38# The default value for the $enable___cxa_atexit
39# variable. enable___cxa_atexit needs to be set to
40# "yes" for the correct operation of C++ destructors
41# but it relies upon the presence of a non-standard C
42# library function called __cxa_atexit.
43# Since not all C libraries provide __cxa_atexit the
44# default value of $default_use_cxa_atexit is set to
45# "no" except for targets which are known to be OK.
2121a768 46#
f6c5fbfd
NS
47# default_gnu_indirect_function
48# The default value for the $enable_gnu_indirect_function
49# variable. enable_gnu_indirect_function relies
50# upon the presence of a non-standard gnu ifunc support
51# in the assembler, linker and dynamic linker.
52# Since not all libraries provide the dynamic linking
53# support, the default value of
54# $default_gnu_indirect_function is set to
55# "no" except for targets which are known to be OK.
56#
61ed06c3
HPN
57# gas_flag Either yes or no depending on whether GNU as was
58# requested.
59#
60# gnu_ld_flag Either yes or no depending on whether GNU ld was
61# requested.
62
63# This file sets the following shell variables for use by the
64# autoconf-generated configure script:
65#
b01bc573
NN
66# cpu_type The name of the cpu, if different from the first
67# chunk of the canonical target name.
61ed06c3 68#
d5355cb2
JDA
69# tm_defines List of target macros to define for all compilations.
70#
61ed06c3 71# tm_file A list of target macro files, if different from
32fb7c9d
FS
72# "$cpu_type/$cpu_type.h". Usually it's constructed
73# per target in a way like this:
57809813 74# tm_file="${tm_file} dbxelf.h elfos.h ${cpu_type.h}/elf.h"
32fb7c9d
FS
75# Note that the preferred order is:
76# - specific target header "${cpu_type}/${cpu_type.h}"
a4a4b1d3 77# - generic headers like dbxelf.h elfos.h, etc.
32fb7c9d
FS
78# - specializing target headers like ${cpu_type.h}/elf.h
79# This helps to keep OS specific stuff out of the CPU
80# defining header ${cpu_type}/${cpu_type.h}.
61ed06c3 81#
9c63c208
SL
82# It is possible to include automatically-generated
83# build-directory files by prefixing them with "./".
84# All other files should relative to $srcdir/config.
85#
61ed06c3
HPN
86# tm_p_file Location of file with declarations for functions
87# in $out_file.
88#
b4c522fa
IB
89# tm_d_file A list of headers with definitions of target hook
90# macros for the D compiler.
91#
61ed06c3
HPN
92# out_file The name of the machine description C support
93# file, if different from "$cpu_type/$cpu_type.c".
94#
c49a6962
JM
95# common_out_file The name of the source file for code shared between
96# the compiler proper and the driver.
97#
61ed06c3
HPN
98# md_file The name of the machine-description file, if
99# different from "$cpu_type/$cpu_type.md".
100#
101# tmake_file A list of machine-description-specific
102# makefile-fragments, if different from
103# "$cpu_type/t-$cpu_type".
104#
1c0ca89d
ZW
105# extra_modes The name of the file containing a list of extra
106# machine modes, if necessary and different from
107# "$cpu_type/$cpu_type-modes.def".
108#
61ed06c3
HPN
109# extra_objs List of extra objects that should be linked into
110# the compiler proper (cc1, cc1obj, cc1plus)
111# depending on target.
112#
30500d84
KC
113# extra_gcc_objs List of extra objects that should be linked into
114# the compiler driver (gcc) depending on target.
115#
61ed06c3 116# extra_headers List of used header files from the directory
817e13c4 117# config/${cpu_type}.
61ed06c3 118#
9b91e436
KT
119# user_headers_inc_next_pre
120# List of header file names of internal gcc header
121# files, which should be prefixed by an include_next.
122# user_headers_inc_next_post
123# List of header file names of internal gcc header
124# files, which should be postfixed by an include_next.
1617e5ee
GK
125# use_gcc_tgmath If set, add tgmath.h to the list of used header
126# files.
127#
207bf79d
JM
128# use_gcc_stdint If "wrap", install a version of stdint.h that
129# wraps the system's copy for hosted compilations;
130# if "provide", provide a version of systems without
131# such a system header; otherwise "none", do not
132# provide such a header at all.
133#
d82c57a8
RO
134# extra_programs List of extra executables compiled for this target
135# machine, used when linking.
61ed06c3 136#
75685792
RS
137# extra_options List of target-dependent .opt files.
138#
ff7cc307 139# c_target_objs List of extra target-dependent objects that be
aac69a49 140# linked into the C compiler only.
0e5a4ad8 141#
ff7cc307 142# cxx_target_objs List of extra target-dependent objects that be
aac69a49 143# linked into the C++ compiler only.
0e5a4ad8 144#
b4c522fa
IB
145# d_target_objs List of extra target-dependent objects that be
146# linked into the D compiler only.
147#
c776a6d0
DF
148# fortran_target_objs List of extra target-dependent objects that be
149# linked into the fortran compiler only.
150#
ef69da62
SS
151# target_gtfiles List of extra source files with type information.
152#
61ed06c3
HPN
153# xm_defines List of macros to define when compiling for the
154# target machine.
155#
156# xm_file List of files to include when compiling for the
157# target machine.
158#
159# use_collect2 Set to yes or no, depending on whether collect2
160# will be used.
161#
162# target_cpu_default Set to override the default target model.
163#
61ed06c3
HPN
164# gdb_needs_out_file_path
165# Set to yes if gdb needs a dir command with
166# `dirname $out_file`.
167#
61ed06c3
HPN
168# thread_file Set to control which thread package to use.
169#
170# gas Set to yes or no depending on whether the target
171# system normally uses GNU as.
4977bab6 172#
7816bea0
DJ
173# configure_default_options
174# Set to an initializer for configure_default_options
175# in configargs.h, based on --with-cpu et cetera.
08b2bad2
SB
176#
177# native_system_header_dir
178# Where system header files are found for this
179# target. This defaults to /usr/include. If
180# the --with-sysroot configure option or the
181# --sysroot command line option is used this
182# will be relative to the sysroot.
5ab22850
RR
183# target_type_format_char
184# The default character to be used for formatting
185# the attribute in a
186# .type symbol_name, ${t_t_f_c}<property>
187# directive.
61ed06c3
HPN
188
189# The following variables are used in each case-construct to build up the
190# outgoing variables:
191#
61ed06c3
HPN
192# gnu_ld Set to yes or no depending on whether the target
193# system normally uses GNU ld.
acce4e77
JM
194#
195# target_has_targetcm Set to yes or no depending on whether the target
196# has its own definition of targetcm.
c49a6962
JM
197#
198# target_has_targetm_common Set to yes or no depending on whether the
199# target has its own definition of targetm_common.
b4c522fa
IB
200#
201# target_has_targetdm Set to yes or no depending on whether the target
202# has its own definition of targetdm.
61ed06c3
HPN
203
204out_file=
c49a6962 205common_out_file=
61ed06c3
HPN
206tmake_file=
207extra_headers=
9b91e436
KT
208user_headers_inc_next_pre=
209user_headers_inc_next_post=
1617e5ee 210use_gcc_tgmath=yes
207bf79d 211use_gcc_stdint=none
61ed06c3
HPN
212extra_programs=
213extra_objs=
61ed06c3 214extra_gcc_objs=
75685792 215extra_options=
aac69a49
NC
216c_target_objs=
217cxx_target_objs=
b4c522fa 218d_target_objs=
c776a6d0 219fortran_target_objs=
acce4e77 220target_has_targetcm=no
677f3fa8 221target_has_targetm_common=yes
b4c522fa 222target_has_targetdm=no
d5355cb2 223tm_defines=
61ed06c3 224xm_defines=
61ed06c3
HPN
225# Set this to force installation and use of collect2.
226use_collect2=
227# Set this to override the default target model.
228target_cpu_default=
61ed06c3
HPN
229# Set this if gdb needs a dir command with `dirname $out_file`
230gdb_needs_out_file_path=
61ed06c3
HPN
231# Set this to control which thread package will be used.
232thread_file=
233# Reinitialize these from the flag values every loop pass, since some
234# configure entries modify them.
235gas="$gas_flag"
236gnu_ld="$gnu_ld_flag"
2121a768 237default_use_cxa_atexit=no
f6c5fbfd 238default_gnu_indirect_function=no
6ab185d6 239target_gtfiles=
c6b9174f 240need_64bit_isa=
08b2bad2 241native_system_header_dir=/usr/include
5ab22850 242target_type_format_char='@'
61ed06c3 243
6a38414a
NN
244# Don't carry these over build->host->target. Please.
245xm_file=
246md_file=
247
9340544b 248# Obsolete configurations.
32243d46 249case ${target} in
2f2aeda9 250 tile*-*-* \
32243d46
JM
251 )
252 if test "x$enable_obsolete" != xyes; then
253 echo "*** Configuration ${target} is obsolete." >&2
254 echo "*** Specify --enable-obsolete to build it anyway." >&2
255 echo "*** Support will be REMOVED in the next major release of GCC," >&2
256 echo "*** unless a maintainer comes forward." >&2
257 exit 1
258 fi;;
259esac
9340544b 260
7c942e17
ZW
261# Unsupported targets list. Do not put an entry in this list unless
262# it would otherwise be caught by a more permissive pattern. The list
263# should be in alphabetical order.
b01bc573 264case ${target} in
c4cc7bc1
RE
265 # Avoid special cases that are not obsolete
266 arm*-*-*eabi* \
267 )
268 ;;
269 arm*-wince-pe* \
270 | arm*-*-ecos-elf \
271 | arm*-*-elf \
c4cc7bc1 272 | arm*-*-linux* \
c4cc7bc1 273 | arm*-*-uclinux* \
2b36e4dc
HPN
274 | cris-*-linux* \
275 | crisv32-*-* \
c4cc7bc1 276 | i[34567]86-go32-* \
7c942e17 277 | i[34567]86-*-go32* \
ebb9f8b0 278 | m68k-*-uclinuxoldabi* \
7c942e17 279 | mips64orion*-*-rtems* \
52c0e446 280 | pdp11-*-bsd \
d8905777 281 | powerpc*-*-linux*paired* \
23d3e2d5 282 | powerpc*-*-*spe* \
7c942e17 283 | sparc-hal-solaris2* \
2f2aeda9 284 | spu*-*-* \
7c942e17 285 | thumb-*-* \
1eae4574 286 | *-*-freebsd[12] | *-*-freebsd[1234].* \
0db8fa89 287 | *-*-freebsd*aout* \
cd985f66 288 | *-*-linux*aout* \
7c942e17 289 | *-*-linux*coff* \
cd985f66 290 | *-*-linux*libc1* \
7c942e17
ZW
291 | *-*-linux*oldld* \
292 | *-*-rtemsaout* \
293 | *-*-rtemscoff* \
1500b428 294 | *-*-solaris2 \
d9f069ab
RO
295 | *-*-solaris2.[0-9] \
296 | *-*-solaris2.[0-9].* \
ccd1242e 297 | *-*-solaris2.10* \
7888f266 298 | *-*-sysv* \
9ab346a1 299 | vax-*-vms* \
7c942e17 300 )
b01bc573 301 echo "*** Configuration ${target} not supported" 1>&2
7c942e17
ZW
302 exit 1
303 ;;
304esac
305
61ed06c3 306# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
ba1e6c0b
JM
307# updated in each machine entry. Also set default extra_headers for some
308# machines.
61ed06c3 309tm_p_file=
b01bc573 310cpu_type=`echo ${target} | sed 's/-.*$//'`
a8e04fe6 311cpu_is_64bit=
b01bc573 312case ${target} in
38b2d076
DD
313m32c*-*-*)
314 cpu_type=m32c
315 tmake_file=m32c/t-m32c
41dfca87 316 target_has_targetm_common=no
38b2d076 317 ;;
24034425
IB
318aarch64*-*-*)
319 cpu_type=aarch64
abbe1ed2 320 extra_headers="arm_fp16.h arm_neon.h arm_bf16.h arm_acle.h arm_sve.h"
e4ea20c8
KT
321 c_target_objs="aarch64-c.o"
322 cxx_target_objs="aarch64-c.o"
b4c522fa 323 d_target_objs="aarch64-d.o"
0a09a948 324 extra_objs="aarch64-builtins.o aarch-common.o aarch64-sve-builtins.o aarch64-sve-builtins-shapes.o aarch64-sve-builtins-base.o aarch64-sve-builtins-sve2.o cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o aarch64-bti-insert.o"
624d0f07 325 target_gtfiles="\$(srcdir)/config/aarch64/aarch64-builtins.c \$(srcdir)/config/aarch64/aarch64-sve-builtins.h \$(srcdir)/config/aarch64/aarch64-sve-builtins.cc"
24034425
IB
326 target_has_targetm_common=yes
327 ;;
61ed06c3
HPN
328alpha*-*-*)
329 cpu_type=alpha
34251c0e 330 extra_options="${extra_options} g.opt"
61ed06c3 331 ;;
7431c1a1
AS
332amdgcn*)
333 cpu_type=gcn
334 use_gcc_stdint=wrap
335 ;;
2beef00e
AO
336am33_2.0-*-linux*)
337 cpu_type=mn10300
338 ;;
53426f6c
JR
339arc*-*-*)
340 cpu_type=arc
cf07c3de
CZ
341 c_target_objs="arc-c.o"
342 cxx_target_objs="arc-c.o"
9f532472 343 extra_options="${extra_options} arc/arc-tables.opt g.opt"
fad92291 344 extra_headers="arc-simd.h"
53426f6c 345 ;;
150b72ed
DJ
346arm*-*-*)
347 cpu_type=arm
33857df2 348 extra_objs="arm-builtins.o aarch-common.o"
78bf9163 349 extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h arm_cmse.h arm_bf16.h arm_mve_types.h arm_mve.h arm_cde.h"
5ab22850 350 target_type_format_char='%'
b76c3c4b
PB
351 c_target_objs="arm-c.o"
352 cxx_target_objs="arm-c.o"
b4c522fa 353 d_target_objs="arm-d.o"
ad7be009 354 extra_options="${extra_options} arm/arm-tables.opt"
33857df2 355 target_gtfiles="\$(srcdir)/config/arm/arm-builtins.c"
150b72ed 356 ;;
17fad361
AH
357avr-*-*)
358 cpu_type=avr
359 c_target_objs="avr-c.o"
360 cxx_target_objs="avr-c.o"
361 ;;
0d4a78eb
BS
362bfin*-*)
363 cpu_type=bfin
364 ;;
91dfef96
JM
365bpf-*-*)
366 cpu_type=bpf
367 ;;
faf9ab98 368frv*) cpu_type=frv
34251c0e 369 extra_options="${extra_options} g.opt"
faf9ab98 370 ;;
fef939d6
JB
371ft32*) cpu_type=ft32
372 target_has_targetm_common=no
373 ;;
cceb575c 374moxie*) cpu_type=moxie
677f3fa8 375 target_has_targetm_common=no
cceb575c 376 ;;
7d33c31d
KH
377fido-*-*)
378 cpu_type=m68k
379 extra_headers=math-68881.h
47c94d21 380 extra_options="${extra_options} m68k/m68k-tables.opt"
7d33c31d 381 ;;
61ed06c3
HPN
382i[34567]86-*-*)
383 cpu_type=i386
ab442df7
MM
384 c_target_objs="i386-c.o"
385 cxx_target_objs="i386-c.o"
b4c522fa 386 d_target_objs="i386-d.o"
2bf6d935 387 extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o i386-options.o i386-builtins.o i386-expand.o i386-features.o"
7c0b7150 388 target_gtfiles="\$(srcdir)/config/i386/i386-builtins.c \$(srcdir)/config/i386/i386-expand.c \$(srcdir)/config/i386/i386-options.c"
d48e78d6 389 extra_options="${extra_options} fused-madd.opt"
b3172cab 390 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
3b8dd071 391 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
cbf2e4d4 392 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
43a8b705 393 immintrin.h x86intrin.h avxintrin.h xopintrin.h
7fccdfcf 394 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
82feeb8d 395 lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
756c5857
AI
396 avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
397 rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
398 adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
c1618f82 399 avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
9cdea277 400 shaintrin.h clflushoptintrin.h xsavecintrin.h
936c0fe4 401 xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
4190ea38 402 avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
3dcc8af5 403 avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
5fbb13a7 404 avx512vbmivlintrin.h avx5124fmapsintrin.h avx5124vnniwintrin.h
79fc8ffe 405 avx512vpopcntdqintrin.h clwbintrin.h mwaitxintrin.h
9d54607a 406 clzerointrin.h pkuintrin.h sgxintrin.h cetintrin.h
489154e7 407 gfniintrin.h cet.h avx512vbmi2intrin.h
69ddc3e5 408 avx512vbmi2vlintrin.h avx512vnniintrin.h
2abaf67e 409 avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
13b93d4b 410 avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
55f31ed1 411 pconfigintrin.h wbnoinvdintrin.h movdirintrin.h
366386c7 412 waitpkgintrin.h cldemoteintrin.h avx512bf16vlintrin.h
413 avx512bf16intrin.h enqcmdintrin.h serializeintrin.h
1e47cb35 414 avx512vp2intersectintrin.h avx512vp2intersectvlintrin.h
5c609842 415 tsxldtrkintrin.h amxtileintrin.h amxint8intrin.h
299a53d7 416 amxbf16intrin.h x86gprintrin.h uintrintrin.h"
61ed06c3 417 ;;
14f73b5a
JH
418x86_64-*-*)
419 cpu_type=i386
ab442df7
MM
420 c_target_objs="i386-c.o"
421 cxx_target_objs="i386-c.o"
b4c522fa 422 d_target_objs="i386-d.o"
d48e78d6 423 extra_options="${extra_options} fused-madd.opt"
2bf6d935 424 extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o i386-options.o i386-builtins.o i386-expand.o i386-features.o"
7c0b7150 425 target_gtfiles="\$(srcdir)/config/i386/i386-builtins.c \$(srcdir)/config/i386/i386-expand.c \$(srcdir)/config/i386/i386-options.c"
b3172cab 426 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
3b8dd071 427 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
cbf2e4d4 428 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
43a8b705 429 immintrin.h x86intrin.h avxintrin.h xopintrin.h
7fccdfcf 430 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
2abaf67e 431 lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
756c5857
AI
432 avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
433 rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
434 adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
c1618f82 435 avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
9cdea277 436 shaintrin.h clflushoptintrin.h xsavecintrin.h
936c0fe4 437 xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
4190ea38 438 avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
3dcc8af5 439 avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
5fbb13a7 440 avx512vbmivlintrin.h avx5124fmapsintrin.h avx5124vnniwintrin.h
79fc8ffe 441 avx512vpopcntdqintrin.h clwbintrin.h mwaitxintrin.h
9d54607a 442 clzerointrin.h pkuintrin.h sgxintrin.h cetintrin.h
489154e7 443 gfniintrin.h cet.h avx512vbmi2intrin.h
69ddc3e5 444 avx512vbmi2vlintrin.h avx512vnniintrin.h
2abaf67e 445 avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
13b93d4b 446 avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
55f31ed1 447 pconfigintrin.h wbnoinvdintrin.h movdirintrin.h
366386c7 448 waitpkgintrin.h cldemoteintrin.h avx512bf16vlintrin.h
449 avx512bf16intrin.h enqcmdintrin.h serializeintrin.h
1e47cb35 450 avx512vp2intersectintrin.h avx512vp2intersectvlintrin.h
5c609842 451 tsxldtrkintrin.h amxtileintrin.h amxint8intrin.h
299a53d7 452 amxbf16intrin.h x86gprintrin.h uintrintrin.h"
14f73b5a 453 ;;
817e13c4
JM
454ia64-*-*)
455 extra_headers=ia64intrin.h
f19f1e5e 456 extra_options="${extra_options} g.opt fused-madd.opt"
817e13c4 457 ;;
cd985f66 458hppa*-*-*)
61ed06c3
HPN
459 cpu_type=pa
460 ;;
34251c0e
JM
461lm32*)
462 extra_options="${extra_options} g.opt"
463 ;;
ad126521
KI
464m32r*-*-*)
465 cpu_type=m32r
34251c0e 466 extra_options="${extra_options} g.opt"
ad126521 467 ;;
ba1e6c0b
JM
468m68k-*-*)
469 extra_headers=math-68881.h
47c94d21 470 extra_options="${extra_options} m68k/m68k-tables.opt"
61ed06c3 471 ;;
80920132
ME
472microblaze*-*-*)
473 cpu_type=microblaze
474 extra_options="${extra_options} g.opt"
475 ;;
61ed06c3
HPN
476mips*-*-*)
477 cpu_type=mips
b4c522fa 478 d_target_objs="mips-d.o"
8ae8bad7 479 extra_headers="loongson.h loongson-mmiintrin.h msa.h"
d41c8b4c 480 extra_objs="frame-header-opt.o"
e5aac417 481 extra_options="${extra_options} g.opt fused-madd.opt mips/mips-tables.opt"
61ed06c3 482 ;;
9304f876
CJW
483nds32*)
484 cpu_type=nds32
a4931745 485 extra_headers="nds32_intrinsic.h nds32_isr.h nds32_init.inc"
cf3cd43d
CJW
486 case ${target} in
487 nds32*-*-linux*)
488 extra_options="${extra_options} nds32/nds32-linux.opt"
489 ;;
490 nds32*-*-elf*)
491 extra_options="${extra_options} nds32/nds32-elf.opt"
492 ;;
493 *)
494 ;;
495 esac
b99353a2 496 extra_objs="nds32-cost.o nds32-intrinsic.o nds32-isr.o nds32-md-auxiliary.o nds32-pipelines-auxiliary.o nds32-predicates.o nds32-memory-manipulation.o nds32-fp-as-gp.o nds32-relax-opt.o nds32-utils.o"
9304f876 497 ;;
e430824f
CLT
498nios2-*-*)
499 cpu_type=nios2
500 extra_options="${extra_options} g.opt"
00020dda 501 ;;
738f2522
BS
502nvptx-*-*)
503 cpu_type=nvptx
504 ;;
3965b35f
SH
505or1k*-*-*)
506 cpu_type=or1k
507 ;;
61ed06c3
HPN
508powerpc*-*-*)
509 cpu_type=rs6000
1acf0246 510 extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o rs6000-call.o"
b76f1550 511 extra_headers="ppc-asm.h altivec.h htmintrin.h htmxlintrin.h"
a85492f3 512 extra_headers="${extra_headers} bmi2intrin.h bmiintrin.h"
09359ea3 513 extra_headers="${extra_headers} xmmintrin.h mm_malloc.h emmintrin.h"
a85492f3 514 extra_headers="${extra_headers} mmintrin.h x86intrin.h"
98e07d5c 515 extra_headers="${extra_headers} pmmintrin.h tmmintrin.h smmintrin.h"
b76f1550 516 extra_headers="${extra_headers} ppu_intrinsics.h spu2vmx.h vec_types.h si2vmx.h"
a1df6521 517 extra_headers="${extra_headers} amo.h"
a8e04fe6 518 case x$with_cpu in
71237df0 519 xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower10|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
a8e04fe6
AM
520 cpu_is_64bit=yes
521 ;;
522 esac
f10d3ac9 523 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
1acf0246 524 target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-logue.c \$(srcdir)/config/rs6000/rs6000-call.c"
4977bab6 525 ;;
8d2af3a2
DD
526pru-*-*)
527 cpu_type=pru
528 ;;
09cae750
PD
529riscv*)
530 cpu_type=riscv
de6320a8 531 extra_objs="riscv-builtins.o riscv-c.o riscv-sr.o riscv-shorten-memrefs.o"
b4c522fa 532 d_target_objs="riscv-d.o"
09cae750 533 ;;
4977bab6 534rs6000*-*-*)
f10d3ac9 535 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
1acf0246
BS
536 extra_objs="rs6000-string.o rs6000-p8swap.o rs6000-logue.o rs6000-call.o"
537 target_gtfiles="$target_gtfiles \$(srcdir)/config/rs6000/rs6000-logue.c \$(srcdir)/config/rs6000/rs6000-call.c"
4977bab6 538 ;;
61ed06c3
HPN
539sparc*-*-*)
540 cpu_type=sparc
8d12174d
DM
541 c_target_objs="sparc-c.o"
542 cxx_target_objs="sparc-c.o"
b4c522fa 543 d_target_objs="sparc-d.o"
e7f799ce 544 extra_headers="visintrin.h"
61ed06c3 545 ;;
4977bab6 546s390*-*-*)
6cecb0aa 547 cpu_type=s390
b4c522fa 548 d_target_objs="s390-d.o"
d7ecb504 549 extra_options="${extra_options} fused-madd.opt"
3af82a61 550 extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h"
4977bab6 551 ;;
b4eb03fe 552# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
a1fcb9a1 553sh[123456789lbe]*-*-* | sh-*-*)
fa5322fa 554 cpu_type=sh
159b4b2f 555 extra_options="${extra_options} fused-madd.opt"
ac973375 556 extra_objs="${extra_objs} sh_treg_combine.o sh-mem.o sh_optimize_sett_clrt.o"
fa5322fa 557 ;;
fd4df33d
NC
558v850*-*-*)
559 cpu_type=v850
560 ;;
bcead286
BS
561tic6x-*-*)
562 cpu_type=c6x
563 extra_headers="c6x_intrinsics.h"
564 extra_options="${extra_options} c6x/c6x-tables.opt"
565 ;;
47c21725
RH
566xtensa*-*-*)
567 extra_options="${extra_options} fused-madd.opt"
568 ;;
dd552284
WL
569tilegx*-*-*)
570 cpu_type=tilegx
dd552284 571 ;;
341c653c 572tilepro*-*-*)
dd552284 573 cpu_type=tilepro
dd552284 574 ;;
61ed06c3
HPN
575esac
576
577tm_file=${cpu_type}/${cpu_type}.h
b4c522fa 578tm_d_file=${cpu_type}/${cpu_type}.h
b6d7afec 579if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
61ed06c3 580then
b6d7afec 581 tm_p_file=${cpu_type}/${cpu_type}-protos.h
b4c522fa 582 tm_d_file="${tm_d_file} ${cpu_type}/${cpu_type}-protos.h"
b6d7afec 583fi
b4c522fa 584
1c0ca89d
ZW
585extra_modes=
586if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
587then
588 extra_modes=${cpu_type}/${cpu_type}-modes.def
589fi
75685792
RS
590if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
591then
592 extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
593fi
e564e618 594
b01bc573 595case ${target} in
17a819cb 596aarch64*-*-*)
c451f4d6 597 tm_p_file="${tm_p_file} arm/aarch-common-protos.h"
17a819cb
YZ
598 case ${with_abi} in
599 "")
600 if test "x$with_multilib_list" = xilp32; then
601 tm_file="aarch64/biarchilp32.h ${tm_file}"
602 else
603 tm_file="aarch64/biarchlp64.h ${tm_file}"
604 fi
605 ;;
606 ilp32)
607 tm_file="aarch64/biarchilp32.h ${tm_file}"
608 ;;
609 lp64)
610 tm_file="aarch64/biarchlp64.h ${tm_file}"
611 ;;
612 *)
613 echo "Unknown ABI used in --with-abi=$with_abi"
614 exit 1
615 esac
616 ;;
922e3e33 617i[34567]86-*-*)
0465e49e
L
618 if test "x$with_abi" != x; then
619 echo "This target does not support --with-abi."
620 exit 1
621 fi
922e3e33 622 ;;
e564e618 623x86_64-*-*)
0465e49e
L
624 case ${with_abi} in
625 "")
626 if test "x$with_multilib_list" = xmx32; then
627 tm_file="i386/biarchx32.h ${tm_file}"
628 else
629 tm_file="i386/biarch64.h ${tm_file}"
630 fi
631 ;;
632 64 | m64)
633 tm_file="i386/biarch64.h ${tm_file}"
634 ;;
635 x32 | mx32)
636 tm_file="i386/biarchx32.h ${tm_file}"
637 ;;
638 *)
639 echo "Unknown ABI used in --with-abi=$with_abi"
640 exit 1
641 esac
e564e618 642 ;;
c3f35647 643arm*-*-*)
bdb0828f 644 tm_p_file="arm/arm-flags.h ${tm_p_file} arm/aarch-common-protos.h"
1bfa5973 645 ;;
e564e618
DB
646esac
647
61ed06c3 648# On a.out targets, we need to use collect2.
b01bc573 649case ${target} in
61ed06c3
HPN
650*-*-*aout*)
651 use_collect2=yes
652 ;;
0e5a4ad8 653esac
61ed06c3 654
2c8f43e6 655# Common C libraries.
755658a5 656tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
2c8f43e6 657
646bdeab
L
658# 32-bit x86 processors supported by --with-arch=. Each processor
659# MUST be separated by exactly one space.
660x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \
661athlon-xp k6 k6-2 k6-3 geode c3 c3-2 winchip-c6 winchip2 i386 i486 \
662i586 i686 pentium pentium-m pentium-mmx pentium2 pentium3 pentium3m \
2d6b2e28 663pentium4 pentium4m pentiumpro prescott lakemont"
646bdeab
L
664
665# 64-bit x86 processors supported by --with-arch=. Each processor
666# MUST be separated by exactly one space.
667x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \
2901f42f
VK
668bdver3 bdver4 znver1 znver2 btver1 btver2 k8 k8-sse3 opteron \
669opteron-sse3 nocona core2 corei7 corei7-avx core-avx-i core-avx2 atom \
670slm nehalem westmere sandybridge ivybridge haswell broadwell bonnell \
671silvermont knl knm skylake-avx512 cannonlake icelake-client icelake-server \
ba9c87d3
CL
672skylake goldmont goldmont-plus tremont cascadelake tigerlake cooperlake \
673sapphirerapids alderlake x86-64 native"
646bdeab
L
674
675# Additional x86 processors supported by --with-cpu=. Each processor
676# MUST be separated by exactly one space.
677x86_cpus="generic intel"
678
4977bab6 679# Common parts for widely ported systems.
b01bc573 680case ${target} in
4d6d5bb2 681*-*-darwin*)
c2ff7104 682 tmake_file="t-darwin "
80c85ca2
MS
683 tm_file="${tm_file} darwin.h"
684 case ${target} in
c9c80434 685 *-*-darwin9*)
80c85ca2
MS
686 tm_file="${tm_file} darwin9.h"
687 ;;
0674c9de 688 *-*-darwin[1][01]*)
c9c80434
JH
689 tm_file="${tm_file} darwin9.h darwin10.h"
690 ;;
0674c9de
JH
691 *-*-darwin[1][2-9]* | *-*-darwin[2][0-9]*)
692 tm_file="${tm_file} darwin9.h darwin10.h darwin12.h"
693 ;;
80c85ca2
MS
694 esac
695 tm_file="${tm_file} ${cpu_type}/darwin.h"
4d6d5bb2 696 tm_p_file="${tm_p_file} darwin-protos.h"
7c0b7150 697 target_gtfiles="$target_gtfiles \$(srcdir)/config/darwin.c"
6ac49599 698 extra_options="${extra_options} darwin.opt"
ab442df7
MM
699 c_target_objs="${c_target_objs} darwin-c.o"
700 cxx_target_objs="${cxx_target_objs} darwin-c.o"
c776a6d0 701 fortran_target_objs="darwin-f.o"
acce4e77 702 target_has_targetcm=yes
c73200ca 703 extra_objs="${extra_objs} darwin.o"
e46b55d0 704 extra_gcc_objs="darwin-driver.o"
747b9f55 705 default_use_cxa_atexit=yes
428ddbf0 706 use_gcc_stdint=wrap
4d6d5bb2
NN
707 case ${enable_threads} in
708 "" | yes | posix) thread_file='posix' ;;
709 esac
710 ;;
dbed5a9b
JM
711*-*-dragonfly*)
712 gas=yes
713 gnu_ld=yes
714 tmake_file="t-slibgcc"
715 case ${enable_threads} in
716 "" | yes | posix)
717 thread_file='posix'
718 ;;
719 no | single)
720 # Let these non-posix thread selections fall through if requested
721 ;;
722 *)
723 echo 'Unknown thread configuration for DragonFly BSD'
724 exit 1
725 ;;
726 esac
727 extra_options="$extra_options rpath.opt dragonfly.opt"
728 default_use_cxa_atexit=yes
729 use_gcc_stdint=wrap
730 ;;
4d6d5bb2
NN
731*-*-freebsd*)
732 # This is the generic ELF configuration of FreeBSD. Later
733 # machine-specific sections may refine and add to this
734 # configuration.
735 #
736 # Due to tm_file entry ordering issues that vary between cpu
737 # architectures, we only define fbsd_tm_file to allow the
738 # machine-specific section to dictate the final order of all
739 # entries of tm_file with the minor exception that components
740 # of the tm_file set here will always be of the form:
741 #
742 # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
743 #
744 # The machine-specific section should not tamper with this
745 # ordering but may order all other entries of tm_file as it
746 # pleases around the provided core setting.
747 gas=yes
748 gnu_ld=yes
b2449d40 749 fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
faabf788
AT
750 if test "$fbsd_major" = ""; then
751 echo "Specify the major version number of the targeted FreeBSD release"
752 echo "like this: --target=amd64-unknown-freebsd10.1"
753 exit 1
754 fi
b2449d40 755 tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
f9989b51 756 tmake_file="t-slibgcc"
4d6d5bb2
NN
757 case ${enable_threads} in
758 no)
759 fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
760 ;;
769e49eb 761 "" | yes | posix)
4d6d5bb2 762 thread_file='posix'
4d6d5bb2 763 ;;
f7288899 764 *)
4d6d5bb2
NN
765 echo 'Unknown thread configuration for FreeBSD'
766 exit 1
767 ;;
768 esac
5ac69a80 769 fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
baf3ead6 770 extra_options="$extra_options rpath.opt freebsd.opt"
8a47c6c4
LR
771 case ${target} in
772 *-*-freebsd[345].*)
773 :;;
774 *)
775 default_use_cxa_atexit=yes;;
776 esac
5ac69a80 777 use_gcc_stdint=wrap
4d6d5bb2 778 ;;
491b3c5f
JC
779*-*-fuchsia*)
780 native_system_header_dir=/include
781 ;;
b1e21e5a 782*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-*-uclinuxfdpiceabi)
b8e7038e 783 extra_options="$extra_options gnu-user.opt"
e3029773
NN
784 gas=yes
785 gnu_ld=yes
786 case ${enable_threads} in
787 "" | yes | posix) thread_file='posix' ;;
788 esac
f9989b51 789 tmake_file="t-slibgcc"
3328a3b7 790 case $target in
8466af06 791 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
3328a3b7
TS
792 :;;
793 *-*-gnu*)
08b2bad2
SB
794 native_system_header_dir=/include
795 ;;
3328a3b7 796 esac
5fa747a7 797 # Linux C libraries selection switch: glibc / uclibc / bionic.
74c70253 798 # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
3328a3b7
TS
799 case $target in
800 *linux*)
5fa747a7
MK
801 tm_p_file="${tm_p_file} linux-protos.h"
802 tmake_file="${tmake_file} t-linux"
803 extra_objs="${extra_objs} linux.o"
804 extra_options="${extra_options} linux.opt"
805 ;;
3328a3b7 806 esac
74c70253
MK
807 case $target in
808 *-*-*android*)
809 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
810 ;;
b1e21e5a 811 *-*-*uclibc* | *-*-uclinuxfdpiceabi)
74c70253 812 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
7bd85ce0 813 ;;
755658a5
GR
814 *-*-*musl*)
815 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
816 ;;
7bd85ce0 817 *)
74c70253 818 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
464aea98
JM
819 ;;
820 esac
74c70253
MK
821 # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
822 # is provided.
c5dde55b 823 default_use_cxa_atexit=yes
1617e5ee 824 use_gcc_tgmath=no
207bf79d 825 use_gcc_stdint=wrap
51b9db92
MK
826 # Enable compilation for Android by default for *android* targets.
827 case $target in
828 *-*-*android*)
829 tm_defines="$tm_defines ANDROID_DEFAULT=1"
830 ;;
831 *)
832 tm_defines="$tm_defines ANDROID_DEFAULT=0"
833 ;;
834 esac
1efcb8c6
JM
835 c_target_objs="${c_target_objs} glibc-c.o"
836 cxx_target_objs="${cxx_target_objs} glibc-c.o"
b4c522fa 837 d_target_objs="${d_target_objs} glibc-d.o"
1efcb8c6
JM
838 tmake_file="${tmake_file} t-glibc"
839 target_has_targetcm=yes
b4c522fa 840 target_has_targetdm=yes
e3029773 841 ;;
f982f805 842*-*-netbsd*)
b460e64d
KW
843 tm_p_file="${tm_p_file} netbsd-protos.h"
844 tmake_file="t-netbsd t-slibgcc"
845 extra_objs="${extra_objs} netbsd.o"
2f2b8e40 846 d_target_objs="${d_target_objs} netbsd-d.o"
e3029773
NN
847 gas=yes
848 gnu_ld=yes
0333b8d0 849 use_gcc_stdint=wrap
e3029773 850 case ${enable_threads} in
b48cd47e 851 "" | yes | posix) thread_file='posix' ;;
e3029773 852 esac
dfe2677b 853 nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h"
b74103ef 854 default_use_cxa_atexit=yes
2f2b8e40 855 target_has_targetdm=yes
856f73d1
MR
856 case ${target} in
857 arm*-* | i[34567]86-* | powerpc*-* | sparc*-* | x86_64-*)
858 default_gnu_indirect_function=yes
859 ;;
860 esac
e3029773 861 ;;
4d6d5bb2 862*-*-openbsd*)
f9989b51 863 tmake_file="t-openbsd"
e3029773 864 case ${enable_threads} in
4d6d5bb2 865 yes)
e3029773 866 thread_file='posix'
e3029773
NN
867 ;;
868 esac
af9e6b74
MK
869 case ${target} in
870 *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
871 default_use_cxa_atexit=yes
872 ;;
873 esac
e3029773 874 ;;
bfdd80d4
JS
875*-*-phoenix*)
876 gas=yes
877 gnu_ld=yes
878 default_use_cxa_atexit=yes
879 ;;
8179b3c8
NN
880*-*-rtems*)
881 case ${enable_threads} in
776c9a0d
SH
882 "" | yes | rtems) thread_file='rtems' ;;
883 posix) thread_file='posix' ;;
884 no) ;;
885 *)
886 echo 'Unknown thread configuration for RTEMS'
887 exit 1
888 ;;
8179b3c8 889 esac
aefe4056 890 tmake_file="${tmake_file} t-rtems"
cd33a412 891 extra_options="${extra_options} rtems.opt"
228c1313 892 default_use_cxa_atexit=yes
207bf79d
JM
893 use_gcc_stdint=wrap
894 ;;
895*-*-uclinux*)
b8e7038e 896 extra_options="$extra_options gnu-user.opt"
207bf79d 897 use_gcc_stdint=wrap
09955a32
WB
898 case ${enable_threads} in
899 "" | yes | posix) thread_file='posix' ;;
900 esac
b5a54c03 901 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
8179b3c8 902 ;;
5a579c3b
LE
903*-*-rdos*)
904 use_gcc_stdint=wrap
905 ;;
c28aa982 906*-*-solaris2*)
7ecfa34f
RO
907 # i?86-*-solaris2* needs to insert headers between cpu default and
908 # Solaris 2 specific ones.
2cf03b11
RO
909 sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h"
910 sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
911 sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
29424c7b 912 case ${target} in
f021f1d3
RO
913 *-*-solaris2.1[1-9]*)
914 # __cxa_atexit was introduced in Solaris 11.4.
29424c7b
RO
915 default_use_cxa_atexit=yes
916 ;;
917 esac
d9f069ab 918 use_gcc_stdint=wrap
7ecfa34f
RO
919 if test x$gnu_ld = xyes; then
920 tm_file="usegld.h ${tm_file}"
921 fi
922 if test x$gas = xyes; then
923 tm_file="usegas.h ${tm_file}"
924 fi
925 tm_p_file="${tm_p_file} sol2-protos.h"
b040f2be 926 tmake_file="${tmake_file} t-sol2 t-slibgcc"
7ecfa34f 927 c_target_objs="${c_target_objs} sol2-c.o"
5b880ea6 928 cxx_target_objs="${cxx_target_objs} sol2-c.o sol2-cxx.o"
cdb3f2f4 929 d_target_objs="${d_target_objs} sol2-d.o"
41f59cda 930 extra_objs="${extra_objs} sol2.o sol2-stubs.o"
c28aa982 931 extra_options="${extra_options} sol2.opt"
7ecfa34f
RO
932 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
933 "":yes:* | yes:yes:* )
934 thread_file=posix
935 ;;
936 esac
cdb3f2f4 937 target_has_targetdm=yes
c28aa982 938 ;;
18a24fed
TG
939*-*-*vms*)
940 extra_options="${extra_options} vms/vms.opt"
941 xmake_file=vms/x-vms
b040f2be 942 tmake_file="vms/t-vms t-slibgcc"
db8b22ef
TG
943 extra_objs="vms.o"
944 target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.c"
945 tm_p_file="${tm_p_file} vms/vms-protos.h"
d8aba32a 946 xm_file="vms/xm-vms.h"
c750e768
TG
947 c_target_objs="vms-c.o"
948 cxx_target_objs="vms-c.o"
c531f06a 949 fortran_target_objs="vms-f.o"
20bfad56
TG
950 use_gcc_stdint=provide
951 tm_file="${tm_file} vms/vms-stdint.h"
18a24fed
TG
952 if test x$gnu_ld != xyes; then
953 # Build wrappers for native case.
954 extra_programs="ld\$(exeext) ar\$(exeext)"
955 tmake_file="$tmake_file vms/t-vmsnative"
956 fi
957 ;;
4977bab6 958*-*-vxworks*)
e3029773 959 tmake_file=t-vxworks
2eab15c9 960 xm_defines=POSIX
41c1b913 961
2eab15c9 962 extra_options="${extra_options} vxworks.opt"
6994430a 963 extra_objs="$extra_objs vxworks.o"
41c1b913 964
b3405ddc
JB
965 c_target_objs="${c_target_objs} vxworks-c.o"
966 cxx_target_objs="${cxx_target_objs} vxworks-c.o"
967 extra_headers="${extra_headers} ../vxworks/vxworks-predef.h"
968 target_has_targetcm="yes"
41c1b913 969
abb6c3ee
OH
970 # This private header exposes a consistent interface for checks on
971 # the VxWorks version our runtime header files need to perform, based on
972 # what the system headers adverstise:
973
974 extra_headers="${extra_headers} ../vxworks/_vxworks-versions.h"
975
41c1b913
OH
976 # Starting from VxWorks 7, the system comes with a Dinkumware
977 # environment which requires the inclusion of "yvals.h" before other
978 # system headers. We provide wrapped versions of a few headers to
979 # accomodate such constraints:
980
981 extra_headers="${extra_headers} ../vxworks/_yvals.h"
982 extra_headers="${extra_headers} ../vxworks/_yvals-wrapper.h"
983
984 extra_headers="${extra_headers} ../vxworks/math.h ../vxworks/complex.h"
985 extra_headers="${extra_headers} ../vxworks/inttypes.h ../vxworks/setjmp.h"
986
bbbc0595
OH
987 # We provide stdint.h ...
988
989 tm_file="${tm_file} vxworks-stdint.h"
990
991 # .. only through the yvals conditional wrapping mentioned above
992 # to abide by the VxWorks 7 expectations. The final copy is performed
993 # explicitly by a t-vxworks Makefile rule.
994
995 use_gcc_stdint=none
996 extra_headers="${extra_headers} ../../ginclude/stdint-gcc.h"
997
55047c9d
PE
998 case ${enable_threads} in
999 no) ;;
1000 "" | yes | vxworks) thread_file='vxworks' ;;
1001 *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
1002 esac
ebcdba9c
PB
1003
1004 # A few common macro definitions conveying general characteristics
1005 # of the configuration at hand. Note that by VxWorks 7, we mean the
1006 # the SR6xx major update or beyond in vendor parlance:
1007
b269e899
JL
1008 case $target in
1009 *-*-vxworks7*)
1010 tm_defines="$tm_defines TARGET_VXWORKS7=1"
1011 ;;
1012 esac
caa62834
OH
1013 case $target in
1014 *64-*-vxworks*)
1015 tm_defines="$tm_defines TARGET_VXWORKS64=1"
1016 ;;
1017 esac
ebcdba9c
PB
1018
1019 # Then a few build configuration controls for VxWorks 7, which
1020 # has specificities on top of which we aim to provide more complete
1021 # C++ support:
1022
1023 case $target in
1024 *-*-vxworks7*)
1025 # VxWorks 7 always has init/fini_array support and it is simpler to
1026 # just leverage this, sticking to what the system toolchain does:
1027 gcc_cv_initfini_array=yes
1028 ;;
1029 esac
e3029773 1030 ;;
53426f6c 1031*-*-elf|arc*-*-elf*)
c5dde55b
NC
1032 # Assume that newlib is being used and so __cxa_atexit is provided.
1033 default_use_cxa_atexit=yes
207bf79d 1034 use_gcc_stdint=wrap
c5dde55b 1035 ;;
61ed06c3
HPN
1036esac
1037
b01bc573 1038case ${target} in
491b3c5f 1039aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
24034425 1040 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
91bed1a1 1041 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-elf-raw.h"
24034425 1042 tmake_file="${tmake_file} aarch64/t-aarch64"
11779999
JS
1043 case $target in
1044 aarch64-*-elf*)
1045 use_gcc_stdint=wrap
1046 ;;
491b3c5f
JC
1047 aarch64-*-fuchsia*)
1048 tm_file="${tm_file} fuchsia.h"
1049 ;;
11779999
JS
1050 aarch64-*-rtems*)
1051 tm_file="${tm_file} rtems.h aarch64/rtems.h"
1052 ;;
1053 esac
24034425
IB
1054 case $target in
1055 aarch64_be-*)
1056 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1057 ;;
1058 esac
17a819cb
YZ
1059 aarch64_multilibs="${with_multilib_list}"
1060 if test "$aarch64_multilibs" = "default"; then
1061 aarch64_multilibs="lp64,ilp32"
1062 fi
1063 aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
1064 for aarch64_multilib in ${aarch64_multilibs}; do
1065 case ${aarch64_multilib} in
1066 ilp32 | lp64 )
1067 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
1068 ;;
1069 *)
1070 echo "--with-multilib-list=${aarch64_multilib} not supported."
1071 exit 1
1072 esac
1073 done
1074 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
24034425 1075 ;;
b20e7532
AT
1076aarch64*-*-freebsd*)
1077 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
91bed1a1 1078 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-freebsd.h"
b20e7532 1079 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
5b0acc31 1080 tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
b20e7532 1081 ;;
f32f7585
MG
1082aarch64*-*-netbsd*)
1083 tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file}"
91bed1a1 1084 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-netbsd.h"
f32f7585
MG
1085 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd"
1086 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1087 ;;
24034425
IB
1088aarch64*-*-linux*)
1089 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
91bed1a1 1090 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-linux.h"
24034425 1091 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
b39036d2 1092 tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
24034425
IB
1093 case $target in
1094 aarch64_be-*)
1095 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1096 ;;
1097 esac
17a819cb
YZ
1098 aarch64_multilibs="${with_multilib_list}"
1099 if test "$aarch64_multilibs" = "default"; then
1100 # TODO: turn on ILP32 multilib build after its support is mature.
1101 # aarch64_multilibs="lp64,ilp32"
1102 aarch64_multilibs="lp64"
1103 fi
1104 aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
1105 for aarch64_multilib in ${aarch64_multilibs}; do
1106 case ${aarch64_multilib} in
1107 ilp32 | lp64 )
1108 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
1109 ;;
1110 *)
1111 echo "--with-multilib-list=${aarch64_multilib} not supported."
1112 exit 1
1113 esac
1114 done
1115 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
24034425 1116 ;;
3004f893
DR
1117aarch64*-wrs-vxworks*)
1118 tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
1119 tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"
1120 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-vxworks"
1121 ;;
61ed06c3 1122alpha*-*-linux*)
8f27fc6b 1123 tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
a32fc216 1124 tmake_file="${tmake_file} alpha/t-linux alpha/t-alpha"
183c38a4 1125 extra_options="${extra_options} alpha/elf.opt"
61ed06c3 1126 ;;
61ed06c3 1127alpha*-*-netbsd*)
dfe2677b 1128 tm_file="elfos.h ${tm_file} ${nbsd_tm_file} alpha/elf.h alpha/netbsd.h"
a32fc216 1129 tmake_file="${tmake_file} alpha/t-alpha"
183c38a4
JM
1130 extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
1131 alpha/elf.opt"
61ed06c3 1132 ;;
61ed06c3 1133alpha*-*-openbsd*)
aa58f943 1134 tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
8f27fc6b 1135 tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
a32fc216 1136 tmake_file="${tmake_file} alpha/t-alpha"
183c38a4 1137 extra_options="${extra_options} openbsd.opt alpha/elf.opt"
61ed06c3 1138 # default x-alpha is only appropriate for dec-osf.
61ed06c3 1139 ;;
ef057c45 1140alpha*-dec-*vms*)
ba89fcb6 1141 tm_file="${tm_file} vms/vms.h alpha/vms.h"
a32fc216 1142 tmake_file="${tmake_file} alpha/t-vms alpha/t-alpha"
61ed06c3 1143 ;;
53426f6c 1144arc*-*-elf*)
fad92291 1145 tm_file="arc/arc-arch.h dbxelf.h elfos.h newlib-stdint.h arc/elf.h ${tm_file}"
f9ccf899
CZ
1146 tmake_file="arc/t-multilib arc/t-arc"
1147 extra_gcc_objs="driver-arc.o"
1148 if test "x$with_cpu" != x; then
1149 tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1150 fi
53426f6c
JR
1151 if test x${with_endian} = x; then
1152 case ${target} in
1153 arc*be-*-* | arc*eb-*-*) with_endian=big ;;
1154 *) with_endian=little ;;
1155 esac
1156 fi
1157 case ${with_endian} in
1158 big|little) ;;
1159 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
1160 esac
1161 case ${with_endian} in
fad92291 1162 big*) tm_file="arc/big.h ${tm_file}"
53426f6c
JR
1163 esac
1164 ;;
b1938888 1165arc*-*-linux*)
fad92291 1166 tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}"
825f9d0b 1167 tmake_file="${tmake_file} arc/t-multilib-linux arc/t-arc"
f9ccf899
CZ
1168 extra_gcc_objs="driver-arc.o"
1169 if test "x$with_cpu" != x; then
1170 tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1171 fi
53426f6c
JR
1172 if test x${with_endian} = x; then
1173 case ${target} in
1174 arc*be-*-* | arc*eb-*-*) with_endian=big ;;
1175 *) with_endian=little ;;
1176 esac
1177 fi
1178 case ${with_endian} in
1179 big|little) ;;
1180 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
1181 esac
1182 case ${with_endian} in
fad92291 1183 big*) tm_file="arc/big.h ${tm_file}"
53426f6c 1184 esac
fac31afe
VG
1185 # Force .init_array support. The configure script cannot always
1186 # automatically detect that GAS supports it, yet we require it.
1187 gcc_cv_initfini_array=yes
1188 ;;
27204060
JL
1189arm-wrs-vxworks7*)
1190 # We only support VxWorks 7 now on ARM, post SR600. Pre SR600
1191 # VxWorks 7 was transitory and major versions prior to 7 were based
1192 # on long deprecated ABI, not supported at all any more regardless
1193 # of VxWorks.
59793c51 1194 extra_options="${extra_options} arm/vxworks.opt"
27204060
JL
1195 tmake_file="${tmake_file} arm/t-arm arm/t-vxworks arm/t-bpabi"
1196 tm_file="elfos.h arm/elf.h arm/bpabi.h arm/aout.h ${tm_file}"
1197 tm_file="${tm_file} vx-common.h vxworks.h arm/vxworks.h"
86b14bb1 1198 target_cpu_cname="generic-armv7-a"
27204060 1199 need_64bit_hwint=yes
55047c9d 1200 ;;
82a19768
AT
1201arm*-*-freebsd*) # ARM FreeBSD EABI
1202 tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h"
1203 case $target in
1204 arm*b-*-freebsd*)
1205 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1206 ;;
1207 esac
1208 tmake_file="${tmake_file} arm/t-arm arm/t-bpabi"
1209 tm_file="${tm_file} arm/bpabi.h arm/freebsd.h arm/aout.h arm/arm.h"
1210 case $target in
1211 armv6*-*-freebsd*)
b5e204dc 1212 target_cpu_cname="arm1176jzf-s"
c8743fc5
AT
1213 if test $fbsd_major -ge 11; then
1214 tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1215 fi
82a19768 1216 ;;
eb484969
AT
1217 armv7*-*-freebsd*)
1218 target_cpu_cname="generic-armv7-a"
1219 tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1220 ;;
d3d3f1af
RE
1221 *)
1222 target_cpu_cname="arm9"
1223 ;;
82a19768
AT
1224 esac
1225 with_tls=${with_tls:-gnu}
1226 ;;
69474c3c 1227arm*-*-netbsdelf*)
7a433140 1228 target_cpu_cname="strongarm"
b27c1082
MT
1229 tmake_file="${tmake_file} arm/t-arm"
1230 tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h"
1231 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1232 case ${target} in
1233 arm*eb-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ;;
1234 esac
1235 case ${target} in
1236 arm*-*-netbsdelf-*eabi*)
1237 tm_file="$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h"
1238 tmake_file="$tmake_file arm/t-bpabi arm/t-netbsdeabi"
1239 ;;
1240 *)
1241 tm_file="$tm_file arm/netbsd-elf.h"
1242 tmake_file="$tmake_file arm/t-netbsd"
1243 ;;
1244 esac
1245 tm_file="${tm_file} arm/aout.h arm/arm.h"
1246 case ${target} in
1247 arm*-*-netbsdelf-*eabihf*)
1248 # Hard-float requires at least Arm v5te
1249 target_cpu_cname="arm10e"
1250 tm_defines="${tm_defines} TARGET_DEFAULT_FLOAT_ABI=ARM_FLOAT_ABI_HARD"
1251 ;;
1252 esac
1253 case ${target} in
1254 armv6*) target_cpu_cname="arm1176jzf-s";;
1255 armv7*) target_cpu_cname="generic-armv7-a";;
1256 esac
69474c3c 1257 ;;
b1e21e5a 1258arm*-*-linux-* | arm*-*-uclinuxfdpiceabi)
8e38461c 1259 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
5fa747a7 1260 extra_options="${extra_options} linux-android.opt"
d3a9662c 1261 case $target in
e3ed9d60 1262 arm*b-*-linux*)
c4cc7bc1
RE
1263 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1264 ;;
d3a9662c 1265 esac
f423a9e4 1266 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
52e18cdf 1267 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h arm/arm.h"
45d53c67
CL
1268 case $target in
1269 arm*-*-uclinuxfdpiceabi)
1270 tm_file="$tm_file arm/uclinuxfdpiceabi.h"
1271 ;;
1272 esac
87fd6bde
RE
1273 # Generation of floating-point instructions requires at least ARMv5te.
1274 if [ "$with_float" = "hard" -o "$with_float" = "softfp" ] ; then
1275 target_cpu_cname="arm10e"
1276 else
1277 target_cpu_cname="arm10tdmi"
1278 fi
c4cc7bc1 1279 # Define multilib configuration for arm-linux-androideabi.
077fc835 1280 case ${target} in
c4cc7bc1
RE
1281 *-androideabi)
1282 tmake_file="$tmake_file arm/t-linux-androideabi"
077fc835
KH
1283 ;;
1284 esac
c4cc7bc1
RE
1285 # The EABI requires the use of __cxa_atexit.
1286 default_use_cxa_atexit=yes
7cf13d1f 1287 with_tls=${with_tls:-gnu}
61ed06c3 1288 ;;
c4cc7bc1 1289arm*-*-uclinux*eabi*) # ARM ucLinux
207bf79d 1290 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
aefe4056 1291 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
52e18cdf 1292 tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h arm/arm.h"
d3d3f1af 1293 target_cpu_cname="arm7tdmi"
c4cc7bc1
RE
1294 # The EABI requires the use of __cxa_atexit.
1295 default_use_cxa_atexit=yes
0e5a4ad8 1296 ;;
bfdd80d4
JS
1297arm*-*-phoenix*)
1298 tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1299 tm_file="${tm_file} newlib-stdint.h phoenix.h"
1300 tm_file="${tm_file} arm/aout.h arm/arm.h"
1301 tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-phoenix"
d3d3f1af 1302 target_cpu_cname="arm7tdmi"
bfdd80d4 1303 ;;
491b3c5f 1304arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
ac8d93a7
SL
1305 case ${target} in
1306 arm*eb-*-eabi*)
1307 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1308 esac
e6fc6c9b 1309 default_use_cxa_atexit=yes
b3f8d95d 1310 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
aefe4056 1311 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
d3d3f1af 1312 target_cpu_cname="arm7tdmi"
b3f8d95d 1313 case ${target} in
f9a02408 1314 arm*-*-eabi*)
51b9db92 1315 tm_file="$tm_file newlib-stdint.h"
e04d8a63 1316 tmake_file="${tmake_file} arm/t-bpabi"
207bf79d 1317 use_gcc_stdint=wrap
f9a02408 1318 ;;
491b3c5f
JC
1319 arm*-*-fuchsia*)
1320 tm_file="${tm_file} fuchsia.h arm/fuchsia-elf.h glibc-stdint.h"
be5c4e06 1321 tmake_file="${tmake_file} arm/t-bpabi arm/t-fuchsia"
bf35d17a 1322 target_cpu_cname="generic-armv7-a"
491b3c5f 1323 ;;
05242957 1324 arm*-*-rtems*)
5be0a29b
SH
1325 tm_file="${tm_file} rtems.h arm/rtems.h newlib-stdint.h"
1326 tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems"
e36c5271 1327 ;;
b3f8d95d
MM
1328 arm*-*-symbianelf*)
1329 tm_file="${tm_file} arm/symbian.h"
f9a02408
MM
1330 # We do not include t-bpabi for Symbian OS because the system
1331 # provides its own implementation of the BPABI functions.
c0354bf4 1332 tmake_file="${tmake_file} arm/t-symbian"
d3d3f1af 1333 target_cpu_cname="arm10tdmi"
b3f8d95d
MM
1334 ;;
1335 esac
52e18cdf 1336 tm_file="${tm_file} arm/aout.h arm/arm.h"
336bd6ac 1337 ;;
61ed06c3 1338avr-*-*)
4a2caf6c 1339 tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/avr-stdint.h"
b588ae30
GJL
1340 if test x${with_avrlibc} != xno; then
1341 tm_file="${tm_file} ${cpu_type}/avrlibc.h"
1342 tm_defines="${tm_defines} WITH_AVRLIBC"
1343 fi
f30dd607
GJL
1344 # Work out avr_double_comparison which is 2 or 3 and is used in
1345 # target hook FLOAT_LIB_COMPARE_RETURNS_BOOL to determine whether
1346 # DFmode comparisons return 3-state or 2-state results.
1347 case y${with_double_comparison} in
1348 y | ytristate)
1349 avr_double_comparison=3
1350 ;;
1351 ybool | ylibf7)
1352 avr_double_comparison=2
1353 ;;
1354 *)
1355 echo "Error: --with-double-comparison= can only be used with: 'tristate', 'bool', 'libf7'" 1>&2
1356 exit 1
1357 ;;
1358 esac
1359 case "y${with_libf7}" in
1360 yno)
1361 # avr_double_comparison as set above.
1362 ;;
1363 ylibgcc)
1364 avr_double_comparison=2
1365 tm_defines="${tm_defines} WITH_LIBF7_LIBGCC"
1366 ;;
1367 y | yyes | ymath-symbols)
1368 avr_double_comparison=2
1369 tm_defines="${tm_defines} WITH_LIBF7_LIBGCC"
1370 tm_defines="${tm_defines} WITH_LIBF7_MATH"
1371 tm_defines="${tm_defines} WITH_LIBF7_MATH_SYMBOLS"
1372 ;;
1373 ymath)
1374 avr_double_comparison=2
1375 tm_defines="${tm_defines} WITH_LIBF7_LIBGCC"
1376 tm_defines="${tm_defines} WITH_LIBF7_MATH"
1377 ;;
1378 *)
1379 echo "Error: --with-libf7=${with_libf7} but can only be used with: 'libgcc', 'math', 'math-symbols', 'yes', 'no'" 1>&2
1380 exit 1
1381 ;;
1382 esac
1383 tm_defines="${tm_defines} WITH_DOUBLE_COMPARISON=${avr_double_comparison}"
29f3def3 1384 case y${with_double} in
f30dd607 1385 y32)
29f3def3
GJL
1386 avr_double=32
1387 tm_defines="${tm_defines} HAVE_DOUBLE32"
1388 ;;
1389 y64)
1390 avr_double=64
1391 tm_defines="${tm_defines} HAVE_DOUBLE64"
1392 ;;
1393 y64,32)
1394 avr_double=64
1395 avr_double_multilib=1
1396 tm_defines="${tm_defines} HAVE_DOUBLE32"
1397 tm_defines="${tm_defines} HAVE_DOUBLE64"
1398 tm_defines="${tm_defines} HAVE_DOUBLE_MULTILIB"
1399 ;;
f30dd607 1400 y | y32,64)
29f3def3
GJL
1401 avr_double=32
1402 avr_double_multilib=1
1403 tm_defines="${tm_defines} HAVE_DOUBLE32"
1404 tm_defines="${tm_defines} HAVE_DOUBLE64"
1405 tm_defines="${tm_defines} HAVE_DOUBLE_MULTILIB"
1406 ;;
1407 *)
1408 echo "Error: --with-double= can only be used with: '32', '32,64', '64,32', '64'" 1>&2
1409 exit 1
1410 ;;
1411 esac
1412 case y${with_long_double} in
f30dd607 1413 y32)
29f3def3
GJL
1414 avr_long_double=32
1415 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1416 ;;
1417 y64)
1418 avr_long_double=64
1419 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1420 ;;
f30dd607 1421 y | y64,32)
29f3def3
GJL
1422 avr_long_double=64
1423 avr_long_double_multilib=1
1424 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1425 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1426 tm_defines="${tm_defines} HAVE_LONG_DOUBLE_MULTILIB"
1427 ;;
1428 y32,64)
1429 avr_long_double=32
1430 avr_long_double_multilib=1
1431 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1432 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1433 tm_defines="${tm_defines} HAVE_LONG_DOUBLE_MULTILIB"
1434 ;;
1435 ydouble)
1436 avr_long_double=${avr_double}
1437 tm_defines="${tm_defines} HAVE_LONG_DOUBLE_IS_DOUBLE"
1438 if test y${avr_double_multilib} = y1; then
1439 tm_defines="${tm_defines} HAVE_LONG_DOUBLE32"
1440 tm_defines="${tm_defines} HAVE_LONG_DOUBLE64"
1441 else
1442 tm_defines="${tm_defines} HAVE_LONG_DOUBLE${avr_long_double}"
1443 fi
1444 ;;
1445 *)
1446 echo "Error: --with-long_double= can only be used with: '32', '32,64', '64,32', '64', 'double'" 1>&2
1447 exit 1
1448 ;;
1449 esac
1450 if test ${avr_long_double}x${avr_long_double_multilib}y${avr_double_multilib}z = 32xy1z; then
1451 if test y${with_long_double} != ydouble; then
1452 echo "Error: --with-double=${with_double} requests a multilib for double, but long double is always 32 bits wide due to --with-long-double=${with_long_double}" 1>&2
1453 exit 1
1454 fi
1455 fi
1456 if test ${avr_double}x${avr_long_double_multilib}y${avr_double_multilib}z = 64x1yz; then
1457 echo "Error: --with-long-double=${with_long_double} requests a multilib for long double, but double is always 64 bits wide due to --with-double=64" 1>&2
1458 exit 1
1459 fi
1460 if test y${avr_double}${avr_long_double} = y6432; then
1461 echo "Error: double default of 64 bits from --with-double=${with_double} conflicts with default of 32 bits for long double from --with-long-double=${with_long_double}" 1>&2
1462 exit 1
1463 fi
1464 tm_defines="${tm_defines} WITH_DOUBLE${avr_double}"
1465 tm_defines="${tm_defines} WITH_LONG_DOUBLE${avr_long_double}"
4de80584 1466 tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
207bf79d 1467 use_gcc_stdint=wrap
4a2caf6c 1468 extra_gcc_objs="driver-avr.o avr-devices.o"
6c7dfafe 1469 extra_objs="avr-devices.o avr-log.o"
61ed06c3 1470 ;;
0d4a78eb 1471bfin*-elf*)
207bf79d 1472 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
6bad46f7
JZ
1473 tmake_file=bfin/t-bfin-elf
1474 use_collect2=no
1475 ;;
1f4174d4 1476bfin*-uclinux*)
8e38461c 1477 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
6bad46f7 1478 tmake_file=bfin/t-bfin-uclinux
6bad46f7
JZ
1479 use_collect2=no
1480 ;;
344189f9 1481bfin*-linux-uclibc*)
8e38461c 1482 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h"
e08cf345 1483 tmake_file="${tmake_file} bfin/t-bfin-linux"
6bad46f7
JZ
1484 use_collect2=no
1485 ;;
152167d5 1486bfin*-rtems*)
1ddc8057 1487 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
aefe4056 1488 tmake_file="${tmake_file} bfin/t-rtems"
6bad46f7 1489 ;;
0d4a78eb 1490bfin*-*)
207bf79d 1491 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
6bad46f7 1492 use_collect2=no
207bf79d 1493 use_gcc_stdint=wrap
6bad46f7 1494 ;;
91dfef96 1495bpf-*-*)
c9d44022 1496 tm_file="elfos.h ${tm_file}"
91dfef96
JM
1497 tmake_file="${tmake_file} bpf/t-bpf"
1498 use_collect2=no
1499 extra_headers="bpf-helpers.h"
1500 use_gcc_stdint=provide
1501 ;;
b25364a0 1502cr16-*-elf)
db48a9e3 1503 tm_file="elfos.h ${tm_file} newlib-stdint.h"
b25364a0
S
1504 tmake_file="${tmake_file} cr16/t-cr16 "
1505 use_collect2=no
1506 ;;
0b85d816 1507cris-*-elf | cris-*-none)
207bf79d 1508 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
0b85d816
HPN
1509 tmake_file="cris/t-cris cris/t-elfmulti"
1510 gas=yes
2a186d97 1511 extra_options="${extra_options} cris/elf.opt"
207bf79d 1512 use_gcc_stdint=wrap
0b85d816 1513 ;;
56856b58
J
1514csky-*-*)
1515 if test x${with_endian} != x; then
1516 case ${with_endian} in
1517 big|little) ;;
1518 *)
1519 echo "with_endian=${with_endian} not supported."
1520 exit 1
1521 ;;
1522 esac
1523 fi
1524 if test x${with_float} != x; then
1525 case ${with_float} in
1526 soft | hard) ;;
1527 *) echo
1528 "Unknown floating point type used in --with-float=$with_float"
1529 exit 1
1530 ;;
1531 esac
1532 fi
1533 tm_file="csky/csky.h"
1534 md_file="csky/csky.md"
1535 out_file="csky/csky.c"
1536 tm_p_file="${tm_p_file} csky/csky-protos.h"
1537 extra_options="${extra_options} csky/csky_tables.opt"
1538
1539 if test x${enable_tpf_debug} = xyes; then
1540 tm_defines="${tm_defines} ENABLE_TPF_DEBUG"
1541 fi
1542
1543 case ${target} in
1544 csky-*-elf*)
1545 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} csky/csky-elf.h"
1546 tmake_file="csky/t-csky csky/t-csky-elf"
1547 default_use_cxa_atexit=no
f8ede887 1548 use_gcc_stdint=wrap
56856b58
J
1549 ;;
1550 csky-*-linux*)
1551 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} csky/csky-linux-elf.h"
1552 tmake_file="${tmake_file} csky/t-csky csky/t-csky-linux"
1553
1554 if test "x${enable_multilib}" = xyes ; then
1555 tm_file="$tm_file ./sysroot-suffix.h"
1556 tmake_file="${tmake_file} csky/t-sysroot-suffix"
1557 fi
1558
1559 case ${target} in
1560 csky-*-linux-gnu*)
1561 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
be3399c5
XQ
1562 # Force .init_array support. The configure script cannot always
1563 # automatically detect that GAS supports it, yet we require it.
1564 gcc_cv_initfini_array=yes
56856b58
J
1565 ;;
1566 csky-*-linux-uclibc*)
1567 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
1568 default_use_cxa_atexit=no
1569 ;;
1570 *)
1571 echo "Unknown target $target"
1572 exit 1
1573 ;;
1574 esac
1575 ;;
1576 *)
1577 echo "Unknown target $target"
1578 exit 1
1579 ;;
1580 esac
1581 ;;
64b371b1
SH
1582epiphany-*-elf | epiphany-*-rtems*)
1583 tm_file="${tm_file} dbxelf.h elfos.h"
1584 tmake_file="${tmake_file} epiphany/t-epiphany"
1585 case ${target} in
1586 epiphany-*-rtems*)
1587 tm_file="${tm_file} rtems.h epiphany/rtems.h newlib-stdint.h"
1588 ;;
1589 *)
1590 tm_file="${tm_file} newlib-stdint.h"
1591 ;;
1592 esac
feeeff5c 1593 extra_options="${extra_options} fused-madd.opt"
64b371b1 1594 extra_objs="${extra_objs} mode-switch-use.o resolve-sw-modes.o"
feeeff5c
JR
1595 tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1596 extra_headers="epiphany_intrinsics.h"
1597 ;;
61ed06c3 1598fr30-*-elf)
35766c1d 1599 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
61ed06c3 1600 ;;
36a05131 1601frv-*-elf)
a3724010 1602 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
36a05131
BS
1603 tmake_file=frv/t-frv
1604 ;;
34208acf 1605frv-*-*linux*)
a3724010 1606 tm_file="dbxelf.h elfos.h ${tm_file} \
8e38461c 1607 gnu-user.h linux.h glibc-stdint.h frv/linux.h"
65d151a7 1608 tmake_file="${tmake_file} frv/t-frv frv/t-linux"
34208acf 1609 ;;
fef939d6
JB
1610ft32-*-elf)
1611 gas=yes
1612 gnu_ld=yes
1613 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1614 tmake_file="${tmake_file} ft32/t-ft32"
1615 ;;
7431c1a1
AS
1616amdgcn-*-amdhsa)
1617 tm_file="elfos.h gcn/gcn-hsa.h gcn/gcn.h newlib-stdint.h"
1618 tmake_file="gcn/t-gcn-hsa"
1619 native_system_header_dir=/include
1620 extra_modes=gcn/gcn-modes.def
1621 extra_objs="${extra_objs} gcn-tree.o"
1622 extra_gcc_objs="driver-gcn.o"
1623 case "$host" in
1624 x86_64*-*-linux-gnu )
1625 if test "$ac_cv_search_dlopen" != no; then
1626 extra_programs="${extra_programs} gcn-run\$(exeext)"
1627 fi
1628 ;;
1629 esac
1630 if test x$enable_as_accelerator = xyes; then
1631 extra_programs="${extra_programs} mkoffload\$(exeext)"
1632 tm_file="${tm_file} gcn/offload.h"
1633 fi
7039cebf
KCY
1634 # Force .init_array support.
1635 gcc_cv_initfini_array=yes
76d46331 1636 thread_file=gcn
7431c1a1 1637 ;;
cceb575c
AG
1638moxie-*-elf)
1639 gas=yes
1640 gnu_ld=yes
804a304d 1641 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
aca0b0b3 1642 tmake_file="${tmake_file} moxie/t-moxie"
cceb575c 1643 ;;
23865616
AG
1644moxie-*-uclinux*)
1645 gas=yes
1646 gnu_ld=yes
8e38461c 1647 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
aca0b0b3 1648 tmake_file="${tmake_file} moxie/t-moxie"
23865616 1649 ;;
1242723c 1650moxie-*-rtems*)
aefe4056 1651 tmake_file="${tmake_file} moxie/t-moxie"
1242723c
AG
1652 tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1653 ;;
17522262
AG
1654moxie-*-moxiebox*)
1655 gas=yes
1656 gnu_ld=yes
1657 tm_file="${tm_file} dbxelf.h elfos.h moxie/moxiebox.h newlib-stdint.h"
1658 tmake_file="${tmake_file} moxie/t-moxiebox"
1659 ;;
9f5b774b 1660h8300-*-elf*)
5f73c6cc 1661 tmake_file="h8300/t-h8300"
207bf79d 1662 tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
9f5b774b 1663 ;;
2f6bd6eb
YS
1664h8300-*-linux*)
1665 tmake_file="${tmake_file} h8300/t-h8300 h8300/t-linux"
1666 tm_file="h8300/h8300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h h8300/linux.h"
1667 ;;
cd985f66 1668hppa*64*-*-linux*)
d711cf67 1669 target_cpu_default="MASK_PA_11|MASK_PA_20"
8e38461c 1670 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
207bf79d
JM
1671 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1672 pa/pa64-linux.h"
40b1bb9f
JDA
1673 tmake_file="${tmake_file} pa/t-pa pa/t-linux"
1674 d_target_objs="${d_target_objs} pa-d.o"
c21a2372
AM
1675 gas=yes gnu_ld=yes
1676 ;;
cd985f66 1677hppa*-*-linux*)
dbc4d77c 1678 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
8e38461c 1679 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
c21a2372 1680 pa/pa32-regs.h pa/pa32-linux.h"
b8559e81
JDA
1681 tmake_file="${tmake_file} pa/t-pa pa/t-linux"
1682 d_target_objs="${d_target_objs} pa-d.o"
61ed06c3 1683 ;;
17f293b0
MK
1684hppa*-*-openbsd*)
1685 target_cpu_default="MASK_PA_11"
1686 tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1687 pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
17f293b0 1688 extra_options="${extra_options} openbsd.opt"
40b1bb9f
JDA
1689 tmake_file="pa/t-pa"
1690 d_target_objs="${d_target_objs} pa-d.o"
17f293b0
MK
1691 gas=yes
1692 gnu_ld=yes
1693 ;;
428642b1
MT
1694hppa*-*-netbsd*)
1695 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1696 tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} \
1697 pa/pa-netbsd.h pa/pa32-regs.h pa/pa32-netbsd.h"
1698 tmake_file="${tmake_file}"
1699 tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
1700 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1701 ;;
d711cf67
JDA
1702hppa[12]*-*-hpux10*)
1703 case ${target} in
1704 hppa1.1-*-* | hppa2*-*-*)
1705 target_cpu_default="MASK_PA_11"
1706 ;;
1707 esac
1708 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1709 pa/pa-hpux.h pa/pa-hpux10.h"
b24d1acf 1710 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
d711cf67
JDA
1711 case ${target} in
1712 *-*-hpux10.[1-9]*)
1713 tm_file="${tm_file} pa/pa-hpux1010.h"
66617831 1714 extra_options="${extra_options} pa/pa-hpux1010.opt"
d711cf67 1715 ;;
61ed06c3 1716 esac
be3e4ef6
JDA
1717 use_gcc_stdint=provide
1718 tm_file="${tm_file} hpux-stdint.h"
40b1bb9f
JDA
1719 tmake_file="pa/t-pa t-slibgcc"
1720 d_target_objs="${d_target_objs} pa-d.o"
615be2cf
NN
1721 case ${enable_threads} in
1722 "")
1723 if test x$have_pthread_h = xyes ; then
1724 tmake_file="${tmake_file} pa/t-dce-thr"
1725 fi
1726 ;;
1727 yes | dce)
1728 tmake_file="${tmake_file} pa/t-dce-thr"
1729 ;;
61ed06c3 1730 esac
61ed06c3 1731 use_collect2=yes
543b6009 1732 gas=yes
a65264ae 1733 if test "x$with_dwarf2" != x; then
5cdb5d59 1734 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
a65264ae
JDA
1735 dwarf2=no
1736 fi
61ed06c3
HPN
1737 ;;
1738hppa*64*-*-hpux11*)
d711cf67 1739 target_cpu_default="MASK_PA_11|MASK_PA_20"
7b79fe71
JDA
1740 if test x$gnu_ld = xyes
1741 then
d711cf67 1742 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
7b79fe71 1743 fi
543b6009
SE
1744 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1745 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1746 pa/pa-hpux11.h"
d711cf67 1747 case ${target} in
fc4538e4 1748 *-*-hpux11.[12]*)
d711cf67 1749 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
66617831 1750 extra_options="${extra_options} pa/pa-hpux1111.opt"
d711cf67 1751 ;;
fc4538e4
SE
1752 *-*-hpux11.[3-9]*)
1753 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1754 extra_options="${extra_options} pa/pa-hpux1131.opt"
1755 ;;
d711cf67
JDA
1756 *)
1757 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1758 ;;
1759 esac
66617831 1760 extra_options="${extra_options} pa/pa-hpux.opt \
e543b94c 1761 pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
40b1bb9f
JDA
1762 tmake_file="pa/t-pa t-slibgcc"
1763 d_target_objs="${d_target_objs} pa-d.o"
7e2055ec 1764 case x${enable_threads} in
27ca3a61 1765 x | xyes | xposix )
f7288899 1766 thread_file=posix
7e2055ec
ZW
1767 ;;
1768 esac
543b6009 1769 gas=yes
9a17c91d
SE
1770 case ${target} in
1771 *-*-hpux11.[01]*)
1772 use_gcc_stdint=provide
1773 tm_file="${tm_file} hpux-stdint.h"
1774 ;;
1775 *-*-hpux11.[23]*)
1776 use_gcc_stdint=wrap
1777 tm_file="${tm_file} hpux-stdint.h"
1778 ;;
1779 esac
61ed06c3 1780 ;;
d711cf67
JDA
1781hppa[12]*-*-hpux11*)
1782 case ${target} in
1783 hppa1.1-*-* | hppa2*-*-*)
1784 target_cpu_default="MASK_PA_11"
1785 ;;
1786 esac
1787 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
66617831 1788 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
e543b94c
JM
1789 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1790 hpux11.opt"
d711cf67 1791 case ${target} in
fc4538e4 1792 *-*-hpux11.[12]*)
d711cf67 1793 tm_file="${tm_file} pa/pa-hpux1111.h"
66617831 1794 extra_options="${extra_options} pa/pa-hpux1111.opt"
7e2055ec 1795 ;;
fc4538e4
SE
1796 *-*-hpux11.[3-9]*)
1797 tm_file="${tm_file} pa/pa-hpux1131.h"
1798 extra_options="${extra_options} pa/pa-hpux1131.opt"
1799 ;;
7e2055ec 1800 esac
40b1bb9f
JDA
1801 tmake_file="pa/t-pa t-slibgcc"
1802 d_target_objs="${d_target_objs} pa-d.o"
7e2055ec 1803 case x${enable_threads} in
27ca3a61 1804 x | xyes | xposix )
f7288899 1805 thread_file=posix
7e2055ec
ZW
1806 ;;
1807 esac
61ed06c3 1808 use_collect2=yes
543b6009 1809 gas=yes
9a17c91d
SE
1810 case ${target} in
1811 *-*-hpux11.[01]*)
1812 use_gcc_stdint=provide
1813 tm_file="${tm_file} hpux-stdint.h"
1814 ;;
1815 *-*-hpux11.[23]*)
1816 use_gcc_stdint=wrap
1817 tm_file="${tm_file} hpux-stdint.h"
1818 ;;
1819 esac
a65264ae 1820 if test "x$with_dwarf2" != x; then
5cdb5d59 1821 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
a65264ae
JDA
1822 dwarf2=no
1823 fi
61ed06c3 1824 ;;
c2ff7104
IS
1825i[34567]86-*-darwin1[89]*)
1826 echo "Error: 32bit target is not supported after Darwin17" 1>&2
1827 ;;
b069de3b 1828i[34567]86-*-darwin*)
c6b9174f 1829 need_64bit_isa=yes
c0aefbbe
IS
1830 # Baseline choice for a machine that allows m64 support.
1831 with_cpu=${with_cpu:-core2}
c2ff7104
IS
1832 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch t-slibgcc"
1833 tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
1834 ;;
1835x86_64-*-darwin1[89]* | x86_64-*-darwin2[01]*)
1836 # Only 64b from now
1837 with_cpu=${with_cpu:-core2}
b040f2be 1838 tmake_file="${tmake_file} t-slibgcc"
b069de3b 1839 ;;
9519e677 1840x86_64-*-darwin*)
c0aefbbe 1841 with_cpu=${with_cpu:-core2}
c2ff7104
IS
1842 tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
1843 tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
9519e677 1844 ;;
d9063947
L
1845i[34567]86-*-elfiamcu)
1846 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
1847 ;;
61ed06c3 1848i[34567]86-*-elf*)
207bf79d 1849 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
a10dc289
HK
1850 ;;
1851x86_64-*-elf*)
207bf79d 1852 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
61ed06c3 1853 ;;
d6944908 1854x86_64-*-rtems*)
6fa08cbe 1855 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtemself.h rtems.h"
d6944908 1856 ;;
5a579c3b
LE
1857i[34567]86-*-rdos*)
1858 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
1859 ;;
1860x86_64-*-rdos*)
1861 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rdos.h i386/rdos64.h"
1862 tmake_file="i386/t-i386elf t-svr4"
1863 ;;
dbed5a9b
JM
1864i[34567]86-*-dragonfly*)
1865 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
1866 tmake_file="${tmake_file} i386/t-crtstuff"
1867 ;;
1868x86_64-*-dragonfly*)
1869 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/x86-64.h i386/dragonfly.h"
1870 tmake_file="${tmake_file} i386/t-crtstuff"
1871 ;;
61ed06c3 1872i[34567]86-*-freebsd*)
39ed301b 1873 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
e564e618
DB
1874 ;;
1875x86_64-*-freebsd*)
39ed301b 1876 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
61ed06c3 1877 ;;
6ea0279f 1878i[34567]86-*-netbsdelf*)
dfe2677b 1879 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
a4714d14 1880 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
6ea0279f 1881 ;;
7c884404 1882x86_64-*-netbsd*)
dfe2677b 1883 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h"
a4714d14 1884 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
7c884404 1885 ;;
378b66d4 1886i[34567]86-*-openbsd*)
75a3bd9d 1887 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
aa58f943 1888 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
5369e2d4 1889 extra_options="${extra_options} openbsd.opt"
378b66d4
ME
1890 gas=yes
1891 gnu_ld=yes
378b66d4 1892 ;;
613061fd
MK
1893x86_64-*-openbsd*)
1894 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1895 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1896 extra_options="${extra_options} openbsd.opt"
1897 gas=yes
1898 gnu_ld=yes
1899 ;;
8466af06 1900i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
cfafe973 1901 # Intel 80386's running GNU/*
61ed06c3 1902 # with ELF format using glibc 2
6c0170ea 1903 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
cfafe973 1904 case ${target} in
0f45f0f5 1905 i[34567]86-*-linux*)
5fa747a7
MK
1906 tm_file="${tm_file} linux.h linux-android.h"
1907 extra_options="${extra_options} linux-android.opt"
0f45f0f5 1908 if test x$enable_targets = xall; then
6acc8a3c 1909 tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
0f45f0f5 1910 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
ff473280 1911 tmake_file="${tmake_file} i386/t-linux64"
f0ea7581
L
1912 x86_multilibs="${with_multilib_list}"
1913 if test "$x86_multilibs" = "default"; then
1914 x86_multilibs="m64,m32"
1915 fi
1916 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1917 for x86_multilib in ${x86_multilibs}; do
1918 case ${x86_multilib} in
1919 m32 | m64 | mx32)
1920 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1921 ;;
1922 *)
1923 echo "--with-multilib-list=${x86_with_multilib} not supported."
1924 exit 1
1925 esac
1926 done
1927 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
c6b9174f 1928 need_64bit_isa=yes
646bdeab 1929 if test x$with_cpu = x; then
8981c15b
JM
1930 if test x$with_cpu_64 = x; then
1931 with_cpu_64=generic
1932 fi
646bdeab
L
1933 else
1934 case " $x86_cpus $x86_archs $x86_64_archs " in
1935 *" $with_cpu "*)
1936 ;;
1937 *)
1938 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1939 echo "$x86_cpus $x86_archs $x86_64_archs " 1>&2
1940 exit 1
1941 ;;
1942 esac
1943 fi
0f45f0f5 1944 else
6acc8a3c 1945 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
0f45f0f5
JM
1946 fi
1947 ;;
63708bf5 1948 i[34567]86-*-kfreebsd*-gnu)
70a69509 1949 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
63708bf5
UB
1950 ;;
1951 i[34567]86-*-kopensolaris*-gnu)
70a69509 1952 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
63708bf5
UB
1953 ;;
1954 i[34567]86-*-gnu*)
70a69509 1955 tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
63708bf5 1956 ;;
cfafe973 1957 esac
61ed06c3 1958 ;;
8466af06 1959x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
6c0170ea 1960 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
70a69509 1961 i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
44379973 1962 case ${target} in
f6c5fbfd 1963 x86_64-*-linux*)
5fa747a7
MK
1964 tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
1965 extra_options="${extra_options} linux-android.opt"
63708bf5
UB
1966 ;;
1967 x86_64-*-kfreebsd*-gnu)
1968 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1969 ;;
44379973 1970 esac
5f73c6cc 1971 tmake_file="${tmake_file} i386/t-linux64"
f0ea7581
L
1972 x86_multilibs="${with_multilib_list}"
1973 if test "$x86_multilibs" = "default"; then
9287b168
L
1974 case ${with_abi} in
1975 x32 | mx32)
1976 x86_multilibs="mx32"
1977 ;;
1978 *)
1979 x86_multilibs="m64,m32"
1980 ;;
1981 esac
f0ea7581
L
1982 fi
1983 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1984 for x86_multilib in ${x86_multilibs}; do
1985 case ${x86_multilib} in
1986 m32 | m64 | mx32)
1987 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1988 ;;
1989 *)
1990 echo "--with-multilib-list=${x86_with_multilib} not supported."
1991 exit 1
1992 esac
1993 done
1994 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
14f73b5a 1995 ;;
61ed06c3
HPN
1996i[34567]86-pc-msdosdjgpp*)
1997 xm_file=i386/xm-djgpp.h
27f98305 1998 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
08b2bad2 1999 native_system_header_dir=/dev/env/DJDIR/include
6ac49599 2000 extra_options="${extra_options} i386/djgpp.opt"
61ed06c3
HPN
2001 gnu_ld=yes
2002 gas=yes
3e3877f8 2003 use_gcc_stdint=wrap
61ed06c3 2004 ;;
61ed06c3 2005i[34567]86-*-lynxos*)
4f587cb0
AN
2006 xm_defines=POSIX
2007 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
5f73c6cc 2008 tmake_file="${tmake_file} t-lynx"
6ac49599 2009 extra_options="${extra_options} lynx.opt"
4f587cb0
AN
2010 thread_file=lynx
2011 gnu_ld=yes
2012 gas=yes
61ed06c3 2013 ;;
f2feed2c 2014i[34567]86-*-nto-qnx*)
7f260570 2015 tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
fc523387 2016 extra_options="${extra_options} i386/nto.opt"
f2feed2c
GP
2017 gnu_ld=yes
2018 gas=yes
2019 ;;
c7bdf0a6 2020i[34567]86-*-rtems*)
207bf79d 2021 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h newlib-stdint.h"
aefe4056 2022 tmake_file="${tmake_file} i386/t-rtems"
61ed06c3 2023 ;;
ccd1242e 2024i[34567]86-*-solaris2* | x86_64-*-solaris2*)
9d151aff
RO
2025 # Set default arch_32 to pentium4, tune_32 to generic like the other
2026 # i386 targets, although config.guess defaults to i386-pc-solaris2*.
d9f069ab 2027 with_arch_32=${with_arch_32:-pentium4}
9af27220 2028 with_tune_32=${with_tune_32:-generic}
2cf03b11 2029 tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file_head} i386/x86-64.h ${sol2_tm_file_tail}"
d9f069ab 2030 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
2cf03b11 2031 tmake_file="$tmake_file i386/t-sol2"
d9f069ab
RO
2032 need_64bit_isa=yes
2033 if test x$with_cpu = x; then
2034 if test x$with_cpu_64 = x; then
2035 with_cpu_64=generic
646bdeab 2036 fi
d9f069ab
RO
2037 else
2038 case " $x86_cpus $x86_archs $x86_64_archs " in
2039 *" $with_cpu "*)
2040 ;;
2041 *)
2042 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
2043 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
2044 exit 1
2045 ;;
2046 esac
2047 fi
61ed06c3 2048 ;;
50567938
JL
2049i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae|i[4567]86-wrs-vxworks7|x86_64-wrs-vxworks7)
2050 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h"
2051 case ${target} in
2052 x86_64-*)
2053 need_64bit_isa=yes
2054 tm_file="${tm_file} i386/x86-64.h"
2055 ;;
2056 esac
2057 tm_file="${tm_file} vx-common.h"
d442d7d9
PE
2058 case ${target} in
2059 *-vxworksae*)
4ce351de 2060 tm_file="${tm_file} vxworksae.h i386/vxworks.h i386/vxworksae.h"
d442d7d9
PE
2061 tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
2062 ;;
2063 *)
4ce351de 2064 tm_file="${tm_file} vxworks.h i386/vxworks.h"
d442d7d9
PE
2065 tmake_file="${tmake_file} i386/t-vxworks"
2066 ;;
2067 esac
55047c9d 2068 ;;
ebb9f8b0 2069i[34567]86-*-cygwin*)
bb2aaded 2070 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-stdint.h"
4dc0535b 2071 xm_file=i386/xm-cygwin.h
f9989b51 2072 tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
7c0b7150 2073 target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.c"
301f4402 2074 extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
41f59cda 2075 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
3edeb30d
DK
2076 c_target_objs="${c_target_objs} msformat-c.o"
2077 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
61ed06c3 2078 if test x$enable_threads = xyes; then
70e5e841 2079 thread_file='posix'
61ed06c3 2080 fi
301f4402 2081 default_use_cxa_atexit=yes
bb2aaded 2082 use_gcc_stdint=wrap
61ed06c3 2083 ;;
b802ae5c
KT
2084x86_64-*-cygwin*)
2085 need_64bit_isa=yes
2086 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-w64.h i386/cygwin-stdint.h"
2087 xm_file=i386/xm-cygwin.h
2088 tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
7c0b7150 2089 target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.c"
301f4402 2090 extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
41f59cda 2091 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
b802ae5c
KT
2092 c_target_objs="${c_target_objs} msformat-c.o"
2093 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
2094 if test x$enable_threads = xyes; then
2095 thread_file='posix'
2096 fi
301f4402 2097 default_use_cxa_atexit=yes
b802ae5c
KT
2098 use_gcc_stdint=wrap
2099 tm_defines="${tm_defines} TARGET_CYGWIN64=1"
2100 ;;
e8930cc1 2101i[34567]86-*-mingw* | x86_64-*-mingw*)
c04bdac0 2102 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
4dc0535b 2103 xm_file=i386/xm-mingw32.h
88b0e79e
JC
2104 c_target_objs="${c_target_objs} winnt-c.o"
2105 cxx_target_objs="${cxx_target_objs} winnt-c.o"
2106 target_has_targetcm="yes"
933608b7
KT
2107 case ${target} in
2108 x86_64-*-* | *-w64-*)
c6b9174f 2109 need_64bit_isa=yes
933608b7
KT
2110 ;;
2111 *)
2112 ;;
2113 esac
c04bdac0
KT
2114 if test x$enable_threads = xposix ; then
2115 tm_file="${tm_file} i386/mingw-pthread.h"
2116 fi
2117 tm_file="${tm_file} i386/mingw32.h"
35091630
KT
2118 # This makes the logic if mingw's or the w64 feature set has to be used
2119 case ${target} in
2120 *-w64-*)
9b91e436
KT
2121 user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
2122 user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
35091630 2123 tm_file="${tm_file} i386/mingw-w64.h"
933608b7
KT
2124 if test x$enable_targets = xall; then
2125 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
646bdeab 2126 if test x$with_cpu = x; then
933608b7
KT
2127 if test x$with_cpu_64 = x; then
2128 with_cpu_64=generic
2129 fi
646bdeab
L
2130 else
2131 case " $x86_cpus $x86_archs $x86_64_archs " in
2132 *" $with_cpu "*)
2133 ;;
2134 *)
2135 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
2136 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
2137 exit 1
2138 ;;
2139 esac
2140 fi
933608b7 2141 fi
35091630
KT
2142 ;;
2143 *)
35091630
KT
2144 ;;
2145 esac
2146 tm_file="${tm_file} i386/mingw-stdint.h"
88b0e79e 2147 tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
8370a62a 2148 case ${target} in
917ed773 2149 x86_64-w64-*)
8370a62a
KT
2150 tmake_file="${tmake_file} i386/t-mingw-w64"
2151 ;;
917ed773
KT
2152 i[34567]86-w64-*)
2153 tmake_file="${tmake_file} i386/t-mingw-w32"
2154 ;;
8370a62a 2155 esac
08b2bad2 2156 native_system_header_dir=/mingw/include
7c0b7150 2157 target_gtfiles="$target_gtfiles \$(srcdir)/config/i386/winnt.c"
94564826 2158 extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
35091630
KT
2159 case ${target} in
2160 *-w64-*)
2161 extra_options="${extra_options} i386/mingw-w64.opt"
2162 ;;
2163 *)
2164 ;;
2165 esac
41f59cda 2166 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
ab442df7
MM
2167 c_target_objs="${c_target_objs} msformat-c.o"
2168 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
b993039f
EB
2169 gas=yes
2170 gnu_ld=yes
97388150 2171 default_use_cxa_atexit=yes
7d253f6e 2172 use_gcc_stdint=wrap
50c0d3fd 2173 case ${enable_threads} in
f9989b51
RO
2174 "" | yes | win32)
2175 thread_file='win32'
c04bdac0
KT
2176 ;;
2177 posix)
2178 thread_file='posix'
c04bdac0 2179 ;;
50c0d3fd 2180 esac
e8930cc1
KT
2181 case ${target} in
2182 *mingw32crt*)
2183 tm_file="${tm_file} i386/crtdll.h"
2184 ;;
2185 *mingw32msv* | *mingw*)
09eaf5a5 2186 ;;
61ed06c3
HPN
2187 esac
2188 ;;
491b3c5f
JC
2189x86_64-*-fuchsia*)
2190 tmake_file="${tmake_file} i386/t-x86_64-elf"
2191 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h fuchsia.h"
2192 ;;
61ed06c3 2193ia64*-*-elf*)
207bf79d 2194 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
61ed06c3
HPN
2195 tmake_file="ia64/t-ia64"
2196 target_cpu_default="0"
2197 if test x$gas = xyes
2198 then
2199 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
2200 fi
2201 if test x$gnu_ld = xyes
2202 then
2203 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
2204 fi
61ed06c3 2205 ;;
243a7070 2206ia64*-*-freebsd*)
fee42cc1 2207 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
243a7070
DB
2208 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
2209 tmake_file="${tmake_file} ia64/t-ia64"
243a7070 2210 ;;
61ed06c3 2211ia64*-*-linux*)
8e38461c 2212 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
a9011c94 2213 tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
61ed06c3 2214 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
61ed06c3 2215 ;;
7e5b9908 2216ia64*-*-hpux*)
2337b6b7 2217 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
b040f2be 2218 tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
7e5b9908 2219 target_cpu_default="MASK_GNU_AS"
7e2055ec 2220 case x$enable_threads in
79e8b6c0 2221 x | xyes | xposix )
7e2055ec
ZW
2222 thread_file=posix
2223 ;;
2224 esac
cad61762 2225 use_collect2=no
34c1864f
SE
2226 c_target_objs="ia64-c.o"
2227 cxx_target_objs="ia64-c.o"
e543b94c 2228 extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
9a17c91d
SE
2229 use_gcc_stdint=wrap
2230 tm_file="${tm_file} hpux-stdint.h"
fc4538e4
SE
2231 case ${target} in
2232 *-*-hpux11.3*)
2233 tm_file="${tm_file} ia64/hpux-unix2003.h"
2234 ;;
2235 esac
7e5b9908 2236 ;;
a9a25daa 2237ia64-hp-*vms*)
d8aba32a
TG
2238 tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
2239 tmake_file="${tmake_file} ia64/t-ia64"
a9a25daa
DR
2240 target_cpu_default="0"
2241 if test x$gas = xyes
2242 then
2243 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
2244 fi
18a24fed 2245 extra_options="${extra_options} ia64/vms.opt"
a9a25daa 2246 ;;
6b3d1e47 2247iq2000*-*-elf*)
248a9e94 2248 tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
6b3d1e47 2249 out_file=iq2000/iq2000.c
6b3d1e47
SC
2250 md_file=iq2000/iq2000.md
2251 ;;
aa4945c1 2252lm32-*-elf*)
7c9bb341 2253 tm_file="dbxelf.h elfos.h ${tm_file} newlib-stdint.h"
aca0b0b3 2254 tmake_file="${tmake_file} lm32/t-lm32"
aa4945c1 2255 ;;
d7856dc7 2256lm32-*-rtems*)
1ddc8057 2257 tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
aca0b0b3 2258 tmake_file="${tmake_file} lm32/t-lm32"
4ce7e3a9 2259 tmake_file="${tmake_file} lm32/t-rtems"
d7856dc7 2260 ;;
aa4945c1 2261lm32-*-uclinux*)
8e38461c 2262 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
aca0b0b3 2263 tmake_file="${tmake_file} lm32/t-lm32"
aa4945c1 2264 ;;
61ed06c3 2265m32r-*-elf*)
cfe5b8ea 2266 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
37ec8b7a 2267 ;;
ad126521 2268m32rle-*-elf*)
cfe5b8ea 2269 tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
ad126521
KI
2270 ;;
2271m32r-*-linux*)
8e38461c 2272 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
133b1a8e 2273 tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
ad126521 2274 gnu_ld=yes
ad126521
KI
2275 if test x$enable_threads = xyes; then
2276 thread_file='posix'
2277 fi
2278 ;;
2279m32rle-*-linux*)
8e38461c 2280 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
133b1a8e 2281 tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
ad126521 2282 gnu_ld=yes
ad126521
KI
2283 if test x$enable_threads = xyes; then
2284 thread_file='posix'
2285 fi
2286 ;;
cd985f66 2287m68k-*-elf* | fido-*-elf*)
7d33c31d
KH
2288 case ${target} in
2289 fido-*-elf*)
2290 # Check that $with_cpu makes sense.
2291 case $with_cpu in
2292 "" | "fidoa")
2293 ;;
2294 *)
2295 echo "Cannot accept --with-cpu=$with_cpu"
2296 exit 1
2297 ;;
2298 esac
2299 with_cpu=fidoa
2300 ;;
2301 *)
2302 default_m68k_cpu=68020
2303 default_cf_cpu=5206
2304 ;;
2305 esac
207bf79d 2306 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h newlib-stdint.h m68k/m68kemb.h m68k/m68020-elf.h"
cf909b0d 2307 tm_defines="${tm_defines} MOTOROLA=1"
7d33c31d
KH
2308 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
2309 # Add multilibs for targets other than fido.
2310 case ${target} in
2311 fido-*-elf*)
2312 ;;
2313 *)
2314 tmake_file="$tmake_file m68k/t-mlibs"
2315 ;;
2316 esac
61ed06c3 2317 ;;
cd985f66 2318m68k*-*-netbsdelf*)
59fbf3cb 2319 default_m68k_cpu=68020
10e96df4 2320 default_cf_cpu=5475
dfe2677b 2321 tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h"
a4714d14 2322 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
dfe2677b 2323 tm_defines="${tm_defines} MOTOROLA=1 CHAR_FAST8=1 SHORT_FAST16=1"
2fd95d71 2324 ;;
7ea98c5a 2325m68k*-*-openbsd*)
59fbf3cb 2326 default_m68k_cpu=68020
10e96df4 2327 default_cf_cpu=5475
7ea98c5a 2328 # needed to unconfuse gdb
59fbf3cb 2329 tm_defines="${tm_defines} OBSD_OLD_GAS"
aa58f943 2330 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
5369e2d4 2331 extra_options="${extra_options} openbsd.opt"
5f73c6cc 2332 tmake_file="t-openbsd m68k/t-openbsd"
7ea98c5a
GN
2333 # we need collect2 until our bug is fixed...
2334 use_collect2=yes
2335 ;;
4529dbf1
RS
2336m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
2337 # with uClibc, using the new GNU/Linux-style
2338 # ABI.
59fbf3cb 2339 default_m68k_cpu=68020
10e96df4 2340 default_cf_cpu=5206
8e38461c 2341 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
4254bbfe 2342 extra_options="${extra_options} m68k/uclinux.opt"
b5a54c03 2343 tm_defines="${tm_defines} MOTOROLA=1"
10e96df4 2344 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
ba591f5a 2345 ;;
5f73c6cc 2346m68k-*-linux*) # Motorola m68k's running GNU/Linux
61ed06c3
HPN
2347 # with ELF format using glibc 2
2348 # aka the GNU/Linux C library 6.
59fbf3cb 2349 default_m68k_cpu=68020
10e96df4 2350 default_cf_cpu=5475
368b55f6 2351 with_arch=${with_arch:-m68k}
8e38461c 2352 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
4af06170 2353 extra_options="${extra_options} m68k/ieee.opt"
cf909b0d 2354 tm_defines="${tm_defines} MOTOROLA=1"
368b55f6 2355 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
61ed06c3 2356 ;;
c7bdf0a6 2357m68k-*-rtems*)
59fbf3cb 2358 default_m68k_cpu=68020
10e96df4 2359 default_cf_cpu=5206
aefe4056 2360 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
207bf79d 2361 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h newlib-stdint.h"
cf909b0d 2362 tm_defines="${tm_defines} MOTOROLA=1"
61ed06c3 2363 ;;
61ed06c3 2364mcore-*-elf)
ed38428f 2365 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
61ed06c3 2366 tmake_file=mcore/t-mcore
a929bc28 2367 inhibit_libc=true
61ed06c3 2368 ;;
80920132 2369microblaze*-linux*)
76ef61fb
EI
2370 case $target in
2371 microblazeel-*)
2372 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2373 ;;
2374 microblaze-*)
2375 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2376 ;;
2377 esac
8e38461c 2378 tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
fbf0cf90 2379 tm_file="${tm_file} glibc-stdint.h"
80920132
ME
2380 c_target_objs="${c_target_objs} microblaze-c.o"
2381 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
fbf0cf90 2382 tmake_file="${tmake_file} microblaze/t-microblaze"
76ef61fb 2383 tmake_file="${tmake_file} microblaze/t-microblaze-linux"
80920132 2384 ;;
479f4358 2385microblaze*-*-rtems*)
c6adc8b3
RC
2386 case $target in
2387 microblazeel-*)
2388 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2389 ;;
2390 microblaze-*)
2391 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2392 ;;
2393 esac
479f4358
RC
2394 tm_file="${tm_file} dbxelf.h"
2395 tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
2396 c_target_objs="${c_target_objs} microblaze-c.o"
2397 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2398 tmake_file="${tmake_file} microblaze/t-microblaze"
aefe4056 2399 tmake_file="${tmake_file} microblaze/t-rtems"
479f4358 2400 ;;
6f14eef2 2401microblaze*-*-elf)
76ef61fb
EI
2402 case $target in
2403 microblazeel-*)
2404 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2405 ;;
2406 microblaze-*)
2407 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2408 ;;
2409 esac
6f14eef2 2410 tm_file="${tm_file} dbxelf.h newlib-stdint.h"
80920132
ME
2411 c_target_objs="${c_target_objs} microblaze-c.o"
2412 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
6f14eef2 2413 tmake_file="${tmake_file} microblaze/t-microblaze"
80920132 2414 ;;
09cae750
PD
2415riscv*-*-linux*)
2416 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h"
2417 case "x${enable_multilib}" in
2418 xno) ;;
2419 xyes) tmake_file="${tmake_file} riscv/t-linux-multilib" ;;
2420 *) echo "Unknown value for enable_multilib"; exit 1
2421 esac
2422 tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
2423 gnu_ld=yes
2424 gas=yes
2425 # Force .init_array support. The configure script cannot always
2426 # automatically detect that GAS supports it, yet we require it.
2427 gcc_cv_initfini_array=yes
2428 ;;
1f9e09b5 2429riscv*-*-elf* | riscv*-*-rtems*)
09cae750 2430 tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
a8ef8061
SH
2431 case ${target} in
2432 *-*-rtems*)
2433 tm_file="${tm_file} rtems.h riscv/rtems.h"
2434 tmake_file="${tmake_file} riscv/t-rtems"
2435 ;;
2436 *)
2437 case "x${enable_multilib}" in
2438 xno) ;;
2439 xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
2440 *) echo "Unknown value for enable_multilib"; exit 1
2441 esac
09cae750
PD
2442 esac
2443 tmake_file="${tmake_file} riscv/t-riscv"
2444 gnu_ld=yes
2445 gas=yes
2446 # Force .init_array support. The configure script cannot always
2447 # automatically detect that GAS supports it, yet we require it.
2448 gcc_cv_initfini_array=yes
2449 ;;
4d47fe5a
RB
2450riscv*-*-freebsd*)
2451 tm_file="${tm_file} elfos.h ${fbsd_tm_file} riscv/freebsd.h"
2452 tmake_file="${tmake_file} riscv/t-riscv"
2453 gnu_ld=yes
2454 gas=yes
2455 # Force .init_array support. The configure script cannot always
2456 # automatically detect that GAS supports it, yet we require it.
2457 gcc_cv_initfini_array=yes
2458 ;;
f982f805 2459mips*-*-netbsd*) # NetBSD/mips, either endian.
5811cb27 2460 target_cpu_default="MASK_ABICALLS"
dfe2677b 2461 tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h"
a4714d14 2462 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
61ed06c3 2463 ;;
58c9330b
MF
2464mips*-img-linux*)
2465 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
2466 extra_options="${extra_options} linux-android.opt"
2467 tmake_file="${tmake_file} mips/t-img-linux"
2468 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
38e9658c
MF
2469 with_arch_32="mips32r6"
2470 with_arch_64="mips64r6"
58c9330b
MF
2471 gnu_ld=yes
2472 gas=yes
2473 ;;
965c1798 2474mips*-mti-linux*)
9a7451a5 2475 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h"
ed9cbf7c 2476 extra_options="${extra_options} linux-android.opt"
965c1798
SE
2477 tmake_file="${tmake_file} mips/t-mti-linux"
2478 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
38e9658c
MF
2479 with_arch_32="mips32r2"
2480 with_arch_64="mips64r2"
965c1798
SE
2481 gnu_ld=yes
2482 gas=yes
965c1798 2483 ;;
77893d0b 2484mips*-*-linux*) # Linux MIPS, either endian.
9a7451a5 2485 tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
ed9cbf7c 2486 extra_options="${extra_options} linux-android.opt"
900e3ae5 2487 case ${target} in
82f84ecb
MF
2488 mipsisa32r6*)
2489 default_mips_arch=mips32r6
2490 ;;
77893d0b 2491 mipsisa32r2*)
8cfebf86 2492 default_mips_arch=mips32r2
77893d0b
SE
2493 ;;
2494 mipsisa32*)
8cfebf86 2495 default_mips_arch=mips32
77893d0b 2496 ;;
900e3ae5 2497 mips64el-st-linux-gnu)
8cfebf86 2498 default_mips_abi=n32
900e3ae5
DJ
2499 tm_file="${tm_file} mips/st.h"
2500 tmake_file="${tmake_file} mips/t-st"
77893d0b 2501 enable_mips_multilibs="yes"
900e3ae5 2502 ;;
d97e6aca 2503 mips64octeon*-*-linux*)
8cfebf86 2504 default_mips_abi=n32
d97e6aca
AN
2505 tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
2506 target_cpu_default=MASK_SOFT_FLOAT_ABI
77893d0b 2507 enable_mips_multilibs="yes"
d97e6aca 2508 ;;
82f84ecb
MF
2509 mipsisa64r6*-*-linux*)
2510 default_mips_abi=n32
2511 default_mips_arch=mips64r6
2512 enable_mips_multilibs="yes"
2513 ;;
f2d6ca50 2514 mipsisa64r2*-*-linux*)
8cfebf86
SE
2515 default_mips_abi=n32
2516 default_mips_arch=mips64r2
77893d0b
SE
2517 enable_mips_multilibs="yes"
2518 ;;
2519 mips64*-*-linux* | mipsisa64*-*-linux*)
8cfebf86 2520 default_mips_abi=n32
77893d0b 2521 enable_mips_multilibs="yes"
f2d6ca50 2522 ;;
900e3ae5 2523 esac
bd5ab709 2524 if test x$enable_targets = xall; then
77893d0b
SE
2525 enable_mips_multilibs="yes"
2526 fi
2527 if test x$enable_mips_multilibs = xyes; then
bd5ab709 2528 tmake_file="${tmake_file} mips/t-linux64"
bd5ab709 2529 fi
61ed06c3 2530 ;;
992bcfac 2531mips*-mti-elf*)
a290fcda 2532 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
992bcfac
SE
2533 tmake_file="mips/t-mti-elf"
2534 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
38e9658c
MF
2535 with_arch_32="mips32r2"
2536 with_arch_64="mips64r2"
992bcfac 2537 ;;
58c9330b
MF
2538mips*-img-elf*)
2539 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2540 tmake_file="mips/t-img-elf"
2541 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
38e9658c
MF
2542 with_arch_32="mips32r6"
2543 with_arch_64="mips64r6"
58c9330b 2544 ;;
0ea339ea 2545mips*-sde-elf*)
a290fcda 2546 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
45b86625 2547 tmake_file="mips/t-sde"
d1583032 2548 extra_options="${extra_options} mips/sde.opt"
d9dced13
RS
2549 case "${with_newlib}" in
2550 yes)
2551 # newlib / libgloss.
2552 ;;
2553 *)
2554 # MIPS toolkit libraries.
2555 tm_file="$tm_file mips/sdemtk.h"
2556 tmake_file="$tmake_file mips/t-sdemtk"
d9dced13
RS
2557 case ${enable_threads} in
2558 "" | yes | mipssde)
2559 thread_file='mipssde'
2560 ;;
2561 esac
2562 ;;
2563 esac
0ea339ea 2564 case ${target} in
82f84ecb
MF
2565 mipsisa32r6*)
2566 tm_defines="MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
2567 ;;
0ea339ea
NS
2568 mipsisa32r2*)
2569 tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2570 ;;
2571 mipsisa32*)
2572 tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
2573 ;;
82f84ecb
MF
2574 mipsisa64r6*)
2575 tm_defines="MIPS_ISA_DEFAULT=69 MIPS_ABI_DEFAULT=ABI_N32"
2576 ;;
0a4a51c7
AN
2577 mipsisa64r2*)
2578 tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
2579 ;;
0ea339ea
NS
2580 mipsisa64*)
2581 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
2582 ;;
2583 esac
2584 ;;
e2c14f5d
RS
2585mipsisa32-*-elf* | mipsisa32el-*-elf* | \
2586mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
82f84ecb 2587mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
0a4a51c7 2588mipsisa64-*-elf* | mipsisa64el-*-elf* | \
82f84ecb
MF
2589mipsisa64r2-*-elf* | mipsisa64r2el-*-elf* | \
2590mipsisa64r6-*-elf* | mipsisa64r6el-*-elf*)
207bf79d 2591 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
45b86625 2592 tmake_file="mips/t-isa3264"
e2c14f5d 2593 case ${target} in
82f84ecb
MF
2594 mipsisa32r6*)
2595 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37"
2596 ;;
e2c14f5d
RS
2597 mipsisa32r2*)
2598 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
2599 ;;
2600 mipsisa32*)
2601 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2602 ;;
82f84ecb
MF
2603 mipsisa64r6*)
2604 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=69"
2605 ;;
0a4a51c7
AN
2606 mipsisa64r2*)
2607 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
2608 ;;
e2c14f5d
RS
2609 mipsisa64*)
2610 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
2611 ;;
2612 esac
2613 case ${target} in
2614 mipsisa32*-*-elfoabi*)
2615 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
2616 tm_file="${tm_file} mips/elfoabi.h"
2617 ;;
2618 mipsisa64*-*-elfoabi*)
2619 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
2620 tm_file="${tm_file} mips/elfoabi.h"
2621 ;;
2622 *-*-elf*)
2623 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2624 ;;
2625 esac
5c44e275 2626 ;;
5ce6f47b 2627mipsisa64sr71k-*-elf*)
207bf79d 2628 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
5ce6f47b 2629 tmake_file=mips/t-sr71k
620b87b3 2630 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
5ce6f47b 2631 ;;
3d41dbb0 2632mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
207bf79d 2633 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
45b86625 2634 tmake_file="mips/t-elf mips/t-sb1"
620b87b3 2635 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
3d41dbb0 2636 ;;
107eea2c 2637mips-*-elf* | mipsel-*-elf* | mipsr5900-*-elf* | mipsr5900el-*-elf*)
207bf79d 2638 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
45b86625 2639 tmake_file="mips/t-elf"
61ed06c3 2640 ;;
107eea2c 2641mips64r5900-*-elf* | mips64r5900el-*-elf*)
a290fcda 2642 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h"
107eea2c
JU
2643 tmake_file="mips/t-elf"
2644 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
2645 ;;
74826b0f 2646mips64-*-elf* | mips64el-*-elf*)
207bf79d 2647 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
45b86625 2648 tmake_file="mips/t-elf"
620b87b3 2649 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
61ed06c3 2650 ;;
5ce6f47b 2651mips64vr-*-elf* | mips64vrel-*-elf*)
207bf79d 2652 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
5ce6f47b 2653 tmake_file=mips/t-vr
c4023c19 2654 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
5ce6f47b 2655 ;;
74826b0f 2656mips64orion-*-elf* | mips64orionel-*-elf*)
207bf79d 2657 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
45b86625 2658 tmake_file="mips/t-elf"
620b87b3 2659 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
61ed06c3 2660 ;;
bc98ef7f 2661mips*-*-rtems*)
207bf79d 2662 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
aefe4056 2663 tmake_file="${tmake_file} mips/t-elf mips/t-rtems"
61ed06c3 2664 ;;
55047c9d 2665mips-wrs-vxworks)
efa58006 2666 tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
55047c9d 2667 tmake_file="${tmake_file} mips/t-vxworks"
55047c9d 2668 ;;
74826b0f 2669mipstx39-*-elf* | mipstx39el-*-elf*)
207bf79d 2670 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
45b86625 2671 tmake_file="mips/t-r3900"
61ed06c3 2672 ;;
bcf684c7 2673mmix-knuth-mmixware)
207bf79d 2674 tm_file="${tm_file} newlib-stdint.h"
207bf79d 2675 use_gcc_stdint=wrap
bcf684c7 2676 ;;
61ed06c3 2677mn10300-*-*)
6b9b8b34 2678 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
61ed06c3
HPN
2679 if test x$stabs = xyes
2680 then
2681 tm_file="${tm_file} dbx.h"
2682 fi
2683 use_collect2=no
207bf79d 2684 use_gcc_stdint=wrap
61ed06c3 2685 ;;
e8aa9f55 2686msp430-*-*)
f6a83b4a
DD
2687 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2688 c_target_objs="msp430-c.o"
2689 cxx_target_objs="msp430-c.o"
f6a83b4a 2690 tmake_file="${tmake_file} msp430/t-msp430"
e37e2bb1
JL
2691 extra_objs="${extra_objs} msp430-devices.o"
2692 extra_gcc_objs="driver-msp430.o msp430-devices.o"
c46d1717 2693 # Enable .init_array unless it has been explicitly disabled.
378a578a
JL
2694 # The MSP430 EABI mandates the use of .init_array, and the Newlib CRT
2695 # code since mid-2019 expects it.
c46d1717
JL
2696 if test x${disable_initfini_array} != xyes; then
2697 gcc_cv_initfini_array=yes
2698 fi
e8aa9f55
JL
2699 case ${target} in
2700 msp430-*-elfbare)
2701 # __cxa_atexit increases code size, and we don't need to support
2702 # dynamic shared objects on MSP430, so regular Newlib atexit is a
2703 # fine replacement as it also supports registration of more than 32
2704 # functions.
2705 default_use_cxa_atexit=no
2706 # This target does not match the generic *-*-elf case above which
2707 # sets use_gcc_stdint=wrap, so explicitly set it here.
2708 use_gcc_stdint=wrap
2709 ;;
2710 esac
f6a83b4a 2711 ;;
cf3cd43d 2712nds32*-*-*)
9304f876
CJW
2713 target_cpu_default="0"
2714 tm_defines="${tm_defines}"
cf3cd43d
CJW
2715 case ${target} in
2716 nds32le*-*-*)
2717 ;;
2718 nds32be-*-*)
2719 target_cpu_default="${target_cpu_default}|MASK_BIG_ENDIAN"
2720 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2721 ;;
2722 esac
2723 case ${target} in
2724 nds32*-*-elf*)
2725 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} nds32/elf.h nds32/nds32_intrinsic.h"
2726 tmake_file="nds32/t-nds32 nds32/t-elf"
2727 ;;
2728 nds32*-*-linux*)
2729 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h nds32/linux.h nds32/nds32_intrinsic.h"
2730 tmake_file="${tmake_file} nds32/t-nds32 nds32/t-linux"
3da4a68a 2731 gcc_cv_initfini_array=yes
cf3cd43d
CJW
2732 ;;
2733 esac
7c32ef41 2734
cf3cd43d
CJW
2735 # Handle --enable-default-relax setting.
2736 if test x${enable_default_relax} = xyes; then
2737 tm_defines="${tm_defines} TARGET_DEFAULT_RELAX=1"
2738 fi
7c32ef41
MC
2739 # Handle --with-ext-dsp
2740 if test x${with_ext_dsp} = xyes; then
2741 tm_defines="${tm_defines} TARGET_DEFAULT_EXT_DSP=1"
2742 fi
9304f876 2743 ;;
e430824f
CLT
2744nios2-*-*)
2745 tm_file="elfos.h ${tm_file}"
2746 tmake_file="${tmake_file} nios2/t-nios2"
2747 case ${target} in
2748 nios2-*-linux*)
2749 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h nios2/linux.h "
2750 ;;
2751 nios2-*-elf*)
2752 tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
2753 extra_options="${extra_options} nios2/elf.opt"
2754 ;;
00020dda
SH
2755 nios2-*-rtems*)
2756 tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
2757 tmake_file="${tmake_file} t-rtems nios2/t-rtems"
2758 ;;
e430824f
CLT
2759 esac
2760 ;;
738f2522
BS
2761nvptx-*)
2762 tm_file="${tm_file} newlib-stdint.h"
52956fbc 2763 use_gcc_stdint=wrap
738f2522 2764 tmake_file="nvptx/t-nvptx"
1f83528e
TS
2765 if test x$enable_as_accelerator = xyes; then
2766 extra_programs="${extra_programs} mkoffload\$(exeext)"
2767 tm_file="${tm_file} nvptx/offload.h"
2768 fi
738f2522 2769 ;;
3965b35f
SH
2770or1k*-*-*)
2771 tm_file="elfos.h ${tm_file}"
2772 tmake_file="${tmake_file} or1k/t-or1k"
2773 # Force .init_array support. The configure script cannot always
2774 # automatically detect that GAS supports it, yet we require it.
2775 gcc_cv_initfini_array=yes
2776
2777 # Handle --with-multilib-list=...
2778 or1k_multilibs="${with_multilib_list}"
2779 if test "$or1k_multilibs" = "default"; then
2780 or1k_multilibs="mcmov,msoft-mul,msoft-div"
2781 fi
2782 or1k_multilibs=`echo $or1k_multilibs | sed -e 's/,/ /g'`
2783 for or1k_multilib in ${or1k_multilibs}; do
2784 case ${or1k_multilib} in
2785 mcmov | msext | msfimm | \
1e2e81c1 2786 mror | mrori | \
44080af9 2787 mhard-float | mdouble-float | munordered-float | msoft-float | \
3965b35f
SH
2788 mhard-div | mhard-mul | \
2789 msoft-div | msoft-mul )
2790 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${or1k_multilib}"
2791 ;;
2792 *)
2793 echo "--with-multilib-list=${with_multilib_list} not supported."
2794 exit 1
2795 esac
2796 done
2797 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
2798
2799 case ${target} in
2800 or1k*-*-linux*)
2801 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h"
2802 tm_file="${tm_file} or1k/linux.h"
2803 ;;
2804 or1k*-*-elf*)
2805 tm_file="${tm_file} newlib-stdint.h or1k/elf.h"
2806 extra_options="${extra_options} or1k/elf.opt"
2807 ;;
2808 or1k*-*-rtems*)
2809 tm_file="${tm_file} newlib-stdint.h or1k/rtems.h rtems.h"
2810 tmake_file="${tmake_file} or1k/t-rtems"
2811 ;;
2812 esac
2813 ;;
61ed06c3 2814pdp11-*-*)
207bf79d
JM
2815 tm_file="${tm_file} newlib-stdint.h"
2816 use_gcc_stdint=wrap
61ed06c3 2817 ;;
ca11c37c
ZW
2818# port not yet contributed
2819#powerpc-*-openbsd*)
569dc494 2820# tmake_file="${tmake_file} rs6000/t-fprules"
ca11c37c
ZW
2821# extra_headers=
2822# ;;
18922061 2823powerpc-*-darwin*)
c2ff7104 2824 extra_options="${extra_options} ${cpu_type}/darwin.opt"
f0b81cbc 2825 case ${target} in
c2ff7104
IS
2826 *-darwin1[0-9]* | *-darwin9*)
2827 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2828 tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2829 ;;
2830 *-darwin8*)
2831 tmake_file="${tmake_file} ${cpu_type}/t-darwin32-biarch"
2832 tm_file="${tm_file} ${cpu_type}/darwin32-biarch.h"
2833 tm_file="${tm_file} ${cpu_type}/darwin8.h"
ed5b9f96
GK
2834 ;;
2835 *-darwin7*)
c2ff7104 2836 tm_file="${tm_file} ${cpu_type}/darwin7.h"
ed5b9f96 2837 ;;
c2ff7104
IS
2838 *-darwin[456]*)
2839 # Earlier - ingle arch, with 32b only
2840 # OS X 10.0, the first edition is Darwin4
ed5b9f96 2841 ;;
f0b81cbc 2842 esac
b040f2be 2843 tmake_file="${tmake_file} t-slibgcc"
18922061 2844 ;;
b8ec3cc8 2845powerpc64-*-darwin*)
b8ec3cc8 2846 extra_options="${extra_options} ${cpu_type}/darwin.opt"
c2ff7104
IS
2847 tmake_file="${tmake_file} ${cpu_type}/t-darwin64-biarch t-slibgcc"
2848 tm_file="${tm_file} ${cpu_type}/darwin64-biarch.h"
b8ec3cc8 2849 ;;
a26f86dc 2850powerpc*-*-freebsd*)
62045234 2851 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
78f5898b 2852 extra_options="${extra_options} rs6000/sysv4.opt"
a26f86dc 2853 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
252a969e 2854 case ${target} in
a26f86dc
AT
2855 powerpc64*)
2856 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2857 tmake_file="${tmake_file} rs6000/t-freebsd64"
2858 extra_options="${extra_options} rs6000/linux64.opt"
15bbad92
AT
2859 if test $fbsd_major -ge 13; then
2860 tm_defines="${tm_defines} TARGET_FREEBSD32_SECURE_PLT=1"
2861 fi
a26f86dc
AT
2862 ;;
2863 *)
15bbad92
AT
2864 if test $fbsd_major -ge 13; then
2865 tm_file="rs6000/secureplt.h ${tm_file}"
2866 fi
a26f86dc
AT
2867 tm_file="${tm_file} rs6000/freebsd.h"
2868 ;;
2869 esac
b91da81f 2870 ;;
edf1b3f3 2871powerpc-*-netbsd*)
62045234 2872 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
a4714d14 2873 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
a4967b8d 2874 tmake_file="${tmake_file} rs6000/t-netbsd"
78f5898b 2875 extra_options="${extra_options} rs6000/sysv4.opt"
edf1b3f3 2876 ;;
cf6ede82 2877powerpc-*-eabisimaltivec*)
62045234 2878 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
78f5898b 2879 extra_options="${extra_options} rs6000/sysv4.opt"
569dc494 2880 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
207bf79d 2881 use_gcc_stdint=wrap
cf6ede82 2882 ;;
61ed06c3 2883powerpc-*-eabisim*)
62045234 2884 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
78f5898b 2885 extra_options="${extra_options} rs6000/sysv4.opt"
569dc494 2886 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
207bf79d 2887 use_gcc_stdint=wrap
61ed06c3
HPN
2888 ;;
2889powerpc-*-elf*)
62045234 2890 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
78f5898b 2891 extra_options="${extra_options} rs6000/sysv4.opt"
569dc494 2892 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
61ed06c3 2893 ;;
10baca6b 2894powerpc-*-eabialtivec*)
62045234 2895 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
78f5898b 2896 extra_options="${extra_options} rs6000/sysv4.opt"
569dc494 2897 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
207bf79d 2898 use_gcc_stdint=wrap
10baca6b 2899 ;;
61ed06c3 2900powerpc-*-eabi*)
62045234 2901 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
78f5898b 2902 extra_options="${extra_options} rs6000/sysv4.opt"
569dc494 2903 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
207bf79d 2904 use_gcc_stdint=wrap
61ed06c3
HPN
2905 ;;
2906powerpc-*-rtems*)
62045234 2907 tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h"
17691698 2908 extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
aefe4056 2909 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
61ed06c3 2910 ;;
b9a7eb5d 2911powerpc*-*-linux*)
426a04b8 2912 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h"
78f5898b 2913 extra_options="${extra_options} rs6000/sysv4.opt"
864396ff 2914 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
9193fb05 2915 extra_objs="$extra_objs rs6000-linux.o"
b9a7eb5d
AM
2916 case ${target} in
2917 powerpc*le-*-*)
93ed07e2 2918 tm_file="${tm_file} rs6000/sysv4le.h" ;;
b9a7eb5d 2919 esac
864396ff
AM
2920 case ${target}:${with_cpu} in
2921 powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
2922 esac
2923 maybe_biarch=${cpu_is_64bit}
2924 case ${enable_targets} in
2925 *powerpc64*) maybe_biarch=yes ;;
b9b1573b 2926 all) maybe_biarch=yes ;;
864396ff 2927 esac
864396ff
AM
2928 case ${target}:${enable_targets}:${maybe_biarch} in
2929 powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
2930 | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
2931 | powerpcle-*:*powerpc64le*:yes)
a8e04fe6
AM
2932 if test x$cpu_is_64bit = xyes; then
2933 tm_file="${tm_file} rs6000/default64.h"
2934 fi
207bf79d 2935 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
a8e04fe6 2936 tmake_file="$tmake_file rs6000/t-linux64"
93ed07e2
AM
2937 case ${target} in
2938 powerpc*le-*-*)
2939 tmake_file="$tmake_file rs6000/t-linux64le"
2940 case ${enable_targets} in
2941 all | *powerpc64-* | *powerpc-*)
2942 tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
2943 esac ;;
2944 *)
2945 case ${enable_targets} in
2946 all | *powerpc64le-* | *powerpcle-*)
2947 tmake_file="$tmake_file rs6000/t-linux64bele" ;;
2948 esac ;;
2949 esac
f75aac9e 2950 extra_options="${extra_options} rs6000/linux64.opt"
a8e04fe6 2951 ;;
864396ff
AM
2952 powerpc64*)
2953 tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
2954 extra_options="${extra_options} rs6000/linux64.opt"
2955 tmake_file="${tmake_file} rs6000/t-linux"
2956 ;;
a8e04fe6 2957 *)
207bf79d 2958 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
864396ff 2959 tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
a8e04fe6
AM
2960 ;;
2961 esac
457d1d00 2962 case ${target} in
be26142a
PB
2963 powerpc*-*-linux*ppc476*)
2964 tm_file="${tm_file} rs6000/476.h"
2965 extra_options="${extra_options} rs6000/476.opt" ;;
457d1d00
AM
2966 powerpc*-*-linux*altivec*)
2967 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
457d1d00 2968 esac
0d6be0b1
GR
2969 case ${target} in
2970 *-linux*-musl*)
2971 enable_secureplt=yes ;;
2972 esac
7f970b70
AM
2973 if test x${enable_secureplt} = xyes; then
2974 tm_file="rs6000/secureplt.h ${tm_file}"
2975 fi
61ed06c3 2976 ;;
611e7036 2977powerpc-wrs-vxworks*)
62045234 2978 tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
569dc494 2979 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
78f5898b 2980 extra_options="${extra_options} rs6000/sysv4.opt"
41c1b913 2981 extra_headers="${extra_headers} ppc-asm.h"
2eab15c9 2982 case ${target} in
3a8fe7c6 2983 *-vxworksmils*)
c725f69c 2984 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"
3a8fe7c6
OH
2985 tmake_file="${tmake_file} rs6000/t-vxworksmils"
2986 ;;
2eab15c9 2987 *-vxworksae*)
c725f69c 2988 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
2eab15c9
PE
2989 tmake_file="${tmake_file} rs6000/t-vxworksae"
2990 ;;
2991 *-vxworks*)
c725f69c 2992 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
2eab15c9
PE
2993 ;;
2994 esac
4977bab6 2995 ;;
4f587cb0
AN
2996powerpc-*-lynxos*)
2997 xm_defines=POSIX
62045234 2998 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
4f587cb0 2999 tmake_file="t-lynx rs6000/t-lynx"
78f5898b 3000 extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
4f587cb0
AN
3001 thread_file=lynx
3002 gnu_ld=yes
3003 gas=yes
3004 ;;
61ed06c3 3005powerpcle-*-elf*)
62045234 3006 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
569dc494 3007 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 3008 extra_options="${extra_options} rs6000/sysv4.opt"
61ed06c3
HPN
3009 ;;
3010powerpcle-*-eabisim*)
62045234 3011 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
569dc494 3012 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 3013 extra_options="${extra_options} rs6000/sysv4.opt"
207bf79d 3014 use_gcc_stdint=wrap
61ed06c3
HPN
3015 ;;
3016powerpcle-*-eabi*)
62045234 3017 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
569dc494 3018 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 3019 extra_options="${extra_options} rs6000/sysv4.opt"
207bf79d 3020 use_gcc_stdint=wrap
61ed06c3 3021 ;;
8d2af3a2
DD
3022pru*-*-*)
3023 tm_file="elfos.h newlib-stdint.h ${tm_file}"
3024 tmake_file="${tmake_file} pru/t-pru"
3025 extra_objs="pru-pragma.o pru-passes.o"
3026 use_gcc_stdint=wrap
3027 ;;
51fbbb92 3028rs6000-ibm-aix6.* | powerpc-ibm-aix6.*)
557cc596 3029 tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
b040f2be 3030 tmake_file="rs6000/t-aix52 t-slibgcc"
ba6a1b78
DE
3031 extra_options="${extra_options} rs6000/aix64.opt"
3032 use_collect2=yes
3033 thread_file='aix'
557cc596 3034 use_gcc_stdint=wrap
b9584cb5 3035 default_use_cxa_atexit=yes
51fbbb92 3036 ;;
74fc2a2b 3037rs6000-ibm-aix7.1.* | powerpc-ibm-aix7.1.*)
51fbbb92 3038 tmake_file="rs6000/t-aix52 t-slibgcc"
6643d236
DE
3039 if test x$cpu_is_64bit = xyes; then
3040 tm_file="${tm_file} rs6000/biarch64.h"
3041 tmake_file="rs6000/t-aix64 t-slibgcc"
3042 fi
3043 tm_file="${tm_file} rs6000/aix.h rs6000/aix71.h rs6000/xcoff.h rs6000/aix-stdint.h"
74fc2a2b
DE
3044 extra_options="${extra_options} rs6000/aix64.opt"
3045 use_collect2=yes
3046 thread_file='aix'
3047 use_gcc_stdint=wrap
74fc2a2b
DE
3048 default_use_cxa_atexit=yes
3049 ;;
3050rs6000-ibm-aix[789].* | powerpc-ibm-aix[789].*)
74fc2a2b 3051 tmake_file="rs6000/t-aix52 t-slibgcc"
47ddb895 3052 if test x$cpu_is_64bit = xyes; then
6643d236 3053 tm_file="${tm_file} rs6000/biarch64.h"
47ddb895
DE
3054 tmake_file="rs6000/t-aix64 t-slibgcc"
3055 fi
3056 tm_file="${tm_file} rs6000/aix.h rs6000/aix72.h rs6000/xcoff.h rs6000/aix-stdint.h"
51fbbb92
DE
3057 extra_options="${extra_options} rs6000/aix64.opt"
3058 use_collect2=yes
3059 thread_file='aix'
3060 use_gcc_stdint=wrap
b9584cb5 3061 default_use_cxa_atexit=yes
ba6a1b78 3062 ;;
85b8555e
DD
3063rl78-*-elf*)
3064 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
3065 target_has_targetm_common=no
3066 c_target_objs="rl78-c.o"
3067 cxx_target_objs="rl78-c.o"
3068 tmake_file="${tmake_file} rl78/t-rl78"
3069 ;;
65a324b4 3070rx-*-elf*)
80cf2e08 3071 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
65a324b4 3072 tmake_file="${tmake_file} rx/t-rx"
76aaa9cd
YS
3073 extra_options="${extra_options} rx/elf.opt"
3074 ;;
3075rx-*-linux*)
3076 tm_file="elfos.h linux.h glibc-stdint.h rx/linux.h ../../libgcc/config/rx/rx-abi.h"
3077 tmake_file="${tmake_file} rx/t-linux"
65a324b4 3078 ;;
0e5a4ad8 3079s390-*-linux*)
8e38461c 3080 tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
3af82a61
AK
3081 c_target_objs="${c_target_objs} s390-c.o"
3082 cxx_target_objs="${cxx_target_objs} s390-c.o"
f3054223
AL
3083 if test x$enable_targets = xall; then
3084 tmake_file="${tmake_file} s390/t-linux64"
3085 fi
3af82a61 3086 tmake_file="${tmake_file} s390/t-s390"
9628a767 3087 ;;
0e5a4ad8 3088s390x-*-linux*)
8e38461c 3089 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
ed9cbf7c 3090 tm_p_file="linux-protos.h s390/s390-protos.h"
3af82a61
AK
3091 c_target_objs="${c_target_objs} s390-c.o"
3092 cxx_target_objs="${cxx_target_objs} s390-c.o"
70eeb10b 3093 md_file=s390/s390.md
1c0ca89d 3094 extra_modes=s390/s390-modes.def
70eeb10b 3095 out_file=s390/s390.c
3af82a61 3096 tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
9628a767 3097 ;;
24fe22c9 3098s390x-ibm-tpf*)
48c16b28 3099 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h glibc-stdint.h s390/tpf.h"
3af82a61
AK
3100 tm_p_file=s390/s390-protos.h
3101 c_target_objs="${c_target_objs} s390-c.o"
3102 cxx_target_objs="${cxx_target_objs} s390-c.o"
3103 md_file=s390/s390.md
3104 extra_modes=s390/s390-modes.def
3105 out_file=s390/s390.c
3106 thread_file='tpf'
a8ba31f2 3107 extra_options="${extra_options} s390/tpf.opt"
3af82a61 3108 tmake_file="${tmake_file} s390/t-s390"
24fe22c9 3109 ;;
cd985f66 3110sh-*-elf* | sh[12346l]*-*-elf* | \
93fea8d3 3111 sh-*-linux* | sh[2346lbe]*-*-linux* | \
bc6d9014 3112 sh-*-netbsdelf* | shl*-*-netbsdelf*)
da28a3b9
JR
3113 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
3114 if test x${with_endian} = x; then
3115 case ${target} in
3116 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
3117 shbe-*-* | sheb-*-*) with_endian=big,little ;;
3118 sh[1234]l* | sh[34]*-*-linux*) with_endian=little ;;
bc6d9014
OE
3119 shl* | sh*-*-linux* | \
3120 sh-superh-elf) with_endian=little,big ;;
da28a3b9
JR
3121 sh[1234]*-*-*) with_endian=big ;;
3122 *) with_endian=big,little ;;
3123 esac
3124 fi
aca600aa
AS
3125 # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
3126 # First word : the default endian.
3127 # Second word: the secondary endian (optional).
da28a3b9 3128 case ${with_endian} in
aca600aa
AS
3129 big) TM_ENDIAN_CONFIG=mb ;;
3130 little) TM_ENDIAN_CONFIG=ml ;;
3131 big,little) TM_ENDIAN_CONFIG="mb ml" ;;
3132 little,big) TM_ENDIAN_CONFIG="ml mb" ;;
da28a3b9
JR
3133 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
3134 esac
3135 case ${with_endian} in
3136 little*) tm_file="sh/little.h ${tm_file}" ;;
3137 esac
9e08f9e2 3138 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
b01bc573 3139 case ${target} in
da28a3b9 3140 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
1e44e857
DJ
3141 if test x$enable_fdpic = xyes; then
3142 tm_defines="$tm_defines FDPIC_DEFAULT=1"
3143 fi
8e38461c 3144 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
a4714d14 3145 sh*-*-netbsd*)
dfe2677b 3146 tm_file="${tm_file} ${nbsd_tm_file} sh/netbsd-elf.h"
a4714d14
JM
3147 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3148
3149 ;;
c68e4eed
CB
3150 sh*-superh-elf) if test x$with_libgloss != xno; then
3151 with_libgloss=yes
3152 tm_file="${tm_file} sh/newlib.h"
3153 fi
2d606e03 3154 tm_file="${tm_file} sh/embed-elf.h"
c68e4eed 3155 tm_file="${tm_file} sh/superh.h"
c68e4eed 3156 extra_options="${extra_options} sh/superh.opt" ;;
8c1aaf26
R
3157 *) if test x$with_newlib = xyes \
3158 && test x$with_libgloss = xyes; then
3159 tm_file="${tm_file} sh/newlib.h"
3160 fi
3161 tm_file="${tm_file} sh/embed-elf.h" ;;
da28a3b9
JR
3162 esac
3163 case ${target} in
da28a3b9 3164 *-*-netbsd)
da28a3b9 3165 ;;
207bf79d
JM
3166 *-*-elf*)
3167 tm_file="${tm_file} newlib-stdint.h"
3168 ;;
8bc6e101 3169 esac
da28a3b9
JR
3170 # sed el/eb endian suffixes away to avoid confusion with sh[23]e
3171 case `echo ${target} | sed 's/e[lb]-/-/'` in
312209c6
AO
3172 sh4a_single_only*) sh_cpu_target=sh4a-single-only ;;
3173 sh4a_single*) sh_cpu_target=sh4a-single ;;
3174 sh4a_nofpu*) sh_cpu_target=sh4a-nofpu ;;
3175 sh4al) sh_cpu_target=sh4al ;;
3176 sh4a*) sh_cpu_target=sh4a ;;
da28a3b9
JR
3177 sh4_single_only*) sh_cpu_target=sh4-single-only ;;
3178 sh4_single*) sh_cpu_target=sh4-single ;;
3179 sh4_nofpu*) sh_cpu_target=sh4-nofpu ;;
3180 sh4* | sh-superh-*) sh_cpu_target=sh4 ;;
3181 sh3e*) sh_cpu_target=sh3e ;;
3182 sh*-*-netbsd* | sh3*) sh_cpu_target=sh3 ;;
157371cf
AO
3183 sh2a_single_only*) sh_cpu_target=sh2a-single-only ;;
3184 sh2a_single*) sh_cpu_target=sh2a-single ;;
3185 sh2a_nofpu*) sh_cpu_target=sh2a-nofpu ;;
3186 sh2a*) sh_cpu_target=sh2a ;;
da28a3b9
JR
3187 sh2e*) sh_cpu_target=sh2e ;;
3188 sh2*) sh_cpu_target=sh2 ;;
3189 *) sh_cpu_target=sh1 ;;
8f48afc1 3190 esac
8c1aaf26
R
3191 # did the user say --without-fp ?
3192 if test x$with_fp = xno; then
3193 case ${sh_cpu_target} in
8c1aaf26
R
3194 sh4al | sh1) ;;
3195 sh4a* ) sh_cpu_target=sh4a-nofpu ;;
3196 sh4*) sh_cpu_target=sh4-nofpu ;;
3197 sh3*) sh_cpu_target=sh3 ;;
3198 sh2a*) sh_cpu_target=sh2a-nofpu ;;
3199 sh2*) sh_cpu_target=sh2 ;;
3200 *) echo --without-fp not available for $target: ignored
3201 esac
3202 tm_defines="$tm_defines STRICT_NOFPU=1"
3203 fi
da28a3b9
JR
3204 sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
3205 case $sh_cpu_default in
157371cf 3206 sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
312209c6 3207 sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
27a0ce7d 3208 sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
bf09b512 3209 sh3e | sh3 | sh2e | sh2 | sh1) ;;
da28a3b9
JR
3210 "") sh_cpu_default=${sh_cpu_target} ;;
3211 *) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
dbf87f32 3212 esac
da28a3b9 3213 sh_multilibs=${with_multilib_list}
aca600aa 3214 if test "$sh_multilibs" = "default" ; then
da28a3b9
JR
3215 case ${target} in
3216 sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
da28a3b9 3217 sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
8f6d1c86 3218 sh*-*-linux*) sh_multilibs=m1,m2,m2a,m3e,m4 ;;
da28a3b9 3219 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
157371cf 3220 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
da28a3b9 3221 esac
8c1aaf26
R
3222 if test x$with_fp = xno; then
3223 sh_multilibs="`echo $sh_multilibs|sed -e s/m4/sh4-nofpu/ -e s/,m4-[^,]*//g -e s/,m[23]e// -e s/m2a,m2a-single/m2a-nofpu/ -e s/m5-..m....,//g`"
3224 fi
da28a3b9 3225 fi
25e651ca 3226 target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
da28a3b9 3227 tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
aca600aa 3228 tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
47e5ff44 3229 sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
da28a3b9
JR
3230 for sh_multilib in ${sh_multilibs}; do
3231 case ${sh_multilib} in
aca600aa
AS
3232 m1 | m2 | m2e | m3 | m3e | \
3233 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
3234 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
bc6d9014 3235 m2a | m2a-single | m2a-single-only | m2a-nofpu)
aca600aa
AS
3236 # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
3237 # It is passed to MULTIILIB_OPTIONS verbatim.
3238 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
3239 tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
da28a3b9 3240 ;;
aca600aa
AS
3241 \!*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
3242 # It is passed the MULTILIB_EXCEPTIONS verbatim.
3243 TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
da28a3b9
JR
3244 *)
3245 echo "with_multilib_list=${sh_multilib} not supported."
3246 exit 1
3247 ;;
3248 esac
3249 done
aca600aa 3250 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
25e651ca 3251 if test x${enable_incomplete_targets} = xyes ; then
bc6d9014 3252 tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
da28a3b9 3253 fi
44509946
AS
3254 tm_file="$tm_file ./sysroot-suffix.h"
3255 tmake_file="$tmake_file t-sysroot-suffix"
fa5322fa 3256 ;;
314733e2 3257sh-*-rtems*)
aefe4056 3258 tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
9e08f9e2 3259 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
314733e2 3260 ;;
55047c9d 3261sh-wrs-vxworks)
5f73c6cc 3262 tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
9e08f9e2 3263 tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
55047c9d 3264 ;;
61ed06c3 3265sparc-*-elf*)
ec047df4 3266 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
07981468
KE
3267 case ${target} in
3268 *-leon-*)
8d12174d 3269 tmake_file="sparc/t-sparc sparc/t-leon"
07981468
KE
3270 ;;
3271 *-leon[3-9]*)
8d12174d 3272 tmake_file="sparc/t-sparc sparc/t-leon3"
07981468
KE
3273 ;;
3274 *)
8d12174d 3275 tmake_file="sparc/t-sparc sparc/t-elf"
07981468
KE
3276 ;;
3277 esac
61ed06c3 3278 ;;
ad234fc7 3279sparc-*-rtems*)
ec047df4 3280 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
9c281312 3281 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
ad234fc7
EB
3282 ;;
3283sparc-*-linux*)
6cc7fb90 3284 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
fe609b0f 3285 extra_options="${extra_options} sparc/long-double-switch.opt"
07981468
KE
3286 case ${target} in
3287 *-leon-*)
8d12174d 3288 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
07981468
KE
3289 ;;
3290 *-leon[3-9]*)
8d12174d 3291 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
07981468
KE
3292 ;;
3293 *)
b040f2be 3294 tmake_file="${tmake_file} sparc/t-sparc"
07981468
KE
3295 ;;
3296 esac
5f7ca34b
DM
3297 if test x$enable_targets = xall; then
3298 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
ccbdd3bc 3299 tmake_file="${tmake_file} sparc/t-linux64"
5f7ca34b
DM
3300 else
3301 tm_file="${tm_file} sparc/linux.h"
d3547cab 3302 tmake_file="${tmake_file} sparc/t-linux"
5f7ca34b 3303 fi
61ed06c3 3304 ;;
ad234fc7 3305sparc-*-netbsdelf*)
dfe2677b 3306 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
a4714d14 3307 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
ad234fc7 3308 extra_options="${extra_options} sparc/long-double-switch.opt"
8d12174d 3309 tmake_file="${tmake_file} sparc/t-sparc"
3943fe02 3310 ;;
2587aa3b 3311sparc*-*-solaris2*)
2cf03b11 3312 tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sparc/tso.h"
18167442 3313 case ${target} in
2587aa3b 3314 sparc64-*-* | sparcv9-*-*)
7c7dae65 3315 tm_file="sparc/default64.h ${tm_file}"
207bf79d 3316 ;;
2587aa3b
EB
3317 *)
3318 test x$with_cpu != x || with_cpu=v9
ec23ed60 3319 ;;
18167442 3320 esac
2cf03b11 3321 tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2"
61ed06c3 3322 ;;
1910440e 3323sparc-wrs-vxworks)
ec047df4 3324 tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
8d12174d 3325 tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
1910440e 3326 ;;
61ed06c3 3327sparc64-*-elf*)
ec047df4 3328 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
ae5f5715 3329 extra_options="${extra_options}"
8d12174d 3330 tmake_file="${tmake_file} sparc/t-sparc"
61ed06c3 3331 ;;
ad234fc7 3332sparc64-*-rtems*)
ec047df4 3333 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
ae5f5715 3334 extra_options="${extra_options}"
aefe4056 3335 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
ad234fc7
EB
3336 ;;
3337sparc64-*-linux*)
7c7dae65 3338 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
ad234fc7 3339 extra_options="${extra_options} sparc/long-double-switch.opt"
b040f2be 3340 tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
ad234fc7 3341 ;;
c7240cbd
DB
3342sparc64-*-freebsd*|ultrasparc-*-freebsd*)
3343 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
fe609b0f 3344 extra_options="${extra_options} sparc/long-double-switch.opt"
c7240cbd 3345 case "x$with_cpu" in
e0054185 3346 xultrasparc) ;;
c7240cbd
DB
3347 x) with_cpu=ultrasparc ;;
3348 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
3349 esac
8d12174d 3350 tmake_file="${tmake_file} sparc/t-sparc"
c7240cbd 3351 ;;
4cb7482c 3352sparc64-*-netbsd*)
4cb7482c 3353 tm_file="sparc/biarch64.h ${tm_file}"
dfe2677b 3354 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
a4714d14 3355 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
fe609b0f 3356 extra_options="${extra_options} sparc/long-double-switch.opt"
8d12174d 3357 tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
4cb7482c 3358 ;;
ad234fc7 3359sparc64-*-openbsd*)
ec047df4 3360 tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
ad234fc7 3361 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
5369e2d4 3362 extra_options="${extra_options} openbsd.opt"
ae5f5715 3363 extra_options="${extra_options}"
ad234fc7
EB
3364 gas=yes gnu_ld=yes
3365 with_cpu=ultrasparc
8d12174d 3366 tmake_file="${tmake_file} sparc/t-sparc"
ad234fc7 3367 ;;
bcead286
BS
3368tic6x-*-elf)
3369 tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
3370 tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
bcead286 3371 tmake_file="c6x/t-c6x c6x/t-c6x-elf"
bcead286
BS
3372 use_collect2=no
3373 ;;
3374tic6x-*-uclinux)
3375 tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
3376 tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
3377 tm_file="${tm_file} ./sysroot-suffix.h"
b040f2be 3378 tmake_file="t-sysroot-suffix t-slibgcc"
bcead286 3379 tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
bcead286
BS
3380 use_collect2=no
3381 ;;
341c653c 3382tilegx*-*-linux*)
dd552284
WL
3383 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
3384 tmake_file="${tmake_file} tilegx/t-tilegx"
92be22dc 3385 extra_objs="${extra_objs} mul-tables.o"
1efcb8c6
JM
3386 c_target_objs="${c_target_objs} tilegx-c.o"
3387 cxx_target_objs="${cxx_target_objs} tilegx-c.o"
fd199491 3388 extra_headers="feedback.h"
341c653c
WL
3389 case $target in
3390 tilegxbe-*)
3391 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
3392 ;;
3393 esac
dd552284 3394 ;;
341c653c 3395tilepro*-*-linux*)
dd552284
WL
3396 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
3397 tmake_file="${tmake_file} tilepro/t-tilepro"
92be22dc 3398 extra_objs="${extra_objs} mul-tables.o"
1efcb8c6
JM
3399 c_target_objs="${c_target_objs} tilepro-c.o"
3400 cxx_target_objs="${cxx_target_objs} tilepro-c.o"
fd199491 3401 extra_headers="feedback.h"
dd552284 3402 ;;
cc5476cb
RC
3403v850-*-rtems*)
3404 target_cpu_default="TARGET_CPU_generic"
3405 tm_file="dbxelf.h elfos.h v850/v850.h"
3406 tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
3407 tmake_file="${tmake_file} v850/t-v850"
aefe4056 3408 tmake_file="${tmake_file} v850/t-rtems"
cc5476cb
RC
3409 use_collect2=no
3410 c_target_objs="v850-c.o"
3411 cxx_target_objs="v850-c.o"
3412 ;;
1dcad079
NC
3413v850*-*-*)
3414 case ${target} in
dbdbd982
NC
3415 v850e3v5-*-*)
3416 target_cpu_default="TARGET_CPU_v850e3v5"
3417 ;;
1dcad079
NC
3418 v850e2v3-*-*)
3419 target_cpu_default="TARGET_CPU_v850e2v3"
3420 ;;
3421 v850e2-*-*)
3422 target_cpu_default="TARGET_CPU_v850e2"
3423 ;;
3424 v850e1-*-* | v850es-*-*)
3425 target_cpu_default="TARGET_CPU_v850e1"
3426 ;;
3427 v850e-*-*)
3428 target_cpu_default="TARGET_CPU_v850e"
3429 ;;
3430 v850-*-*)
3431 target_cpu_default="TARGET_CPU_generic"
3432 ;;
3433 esac
fcbf5a00 3434 tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
b4378319
NC
3435 if test x$stabs = xyes
3436 then
3437 tm_file="${tm_file} dbx.h"
3438 fi
3439 use_collect2=no
3440 c_target_objs="v850-c.o"
3441 cxx_target_objs="v850-c.o"
207bf79d 3442 use_gcc_stdint=wrap
b4378319 3443 ;;
c4e75102 3444vax-*-linux*)
8e38461c 3445 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
4ad70280 3446 extra_options="${extra_options} vax/elf.opt"
c4e75102 3447 ;;
69474c3c 3448vax-*-netbsdelf*)
dfe2677b 3449 tm_file="${tm_file} elfos.h ${nbsd_tm_file} vax/elf.h vax/netbsd-elf.h"
4ad70280 3450 extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
dfe2677b 3451 tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
69474c3c 3452 ;;
61ed06c3 3453vax-*-openbsd*)
a42014a3 3454 tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-libpthread.h vax/openbsd.h"
5369e2d4 3455 extra_options="${extra_options} openbsd.opt"
61ed06c3
HPN
3456 use_collect2=yes
3457 ;;
0969ec7d
EB
3458visium-*-elf*)
3459 tm_file="dbxelf.h elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
3460 tmake_file="visium/t-visium visium/t-crtstuff"
3461 ;;
14d269bb
GK
3462xstormy16-*-elf)
3463 # For historical reasons, the target files omit the 'x'.
5519175f 3464 tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
14d269bb 3465 tm_p_file=stormy16/stormy16-protos.h
64ac3c33 3466 tm_d_file="elfos.h stormy16/stormy16.h"
14d269bb
GK
3467 md_file=stormy16/stormy16.md
3468 out_file=stormy16/stormy16.c
d45d2353 3469 extra_options=stormy16/stormy16.opt
14d269bb 3470 tmake_file="stormy16/t-stormy16"
14d269bb 3471 ;;
6d656178 3472xtensa*-*-elf*)
416ea725 3473 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
4933ae74 3474 extra_options="${extra_options} xtensa/elf.opt"
03984308 3475 ;;
6d656178 3476xtensa*-*-linux*)
8e38461c 3477 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
5f73c6cc 3478 tmake_file="${tmake_file} xtensa/t-xtensa"
03984308 3479 ;;
4a0a9457
MF
3480xtensa*-*-uclinux*)
3481 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
3482 tmake_file="${tmake_file} xtensa/t-xtensa"
3483 extra_options="${extra_options} xtensa/uclinux.opt"
3484 ;;
2beef00e 3485am33_2.0-*-linux*)
8e38461c 3486 tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
2beef00e 3487 gas=yes gnu_ld=yes
2beef00e
AO
3488 use_collect2=no
3489 ;;
7f05b779 3490m32c-*-rtems*)
24b00560 3491 tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
7f05b779
JS
3492 c_target_objs="m32c-pragma.o"
3493 cxx_target_objs="m32c-pragma.o"
3494 ;;
38b2d076 3495m32c-*-elf*)
24b00560 3496 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
38b2d076
DD
3497 c_target_objs="m32c-pragma.o"
3498 cxx_target_objs="m32c-pragma.o"
38b2d076 3499 ;;
61ed06c3 3500*)
b01bc573 3501 echo "*** Configuration ${target} not supported" 1>&2
61ed06c3
HPN
3502 exit 1
3503 ;;
3504esac
3505
f6bc51cb 3506case ${target} in
f6bc51cb 3507i[34567]86-*-linux* | x86_64-*-linux*)
ab442df7 3508 tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
f6bc51cb
L
3509 ;;
3510i[34567]86-*-* | x86_64-*-*)
ab442df7 3511 tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
f6bc51cb 3512 ;;
c5f0fe67 3513powerpc*-*-* | rs6000-*-*)
83349046 3514 tm_file="${tm_file} ${cpu_type}/option-defaults.h"
f6bc51cb
L
3515esac
3516
ad669a1a
SN
3517# non-glibc systems
3518case ${target} in
3519*-linux-musl*)
3520 tmake_file="${tmake_file} t-musl"
3521 ;;
3522*-linux-uclibc*)
3523 tmake_file="${tmake_file} t-uclibc"
3524 ;;
3525esac
3526
f25afa93
SE
3527# Assume the existence of indirect function support and allow the use of the
3528# resolver attribute.
3529case ${target} in
3530*-*-linux*android*|*-*-linux*uclibc*|*-*-linux*musl*)
3531 ;;
3532*-*-linux*)
3533 case ${target} in
d71031ff 3534 aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-*)
f25afa93
SE
3535 default_gnu_indirect_function=yes
3536 ;;
3537 esac
3538 ;;
3539esac
3540
87b6c18c
IV
3541# Build mkoffload tool
3542case ${target} in
3543*-intelmic-* | *-intelmicemul-*)
3544 tmake_file="${tmake_file} i386/t-intelmic"
41dbbb37 3545 tm_file="${tm_file} i386/intelmic-offload.h"
87b6c18c
IV
3546 ;;
3547esac
3548
acce4e77
JM
3549if [ "$target_has_targetcm" = "no" ]; then
3550 c_target_objs="$c_target_objs default-c.o"
3551 cxx_target_objs="$cxx_target_objs default-c.o"
3552fi
3553
c49a6962
JM
3554if [ "$common_out_file" = "" ]; then
3555 if [ "$target_has_targetm_common" = "yes" ]; then
3556 common_out_file="$cpu_type/$cpu_type-common.c"
3557 else
3558 common_out_file="default-common.c"
3559 fi
3560fi
3561
b4c522fa
IB
3562if [ "$target_has_targetdm" = "no" ]; then
3563 d_target_objs="$d_target_objs default-d.o"
3564fi
3565
73f09c99 3566# Support for --with-cpu and related options (and a few unrelated options,
a89ea0df 3567# too).
35341073
NN
3568case ${with_cpu} in
3569 yes | no)
3570 echo "--with-cpu must be passed a value" 1>&2
3571 exit 1
3572 ;;
3573esac
83079d89 3574
3fd77630
L
3575# Set arch and cpu from ${target} and ${target_noncanonical}. Set cpu
3576# to generic if there is no processor scheduler model for the target.
3577arch=
3578cpu=
4d16c0dc 3579arch_without_sse2=no
c6b9174f 3580arch_without_64bit=no
3fd77630 3581case ${target} in
1c379b78
TC
3582 i386-*-freebsd*)
3583 if test $fbsd_major -ge 6; then
3584 arch=i486
3585 else
3586 arch=i386
3587 fi
3588 cpu=generic
3589 arch_without_sse2=yes
3590 arch_without_64bit=yes
3591 ;;
8a45a00e
KW
3592 i386-*-netbsd*)
3593 arch=i486
3594 cpu=generic
3595 arch_without_sse2=yes
3596 arch_without_64bit=yes
3597 ;;
3fd77630
L
3598 i386-*-*)
3599 arch=i386
3600 cpu=i386
4d16c0dc 3601 arch_without_sse2=yes
c6b9174f 3602 arch_without_64bit=yes
3fd77630
L
3603 ;;
3604 i486-*-*)
3605 arch=i486
3606 cpu=i486
4d16c0dc 3607 arch_without_sse2=yes
c6b9174f 3608 arch_without_64bit=yes
3fd77630
L
3609 ;;
3610 i586-*-*)
4d16c0dc 3611 arch_without_sse2=yes
c6b9174f 3612 arch_without_64bit=yes
3fd77630
L
3613 case ${target_noncanonical} in
3614 k6_2-*)
3615 arch=k6-2
3616 cpu=k6-2
3617 ;;
3618 k6_3-*)
3619 arch=k6-3
3620 cpu=k6-3
3621 ;;
3622 k6-*)
3623 arch=k6
3624 cpu=k6
3625 ;;
3626 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
3627 arch=pentium-mmx
3628 cpu=pentium-mmx
3629 ;;
3630 *)
3631 arch=pentium
3632 cpu=pentium
3633 ;;
3634 esac
3635 ;;
3636 i686-*-* | i786-*-*)
3637 case ${target_noncanonical} in
9ce29eb0
VK
3638 znver1-*)
3639 arch=znver1
3640 cpu=znver1
3641 ;;
2901f42f
VK
3642 znver2-*)
3643 arch=znver2
3644 cpu=znver2
3645 ;;
ed97ad47
GG
3646 bdver4-*)
3647 arch=bdver4
3648 cpu=bdver4
3649 ;;
eb2f2b44
GG
3650 bdver3-*)
3651 arch=bdver3
3652 cpu=bdver3
3653 ;;
4d652a18
HJ
3654 bdver2-*)
3655 arch=bdver2
3656 cpu=bdver2
3657 ;;
1133125e
HJ
3658 bdver1-*)
3659 arch=bdver1
3660 cpu=bdver1
3661 ;;
14b52538
CF
3662 btver1-*)
3663 arch=btver1
3664 cpu=btver1
3665 ;;
e32bfc16
VK
3666 btver2-*)
3667 arch=btver2
3668 cpu=btver2
3669 ;;
3fd77630
L
3670 amdfam10-*|barcelona-*)
3671 arch=amdfam10
3672 cpu=amdfam10
3673 ;;
3674 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3675 arch=k8-sse3
3676 cpu=k8-sse3
3677 ;;
3678 k8-*|opteron-*|athlon64-*|athlon_fx-*)
3679 arch=k8
3680 cpu=k8
3681 ;;
3682 athlon_xp-*|athlon_mp-*|athlon_4-*)
3683 arch=athlon-4
3684 cpu=athlon-4
4d16c0dc 3685 arch_without_sse2=yes
c6b9174f 3686 arch_without_64bit=yes
3fd77630
L
3687 ;;
3688 athlon_tbird-*|athlon-*)
3689 arch=athlon
3690 cpu=athlon
4d16c0dc 3691 arch_without_sse2=yes
3fd77630
L
3692 ;;
3693 geode-*)
3694 arch=geode
3695 cpu=geode
4d16c0dc 3696 arch_without_sse2=yes
3fd77630
L
3697 ;;
3698 pentium2-*)
3699 arch=pentium2
3700 cpu=pentium2
4d16c0dc 3701 arch_without_sse2=yes
3fd77630
L
3702 ;;
3703 pentium3-*|pentium3m-*)
3704 arch=pentium3
3705 cpu=pentium3
4d16c0dc 3706 arch_without_sse2=yes
3fd77630
L
3707 ;;
3708 pentium4-*|pentium4m-*)
3709 arch=pentium4
3710 cpu=pentium4
3711 ;;
3712 prescott-*)
3713 arch=prescott
3714 cpu=prescott
3715 ;;
3716 nocona-*)
3717 arch=nocona
3718 cpu=nocona
3719 ;;
3720 atom-*)
3721 arch=atom
3722 cpu=atom
3723 ;;
0b871ccf
YR
3724 slm-*)
3725 arch=slm
3726 cpu=slm
3727 ;;
3fd77630
L
3728 core2-*)
3729 arch=core2
3730 cpu=core2
3731 ;;
1dbb04c9
L
3732 corei7-*)
3733 arch=corei7
3734 cpu=corei7
3735 ;;
35758e5b
L
3736 corei7_avx-*)
3737 arch=corei7-avx
3738 cpu=corei7-avx
3739 ;;
3fd77630
L
3740 pentium_m-*)
3741 arch=pentium-m
3742 cpu=pentium-m
3743 ;;
3744 pentiumpro-*)
3745 arch=pentiumpro
3746 cpu=pentiumpro
4d16c0dc 3747 arch_without_sse2=yes
3fd77630
L
3748 ;;
3749 *)
3750 arch=pentiumpro
3751 cpu=generic
4d16c0dc 3752 arch_without_sse2=yes
c6b9174f 3753 arch_without_64bit=yes
3fd77630
L
3754 ;;
3755 esac
3756 ;;
3757 x86_64-*-*)
3758 case ${target_noncanonical} in
9ce29eb0
VK
3759 znver1-*)
3760 arch=znver1
3761 cpu=znver1
3762 ;;
2901f42f
VK
3763 znver2-*)
3764 arch=znver2
3765 cpu=znver2
3766 ;;
ed97ad47
GG
3767 bdver4-*)
3768 arch=bdver4
3769 cpu=bdver4
3770 ;;
eb2f2b44
GG
3771 bdver3-*)
3772 arch=bdver3
3773 cpu=bdver3
3774 ;;
4d652a18
HJ
3775 bdver2-*)
3776 arch=bdver2
3777 cpu=bdver2
3778 ;;
1133125e
HJ
3779 bdver1-*)
3780 arch=bdver1
3781 cpu=bdver1
3782 ;;
14b52538
CF
3783 btver1-*)
3784 arch=btver1
3785 cpu=btver1
3786 ;;
e32bfc16
VK
3787 btver2-*)
3788 arch=btver2
3789 cpu=btver2
3790 ;;
3fd77630
L
3791 amdfam10-*|barcelona-*)
3792 arch=amdfam10
3793 cpu=amdfam10
3794 ;;
3795 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3796 arch=k8-sse3
3797 cpu=k8-sse3
3798 ;;
3799 k8-*|opteron-*|athlon_64-*)
3800 arch=k8
3801 cpu=k8
3802 ;;
3803 nocona-*)
3804 arch=nocona
3805 cpu=nocona
3806 ;;
3807 atom-*)
3808 arch=atom
3809 cpu=atom
3810 ;;
0b871ccf
YR
3811 slm-*)
3812 arch=slm
3813 cpu=slm
3814 ;;
3fd77630
L
3815 core2-*)
3816 arch=core2
3817 cpu=core2
3818 ;;
1dbb04c9
L
3819 corei7-*)
3820 arch=corei7
3821 cpu=corei7
3822 ;;
3fd77630
L
3823 *)
3824 arch=x86-64
3825 cpu=generic
3826 ;;
3827 esac
3828 ;;
3829esac
3830
35341073
NN
3831# If there is no $with_cpu option, try to infer one from ${target}.
3832# This block sets nothing except for with_cpu.
3833if test x$with_cpu = x ; then
3834 case ${target} in
a0f4ee6e 3835 i[34567]86-*-elfiamcu)
2d6b2e28 3836 with_cpu=lakemont
a0f4ee6e 3837 ;;
3fd77630
L
3838 i[34567]86-*-*|x86_64-*-*)
3839 with_cpu=$cpu
35341073
NN
3840 ;;
3841 alphaev6[78]*-*-*)
3842 with_cpu=ev67
3843 ;;
3844 alphaev6*-*-*)
3845 with_cpu=ev6
3846 ;;
3847 alphapca56*-*-*)
3848 with_cpu=pca56
3849 ;;
3850 alphaev56*-*-*)
3851 with_cpu=ev56
3852 ;;
3853 alphaev5*-*-*)
3854 with_cpu=ev5
3855 ;;
faf9ab98 3856 frv-*-*linux* | frv400-*-*linux*)
34208acf
AO
3857 with_cpu=fr400
3858 ;;
faf9ab98
AH
3859 frv550-*-*linux*)
3860 with_cpu=fr550
3861 ;;
59fbf3cb 3862 m68k*-*-*)
10e96df4
NS
3863 case "$with_arch" in
3864 "cf")
3865 with_cpu=${default_cf_cpu}
3866 ;;
3867 "" | "m68k")
3868 with_cpu=m${default_m68k_cpu}
3869 ;;
3870 esac
59fbf3cb 3871 ;;
35341073 3872 sparc*-*-*)
1f65ae7a
EB
3873 case ${target} in
3874 *-leon-*)
3875 with_cpu=leon
3876 ;;
3877 *-leon[3-9]*)
3878 with_cpu=leon3
3879 ;;
d81230b5
DH
3880 *-leon[3-9]v7*)
3881 with_cpu=leon3v7
3882 ;;
1f65ae7a
EB
3883 *)
3884 with_cpu="`echo ${target} | sed 's/-.*$//'`"
3885 ;;
3886 esac
35341073 3887 ;;
175650bc
OH
3888 visium-*-*)
3889 with_cpu=gr5
3890 ;;
35341073 3891 esac
8981c15b
JM
3892
3893 # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
3894 case ${target} in
3895 i[34567]86-*-*|x86_64-*-*)
3fd77630
L
3896 if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
3897 if test x$with_cpu_32 = x; then
3898 with_cpu_32=$with_cpu
3899 fi
3900 if test x$with_cpu_64 = x; then
3901 with_cpu_64=$with_cpu
3902 fi
3903 with_cpu=
3904 fi
3905 ;;
3906 esac
3907fi
3908
3909# Support for --with-arch and related options (and a few unrelated options,
3910# too).
3911case ${with_arch} in
3912 yes | no)
3913 echo "--with-arch must be passed a value" 1>&2
3914 exit 1
3915 ;;
3916esac
3917
3918# If there is no $with_arch option, try to infer one from ${target}.
3919# This block sets nothing except for with_arch.
3920if test x$with_arch = x ; then
3921 case ${target} in
91ad7e13
L
3922 i[34567]86-*-darwin*|x86_64-*-darwin*)
3923 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3924 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3925 ;;
a0f4ee6e 3926 i[34567]86-*-elfiamcu)
2d6b2e28 3927 with_arch=lakemont
a0f4ee6e 3928 ;;
a3af5e26 3929 i[34567]86-*-*)
4d16c0dc
L
3930 # --with-fpmath sets the default ISA to SSE2, which is the same
3931 # ISA supported by Pentium 4.
3932 if test x$with_fpmath = x || test $arch_without_sse2 = no; then
3933 with_arch=$arch
3934 else
3935 with_arch=pentium4
a3af5e26
L
3936 fi
3937 ;;
3938 x86_64-*-*)
3fd77630
L
3939 with_arch=$arch
3940 ;;
74240413
RS
3941 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3942 with_arch=r5900
3943 ;;
3944 mips*-*-vxworks)
3945 with_arch=mips2
3946 ;;
3fd77630
L
3947 esac
3948
3949 # Avoid overriding --with-arch-32 and --with-arch-64 values.
3950 case ${target} in
91ad7e13
L
3951 i[34567]86-*-darwin*|x86_64-*-darwin*)
3952 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3953 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3954 ;;
3fd77630
L
3955 i[34567]86-*-*|x86_64-*-*)
3956 if test x$with_arch_32 != x || test x$with_arch_64 != x; then
3957 if test x$with_arch_32 = x; then
55c4eeaa 3958 with_arch_32=$with_arch
3fd77630
L
3959 fi
3960 if test x$with_arch_64 = x; then
c6b9174f
L
3961 if test $arch_without_64bit = yes; then
3962 # Set the default 64bit arch to x86-64 if the default arch
3963 # doesn't support 64bit.
3964 with_arch_64=x86-64
3965 else
55c4eeaa 3966 with_arch_64=$with_arch
c6b9174f 3967 fi
3fd77630
L
3968 fi
3969 with_arch=
c6b9174f
L
3970 elif test $arch_without_64bit$need_64bit_isa = yesyes; then
3971 # Set the default 64bit arch to x86-64 if the default arch
3972 # doesn't support 64bit and we need 64bit ISA.
55c4eeaa 3973 with_arch_32=$with_arch
c6b9174f
L
3974 with_arch_64=x86-64
3975 with_arch=
8981c15b
JM
3976 fi
3977 ;;
3978 esac
35341073 3979fi
83079d89 3980
74240413
RS
3981# Infer a default setting for --with-float.
3982if test x$with_float = x; then
3983 case ${target} in
3984 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3985 # The R5900 doesn't support 64-bit float. 32-bit float doesn't
3986 # comply with IEEE 754.
3987 with_float=soft
3988 ;;
3989 esac
3990fi
3991
04dfc6df
JU
3992# Infer a default setting for --with-fpu.
3993if test x$with_fpu = x; then
3994 case ${target} in
3995 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3996 # The R5900 FPU only supports single precision.
3997 with_fpu=single
3998 ;;
3999 esac
4000fi
4001
a3af5e26
L
4002# Support --with-fpmath.
4003if test x$with_fpmath != x; then
4004 case ${target} in
4005 i[34567]86-*-* | x86_64-*-*)
4006 case ${with_fpmath} in
b71e5eba
UB
4007 avx)
4008 tm_file="${tm_file} i386/avxmath.h"
4009 ;;
a3af5e26
L
4010 sse)
4011 tm_file="${tm_file} i386/ssemath.h"
4012 ;;
4013 *)
4014 echo "Invalid --with-fpmath=$with_fpmath" 1>&2
4015 exit 1
4016 ;;
4017 esac
4018 ;;
4019 *)
4020 echo "--with-fpmath isn't supported for $target." 1>&2
4021 exit 1
4022 ;;
4023 esac
4024fi
4025
fe3e7450
AM
4026# Similarly for --with-schedule.
4027if test x$with_schedule = x; then
4028 case ${target} in
cd985f66 4029 hppa1*)
fe3e7450
AM
4030 # Override default PA8000 scheduling model.
4031 with_schedule=7100LC
4032 ;;
4033 esac
4034fi
83079d89 4035
74240413
RS
4036# Infer a default setting for --with-llsc.
4037if test x$with_llsc = x; then
4038 case ${target} in
74240413
RS
4039 mips*-*-linux*)
4040 # The kernel emulates LL and SC where necessary.
4041 with_llsc=yes
4042 ;;
240ae287
FN
4043 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
4044 # The R5900 doesn't support LL(D) and SC(D).
4045 with_llsc=no
4046 ;;
74240413
RS
4047 esac
4048fi
4049
fe3e7450
AM
4050# Validate and mark as valid any --with options supported
4051# by this target. In order to use a particular --with option
4052# you must list it in supported_defaults; validating the value
4053# is optional. This case statement should set nothing besides
4054# supported_defaults.
7816bea0 4055
fe3e7450
AM
4056supported_defaults=
4057case "${target}" in
24034425 4058 aarch64*-*-*)
17a819cb 4059 supported_defaults="abi cpu arch"
24034425
IB
4060 for which in cpu arch; do
4061
4062 eval "val=\$with_$which"
4063 base_val=`echo $val | sed -e 's/\+.*//'`
1140d42f 4064 ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
24034425
IB
4065
4066 if [ $which = arch ]; then
4067 def=aarch64-arches.def
4068 pattern=AARCH64_ARCH
4069 else
4070 def=aarch64-cores.def
4071 pattern=AARCH64_CORE
4072 fi
4073
4074 ext_mask=AARCH64_CPU_DEFAULT_FLAGS
4075
4076 # Find the base CPU or ARCH id in aarch64-cores.def or
4077 # aarch64-arches.def
4078 if [ x"$base_val" = x ] \
4079 || grep "^$pattern(\"$base_val\"," \
4080 ${srcdir}/config/aarch64/$def \
4081 > /dev/null; then
4082
4083 if [ $which = arch ]; then
4084 base_id=`grep "^$pattern(\"$base_val\"," \
4085 ${srcdir}/config/aarch64/$def | \
4086 sed -e 's/^[^,]*,[ ]*//' | \
4087 sed -e 's/,.*$//'`
a3cd0246
KT
4088 # Extract the architecture flags from aarch64-arches.def
4089 ext_mask=`grep "^$pattern(\"$base_val\"," \
4090 ${srcdir}/config/aarch64/$def | \
4091 sed -e 's/)$//' | \
4092 sed -e 's/^.*,//'`
24034425
IB
4093 else
4094 base_id=`grep "^$pattern(\"$base_val\"," \
4095 ${srcdir}/config/aarch64/$def | \
4096 sed -e 's/^[^,]*,[ ]*//' | \
4097 sed -e 's/,.*$//'`
4098 fi
4099
3644cadf
TC
4100 # Use the pre-processor to strip flatten the options.
4101 # This makes the format less rigid than if we use
4102 # grep and sed directly here.
4103 opt_macro="AARCH64_OPT_EXTENSION(A, B, C, D, E, F)=A, B, C, D, E, F"
4104 options_parsed="`$ac_cv_prog_CPP -D"$opt_macro" -x c \
4105 ${srcdir}/config/aarch64/aarch64-option-extensions.def`"
4106
4107 # Match one element inside AARCH64_OPT_EXTENSION, we
4108 # consume anything that's not a ,.
4109 elem="[ ]*\([^,]\+\)[ ]*"
4110
4111 # Repeat the pattern for the number of entries in the
4112 # AARCH64_OPT_EXTENSION, currently 6 times.
4113 sed_patt="^$elem,$elem,$elem,$elem,$elem,$elem"
4114
24034425
IB
4115 while [ x"$ext_val" != x ]
4116 do
4117 ext_val=`echo $ext_val | sed -e 's/\+//'`
4118 ext=`echo $ext_val | sed -e 's/\+.*//'`
4119 base_ext=`echo $ext | sed -e 's/^no//'`
3644cadf
TC
4120 opt_line=`echo -e "$options_parsed" | \
4121 grep "^\"$base_ext\""`
24034425
IB
4122
4123 if [ x"$base_ext" = x ] \
3644cadf
TC
4124 || [[ -n $opt_line ]]; then
4125
4126 # These regexp extract the elements based on
4127 # their group match index in the regexp.
4128 ext_canon=`echo -e "$opt_line" | \
4129 sed -e "s/$sed_patt/\2/"`
4130 ext_on=`echo -e "$opt_line" | \
4131 sed -e "s/$sed_patt/\3/"`
4132 ext_off=`echo -e "$opt_line" | \
4133 sed -e "s/$sed_patt/\4/"`
24034425
IB
4134
4135 if [ $ext = $base_ext ]; then
4136 # Adding extension
04a99ebe 4137 ext_mask="("$ext_mask") | ("$ext_on" | "$ext_canon")"
24034425
IB
4138 else
4139 # Removing extension
04a99ebe 4140 ext_mask="("$ext_mask") & ~("$ext_off" | "$ext_canon")"
24034425
IB
4141 fi
4142
4143 true
4144 else
4145 echo "Unknown extension used in --with-$which=$val" 1>&2
4146 exit 1
4147 fi
4148 ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
4149 done
4150
4151 ext_mask="(("$ext_mask") << 6)"
4152 if [ x"$base_id" != x ]; then
4153 target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
4154 fi
4155 true
4156 else
4157 echo "Unknown $which used in --with-$which=$val" 1>&2
4158 exit 1
4159 fi
4160 done
4161 ;;
4162
83079d89 4163 alpha*-*-*)
7816bea0
DJ
4164 supported_defaults="cpu tune"
4165 for which in cpu tune; do
4166 eval "val=\$with_$which"
b597bfd8
NN
4167 case "$val" in
4168 "" \
4169 | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
4170 | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
4171 | 21264a)
7816bea0
DJ
4172 ;;
4173 *)
4174 echo "Unknown CPU used in --with-$which=$val" 1>&2
4175 exit 1
4176 ;;
4177 esac
4178 done
4179 ;;
4180
f9ccf899 4181 arc*-*-*)
53426f6c 4182 supported_defaults="cpu"
f9ccf899
CZ
4183
4184 if [ x"$with_cpu" = x ] \
4185 || grep "^ARC_CPU ($with_cpu," \
4186 ${srcdir}/config/arc/arc-cpus.def \
4187 > /dev/null; then
4188 # Ok
4189 true
4190 else
4191 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4192 exit 1
4193 fi
53426f6c
JR
4194 ;;
4195
56856b58
J
4196 csky-*-*)
4197 supported_defaults="cpu endian float"
4198 ;;
4199
7816bea0 4200 arm*-*-*)
7cf13d1f 4201 supported_defaults="arch cpu float tune fpu abi mode tls"
a92ffb3e
RE
4202 for which in cpu tune arch; do
4203 # See if it matches a supported value
7816bea0 4204 eval "val=\$with_$which"
a92ffb3e
RE
4205 if [ x"$val" != x ]; then
4206 cpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
4207 -v cmd="chk$which $val" \
4208 ${srcdir}/config/arm/arm-cpus.in`
4209 if [ "$cpu" = "error" ]; then
4210 echo "Unknown target in --with-$which=$val" 1>&2
4211 exit 1
4212 else
4213 new_val=$cpu
4214 eval "target_${which}_cname=$new_val"
4215 echo "For $val real value is $new_val"
d3d3f1af 4216 fi
2682e19f 4217 fi
7816bea0
DJ
4218 done
4219
b597bfd8
NN
4220 case "$with_float" in
4221 "" \
9b66ebb1 4222 | soft | hard | softfp)
83079d89 4223 # OK
73f09c99 4224 ;;
83079d89 4225 *)
7816bea0 4226 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
83079d89 4227 exit 1
73f09c99
DJ
4228 ;;
4229 esac
7816bea0 4230
a92ffb3e
RE
4231 # see if --with-fpu matches any of the supported FPUs
4232 if [ x"$with_fpu" != x ] ; then
170f2d18 4233 val=$with_fpu
a92ffb3e 4234 fpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
170f2d18 4235 -v cmd="chkfpu $val" \
a92ffb3e 4236 ${srcdir}/config/arm/arm-cpus.in`
170f2d18 4237 if [ "$fpu" = "error" ]
a92ffb3e 4238 then
170f2d18 4239 echo "Unknown target in --with-fpu=$val" 1>&2
a92ffb3e
RE
4240 exit 1
4241 fi
14562eb9 4242 fi
5848830f
PB
4243
4244 case "$with_abi" in
4245 "" \
ebca2d91 4246 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
5848830f
PB
4247 #OK
4248 ;;
4249 *)
4250 echo "Unknown ABI used in --with-abi=$with_abi"
9b66ebb1
PB
4251 exit 1
4252 ;;
4253 esac
4254
3cf94279
PB
4255 case "$with_mode" in
4256 "" \
4257 | arm | thumb )
4258 #OK
4259 ;;
4260 *)
4261 echo "Unknown mode used in --with-mode=$with_mode"
4262 exit 1
4263 ;;
4264 esac
4265
7cf13d1f
NS
4266 case "$with_tls" in
4267 "" \
4268 | gnu | gnu2)
4269 # OK
4270 ;;
4271 *)
4272 echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
4273 exit 1
4274 ;;
4275 esac
4276
7816bea0 4277 if test "x$with_arch" != x && test "x$with_cpu" != x; then
0cdb761c
JG
4278 echo "Switch \"--with-arch\" may not be used with switch \"--with-cpu\"" 1>&2
4279 exit 1
4280 fi
4281
4282 if test "x$with_cpu" != x && test "x$with_tune" != x; then
4283 echo "Switch \"--with-tune\" may not be used with switch \"--with-cpu\"" 1>&2
4284 exit 1
7816bea0 4285 fi
c9acb877
MGD
4286
4287 # Add extra multilibs
4288 if test "x$with_multilib_list" != x; then
5d6551f5 4289 ml=
c9acb877 4290 arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
2f738ca5
TP
4291 if test "x${arm_multilibs}" != xdefault ; then
4292 for arm_multilib in ${arm_multilibs}; do
4293 case ${arm_multilib} in
4294 aprofile|rmprofile)
4295 tmake_profile_file="arm/t-multilib"
4296 ;;
5d6551f5
AO
4297 @*)
4298 ml=`echo "X$arm_multilib" | sed '1s,^X@,,'`
4299 if test -f "${srcdir}/config/arm/${ml}"; then
4300 tmake_file="${tmake_file} arm/${ml}"
4301 else
4302 echo "Error: ${ml} does not exist in ${srcdir}/config/arm" >&2
4303 exit 1
4304 fi
4305 ;;
2f738ca5
TP
4306 *)
4307 echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
4308 exit 1
4309 ;;
4310 esac
4311 done
c2f46874 4312 fi
ec6be462
TP
4313
4314 if test "x${tmake_profile_file}" != x ; then
3e0201f0
TP
4315 # arm/t-aprofile and arm/t-rmprofile are only
4316 # designed to work without any with-cpu,
4317 # with-arch, with-mode, with-fpu or with-float
4318 # options.
ec6be462
TP
4319 if test "x$with_arch" != x \
4320 || test "x$with_cpu" != x \
4321 || test "x$with_float" != x \
4322 || test "x$with_fpu" != x \
4323 || test "x$with_mode" != x ; then
4324 echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=${with_multilib_list}" 1>&2
4325 exit 1
5d6551f5
AO
4326 elif test "x$ml" != x ; then
4327 echo "Error: You cannot use builtin multilib profiles along with custom ones" 1>&2
4328 exit 1
ec6be462 4329 fi
93aa40fe
RE
4330 # But pass the default value for float-abi
4331 # through to the multilib selector
4332 with_float="soft"
ec6be462 4333 tmake_file="${tmake_file} ${tmake_profile_file}"
c2f46874 4334 TM_MULTILIB_CONFIG="$with_multilib_list"
ec6be462 4335 fi
c9acb877 4336 fi
7a433140 4337 target_cpu_cname=${target_cpu_cname:-arm7tdmi}
a4af8a10 4338 with_cpu=${with_cpu:-$target_cpu_cname}
73f09c99 4339 ;;
73f09c99 4340
34208acf
AO
4341 fr*-*-*linux*)
4342 supported_defaults=cpu
4343 case "$with_cpu" in
4344 fr400) ;;
faf9ab98 4345 fr550) ;;
34208acf
AO
4346 *)
4347 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4348 exit 1
4349 ;;
4350 esac
4351 ;;
4352
cd985f66 4353 fido-*-* | m68k*-*-*)
10e96df4
NS
4354 supported_defaults="arch cpu"
4355 case "$with_arch" in
4356 "" | "m68k"| "cf")
4357 m68k_arch_family="$with_arch"
4358 ;;
4359 *)
4360 echo "Invalid --with-arch=$with_arch" 1>&2
4361 exit 1
4362 ;;
4363 esac
59fbf3cb
NS
4364
4365 # We always have a $with_cpu setting here.
3704aae9 4366 case "$with_cpu" in
900ec02d
JB
4367 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
4368 m68k_cpu_ident=$with_cpu
4369 ;;
4370 "m68020-40")
4371 m68k_cpu_ident=m68020
4372 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
4373 ;;
4374 "m68020-60")
4375 m68k_cpu_ident=m68020
4376 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3704aae9
RZ
4377 ;;
4378 *)
900ec02d
JB
4379 # We need the C identifier rather than the string.
4380 m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
4381 'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
4382 $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
4383 ${srcdir}/config/m68k/m68k-devices.def`
4384 if [ x"$m68k_cpu_ident" = x ] ; then
4385 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
4386 exit 1
4387 fi
4388 with_cpu="mcpu=$with_cpu"
3704aae9
RZ
4389 ;;
4390 esac
4391 ;;
4392
7431c1a1
AS
4393 amdgcn-*-*)
4394 supported_defaults="arch tune"
4395
4396 for which in arch tune; do
4397 eval "val=\$with_$which"
4398 case ${val} in
591f869a 4399 "" | fiji | gfx900 | gfx906 )
7431c1a1
AS
4400 # OK
4401 ;;
4402 *)
4403 echo "Unknown cpu used in --with-$which=$val." 1>&2
4404 exit 1
4405 ;;
4406 esac
4407 done
4408 [ "x$with_arch" = x ] && with_arch=fiji
4409 ;;
4410
cd985f66 4411 hppa*-*-*)
7816bea0
DJ
4412 supported_defaults="arch schedule"
4413
b597bfd8
NN
4414 case "$with_arch" in
4415 "" | 1.0 | 1.1 | 2.0)
7816bea0
DJ
4416 # OK
4417 ;;
4418 *)
4419 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
4420 exit 1
4421 ;;
4422 esac
4423
b597bfd8
NN
4424 case "$with_schedule" in
4425 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
83079d89
DJ
4426 # OK
4427 ;;
4428 *)
4429 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
4430 exit 1
4431 ;;
4432 esac
73f09c99 4433 ;;
73f09c99 4434
83079d89 4435 i[34567]86-*-* | x86_64-*-*)
0465e49e 4436 supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
8981c15b 4437 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7816bea0 4438 eval "val=\$with_$which"
646bdeab
L
4439 case " $x86_archs " in
4440 *" ${val} "*)
d326eaf0
JH
4441 case "${target}" in
4442 x86_64-*-*)
8981c15b
JM
4443 case "x$which" in
4444 *_32)
4445 ;;
4446 *)
4447 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
4448 exit 1
4449 ;;
4450 esac
d326eaf0
JH
4451 ;;
4452 esac
4453 # OK
4454 ;;
7816bea0 4455 *)
646bdeab
L
4456 if test x${val} != x; then
4457 case " $x86_64_archs " in
4458 *" ${val} "*)
4459 # OK
4460 ;;
4461 *)
4462 # Allow $x86_cpus --with-cpu=/--with-tune=
4463 case "x$which" in
4464 xcpu*|xtune*)
4465 case " $x86_cpus " in
4466 *" ${val} "*)
4467 # OK
4468 ;;
4469 *)
4470 echo "Unknown CPU given in --with-$which=$val." 1>&2
4471 exit 1
4472 ;;
4473 esac
4474 ;;
4475 *)
4476 echo "Unknown CPU given in --with-$which=$val." 1>&2
4477 exit 1
4478 ;;
4479 esac
4480 ;;
4481 esac
4482 fi
7816bea0
DJ
4483 ;;
4484 esac
4485 done
4486 ;;
4487
09cae750 4488 riscv*-*-*)
8e966210 4489 supported_defaults="abi arch tune riscv_attribute"
09cae750
PD
4490
4491 case "${target}" in
edace3e2 4492 riscv-* | riscv32*) xlen=32 ;;
09cae750
PD
4493 riscv64*) xlen=64 ;;
4494 *) echo "Unsupported RISC-V target ${target}" 1>&2; exit 1 ;;
4495 esac
4496
8e966210
KC
4497 case "${with_riscv_attribute}" in
4498 yes)
4499 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
4500 ;;
4501 no)
4502 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0"
4503 ;;
4504 ""|default)
4505 case "${target}" in
4506 riscv*-*-elf*)
4507 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=1"
4508 ;;
4509 *)
4510 tm_defines="${tm_defines} TARGET_RISCV_ATTRIBUTE=0"
4511 ;;
4512 esac
4513 ;;
4514 *)
4515 echo "--with-riscv-attribute=${with_riscv_attribute} is not supported. The argument must begin with yes, no or default." 1>&2
4516 exit 1
4517 ;;
4518 esac
4519
4520
09cae750
PD
4521 # Infer arch from --with-arch, --target, and --with-abi.
4522 case "${with_arch}" in
09baee1a 4523 rv32e* | rv32i* | rv32g* | rv64i* | rv64g*)
09cae750
PD
4524 # OK.
4525 ;;
4526 "")
4527 # Infer XLEN, but otherwise assume GC.
4528 case "${with_abi}" in
09baee1a 4529 ilp32e) with_arch="rv32e" ;;
09cae750
PD
4530 ilp32 | ilp32f | ilp32d) with_arch="rv32gc" ;;
4531 lp64 | lp64f | lp64d) with_arch="rv64gc" ;;
4532 *) with_arch="rv${xlen}gc" ;;
4533 esac
4534 ;;
4535 *)
09baee1a 4536 echo "--with-arch=${with_arch} is not supported. The argument must begin with rv32e, rv32i, rv32g, rv64i, or rv64g." 1>&2
09cae750
PD
4537 exit 1
4538 ;;
4539 esac
4540
4541 # Make sure --with-abi is valid. If it was not specified,
4542 # pick a default based on the ISA, preferring soft-float
4543 # unless the D extension is present.
4544 case "${with_abi}" in
09baee1a 4545 ilp32 | ilp32e | ilp32f | ilp32d | lp64 | lp64f | lp64d)
09cae750
PD
4546 ;;
4547 "")
4548 case "${with_arch}" in
4549 rv32*d* | rv32g*) with_abi=ilp32d ;;
09baee1a 4550 rv32e*) with_abi=ilp32e ;;
09cae750
PD
4551 rv32*) with_abi=ilp32 ;;
4552 rv64*d* | rv64g*) with_abi=lp64d ;;
4553 rv64*) with_abi=lp64 ;;
4554 esac
4555 ;;
4556 *)
4557 echo "--with-abi=${with_abi} is not supported" 1>&2
4558 exit 1
4559 ;;
4560 esac
4561
4562 # Make sure ABI and ISA are compatible.
4563 case "${with_abi},${with_arch}" in
09baee1a 4564 ilp32,rv32* | ilp32e,rv32e* \
09cae750
PD
4565 | ilp32f,rv32*f* | ilp32f,rv32g* \
4566 | ilp32d,rv32*d* | ilp32d,rv32g* \
4567 | lp64,rv64* \
4568 | lp64f,rv64*f* | lp64f,rv64g* \
4569 | lp64d,rv64*d* | lp64d,rv64g*)
4570 ;;
4571 *)
4572 echo "--with-abi=${with_abi} is not supported for ISA ${with_arch}" 1>&2
4573 exit 1
4574 ;;
4575 esac
f2410266
JW
4576
4577 # Handle --with-multilib-list.
4578 if test "x${with_multilib_list}" != xdefault; then
4579 tm_file="${tm_file} riscv/withmultilib.h"
4580 tmake_file="${tmake_file} riscv/t-withmultilib"
4581
4582 case ${with_multilib_list} in
4583 ilp32 | ilp32f | ilp32d \
4584 | lp64 | lp64f | lp64d )
4585 TM_MULTILIB_CONFIG="${with_arch},${with_multilib_list}"
4586 ;;
4587 *)
4588 echo "--with-multilib-list=${with_multilib_list} not supported."
4589 exit 1
4590 esac
4591
4592 # Define macros to select the default multilib.
4593 case ${with_arch} in
4594 rv32gc)
4595 tm_defines="${tm_defines} TARGET_MLIB_ARCH=1"
4596 ;;
4597 rv64gc)
4598 tm_defines="${tm_defines} TARGET_MLIB_ARCH=2"
4599 ;;
4600 *)
4601 echo "unsupported --with-arch for --with-multilib-list"
4602 exit 1
4603 esac
4604 case ${with_abi} in
4605 ilp32)
4606 tm_defines="${tm_defines} TARGET_MLIB_ABI=1"
4607 ;;
4608 ilp32f)
4609 tm_defines="${tm_defines} TARGET_MLIB_ABI=2"
4610 ;;
4611 ilp32d)
4612 tm_defines="${tm_defines} TARGET_MLIB_ABI=3"
4613 ;;
4614 lp64)
4615 tm_defines="${tm_defines} TARGET_MLIB_ABI=4"
4616 ;;
4617 lp64f)
4618 tm_defines="${tm_defines} TARGET_MLIB_ABI=5"
4619 ;;
4620 lp64d)
4621 tm_defines="${tm_defines} TARGET_MLIB_ABI=6"
4622 ;;
4623 *)
4624 echo "unsupported --with-abi for --with-multilib"
4625 exit 1
4626 esac
4627 fi
09cae750
PD
4628 ;;
4629
7816bea0 4630 mips*-*-*)
d821744c 4631 supported_defaults="abi arch arch_32 arch_64 float fpu nan fp_32 odd_spreg_32 tune tune_32 tune_64 divide llsc mips-plt synci lxc1-sxc1 madd4"
7816bea0 4632
16aa42c0
NN
4633 case ${with_float} in
4634 "" | soft | hard)
83079d89
DJ
4635 # OK
4636 ;;
4637 *)
7816bea0 4638 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
83079d89
DJ
4639 exit 1
4640 ;;
4641 esac
73f09c99 4642
04dfc6df
JU
4643 case ${with_fpu} in
4644 "" | single | double)
4645 # OK
4646 ;;
4647 *)
4648 echo "Unknown fpu type used in --with-fpu=$with_fpu" 1>&2
4649 exit 1
4650 ;;
4651 esac
4652
ff3f3951
MR
4653 case ${with_nan} in
4654 "" | 2008 | legacy)
4655 # OK
4656 ;;
4657 *)
4658 echo "Unknown NaN encoding used in --with-nan=$with_nan" 1>&2
4659 exit 1
4660 ;;
4661 esac
4662
050af144
MF
4663 case ${with_fp_32} in
4664 "" | 32 | xx | 64)
4665 # OK
4666 ;;
4667 *)
4668 echo "Unknown FP mode used in --with-fp-32=$with_fp_32" 1>&2
4669 exit 1
4670 ;;
4671 esac
4672
4673 case ${with_odd_spreg_32} in
4674 yes)
4675 with_odd_spreg_32="odd-spreg"
4676 ;;
4677 no)
4678 with_odd_spreg_32="no-odd-spreg"
4679 ;;
4680 "")
4681 # OK
4682 ;;
4683 *)
4684 echo "Unknown odd-spreg-32 type used in --with-odd-spreg-32=$with_odd_spreg_32" 1>&2
4685 exit 1
4686 ;;
4687 esac
4688
16aa42c0
NN
4689 case ${with_abi} in
4690 "" | 32 | o64 | n32 | 64 | eabi)
83079d89
DJ
4691 # OK
4692 ;;
4693 *)
7816bea0 4694 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
83079d89
DJ
4695 exit 1
4696 ;;
4697 esac
9f0df97a
DD
4698
4699 case ${with_divide} in
4700 "" | breaks | traps)
4701 # OK
4702 ;;
4703 *)
4704 echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
4705 exit 1
66471b47
DD
4706 ;;
4707 esac
4708
4709 case ${with_llsc} in
4710 yes)
4711 with_llsc=llsc
4712 ;;
4713 no)
4714 with_llsc="no-llsc"
4715 ;;
4716 "")
4717 # OK
4718 ;;
4719 *)
4720 echo "Unknown llsc type used in --with-llsc" 1>&2
4721 exit 1
4722 ;;
9f0df97a 4723 esac
e21d5757
DJ
4724
4725 case ${with_mips_plt} in
4726 yes)
4727 with_mips_plt=plt
4728 ;;
4729 no)
4730 with_mips_plt=no-plt
4731 ;;
4732 "")
4733 ;;
4734 *)
4735 echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
4736 exit 1
4737 ;;
4738 esac
b96c5923
DD
4739
4740 case ${with_synci} in
4741 yes)
4742 with_synci=synci
4743 ;;
965c1798 4744 no)
b96c5923
DD
4745 with_synci=no-synci
4746 ;;
965c1798
SE
4747 "")
4748 ;;
b96c5923
DD
4749 *)
4750 echo "Unknown synci type used in --with-synci" 1>&2
4751 exit 1
4752 ;;
4753 esac
ab6b44cb
MF
4754
4755 case ${with_lxc1_sxc1} in
4756 yes)
4757 with_lxc1_sxc1=lxc1-sxc1
4758 ;;
4759 no)
4760 with_lxc1_sxc1=no-lxc1-sxc1
4761 ;;
4762 "")
4763 ;;
4764 *)
4765 echo "Unknown lxc1-sxc1 type used in --with-lxc1-sxc1" 1>&2
4766 exit 1
4767 ;;
4768 esac
d821744c
MF
4769
4770 case ${with_madd4} in
4771 yes)
4772 with_madd4=madd4
4773 ;;
4774 no)
4775 with_madd4=no-madd4
4776 ;;
4777 "")
4778 ;;
4779 *)
4780 echo "Unknown madd4 type used in --with-madd4" 1>&2
4781 exit 1
4782 ;;
4783 esac
9304f876
CJW
4784 ;;
4785
4786 nds32*-*-*)
e2286268 4787 supported_defaults="arch cpu nds32_lib float fpu_config"
9304f876
CJW
4788
4789 # process --with-arch
4790 case "${with_arch}" in
e2286268
MC
4791 "" | v3 )
4792 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
4793 ;;
4794 v2 | v2j | v3m)
9304f876 4795 # OK
e2286268
MC
4796 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
4797 ;;
4798 v3f)
4799 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=1"
4800 ;;
4801 v3s)
4802 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=2"
4803
9304f876
CJW
4804 ;;
4805 *)
e2286268 4806 echo "Cannot accept --with-arch=$with_arch, available values are: v2 v2j v3 v3m v3f v3s" 1>&2
9304f876
CJW
4807 exit 1
4808 ;;
4809 esac
4810
7f3101c0
KC
4811 case "${with_cpu}" in
4812 "")
4813 with_cpu=n9
4814 ;;
628332f8 4815 n6 | n7 |n8 | e8 | s8 | n9 | n10 | d10 | n12 | n13 | n15)
7f3101c0
KC
4816 # OK
4817 ;;
4818 *)
628332f8 4819 echo "Cannot accept --with-cpu=$with_cpu, available values are: n6 n7 n8 e8 s8 n9 n10 d10 n12 n13 n15" 1>&2
7f3101c0
KC
4820 exit 1
4821 ;;
4822 esac
4823
9304f876
CJW
4824 # process --with-nds32-lib
4825 case "${with_nds32_lib}" in
4826 "")
2a484d14
CJW
4827 case ${target} in
4828 *-*-*uclibc*)
4829 with_nds32_lib=ulibc
4830 ;;
4831 *-*-linux*)
4832 with_nds32_lib=glibc
4833 ;;
4834 *)
4835 with_nds32_lib=newlib
4836 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
4837 ;;
4838 esac
9304f876
CJW
4839 ;;
4840 newlib)
4841 # OK
cf3cd43d 4842 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
9304f876
CJW
4843 ;;
4844 mculib)
4845 # OK
cf3cd43d
CJW
4846 # for the arch=v3f or arch=v3s under mculib toolchain,
4847 # we would like to set -fno-math-errno as default
4848 case "${with_arch}" in
4849 v3f | v3s)
4850 tm_defines="${tm_defines} TARGET_DEFAULT_NO_MATH_ERRNO=1"
4851 ;;
4852 esac
4853 ;;
2a484d14 4854 glibc | uclibc)
cf3cd43d 4855 # OK
9304f876
CJW
4856 ;;
4857 *)
cf3cd43d 4858 echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib glibc uclibc" 1>&2
9304f876
CJW
4859 exit 1
4860 ;;
4861 esac
73f09c99 4862
e2286268
MC
4863 # process --with-float
4864 case "${with_float}" in
4865 "" | soft | hard)
4866 # OK
4867 ;;
4868 *)
4869 echo "Cannot accept --with-float=$with_float, available values are: soft hard" 1>&2
4870 exit 1
4871 ;;
4872 esac
4873
4874 # process --with-config-fpu
4875 case "${with_config_fpu}" in
4876 "" | 0 | 1 | 2 | 3)
4877 # OK
4878 ;;
4879 *)
4880 echo "Cannot accept --with-config-fpu=$with_config_fpu, available values from 0 to 7" 1>&2
4881 exit 1
4882 ;;
4883 esac
4884
4885
4886 ;;
77c50d73
SL
4887 nios2*-*-*)
4888 supported_defaults="arch"
4889 case "$with_arch" in
4890 "" | r1 | r2)
4891 # OK
4892 ;;
4893 *)
4894 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
4895 exit 1
4896 ;;
4897 esac
4898 ;;
4899
7816bea0 4900 powerpc*-*-* | rs6000-*-*)
5123acd2 4901 supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
7816bea0 4902
c5f0fe67 4903 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7816bea0 4904 eval "val=\$with_$which"
16aa42c0 4905 case ${val} in
1ab1739c 4906 default32 | default64)
c5f0fe67
JM
4907 case $which in
4908 cpu | tune)
4909 ;;
4910 *)
4911 echo "$val only valid for --with-cpu and --with-tune." 1>&2
4912 exit 1
4913 ;;
4914 esac
1ab1739c
JJ
4915 with_which="with_$which"
4916 eval $with_which=
4917 ;;
b0bfee6e
DE
4918 405cr)
4919 tm_defines="${tm_defines} CONFIG_PPC405CR"
4920 eval "with_$which=405"
4921 ;;
5bd93ff6 4922 "" | common | native \
71237df0 4923 | power[3456789] | power10 | power5+ | power6x \
6fa3b207
SB
4924 | powerpc | powerpc64 | powerpc64le \
4925 | rs64 \
4adf8008 4926 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
47f67e51
PB
4927 | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
4928 | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
683ed19e
EW
4929 | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
4930 | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
7816bea0
DJ
4931 # OK
4932 ;;
4933 *)
4934 echo "Unknown cpu used in --with-$which=$val." 1>&2
4935 exit 1
4936 ;;
4937 esac
4938 done
b54214fe
UW
4939
4940 case "$with_abi" in
4941 "" | elfv1 | elfv2 )
4942 #OK
4943 ;;
4944 *)
4945 echo "Unknown ABI used in --with-abi=$with_abi"
4946 exit 1
4947 ;;
4948 esac
5123acd2
MM
4949
4950 if test "x$with_advance_toolchain" != x; then
4951 if test -d "/opt/$with_advance_toolchain/." -a \
4952 -d "/opt/$with_advance_toolchain/bin/." -a \
4953 -d "/opt/$with_advance_toolchain/include/."; then
4954
4955 tm_file="$tm_file ./advance-toolchain.h"
4956 (at="/opt/$with_advance_toolchain"
4957 echo "/* Use Advance Toolchain $at */"
4958 echo
5123acd2
MM
4959 echo "#undef LINK_OS_EXTRA_SPEC32"
4960 echo "#define LINK_OS_EXTRA_SPEC32" \
4961 "\"%(link_os_new_dtags)" \
17ce4f48 4962 "-rpath $prefix/lib -rpath $at/lib\""
5123acd2
MM
4963 echo
4964 echo "#undef LINK_OS_EXTRA_SPEC64"
4965 echo "#define LINK_OS_EXTRA_SPEC64" \
4966 "\"%(link_os_new_dtags)" \
17ce4f48 4967 "-rpath $prefix/lib64 -rpath $at/lib64\""
5123acd2
MM
4968 echo
4969 echo "#undef LINK_OS_NEW_DTAGS_SPEC"
4970 echo "#define LINK_OS_NEW_DTAGS_SPEC" \
4971 "\"--enable-new-dtags\""
4972 echo
4973 echo "#undef DYNAMIC_LINKER_PREFIX"
4974 echo "#define DYNAMIC_LINKER_PREFIX \"$at\""
4975 echo
4976 echo "#undef MD_EXEC_PREFIX"
4977 echo "#define MD_EXEC_PREFIX \"$at/bin/\""
4978 echo
4979 echo "#undef MD_STARTFILE_PREFIX"
17ce4f48
TMQMF
4980 echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\""
4981 echo
4982 echo "#undef MD_STARTFILE_PREFIX_1"
4983 echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \
5123acd2
MM
4984 > advance-toolchain.h
4985 else
4986 echo "Unknown advance-toolchain $with_advance_toolchain"
4987 exit 1
4988 fi
4989 fi
8c7a27d5
MM
4990
4991 # Set up the default long double format if the user changed it.
4992 if test x$with_long_double_format = xieee; then
4993 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=1"
4994
4995 elif test x$with_long_double_format = xibm; then
4996 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0"
4997 fi
7816bea0
DJ
4998 ;;
4999
f13e0d4e
UW
5000 s390*-*-*)
5001 supported_defaults="arch mode tune"
5002
5003 for which in arch tune; do
5004 eval "val=\$with_$which"
16aa42c0 5005 case ${val} in
80f8cd77 5006 "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | z15 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12 | arch13 )
f13e0d4e
UW
5007 # OK
5008 ;;
5009 *)
5010 echo "Unknown cpu used in --with-$which=$val." 1>&2
5011 exit 1
5012 ;;
5013 esac
5014 done
5015
16aa42c0
NN
5016 case ${with_mode} in
5017 "" | esa | zarch)
f13e0d4e
UW
5018 # OK
5019 ;;
5020 *)
5021 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
5022 exit 1
5023 ;;
5024 esac
5025 ;;
5026
5ba02681 5027 sh[123456ble]*-*-* | sh-*-*)
da28a3b9 5028 supported_defaults="cpu"
25e651ca 5029 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
da28a3b9
JR
5030 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
5031 # OK
5032 ;;
157371cf
AO
5033 m2a | m2a-single | m2a-single-only | m2a-nofpu)
5034 ;;
312209c6
AO
5035 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
5036 ;;
da28a3b9
JR
5037 *)
5038 echo "Unknown CPU used in --with-cpu=$with_cpu, known values:" 1>&2
5039 echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
312209c6 5040 echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
157371cf 5041 echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
da28a3b9
JR
5042 exit 1
5043 ;;
5044 esac
5045 ;;
83079d89 5046 sparc*-*-*)
31177ef2 5047 supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
7816bea0 5048
31177ef2 5049 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7816bea0 5050 eval "val=\$with_$which"
16aa42c0 5051 case ${val} in
07981468
KE
5052 "" | sparc | sparcv9 | sparc64 \
5053 | v7 | cypress \
d81230b5 5054 | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
07981468
KE
5055 | sparclite | f930 | f934 | sparclite86x \
5056 | sparclet | tsc701 \
70847a48 5057 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
bcc3c3f1 5058 | niagara3 | niagara4 | niagara7 | m8)
7816bea0
DJ
5059 # OK
5060 ;;
5061 *)
5062 echo "Unknown cpu used in --with-$which=$val" 1>&2
5063 exit 1
5064 ;;
5065 esac
5066 done
73f09c99 5067
16aa42c0
NN
5068 case ${with_float} in
5069 "" | soft | hard)
83079d89
DJ
5070 # OK
5071 ;;
5072 *)
7816bea0 5073 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
83079d89
DJ
5074 exit 1
5075 ;;
5076 esac
73f09c99 5077 ;;
73f09c99 5078
bcead286
BS
5079 tic6x-*-*)
5080 supported_defaults="arch"
5081
5082 case ${with_arch} in
5083 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
5084 # OK
5085 ;;
5086 *)
5087 echo "Unknown arch used in --with-arch=$with_arch." 1>&2
5088 exit 1
5089 ;;
5090 esac
5091 ;;
5092
83079d89 5093 v850*-*-*)
7816bea0 5094 supported_defaults=cpu
16aa42c0 5095 case ${with_cpu} in
dbdbd982 5096 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3 | v850e3v5)
83079d89
DJ
5097 # OK
5098 ;;
5099 *)
5100 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
5101 exit 1
5102 ;;
5103 esac
73f09c99 5104 ;;
175650bc
OH
5105 visium-*-*)
5106 supported_defaults="cpu"
5107 case $with_cpu in
5108 "" | gr5 | gr6)
5109 ;;
5110 *) echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
5111 exit 1
5112 ;;
5113 esac
5114 ;;
fe3e7450 5115esac
73f09c99 5116
52e18cdf
OH
5117# Targets for which there is at least one VxWorks port should include
5118# vxworks-dummy.h to allow safe references to various TARGET_VXWORKS kinds
5119# of markers from other files in the port, including the vxworks*.h files to
5120# distinguish VxWorks variants such as VxWorks 7 or 64).
5121
5122case ${target} in
5123arm*-*-* | i[34567]86-*-* | mips*-*-* | powerpc*-*-* | sh*-*-* \
5124| sparc*-*-* | x86_64-*-*)
5125 tm_file="vxworks-dummy.h ${tm_file}"
5126 ;;
5127esac
5128
fe3e7450
AM
5129# Set some miscellaneous flags for particular targets.
5130target_cpu_default2=
5131case ${target} in
24034425 5132 aarch64*-*-*)
a3cd0246 5133 if test x"$target_cpu_cname" != x
24034425 5134 then
24034425
IB
5135 target_cpu_default2=$target_cpu_cname
5136 fi
5137 ;;
5138
83079d89 5139 arm*-*-*)
a4af8a10 5140 if test x$with_cpu = x
32078532 5141 then
a4af8a10
RE
5142 echo "Don't know the target cpu" 1>&2
5143 exit 1
32078532 5144 else
a4af8a10 5145 target_cpu_default2="\\\"$with_cpu\\\""
32078532 5146 fi
83079d89 5147 ;;
0e5a4ad8 5148
cd985f66 5149 hppa*-*-*)
83079d89 5150 if test x$gas = xyes
61ed06c3 5151 then
f4000c0b 5152 target_cpu_default2="MASK_GAS"
83079d89 5153 fi
73f09c99 5154 ;;
73f09c99 5155
cd985f66 5156 fido*-*-* | m68k*-*-*)
900ec02d 5157 target_cpu_default2=$m68k_cpu_ident
47c94d21 5158 tmake_file="m68k/t-opts $tmake_file"
10e96df4
NS
5159 if [ x"$m68k_arch_family" != x ]; then
5160 tmake_file="m68k/t-$m68k_arch_family $tmake_file"
5161 fi
900ec02d
JB
5162 ;;
5163
ff473280 5164 i[34567]86-*-darwin* | x86_64-*-darwin*)
ff473280 5165 ;;
e0cdc09f 5166 i[34567]86-*-linux* | x86_64-*-linux*)
2a25448c
IT
5167 extra_objs="${extra_objs} cet.o"
5168 tmake_file="$tmake_file i386/t-linux i386/t-cet"
e0cdc09f
MK
5169 ;;
5170 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
5171 tmake_file="$tmake_file i386/t-kfreebsd"
5172 ;;
5173 i[34567]86-*-gnu*)
5174 tmake_file="$tmake_file i386/t-gnu"
ff473280 5175 ;;
3df6ff35
AP
5176 i[34567]86-*-msdosdjgpp*)
5177 tmake_file="${tmake_file} i386/t-djgpp"
5178 ;;
ccd1242e 5179 i[34567]86-*-solaris2* | x86_64-*-solaris2*)
f128db92 5180 ;;
740f2bf3
KT
5181 i[34567]86-*-cygwin* | x86_64-*-cygwin*)
5182 ;;
5183 i[34567]86-*-mingw* | x86_64-*-mingw*)
e997fb9c 5184 ;;
dbed5a9b
JM
5185 i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
5186 ;;
b6bf4d8a
AT
5187 i[34567]86-*-freebsd*)
5188 ;;
5189 x86_64-*-freebsd*)
5190 tmake_file="${tmake_file} i386/t-freebsd64"
d78552bd 5191 ;;
c252db20 5192 ia64*-*-linux*)
c252db20 5193 ;;
ff473280 5194
83079d89 5195 mips*-*-*)
5811cb27
RS
5196 if test x$gnu_ld = xyes
5197 then
21c425ee 5198 target_cpu_default2="MASK_SPLIT_ADDRESSES"
5811cb27 5199 fi
b01bc573 5200 case ${target} in
83079d89
DJ
5201 mips*el-*-*)
5202 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
5203 ;;
5204 esac
8cfebf86
SE
5205 if test x$with_arch != x; then
5206 default_mips_arch=$with_arch
5207 fi
5208 if test x$with_abi != x; then
5209 default_mips_abi=$with_abi
5210 fi
5211 case ${default_mips_arch} in
5212 mips1) tm_defines="$tm_defines MIPS_ISA_DEFAULT=1" ;;
5213 mips2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=2" ;;
5214 mips3) tm_defines="$tm_defines MIPS_ISA_DEFAULT=3" ;;
5215 mips4) tm_defines="$tm_defines MIPS_ISA_DEFAULT=4" ;;
5216 mips32) tm_defines="$tm_defines MIPS_ISA_DEFAULT=32" ;;
5217 mips32r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=33" ;;
82f84ecb 5218 mips32r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=37" ;;
8cfebf86
SE
5219 mips64) tm_defines="$tm_defines MIPS_ISA_DEFAULT=64" ;;
5220 mips64r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=65" ;;
82f84ecb 5221 mips64r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=69" ;;
8cfebf86
SE
5222 esac
5223 case ${default_mips_abi} in
5224 32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_32" ;;
5225 o64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_O64" ;;
5226 n32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_N32" ;;
5227 64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_64" ;;
5228 eabi) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_EABI" ;;
5229 esac
bd9c1f8f 5230 tmake_file="mips/t-mips $tmake_file"
74826b0f 5231 ;;
83079d89
DJ
5232
5233 powerpc*-*-* | rs6000-*-*)
7816bea0
DJ
5234 # FIXME: The PowerPC port uses the value set at compile time,
5235 # although it's only cosmetic.
83079d89 5236 if test "x$with_cpu" != x
61ed06c3 5237 then
83079d89 5238 target_cpu_default2="\\\"$with_cpu\\\""
61ed06c3 5239 fi
83349046
SB
5240 out_file="${cpu_type}/${cpu_type}.c"
5241 c_target_objs="${c_target_objs} ${cpu_type}-c.o"
5242 cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
b4c522fa 5243 d_target_objs="${d_target_objs} ${cpu_type}-d.o"
83349046 5244 tmake_file="${cpu_type}/t-${cpu_type} ${tmake_file}"
74826b0f 5245 ;;
73f09c99 5246
a6ab9fc0
R
5247 sh[123456ble]*-*-* | sh-*-*)
5248 c_target_objs="${c_target_objs} sh-c.o"
5249 cxx_target_objs="${cxx_target_objs} sh-c.o"
5250 ;;
5251
83079d89 5252 sparc*-*-*)
7816bea0
DJ
5253 # Some standard aliases.
5254 case x$with_cpu in
5255 xsparc)
5256 with_cpu=v7
5257 ;;
7816bea0
DJ
5258 xsparcv9 | xsparc64)
5259 with_cpu=v9
5260 ;;
5261 esac
5262
38ae58ca
EB
5263 if test x$with_tune = x ; then
5264 case ${target} in
5265 *-leon-*)
5266 with_tune=leon
5267 ;;
5268 *-leon[3-9]*)
5269 with_tune=leon3
5270 ;;
5271 esac
5272 fi
5273
a4d05547 5274 # The SPARC port checks this value at compile-time.
73f09c99
DJ
5275 target_cpu_default2="TARGET_CPU_$with_cpu"
5276 ;;
07981468 5277
83079d89
DJ
5278 v850*-*-*)
5279 case "x$with_cpu" in
5280 x)
5281 ;;
dbdbd982 5282 xv850e | xv850e1 | xv850e2 | xv850e2v3 | xv850e3v5)
83079d89
DJ
5283 target_cpu_default2="TARGET_CPU_$with_cpu"
5284 ;;
1dcad079
NC
5285 xv850es)
5286 target_cpu_default2="TARGET_CPU_v850e1"
5287 ;;
83079d89
DJ
5288 esac
5289 ;;
175650bc
OH
5290 visium-*-*)
5291 target_cpu_default2="TARGET_CPU_$with_cpu"
5292 ;;
fe3e7450 5293esac
61ed06c3 5294
fe3e7450 5295t=
d821744c 5296all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu nan fp_32 odd_spreg_32 divide llsc mips-plt synci tls lxc1-sxc1 madd4"
fe3e7450
AM
5297for option in $all_defaults
5298do
e21d5757 5299 eval "val=\$with_"`echo $option | sed s/-/_/g`
fe3e7450
AM
5300 if test -n "$val"; then
5301 case " $supported_defaults " in
5302 *" $option "*)
5303 ;;
5304 *)
5305 echo "This target does not support --with-$option." 2>&1
6e0eea31 5306 echo "Valid --with options are: $supported_defaults" 2>&1
fe3e7450
AM
5307 exit 1
5308 ;;
5309 esac
7816bea0 5310
fe3e7450
AM
5311 if test "x$t" = x
5312 then
5313 t="{ \"$option\", \"$val\" }"
5314 else
5315 t="${t}, { \"$option\", \"$val\" }"
7816bea0 5316 fi
7816bea0 5317 fi
fe3e7450 5318done
7816bea0 5319
fe3e7450
AM
5320if test "x$t" = x
5321then
5322 configure_default_options="{ { NULL, NULL} }"
5323else
5324 configure_default_options="{ ${t} }"
5325fi
5326
5327if test "$target_cpu_default2" != ""
5328then
5329 if test "$target_cpu_default" != ""
61ed06c3 5330 then
fe3e7450
AM
5331 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
5332 else
5333 target_cpu_default=$target_cpu_default2
61ed06c3 5334 fi
fe3e7450 5335fi
87b6c18c
IV
5336
5337case ${target} in
5338i[34567]86-*-* | x86_64-*-*)
5339 if test x$enable_as_accelerator = xyes; then
5340 extra_programs="mkoffload\$(exeext)"
5341 fi
5342 ;;
5343esac