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