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