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