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