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