]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config.gcc
C++: more location wrapper nodes (PR c++/43064, PR c++/43486)
[thirdparty/gcc.git] / gcc / config.gcc
CommitLineData
973f8bf3 1# GCC target-specific configuration file.
8e8f6434 2# Copyright (C) 1997-2018 Free Software Foundation, Inc.
bb607926 3
f12b58b3 4#This file is part of GCC.
bb607926 5
f12b58b3 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
8c4c00c1 8#Software Foundation; either version 3, or (at your option) any later
f12b58b3 9#version.
bb607926 10
f12b58b3 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.
bb607926 15
16#You should have received a copy of the GNU General Public License
8c4c00c1 17#along with GCC; see the file COPYING3. If not see
18#<http://www.gnu.org/licenses/>.
bb607926 19
973f8bf3 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.
bb607926 25
894a47b4 26# When you change the cases in the OS or target switches, consider
27# updating ../libgcc/config.host also.
28
09c6646e 29# This file switches on the shell variable ${target}, and also uses the
bb607926 30# following shell variables:
31#
32# with_* Various variables as set by configure.
33#
334c8279 34# enable_threads Either the name, yes or no depending on whether
bb607926 35# threads support was requested.
36#
bc5ae993 37# default_use_cxa_atexit
430e8f92 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.
bc5ae993 46#
1c6e0788 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#
bb607926 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#
09c6646e 66# cpu_type The name of the cpu, if different from the first
67# chunk of the canonical target name.
bb607926 68#
8d4f8d46 69# tm_defines List of target macros to define for all compilations.
70#
bb607926 71# tm_file A list of target macro files, if different from
277773bd 72# "$cpu_type/$cpu_type.h". Usually it's constructed
73# per target in a way like this:
91276c47 74# tm_file="${tm_file} dbxelf.h elfos.h ${cpu_type.h}/elf.h"
277773bd 75# Note that the preferred order is:
76# - specific target header "${cpu_type}/${cpu_type.h}"
04d9b51b 77# - generic headers like dbxelf.h elfos.h, etc.
277773bd 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}.
bb607926 81#
b4b98cc1 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#
bb607926 86# tm_p_file Location of file with declarations for functions
87# in $out_file.
88#
03385ed3 89# tm_d_file A list of headers with definitions of target hook
90# macros for the D compiler.
91#
bb607926 92# out_file The name of the machine description C support
93# file, if different from "$cpu_type/$cpu_type.c".
94#
3e87b980 95# common_out_file The name of the source file for code shared between
96# the compiler proper and the driver.
97#
bb607926 98# md_file The name of the machine-description file, if
99# different from "$cpu_type/$cpu_type.md".
100#
101# tmake_file A list of machine-description-specific
102# makefile-fragments, if different from
103# "$cpu_type/t-$cpu_type".
104#
b5ccaa7b 105# extra_modes The name of the file containing a list of extra
106# machine modes, if necessary and different from
107# "$cpu_type/$cpu_type-modes.def".
108#
bb607926 109# extra_objs List of extra objects that should be linked into
110# the compiler proper (cc1, cc1obj, cc1plus)
111# depending on target.
112#
69eb04f7 113# extra_gcc_objs List of extra objects that should be linked into
114# the compiler driver (gcc) depending on target.
115#
bb607926 116# extra_headers List of used header files from the directory
b965afcd 117# config/${cpu_type}.
bb607926 118#
ac0366be 119# user_headers_inc_next_pre
120# List of header file names of internal gcc header
121# files, which should be prefixed by an include_next.
122# user_headers_inc_next_post
123# List of header file names of internal gcc header
124# files, which should be postfixed by an include_next.
50388ca3 125# use_gcc_tgmath If set, add tgmath.h to the list of used header
126# files.
127#
f3449a3c 128# use_gcc_stdint If "wrap", install a version of stdint.h that
129# wraps the system's copy for hosted compilations;
130# if "provide", provide a version of systems without
131# such a system header; otherwise "none", do not
132# provide such a header at all.
133#
7151decb 134# extra_programs List of extra executables compiled for this target
135# machine, used when linking.
bb607926 136#
ff05e09e 137# extra_options List of target-dependent .opt files.
138#
424da949 139# c_target_objs List of extra target-dependent objects that be
8daa9e98 140# linked into the C compiler only.
582b17a6 141#
424da949 142# cxx_target_objs List of extra target-dependent objects that be
8daa9e98 143# linked into the C++ compiler only.
582b17a6 144#
03385ed3 145# d_target_objs List of extra target-dependent objects that be
146# linked into the D compiler only.
147#
32006f36 148# fortran_target_objs List of extra target-dependent objects that be
149# linked into the fortran compiler only.
150#
eb1bd38b 151# target_gtfiles List of extra source files with type information.
152#
bb607926 153# xm_defines List of macros to define when compiling for the
154# target machine.
155#
156# xm_file List of files to include when compiling for the
157# target machine.
158#
159# use_collect2 Set to yes or no, depending on whether collect2
160# will be used.
161#
162# target_cpu_default Set to override the default target model.
163#
bb607926 164# gdb_needs_out_file_path
165# Set to yes if gdb needs a dir command with
166# `dirname $out_file`.
167#
bb607926 168# thread_file Set to control which thread package to use.
169#
170# gas Set to yes or no depending on whether the target
171# system normally uses GNU as.
805e22b2 172#
7dd97ab6 173# configure_default_options
174# Set to an initializer for configure_default_options
175# in configargs.h, based on --with-cpu et cetera.
638454a1 176#
177# native_system_header_dir
178# Where system header files are found for this
179# target. This defaults to /usr/include. If
180# the --with-sysroot configure option or the
181# --sysroot command line option is used this
182# will be relative to the sysroot.
4eb5a747 183# target_type_format_char
184# The default character to be used for formatting
185# the attribute in a
186# .type symbol_name, ${t_t_f_c}<property>
187# directive.
bb607926 188
189# The following variables are used in each case-construct to build up the
190# outgoing variables:
191#
bb607926 192# gnu_ld Set to yes or no depending on whether the target
193# system normally uses GNU ld.
c94b1d0e 194#
195# target_has_targetcm Set to yes or no depending on whether the target
196# has its own definition of targetcm.
3e87b980 197#
198# target_has_targetm_common Set to yes or no depending on whether the
199# target has its own definition of targetm_common.
03385ed3 200#
201# target_has_targetdm Set to yes or no depending on whether the target
202# has its own definition of targetdm.
bb607926 203
204out_file=
3e87b980 205common_out_file=
bb607926 206tmake_file=
207extra_headers=
ac0366be 208user_headers_inc_next_pre=
209user_headers_inc_next_post=
50388ca3 210use_gcc_tgmath=yes
f3449a3c 211use_gcc_stdint=none
bb607926 212extra_programs=
213extra_objs=
bb607926 214extra_gcc_objs=
ff05e09e 215extra_options=
8daa9e98 216c_target_objs=
217cxx_target_objs=
03385ed3 218d_target_objs=
32006f36 219fortran_target_objs=
c94b1d0e 220target_has_targetcm=no
218e3e4e 221target_has_targetm_common=yes
03385ed3 222target_has_targetdm=no
8d4f8d46 223tm_defines=
bb607926 224xm_defines=
bb607926 225# Set this to force installation and use of collect2.
226use_collect2=
227# Set this to override the default target model.
228target_cpu_default=
bb607926 229# Set this if gdb needs a dir command with `dirname $out_file`
230gdb_needs_out_file_path=
bb607926 231# Set this to control which thread package will be used.
232thread_file=
233# Reinitialize these from the flag values every loop pass, since some
234# configure entries modify them.
235gas="$gas_flag"
236gnu_ld="$gnu_ld_flag"
bc5ae993 237default_use_cxa_atexit=no
1c6e0788 238default_gnu_indirect_function=no
22ac052b 239target_gtfiles=
ed2b8f56 240need_64bit_isa=
638454a1 241native_system_header_dir=/usr/include
4eb5a747 242target_type_format_char='@'
bb607926 243
b696fe80 244# Don't carry these over build->host->target. Please.
245xm_file=
246md_file=
247
c2527f80 248# Obsolete configurations.
a7359760 249case ${target} in
4253c7a0 250 *-*-solaris2.10* \
a7d3017a 251 | tile*-*-* \
a7359760 252 )
253 if test "x$enable_obsolete" != xyes; then
254 echo "*** Configuration ${target} is obsolete." >&2
255 echo "*** Specify --enable-obsolete to build it anyway." >&2
256 echo "*** Support will be REMOVED in the next major release of GCC," >&2
257 echo "*** unless a maintainer comes forward." >&2
258 exit 1
259 fi;;
260esac
c2527f80 261
ece7f381 262# Unsupported targets list. Do not put an entry in this list unless
263# it would otherwise be caught by a more permissive pattern. The list
264# should be in alphabetical order.
09c6646e 265case ${target} in
295f5c5c 266 # Avoid special cases that are not obsolete
267 arm*-*-*eabi* \
268 )
269 ;;
270 arm*-wince-pe* \
271 | arm*-*-ecos-elf \
272 | arm*-*-elf \
295f5c5c 273 | arm*-*-linux* \
295f5c5c 274 | arm*-*-uclinux* \
275 | i[34567]86-go32-* \
ece7f381 276 | i[34567]86-*-go32* \
17b3d2a8 277 | m68k-*-uclinuxoldabi* \
ece7f381 278 | mips64orion*-*-rtems* \
f2397fc4 279 | pdp11-*-bsd \
edc8c70d 280 | powerpc*-*-linux*paired* \
b31d0348 281 | powerpc*-*-*spe* \
ece7f381 282 | sparc-hal-solaris2* \
283 | thumb-*-* \
0d7517d0 284 | *-*-freebsd[12] | *-*-freebsd[1234].* \
ea722d26 285 | *-*-freebsd*aout* \
6af9f7ea 286 | *-*-linux*aout* \
ece7f381 287 | *-*-linux*coff* \
6af9f7ea 288 | *-*-linux*libc1* \
ece7f381 289 | *-*-linux*oldld* \
290 | *-*-rtemsaout* \
291 | *-*-rtemscoff* \
e8287058 292 | *-*-solaris2 \
3efb5d22 293 | *-*-solaris2.[0-9] \
294 | *-*-solaris2.[0-9].* \
264a5d11 295 | *-*-sysv* \
3598ba3d 296 | vax-*-vms* \
ece7f381 297 )
09c6646e 298 echo "*** Configuration ${target} not supported" 1>&2
ece7f381 299 exit 1
300 ;;
301esac
302
bb607926 303# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
83287f80 304# updated in each machine entry. Also set default extra_headers for some
305# machines.
bb607926 306tm_p_file=
09c6646e 307cpu_type=`echo ${target} | sed 's/-.*$//'`
cc5ffbb8 308cpu_is_64bit=
09c6646e 309case ${target} in
85c84d5c 310m32c*-*-*)
311 cpu_type=m32c
312 tmake_file=m32c/t-m32c
393a753d 313 target_has_targetm_common=no
85c84d5c 314 ;;
16878cba 315aarch64*-*-*)
316 cpu_type=aarch64
79cab9c6 317 extra_headers="arm_fp16.h arm_neon.h arm_acle.h"
26db5325 318 c_target_objs="aarch64-c.o"
319 cxx_target_objs="aarch64-c.o"
03385ed3 320 d_target_objs="aarch64-d.o"
8df53f4d 321 extra_objs="aarch64-builtins.o aarch-common.o cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o"
99f33b7c 322 target_gtfiles="\$(srcdir)/config/aarch64/aarch64-builtins.c"
16878cba 323 target_has_targetm_common=yes
324 ;;
bb607926 325alpha*-*-*)
326 cpu_type=alpha
d1e5a65f 327 extra_options="${extra_options} g.opt"
bb607926 328 ;;
1acdfc69 329am33_2.0-*-linux*)
330 cpu_type=mn10300
331 ;;
3c867e46 332arc*-*-*)
333 cpu_type=arc
f525bed6 334 c_target_objs="arc-c.o"
335 cxx_target_objs="arc-c.o"
2d293522 336 extra_options="${extra_options} arc/arc-tables.opt g.opt"
5fbceedd 337 extra_headers="arc-simd.h"
3c867e46 338 ;;
6e421549 339arm*-*-*)
340 cpu_type=arm
d6504d76 341 extra_objs="arm-builtins.o aarch-common.o"
0120ae30 342 extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h arm_cmse.h"
4eb5a747 343 target_type_format_char='%'
baa1a726 344 c_target_objs="arm-c.o"
345 cxx_target_objs="arm-c.o"
03385ed3 346 d_target_objs="arm-d.o"
9a4818f1 347 extra_options="${extra_options} arm/arm-tables.opt"
d6504d76 348 target_gtfiles="\$(srcdir)/config/arm/arm-builtins.c"
6e421549 349 ;;
33169f97 350avr-*-*)
351 cpu_type=avr
352 c_target_objs="avr-c.o"
353 cxx_target_objs="avr-c.o"
354 ;;
9e6a0967 355bfin*-*)
356 cpu_type=bfin
357 ;;
9b9e3455 358crisv32-*)
359 cpu_type=cris
360 ;;
de6e318c 361frv*) cpu_type=frv
d1e5a65f 362 extra_options="${extra_options} g.opt"
de6e318c 363 ;;
b6616c9c 364ft32*) cpu_type=ft32
365 target_has_targetm_common=no
366 ;;
be52b6d8 367moxie*) cpu_type=moxie
218e3e4e 368 target_has_targetm_common=no
be52b6d8 369 ;;
278e2fd1 370fido-*-*)
371 cpu_type=m68k
372 extra_headers=math-68881.h
d078aadd 373 extra_options="${extra_options} m68k/m68k-tables.opt"
278e2fd1 374 ;;
bb607926 375i[34567]86-*-*)
376 cpu_type=i386
46f8e3b0 377 c_target_objs="i386-c.o"
378 cxx_target_objs="i386-c.o"
03385ed3 379 d_target_objs="i386-d.o"
79959e63 380 extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o"
bca226ea 381 extra_options="${extra_options} fused-madd.opt"
daf03e2f 382 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
f25d51c3 383 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
2f212aae 384 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
18525343 385 immintrin.h x86intrin.h avxintrin.h xopintrin.h
87c62cba 386 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
2339767f 387 lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
e2098065 388 avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
389 rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
390 adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
fc975a40 391 avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
2ed44428 392 shaintrin.h clflushoptintrin.h xsavecintrin.h
9f29061a 393 xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
8a12b665 394 avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
afee0628 395 avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
37d0f067 396 avx512vbmivlintrin.h avx5124fmapsintrin.h avx5124vnniwintrin.h
e0aa57d6 397 avx512vpopcntdqintrin.h clwbintrin.h mwaitxintrin.h
957d28c3 398 clzerointrin.h pkuintrin.h sgxintrin.h cetintrin.h
c3c0b6e9 399 gfniintrin.h cet.h avx512vbmi2intrin.h
97c6694f 400 avx512vbmi2vlintrin.h avx512vnniintrin.h
297f4ddf 401 avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
e2449138 402 avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
c0437050 403 pconfigintrin.h wbnoinvdintrin.h movdirintrin.h
ecd752b4 404 waitpkgintrin.h cldemoteintrin.h"
bb607926 405 ;;
5c66405b 406x86_64-*-*)
407 cpu_type=i386
46f8e3b0 408 c_target_objs="i386-c.o"
409 cxx_target_objs="i386-c.o"
03385ed3 410 d_target_objs="i386-d.o"
bca226ea 411 extra_options="${extra_options} fused-madd.opt"
79959e63 412 extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o"
daf03e2f 413 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
f25d51c3 414 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
2f212aae 415 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
18525343 416 immintrin.h x86intrin.h avxintrin.h xopintrin.h
87c62cba 417 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
297f4ddf 418 lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
e2098065 419 avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
420 rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
421 adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
fc975a40 422 avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
2ed44428 423 shaintrin.h clflushoptintrin.h xsavecintrin.h
9f29061a 424 xsavesintrin.h avx512dqintrin.h avx512bwintrin.h
8a12b665 425 avx512vlintrin.h avx512vlbwintrin.h avx512vldqintrin.h
afee0628 426 avx512ifmaintrin.h avx512ifmavlintrin.h avx512vbmiintrin.h
37d0f067 427 avx512vbmivlintrin.h avx5124fmapsintrin.h avx5124vnniwintrin.h
e0aa57d6 428 avx512vpopcntdqintrin.h clwbintrin.h mwaitxintrin.h
957d28c3 429 clzerointrin.h pkuintrin.h sgxintrin.h cetintrin.h
c3c0b6e9 430 gfniintrin.h cet.h avx512vbmi2intrin.h
97c6694f 431 avx512vbmi2vlintrin.h avx512vnniintrin.h
297f4ddf 432 avx512vnnivlintrin.h vaesintrin.h vpclmulqdqintrin.h
e2449138 433 avx512vpopcntdqvlintrin.h avx512bitalgintrin.h
c0437050 434 pconfigintrin.h wbnoinvdintrin.h movdirintrin.h
ecd752b4 435 waitpkgintrin.h cldemoteintrin.h"
5c66405b 436 ;;
b965afcd 437ia64-*-*)
438 extra_headers=ia64intrin.h
dd7870fa 439 extra_options="${extra_options} g.opt fused-madd.opt"
b965afcd 440 ;;
6af9f7ea 441hppa*-*-*)
bb607926 442 cpu_type=pa
443 ;;
d1e5a65f 444lm32*)
445 extra_options="${extra_options} g.opt"
446 ;;
467dc9aa 447m32r*-*-*)
448 cpu_type=m32r
d1e5a65f 449 extra_options="${extra_options} g.opt"
467dc9aa 450 ;;
83287f80 451m68k-*-*)
452 extra_headers=math-68881.h
d078aadd 453 extra_options="${extra_options} m68k/m68k-tables.opt"
bb607926 454 ;;
d34b0d1e 455microblaze*-*-*)
456 cpu_type=microblaze
457 extra_options="${extra_options} g.opt"
458 ;;
bb607926 459mips*-*-*)
460 cpu_type=mips
03385ed3 461 d_target_objs="mips-d.o"
c1af8d58 462 extra_headers="loongson.h loongson-mmiintrin.h msa.h"
0c9081e8 463 extra_objs="frame-header-opt.o"
668de2f7 464 extra_options="${extra_options} g.opt fused-madd.opt mips/mips-tables.opt"
bb607926 465 ;;
eae21ed1 466nds32*)
467 cpu_type=nds32
d08b1d22 468 extra_headers="nds32_intrinsic.h nds32_isr.h nds32_init.inc"
a5a22b4f 469 case ${target} in
470 nds32*-*-linux*)
471 extra_options="${extra_options} nds32/nds32-linux.opt"
472 ;;
473 nds32*-*-elf*)
474 extra_options="${extra_options} nds32/nds32-elf.opt"
475 ;;
476 *)
477 ;;
478 esac
d1873447 479 extra_objs="nds32-cost.o nds32-intrinsic.o nds32-isr.o nds32-md-auxiliary.o nds32-pipelines-auxiliary.o nds32-predicates.o nds32-memory-manipulation.o nds32-fp-as-gp.o nds32-relax-opt.o nds32-utils.o"
eae21ed1 480 ;;
de65406d 481nios2-*-*)
482 cpu_type=nios2
483 extra_options="${extra_options} g.opt"
f7c4fafb 484 ;;
8ce80784 485nvptx-*-*)
486 cpu_type=nvptx
487 ;;
d61fdfe7 488or1k*-*-*)
489 cpu_type=or1k
490 ;;
bb607926 491powerpc*-*-*)
492 cpu_type=rs6000
376e5eaa 493 extra_objs="rs6000-string.o rs6000-p8swap.o"
5eee1838 494 extra_headers="ppc-asm.h altivec.h htmintrin.h htmxlintrin.h"
4aca0cfd 495 extra_headers="${extra_headers} bmi2intrin.h bmiintrin.h"
fdfc9dde 496 extra_headers="${extra_headers} xmmintrin.h mm_malloc.h emmintrin.h"
4aca0cfd 497 extra_headers="${extra_headers} mmintrin.h x86intrin.h"
84101bee 498 extra_headers="${extra_headers} pmmintrin.h tmmintrin.h smmintrin.h"
5eee1838 499 extra_headers="${extra_headers} ppu_intrinsics.h spu2vmx.h vec_types.h si2vmx.h"
d373518e 500 extra_headers="${extra_headers} amo.h"
cc5ffbb8 501 case x$with_cpu in
52432de8 502 xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456789]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500)
cc5ffbb8 503 cpu_is_64bit=yes
504 ;;
505 esac
d41a5879 506 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
805e22b2 507 ;;
fb55f581 508riscv*)
509 cpu_type=riscv
510 extra_objs="riscv-builtins.o riscv-c.o"
03385ed3 511 d_target_objs="riscv-d.o"
fb55f581 512 ;;
805e22b2 513rs6000*-*-*)
d41a5879 514 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
376e5eaa 515 extra_objs="rs6000-string.o rs6000-p8swap.o"
805e22b2 516 ;;
bb607926 517sparc*-*-*)
518 cpu_type=sparc
9e64c9a4 519 c_target_objs="sparc-c.o"
520 cxx_target_objs="sparc-c.o"
03385ed3 521 d_target_objs="sparc-d.o"
6b27013f 522 extra_headers="visintrin.h"
bb607926 523 ;;
644459d0 524spu*-*-*)
525 cpu_type=spu
644459d0 526 ;;
805e22b2 527s390*-*-*)
37d32fbf 528 cpu_type=s390
03385ed3 529 d_target_objs="s390-d.o"
81470015 530 extra_options="${extra_options} fused-madd.opt"
07f32359 531 extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h"
805e22b2 532 ;;
4ee34c70 533# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
fc7383ad 534sh[123456789lbe]*-*-* | sh-*-*)
87e19636 535 cpu_type=sh
658a6fb7 536 extra_options="${extra_options} fused-madd.opt"
ee8867ef 537 extra_objs="${extra_objs} sh_treg_combine.o sh-mem.o sh_optimize_sett_clrt.o"
87e19636 538 ;;
c5b0bf72 539v850*-*-*)
540 cpu_type=v850
541 ;;
5aa04b01 542tic6x-*-*)
543 cpu_type=c6x
544 extra_headers="c6x_intrinsics.h"
545 extra_options="${extra_options} c6x/c6x-tables.opt"
546 ;;
041cf413 547xtensa*-*-*)
548 extra_options="${extra_options} fused-madd.opt"
549 ;;
7ce78e23 550tilegx*-*-*)
551 cpu_type=tilegx
7ce78e23 552 ;;
2da35515 553tilepro*-*-*)
7ce78e23 554 cpu_type=tilepro
7ce78e23 555 ;;
bb607926 556esac
557
558tm_file=${cpu_type}/${cpu_type}.h
03385ed3 559tm_d_file=${cpu_type}/${cpu_type}.h
20ffb0b1 560if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
bb607926 561then
20ffb0b1 562 tm_p_file=${cpu_type}/${cpu_type}-protos.h
03385ed3 563 tm_d_file="${tm_d_file} ${cpu_type}/${cpu_type}-protos.h"
20ffb0b1 564fi
03385ed3 565
b5ccaa7b 566extra_modes=
567if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
568then
569 extra_modes=${cpu_type}/${cpu_type}-modes.def
570fi
ff05e09e 571if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
572then
573 extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
574fi
a8456aba 575
09c6646e 576case ${target} in
bb009361 577aarch64*-*-*)
aa7f84c2 578 tm_p_file="${tm_p_file} arm/aarch-common-protos.h"
bb009361 579 case ${with_abi} in
580 "")
581 if test "x$with_multilib_list" = xilp32; then
582 tm_file="aarch64/biarchilp32.h ${tm_file}"
583 else
584 tm_file="aarch64/biarchlp64.h ${tm_file}"
585 fi
586 ;;
587 ilp32)
588 tm_file="aarch64/biarchilp32.h ${tm_file}"
589 ;;
590 lp64)
591 tm_file="aarch64/biarchlp64.h ${tm_file}"
592 ;;
593 *)
594 echo "Unknown ABI used in --with-abi=$with_abi"
595 exit 1
596 esac
597 ;;
144c3e90 598i[34567]86-*-*)
6fa78bde 599 if test "x$with_abi" != x; then
600 echo "This target does not support --with-abi."
601 exit 1
602 fi
43da04c5 603 if test "x$enable_cld" = xyes; then
144c3e90 604 tm_defines="${tm_defines} USE_IX86_CLD=1"
605 fi
fc00a76a 606 if test "x$enable_frame_pointer" = xyes; then
607 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
608 fi
144c3e90 609 ;;
a8456aba 610x86_64-*-*)
6fa78bde 611 case ${with_abi} in
612 "")
613 if test "x$with_multilib_list" = xmx32; then
614 tm_file="i386/biarchx32.h ${tm_file}"
615 else
616 tm_file="i386/biarch64.h ${tm_file}"
617 fi
618 ;;
619 64 | m64)
620 tm_file="i386/biarch64.h ${tm_file}"
621 ;;
622 x32 | mx32)
623 tm_file="i386/biarchx32.h ${tm_file}"
624 ;;
625 *)
626 echo "Unknown ABI used in --with-abi=$with_abi"
627 exit 1
628 esac
43da04c5 629 if test "x$enable_cld" = xyes; then
144c3e90 630 tm_defines="${tm_defines} USE_IX86_CLD=1"
631 fi
fc00a76a 632 if test "x$enable_frame_pointer" = xyes; then
633 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
634 fi
a8456aba 635 ;;
015adf41 636arm*-*-*)
789753f1 637 tm_p_file="arm/arm-flags.h ${tm_p_file} arm/aarch-common-protos.h"
043cabe3 638 ;;
a8456aba 639esac
640
bb607926 641# On a.out targets, we need to use collect2.
09c6646e 642case ${target} in
bb607926 643*-*-*aout*)
644 use_collect2=yes
645 ;;
582b17a6 646esac
bb607926 647
3d0ed9e7 648# Common C libraries.
a9173cea 649tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
3d0ed9e7 650
f292755a 651# 32-bit x86 processors supported by --with-arch=. Each processor
652# MUST be separated by exactly one space.
653x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \
654athlon-xp k6 k6-2 k6-3 geode c3 c3-2 winchip-c6 winchip2 i386 i486 \
655i586 i686 pentium pentium-m pentium-mmx pentium2 pentium3 pentium3m \
3f6183e5 656pentium4 pentium4m pentiumpro prescott lakemont"
f292755a 657
658# 64-bit x86 processors supported by --with-arch=. Each processor
659# MUST be separated by exactly one space.
660x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \
703d2f69 661bdver3 bdver4 znver1 znver2 btver1 btver2 k8 k8-sse3 opteron \
662opteron-sse3 nocona core2 corei7 corei7-avx core-avx-i core-avx2 atom \
663slm nehalem westmere sandybridge ivybridge haswell broadwell bonnell \
664silvermont knl knm skylake-avx512 cannonlake icelake-client icelake-server \
e9d55eda 665skylake goldmont goldmont-plus tremont cascadelake x86-64 native"
f292755a 666
667# Additional x86 processors supported by --with-cpu=. Each processor
668# MUST be separated by exactly one space.
669x86_cpus="generic intel"
670
805e22b2 671# Common parts for widely ported systems.
09c6646e 672case ${target} in
1025d5b9 673*-*-darwin*)
e2e89254 674 tmake_file="t-darwin ${cpu_type}/t-darwin"
650c26dc 675 tm_file="${tm_file} darwin.h"
676 case ${target} in
9166f36a 677 *-*-darwin9*)
650c26dc 678 tm_file="${tm_file} darwin9.h"
679 ;;
182d4990 680 *-*-darwin[1][01]*)
9166f36a 681 tm_file="${tm_file} darwin9.h darwin10.h"
682 ;;
182d4990 683 *-*-darwin[1][2-9]* | *-*-darwin[2][0-9]*)
684 tm_file="${tm_file} darwin9.h darwin10.h darwin12.h"
685 ;;
650c26dc 686 esac
687 tm_file="${tm_file} ${cpu_type}/darwin.h"
1025d5b9 688 tm_p_file="${tm_p_file} darwin-protos.h"
1025d5b9 689 target_gtfiles="\$(srcdir)/config/darwin.c"
0c44645a 690 extra_options="${extra_options} darwin.opt"
46f8e3b0 691 c_target_objs="${c_target_objs} darwin-c.o"
692 cxx_target_objs="${cxx_target_objs} darwin-c.o"
32006f36 693 fortran_target_objs="darwin-f.o"
c94b1d0e 694 target_has_targetcm=yes
6d077822 695 extra_objs="${extra_objs} darwin.o"
a9540fb6 696 extra_gcc_objs="darwin-driver.o"
3da996b9 697 default_use_cxa_atexit=yes
ef87fe4c 698 use_gcc_stdint=wrap
1025d5b9 699 case ${enable_threads} in
700 "" | yes | posix) thread_file='posix' ;;
701 esac
702 ;;
463553db 703*-*-dragonfly*)
704 gas=yes
705 gnu_ld=yes
706 tmake_file="t-slibgcc"
707 case ${enable_threads} in
708 "" | yes | posix)
709 thread_file='posix'
710 ;;
711 no | single)
712 # Let these non-posix thread selections fall through if requested
713 ;;
714 *)
715 echo 'Unknown thread configuration for DragonFly BSD'
716 exit 1
717 ;;
718 esac
719 extra_options="$extra_options rpath.opt dragonfly.opt"
720 default_use_cxa_atexit=yes
721 use_gcc_stdint=wrap
722 ;;
1025d5b9 723*-*-freebsd*)
724 # This is the generic ELF configuration of FreeBSD. Later
725 # machine-specific sections may refine and add to this
726 # configuration.
727 #
728 # Due to tm_file entry ordering issues that vary between cpu
729 # architectures, we only define fbsd_tm_file to allow the
730 # machine-specific section to dictate the final order of all
731 # entries of tm_file with the minor exception that components
732 # of the tm_file set here will always be of the form:
733 #
734 # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
735 #
736 # The machine-specific section should not tamper with this
737 # ordering but may order all other entries of tm_file as it
738 # pleases around the provided core setting.
739 gas=yes
740 gnu_ld=yes
cfb5f9aa 741 fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
31d35465 742 if test "$fbsd_major" = ""; then
743 echo "Specify the major version number of the targeted FreeBSD release"
744 echo "like this: --target=amd64-unknown-freebsd10.1"
745 exit 1
746 fi
cfb5f9aa 747 tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
4dc4ff49 748 tmake_file="t-slibgcc"
1025d5b9 749 case ${enable_threads} in
750 no)
751 fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
752 ;;
5614d3f5 753 "" | yes | posix)
1025d5b9 754 thread_file='posix'
1025d5b9 755 ;;
3ebc7dec 756 *)
1025d5b9 757 echo 'Unknown thread configuration for FreeBSD'
758 exit 1
759 ;;
760 esac
c4c8f6ce 761 fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
13c30464 762 extra_options="$extra_options rpath.opt freebsd.opt"
d52a86c7 763 case ${target} in
764 *-*-freebsd[345].*)
765 :;;
766 *)
767 default_use_cxa_atexit=yes;;
768 esac
c4c8f6ce 769 use_gcc_stdint=wrap
1025d5b9 770 ;;
90369c4f 771*-*-fuchsia*)
772 native_system_header_dir=/include
773 ;;
79573034 774*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
55d8cecf 775 extra_options="$extra_options gnu-user.opt"
338f7557 776 gas=yes
777 gnu_ld=yes
778 case ${enable_threads} in
779 "" | yes | posix) thread_file='posix' ;;
780 esac
4dc4ff49 781 tmake_file="t-slibgcc"
72a65e81 782 case $target in
79573034 783 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu)
72a65e81 784 :;;
785 *-*-gnu*)
638454a1 786 native_system_header_dir=/include
787 ;;
72a65e81 788 esac
1b455a16 789 # Linux C libraries selection switch: glibc / uclibc / bionic.
66fd9df9 790 # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
72a65e81 791 case $target in
792 *linux*)
1b455a16 793 tm_p_file="${tm_p_file} linux-protos.h"
794 tmake_file="${tmake_file} t-linux"
795 extra_objs="${extra_objs} linux.o"
796 extra_options="${extra_options} linux.opt"
797 ;;
72a65e81 798 esac
66fd9df9 799 case $target in
800 *-*-*android*)
801 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
802 ;;
ee085235 803 *-*-*uclibc*)
66fd9df9 804 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
c490c13b 805 ;;
a9173cea 806 *-*-*musl*)
807 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
808 ;;
c490c13b 809 *)
66fd9df9 810 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
ee085235 811 ;;
812 esac
66fd9df9 813 # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
814 # is provided.
430e8f92 815 default_use_cxa_atexit=yes
50388ca3 816 use_gcc_tgmath=no
f3449a3c 817 use_gcc_stdint=wrap
f1b7ead9 818 # Enable compilation for Android by default for *android* targets.
819 case $target in
820 *-*-*android*)
821 tm_defines="$tm_defines ANDROID_DEFAULT=1"
822 ;;
823 *)
824 tm_defines="$tm_defines ANDROID_DEFAULT=0"
825 ;;
826 esac
6adc88f8 827 c_target_objs="${c_target_objs} glibc-c.o"
828 cxx_target_objs="${cxx_target_objs} glibc-c.o"
03385ed3 829 d_target_objs="${d_target_objs} glibc-d.o"
6adc88f8 830 tmake_file="${tmake_file} t-glibc"
831 target_has_targetcm=yes
03385ed3 832 target_has_targetdm=yes
338f7557 833 ;;
4ace673e 834*-*-netbsd*)
efb5972c 835 tm_p_file="${tm_p_file} netbsd-protos.h"
836 tmake_file="t-netbsd t-slibgcc"
837 extra_objs="${extra_objs} netbsd.o"
338f7557 838 gas=yes
839 gnu_ld=yes
c703c96f 840 use_gcc_stdint=wrap
338f7557 841 case ${enable_threads} in
8c0c0f7c 842 "" | yes | posix) thread_file='posix' ;;
338f7557 843 esac
3ff28a9d 844 nbsd_tm_file="netbsd.h netbsd-stdint.h netbsd-elf.h"
a26e3ca5 845 default_use_cxa_atexit=yes
338f7557 846 ;;
1025d5b9 847*-*-openbsd*)
4dc4ff49 848 tmake_file="t-openbsd"
338f7557 849 case ${enable_threads} in
1025d5b9 850 yes)
338f7557 851 thread_file='posix'
338f7557 852 ;;
853 esac
f3c0d3e6 854 case ${target} in
855 *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
856 default_use_cxa_atexit=yes
857 ;;
858 esac
338f7557 859 ;;
6de77184 860*-*-phoenix*)
861 gas=yes
862 gnu_ld=yes
863 default_use_cxa_atexit=yes
864 ;;
2fcfea2a 865*-*-rtems*)
866 case ${enable_threads} in
f4f5951e 867 "" | yes | rtems) thread_file='rtems' ;;
868 posix) thread_file='posix' ;;
869 no) ;;
870 *)
871 echo 'Unknown thread configuration for RTEMS'
872 exit 1
873 ;;
2fcfea2a 874 esac
b69fc80a 875 tmake_file="${tmake_file} t-rtems"
d6959f51 876 extra_options="${extra_options} rtems.opt"
d69684b5 877 default_use_cxa_atexit=yes
f3449a3c 878 use_gcc_stdint=wrap
879 ;;
880*-*-uclinux*)
55d8cecf 881 extra_options="$extra_options gnu-user.opt"
f3449a3c 882 use_gcc_stdint=wrap
b9ce5410 883 case ${enable_threads} in
884 "" | yes | posix) thread_file='posix' ;;
885 esac
d9993a19 886 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
2fcfea2a 887 ;;
b433697b 888*-*-rdos*)
889 use_gcc_stdint=wrap
890 ;;
0c7243ae 891*-*-solaris2*)
c2e7ebeb 892 # i?86-*-solaris2* needs to insert headers between cpu default and
893 # Solaris 2 specific ones.
fc99725b 894 sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h"
895 sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
896 sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
cad405eb 897 case ${target} in
9273bda7 898 *-*-solaris2.1[1-9]*)
899 # __cxa_atexit was introduced in Solaris 11.4.
cad405eb 900 default_use_cxa_atexit=yes
901 ;;
902 esac
3efb5d22 903 use_gcc_stdint=wrap
c2e7ebeb 904 if test x$gnu_ld = xyes; then
905 tm_file="usegld.h ${tm_file}"
906 fi
907 if test x$gas = xyes; then
908 tm_file="usegas.h ${tm_file}"
909 fi
910 tm_p_file="${tm_p_file} sol2-protos.h"
a997b0d8 911 tmake_file="${tmake_file} t-sol2 t-slibgcc"
c2e7ebeb 912 c_target_objs="${c_target_objs} sol2-c.o"
16a1895e 913 cxx_target_objs="${cxx_target_objs} sol2-c.o sol2-cxx.o"
521c7eaf 914 d_target_objs="${d_target_objs} sol2-d.o"
74edde2f 915 extra_objs="${extra_objs} sol2.o sol2-stubs.o"
0c7243ae 916 extra_options="${extra_options} sol2.opt"
c2e7ebeb 917 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
918 "":yes:* | yes:yes:* )
919 thread_file=posix
920 ;;
921 esac
521c7eaf 922 target_has_targetdm=yes
0c7243ae 923 ;;
b0a47c39 924*-*-*vms*)
925 extra_options="${extra_options} vms/vms.opt"
926 xmake_file=vms/x-vms
a997b0d8 927 tmake_file="vms/t-vms t-slibgcc"
ded97e77 928 extra_objs="vms.o"
929 target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.c"
930 tm_p_file="${tm_p_file} vms/vms-protos.h"
8f852c44 931 xm_file="vms/xm-vms.h"
09ddc95a 932 c_target_objs="vms-c.o"
933 cxx_target_objs="vms-c.o"
b26acc64 934 fortran_target_objs="vms-f.o"
e55b581d 935 use_gcc_stdint=provide
936 tm_file="${tm_file} vms/vms-stdint.h"
b0a47c39 937 if test x$gnu_ld != xyes; then
938 # Build wrappers for native case.
939 extra_programs="ld\$(exeext) ar\$(exeext)"
940 tmake_file="$tmake_file vms/t-vmsnative"
941 fi
942 ;;
805e22b2 943*-*-vxworks*)
338f7557 944 tmake_file=t-vxworks
e6eccdb3 945 xm_defines=POSIX
946 extra_options="${extra_options} vxworks.opt"
3aa6cfd7 947 extra_objs="$extra_objs vxworks.o"
fde53671 948 use_gcc_stdint=provide
949 tm_file="${tm_file} vxworks-stdint.h"
d9799238 950 case ${enable_threads} in
951 no) ;;
952 "" | yes | vxworks) thread_file='vxworks' ;;
953 *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
954 esac
b75ef09f 955 case $target in
956 *-*-vxworks7*)
957 tm_defines="$tm_defines TARGET_VXWORKS7=1"
958 ;;
959 esac
181511af 960 case $target in
961 *64-*-vxworks*)
962 tm_defines="$tm_defines TARGET_VXWORKS64=1"
963 ;;
964 esac
338f7557 965 ;;
3c867e46 966*-*-elf|arc*-*-elf*)
430e8f92 967 # Assume that newlib is being used and so __cxa_atexit is provided.
968 default_use_cxa_atexit=yes
f3449a3c 969 use_gcc_stdint=wrap
430e8f92 970 ;;
bb607926 971esac
972
09c6646e 973case ${target} in
90369c4f 974aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
16878cba 975 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
976 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
977 tmake_file="${tmake_file} aarch64/t-aarch64"
83e8dc76 978 case $target in
979 aarch64-*-elf*)
980 use_gcc_stdint=wrap
981 ;;
90369c4f 982 aarch64-*-fuchsia*)
983 tm_file="${tm_file} fuchsia.h"
984 ;;
83e8dc76 985 aarch64-*-rtems*)
986 tm_file="${tm_file} rtems.h aarch64/rtems.h"
987 ;;
988 esac
16878cba 989 case $target in
990 aarch64_be-*)
991 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
992 ;;
993 esac
bb009361 994 aarch64_multilibs="${with_multilib_list}"
995 if test "$aarch64_multilibs" = "default"; then
996 aarch64_multilibs="lp64,ilp32"
997 fi
998 aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
999 for aarch64_multilib in ${aarch64_multilibs}; do
1000 case ${aarch64_multilib} in
1001 ilp32 | lp64 )
1002 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
1003 ;;
1004 *)
1005 echo "--with-multilib-list=${aarch64_multilib} not supported."
1006 exit 1
1007 esac
1008 done
1009 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
16878cba 1010 ;;
88afddbc 1011aarch64*-*-freebsd*)
1012 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file}"
1013 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h"
1014 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
1015 ;;
16878cba 1016aarch64*-*-linux*)
1017 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
1018 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
1019 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
9cbee213 1020 tm_defines="${tm_defines} TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
16878cba 1021 case $target in
1022 aarch64_be-*)
1023 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1024 ;;
1025 esac
bb009361 1026 aarch64_multilibs="${with_multilib_list}"
1027 if test "$aarch64_multilibs" = "default"; then
1028 # TODO: turn on ILP32 multilib build after its support is mature.
1029 # aarch64_multilibs="lp64,ilp32"
1030 aarch64_multilibs="lp64"
1031 fi
1032 aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
1033 for aarch64_multilib in ${aarch64_multilibs}; do
1034 case ${aarch64_multilib} in
1035 ilp32 | lp64 )
1036 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
1037 ;;
1038 *)
1039 echo "--with-multilib-list=${aarch64_multilib} not supported."
1040 exit 1
1041 esac
1042 done
1043 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
16878cba 1044 ;;
bb607926 1045alpha*-*-linux*)
a25bf392 1046 tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
1ffab76c 1047 tmake_file="${tmake_file} alpha/t-linux alpha/t-alpha"
0b803a91 1048 extra_options="${extra_options} alpha/elf.opt"
bb607926 1049 ;;
bb607926 1050alpha*-*-netbsd*)
3ff28a9d 1051 tm_file="elfos.h ${tm_file} ${nbsd_tm_file} alpha/elf.h alpha/netbsd.h"
1ffab76c 1052 tmake_file="${tmake_file} alpha/t-alpha"
0b803a91 1053 extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
1054 alpha/elf.opt"
bb607926 1055 ;;
bb607926 1056alpha*-*-openbsd*)
8e6600a1 1057 tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
a25bf392 1058 tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
1ffab76c 1059 tmake_file="${tmake_file} alpha/t-alpha"
0b803a91 1060 extra_options="${extra_options} openbsd.opt alpha/elf.opt"
bb607926 1061 # default x-alpha is only appropriate for dec-osf.
bb607926 1062 ;;
73777e7b 1063alpha*-dec-*vms*)
2936855c 1064 tm_file="${tm_file} vms/vms.h alpha/vms.h"
1ffab76c 1065 tmake_file="${tmake_file} alpha/t-vms alpha/t-alpha"
bb607926 1066 ;;
3c867e46 1067arc*-*-elf*)
5fbceedd 1068 tm_file="arc/arc-arch.h dbxelf.h elfos.h newlib-stdint.h arc/elf.h ${tm_file}"
61aeeaac 1069 tmake_file="arc/t-multilib arc/t-arc"
1070 extra_gcc_objs="driver-arc.o"
1071 if test "x$with_cpu" != x; then
1072 tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1073 fi
3c867e46 1074 if test x${with_endian} = x; then
1075 case ${target} in
1076 arc*be-*-* | arc*eb-*-*) with_endian=big ;;
1077 *) with_endian=little ;;
1078 esac
1079 fi
1080 case ${with_endian} in
1081 big|little) ;;
1082 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
1083 esac
1084 case ${with_endian} in
5fbceedd 1085 big*) tm_file="arc/big.h ${tm_file}"
3c867e46 1086 esac
1087 ;;
927c0132 1088arc*-*-linux*)
5fbceedd 1089 tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}"
0eacfbcb 1090 tmake_file="${tmake_file} arc/t-multilib-linux arc/t-arc"
61aeeaac 1091 extra_gcc_objs="driver-arc.o"
1092 if test "x$with_cpu" != x; then
1093 tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu"
1094 fi
3c867e46 1095 if test x${with_endian} = x; then
1096 case ${target} in
1097 arc*be-*-* | arc*eb-*-*) with_endian=big ;;
1098 *) with_endian=little ;;
1099 esac
1100 fi
1101 case ${with_endian} in
1102 big|little) ;;
1103 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
1104 esac
1105 case ${with_endian} in
5fbceedd 1106 big*) tm_file="arc/big.h ${tm_file}"
3c867e46 1107 esac
1108 ;;
17a98fea 1109arm-wrs-vxworks|arm-wrs-vxworks7)
8afdaa80 1110 extra_options="${extra_options} arm/vxworks.opt"
06469f9e 1111 tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
17a98fea 1112 case $target in
1113 *-vxworks7)
1114 # VxWorks7 on ARM adheres to the ARM Base Platform ABI
1115 tmake_file="${tmake_file} arm/t-bpabi"
1116 tm_file="arm/bpabi.h ${tm_file}"
1117 # The BPABI long long divmod functions return a 128-bit value in
1118 # registers r0-r3.
1119 need_64bit_hwint=yes
1120 default_use_cxa_atexit=yes
1121 ;;
1122 *) ;;
1123 esac
1124 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
1125 target_cpu_cname="arm8"
d9799238 1126 ;;
275d0a7c 1127arm*-*-freebsd*) # ARM FreeBSD EABI
1128 tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h"
1129 case $target in
1130 arm*b-*-freebsd*)
1131 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1132 ;;
1133 esac
1134 tmake_file="${tmake_file} arm/t-arm arm/t-bpabi"
1135 tm_file="${tm_file} arm/bpabi.h arm/freebsd.h arm/aout.h arm/arm.h"
1136 case $target in
1137 armv6*-*-freebsd*)
879a1f04 1138 target_cpu_cname="arm1176jzf-s"
5b2f6136 1139 if test $fbsd_major -ge 11; then
1140 tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1141 fi
275d0a7c 1142 ;;
5ef60a28 1143 armv7*-*-freebsd*)
1144 target_cpu_cname="generic-armv7-a"
1145 tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1"
1146 ;;
b906ae74 1147 *)
1148 target_cpu_cname="arm9"
1149 ;;
275d0a7c 1150 esac
1151 with_tls=${with_tls:-gnu}
1152 ;;
f470dade 1153arm*-*-netbsdelf*)
3ff28a9d 1154 tm_file="dbxelf.h elfos.h ${nbsd_tm_file} arm/elf.h arm/aout.h ${tm_file} arm/netbsd-elf.h"
f466b0a0 1155 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
4dc4ff49 1156 tmake_file="${tmake_file} arm/t-arm"
0e9ba648 1157 target_cpu_cname="strongarm"
f470dade 1158 ;;
f49eb158 1159arm*-*-linux-*) # ARM GNU/Linux with ELF
deb14f24 1160 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"
1b455a16 1161 extra_options="${extra_options} linux-android.opt"
fcc91c04 1162 case $target in
736a63d4 1163 arm*b-*-linux*)
295f5c5c 1164 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1165 ;;
fcc91c04 1166 esac
ced500f0 1167 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
85f370fe 1168 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h arm/arm.h"
bb36bb09 1169 # Generation of floating-point instructions requires at least ARMv5te.
1170 if [ "$with_float" = "hard" -o "$with_float" = "softfp" ] ; then
1171 target_cpu_cname="arm10e"
1172 else
1173 target_cpu_cname="arm10tdmi"
1174 fi
295f5c5c 1175 # Define multilib configuration for arm-linux-androideabi.
6783d878 1176 case ${target} in
295f5c5c 1177 *-androideabi)
1178 tmake_file="$tmake_file arm/t-linux-androideabi"
6783d878 1179 ;;
1180 esac
295f5c5c 1181 # The EABI requires the use of __cxa_atexit.
1182 default_use_cxa_atexit=yes
bb10d7b5 1183 with_tls=${with_tls:-gnu}
bb607926 1184 ;;
295f5c5c 1185arm*-*-uclinux*eabi*) # ARM ucLinux
f3449a3c 1186 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
b69fc80a 1187 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
85f370fe 1188 tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h arm/arm.h"
b906ae74 1189 target_cpu_cname="arm7tdmi"
295f5c5c 1190 # The EABI requires the use of __cxa_atexit.
1191 default_use_cxa_atexit=yes
582b17a6 1192 ;;
6de77184 1193arm*-*-phoenix*)
1194 tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1195 tm_file="${tm_file} newlib-stdint.h phoenix.h"
1196 tm_file="${tm_file} arm/aout.h arm/arm.h"
1197 tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-phoenix"
b906ae74 1198 target_cpu_cname="arm7tdmi"
6de77184 1199 ;;
90369c4f 1200arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*)
0e0256f2 1201 case ${target} in
1202 arm*eb-*-eabi*)
1203 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1204 esac
a6b58380 1205 default_use_cxa_atexit=yes
30e9913f 1206 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
b69fc80a 1207 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
b906ae74 1208 target_cpu_cname="arm7tdmi"
30e9913f 1209 case ${target} in
35da3667 1210 arm*-*-eabi*)
f1b7ead9 1211 tm_file="$tm_file newlib-stdint.h"
a88cbac9 1212 tmake_file="${tmake_file} arm/t-bpabi"
f3449a3c 1213 use_gcc_stdint=wrap
35da3667 1214 ;;
90369c4f 1215 arm*-*-fuchsia*)
1216 tm_file="${tm_file} fuchsia.h arm/fuchsia-elf.h glibc-stdint.h"
ea0d5120 1217 tmake_file="${tmake_file} arm/t-bpabi arm/t-fuchsia"
26a9c0df 1218 target_cpu_cname="generic-armv7-a"
90369c4f 1219 ;;
e222cec3 1220 arm*-*-rtems*)
b5404134 1221 tm_file="${tm_file} rtems.h arm/rtems.h newlib-stdint.h"
1222 tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems"
1ecdfe84 1223 ;;
30e9913f 1224 arm*-*-symbianelf*)
1225 tm_file="${tm_file} arm/symbian.h"
35da3667 1226 # We do not include t-bpabi for Symbian OS because the system
1227 # provides its own implementation of the BPABI functions.
67de96d2 1228 tmake_file="${tmake_file} arm/t-symbian"
b906ae74 1229 target_cpu_cname="arm10tdmi"
30e9913f 1230 ;;
1231 esac
85f370fe 1232 tm_file="${tm_file} arm/aout.h arm/arm.h"
ccf155b5 1233 ;;
bb607926 1234avr-*-*)
f0aa7fe2 1235 tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h avr/specs.h dbxelf.h avr/avr-stdint.h"
fd28e216 1236 if test x${with_avrlibc} != xno; then
1237 tm_file="${tm_file} ${cpu_type}/avrlibc.h"
1238 tm_defines="${tm_defines} WITH_AVRLIBC"
1239 fi
da0aa575 1240 tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
f3449a3c 1241 use_gcc_stdint=wrap
f0aa7fe2 1242 extra_gcc_objs="driver-avr.o avr-devices.o"
47fe598e 1243 extra_objs="avr-devices.o avr-log.o"
bb607926 1244 ;;
9e6a0967 1245bfin*-elf*)
f3449a3c 1246 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
e0cbe6c1 1247 tmake_file=bfin/t-bfin-elf
1248 use_collect2=no
1249 ;;
43be3be8 1250bfin*-uclinux*)
deb14f24 1251 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
e0cbe6c1 1252 tmake_file=bfin/t-bfin-uclinux
e0cbe6c1 1253 use_collect2=no
1254 ;;
bce94ab5 1255bfin*-linux-uclibc*)
deb14f24 1256 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"
45e5f010 1257 tmake_file="${tmake_file} bfin/t-bfin-linux"
e0cbe6c1 1258 use_collect2=no
1259 ;;
4a7fad64 1260bfin*-rtems*)
b4cebe6e 1261 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
b69fc80a 1262 tmake_file="${tmake_file} bfin/t-rtems"
e0cbe6c1 1263 ;;
9e6a0967 1264bfin*-*)
f3449a3c 1265 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
e0cbe6c1 1266 use_collect2=no
f3449a3c 1267 use_gcc_stdint=wrap
e0cbe6c1 1268 ;;
b9fdd12b 1269cr16-*-elf)
a10f8074 1270 tm_file="elfos.h ${tm_file} newlib-stdint.h"
b9fdd12b 1271 tmake_file="${tmake_file} cr16/t-cr16 "
1272 use_collect2=no
1273 ;;
9b9e3455 1274crisv32-*-elf | crisv32-*-none)
f3449a3c 1275 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
9b9e3455 1276 tmake_file="cris/t-cris"
1277 target_cpu_default=32
1278 gas=yes
1279 extra_options="${extra_options} cris/elf.opt"
f3449a3c 1280 use_gcc_stdint=wrap
9b9e3455 1281 ;;
e03f789f 1282cris-*-elf | cris-*-none)
f3449a3c 1283 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
e03f789f 1284 tmake_file="cris/t-cris cris/t-elfmulti"
1285 gas=yes
c419af1d 1286 extra_options="${extra_options} cris/elf.opt"
f3449a3c 1287 use_gcc_stdint=wrap
e03f789f 1288 ;;
9b9e3455 1289crisv32-*-linux* | cris-*-linux*)
deb14f24 1290 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
f01c257a 1291 tmake_file="${tmake_file} cris/t-cris cris/t-linux"
c419af1d 1292 extra_options="${extra_options} cris/linux.opt"
9b9e3455 1293 case $target in
1294 cris-*-*)
1295 target_cpu_default=10
1296 ;;
1297 crisv32-*-*)
1298 target_cpu_default=32
1299 ;;
1300 esac
e03f789f 1301 ;;
9399b971 1302csky-*-*)
1303 if test x${with_endian} != x; then
1304 case ${with_endian} in
1305 big|little) ;;
1306 *)
1307 echo "with_endian=${with_endian} not supported."
1308 exit 1
1309 ;;
1310 esac
1311 fi
1312 if test x${with_float} != x; then
1313 case ${with_float} in
1314 soft | hard) ;;
1315 *) echo
1316 "Unknown floating point type used in --with-float=$with_float"
1317 exit 1
1318 ;;
1319 esac
1320 fi
1321 tm_file="csky/csky.h"
1322 md_file="csky/csky.md"
1323 out_file="csky/csky.c"
1324 tm_p_file="${tm_p_file} csky/csky-protos.h"
1325 extra_options="${extra_options} csky/csky_tables.opt"
1326
1327 if test x${enable_tpf_debug} = xyes; then
1328 tm_defines="${tm_defines} ENABLE_TPF_DEBUG"
1329 fi
1330
1331 case ${target} in
1332 csky-*-elf*)
1333 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} csky/csky-elf.h"
1334 tmake_file="csky/t-csky csky/t-csky-elf"
1335 default_use_cxa_atexit=no
1336 ;;
1337 csky-*-linux*)
1338 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} csky/csky-linux-elf.h"
1339 tmake_file="${tmake_file} csky/t-csky csky/t-csky-linux"
1340
1341 if test "x${enable_multilib}" = xyes ; then
1342 tm_file="$tm_file ./sysroot-suffix.h"
1343 tmake_file="${tmake_file} csky/t-sysroot-suffix"
1344 fi
1345
1346 case ${target} in
1347 csky-*-linux-gnu*)
1348 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
a139c535 1349 # Force .init_array support. The configure script cannot always
1350 # automatically detect that GAS supports it, yet we require it.
1351 gcc_cv_initfini_array=yes
9399b971 1352 ;;
1353 csky-*-linux-uclibc*)
1354 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
1355 default_use_cxa_atexit=no
1356 ;;
1357 *)
1358 echo "Unknown target $target"
1359 exit 1
1360 ;;
1361 esac
1362 ;;
1363 *)
1364 echo "Unknown target $target"
1365 exit 1
1366 ;;
1367 esac
1368 ;;
1c579c0e 1369epiphany-*-elf | epiphany-*-rtems*)
1370 tm_file="${tm_file} dbxelf.h elfos.h"
1371 tmake_file="${tmake_file} epiphany/t-epiphany"
1372 case ${target} in
1373 epiphany-*-rtems*)
1374 tm_file="${tm_file} rtems.h epiphany/rtems.h newlib-stdint.h"
1375 ;;
1376 *)
1377 tm_file="${tm_file} newlib-stdint.h"
1378 ;;
1379 esac
d19f5793 1380 extra_options="${extra_options} fused-madd.opt"
1c579c0e 1381 extra_objs="${extra_objs} mode-switch-use.o resolve-sw-modes.o"
d19f5793 1382 tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1383 extra_headers="epiphany_intrinsics.h"
1384 ;;
bb607926 1385fr30-*-elf)
ecf20f53 1386 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
bb607926 1387 ;;
efb6037d 1388frv-*-elf)
b1319ddf 1389 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
efb6037d 1390 tmake_file=frv/t-frv
1391 ;;
3e7f6cce 1392frv-*-*linux*)
b1319ddf 1393 tm_file="dbxelf.h elfos.h ${tm_file} \
deb14f24 1394 gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1afa774a 1395 tmake_file="${tmake_file} frv/t-frv frv/t-linux"
3e7f6cce 1396 ;;
b6616c9c 1397ft32-*-elf)
1398 gas=yes
1399 gnu_ld=yes
1400 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1401 tmake_file="${tmake_file} ft32/t-ft32"
1402 ;;
be52b6d8 1403moxie-*-elf)
1404 gas=yes
1405 gnu_ld=yes
01a092a9 1406 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
84600db5 1407 tmake_file="${tmake_file} moxie/t-moxie"
be52b6d8 1408 ;;
447e8aaa 1409moxie-*-uclinux*)
1410 gas=yes
1411 gnu_ld=yes
deb14f24 1412 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
84600db5 1413 tmake_file="${tmake_file} moxie/t-moxie"
447e8aaa 1414 ;;
c4fa0b2a 1415moxie-*-rtems*)
b69fc80a 1416 tmake_file="${tmake_file} moxie/t-moxie"
c4fa0b2a 1417 tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1418 ;;
ab0c4d2e 1419moxie-*-moxiebox*)
1420 gas=yes
1421 gnu_ld=yes
1422 tm_file="${tm_file} dbxelf.h elfos.h moxie/moxiebox.h newlib-stdint.h"
1423 tmake_file="${tmake_file} moxie/t-moxiebox"
1424 ;;
15b65932 1425h8300-*-elf*)
237490bf 1426 tmake_file="h8300/t-h8300"
f3449a3c 1427 tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
15b65932 1428 ;;
acff2768 1429h8300-*-linux*)
1430 tmake_file="${tmake_file} h8300/t-h8300 h8300/t-linux"
1431 tm_file="h8300/h8300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h h8300/linux.h"
1432 ;;
6af9f7ea 1433hppa*64*-*-linux*)
8ab32933 1434 target_cpu_default="MASK_PA_11|MASK_PA_20"
deb14f24 1435 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
f3449a3c 1436 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1437 pa/pa64-linux.h"
6630177d 1438 gas=yes gnu_ld=yes
1439 ;;
6af9f7ea 1440hppa*-*-linux*)
ecc25375 1441 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
deb14f24 1442 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
6630177d 1443 pa/pa32-regs.h pa/pa32-linux.h"
f3c59f1b 1444 tmake_file="${tmake_file} pa/t-pa pa/t-linux"
1445 d_target_objs="${d_target_objs} pa-d.o"
bb607926 1446 ;;
07cf7615 1447hppa*-*-openbsd*)
1448 target_cpu_default="MASK_PA_11"
1449 tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1450 pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
07cf7615 1451 extra_options="${extra_options} openbsd.opt"
1452 gas=yes
1453 gnu_ld=yes
1454 ;;
8ab32933 1455hppa[12]*-*-hpux10*)
1456 case ${target} in
1457 hppa1.1-*-* | hppa2*-*-*)
1458 target_cpu_default="MASK_PA_11"
1459 ;;
1460 esac
1461 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1462 pa/pa-hpux.h pa/pa-hpux10.h"
4d15365c 1463 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
8ab32933 1464 case ${target} in
1465 *-*-hpux10.[1-9]*)
1466 tm_file="${tm_file} pa/pa-hpux1010.h"
bd57250e 1467 extra_options="${extra_options} pa/pa-hpux1010.opt"
8ab32933 1468 ;;
bb607926 1469 esac
c0045c9e 1470 use_gcc_stdint=provide
1471 tm_file="${tm_file} hpux-stdint.h"
4dc4ff49 1472 tmake_file="t-slibgcc"
334c8279 1473 case ${enable_threads} in
1474 "")
1475 if test x$have_pthread_h = xyes ; then
1476 tmake_file="${tmake_file} pa/t-dce-thr"
1477 fi
1478 ;;
1479 yes | dce)
1480 tmake_file="${tmake_file} pa/t-dce-thr"
1481 ;;
bb607926 1482 esac
bb607926 1483 use_collect2=yes
8ad01423 1484 gas=yes
13b99879 1485 if test "x$with_dwarf2" != x; then
16b36e36 1486 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
13b99879 1487 dwarf2=no
1488 fi
bb607926 1489 ;;
1490hppa*64*-*-hpux11*)
8ab32933 1491 target_cpu_default="MASK_PA_11|MASK_PA_20"
cacee710 1492 if test x$gnu_ld = xyes
1493 then
8ab32933 1494 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
cacee710 1495 fi
8ad01423 1496 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1497 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1498 pa/pa-hpux11.h"
8ab32933 1499 case ${target} in
637c9296 1500 *-*-hpux11.[12]*)
8ab32933 1501 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
bd57250e 1502 extra_options="${extra_options} pa/pa-hpux1111.opt"
8ab32933 1503 ;;
637c9296 1504 *-*-hpux11.[3-9]*)
1505 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1506 extra_options="${extra_options} pa/pa-hpux1131.opt"
1507 ;;
8ab32933 1508 *)
1509 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1510 ;;
1511 esac
bd57250e 1512 extra_options="${extra_options} pa/pa-hpux.opt \
593c1adb 1513 pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
4dc4ff49 1514 tmake_file="t-slibgcc"
120a2fed 1515 case x${enable_threads} in
4699015f 1516 x | xyes | xposix )
3ebc7dec 1517 thread_file=posix
120a2fed 1518 ;;
1519 esac
8ad01423 1520 gas=yes
43cb9222 1521 case ${target} in
1522 *-*-hpux11.[01]*)
1523 use_gcc_stdint=provide
1524 tm_file="${tm_file} hpux-stdint.h"
1525 ;;
1526 *-*-hpux11.[23]*)
1527 use_gcc_stdint=wrap
1528 tm_file="${tm_file} hpux-stdint.h"
1529 ;;
1530 esac
bb607926 1531 ;;
8ab32933 1532hppa[12]*-*-hpux11*)
1533 case ${target} in
1534 hppa1.1-*-* | hppa2*-*-*)
1535 target_cpu_default="MASK_PA_11"
1536 ;;
1537 esac
1538 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
bd57250e 1539 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
593c1adb 1540 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1541 hpux11.opt"
8ab32933 1542 case ${target} in
637c9296 1543 *-*-hpux11.[12]*)
8ab32933 1544 tm_file="${tm_file} pa/pa-hpux1111.h"
bd57250e 1545 extra_options="${extra_options} pa/pa-hpux1111.opt"
120a2fed 1546 ;;
637c9296 1547 *-*-hpux11.[3-9]*)
1548 tm_file="${tm_file} pa/pa-hpux1131.h"
1549 extra_options="${extra_options} pa/pa-hpux1131.opt"
1550 ;;
120a2fed 1551 esac
4dc4ff49 1552 tmake_file="t-slibgcc"
120a2fed 1553 case x${enable_threads} in
4699015f 1554 x | xyes | xposix )
3ebc7dec 1555 thread_file=posix
120a2fed 1556 ;;
1557 esac
bb607926 1558 use_collect2=yes
8ad01423 1559 gas=yes
43cb9222 1560 case ${target} in
1561 *-*-hpux11.[01]*)
1562 use_gcc_stdint=provide
1563 tm_file="${tm_file} hpux-stdint.h"
1564 ;;
1565 *-*-hpux11.[23]*)
1566 use_gcc_stdint=wrap
1567 tm_file="${tm_file} hpux-stdint.h"
1568 ;;
1569 esac
13b99879 1570 if test "x$with_dwarf2" != x; then
16b36e36 1571 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
13b99879 1572 dwarf2=no
1573 fi
bb607926 1574 ;;
ffd05090 1575i[34567]86-*-darwin*)
ed2b8f56 1576 need_64bit_isa=yes
ffa7199b 1577 # Baseline choice for a machine that allows m64 support.
1578 with_cpu=${with_cpu:-core2}
a997b0d8 1579 tmake_file="${tmake_file} t-slibgcc"
ffd05090 1580 ;;
4a839b30 1581x86_64-*-darwin*)
ffa7199b 1582 with_cpu=${with_cpu:-core2}
a997b0d8 1583 tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
4a839b30 1584 tm_file="${tm_file} ${cpu_type}/darwin64.h"
1585 ;;
1c26a2ee 1586i[34567]86-*-elfiamcu)
1587 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
1588 ;;
bb607926 1589i[34567]86-*-elf*)
f3449a3c 1590 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
bc831fe3 1591 ;;
1592x86_64-*-elf*)
f3449a3c 1593 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
bb607926 1594 ;;
6f93d1ba 1595x86_64-*-rtems*)
602fa1e9 1596 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h i386/rtemself.h rtems.h"
6f93d1ba 1597 ;;
b433697b 1598i[34567]86-*-rdos*)
1599 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
1600 ;;
1601x86_64-*-rdos*)
1602 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"
1603 tmake_file="i386/t-i386elf t-svr4"
1604 ;;
463553db 1605i[34567]86-*-dragonfly*)
1606 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h dragonfly.h dragonfly-stdint.h i386/dragonfly.h"
1607 tmake_file="${tmake_file} i386/t-crtstuff"
1608 ;;
1609x86_64-*-dragonfly*)
1610 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"
1611 tmake_file="${tmake_file} i386/t-crtstuff"
1612 ;;
bb607926 1613i[34567]86-*-freebsd*)
d2307a72 1614 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
a8456aba 1615 ;;
1616x86_64-*-freebsd*)
d2307a72 1617 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"
bb607926 1618 ;;
f406b863 1619i[34567]86-*-netbsdelf*)
3ff28a9d 1620 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h"
f466b0a0 1621 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
f406b863 1622 ;;
8bc47d57 1623x86_64-*-netbsd*)
3ff28a9d 1624 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${nbsd_tm_file} i386/x86-64.h i386/netbsd64.h"
f466b0a0 1625 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
8bc47d57 1626 ;;
d3ad7bb1 1627i[34567]86-*-openbsd*)
bcc9ac22 1628 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
8e6600a1 1629 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1a0fb050 1630 extra_options="${extra_options} openbsd.opt"
d3ad7bb1 1631 gas=yes
1632 gnu_ld=yes
d3ad7bb1 1633 ;;
51796b3a 1634x86_64-*-openbsd*)
1635 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1636 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1637 extra_options="${extra_options} openbsd.opt"
1638 gas=yes
1639 gnu_ld=yes
1640 ;;
79573034 1641i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
6396cc37 1642 # Intel 80386's running GNU/*
bb607926 1643 # with ELF format using glibc 2
6ee152ce 1644 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
6396cc37 1645 case ${target} in
54bb64fb 1646 i[34567]86-*-linux*)
1b455a16 1647 tm_file="${tm_file} linux.h linux-android.h"
1648 extra_options="${extra_options} linux-android.opt"
54bb64fb 1649 if test x$enable_targets = xall; then
ba102931 1650 tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
54bb64fb 1651 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
b3fd46a0 1652 tmake_file="${tmake_file} i386/t-linux64"
596b2ba3 1653 x86_multilibs="${with_multilib_list}"
1654 if test "$x86_multilibs" = "default"; then
1655 x86_multilibs="m64,m32"
1656 fi
1657 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1658 for x86_multilib in ${x86_multilibs}; do
1659 case ${x86_multilib} in
1660 m32 | m64 | mx32)
1661 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1662 ;;
1663 *)
1664 echo "--with-multilib-list=${x86_with_multilib} not supported."
1665 exit 1
1666 esac
1667 done
1668 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
ed2b8f56 1669 need_64bit_isa=yes
f292755a 1670 if test x$with_cpu = x; then
f067c6b7 1671 if test x$with_cpu_64 = x; then
1672 with_cpu_64=generic
1673 fi
f292755a 1674 else
1675 case " $x86_cpus $x86_archs $x86_64_archs " in
1676 *" $with_cpu "*)
1677 ;;
1678 *)
1679 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1680 echo "$x86_cpus $x86_archs $x86_64_archs " 1>&2
1681 exit 1
1682 ;;
1683 esac
1684 fi
54bb64fb 1685 else
ba102931 1686 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
54bb64fb 1687 fi
1688 ;;
2c6c4996 1689 i[34567]86-*-kfreebsd*-gnu)
83dd7eef 1690 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
2c6c4996 1691 ;;
1692 i[34567]86-*-kopensolaris*-gnu)
83dd7eef 1693 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
2c6c4996 1694 ;;
1695 i[34567]86-*-gnu*)
83dd7eef 1696 tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
2c6c4996 1697 ;;
6396cc37 1698 esac
bb607926 1699 ;;
79573034 1700x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
6ee152ce 1701 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
83dd7eef 1702 i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
28a6c5e3 1703 case ${target} in
1c6e0788 1704 x86_64-*-linux*)
1b455a16 1705 tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
1706 extra_options="${extra_options} linux-android.opt"
2c6c4996 1707 ;;
1708 x86_64-*-kfreebsd*-gnu)
1709 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1710 ;;
28a6c5e3 1711 esac
237490bf 1712 tmake_file="${tmake_file} i386/t-linux64"
596b2ba3 1713 x86_multilibs="${with_multilib_list}"
1714 if test "$x86_multilibs" = "default"; then
d26d40c8 1715 case ${with_abi} in
1716 x32 | mx32)
1717 x86_multilibs="mx32"
1718 ;;
1719 *)
1720 x86_multilibs="m64,m32"
1721 ;;
1722 esac
596b2ba3 1723 fi
1724 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1725 for x86_multilib in ${x86_multilibs}; do
1726 case ${x86_multilib} in
1727 m32 | m64 | mx32)
1728 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1729 ;;
1730 *)
1731 echo "--with-multilib-list=${x86_with_multilib} not supported."
1732 exit 1
1733 esac
1734 done
1735 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
5c66405b 1736 ;;
bb607926 1737i[34567]86-pc-msdosdjgpp*)
1738 xm_file=i386/xm-djgpp.h
8c35683d 1739 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
638454a1 1740 native_system_header_dir=/dev/env/DJDIR/include
0c44645a 1741 extra_options="${extra_options} i386/djgpp.opt"
bb607926 1742 gnu_ld=yes
1743 gas=yes
a47075bb 1744 use_gcc_stdint=wrap
bb607926 1745 ;;
bb607926 1746i[34567]86-*-lynxos*)
d895dbf9 1747 xm_defines=POSIX
1748 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
237490bf 1749 tmake_file="${tmake_file} t-lynx"
0c44645a 1750 extra_options="${extra_options} lynx.opt"
d895dbf9 1751 thread_file=lynx
1752 gnu_ld=yes
1753 gas=yes
bb607926 1754 ;;
b1aac5f5 1755i[34567]86-*-nto-qnx*)
2b90ba90 1756 tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
9453823e 1757 extra_options="${extra_options} i386/nto.opt"
b1aac5f5 1758 gnu_ld=yes
1759 gas=yes
1760 ;;
41e38a87 1761i[34567]86-*-rtems*)
f3449a3c 1762 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"
b69fc80a 1763 tmake_file="${tmake_file} i386/t-rtems"
bb607926 1764 ;;
14f27bc6 1765i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
6f5b6a64 1766 # Set default arch_32 to pentium4, tune_32 to generic like the other
1767 # i386 targets, although config.guess defaults to i386-pc-solaris2*.
3efb5d22 1768 with_arch_32=${with_arch_32:-pentium4}
be67f556 1769 with_tune_32=${with_tune_32:-generic}
fc99725b 1770 tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file_head} i386/x86-64.h ${sol2_tm_file_tail}"
3efb5d22 1771 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
fc99725b 1772 tmake_file="$tmake_file i386/t-sol2"
3efb5d22 1773 need_64bit_isa=yes
1774 if test x$with_cpu = x; then
1775 if test x$with_cpu_64 = x; then
1776 with_cpu_64=generic
f292755a 1777 fi
3efb5d22 1778 else
1779 case " $x86_cpus $x86_archs $x86_64_archs " in
1780 *" $with_cpu "*)
1781 ;;
1782 *)
1783 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1784 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1785 exit 1
1786 ;;
1787 esac
1788 fi
bb607926 1789 ;;
0e50554f 1790i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae|i[4567]86-wrs-vxworks7|x86_64-wrs-vxworks7)
1791 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h"
1792 case ${target} in
1793 x86_64-*)
1794 need_64bit_isa=yes
1795 tm_file="${tm_file} i386/x86-64.h"
1796 ;;
1797 esac
1798 tm_file="${tm_file} vx-common.h"
2adf99fa 1799 case ${target} in
1800 *-vxworksae*)
ef90f3f3 1801 tm_file="${tm_file} vxworksae.h i386/vxworks.h i386/vxworksae.h"
2adf99fa 1802 tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1803 ;;
1804 *)
ef90f3f3 1805 tm_file="${tm_file} vxworks.h i386/vxworks.h"
2adf99fa 1806 tmake_file="${tmake_file} i386/t-vxworks"
1807 ;;
1808 esac
d9799238 1809 ;;
17b3d2a8 1810i[34567]86-*-cygwin*)
615180dd 1811 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"
e1688c3e 1812 xm_file=i386/xm-cygwin.h
4dc4ff49 1813 tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
62b4d90e 1814 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
94117391 1815 extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
74edde2f 1816 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
2637551a 1817 c_target_objs="${c_target_objs} msformat-c.o"
1818 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
bb607926 1819 if test x$enable_threads = xyes; then
8728e49b 1820 thread_file='posix'
bb607926 1821 fi
94117391 1822 default_use_cxa_atexit=yes
615180dd 1823 use_gcc_stdint=wrap
bb607926 1824 ;;
8f3115a2 1825x86_64-*-cygwin*)
1826 need_64bit_isa=yes
1827 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"
1828 xm_file=i386/xm-cygwin.h
1829 tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
1830 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
94117391 1831 extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
74edde2f 1832 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
8f3115a2 1833 c_target_objs="${c_target_objs} msformat-c.o"
1834 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1835 if test x$enable_threads = xyes; then
1836 thread_file='posix'
1837 fi
94117391 1838 default_use_cxa_atexit=yes
8f3115a2 1839 use_gcc_stdint=wrap
1840 tm_defines="${tm_defines} TARGET_CYGWIN64=1"
1841 ;;
c8c521bb 1842i[34567]86-*-mingw* | x86_64-*-mingw*)
b550f036 1843 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
e1688c3e 1844 xm_file=i386/xm-mingw32.h
f9f68d35 1845 c_target_objs="${c_target_objs} winnt-c.o"
1846 cxx_target_objs="${cxx_target_objs} winnt-c.o"
1847 target_has_targetcm="yes"
a4f7c8f7 1848 case ${target} in
1849 x86_64-*-* | *-w64-*)
ed2b8f56 1850 need_64bit_isa=yes
a4f7c8f7 1851 ;;
1852 *)
1853 ;;
1854 esac
b550f036 1855 if test x$enable_threads = xposix ; then
1856 tm_file="${tm_file} i386/mingw-pthread.h"
1857 fi
1858 tm_file="${tm_file} i386/mingw32.h"
72f432d4 1859 # This makes the logic if mingw's or the w64 feature set has to be used
1860 case ${target} in
1861 *-w64-*)
ac0366be 1862 user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1863 user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
72f432d4 1864 tm_file="${tm_file} i386/mingw-w64.h"
a4f7c8f7 1865 if test x$enable_targets = xall; then
1866 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
f292755a 1867 if test x$with_cpu = x; then
a4f7c8f7 1868 if test x$with_cpu_64 = x; then
1869 with_cpu_64=generic
1870 fi
f292755a 1871 else
1872 case " $x86_cpus $x86_archs $x86_64_archs " in
1873 *" $with_cpu "*)
1874 ;;
1875 *)
1876 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1877 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1878 exit 1
1879 ;;
1880 esac
1881 fi
a4f7c8f7 1882 fi
72f432d4 1883 ;;
1884 *)
72f432d4 1885 ;;
1886 esac
1887 tm_file="${tm_file} i386/mingw-stdint.h"
f9f68d35 1888 tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
0767c2a8 1889 case ${target} in
aca9e986 1890 x86_64-w64-*)
0767c2a8 1891 tmake_file="${tmake_file} i386/t-mingw-w64"
1892 ;;
aca9e986 1893 i[34567]86-w64-*)
1894 tmake_file="${tmake_file} i386/t-mingw-w32"
1895 ;;
0767c2a8 1896 esac
638454a1 1897 native_system_header_dir=/mingw/include
62b4d90e 1898 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
78e16ab5 1899 extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
72f432d4 1900 case ${target} in
1901 *-w64-*)
1902 extra_options="${extra_options} i386/mingw-w64.opt"
1903 ;;
1904 *)
1905 ;;
1906 esac
74edde2f 1907 extra_objs="${extra_objs} winnt.o winnt-stubs.o"
46f8e3b0 1908 c_target_objs="${c_target_objs} msformat-c.o"
1909 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
8ffcff2e 1910 gas=yes
1911 gnu_ld=yes
d91ef9b0 1912 default_use_cxa_atexit=yes
8953973a 1913 use_gcc_stdint=wrap
c89ba7eb 1914 case ${enable_threads} in
4dc4ff49 1915 "" | yes | win32)
1916 thread_file='win32'
b550f036 1917 ;;
1918 posix)
1919 thread_file='posix'
b550f036 1920 ;;
c89ba7eb 1921 esac
c8c521bb 1922 case ${target} in
1923 *mingw32crt*)
1924 tm_file="${tm_file} i386/crtdll.h"
1925 ;;
1926 *mingw32msv* | *mingw*)
170a37e8 1927 ;;
bb607926 1928 esac
1929 ;;
90369c4f 1930x86_64-*-fuchsia*)
1931 tmake_file="${tmake_file} i386/t-x86_64-elf"
1932 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h fuchsia.h"
1933 ;;
bb607926 1934ia64*-*-elf*)
f3449a3c 1935 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
bb607926 1936 tmake_file="ia64/t-ia64"
1937 target_cpu_default="0"
1938 if test x$gas = xyes
1939 then
1940 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1941 fi
1942 if test x$gnu_ld = xyes
1943 then
1944 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1945 fi
bb607926 1946 ;;
49b2e77d 1947ia64*-*-freebsd*)
0670e09b 1948 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
49b2e77d 1949 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1950 tmake_file="${tmake_file} ia64/t-ia64"
49b2e77d 1951 ;;
bb607926 1952ia64*-*-linux*)
deb14f24 1953 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
23fd872d 1954 tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
bb607926 1955 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
bb607926 1956 ;;
d838d791 1957ia64*-*-hpux*)
73f49bc2 1958 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
a997b0d8 1959 tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
d838d791 1960 target_cpu_default="MASK_GNU_AS"
120a2fed 1961 case x$enable_threads in
c5e978ad 1962 x | xyes | xposix )
120a2fed 1963 thread_file=posix
1964 ;;
1965 esac
297cec9a 1966 use_collect2=no
23ebf0fe 1967 c_target_objs="ia64-c.o"
1968 cxx_target_objs="ia64-c.o"
593c1adb 1969 extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
43cb9222 1970 use_gcc_stdint=wrap
1971 tm_file="${tm_file} hpux-stdint.h"
637c9296 1972 case ${target} in
1973 *-*-hpux11.3*)
1974 tm_file="${tm_file} ia64/hpux-unix2003.h"
1975 ;;
1976 esac
d838d791 1977 ;;
9b9a2528 1978ia64-hp-*vms*)
8f852c44 1979 tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
1980 tmake_file="${tmake_file} ia64/t-ia64"
9b9a2528 1981 target_cpu_default="0"
1982 if test x$gas = xyes
1983 then
1984 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1985 fi
b0a47c39 1986 extra_options="${extra_options} ia64/vms.opt"
9b9a2528 1987 ;;
54f12d76 1988iq2000*-*-elf*)
773dfb93 1989 tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
54f12d76 1990 out_file=iq2000/iq2000.c
54f12d76 1991 md_file=iq2000/iq2000.md
1992 ;;
f6fe91e8 1993lm32-*-elf*)
f151e2ad 1994 tm_file="dbxelf.h elfos.h ${tm_file} newlib-stdint.h"
84600db5 1995 tmake_file="${tmake_file} lm32/t-lm32"
f6fe91e8 1996 ;;
431df6da 1997lm32-*-rtems*)
b4cebe6e 1998 tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
84600db5 1999 tmake_file="${tmake_file} lm32/t-lm32"
72f8e79f 2000 tmake_file="${tmake_file} lm32/t-rtems"
431df6da 2001 ;;
f6fe91e8 2002lm32-*-uclinux*)
deb14f24 2003 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
84600db5 2004 tmake_file="${tmake_file} lm32/t-lm32"
f6fe91e8 2005 ;;
bb607926 2006m32r-*-elf*)
c876b1f0 2007 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
19cd32af 2008 ;;
467dc9aa 2009m32rle-*-elf*)
c876b1f0 2010 tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
467dc9aa 2011 ;;
2012m32r-*-linux*)
deb14f24 2013 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
9551b60b 2014 tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
467dc9aa 2015 gnu_ld=yes
467dc9aa 2016 if test x$enable_threads = xyes; then
2017 thread_file='posix'
2018 fi
2019 ;;
2020m32rle-*-linux*)
deb14f24 2021 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
9551b60b 2022 tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
467dc9aa 2023 gnu_ld=yes
467dc9aa 2024 if test x$enable_threads = xyes; then
2025 thread_file='posix'
2026 fi
2027 ;;
6af9f7ea 2028m68k-*-elf* | fido-*-elf*)
278e2fd1 2029 case ${target} in
2030 fido-*-elf*)
2031 # Check that $with_cpu makes sense.
2032 case $with_cpu in
2033 "" | "fidoa")
2034 ;;
2035 *)
2036 echo "Cannot accept --with-cpu=$with_cpu"
2037 exit 1
2038 ;;
2039 esac
2040 with_cpu=fidoa
2041 ;;
2042 *)
2043 default_m68k_cpu=68020
2044 default_cf_cpu=5206
2045 ;;
2046 esac
f3449a3c 2047 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"
99570287 2048 tm_defines="${tm_defines} MOTOROLA=1"
278e2fd1 2049 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
2050 # Add multilibs for targets other than fido.
2051 case ${target} in
2052 fido-*-elf*)
2053 ;;
2054 *)
2055 tmake_file="$tmake_file m68k/t-mlibs"
2056 ;;
2057 esac
bb607926 2058 ;;
6af9f7ea 2059m68k*-*-netbsdelf*)
f84195ec 2060 default_m68k_cpu=68020
558b196a 2061 default_cf_cpu=5475
3ff28a9d 2062 tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file} m68k/netbsd-elf.h"
f466b0a0 2063 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
3ff28a9d 2064 tm_defines="${tm_defines} MOTOROLA=1 CHAR_FAST8=1 SHORT_FAST16=1"
124c3198 2065 ;;
984408e9 2066m68k*-*-openbsd*)
f84195ec 2067 default_m68k_cpu=68020
558b196a 2068 default_cf_cpu=5475
984408e9 2069 # needed to unconfuse gdb
f84195ec 2070 tm_defines="${tm_defines} OBSD_OLD_GAS"
8e6600a1 2071 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1a0fb050 2072 extra_options="${extra_options} openbsd.opt"
237490bf 2073 tmake_file="t-openbsd m68k/t-openbsd"
984408e9 2074 # we need collect2 until our bug is fixed...
2075 use_collect2=yes
2076 ;;
8bc67792 2077m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
2078 # with uClibc, using the new GNU/Linux-style
2079 # ABI.
f84195ec 2080 default_m68k_cpu=68020
558b196a 2081 default_cf_cpu=5206
deb14f24 2082 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"
99c2a9e3 2083 extra_options="${extra_options} m68k/uclinux.opt"
d9993a19 2084 tm_defines="${tm_defines} MOTOROLA=1"
558b196a 2085 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
13285dde 2086 ;;
237490bf 2087m68k-*-linux*) # Motorola m68k's running GNU/Linux
bb607926 2088 # with ELF format using glibc 2
2089 # aka the GNU/Linux C library 6.
f84195ec 2090 default_m68k_cpu=68020
558b196a 2091 default_cf_cpu=5475
27f1c610 2092 with_arch=${with_arch:-m68k}
deb14f24 2093 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
fbdd0521 2094 extra_options="${extra_options} m68k/ieee.opt"
99570287 2095 tm_defines="${tm_defines} MOTOROLA=1"
27f1c610 2096 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
bb607926 2097 ;;
41e38a87 2098m68k-*-rtems*)
f84195ec 2099 default_m68k_cpu=68020
558b196a 2100 default_cf_cpu=5206
b69fc80a 2101 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
f3449a3c 2102 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"
99570287 2103 tm_defines="${tm_defines} MOTOROLA=1"
bb607926 2104 ;;
bb607926 2105mcore-*-elf)
7916fcc3 2106 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
bb607926 2107 tmake_file=mcore/t-mcore
58a8c75f 2108 inhibit_libc=true
bb607926 2109 ;;
d34b0d1e 2110microblaze*-linux*)
e975e345 2111 case $target in
2112 microblazeel-*)
2113 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2114 ;;
2115 microblaze-*)
2116 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2117 ;;
2118 esac
deb14f24 2119 tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
c48df545 2120 tm_file="${tm_file} glibc-stdint.h"
d34b0d1e 2121 c_target_objs="${c_target_objs} microblaze-c.o"
2122 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
c48df545 2123 tmake_file="${tmake_file} microblaze/t-microblaze"
e975e345 2124 tmake_file="${tmake_file} microblaze/t-microblaze-linux"
d34b0d1e 2125 ;;
ff219786 2126microblaze*-*-rtems*)
ad18d3ea 2127 case $target in
2128 microblazeel-*)
2129 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2130 ;;
2131 microblaze-*)
2132 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2133 ;;
2134 esac
ff219786 2135 tm_file="${tm_file} dbxelf.h"
2136 tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
2137 c_target_objs="${c_target_objs} microblaze-c.o"
2138 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
2139 tmake_file="${tmake_file} microblaze/t-microblaze"
b69fc80a 2140 tmake_file="${tmake_file} microblaze/t-rtems"
ff219786 2141 ;;
98f2ac05 2142microblaze*-*-elf)
e975e345 2143 case $target in
2144 microblazeel-*)
2145 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
2146 ;;
2147 microblaze-*)
2148 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
2149 ;;
2150 esac
98f2ac05 2151 tm_file="${tm_file} dbxelf.h newlib-stdint.h"
d34b0d1e 2152 c_target_objs="${c_target_objs} microblaze-c.o"
2153 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
98f2ac05 2154 tmake_file="${tmake_file} microblaze/t-microblaze"
d34b0d1e 2155 ;;
fb55f581 2156riscv*-*-linux*)
2157 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h"
2158 case "x${enable_multilib}" in
2159 xno) ;;
2160 xyes) tmake_file="${tmake_file} riscv/t-linux-multilib" ;;
2161 *) echo "Unknown value for enable_multilib"; exit 1
2162 esac
2163 tmake_file="${tmake_file} riscv/t-riscv riscv/t-linux"
2164 gnu_ld=yes
2165 gas=yes
2166 # Force .init_array support. The configure script cannot always
2167 # automatically detect that GAS supports it, yet we require it.
2168 gcc_cv_initfini_array=yes
2169 ;;
26dde94d 2170riscv*-*-elf* | riscv*-*-rtems*)
fb55f581 2171 tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h"
46765867 2172 case ${target} in
2173 *-*-rtems*)
2174 tm_file="${tm_file} rtems.h riscv/rtems.h"
2175 tmake_file="${tmake_file} riscv/t-rtems"
2176 ;;
2177 *)
2178 case "x${enable_multilib}" in
2179 xno) ;;
2180 xyes) tmake_file="${tmake_file} riscv/t-elf-multilib" ;;
2181 *) echo "Unknown value for enable_multilib"; exit 1
2182 esac
fb55f581 2183 esac
2184 tmake_file="${tmake_file} riscv/t-riscv"
2185 gnu_ld=yes
2186 gas=yes
2187 # Force .init_array support. The configure script cannot always
2188 # automatically detect that GAS supports it, yet we require it.
2189 gcc_cv_initfini_array=yes
2190 ;;
7ea6a647 2191riscv*-*-freebsd*)
2192 tm_file="${tm_file} elfos.h ${fbsd_tm_file} riscv/freebsd.h"
2193 tmake_file="${tmake_file} riscv/t-riscv"
2194 gnu_ld=yes
2195 gas=yes
2196 # Force .init_array support. The configure script cannot always
2197 # automatically detect that GAS supports it, yet we require it.
2198 gcc_cv_initfini_array=yes
2199 ;;
4ace673e 2200mips*-*-netbsd*) # NetBSD/mips, either endian.
b93bf04a 2201 target_cpu_default="MASK_ABICALLS"
3ff28a9d 2202 tm_file="elfos.h ${tm_file} mips/elf.h ${nbsd_tm_file} mips/netbsd.h"
f466b0a0 2203 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
bb607926 2204 ;;
a02ba4d0 2205mips*-img-linux*)
2206 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"
2207 extra_options="${extra_options} linux-android.opt"
2208 tmake_file="${tmake_file} mips/t-img-linux"
2209 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
955fe9b7 2210 with_arch_32="mips32r6"
2211 with_arch_64="mips64r6"
a02ba4d0 2212 gnu_ld=yes
2213 gas=yes
2214 ;;
32108f3d 2215mips*-mti-linux*)
abf7fbd6 2216 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"
f2ea04f5 2217 extra_options="${extra_options} linux-android.opt"
32108f3d 2218 tmake_file="${tmake_file} mips/t-mti-linux"
2219 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
955fe9b7 2220 with_arch_32="mips32r2"
2221 with_arch_64="mips64r2"
32108f3d 2222 gnu_ld=yes
2223 gas=yes
32108f3d 2224 ;;
7c83c1f7 2225mips*-*-linux*) # Linux MIPS, either endian.
abf7fbd6 2226 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"
f2ea04f5 2227 extra_options="${extra_options} linux-android.opt"
69f36814 2228 case ${target} in
78645e70 2229 mipsisa32r6*)
2230 default_mips_arch=mips32r6
2231 ;;
7c83c1f7 2232 mipsisa32r2*)
257ccd46 2233 default_mips_arch=mips32r2
7c83c1f7 2234 ;;
2235 mipsisa32*)
257ccd46 2236 default_mips_arch=mips32
7c83c1f7 2237 ;;
69f36814 2238 mips64el-st-linux-gnu)
257ccd46 2239 default_mips_abi=n32
69f36814 2240 tm_file="${tm_file} mips/st.h"
2241 tmake_file="${tmake_file} mips/t-st"
7c83c1f7 2242 enable_mips_multilibs="yes"
69f36814 2243 ;;
fc84efeb 2244 mips64octeon*-*-linux*)
257ccd46 2245 default_mips_abi=n32
fc84efeb 2246 tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
2247 target_cpu_default=MASK_SOFT_FLOAT_ABI
7c83c1f7 2248 enable_mips_multilibs="yes"
fc84efeb 2249 ;;
78645e70 2250 mipsisa64r6*-*-linux*)
2251 default_mips_abi=n32
2252 default_mips_arch=mips64r6
2253 enable_mips_multilibs="yes"
2254 ;;
606c99b0 2255 mipsisa64r2*-*-linux*)
257ccd46 2256 default_mips_abi=n32
2257 default_mips_arch=mips64r2
7c83c1f7 2258 enable_mips_multilibs="yes"
2259 ;;
2260 mips64*-*-linux* | mipsisa64*-*-linux*)
257ccd46 2261 default_mips_abi=n32
7c83c1f7 2262 enable_mips_multilibs="yes"
606c99b0 2263 ;;
69f36814 2264 esac
b167b87f 2265 if test x$enable_targets = xall; then
7c83c1f7 2266 enable_mips_multilibs="yes"
2267 fi
2268 if test x$enable_mips_multilibs = xyes; then
b167b87f 2269 tmake_file="${tmake_file} mips/t-linux64"
b167b87f 2270 fi
bb607926 2271 ;;
eceb106a 2272mips*-mti-elf*)
c789b852 2273 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
eceb106a 2274 tmake_file="mips/t-mti-elf"
2275 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
955fe9b7 2276 with_arch_32="mips32r2"
2277 with_arch_64="mips64r2"
eceb106a 2278 ;;
a02ba4d0 2279mips*-img-elf*)
2280 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2281 tmake_file="mips/t-img-elf"
2282 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
955fe9b7 2283 with_arch_32="mips32r6"
2284 with_arch_64="mips64r6"
a02ba4d0 2285 ;;
5aeba334 2286mips*-sde-elf*)
c789b852 2287 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
9213d2eb 2288 tmake_file="mips/t-sde"
0b1d266f 2289 extra_options="${extra_options} mips/sde.opt"
68c9bc25 2290 case "${with_newlib}" in
2291 yes)
2292 # newlib / libgloss.
2293 ;;
2294 *)
2295 # MIPS toolkit libraries.
2296 tm_file="$tm_file mips/sdemtk.h"
2297 tmake_file="$tmake_file mips/t-sdemtk"
68c9bc25 2298 case ${enable_threads} in
2299 "" | yes | mipssde)
2300 thread_file='mipssde'
2301 ;;
2302 esac
2303 ;;
2304 esac
5aeba334 2305 case ${target} in
78645e70 2306 mipsisa32r6*)
2307 tm_defines="MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32"
2308 ;;
5aeba334 2309 mipsisa32r2*)
2310 tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2311 ;;
2312 mipsisa32*)
2313 tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
2314 ;;
78645e70 2315 mipsisa64r6*)
2316 tm_defines="MIPS_ISA_DEFAULT=69 MIPS_ABI_DEFAULT=ABI_N32"
2317 ;;
77a32a8e 2318 mipsisa64r2*)
2319 tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
2320 ;;
5aeba334 2321 mipsisa64*)
2322 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
2323 ;;
2324 esac
2325 ;;
7583e786 2326mipsisa32-*-elf* | mipsisa32el-*-elf* | \
2327mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
78645e70 2328mipsisa32r6-*-elf* | mipsisa32r6el-*-elf* | \
77a32a8e 2329mipsisa64-*-elf* | mipsisa64el-*-elf* | \
78645e70 2330mipsisa64r2-*-elf* | mipsisa64r2el-*-elf* | \
2331mipsisa64r6-*-elf* | mipsisa64r6el-*-elf*)
f3449a3c 2332 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 2333 tmake_file="mips/t-isa3264"
7583e786 2334 case ${target} in
78645e70 2335 mipsisa32r6*)
2336 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37"
2337 ;;
7583e786 2338 mipsisa32r2*)
2339 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
2340 ;;
2341 mipsisa32*)
2342 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2343 ;;
78645e70 2344 mipsisa64r6*)
2345 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=69"
2346 ;;
77a32a8e 2347 mipsisa64r2*)
2348 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
2349 ;;
7583e786 2350 mipsisa64*)
2351 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
2352 ;;
2353 esac
2354 case ${target} in
2355 mipsisa32*-*-elfoabi*)
2356 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
2357 tm_file="${tm_file} mips/elfoabi.h"
2358 ;;
2359 mipsisa64*-*-elfoabi*)
2360 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
2361 tm_file="${tm_file} mips/elfoabi.h"
2362 ;;
2363 *-*-elf*)
2364 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2365 ;;
2366 esac
5381547d 2367 ;;
2857c21b 2368mipsisa64sr71k-*-elf*)
f3449a3c 2369 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2857c21b 2370 tmake_file=mips/t-sr71k
515fdcc2 2371 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2857c21b 2372 ;;
19c56034 2373mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
f3449a3c 2374 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 2375 tmake_file="mips/t-elf mips/t-sb1"
515fdcc2 2376 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
19c56034 2377 ;;
60b34f30 2378mips-*-elf* | mipsel-*-elf* | mipsr5900-*-elf* | mipsr5900el-*-elf*)
f3449a3c 2379 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 2380 tmake_file="mips/t-elf"
bb607926 2381 ;;
60b34f30 2382mips64r5900-*-elf* | mips64r5900el-*-elf*)
c789b852 2383 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h"
60b34f30 2384 tmake_file="mips/t-elf"
2385 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
2386 ;;
f4deb416 2387mips64-*-elf* | mips64el-*-elf*)
f3449a3c 2388 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 2389 tmake_file="mips/t-elf"
515fdcc2 2390 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
bb607926 2391 ;;
2857c21b 2392mips64vr-*-elf* | mips64vrel-*-elf*)
f3449a3c 2393 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
2857c21b 2394 tmake_file=mips/t-vr
9d463647 2395 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2857c21b 2396 ;;
f4deb416 2397mips64orion-*-elf* | mips64orionel-*-elf*)
f3449a3c 2398 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
9213d2eb 2399 tmake_file="mips/t-elf"
515fdcc2 2400 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
bb607926 2401 ;;
742d48c2 2402mips*-*-rtems*)
f3449a3c 2403 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
b69fc80a 2404 tmake_file="${tmake_file} mips/t-elf mips/t-rtems"
bb607926 2405 ;;
d9799238 2406mips-wrs-vxworks)
e49cee06 2407 tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
d9799238 2408 tmake_file="${tmake_file} mips/t-vxworks"
d9799238 2409 ;;
f4deb416 2410mipstx39-*-elf* | mipstx39el-*-elf*)
f3449a3c 2411 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
9213d2eb 2412 tmake_file="mips/t-r3900"
bb607926 2413 ;;
68cbb7e3 2414mmix-knuth-mmixware)
f3449a3c 2415 tm_file="${tm_file} newlib-stdint.h"
f3449a3c 2416 use_gcc_stdint=wrap
68cbb7e3 2417 ;;
bb607926 2418mn10300-*-*)
05381348 2419 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
bb607926 2420 if test x$stabs = xyes
2421 then
2422 tm_file="${tm_file} dbx.h"
2423 fi
2424 use_collect2=no
f3449a3c 2425 use_gcc_stdint=wrap
bb607926 2426 ;;
e4a25868 2427msp430*-*-*)
2428 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2429 c_target_objs="msp430-c.o"
2430 cxx_target_objs="msp430-c.o"
e4a25868 2431 tmake_file="${tmake_file} msp430/t-msp430"
7ed86ba5 2432 extra_gcc_objs="driver-msp430.o"
e4a25868 2433 ;;
a5a22b4f 2434nds32*-*-*)
eae21ed1 2435 target_cpu_default="0"
2436 tm_defines="${tm_defines}"
a5a22b4f 2437 case ${target} in
2438 nds32le*-*-*)
2439 ;;
2440 nds32be-*-*)
2441 target_cpu_default="${target_cpu_default}|MASK_BIG_ENDIAN"
2442 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2443 ;;
2444 esac
2445 case ${target} in
2446 nds32*-*-elf*)
2447 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} nds32/elf.h nds32/nds32_intrinsic.h"
2448 tmake_file="nds32/t-nds32 nds32/t-elf"
2449 ;;
2450 nds32*-*-linux*)
2451 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h nds32/linux.h nds32/nds32_intrinsic.h"
2452 tmake_file="${tmake_file} nds32/t-nds32 nds32/t-linux"
2453 ;;
2454 esac
b7968556 2455
a5a22b4f 2456 # Handle --enable-default-relax setting.
2457 if test x${enable_default_relax} = xyes; then
2458 tm_defines="${tm_defines} TARGET_DEFAULT_RELAX=1"
2459 fi
b7968556 2460 # Handle --with-ext-dsp
2461 if test x${with_ext_dsp} = xyes; then
2462 tm_defines="${tm_defines} TARGET_DEFAULT_EXT_DSP=1"
2463 fi
eae21ed1 2464 ;;
de65406d 2465nios2-*-*)
2466 tm_file="elfos.h ${tm_file}"
2467 tmake_file="${tmake_file} nios2/t-nios2"
2468 case ${target} in
2469 nios2-*-linux*)
2470 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h nios2/linux.h "
2471 ;;
2472 nios2-*-elf*)
2473 tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
2474 extra_options="${extra_options} nios2/elf.opt"
2475 ;;
f7c4fafb 2476 nios2-*-rtems*)
2477 tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
2478 tmake_file="${tmake_file} t-rtems nios2/t-rtems"
2479 ;;
de65406d 2480 esac
2481 ;;
8ce80784 2482nvptx-*)
2483 tm_file="${tm_file} newlib-stdint.h"
a20d2c4d 2484 use_gcc_stdint=wrap
8ce80784 2485 tmake_file="nvptx/t-nvptx"
9c08fbb3 2486 if test x$enable_as_accelerator = xyes; then
2487 extra_programs="${extra_programs} mkoffload\$(exeext)"
2488 tm_file="${tm_file} nvptx/offload.h"
2489 fi
8ce80784 2490 ;;
d61fdfe7 2491or1k*-*-*)
2492 tm_file="elfos.h ${tm_file}"
2493 tmake_file="${tmake_file} or1k/t-or1k"
2494 # Force .init_array support. The configure script cannot always
2495 # automatically detect that GAS supports it, yet we require it.
2496 gcc_cv_initfini_array=yes
2497
2498 # Handle --with-multilib-list=...
2499 or1k_multilibs="${with_multilib_list}"
2500 if test "$or1k_multilibs" = "default"; then
2501 or1k_multilibs="mcmov,msoft-mul,msoft-div"
2502 fi
2503 or1k_multilibs=`echo $or1k_multilibs | sed -e 's/,/ /g'`
2504 for or1k_multilib in ${or1k_multilibs}; do
2505 case ${or1k_multilib} in
2506 mcmov | msext | msfimm | \
2507 mhard-div | mhard-mul | \
2508 msoft-div | msoft-mul )
2509 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${or1k_multilib}"
2510 ;;
2511 *)
2512 echo "--with-multilib-list=${with_multilib_list} not supported."
2513 exit 1
2514 esac
2515 done
2516 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
2517
2518 case ${target} in
2519 or1k*-*-linux*)
2520 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h"
2521 tm_file="${tm_file} or1k/linux.h"
2522 ;;
2523 or1k*-*-elf*)
2524 tm_file="${tm_file} newlib-stdint.h or1k/elf.h"
2525 extra_options="${extra_options} or1k/elf.opt"
2526 ;;
2527 or1k*-*-rtems*)
2528 tm_file="${tm_file} newlib-stdint.h or1k/rtems.h rtems.h"
2529 tmake_file="${tmake_file} or1k/t-rtems"
2530 ;;
2531 esac
2532 ;;
bb607926 2533pdp11-*-*)
f3449a3c 2534 tm_file="${tm_file} newlib-stdint.h"
2535 use_gcc_stdint=wrap
bb607926 2536 ;;
0ac7fc08 2537# port not yet contributed
2538#powerpc-*-openbsd*)
a23b9c51 2539# tmake_file="${tmake_file} rs6000/t-fprules"
0ac7fc08 2540# extra_headers=
2541# ;;
17ac16a1 2542powerpc-*-darwin*)
16ac04e7 2543 extra_options="${extra_options} rs6000/darwin.opt"
8949381a 2544 case ${target} in
9b1f316f 2545 *-darwin1[0-9]* | *-darwin[8-9]*)
3ebc7dec 2546 tmake_file="${tmake_file} rs6000/t-darwin8"
9b1f316f 2547 tm_file="${tm_file} rs6000/darwin8.h"
2548 ;;
2549 *-darwin7*)
2550 tm_file="${tm_file} rs6000/darwin7.h"
2551 ;;
2552 *-darwin[0-6]*)
2553 ;;
8949381a 2554 esac
a997b0d8 2555 tmake_file="${tmake_file} t-slibgcc"
25b7153e 2556 extra_headers=altivec.h
17ac16a1 2557 ;;
84eba009 2558powerpc64-*-darwin*)
84eba009 2559 extra_options="${extra_options} ${cpu_type}/darwin.opt"
a997b0d8 2560 tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
191bb103 2561 tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
84eba009 2562 extra_headers=altivec.h
2563 ;;
2ac000bb 2564powerpc*-*-freebsd*)
ab6b1bb4 2565 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${fbsd_tm_file} rs6000/sysv4.h"
16ac04e7 2566 extra_options="${extra_options} rs6000/sysv4.opt"
2ac000bb 2567 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
c2bac6b7 2568 case ${target} in
2ac000bb 2569 powerpc64*)
2570 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2571 tmake_file="${tmake_file} rs6000/t-freebsd64"
2572 extra_options="${extra_options} rs6000/linux64.opt"
2573 ;;
2574 *)
2575 tm_file="${tm_file} rs6000/freebsd.h"
2576 ;;
2577 esac
327811ee 2578 ;;
93006578 2579powerpc-*-netbsd*)
ab6b1bb4 2580 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h ${nbsd_tm_file} freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
f466b0a0 2581 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
5eeaefac 2582 tmake_file="${tmake_file} rs6000/t-netbsd"
16ac04e7 2583 extra_options="${extra_options} rs6000/sysv4.opt"
93006578 2584 ;;
bbf524e7 2585powerpc-*-eabisimaltivec*)
ab6b1bb4 2586 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
16ac04e7 2587 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2588 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
f3449a3c 2589 use_gcc_stdint=wrap
bbf524e7 2590 ;;
bb607926 2591powerpc-*-eabisim*)
ab6b1bb4 2592 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
16ac04e7 2593 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2594 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
f3449a3c 2595 use_gcc_stdint=wrap
bb607926 2596 ;;
2597powerpc-*-elf*)
ab6b1bb4 2598 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
16ac04e7 2599 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2600 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 2601 ;;
553c09a8 2602powerpc-*-eabialtivec*)
ab6b1bb4 2603 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
16ac04e7 2604 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2605 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
f3449a3c 2606 use_gcc_stdint=wrap
553c09a8 2607 ;;
bb607926 2608powerpc-*-eabi*)
ab6b1bb4 2609 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
16ac04e7 2610 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2611 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
f3449a3c 2612 use_gcc_stdint=wrap
bb607926 2613 ;;
2614powerpc-*-rtems*)
ab6b1bb4 2615 tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h"
f78795cf 2616 extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
b69fc80a 2617 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
bb607926 2618 ;;
d80dc920 2619powerpc*-*-linux*)
cdfc6004 2620 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h"
16ac04e7 2621 extra_options="${extra_options} rs6000/sysv4.opt"
7bb12776 2622 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
4c866b9b 2623 extra_objs="$extra_objs rs6000-linux.o"
d80dc920 2624 case ${target} in
2625 powerpc*le-*-*)
24038ccc 2626 tm_file="${tm_file} rs6000/sysv4le.h" ;;
d80dc920 2627 esac
7bb12776 2628 case ${target}:${with_cpu} in
2629 powerpc64*: | powerpc64*:native) cpu_is_64bit=yes ;;
2630 esac
2631 maybe_biarch=${cpu_is_64bit}
2632 case ${enable_targets} in
2633 *powerpc64*) maybe_biarch=yes ;;
bcfd2aea 2634 all) maybe_biarch=yes ;;
7bb12776 2635 esac
7bb12776 2636 case ${target}:${enable_targets}:${maybe_biarch} in
2637 powerpc64-* | powerpc-*:*:yes | *:*powerpc64-*:yes | *:all:yes \
2638 | powerpc64le*:*powerpcle* | powerpc64le*:*powerpc-* \
2639 | powerpcle-*:*powerpc64le*:yes)
cc5ffbb8 2640 if test x$cpu_is_64bit = xyes; then
2641 tm_file="${tm_file} rs6000/default64.h"
2642 fi
f3449a3c 2643 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
cc5ffbb8 2644 tmake_file="$tmake_file rs6000/t-linux64"
24038ccc 2645 case ${target} in
2646 powerpc*le-*-*)
2647 tmake_file="$tmake_file rs6000/t-linux64le"
2648 case ${enable_targets} in
2649 all | *powerpc64-* | *powerpc-*)
2650 tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
2651 esac ;;
2652 *)
2653 case ${enable_targets} in
2654 all | *powerpc64le-* | *powerpcle-*)
2655 tmake_file="$tmake_file rs6000/t-linux64bele" ;;
2656 esac ;;
2657 esac
e168332d 2658 extra_options="${extra_options} rs6000/linux64.opt"
cc5ffbb8 2659 ;;
7bb12776 2660 powerpc64*)
2661 tm_file="${tm_file} rs6000/default64.h rs6000/linux64.h glibc-stdint.h"
2662 extra_options="${extra_options} rs6000/linux64.opt"
2663 tmake_file="${tmake_file} rs6000/t-linux"
2664 ;;
cc5ffbb8 2665 *)
f3449a3c 2666 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
7bb12776 2667 tmake_file="${tmake_file} rs6000/t-ppcos rs6000/t-linux"
cc5ffbb8 2668 ;;
2669 esac
8d40ea45 2670 case ${target} in
fef79628 2671 powerpc*-*-linux*ppc476*)
2672 tm_file="${tm_file} rs6000/476.h"
2673 extra_options="${extra_options} rs6000/476.opt" ;;
8d40ea45 2674 powerpc*-*-linux*altivec*)
2675 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
8d40ea45 2676 esac
e5b0ce4f 2677 case ${target} in
2678 *-linux*-musl*)
2679 enable_secureplt=yes ;;
2680 esac
197f58fa 2681 if test x${enable_secureplt} = xyes; then
2682 tm_file="rs6000/secureplt.h ${tm_file}"
2683 fi
bb607926 2684 ;;
061339f2 2685powerpc-wrs-vxworks*)
ab6b1bb4 2686 tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
a23b9c51 2687 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
16ac04e7 2688 extra_options="${extra_options} rs6000/sysv4.opt"
805e22b2 2689 extra_headers=ppc-asm.h
e6eccdb3 2690 case ${target} in
6c352a95 2691 *-vxworksmils*)
bf0ea9ad 2692 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksmils.h"
6c352a95 2693 tmake_file="${tmake_file} rs6000/t-vxworksmils"
2694 ;;
e6eccdb3 2695 *-vxworksae*)
bf0ea9ad 2696 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
e6eccdb3 2697 tmake_file="${tmake_file} rs6000/t-vxworksae"
2698 ;;
2699 *-vxworks*)
bf0ea9ad 2700 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
e6eccdb3 2701 ;;
2702 esac
805e22b2 2703 ;;
d895dbf9 2704powerpc-*-lynxos*)
2705 xm_defines=POSIX
ab6b1bb4 2706 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
d895dbf9 2707 tmake_file="t-lynx rs6000/t-lynx"
16ac04e7 2708 extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
d895dbf9 2709 thread_file=lynx
2710 gnu_ld=yes
2711 gas=yes
2712 ;;
bb607926 2713powerpcle-*-elf*)
ab6b1bb4 2714 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
a23b9c51 2715 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
16ac04e7 2716 extra_options="${extra_options} rs6000/sysv4.opt"
bb607926 2717 ;;
2718powerpcle-*-eabisim*)
ab6b1bb4 2719 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
a23b9c51 2720 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
16ac04e7 2721 extra_options="${extra_options} rs6000/sysv4.opt"
f3449a3c 2722 use_gcc_stdint=wrap
bb607926 2723 ;;
2724powerpcle-*-eabi*)
ab6b1bb4 2725 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
a23b9c51 2726 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
16ac04e7 2727 extra_options="${extra_options} rs6000/sysv4.opt"
f3449a3c 2728 use_gcc_stdint=wrap
bb607926 2729 ;;
67429b36 2730rs6000-ibm-aix6.* | powerpc-ibm-aix6.*)
b5e8a0bc 2731 tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
a997b0d8 2732 tmake_file="rs6000/t-aix52 t-slibgcc"
0cc77516 2733 extra_options="${extra_options} rs6000/aix64.opt"
2734 use_collect2=yes
2735 thread_file='aix'
b5e8a0bc 2736 use_gcc_stdint=wrap
4e9e79a9 2737 default_use_cxa_atexit=yes
67429b36 2738 ;;
90c3ff50 2739rs6000-ibm-aix7.1.* | powerpc-ibm-aix7.1.*)
67429b36 2740 tm_file="${tm_file} rs6000/aix.h rs6000/aix71.h rs6000/xcoff.h rs6000/aix-stdint.h"
2741 tmake_file="rs6000/t-aix52 t-slibgcc"
90c3ff50 2742 extra_options="${extra_options} rs6000/aix64.opt"
2743 use_collect2=yes
2744 thread_file='aix'
2745 use_gcc_stdint=wrap
90c3ff50 2746 default_use_cxa_atexit=yes
2747 ;;
2748rs6000-ibm-aix[789].* | powerpc-ibm-aix[789].*)
2749 tm_file="${tm_file} rs6000/aix.h rs6000/aix72.h rs6000/xcoff.h rs6000/aix-stdint.h"
2750 tmake_file="rs6000/t-aix52 t-slibgcc"
67429b36 2751 extra_options="${extra_options} rs6000/aix64.opt"
2752 use_collect2=yes
2753 thread_file='aix'
2754 use_gcc_stdint=wrap
4e9e79a9 2755 default_use_cxa_atexit=yes
0cc77516 2756 ;;
78e515f7 2757rl78-*-elf*)
2758 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2759 target_has_targetm_common=no
2760 c_target_objs="rl78-c.o"
2761 cxx_target_objs="rl78-c.o"
2762 tmake_file="${tmake_file} rl78/t-rl78"
2763 ;;
24833e1a 2764rx-*-elf*)
3be74046 2765 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
24833e1a 2766 tmake_file="${tmake_file} rx/t-rx"
2767 ;;
582b17a6 2768s390-*-linux*)
deb14f24 2769 tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
07f32359 2770 c_target_objs="${c_target_objs} s390-c.o"
2771 cxx_target_objs="${cxx_target_objs} s390-c.o"
5cd72ba2 2772 if test x$enable_targets = xall; then
2773 tmake_file="${tmake_file} s390/t-linux64"
2774 fi
07f32359 2775 tmake_file="${tmake_file} s390/t-s390"
346e8a0c 2776 ;;
582b17a6 2777s390x-*-linux*)
deb14f24 2778 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
f2ea04f5 2779 tm_p_file="linux-protos.h s390/s390-protos.h"
07f32359 2780 c_target_objs="${c_target_objs} s390-c.o"
2781 cxx_target_objs="${cxx_target_objs} s390-c.o"
48de175f 2782 md_file=s390/s390.md
b5ccaa7b 2783 extra_modes=s390/s390-modes.def
48de175f 2784 out_file=s390/s390.c
07f32359 2785 tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
346e8a0c 2786 ;;
7c1f201b 2787s390x-ibm-tpf*)
07f32359 2788 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
2789 tm_p_file=s390/s390-protos.h
2790 c_target_objs="${c_target_objs} s390-c.o"
2791 cxx_target_objs="${cxx_target_objs} s390-c.o"
2792 md_file=s390/s390.md
2793 extra_modes=s390/s390-modes.def
2794 out_file=s390/s390.c
2795 thread_file='tpf'
9f88bc9d 2796 extra_options="${extra_options} s390/tpf.opt"
07f32359 2797 tmake_file="${tmake_file} s390/t-s390"
7c1f201b 2798 ;;
6af9f7ea 2799sh-*-elf* | sh[12346l]*-*-elf* | \
ccf1c0f1 2800 sh-*-linux* | sh[2346lbe]*-*-linux* | \
9a9b5abf 2801 sh-*-netbsdelf* | shl*-*-netbsdelf*)
07168dd9 2802 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2803 if test x${with_endian} = x; then
2804 case ${target} in
2805 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2806 shbe-*-* | sheb-*-*) with_endian=big,little ;;
2807 sh[1234]l* | sh[34]*-*-linux*) with_endian=little ;;
9a9b5abf 2808 shl* | sh*-*-linux* | \
2809 sh-superh-elf) with_endian=little,big ;;
07168dd9 2810 sh[1234]*-*-*) with_endian=big ;;
2811 *) with_endian=big,little ;;
2812 esac
2813 fi
f555bf81 2814 # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2815 # First word : the default endian.
2816 # Second word: the secondary endian (optional).
07168dd9 2817 case ${with_endian} in
f555bf81 2818 big) TM_ENDIAN_CONFIG=mb ;;
2819 little) TM_ENDIAN_CONFIG=ml ;;
2820 big,little) TM_ENDIAN_CONFIG="mb ml" ;;
2821 little,big) TM_ENDIAN_CONFIG="ml mb" ;;
07168dd9 2822 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
2823 esac
2824 case ${with_endian} in
2825 little*) tm_file="sh/little.h ${tm_file}" ;;
2826 esac
9bc320a5 2827 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
09c6646e 2828 case ${target} in
07168dd9 2829 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
bcc58dc6 2830 if test x$enable_fdpic = xyes; then
2831 tm_defines="$tm_defines FDPIC_DEFAULT=1"
2832 fi
deb14f24 2833 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
f466b0a0 2834 sh*-*-netbsd*)
3ff28a9d 2835 tm_file="${tm_file} ${nbsd_tm_file} sh/netbsd-elf.h"
f466b0a0 2836 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2837
2838 ;;
cfcf8539 2839 sh*-superh-elf) if test x$with_libgloss != xno; then
2840 with_libgloss=yes
2841 tm_file="${tm_file} sh/newlib.h"
2842 fi
0e6b6360 2843 tm_file="${tm_file} sh/embed-elf.h"
cfcf8539 2844 tm_file="${tm_file} sh/superh.h"
cfcf8539 2845 extra_options="${extra_options} sh/superh.opt" ;;
65a1f1e9 2846 *) if test x$with_newlib = xyes \
2847 && test x$with_libgloss = xyes; then
2848 tm_file="${tm_file} sh/newlib.h"
2849 fi
2850 tm_file="${tm_file} sh/embed-elf.h" ;;
07168dd9 2851 esac
2852 case ${target} in
07168dd9 2853 *-*-netbsd)
07168dd9 2854 ;;
f3449a3c 2855 *-*-elf*)
2856 tm_file="${tm_file} newlib-stdint.h"
2857 ;;
493914a8 2858 esac
07168dd9 2859 # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2860 case `echo ${target} | sed 's/e[lb]-/-/'` in
9435e831 2861 sh4a_single_only*) sh_cpu_target=sh4a-single-only ;;
2862 sh4a_single*) sh_cpu_target=sh4a-single ;;
2863 sh4a_nofpu*) sh_cpu_target=sh4a-nofpu ;;
2864 sh4al) sh_cpu_target=sh4al ;;
2865 sh4a*) sh_cpu_target=sh4a ;;
07168dd9 2866 sh4_single_only*) sh_cpu_target=sh4-single-only ;;
2867 sh4_single*) sh_cpu_target=sh4-single ;;
2868 sh4_nofpu*) sh_cpu_target=sh4-nofpu ;;
2869 sh4* | sh-superh-*) sh_cpu_target=sh4 ;;
2870 sh3e*) sh_cpu_target=sh3e ;;
2871 sh*-*-netbsd* | sh3*) sh_cpu_target=sh3 ;;
7105fb72 2872 sh2a_single_only*) sh_cpu_target=sh2a-single-only ;;
2873 sh2a_single*) sh_cpu_target=sh2a-single ;;
2874 sh2a_nofpu*) sh_cpu_target=sh2a-nofpu ;;
2875 sh2a*) sh_cpu_target=sh2a ;;
07168dd9 2876 sh2e*) sh_cpu_target=sh2e ;;
2877 sh2*) sh_cpu_target=sh2 ;;
2878 *) sh_cpu_target=sh1 ;;
aa76b2b5 2879 esac
65a1f1e9 2880 # did the user say --without-fp ?
2881 if test x$with_fp = xno; then
2882 case ${sh_cpu_target} in
65a1f1e9 2883 sh4al | sh1) ;;
2884 sh4a* ) sh_cpu_target=sh4a-nofpu ;;
2885 sh4*) sh_cpu_target=sh4-nofpu ;;
2886 sh3*) sh_cpu_target=sh3 ;;
2887 sh2a*) sh_cpu_target=sh2a-nofpu ;;
2888 sh2*) sh_cpu_target=sh2 ;;
2889 *) echo --without-fp not available for $target: ignored
2890 esac
2891 tm_defines="$tm_defines STRICT_NOFPU=1"
2892 fi
07168dd9 2893 sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2894 case $sh_cpu_default in
7105fb72 2895 sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
9435e831 2896 sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
99b0f6d9 2897 sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
eb4e5153 2898 sh3e | sh3 | sh2e | sh2 | sh1) ;;
07168dd9 2899 "") sh_cpu_default=${sh_cpu_target} ;;
2900 *) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
febf5bcd 2901 esac
07168dd9 2902 sh_multilibs=${with_multilib_list}
f555bf81 2903 if test "$sh_multilibs" = "default" ; then
07168dd9 2904 case ${target} in
2905 sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
07168dd9 2906 sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
9fe603c3 2907 sh*-*-linux*) sh_multilibs=m1,m2,m2a,m3e,m4 ;;
07168dd9 2908 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
7105fb72 2909 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
07168dd9 2910 esac
65a1f1e9 2911 if test x$with_fp = xno; then
2912 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`"
2913 fi
07168dd9 2914 fi
3a6994f8 2915 target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
07168dd9 2916 tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
f555bf81 2917 tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
b56481ad 2918 sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
07168dd9 2919 for sh_multilib in ${sh_multilibs}; do
2920 case ${sh_multilib} in
f555bf81 2921 m1 | m2 | m2e | m3 | m3e | \
2922 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2923 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
9a9b5abf 2924 m2a | m2a-single | m2a-single-only | m2a-nofpu)
f555bf81 2925 # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2926 # It is passed to MULTIILIB_OPTIONS verbatim.
2927 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2928 tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
07168dd9 2929 ;;
f555bf81 2930 \!*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2931 # It is passed the MULTILIB_EXCEPTIONS verbatim.
2932 TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
07168dd9 2933 *)
2934 echo "with_multilib_list=${sh_multilib} not supported."
2935 exit 1
2936 ;;
2937 esac
2938 done
f555bf81 2939 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
3a6994f8 2940 if test x${enable_incomplete_targets} = xyes ; then
9a9b5abf 2941 tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
07168dd9 2942 fi
fa22494c 2943 tm_file="$tm_file ./sysroot-suffix.h"
2944 tmake_file="$tmake_file t-sysroot-suffix"
87e19636 2945 ;;
26f6dfe2 2946sh-*-rtems*)
b69fc80a 2947 tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
9bc320a5 2948 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
26f6dfe2 2949 ;;
d9799238 2950sh-wrs-vxworks)
237490bf 2951 tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
9bc320a5 2952 tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
d9799238 2953 ;;
bb607926 2954sparc-*-elf*)
1bb0ad55 2955 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
b0168e11 2956 case ${target} in
2957 *-leon-*)
9e64c9a4 2958 tmake_file="sparc/t-sparc sparc/t-leon"
b0168e11 2959 ;;
2960 *-leon[3-9]*)
9e64c9a4 2961 tmake_file="sparc/t-sparc sparc/t-leon3"
b0168e11 2962 ;;
2963 *)
9e64c9a4 2964 tmake_file="sparc/t-sparc sparc/t-elf"
b0168e11 2965 ;;
2966 esac
bb607926 2967 ;;
a711a067 2968sparc-*-rtems*)
1bb0ad55 2969 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
e7e4edaa 2970 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
a711a067 2971 ;;
2972sparc-*-linux*)
8da0577c 2973 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
a9341855 2974 extra_options="${extra_options} sparc/long-double-switch.opt"
b0168e11 2975 case ${target} in
2976 *-leon-*)
9e64c9a4 2977 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
b0168e11 2978 ;;
2979 *-leon[3-9]*)
9e64c9a4 2980 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
b0168e11 2981 ;;
2982 *)
a997b0d8 2983 tmake_file="${tmake_file} sparc/t-sparc"
b0168e11 2984 ;;
2985 esac
1168681b 2986 if test x$enable_targets = xall; then
2987 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
64c6f17e 2988 tmake_file="${tmake_file} sparc/t-linux64"
1168681b 2989 else
2990 tm_file="${tm_file} sparc/linux.h"
4063b198 2991 tmake_file="${tmake_file} sparc/t-linux"
1168681b 2992 fi
bb607926 2993 ;;
a711a067 2994sparc-*-netbsdelf*)
3ff28a9d 2995 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
f466b0a0 2996 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
a711a067 2997 extra_options="${extra_options} sparc/long-double-switch.opt"
9e64c9a4 2998 tmake_file="${tmake_file} sparc/t-sparc"
9afa4711 2999 ;;
8acfe9c6 3000sparc*-*-solaris2*)
fc99725b 3001 tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sparc/tso.h"
8fde03ba 3002 case ${target} in
8acfe9c6 3003 sparc64-*-* | sparcv9-*-*)
b95fe851 3004 tm_file="sparc/default64.h ${tm_file}"
f3449a3c 3005 ;;
8acfe9c6 3006 *)
3007 test x$with_cpu != x || with_cpu=v9
517cabaa 3008 ;;
8fde03ba 3009 esac
fc99725b 3010 tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2"
bb607926 3011 ;;
723e1902 3012sparc-wrs-vxworks)
1bb0ad55 3013 tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
9e64c9a4 3014 tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
723e1902 3015 ;;
bb607926 3016sparc64-*-elf*)
1bb0ad55 3017 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
7abb12da 3018 extra_options="${extra_options}"
9e64c9a4 3019 tmake_file="${tmake_file} sparc/t-sparc"
bb607926 3020 ;;
a711a067 3021sparc64-*-rtems*)
1bb0ad55 3022 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
7abb12da 3023 extra_options="${extra_options}"
b69fc80a 3024 tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
a711a067 3025 ;;
3026sparc64-*-linux*)
b95fe851 3027 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"
a711a067 3028 extra_options="${extra_options} sparc/long-double-switch.opt"
a997b0d8 3029 tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
a711a067 3030 ;;
cf481f89 3031sparc64-*-freebsd*|ultrasparc-*-freebsd*)
3032 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
a9341855 3033 extra_options="${extra_options} sparc/long-double-switch.opt"
cf481f89 3034 case "x$with_cpu" in
68345096 3035 xultrasparc) ;;
cf481f89 3036 x) with_cpu=ultrasparc ;;
3037 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
3038 esac
9e64c9a4 3039 tmake_file="${tmake_file} sparc/t-sparc"
cf481f89 3040 ;;
1897a3df 3041sparc64-*-netbsd*)
1897a3df 3042 tm_file="sparc/biarch64.h ${tm_file}"
3ff28a9d 3043 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h ${nbsd_tm_file} sparc/netbsd-elf.h"
f466b0a0 3044 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
a9341855 3045 extra_options="${extra_options} sparc/long-double-switch.opt"
9e64c9a4 3046 tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
1897a3df 3047 ;;
a711a067 3048sparc64-*-openbsd*)
1bb0ad55 3049 tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
a711a067 3050 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
1a0fb050 3051 extra_options="${extra_options} openbsd.opt"
7abb12da 3052 extra_options="${extra_options}"
a711a067 3053 gas=yes gnu_ld=yes
3054 with_cpu=ultrasparc
9e64c9a4 3055 tmake_file="${tmake_file} sparc/t-sparc"
a711a067 3056 ;;
644459d0 3057spu-*-elf*)
f3449a3c 3058 tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
644459d0 3059 tmake_file="spu/t-spu-elf"
638454a1 3060 native_system_header_dir=/include
6cf5579e 3061 extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
644459d0 3062 extra_modes=spu/spu-modes.def
3063 c_target_objs="${c_target_objs} spu-c.o"
3064 cxx_target_objs="${cxx_target_objs} spu-c.o"
3065 ;;
5aa04b01 3066tic6x-*-elf)
3067 tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
3068 tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
5aa04b01 3069 tmake_file="c6x/t-c6x c6x/t-c6x-elf"
5aa04b01 3070 use_collect2=no
3071 ;;
3072tic6x-*-uclinux)
3073 tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
3074 tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
3075 tm_file="${tm_file} ./sysroot-suffix.h"
a997b0d8 3076 tmake_file="t-sysroot-suffix t-slibgcc"
5aa04b01 3077 tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
5aa04b01 3078 use_collect2=no
3079 ;;
2da35515 3080tilegx*-*-linux*)
7ce78e23 3081 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
3082 tmake_file="${tmake_file} tilegx/t-tilegx"
ea4d38ee 3083 extra_objs="${extra_objs} mul-tables.o"
6adc88f8 3084 c_target_objs="${c_target_objs} tilegx-c.o"
3085 cxx_target_objs="${cxx_target_objs} tilegx-c.o"
1fea9dc6 3086 extra_headers="feedback.h"
2da35515 3087 case $target in
3088 tilegxbe-*)
3089 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
3090 ;;
3091 esac
7ce78e23 3092 ;;
2da35515 3093tilepro*-*-linux*)
7ce78e23 3094 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
3095 tmake_file="${tmake_file} tilepro/t-tilepro"
ea4d38ee 3096 extra_objs="${extra_objs} mul-tables.o"
6adc88f8 3097 c_target_objs="${c_target_objs} tilepro-c.o"
3098 cxx_target_objs="${cxx_target_objs} tilepro-c.o"
1fea9dc6 3099 extra_headers="feedback.h"
7ce78e23 3100 ;;
20fbb1f2 3101v850-*-rtems*)
3102 target_cpu_default="TARGET_CPU_generic"
3103 tm_file="dbxelf.h elfos.h v850/v850.h"
3104 tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
3105 tmake_file="${tmake_file} v850/t-v850"
b69fc80a 3106 tmake_file="${tmake_file} v850/t-rtems"
20fbb1f2 3107 use_collect2=no
3108 c_target_objs="v850-c.o"
3109 cxx_target_objs="v850-c.o"
3110 ;;
f5ec6516 3111v850*-*-*)
3112 case ${target} in
9a5788ea 3113 v850e3v5-*-*)
3114 target_cpu_default="TARGET_CPU_v850e3v5"
3115 ;;
f5ec6516 3116 v850e2v3-*-*)
3117 target_cpu_default="TARGET_CPU_v850e2v3"
3118 ;;
3119 v850e2-*-*)
3120 target_cpu_default="TARGET_CPU_v850e2"
3121 ;;
3122 v850e1-*-* | v850es-*-*)
3123 target_cpu_default="TARGET_CPU_v850e1"
3124 ;;
3125 v850e-*-*)
3126 target_cpu_default="TARGET_CPU_v850e"
3127 ;;
3128 v850-*-*)
3129 target_cpu_default="TARGET_CPU_generic"
3130 ;;
3131 esac
156edce8 3132 tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
5dd3389c 3133 if test x$stabs = xyes
3134 then
3135 tm_file="${tm_file} dbx.h"
3136 fi
3137 use_collect2=no
3138 c_target_objs="v850-c.o"
3139 cxx_target_objs="v850-c.o"
f3449a3c 3140 use_gcc_stdint=wrap
5dd3389c 3141 ;;
6718899e 3142vax-*-linux*)
deb14f24 3143 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
6b9d66b3 3144 extra_options="${extra_options} vax/elf.opt"
6718899e 3145 ;;
f470dade 3146vax-*-netbsdelf*)
3ff28a9d 3147 tm_file="${tm_file} elfos.h ${nbsd_tm_file} vax/elf.h vax/netbsd-elf.h"
6b9d66b3 3148 extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
3ff28a9d 3149 tm_defines="${tm_defines} CHAR_FAST8=1 SHORT_FAST16=1"
f470dade 3150 ;;
bb607926 3151vax-*-openbsd*)
a27111cc 3152 tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-libpthread.h vax/openbsd.h"
1a0fb050 3153 extra_options="${extra_options} openbsd.opt"
bb607926 3154 use_collect2=yes
3155 ;;
8992df51 3156visium-*-elf*)
3157 tm_file="dbxelf.h elfos.h ${tm_file} visium/elf.h newlib-stdint.h"
3158 tmake_file="visium/t-visium visium/t-crtstuff"
3159 ;;
9b954fed 3160xstormy16-*-elf)
3161 # For historical reasons, the target files omit the 'x'.
2487a409 3162 tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
9b954fed 3163 tm_p_file=stormy16/stormy16-protos.h
8c6edba4 3164 tm_d_file="elfos.h stormy16/stormy16.h"
9b954fed 3165 md_file=stormy16/stormy16.md
3166 out_file=stormy16/stormy16.c
840f1481 3167 extra_options=stormy16/stormy16.opt
9b954fed 3168 tmake_file="stormy16/t-stormy16"
9b954fed 3169 ;;
a76109da 3170xtensa*-*-elf*)
be47c99e 3171 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
b0a67e36 3172 extra_options="${extra_options} xtensa/elf.opt"
f6b7ba2b 3173 ;;
a76109da 3174xtensa*-*-linux*)
deb14f24 3175 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
237490bf 3176 tmake_file="${tmake_file} xtensa/t-xtensa"
f6b7ba2b 3177 ;;
e3c15dbe 3178xtensa*-*-uclinux*)
3179 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h"
3180 tmake_file="${tmake_file} xtensa/t-xtensa"
3181 extra_options="${extra_options} xtensa/uclinux.opt"
3182 ;;
1acdfc69 3183am33_2.0-*-linux*)
deb14f24 3184 tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
1acdfc69 3185 gas=yes gnu_ld=yes
1acdfc69 3186 use_collect2=no
3187 ;;
a41d0b5e 3188m32c-*-rtems*)
3a0201c8 3189 tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
a41d0b5e 3190 c_target_objs="m32c-pragma.o"
3191 cxx_target_objs="m32c-pragma.o"
3192 ;;
85c84d5c 3193m32c-*-elf*)
3a0201c8 3194 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
85c84d5c 3195 c_target_objs="m32c-pragma.o"
3196 cxx_target_objs="m32c-pragma.o"
85c84d5c 3197 ;;
bb607926 3198*)
09c6646e 3199 echo "*** Configuration ${target} not supported" 1>&2
bb607926 3200 exit 1
3201 ;;
3202esac
3203
561866ed 3204case ${target} in
561866ed 3205i[34567]86-*-linux* | x86_64-*-linux*)
46f8e3b0 3206 tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
561866ed 3207 ;;
3208i[34567]86-*-* | x86_64-*-*)
46f8e3b0 3209 tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
561866ed 3210 ;;
cf61fe8d 3211powerpc*-*-* | rs6000-*-*)
01e91138 3212 tm_file="${tm_file} ${cpu_type}/option-defaults.h"
561866ed 3213esac
3214
6834b837 3215# non-glibc systems
3216case ${target} in
3217*-linux-musl*)
3218 tmake_file="${tmake_file} t-musl"
3219 ;;
3220*-linux-uclibc*)
3221 tmake_file="${tmake_file} t-uclibc"
3222 ;;
3223esac
3224
7a3c63c6 3225# Assume the existence of indirect function support and allow the use of the
3226# resolver attribute.
3227case ${target} in
3228*-*-linux*android*|*-*-linux*uclibc*|*-*-linux*musl*)
3229 ;;
3230*-*-linux*)
3231 case ${target} in
0dc42c7e 3232 aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | s390*-* | sparc*-* | x86_64-*)
7a3c63c6 3233 default_gnu_indirect_function=yes
3234 ;;
3235 esac
3236 ;;
3237esac
3238
7e689f9a 3239# Build mkoffload tool
3240case ${target} in
3241*-intelmic-* | *-intelmicemul-*)
3242 tmake_file="${tmake_file} i386/t-intelmic"
ca4c3545 3243 tm_file="${tm_file} i386/intelmic-offload.h"
7e689f9a 3244 ;;
3245esac
3246
c94b1d0e 3247if [ "$target_has_targetcm" = "no" ]; then
3248 c_target_objs="$c_target_objs default-c.o"
3249 cxx_target_objs="$cxx_target_objs default-c.o"
3250fi
3251
3e87b980 3252if [ "$common_out_file" = "" ]; then
3253 if [ "$target_has_targetm_common" = "yes" ]; then
3254 common_out_file="$cpu_type/$cpu_type-common.c"
3255 else
3256 common_out_file="default-common.c"
3257 fi
3258fi
3259
03385ed3 3260if [ "$target_has_targetdm" = "no" ]; then
3261 d_target_objs="$d_target_objs default-d.o"
3262fi
3263
3864b642 3264# Support for --with-cpu and related options (and a few unrelated options,
973f8bf3 3265# too).
370a1d10 3266case ${with_cpu} in
3267 yes | no)
3268 echo "--with-cpu must be passed a value" 1>&2
3269 exit 1
3270 ;;
3271esac
f0b281fe 3272
1f64ad21 3273# Set arch and cpu from ${target} and ${target_noncanonical}. Set cpu
3274# to generic if there is no processor scheduler model for the target.
3275arch=
3276cpu=
05b38372 3277arch_without_sse2=no
ed2b8f56 3278arch_without_64bit=no
1f64ad21 3279case ${target} in
0be8ff0a 3280 i386-*-freebsd*)
3281 if test $fbsd_major -ge 6; then
3282 arch=i486
3283 else
3284 arch=i386
3285 fi
3286 cpu=generic
3287 arch_without_sse2=yes
3288 arch_without_64bit=yes
3289 ;;
d39d6f3f 3290 i386-*-netbsd*)
3291 arch=i486
3292 cpu=generic
3293 arch_without_sse2=yes
3294 arch_without_64bit=yes
3295 ;;
1f64ad21 3296 i386-*-*)
3297 arch=i386
3298 cpu=i386
05b38372 3299 arch_without_sse2=yes
ed2b8f56 3300 arch_without_64bit=yes
1f64ad21 3301 ;;
3302 i486-*-*)
3303 arch=i486
3304 cpu=i486
05b38372 3305 arch_without_sse2=yes
ed2b8f56 3306 arch_without_64bit=yes
1f64ad21 3307 ;;
3308 i586-*-*)
05b38372 3309 arch_without_sse2=yes
ed2b8f56 3310 arch_without_64bit=yes
1f64ad21 3311 case ${target_noncanonical} in
3312 k6_2-*)
3313 arch=k6-2
3314 cpu=k6-2
3315 ;;
3316 k6_3-*)
3317 arch=k6-3
3318 cpu=k6-3
3319 ;;
3320 k6-*)
3321 arch=k6
3322 cpu=k6
3323 ;;
3324 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
3325 arch=pentium-mmx
3326 cpu=pentium-mmx
3327 ;;
3328 *)
3329 arch=pentium
3330 cpu=pentium
3331 ;;
3332 esac
3333 ;;
3334 i686-*-* | i786-*-*)
3335 case ${target_noncanonical} in
4c9faaa4 3336 znver1-*)
3337 arch=znver1
3338 cpu=znver1
3339 ;;
703d2f69 3340 znver2-*)
3341 arch=znver2
3342 cpu=znver2
3343 ;;
ec3f1e8b 3344 bdver4-*)
3345 arch=bdver4
3346 cpu=bdver4
3347 ;;
77aff08f 3348 bdver3-*)
3349 arch=bdver3
3350 cpu=bdver3
3351 ;;
8991ae0a 3352 bdver2-*)
3353 arch=bdver2
3354 cpu=bdver2
3355 ;;
6fc76bb0 3356 bdver1-*)
3357 arch=bdver1
3358 cpu=bdver1
3359 ;;
a97faf6b 3360 btver1-*)
3361 arch=btver1
3362 cpu=btver1
3363 ;;
75eddf9a 3364 btver2-*)
3365 arch=btver2
3366 cpu=btver2
3367 ;;
1f64ad21 3368 amdfam10-*|barcelona-*)
3369 arch=amdfam10
3370 cpu=amdfam10
3371 ;;
3372 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3373 arch=k8-sse3
3374 cpu=k8-sse3
3375 ;;
3376 k8-*|opteron-*|athlon64-*|athlon_fx-*)
3377 arch=k8
3378 cpu=k8
3379 ;;
3380 athlon_xp-*|athlon_mp-*|athlon_4-*)
3381 arch=athlon-4
3382 cpu=athlon-4
05b38372 3383 arch_without_sse2=yes
ed2b8f56 3384 arch_without_64bit=yes
1f64ad21 3385 ;;
3386 athlon_tbird-*|athlon-*)
3387 arch=athlon
3388 cpu=athlon
05b38372 3389 arch_without_sse2=yes
1f64ad21 3390 ;;
3391 geode-*)
3392 arch=geode
3393 cpu=geode
05b38372 3394 arch_without_sse2=yes
1f64ad21 3395 ;;
3396 pentium2-*)
3397 arch=pentium2
3398 cpu=pentium2
05b38372 3399 arch_without_sse2=yes
1f64ad21 3400 ;;
3401 pentium3-*|pentium3m-*)
3402 arch=pentium3
3403 cpu=pentium3
05b38372 3404 arch_without_sse2=yes
1f64ad21 3405 ;;
3406 pentium4-*|pentium4m-*)
3407 arch=pentium4
3408 cpu=pentium4
3409 ;;
3410 prescott-*)
3411 arch=prescott
3412 cpu=prescott
3413 ;;
3414 nocona-*)
3415 arch=nocona
3416 cpu=nocona
3417 ;;
3418 atom-*)
3419 arch=atom
3420 cpu=atom
3421 ;;
564c5b22 3422 slm-*)
3423 arch=slm
3424 cpu=slm
3425 ;;
1f64ad21 3426 core2-*)
3427 arch=core2
3428 cpu=core2
3429 ;;
b0298715 3430 corei7-*)
3431 arch=corei7
3432 cpu=corei7
3433 ;;
e4168d53 3434 corei7_avx-*)
3435 arch=corei7-avx
3436 cpu=corei7-avx
3437 ;;
1f64ad21 3438 pentium_m-*)
3439 arch=pentium-m
3440 cpu=pentium-m
3441 ;;
3442 pentiumpro-*)
3443 arch=pentiumpro
3444 cpu=pentiumpro
05b38372 3445 arch_without_sse2=yes
1f64ad21 3446 ;;
3447 *)
3448 arch=pentiumpro
3449 cpu=generic
05b38372 3450 arch_without_sse2=yes
ed2b8f56 3451 arch_without_64bit=yes
1f64ad21 3452 ;;
3453 esac
3454 ;;
3455 x86_64-*-*)
3456 case ${target_noncanonical} in
4c9faaa4 3457 znver1-*)
3458 arch=znver1
3459 cpu=znver1
3460 ;;
703d2f69 3461 znver2-*)
3462 arch=znver2
3463 cpu=znver2
3464 ;;
ec3f1e8b 3465 bdver4-*)
3466 arch=bdver4
3467 cpu=bdver4
3468 ;;
77aff08f 3469 bdver3-*)
3470 arch=bdver3
3471 cpu=bdver3
3472 ;;
8991ae0a 3473 bdver2-*)
3474 arch=bdver2
3475 cpu=bdver2
3476 ;;
6fc76bb0 3477 bdver1-*)
3478 arch=bdver1
3479 cpu=bdver1
3480 ;;
a97faf6b 3481 btver1-*)
3482 arch=btver1
3483 cpu=btver1
3484 ;;
75eddf9a 3485 btver2-*)
3486 arch=btver2
3487 cpu=btver2
3488 ;;
1f64ad21 3489 amdfam10-*|barcelona-*)
3490 arch=amdfam10
3491 cpu=amdfam10
3492 ;;
3493 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3494 arch=k8-sse3
3495 cpu=k8-sse3
3496 ;;
3497 k8-*|opteron-*|athlon_64-*)
3498 arch=k8
3499 cpu=k8
3500 ;;
3501 nocona-*)
3502 arch=nocona
3503 cpu=nocona
3504 ;;
3505 atom-*)
3506 arch=atom
3507 cpu=atom
3508 ;;
564c5b22 3509 slm-*)
3510 arch=slm
3511 cpu=slm
3512 ;;
1f64ad21 3513 core2-*)
3514 arch=core2
3515 cpu=core2
3516 ;;
b0298715 3517 corei7-*)
3518 arch=corei7
3519 cpu=corei7
3520 ;;
1f64ad21 3521 *)
3522 arch=x86-64
3523 cpu=generic
3524 ;;
3525 esac
3526 ;;
3527esac
3528
370a1d10 3529# If there is no $with_cpu option, try to infer one from ${target}.
3530# This block sets nothing except for with_cpu.
3531if test x$with_cpu = x ; then
3532 case ${target} in
01872b87 3533 i[34567]86-*-elfiamcu)
3f6183e5 3534 with_cpu=lakemont
01872b87 3535 ;;
1f64ad21 3536 i[34567]86-*-*|x86_64-*-*)
3537 with_cpu=$cpu
370a1d10 3538 ;;
3539 alphaev6[78]*-*-*)
3540 with_cpu=ev67
3541 ;;
3542 alphaev6*-*-*)
3543 with_cpu=ev6
3544 ;;
3545 alphapca56*-*-*)
3546 with_cpu=pca56
3547 ;;
3548 alphaev56*-*-*)
3549 with_cpu=ev56
3550 ;;
3551 alphaev5*-*-*)
3552 with_cpu=ev5
3553 ;;
de6e318c 3554 frv-*-*linux* | frv400-*-*linux*)
3e7f6cce 3555 with_cpu=fr400
3556 ;;
de6e318c 3557 frv550-*-*linux*)
3558 with_cpu=fr550
3559 ;;
f84195ec 3560 m68k*-*-*)
558b196a 3561 case "$with_arch" in
3562 "cf")
3563 with_cpu=${default_cf_cpu}
3564 ;;
3565 "" | "m68k")
3566 with_cpu=m${default_m68k_cpu}
3567 ;;
3568 esac
f84195ec 3569 ;;
370a1d10 3570 sparc*-*-*)
cbd3655d 3571 case ${target} in
3572 *-leon-*)
3573 with_cpu=leon
3574 ;;
3575 *-leon[3-9]*)
3576 with_cpu=leon3
3577 ;;
14091821 3578 *-leon[3-9]v7*)
3579 with_cpu=leon3v7
3580 ;;
cbd3655d 3581 *)
3582 with_cpu="`echo ${target} | sed 's/-.*$//'`"
3583 ;;
3584 esac
370a1d10 3585 ;;
a51a064d 3586 visium-*-*)
3587 with_cpu=gr5
3588 ;;
370a1d10 3589 esac
f067c6b7 3590
3591 # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
3592 case ${target} in
3593 i[34567]86-*-*|x86_64-*-*)
1f64ad21 3594 if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
3595 if test x$with_cpu_32 = x; then
3596 with_cpu_32=$with_cpu
3597 fi
3598 if test x$with_cpu_64 = x; then
3599 with_cpu_64=$with_cpu
3600 fi
3601 with_cpu=
3602 fi
3603 ;;
3604 esac
3605fi
3606
3607# Support for --with-arch and related options (and a few unrelated options,
3608# too).
3609case ${with_arch} in
3610 yes | no)
3611 echo "--with-arch must be passed a value" 1>&2
3612 exit 1
3613 ;;
3614esac
3615
3616# If there is no $with_arch option, try to infer one from ${target}.
3617# This block sets nothing except for with_arch.
3618if test x$with_arch = x ; then
3619 case ${target} in
ffcf29bf 3620 i[34567]86-*-darwin*|x86_64-*-darwin*)
3621 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3622 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3623 ;;
01872b87 3624 i[34567]86-*-elfiamcu)
3f6183e5 3625 with_arch=lakemont
01872b87 3626 ;;
2d2e1f85 3627 i[34567]86-*-*)
05b38372 3628 # --with-fpmath sets the default ISA to SSE2, which is the same
3629 # ISA supported by Pentium 4.
3630 if test x$with_fpmath = x || test $arch_without_sse2 = no; then
3631 with_arch=$arch
3632 else
3633 with_arch=pentium4
2d2e1f85 3634 fi
3635 ;;
3636 x86_64-*-*)
1f64ad21 3637 with_arch=$arch
3638 ;;
61ad2260 3639 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3640 with_arch=r5900
3641 ;;
3642 mips*-*-vxworks)
3643 with_arch=mips2
3644 ;;
1f64ad21 3645 esac
3646
3647 # Avoid overriding --with-arch-32 and --with-arch-64 values.
3648 case ${target} in
ffcf29bf 3649 i[34567]86-*-darwin*|x86_64-*-darwin*)
3650 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3651 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3652 ;;
1f64ad21 3653 i[34567]86-*-*|x86_64-*-*)
3654 if test x$with_arch_32 != x || test x$with_arch_64 != x; then
3655 if test x$with_arch_32 = x; then
525b174b 3656 with_arch_32=$with_arch
1f64ad21 3657 fi
3658 if test x$with_arch_64 = x; then
ed2b8f56 3659 if test $arch_without_64bit = yes; then
3660 # Set the default 64bit arch to x86-64 if the default arch
3661 # doesn't support 64bit.
3662 with_arch_64=x86-64
3663 else
525b174b 3664 with_arch_64=$with_arch
ed2b8f56 3665 fi
1f64ad21 3666 fi
3667 with_arch=
ed2b8f56 3668 elif test $arch_without_64bit$need_64bit_isa = yesyes; then
3669 # Set the default 64bit arch to x86-64 if the default arch
3670 # doesn't support 64bit and we need 64bit ISA.
525b174b 3671 with_arch_32=$with_arch
ed2b8f56 3672 with_arch_64=x86-64
3673 with_arch=
f067c6b7 3674 fi
3675 ;;
3676 esac
370a1d10 3677fi
f0b281fe 3678
61ad2260 3679# Infer a default setting for --with-float.
3680if test x$with_float = x; then
3681 case ${target} in
3682 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3683 # The R5900 doesn't support 64-bit float. 32-bit float doesn't
3684 # comply with IEEE 754.
3685 with_float=soft
3686 ;;
3687 esac
3688fi
3689
394563b3 3690# Infer a default setting for --with-fpu.
3691if test x$with_fpu = x; then
3692 case ${target} in
3693 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3694 # The R5900 FPU only supports single precision.
3695 with_fpu=single
3696 ;;
3697 esac
3698fi
3699
2d2e1f85 3700# Support --with-fpmath.
3701if test x$with_fpmath != x; then
3702 case ${target} in
3703 i[34567]86-*-* | x86_64-*-*)
3704 case ${with_fpmath} in
e69704a5 3705 avx)
3706 tm_file="${tm_file} i386/avxmath.h"
3707 ;;
2d2e1f85 3708 sse)
3709 tm_file="${tm_file} i386/ssemath.h"
3710 ;;
3711 *)
3712 echo "Invalid --with-fpmath=$with_fpmath" 1>&2
3713 exit 1
3714 ;;
3715 esac
3716 ;;
3717 *)
3718 echo "--with-fpmath isn't supported for $target." 1>&2
3719 exit 1
3720 ;;
3721 esac
3722fi
3723
0a76a4fd 3724# Similarly for --with-schedule.
3725if test x$with_schedule = x; then
3726 case ${target} in
6af9f7ea 3727 hppa1*)
0a76a4fd 3728 # Override default PA8000 scheduling model.
3729 with_schedule=7100LC
3730 ;;
3731 esac
3732fi
f0b281fe 3733
61ad2260 3734# Infer a default setting for --with-llsc.
3735if test x$with_llsc = x; then
3736 case ${target} in
61ad2260 3737 mips*-*-linux*)
3738 # The kernel emulates LL and SC where necessary.
3739 with_llsc=yes
3740 ;;
d728eb90 3741 mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3742 # The R5900 doesn't support LL(D) and SC(D).
3743 with_llsc=no
3744 ;;
61ad2260 3745 esac
3746fi
3747
0a76a4fd 3748# Validate and mark as valid any --with options supported
3749# by this target. In order to use a particular --with option
3750# you must list it in supported_defaults; validating the value
3751# is optional. This case statement should set nothing besides
3752# supported_defaults.
7dd97ab6 3753
0a76a4fd 3754supported_defaults=
3755case "${target}" in
16878cba 3756 aarch64*-*-*)
bb009361 3757 supported_defaults="abi cpu arch"
16878cba 3758 for which in cpu arch; do
3759
3760 eval "val=\$with_$which"
3761 base_val=`echo $val | sed -e 's/\+.*//'`
6b3f09b4 3762 ext_val=`echo $val | sed -e 's/[a-z0-9.-]\+//'`
16878cba 3763
3764 if [ $which = arch ]; then
3765 def=aarch64-arches.def
3766 pattern=AARCH64_ARCH
3767 else
3768 def=aarch64-cores.def
3769 pattern=AARCH64_CORE
3770 fi
3771
3772 ext_mask=AARCH64_CPU_DEFAULT_FLAGS
3773
3774 # Find the base CPU or ARCH id in aarch64-cores.def or
3775 # aarch64-arches.def
3776 if [ x"$base_val" = x ] \
3777 || grep "^$pattern(\"$base_val\"," \
3778 ${srcdir}/config/aarch64/$def \
3779 > /dev/null; then
3780
3781 if [ $which = arch ]; then
3782 base_id=`grep "^$pattern(\"$base_val\"," \
3783 ${srcdir}/config/aarch64/$def | \
3784 sed -e 's/^[^,]*,[ ]*//' | \
3785 sed -e 's/,.*$//'`
39543dd4 3786 # Extract the architecture flags from aarch64-arches.def
3787 ext_mask=`grep "^$pattern(\"$base_val\"," \
3788 ${srcdir}/config/aarch64/$def | \
3789 sed -e 's/)$//' | \
3790 sed -e 's/^.*,//'`
16878cba 3791 else
3792 base_id=`grep "^$pattern(\"$base_val\"," \
3793 ${srcdir}/config/aarch64/$def | \
3794 sed -e 's/^[^,]*,[ ]*//' | \
3795 sed -e 's/,.*$//'`
3796 fi
3797
3798 while [ x"$ext_val" != x ]
3799 do
3800 ext_val=`echo $ext_val | sed -e 's/\+//'`
3801 ext=`echo $ext_val | sed -e 's/\+.*//'`
3802 base_ext=`echo $ext | sed -e 's/^no//'`
3803
3804 if [ x"$base_ext" = x ] \
3805 || grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3806 ${srcdir}/config/aarch64/aarch64-option-extensions.def \
3807 > /dev/null; then
3808
a702492c 3809 ext_canon=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
16878cba 3810 ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3811 sed -e 's/^[^,]*,[ ]*//' | \
3812 sed -e 's/,.*$//'`
a702492c 3813 ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
16878cba 3814 ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3815 sed -e 's/^[^,]*,[ ]*[^,]*,[ ]*//' | \
3816 sed -e 's/,.*$//' | \
3817 sed -e 's/).*$//'`
a702492c 3818 ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3819 ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3820 sed -e 's/^[^,]*,[ ]*[^,]*,[ ]*[^,]*,[ ]*//' | \
3821 sed -e 's/,.*$//' | \
3822 sed -e 's/).*$//'`
3823
16878cba 3824
3825 if [ $ext = $base_ext ]; then
3826 # Adding extension
a702492c 3827 ext_mask="("$ext_mask") | ("$ext_on" | "$ext_canon")"
16878cba 3828 else
3829 # Removing extension
a702492c 3830 ext_mask="("$ext_mask") & ~("$ext_off" | "$ext_canon")"
16878cba 3831 fi
3832
3833 true
3834 else
3835 echo "Unknown extension used in --with-$which=$val" 1>&2
3836 exit 1
3837 fi
3838 ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
3839 done
3840
3841 ext_mask="(("$ext_mask") << 6)"
3842 if [ x"$base_id" != x ]; then
3843 target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
3844 fi
3845 true
3846 else
3847 echo "Unknown $which used in --with-$which=$val" 1>&2
3848 exit 1
3849 fi
3850 done
3851 ;;
3852
f0b281fe 3853 alpha*-*-*)
7dd97ab6 3854 supported_defaults="cpu tune"
3855 for which in cpu tune; do
3856 eval "val=\$with_$which"
8d520382 3857 case "$val" in
3858 "" \
3859 | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
3860 | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
3861 | 21264a)
7dd97ab6 3862 ;;
3863 *)
3864 echo "Unknown CPU used in --with-$which=$val" 1>&2
3865 exit 1
3866 ;;
3867 esac
3868 done
3869 ;;
3870
61aeeaac 3871 arc*-*-*)
3c867e46 3872 supported_defaults="cpu"
61aeeaac 3873
3874 if [ x"$with_cpu" = x ] \
3875 || grep "^ARC_CPU ($with_cpu," \
3876 ${srcdir}/config/arc/arc-cpus.def \
3877 > /dev/null; then
3878 # Ok
3879 true
3880 else
3881 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3882 exit 1
3883 fi
3c867e46 3884 ;;
3885
9399b971 3886 csky-*-*)
3887 supported_defaults="cpu endian float"
3888 ;;
3889
7dd97ab6 3890 arm*-*-*)
bb10d7b5 3891 supported_defaults="arch cpu float tune fpu abi mode tls"
c1cb3428 3892 for which in cpu tune arch; do
3893 # See if it matches a supported value
7dd97ab6 3894 eval "val=\$with_$which"
c1cb3428 3895 if [ x"$val" != x ]; then
3896 cpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
3897 -v cmd="chk$which $val" \
3898 ${srcdir}/config/arm/arm-cpus.in`
3899 if [ "$cpu" = "error" ]; then
3900 echo "Unknown target in --with-$which=$val" 1>&2
3901 exit 1
3902 else
3903 new_val=$cpu
3904 eval "target_${which}_cname=$new_val"
3905 echo "For $val real value is $new_val"
b906ae74 3906 fi
70ac928b 3907 fi
7dd97ab6 3908 done
3909
8d520382 3910 case "$with_float" in
3911 "" \
a2cd141b 3912 | soft | hard | softfp)
f0b281fe 3913 # OK
3864b642 3914 ;;
f0b281fe 3915 *)
7dd97ab6 3916 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 3917 exit 1
3864b642 3918 ;;
3919 esac
7dd97ab6 3920
c1cb3428 3921 # see if --with-fpu matches any of the supported FPUs
3922 if [ x"$with_fpu" != x ] ; then
3923 fpu=`awk -f ${srcdir}/config/arm/parsecpu.awk \
3924 -v cmd="chkfpu $with_fpu" \
3925 ${srcdir}/config/arm/arm-cpus.in`
3926 if [ "$fpu" = "error"]
3927 then
3928 echo "Unknown target in --with-$which=$val" 1>&2
3929 exit 1
3930 fi
c38b3fc1 3931 fi
f9273c43 3932
3933 case "$with_abi" in
3934 "" \
6cac4dc0 3935 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
f9273c43 3936 #OK
3937 ;;
3938 *)
3939 echo "Unknown ABI used in --with-abi=$with_abi"
a2cd141b 3940 exit 1
3941 ;;
3942 esac
3943
086571a4 3944 case "$with_mode" in
3945 "" \
3946 | arm | thumb )
3947 #OK
3948 ;;
3949 *)
3950 echo "Unknown mode used in --with-mode=$with_mode"
3951 exit 1
3952 ;;
3953 esac
3954
bb10d7b5 3955 case "$with_tls" in
3956 "" \
3957 | gnu | gnu2)
3958 # OK
3959 ;;
3960 *)
3961 echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
3962 exit 1
3963 ;;
3964 esac
3965
7dd97ab6 3966 if test "x$with_arch" != x && test "x$with_cpu" != x; then
86aa4b48 3967 echo "Switch \"--with-arch\" may not be used with switch \"--with-cpu\"" 1>&2
3968 exit 1
3969 fi
3970
3971 if test "x$with_cpu" != x && test "x$with_tune" != x; then
3972 echo "Switch \"--with-tune\" may not be used with switch \"--with-cpu\"" 1>&2
3973 exit 1
7dd97ab6 3974 fi
2edb5c8c 3975
3976 # Add extra multilibs
3977 if test "x$with_multilib_list" != x; then
3978 arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
91fe628b 3979 if test "x${arm_multilibs}" != xdefault ; then
3980 for arm_multilib in ${arm_multilibs}; do
3981 case ${arm_multilib} in
3982 aprofile|rmprofile)
3983 tmake_profile_file="arm/t-multilib"
3984 ;;
3985 *)
3986 echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
3987 exit 1
3988 ;;
3989 esac
3990 done
05ba9e9b 3991 fi
33ac16c8 3992
3993 if test "x${tmake_profile_file}" != x ; then
f3c3922f 3994 # arm/t-aprofile and arm/t-rmprofile are only
3995 # designed to work without any with-cpu,
3996 # with-arch, with-mode, with-fpu or with-float
3997 # options.
33ac16c8 3998 if test "x$with_arch" != x \
3999 || test "x$with_cpu" != x \
4000 || test "x$with_float" != x \
4001 || test "x$with_fpu" != x \
4002 || test "x$with_mode" != x ; then
4003 echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=${with_multilib_list}" 1>&2
4004 exit 1
4005 fi
c5e2cf23 4006 # But pass the default value for float-abi
4007 # through to the multilib selector
4008 with_float="soft"
33ac16c8 4009 tmake_file="${tmake_file} ${tmake_profile_file}"
05ba9e9b 4010 TM_MULTILIB_CONFIG="$with_multilib_list"
33ac16c8 4011 fi
2edb5c8c 4012 fi
0e9ba648 4013 target_cpu_cname=${target_cpu_cname:-arm7tdmi}
284223a1 4014 with_cpu=${with_cpu:-$target_cpu_cname}
3864b642 4015 ;;
3864b642 4016
3e7f6cce 4017 fr*-*-*linux*)
4018 supported_defaults=cpu
4019 case "$with_cpu" in
4020 fr400) ;;
de6e318c 4021 fr550) ;;
3e7f6cce 4022 *)
4023 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4024 exit 1
4025 ;;
4026 esac
4027 ;;
4028
6af9f7ea 4029 fido-*-* | m68k*-*-*)
558b196a 4030 supported_defaults="arch cpu"
4031 case "$with_arch" in
4032 "" | "m68k"| "cf")
4033 m68k_arch_family="$with_arch"
4034 ;;
4035 *)
4036 echo "Invalid --with-arch=$with_arch" 1>&2
4037 exit 1
4038 ;;
4039 esac
f84195ec 4040
4041 # We always have a $with_cpu setting here.
8e80b452 4042 case "$with_cpu" in
8aed3cb3 4043 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
4044 m68k_cpu_ident=$with_cpu
4045 ;;
4046 "m68020-40")
4047 m68k_cpu_ident=m68020
4048 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
4049 ;;
4050 "m68020-60")
4051 m68k_cpu_ident=m68020
4052 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
8e80b452 4053 ;;
4054 *)
8aed3cb3 4055 # We need the C identifier rather than the string.
4056 m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
4057 'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
4058 $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
4059 ${srcdir}/config/m68k/m68k-devices.def`
4060 if [ x"$m68k_cpu_ident" = x ] ; then
4061 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
4062 exit 1
4063 fi
4064 with_cpu="mcpu=$with_cpu"
8e80b452 4065 ;;
4066 esac
4067 ;;
4068
6af9f7ea 4069 hppa*-*-*)
7dd97ab6 4070 supported_defaults="arch schedule"
4071
8d520382 4072 case "$with_arch" in
4073 "" | 1.0 | 1.1 | 2.0)
7dd97ab6 4074 # OK
4075 ;;
4076 *)
4077 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
4078 exit 1
4079 ;;
4080 esac
4081
8d520382 4082 case "$with_schedule" in
4083 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
f0b281fe 4084 # OK
4085 ;;
4086 *)
4087 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
4088 exit 1
4089 ;;
4090 esac
3864b642 4091 ;;
3864b642 4092
f0b281fe 4093 i[34567]86-*-* | x86_64-*-*)
6fa78bde 4094 supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
f067c6b7 4095 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7dd97ab6 4096 eval "val=\$with_$which"
f292755a 4097 case " $x86_archs " in
4098 *" ${val} "*)
9db3d688 4099 case "${target}" in
4100 x86_64-*-*)
f067c6b7 4101 case "x$which" in
4102 *_32)
4103 ;;
4104 *)
4105 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
4106 exit 1
4107 ;;
4108 esac
9db3d688 4109 ;;
4110 esac
4111 # OK
4112 ;;
7dd97ab6 4113 *)
f292755a 4114 if test x${val} != x; then
4115 case " $x86_64_archs " in
4116 *" ${val} "*)
4117 # OK
4118 ;;
4119 *)
4120 # Allow $x86_cpus --with-cpu=/--with-tune=
4121 case "x$which" in
4122 xcpu*|xtune*)
4123 case " $x86_cpus " in
4124 *" ${val} "*)
4125 # OK
4126 ;;
4127 *)
4128 echo "Unknown CPU given in --with-$which=$val." 1>&2
4129 exit 1
4130 ;;
4131 esac
4132 ;;
4133 *)
4134 echo "Unknown CPU given in --with-$which=$val." 1>&2
4135 exit 1
4136 ;;
4137 esac
4138 ;;
4139 esac
4140 fi
7dd97ab6 4141 ;;
4142 esac
4143 done
4144 ;;
4145
fb55f581 4146 riscv*-*-*)
4147 supported_defaults="abi arch tune"
4148
4149 case "${target}" in
088e5c3b 4150 riscv-* | riscv32*) xlen=32 ;;
fb55f581 4151 riscv64*) xlen=64 ;;
4152 *) echo "Unsupported RISC-V target ${target}" 1>&2; exit 1 ;;
4153 esac
4154
4155 # Infer arch from --with-arch, --target, and --with-abi.
4156 case "${with_arch}" in
51b16492 4157 rv32e* | rv32i* | rv32g* | rv64i* | rv64g*)
fb55f581 4158 # OK.
4159 ;;
4160 "")
4161 # Infer XLEN, but otherwise assume GC.
4162 case "${with_abi}" in
51b16492 4163 ilp32e) with_arch="rv32e" ;;
fb55f581 4164 ilp32 | ilp32f | ilp32d) with_arch="rv32gc" ;;
4165 lp64 | lp64f | lp64d) with_arch="rv64gc" ;;
4166 *) with_arch="rv${xlen}gc" ;;
4167 esac
4168 ;;
4169 *)
51b16492 4170 echo "--with-arch=${with_arch} is not supported. The argument must begin with rv32e, rv32i, rv32g, rv64i, or rv64g." 1>&2
fb55f581 4171 exit 1
4172 ;;
4173 esac
4174
4175 # Make sure --with-abi is valid. If it was not specified,
4176 # pick a default based on the ISA, preferring soft-float
4177 # unless the D extension is present.
4178 case "${with_abi}" in
51b16492 4179 ilp32 | ilp32e | ilp32f | ilp32d | lp64 | lp64f | lp64d)
fb55f581 4180 ;;
4181 "")
4182 case "${with_arch}" in
4183 rv32*d* | rv32g*) with_abi=ilp32d ;;
51b16492 4184 rv32e*) with_abi=ilp32e ;;
fb55f581 4185 rv32*) with_abi=ilp32 ;;
4186 rv64*d* | rv64g*) with_abi=lp64d ;;
4187 rv64*) with_abi=lp64 ;;
4188 esac
4189 ;;
4190 *)
4191 echo "--with-abi=${with_abi} is not supported" 1>&2
4192 exit 1
4193 ;;
4194 esac
4195
4196 # Make sure ABI and ISA are compatible.
4197 case "${with_abi},${with_arch}" in
51b16492 4198 ilp32,rv32* | ilp32e,rv32e* \
fb55f581 4199 | ilp32f,rv32*f* | ilp32f,rv32g* \
4200 | ilp32d,rv32*d* | ilp32d,rv32g* \
4201 | lp64,rv64* \
4202 | lp64f,rv64*f* | lp64f,rv64g* \
4203 | lp64d,rv64*d* | lp64d,rv64g*)
4204 ;;
4205 *)
4206 echo "--with-abi=${with_abi} is not supported for ISA ${with_arch}" 1>&2
4207 exit 1
4208 ;;
4209 esac
70331978 4210
4211 # Handle --with-multilib-list.
4212 if test "x${with_multilib_list}" != xdefault; then
4213 tm_file="${tm_file} riscv/withmultilib.h"
4214 tmake_file="${tmake_file} riscv/t-withmultilib"
4215
4216 case ${with_multilib_list} in
4217 ilp32 | ilp32f | ilp32d \
4218 | lp64 | lp64f | lp64d )
4219 TM_MULTILIB_CONFIG="${with_arch},${with_multilib_list}"
4220 ;;
4221 *)
4222 echo "--with-multilib-list=${with_multilib_list} not supported."
4223 exit 1
4224 esac
4225
4226 # Define macros to select the default multilib.
4227 case ${with_arch} in
4228 rv32gc)
4229 tm_defines="${tm_defines} TARGET_MLIB_ARCH=1"
4230 ;;
4231 rv64gc)
4232 tm_defines="${tm_defines} TARGET_MLIB_ARCH=2"
4233 ;;
4234 *)
4235 echo "unsupported --with-arch for --with-multilib-list"
4236 exit 1
4237 esac
4238 case ${with_abi} in
4239 ilp32)
4240 tm_defines="${tm_defines} TARGET_MLIB_ABI=1"
4241 ;;
4242 ilp32f)
4243 tm_defines="${tm_defines} TARGET_MLIB_ABI=2"
4244 ;;
4245 ilp32d)
4246 tm_defines="${tm_defines} TARGET_MLIB_ABI=3"
4247 ;;
4248 lp64)
4249 tm_defines="${tm_defines} TARGET_MLIB_ABI=4"
4250 ;;
4251 lp64f)
4252 tm_defines="${tm_defines} TARGET_MLIB_ABI=5"
4253 ;;
4254 lp64d)
4255 tm_defines="${tm_defines} TARGET_MLIB_ABI=6"
4256 ;;
4257 *)
4258 echo "unsupported --with-abi for --with-multilib"
4259 exit 1
4260 esac
4261 fi
fb55f581 4262 ;;
4263
7dd97ab6 4264 mips*-*-*)
eb5c0cb6 4265 supported_defaults="abi arch arch_32 arch_64 float fpu nan fp_32 odd_spreg_32 tune tune_32 tune_64 divide llsc mips-plt synci lxc1-sxc1 madd4"
7dd97ab6 4266
e83e5390 4267 case ${with_float} in
4268 "" | soft | hard)
f0b281fe 4269 # OK
4270 ;;
4271 *)
7dd97ab6 4272 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 4273 exit 1
4274 ;;
4275 esac
3864b642 4276
394563b3 4277 case ${with_fpu} in
4278 "" | single | double)
4279 # OK
4280 ;;
4281 *)
4282 echo "Unknown fpu type used in --with-fpu=$with_fpu" 1>&2
4283 exit 1
4284 ;;
4285 esac
4286
0bd32132 4287 case ${with_nan} in
4288 "" | 2008 | legacy)
4289 # OK
4290 ;;
4291 *)
4292 echo "Unknown NaN encoding used in --with-nan=$with_nan" 1>&2
4293 exit 1
4294 ;;
4295 esac
4296
f2b55aea 4297 case ${with_fp_32} in
4298 "" | 32 | xx | 64)
4299 # OK
4300 ;;
4301 *)
4302 echo "Unknown FP mode used in --with-fp-32=$with_fp_32" 1>&2
4303 exit 1
4304 ;;
4305 esac
4306
4307 case ${with_odd_spreg_32} in
4308 yes)
4309 with_odd_spreg_32="odd-spreg"
4310 ;;
4311 no)
4312 with_odd_spreg_32="no-odd-spreg"
4313 ;;
4314 "")
4315 # OK
4316 ;;
4317 *)
4318 echo "Unknown odd-spreg-32 type used in --with-odd-spreg-32=$with_odd_spreg_32" 1>&2
4319 exit 1
4320 ;;
4321 esac
4322
e83e5390 4323 case ${with_abi} in
4324 "" | 32 | o64 | n32 | 64 | eabi)
f0b281fe 4325 # OK
4326 ;;
4327 *)
7dd97ab6 4328 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
f0b281fe 4329 exit 1
4330 ;;
4331 esac
f9262d1e 4332
4333 case ${with_divide} in
4334 "" | breaks | traps)
4335 # OK
4336 ;;
4337 *)
4338 echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
4339 exit 1
bc4c18f7 4340 ;;
4341 esac
4342
4343 case ${with_llsc} in
4344 yes)
4345 with_llsc=llsc
4346 ;;
4347 no)
4348 with_llsc="no-llsc"
4349 ;;
4350 "")
4351 # OK
4352 ;;
4353 *)
4354 echo "Unknown llsc type used in --with-llsc" 1>&2
4355 exit 1
4356 ;;
f9262d1e 4357 esac
4a909f69 4358
4359 case ${with_mips_plt} in
4360 yes)
4361 with_mips_plt=plt
4362 ;;
4363 no)
4364 with_mips_plt=no-plt
4365 ;;
4366 "")
4367 ;;
4368 *)
4369 echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
4370 exit 1
4371 ;;
4372 esac
1af9587c 4373
4374 case ${with_synci} in
4375 yes)
4376 with_synci=synci
4377 ;;
32108f3d 4378 no)
1af9587c 4379 with_synci=no-synci
4380 ;;
32108f3d 4381 "")
4382 ;;
1af9587c 4383 *)
4384 echo "Unknown synci type used in --with-synci" 1>&2
4385 exit 1
4386 ;;
4387 esac
fccc4b54 4388
4389 case ${with_lxc1_sxc1} in
4390 yes)
4391 with_lxc1_sxc1=lxc1-sxc1
4392 ;;
4393 no)
4394 with_lxc1_sxc1=no-lxc1-sxc1
4395 ;;
4396 "")
4397 ;;
4398 *)
4399 echo "Unknown lxc1-sxc1 type used in --with-lxc1-sxc1" 1>&2
4400 exit 1
4401 ;;
4402 esac
eb5c0cb6 4403
4404 case ${with_madd4} in
4405 yes)
4406 with_madd4=madd4
4407 ;;
4408 no)
4409 with_madd4=no-madd4
4410 ;;
4411 "")
4412 ;;
4413 *)
4414 echo "Unknown madd4 type used in --with-madd4" 1>&2
4415 exit 1
4416 ;;
4417 esac
eae21ed1 4418 ;;
4419
4420 nds32*-*-*)
add86f06 4421 supported_defaults="arch cpu nds32_lib float fpu_config"
eae21ed1 4422
4423 # process --with-arch
4424 case "${with_arch}" in
add86f06 4425 "" | v3 )
4426 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
4427 ;;
4428 v2 | v2j | v3m)
eae21ed1 4429 # OK
add86f06 4430 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=0"
4431 ;;
4432 v3f)
4433 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=1"
4434 ;;
4435 v3s)
4436 tm_defines="${tm_defines} TARGET_ARCH_DEFAULT=2"
4437
eae21ed1 4438 ;;
4439 *)
add86f06 4440 echo "Cannot accept --with-arch=$with_arch, available values are: v2 v2j v3 v3m v3f v3s" 1>&2
eae21ed1 4441 exit 1
4442 ;;
4443 esac
4444
d728703a 4445 case "${with_cpu}" in
4446 "")
4447 with_cpu=n9
4448 ;;
49665213 4449 n6 | n7 |n8 | e8 | s8 | n9 | n10 | d10 | n12 | n13 | n15)
d728703a 4450 # OK
4451 ;;
4452 *)
49665213 4453 echo "Cannot accept --with-cpu=$with_cpu, available values are: n6 n7 n8 e8 s8 n9 n10 d10 n12 n13 n15" 1>&2
d728703a 4454 exit 1
4455 ;;
4456 esac
4457
eae21ed1 4458 # process --with-nds32-lib
4459 case "${with_nds32_lib}" in
4460 "")
4461 # the default library is newlib
4462 with_nds32_lib=newlib
a5a22b4f 4463 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
eae21ed1 4464 ;;
4465 newlib)
4466 # OK
a5a22b4f 4467 tm_defines="${tm_defines} TARGET_DEFAULT_CTOR_DTOR=1"
eae21ed1 4468 ;;
4469 mculib)
4470 # OK
a5a22b4f 4471 # for the arch=v3f or arch=v3s under mculib toolchain,
4472 # we would like to set -fno-math-errno as default
4473 case "${with_arch}" in
4474 v3f | v3s)
4475 tm_defines="${tm_defines} TARGET_DEFAULT_NO_MATH_ERRNO=1"
4476 ;;
4477 esac
4478 ;;
4479 glibc)
4480 # OK
2de27c98 4481 tm_defines="${tm_defines} TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0"
a5a22b4f 4482 ;;
4483 uclibc)
eae21ed1 4484 ;;
4485 *)
a5a22b4f 4486 echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib glibc uclibc" 1>&2
eae21ed1 4487 exit 1
4488 ;;
4489 esac
3864b642 4490
add86f06 4491 # process --with-float
4492 case "${with_float}" in
4493 "" | soft | hard)
4494 # OK
4495 ;;
4496 *)
4497 echo "Cannot accept --with-float=$with_float, available values are: soft hard" 1>&2
4498 exit 1
4499 ;;
4500 esac
4501
4502 # process --with-config-fpu
4503 case "${with_config_fpu}" in
4504 "" | 0 | 1 | 2 | 3)
4505 # OK
4506 ;;
4507 *)
4508 echo "Cannot accept --with-config-fpu=$with_config_fpu, available values from 0 to 7" 1>&2
4509 exit 1
4510 ;;
4511 esac
4512
4513
4514 ;;
9515cb26 4515 nios2*-*-*)
4516 supported_defaults="arch"
4517 case "$with_arch" in
4518 "" | r1 | r2)
4519 # OK
4520 ;;
4521 *)
4522 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
4523 exit 1
4524 ;;
4525 esac
4526 ;;
4527
7dd97ab6 4528 powerpc*-*-* | rs6000-*-*)
78de65bc 4529 supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64 advance_toolchain"
7dd97ab6 4530
cf61fe8d 4531 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7dd97ab6 4532 eval "val=\$with_$which"
e83e5390 4533 case ${val} in
83ae44d6 4534 default32 | default64)
cf61fe8d 4535 case $which in
4536 cpu | tune)
4537 ;;
4538 *)
4539 echo "$val only valid for --with-cpu and --with-tune." 1>&2
4540 exit 1
4541 ;;
4542 esac
83ae44d6 4543 with_which="with_$which"
4544 eval $with_which=
4545 ;;
e2fcf81b 4546 405cr)
4547 tm_defines="${tm_defines} CONFIG_PPC405CR"
4548 eval "with_$which=405"
4549 ;;
473d3d50 4550 "" | common | native \
1b3078dd 4551 | power[3456789] | power5+ | power6x \
4552 | powerpc | powerpc64 | powerpc64le \
4553 | rs64 \
257bc844 4554 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
ed08558a 4555 | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
4556 | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
b770074c 4557 | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
4558 | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
7dd97ab6 4559 # OK
4560 ;;
4561 *)
4562 echo "Unknown cpu used in --with-$which=$val." 1>&2
4563 exit 1
4564 ;;
4565 esac
4566 done
238f342d 4567
4568 case "$with_abi" in
4569 "" | elfv1 | elfv2 )
4570 #OK
4571 ;;
4572 *)
4573 echo "Unknown ABI used in --with-abi=$with_abi"
4574 exit 1
4575 ;;
4576 esac
78de65bc 4577
4578 if test "x$with_advance_toolchain" != x; then
4579 if test -d "/opt/$with_advance_toolchain/." -a \
4580 -d "/opt/$with_advance_toolchain/bin/." -a \
4581 -d "/opt/$with_advance_toolchain/include/."; then
4582
4583 tm_file="$tm_file ./advance-toolchain.h"
4584 (at="/opt/$with_advance_toolchain"
4585 echo "/* Use Advance Toolchain $at */"
4586 echo
78de65bc 4587 echo "#undef LINK_OS_EXTRA_SPEC32"
4588 echo "#define LINK_OS_EXTRA_SPEC32" \
4589 "\"%(link_os_new_dtags)" \
4590 "-rpath $prefix/lib -rpath $at/lib" \
4591 "-L $prefix/lib -L $at/lib\""
4592 echo
4593 echo "#undef LINK_OS_EXTRA_SPEC64"
4594 echo "#define LINK_OS_EXTRA_SPEC64" \
4595 "\"%(link_os_new_dtags)" \
4596 "-rpath $prefix/lib64 -rpath $at/lib64" \
4597 "-L $prefix/lib64 -L $at/lib64\""
4598 echo
4599 echo "#undef LINK_OS_NEW_DTAGS_SPEC"
4600 echo "#define LINK_OS_NEW_DTAGS_SPEC" \
4601 "\"--enable-new-dtags\""
4602 echo
4603 echo "#undef DYNAMIC_LINKER_PREFIX"
4604 echo "#define DYNAMIC_LINKER_PREFIX \"$at\""
4605 echo
4606 echo "#undef MD_EXEC_PREFIX"
4607 echo "#define MD_EXEC_PREFIX \"$at/bin/\""
4608 echo
4609 echo "#undef MD_STARTFILE_PREFIX"
4610 echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \
4611 > advance-toolchain.h
4612 else
4613 echo "Unknown advance-toolchain $with_advance_toolchain"
4614 exit 1
4615 fi
4616 fi
b95c28c7 4617
4618 # Set up the default long double format if the user changed it.
4619 if test x$with_long_double_format = xieee; then
4620 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=1"
4621
4622 elif test x$with_long_double_format = xibm; then
4623 tm_defines="${tm_defines} TARGET_IEEEQUAD_DEFAULT=0"
4624 fi
7dd97ab6 4625 ;;
4626
b8c0043c 4627 s390*-*-*)
4628 supported_defaults="arch mode tune"
4629
4630 for which in arch tune; do
4631 eval "val=\$with_$which"
e83e5390 4632 case ${val} in
6ef12d3a 4633 "" | native | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12 | z13 | z14 | arch5 | arch6 | arch7 | arch8 | arch9 | arch10 | arch11 | arch12)
b8c0043c 4634 # OK
4635 ;;
4636 *)
4637 echo "Unknown cpu used in --with-$which=$val." 1>&2
4638 exit 1
4639 ;;
4640 esac
4641 done
4642
e83e5390 4643 case ${with_mode} in
4644 "" | esa | zarch)
b8c0043c 4645 # OK
4646 ;;
4647 *)
4648 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
4649 exit 1
4650 ;;
4651 esac
4652 ;;
4653
f1a166be 4654 sh[123456ble]*-*-* | sh-*-*)
07168dd9 4655 supported_defaults="cpu"
3a6994f8 4656 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
07168dd9 4657 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
4658 # OK
4659 ;;
7105fb72 4660 m2a | m2a-single | m2a-single-only | m2a-nofpu)
4661 ;;
9435e831 4662 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
4663 ;;
07168dd9 4664 *)
4665 echo "Unknown CPU used in --with-cpu=$with_cpu, known values:" 1>&2
4666 echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
9435e831 4667 echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
7105fb72 4668 echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
07168dd9 4669 exit 1
4670 ;;
4671 esac
4672 ;;
f0b281fe 4673 sparc*-*-*)
abe381aa 4674 supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
7dd97ab6 4675
abe381aa 4676 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7dd97ab6 4677 eval "val=\$with_$which"
e83e5390 4678 case ${val} in
b0168e11 4679 "" | sparc | sparcv9 | sparc64 \
4680 | v7 | cypress \
14091821 4681 | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
b0168e11 4682 | sparclite | f930 | f934 | sparclite86x \
4683 | sparclet | tsc701 \
b18dbf25 4684 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
95f09db7 4685 | niagara3 | niagara4 | niagara7 | m8)
7dd97ab6 4686 # OK
4687 ;;
4688 *)
4689 echo "Unknown cpu used in --with-$which=$val" 1>&2
4690 exit 1
4691 ;;
4692 esac
4693 done
3864b642 4694
e83e5390 4695 case ${with_float} in
4696 "" | soft | hard)
f0b281fe 4697 # OK
4698 ;;
4699 *)
7dd97ab6 4700 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 4701 exit 1
4702 ;;
4703 esac
3864b642 4704 ;;
3864b642 4705
5474166e 4706 spu-*-*)
4707 supported_defaults="arch tune"
4708
4709 for which in arch tune; do
4710 eval "val=\$with_$which"
4711 case ${val} in
4712 "" | cell | celledp)
4713 # OK
4714 ;;
4715 *)
4716 echo "Unknown cpu used in --with-$which=$val." 1>&2
4717 exit 1
4718 ;;
4719 esac
4720 done
4721 ;;
4722
5aa04b01 4723 tic6x-*-*)
4724 supported_defaults="arch"
4725
4726 case ${with_arch} in
4727 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
4728 # OK
4729 ;;
4730 *)
4731 echo "Unknown arch used in --with-arch=$with_arch." 1>&2
4732 exit 1
4733 ;;
4734 esac
4735 ;;
4736
f0b281fe 4737 v850*-*-*)
7dd97ab6 4738 supported_defaults=cpu
e83e5390 4739 case ${with_cpu} in
9a5788ea 4740 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3 | v850e3v5)
f0b281fe 4741 # OK
4742 ;;
4743 *)
4744 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4745 exit 1
4746 ;;
4747 esac
3864b642 4748 ;;
a51a064d 4749 visium-*-*)
4750 supported_defaults="cpu"
4751 case $with_cpu in
4752 "" | gr5 | gr6)
4753 ;;
4754 *) echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4755 exit 1
4756 ;;
4757 esac
4758 ;;
0a76a4fd 4759esac
3864b642 4760
85f370fe 4761# Targets for which there is at least one VxWorks port should include
4762# vxworks-dummy.h to allow safe references to various TARGET_VXWORKS kinds
4763# of markers from other files in the port, including the vxworks*.h files to
4764# distinguish VxWorks variants such as VxWorks 7 or 64).
4765
4766case ${target} in
4767arm*-*-* | i[34567]86-*-* | mips*-*-* | powerpc*-*-* | sh*-*-* \
4768| sparc*-*-* | x86_64-*-*)
4769 tm_file="vxworks-dummy.h ${tm_file}"
4770 ;;
4771esac
4772
0a76a4fd 4773# Set some miscellaneous flags for particular targets.
4774target_cpu_default2=
4775case ${target} in
16878cba 4776 aarch64*-*-*)
39543dd4 4777 if test x"$target_cpu_cname" != x
16878cba 4778 then
16878cba 4779 target_cpu_default2=$target_cpu_cname
4780 fi
4781 ;;
4782
f0b281fe 4783 arm*-*-*)
284223a1 4784 if test x$with_cpu = x
346bfe2d 4785 then
284223a1 4786 echo "Don't know the target cpu" 1>&2
4787 exit 1
346bfe2d 4788 else
284223a1 4789 target_cpu_default2="\\\"$with_cpu\\\""
346bfe2d 4790 fi
f0b281fe 4791 ;;
582b17a6 4792
6af9f7ea 4793 hppa*-*-*)
f0b281fe 4794 if test x$gas = xyes
bb607926 4795 then
0468fd14 4796 target_cpu_default2="MASK_GAS"
f0b281fe 4797 fi
3864b642 4798 ;;
3864b642 4799
6af9f7ea 4800 fido*-*-* | m68k*-*-*)
8aed3cb3 4801 target_cpu_default2=$m68k_cpu_ident
d078aadd 4802 tmake_file="m68k/t-opts $tmake_file"
558b196a 4803 if [ x"$m68k_arch_family" != x ]; then
4804 tmake_file="m68k/t-$m68k_arch_family $tmake_file"
4805 fi
8aed3cb3 4806 ;;
4807
b3fd46a0 4808 i[34567]86-*-darwin* | x86_64-*-darwin*)
b3fd46a0 4809 ;;
77adc39e 4810 i[34567]86-*-linux* | x86_64-*-linux*)
92ac8192 4811 extra_objs="${extra_objs} cet.o"
4812 tmake_file="$tmake_file i386/t-linux i386/t-cet"
77adc39e 4813 ;;
4814 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
4815 tmake_file="$tmake_file i386/t-kfreebsd"
4816 ;;
4817 i[34567]86-*-gnu*)
4818 tmake_file="$tmake_file i386/t-gnu"
b3fd46a0 4819 ;;
da024748 4820 i[34567]86-*-msdosdjgpp*)
4821 tmake_file="${tmake_file} i386/t-djgpp"
4822 ;;
14f27bc6 4823 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
20be3c56 4824 ;;
39b7d6dc 4825 i[34567]86-*-cygwin* | x86_64-*-cygwin*)
4826 ;;
4827 i[34567]86-*-mingw* | x86_64-*-mingw*)
6471e33b 4828 ;;
463553db 4829 i[34567]86-*-dragonfly* | x86_64-*-dragonfly*)
4830 ;;
278afeb5 4831 i[34567]86-*-freebsd* | x86_64-*-freebsd*)
278afeb5 4832 ;;
8b21beb2 4833 ia64*-*-linux*)
8b21beb2 4834 ;;
b3fd46a0 4835
f0b281fe 4836 mips*-*-*)
b93bf04a 4837 if test x$gnu_ld = xyes
4838 then
dfae4483 4839 target_cpu_default2="MASK_SPLIT_ADDRESSES"
b93bf04a 4840 fi
09c6646e 4841 case ${target} in
f0b281fe 4842 mips*el-*-*)
4843 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
4844 ;;
4845 esac
257ccd46 4846 if test x$with_arch != x; then
4847 default_mips_arch=$with_arch
4848 fi
4849 if test x$with_abi != x; then
4850 default_mips_abi=$with_abi
4851 fi
4852 case ${default_mips_arch} in
4853 mips1) tm_defines="$tm_defines MIPS_ISA_DEFAULT=1" ;;
4854 mips2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=2" ;;
4855 mips3) tm_defines="$tm_defines MIPS_ISA_DEFAULT=3" ;;
4856 mips4) tm_defines="$tm_defines MIPS_ISA_DEFAULT=4" ;;
4857 mips32) tm_defines="$tm_defines MIPS_ISA_DEFAULT=32" ;;
4858 mips32r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=33" ;;
78645e70 4859 mips32r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=37" ;;
257ccd46 4860 mips64) tm_defines="$tm_defines MIPS_ISA_DEFAULT=64" ;;
4861 mips64r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=65" ;;
78645e70 4862 mips64r6) tm_defines="$tm_defines MIPS_ISA_DEFAULT=69" ;;
257ccd46 4863 esac
4864 case ${default_mips_abi} in
4865 32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_32" ;;
4866 o64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_O64" ;;
4867 n32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_N32" ;;
4868 64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_64" ;;
4869 eabi) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_EABI" ;;
4870 esac
1d88eb71 4871 tmake_file="mips/t-mips $tmake_file"
f4deb416 4872 ;;
f0b281fe 4873
4874 powerpc*-*-* | rs6000-*-*)
7dd97ab6 4875 # FIXME: The PowerPC port uses the value set at compile time,
4876 # although it's only cosmetic.
f0b281fe 4877 if test "x$with_cpu" != x
bb607926 4878 then
f0b281fe 4879 target_cpu_default2="\\\"$with_cpu\\\""
bb607926 4880 fi
01e91138 4881 out_file="${cpu_type}/${cpu_type}.c"
4882 c_target_objs="${c_target_objs} ${cpu_type}-c.o"
4883 cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
03385ed3 4884 d_target_objs="${d_target_objs} ${cpu_type}-d.o"
01e91138 4885 tmake_file="${cpu_type}/t-${cpu_type} ${tmake_file}"
f4deb416 4886 ;;
3864b642 4887
57d5535b 4888 sh[123456ble]*-*-* | sh-*-*)
4889 c_target_objs="${c_target_objs} sh-c.o"
4890 cxx_target_objs="${cxx_target_objs} sh-c.o"
4891 ;;
4892
f0b281fe 4893 sparc*-*-*)
7dd97ab6 4894 # Some standard aliases.
4895 case x$with_cpu in
4896 xsparc)
4897 with_cpu=v7
4898 ;;
7dd97ab6 4899 xsparcv9 | xsparc64)
4900 with_cpu=v9
4901 ;;
4902 esac
4903
191a0bb7 4904 if test x$with_tune = x ; then
4905 case ${target} in
4906 *-leon-*)
4907 with_tune=leon
4908 ;;
4909 *-leon[3-9]*)
4910 with_tune=leon3
4911 ;;
4912 esac
4913 fi
4914
3ce7ff97 4915 # The SPARC port checks this value at compile-time.
3864b642 4916 target_cpu_default2="TARGET_CPU_$with_cpu"
4917 ;;
b0168e11 4918
f0b281fe 4919 v850*-*-*)
4920 case "x$with_cpu" in
4921 x)
4922 ;;
9a5788ea 4923 xv850e | xv850e1 | xv850e2 | xv850e2v3 | xv850e3v5)
f0b281fe 4924 target_cpu_default2="TARGET_CPU_$with_cpu"
4925 ;;
f5ec6516 4926 xv850es)
4927 target_cpu_default2="TARGET_CPU_v850e1"
4928 ;;
f0b281fe 4929 esac
4930 ;;
a51a064d 4931 visium-*-*)
4932 target_cpu_default2="TARGET_CPU_$with_cpu"
4933 ;;
0a76a4fd 4934esac
bb607926 4935
0a76a4fd 4936t=
eb5c0cb6 4937all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu nan fp_32 odd_spreg_32 divide llsc mips-plt synci tls lxc1-sxc1 madd4"
0a76a4fd 4938for option in $all_defaults
4939do
4a909f69 4940 eval "val=\$with_"`echo $option | sed s/-/_/g`
0a76a4fd 4941 if test -n "$val"; then
4942 case " $supported_defaults " in
4943 *" $option "*)
4944 ;;
4945 *)
4946 echo "This target does not support --with-$option." 2>&1
fc3e831e 4947 echo "Valid --with options are: $supported_defaults" 2>&1
0a76a4fd 4948 exit 1
4949 ;;
4950 esac
7dd97ab6 4951
0a76a4fd 4952 if test "x$t" = x
4953 then
4954 t="{ \"$option\", \"$val\" }"
4955 else
4956 t="${t}, { \"$option\", \"$val\" }"
7dd97ab6 4957 fi
7dd97ab6 4958 fi
0a76a4fd 4959done
7dd97ab6 4960
0a76a4fd 4961if test "x$t" = x
4962then
4963 configure_default_options="{ { NULL, NULL} }"
4964else
4965 configure_default_options="{ ${t} }"
4966fi
4967
4968if test "$target_cpu_default2" != ""
4969then
4970 if test "$target_cpu_default" != ""
bb607926 4971 then
0a76a4fd 4972 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
4973 else
4974 target_cpu_default=$target_cpu_default2
bb607926 4975 fi
0a76a4fd 4976fi
7e689f9a 4977
4978case ${target} in
4979i[34567]86-*-* | x86_64-*-*)
4980 if test x$enable_as_accelerator = xyes; then
4981 extra_programs="mkoffload\$(exeext)"
4982 fi
4983 ;;
4984esac