]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config.gcc
2012-10-26 Ralf Corsépius <ralf.corsepius@rtems.org>
[thirdparty/gcc.git] / gcc / config.gcc
CommitLineData
973f8bf3 1# GCC target-specific configuration file.
99c77e32 2# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
af8e12d0 3# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
bb607926 4
f12b58b3 5#This file is part of GCC.
bb607926 6
f12b58b3 7#GCC is free software; you can redistribute it and/or modify it under
8#the terms of the GNU General Public License as published by the Free
8c4c00c1 9#Software Foundation; either version 3, or (at your option) any later
f12b58b3 10#version.
bb607926 11
f12b58b3 12#GCC is distributed in the hope that it will be useful, but WITHOUT
13#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15#for more details.
bb607926 16
17#You should have received a copy of the GNU General Public License
8c4c00c1 18#along with GCC; see the file COPYING3. If not see
19#<http://www.gnu.org/licenses/>.
bb607926 20
973f8bf3 21# This is the GCC target-specific configuration file
22# where a configuration type is mapped to different system-specific
23# definitions and files. This is invoked by the autoconf-generated
24# configure script. Putting it in a separate shell file lets us skip
25# running autoconf when modifying target-specific information.
bb607926 26
894a47b4 27# When you change the cases in the OS or target switches, consider
28# updating ../libgcc/config.host also.
29
09c6646e 30# This file switches on the shell variable ${target}, and also uses the
bb607926 31# following shell variables:
32#
33# with_* Various variables as set by configure.
34#
334c8279 35# enable_threads Either the name, yes or no depending on whether
bb607926 36# threads support was requested.
37#
bc5ae993 38# default_use_cxa_atexit
430e8f92 39# The default value for the $enable___cxa_atexit
40# variable. enable___cxa_atexit needs to be set to
41# "yes" for the correct operation of C++ destructors
42# but it relies upon the presence of a non-standard C
43# library function called __cxa_atexit.
44# Since not all C libraries provide __cxa_atexit the
45# default value of $default_use_cxa_atexit is set to
46# "no" except for targets which are known to be OK.
bc5ae993 47#
1c6e0788 48# default_gnu_indirect_function
49# The default value for the $enable_gnu_indirect_function
50# variable. enable_gnu_indirect_function relies
51# upon the presence of a non-standard gnu ifunc support
52# in the assembler, linker and dynamic linker.
53# Since not all libraries provide the dynamic linking
54# support, the default value of
55# $default_gnu_indirect_function is set to
56# "no" except for targets which are known to be OK.
57#
bb607926 58# gas_flag Either yes or no depending on whether GNU as was
59# requested.
60#
61# gnu_ld_flag Either yes or no depending on whether GNU ld was
62# requested.
63
64# This file sets the following shell variables for use by the
65# autoconf-generated configure script:
66#
09c6646e 67# cpu_type The name of the cpu, if different from the first
68# chunk of the canonical target name.
bb607926 69#
8d4f8d46 70# tm_defines List of target macros to define for all compilations.
71#
bb607926 72# tm_file A list of target macro files, if different from
277773bd 73# "$cpu_type/$cpu_type.h". Usually it's constructed
74# per target in a way like this:
91276c47 75# tm_file="${tm_file} dbxelf.h elfos.h ${cpu_type.h}/elf.h"
277773bd 76# Note that the preferred order is:
77# - specific target header "${cpu_type}/${cpu_type.h}"
04d9b51b 78# - generic headers like dbxelf.h elfos.h, etc.
277773bd 79# - specializing target headers like ${cpu_type.h}/elf.h
80# This helps to keep OS specific stuff out of the CPU
81# defining header ${cpu_type}/${cpu_type.h}.
bb607926 82#
b4b98cc1 83# It is possible to include automatically-generated
84# build-directory files by prefixing them with "./".
85# All other files should relative to $srcdir/config.
86#
bb607926 87# tm_p_file Location of file with declarations for functions
88# in $out_file.
89#
90# out_file The name of the machine description C support
91# file, if different from "$cpu_type/$cpu_type.c".
92#
3e87b980 93# common_out_file The name of the source file for code shared between
94# the compiler proper and the driver.
95#
bb607926 96# md_file The name of the machine-description file, if
97# different from "$cpu_type/$cpu_type.md".
98#
99# tmake_file A list of machine-description-specific
100# makefile-fragments, if different from
101# "$cpu_type/t-$cpu_type".
102#
b5ccaa7b 103# extra_modes The name of the file containing a list of extra
104# machine modes, if necessary and different from
105# "$cpu_type/$cpu_type-modes.def".
106#
bb607926 107# extra_objs List of extra objects that should be linked into
108# the compiler proper (cc1, cc1obj, cc1plus)
109# depending on target.
110#
69eb04f7 111# extra_gcc_objs List of extra objects that should be linked into
112# the compiler driver (gcc) depending on target.
113#
bb607926 114# extra_headers List of used header files from the directory
b965afcd 115# config/${cpu_type}.
bb607926 116#
ac0366be 117# user_headers_inc_next_pre
118# List of header file names of internal gcc header
119# files, which should be prefixed by an include_next.
120# user_headers_inc_next_post
121# List of header file names of internal gcc header
122# files, which should be postfixed by an include_next.
50388ca3 123# use_gcc_tgmath If set, add tgmath.h to the list of used header
124# files.
125#
f3449a3c 126# use_gcc_stdint If "wrap", install a version of stdint.h that
127# wraps the system's copy for hosted compilations;
128# if "provide", provide a version of systems without
129# such a system header; otherwise "none", do not
130# provide such a header at all.
131#
7151decb 132# extra_programs List of extra executables compiled for this target
133# machine, used when linking.
bb607926 134#
ff05e09e 135# extra_options List of target-dependent .opt files.
136#
424da949 137# c_target_objs List of extra target-dependent objects that be
8daa9e98 138# linked into the C compiler only.
582b17a6 139#
424da949 140# cxx_target_objs List of extra target-dependent objects that be
8daa9e98 141# linked into the C++ compiler only.
582b17a6 142#
32006f36 143# fortran_target_objs List of extra target-dependent objects that be
144# linked into the fortran compiler only.
145#
eb1bd38b 146# target_gtfiles List of extra source files with type information.
147#
bb607926 148# xm_defines List of macros to define when compiling for the
149# target machine.
150#
151# xm_file List of files to include when compiling for the
152# target machine.
153#
154# use_collect2 Set to yes or no, depending on whether collect2
155# will be used.
156#
157# target_cpu_default Set to override the default target model.
158#
bb607926 159# gdb_needs_out_file_path
160# Set to yes if gdb needs a dir command with
161# `dirname $out_file`.
162#
bb607926 163# thread_file Set to control which thread package to use.
164#
165# gas Set to yes or no depending on whether the target
166# system normally uses GNU as.
805e22b2 167#
168# need_64bit_hwint Set to yes if HOST_WIDE_INT must be 64 bits wide
f824d860 169# for this target. This is true if this target
170# supports "long" or "wchar_t" wider than 32 bits,
171# or BITS_PER_WORD is wider than 32 bits.
bbb5db40 172# The setting made here must match the one made in
173# other locations such as libcpp/configure.ac
7dd97ab6 174#
175# configure_default_options
176# Set to an initializer for configure_default_options
177# in configargs.h, based on --with-cpu et cetera.
638454a1 178#
179# native_system_header_dir
180# Where system header files are found for this
181# target. This defaults to /usr/include. If
182# the --with-sysroot configure option or the
183# --sysroot command line option is used this
184# will be relative to the sysroot.
4eb5a747 185# target_type_format_char
186# The default character to be used for formatting
187# the attribute in a
188# .type symbol_name, ${t_t_f_c}<property>
189# directive.
bb607926 190
191# The following variables are used in each case-construct to build up the
192# outgoing variables:
193#
bb607926 194# gnu_ld Set to yes or no depending on whether the target
195# system normally uses GNU ld.
c94b1d0e 196#
197# target_has_targetcm Set to yes or no depending on whether the target
198# has its own definition of targetcm.
3e87b980 199#
200# target_has_targetm_common Set to yes or no depending on whether the
201# target has its own definition of targetm_common.
bb607926 202
203out_file=
3e87b980 204common_out_file=
bb607926 205tmake_file=
206extra_headers=
ac0366be 207user_headers_inc_next_pre=
208user_headers_inc_next_post=
50388ca3 209use_gcc_tgmath=yes
f3449a3c 210use_gcc_stdint=none
bb607926 211extra_programs=
212extra_objs=
bb607926 213extra_gcc_objs=
ff05e09e 214extra_options=
8daa9e98 215c_target_objs=
216cxx_target_objs=
32006f36 217fortran_target_objs=
c94b1d0e 218target_has_targetcm=no
218e3e4e 219target_has_targetm_common=yes
8d4f8d46 220tm_defines=
bb607926 221xm_defines=
bb607926 222# Set this to force installation and use of collect2.
223use_collect2=
224# Set this to override the default target model.
225target_cpu_default=
bb607926 226# Set this if gdb needs a dir command with `dirname $out_file`
227gdb_needs_out_file_path=
bb607926 228# Set this to control which thread package will be used.
229thread_file=
230# Reinitialize these from the flag values every loop pass, since some
231# configure entries modify them.
232gas="$gas_flag"
233gnu_ld="$gnu_ld_flag"
bc5ae993 234default_use_cxa_atexit=no
1c6e0788 235default_gnu_indirect_function=no
22ac052b 236target_gtfiles=
805e22b2 237need_64bit_hwint=
ed2b8f56 238need_64bit_isa=
638454a1 239native_system_header_dir=/usr/include
4eb5a747 240target_type_format_char='@'
bb607926 241
b696fe80 242# Don't carry these over build->host->target. Please.
243xm_file=
244md_file=
245
c2527f80 246# Obsolete configurations.
a7359760 247case ${target} in
5a79e03e 248 picochip-* \
249 | score-* \
a7359760 250 )
251 if test "x$enable_obsolete" != xyes; then
252 echo "*** Configuration ${target} is obsolete." >&2
253 echo "*** Specify --enable-obsolete to build it anyway." >&2
254 echo "*** Support will be REMOVED in the next major release of GCC," >&2
255 echo "*** unless a maintainer comes forward." >&2
256 exit 1
257 fi;;
258esac
c2527f80 259
ece7f381 260# Unsupported targets list. Do not put an entry in this list unless
261# it would otherwise be caught by a more permissive pattern. The list
262# should be in alphabetical order.
09c6646e 263case ${target} in
295f5c5c 264 # Avoid special cases that are not obsolete
265 arm*-*-*eabi* \
266 )
267 ;;
268 arm*-wince-pe* \
269 | arm*-*-ecos-elf \
270 | arm*-*-elf \
271 | arm*-*-freebsd* \
272 | arm*-*-linux* \
295f5c5c 273 | arm*-*-uclinux* \
274 | i[34567]86-go32-* \
ece7f381 275 | i[34567]86-*-go32* \
17b3d2a8 276 | m68k-*-uclinuxoldabi* \
ece7f381 277 | mips64orion*-*-rtems* \
f2397fc4 278 | pdp11-*-bsd \
ece7f381 279 | sparc-hal-solaris2* \
280 | thumb-*-* \
ea722d26 281 | *-*-freebsd[12] | *-*-freebsd[12].* \
282 | *-*-freebsd*aout* \
6af9f7ea 283 | *-*-linux*aout* \
ece7f381 284 | *-*-linux*coff* \
6af9f7ea 285 | *-*-linux*libc1* \
ece7f381 286 | *-*-linux*oldld* \
287 | *-*-rtemsaout* \
288 | *-*-rtemscoff* \
e8287058 289 | *-*-solaris2 \
264a5d11 290 | *-*-solaris2.[0-8] \
291 | *-*-solaris2.[0-8].* \
292 | *-*-sysv* \
3598ba3d 293 | vax-*-vms* \
ece7f381 294 )
09c6646e 295 echo "*** Configuration ${target} not supported" 1>&2
ece7f381 296 exit 1
297 ;;
298esac
299
bb607926 300# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
83287f80 301# updated in each machine entry. Also set default extra_headers for some
302# machines.
bb607926 303tm_p_file=
09c6646e 304cpu_type=`echo ${target} | sed 's/-.*$//'`
cc5ffbb8 305cpu_is_64bit=
09c6646e 306case ${target} in
85c84d5c 307m32c*-*-*)
308 cpu_type=m32c
309 tmake_file=m32c/t-m32c
393a753d 310 target_has_targetm_common=no
85c84d5c 311 ;;
16878cba 312aarch64*-*-*)
313 cpu_type=aarch64
314 need_64bit_hwint=yes
315 extra_headers="arm_neon.h"
316 extra_objs="aarch64-builtins.o"
317 target_has_targetm_common=yes
318 ;;
bb607926 319alpha*-*-*)
320 cpu_type=alpha
805e22b2 321 need_64bit_hwint=yes
d1e5a65f 322 extra_options="${extra_options} g.opt"
bb607926 323 ;;
1acdfc69 324am33_2.0-*-linux*)
325 cpu_type=mn10300
326 ;;
6e421549 327arm*-*-*)
328 cpu_type=arm
d98a3884 329 extra_headers="mmintrin.h arm_neon.h"
4eb5a747 330 target_type_format_char='%'
baa1a726 331 c_target_objs="arm-c.o"
332 cxx_target_objs="arm-c.o"
9a4818f1 333 extra_options="${extra_options} arm/arm-tables.opt"
6e421549 334 ;;
33169f97 335avr-*-*)
336 cpu_type=avr
337 c_target_objs="avr-c.o"
338 cxx_target_objs="avr-c.o"
c1535dd2 339 extra_options="${extra_options} avr/avr-tables.opt"
33169f97 340 ;;
9e6a0967 341bfin*-*)
342 cpu_type=bfin
343 ;;
9b9e3455 344crisv32-*)
345 cpu_type=cris
346 ;;
de6e318c 347frv*) cpu_type=frv
d1e5a65f 348 extra_options="${extra_options} g.opt"
de6e318c 349 ;;
be52b6d8 350moxie*) cpu_type=moxie
218e3e4e 351 target_has_targetm_common=no
be52b6d8 352 ;;
278e2fd1 353fido-*-*)
354 cpu_type=m68k
355 extra_headers=math-68881.h
d078aadd 356 extra_options="${extra_options} m68k/m68k-tables.opt"
278e2fd1 357 ;;
bb607926 358i[34567]86-*-*)
359 cpu_type=i386
46f8e3b0 360 c_target_objs="i386-c.o"
361 cxx_target_objs="i386-c.o"
6b4db1bd 362 need_64bit_hwint=yes
bca226ea 363 extra_options="${extra_options} fused-madd.opt"
daf03e2f 364 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
f25d51c3 365 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
2f212aae 366 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
18525343 367 immintrin.h x86intrin.h avxintrin.h xopintrin.h
87c62cba 368 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
2339767f 369 lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
bce88dc2 370 avx2intrin.h fmaintrin.h f16cintrin.h rtmintrin.h
41bc5727 371 xtestintrin.h rdseedintrin.h prfchwintrin.h adxintrin.h"
bb607926 372 ;;
5c66405b 373x86_64-*-*)
374 cpu_type=i386
46f8e3b0 375 c_target_objs="i386-c.o"
376 cxx_target_objs="i386-c.o"
bca226ea 377 extra_options="${extra_options} fused-madd.opt"
daf03e2f 378 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
f25d51c3 379 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
2f212aae 380 nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
18525343 381 immintrin.h x86intrin.h avxintrin.h xopintrin.h
87c62cba 382 ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
2339767f 383 lzcntintrin.h bmiintrin.h tbmintrin.h bmi2intrin.h
bce88dc2 384 avx2intrin.h fmaintrin.h f16cintrin.h rtmintrin.h
41bc5727 385 xtestintrin.h rdseedintrin.h prfchwintrin.h adxintrin.h"
805e22b2 386 need_64bit_hwint=yes
5c66405b 387 ;;
b965afcd 388ia64-*-*)
389 extra_headers=ia64intrin.h
805e22b2 390 need_64bit_hwint=yes
dd7870fa 391 extra_options="${extra_options} g.opt fused-madd.opt"
b965afcd 392 ;;
6af9f7ea 393hppa*-*-*)
bb607926 394 cpu_type=pa
395 ;;
d1e5a65f 396lm32*)
397 extra_options="${extra_options} g.opt"
398 ;;
467dc9aa 399m32r*-*-*)
400 cpu_type=m32r
d1e5a65f 401 extra_options="${extra_options} g.opt"
467dc9aa 402 ;;
83287f80 403m68k-*-*)
404 extra_headers=math-68881.h
d078aadd 405 extra_options="${extra_options} m68k/m68k-tables.opt"
bb607926 406 ;;
d34b0d1e 407microblaze*-*-*)
408 cpu_type=microblaze
409 extra_options="${extra_options} g.opt"
410 ;;
bb607926 411mips*-*-*)
412 cpu_type=mips
805e22b2 413 need_64bit_hwint=yes
9636921b 414 extra_headers="loongson.h"
64bd95e1 415 extra_options="${extra_options} g.opt mips/mips-tables.opt"
bb607926 416 ;;
8372e9ea 417picochip-*-*)
418 cpu_type=picochip
419 ;;
bb607926 420powerpc*-*-*)
421 cpu_type=rs6000
c22e07a3 422 extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h"
805e22b2 423 need_64bit_hwint=yes
cc5ffbb8 424 case x$with_cpu in
b770074c 425 xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[34567]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500)
cc5ffbb8 426 cpu_is_64bit=yes
427 ;;
428 esac
d41a5879 429 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
805e22b2 430 ;;
431rs6000*-*-*)
432 need_64bit_hwint=yes
d41a5879 433 extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
805e22b2 434 ;;
3dbfe3e4 435score*-*-*)
436 cpu_type=score
d1e5a65f 437 extra_options="${extra_options} g.opt"
3dbfe3e4 438 ;;
bb607926 439sparc*-*-*)
440 cpu_type=sparc
9e64c9a4 441 c_target_objs="sparc-c.o"
442 cxx_target_objs="sparc-c.o"
6b27013f 443 extra_headers="visintrin.h"
1168681b 444 need_64bit_hwint=yes
bb607926 445 ;;
644459d0 446spu*-*-*)
447 cpu_type=spu
448 need_64bit_hwint=yes
449 ;;
805e22b2 450s390*-*-*)
37d32fbf 451 cpu_type=s390
805e22b2 452 need_64bit_hwint=yes
81470015 453 extra_options="${extra_options} fused-madd.opt"
805e22b2 454 ;;
4ee34c70 455# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
fc7383ad 456sh[123456789lbe]*-*-* | sh-*-*)
87e19636 457 cpu_type=sh
805e22b2 458 need_64bit_hwint=yes
658a6fb7 459 extra_options="${extra_options} fused-madd.opt"
87e19636 460 ;;
c5b0bf72 461v850*-*-*)
462 cpu_type=v850
463 ;;
5aa04b01 464tic6x-*-*)
465 cpu_type=c6x
466 extra_headers="c6x_intrinsics.h"
467 extra_options="${extra_options} c6x/c6x-tables.opt"
468 ;;
041cf413 469xtensa*-*-*)
470 extra_options="${extra_options} fused-madd.opt"
471 ;;
7ce78e23 472tilegx*-*-*)
473 cpu_type=tilegx
474 need_64bit_hwint=yes
475 ;;
476tilepro-*-*)
477 cpu_type=tilepro
478 need_64bit_hwint=yes
479 ;;
bb607926 480esac
481
482tm_file=${cpu_type}/${cpu_type}.h
20ffb0b1 483if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
bb607926 484then
20ffb0b1 485 tm_p_file=${cpu_type}/${cpu_type}-protos.h
486fi
b5ccaa7b 487extra_modes=
488if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
489then
490 extra_modes=${cpu_type}/${cpu_type}-modes.def
491fi
ff05e09e 492if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
493then
494 extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
495fi
a8456aba 496
09c6646e 497case ${target} in
144c3e90 498i[34567]86-*-*)
6fa78bde 499 if test "x$with_abi" != x; then
500 echo "This target does not support --with-abi."
501 exit 1
502 fi
43da04c5 503 if test "x$enable_cld" = xyes; then
144c3e90 504 tm_defines="${tm_defines} USE_IX86_CLD=1"
505 fi
fc00a76a 506 if test "x$enable_frame_pointer" = xyes; then
507 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
508 fi
912f2b18 509 tm_file="vxworks-dummy.h ${tm_file}"
144c3e90 510 ;;
a8456aba 511x86_64-*-*)
6fa78bde 512 case ${with_abi} in
513 "")
514 if test "x$with_multilib_list" = xmx32; then
515 tm_file="i386/biarchx32.h ${tm_file}"
516 else
517 tm_file="i386/biarch64.h ${tm_file}"
518 fi
519 ;;
520 64 | m64)
521 tm_file="i386/biarch64.h ${tm_file}"
522 ;;
523 x32 | mx32)
524 tm_file="i386/biarchx32.h ${tm_file}"
525 ;;
526 *)
527 echo "Unknown ABI used in --with-abi=$with_abi"
528 exit 1
529 esac
43da04c5 530 if test "x$enable_cld" = xyes; then
144c3e90 531 tm_defines="${tm_defines} USE_IX86_CLD=1"
532 fi
fc00a76a 533 if test "x$enable_frame_pointer" = xyes; then
534 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
535 fi
912f2b18 536 tm_file="vxworks-dummy.h ${tm_file}"
a8456aba 537 ;;
538esac
539
bb607926 540# On a.out targets, we need to use collect2.
09c6646e 541case ${target} in
bb607926 542*-*-*aout*)
543 use_collect2=yes
544 ;;
582b17a6 545esac
bb607926 546
3d0ed9e7 547# Common C libraries.
548tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
549
805e22b2 550# Common parts for widely ported systems.
09c6646e 551case ${target} in
1025d5b9 552*-*-darwin*)
e2e89254 553 tmake_file="t-darwin ${cpu_type}/t-darwin"
650c26dc 554 tm_file="${tm_file} darwin.h"
555 case ${target} in
9166f36a 556 *-*-darwin9*)
650c26dc 557 tm_file="${tm_file} darwin9.h"
558 ;;
9166f36a 559 *-*-darwin[12][0-9]*)
560 tm_file="${tm_file} darwin9.h darwin10.h"
561 ;;
650c26dc 562 esac
563 tm_file="${tm_file} ${cpu_type}/darwin.h"
1025d5b9 564 tm_p_file="${tm_p_file} darwin-protos.h"
1025d5b9 565 target_gtfiles="\$(srcdir)/config/darwin.c"
0c44645a 566 extra_options="${extra_options} darwin.opt"
46f8e3b0 567 c_target_objs="${c_target_objs} darwin-c.o"
568 cxx_target_objs="${cxx_target_objs} darwin-c.o"
32006f36 569 fortran_target_objs="darwin-f.o"
c94b1d0e 570 target_has_targetcm=yes
1025d5b9 571 extra_objs="darwin.o"
a9540fb6 572 extra_gcc_objs="darwin-driver.o"
3da996b9 573 default_use_cxa_atexit=yes
ef87fe4c 574 use_gcc_stdint=wrap
1025d5b9 575 case ${enable_threads} in
576 "" | yes | posix) thread_file='posix' ;;
577 esac
578 ;;
1025d5b9 579*-*-freebsd*)
580 # This is the generic ELF configuration of FreeBSD. Later
581 # machine-specific sections may refine and add to this
582 # configuration.
583 #
584 # Due to tm_file entry ordering issues that vary between cpu
585 # architectures, we only define fbsd_tm_file to allow the
586 # machine-specific section to dictate the final order of all
587 # entries of tm_file with the minor exception that components
588 # of the tm_file set here will always be of the form:
589 #
590 # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
591 #
592 # The machine-specific section should not tamper with this
593 # ordering but may order all other entries of tm_file as it
594 # pleases around the provided core setting.
595 gas=yes
596 gnu_ld=yes
cfb5f9aa 597 fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
598 tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
4dc4ff49 599 tmake_file="t-slibgcc"
1025d5b9 600 case ${enable_threads} in
601 no)
602 fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
603 ;;
5614d3f5 604 "" | yes | posix)
1025d5b9 605 thread_file='posix'
1025d5b9 606 ;;
3ebc7dec 607 *)
1025d5b9 608 echo 'Unknown thread configuration for FreeBSD'
609 exit 1
610 ;;
611 esac
c4c8f6ce 612 fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
13c30464 613 extra_options="$extra_options rpath.opt freebsd.opt"
d52a86c7 614 case ${target} in
615 *-*-freebsd[345].*)
616 :;;
617 *)
618 default_use_cxa_atexit=yes;;
619 esac
620 # need_64bit_hwint=yes # system compiler has this for all arch!
c4c8f6ce 621 use_gcc_stdint=wrap
1025d5b9 622 ;;
3bef4012 623*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
55d8cecf 624 extra_options="$extra_options gnu-user.opt"
338f7557 625 gas=yes
626 gnu_ld=yes
627 case ${enable_threads} in
628 "" | yes | posix) thread_file='posix' ;;
629 esac
4dc4ff49 630 tmake_file="t-slibgcc"
72a65e81 631 case $target in
3bef4012 632 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-kopensolaris*-gnu)
72a65e81 633 :;;
634 *-*-gnu*)
638454a1 635 native_system_header_dir=/include
636 ;;
72a65e81 637 esac
66fd9df9 638 # glibc / uclibc / bionic switch.
639 # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
72a65e81 640 case $target in
641 *linux*)
642 extra_options="$extra_options linux.opt";;
72a65e81 643 esac
66fd9df9 644 case $target in
645 *-*-*android*)
646 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
647 ;;
ee085235 648 *-*-*uclibc*)
66fd9df9 649 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
c490c13b 650 ;;
651 *)
66fd9df9 652 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
ee085235 653 ;;
654 esac
66fd9df9 655 # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
656 # is provided.
430e8f92 657 default_use_cxa_atexit=yes
50388ca3 658 use_gcc_tgmath=no
f3449a3c 659 use_gcc_stdint=wrap
f1b7ead9 660 # Add Android userspace support to Linux targets.
661 case $target in
662 *linux*)
663 tm_file="$tm_file linux-android.h"
664 extra_options="$extra_options linux-android.opt"
665 ;;
666 esac
667 # Enable compilation for Android by default for *android* targets.
668 case $target in
669 *-*-*android*)
670 tm_defines="$tm_defines ANDROID_DEFAULT=1"
671 ;;
672 *)
673 tm_defines="$tm_defines ANDROID_DEFAULT=0"
674 ;;
675 esac
6adc88f8 676 c_target_objs="${c_target_objs} glibc-c.o"
677 cxx_target_objs="${cxx_target_objs} glibc-c.o"
678 tmake_file="${tmake_file} t-glibc"
679 target_has_targetcm=yes
338f7557 680 ;;
4ace673e 681*-*-netbsd*)
4dc4ff49 682 tmake_file="t-slibgcc"
338f7557 683 gas=yes
684 gnu_ld=yes
b7ac288f 685
338f7557 686 # NetBSD 2.0 and later get POSIX threads enabled by default.
687 # Allow them to be explicitly enabled on any other version.
688 case ${enable_threads} in
689 "")
690 case ${target} in
691 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
692 thread_file='posix'
693 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
694 ;;
695 esac
696 ;;
697 yes | posix)
698 thread_file='posix'
699 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
700 ;;
701 esac
9a33b00e 702
338f7557 703 # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
704 # default (unless overridden by --disable-__cxa_atexit).
705 case ${target} in
706 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
707 default_use_cxa_atexit=yes
708 ;;
709 esac
710 ;;
1025d5b9 711*-*-openbsd*)
4dc4ff49 712 tmake_file="t-openbsd"
338f7557 713 case ${enable_threads} in
1025d5b9 714 yes)
338f7557 715 thread_file='posix'
338f7557 716 ;;
717 esac
d3ad7bb1 718 case ${target} in
719 *-*-openbsd2.*|*-*-openbsd3.[012])
720 tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
721 esac
f3c0d3e6 722 case ${target} in
723 *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
724 default_use_cxa_atexit=yes
725 ;;
726 esac
338f7557 727 ;;
2fcfea2a 728*-*-rtems*)
729 case ${enable_threads} in
730 yes) thread_file='rtems' ;;
731 esac
d6959f51 732 extra_options="${extra_options} rtems.opt"
f3449a3c 733 use_gcc_stdint=wrap
734 ;;
735*-*-uclinux*)
55d8cecf 736 extra_options="$extra_options gnu-user.opt"
f3449a3c 737 use_gcc_stdint=wrap
d9993a19 738 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
2fcfea2a 739 ;;
0c7243ae 740*-*-solaris2*)
c2e7ebeb 741 # i?86-*-solaris2* needs to insert headers between cpu default and
742 # Solaris 2 specific ones.
743 sol2_tm_file="dbxelf.h elfos.h ${cpu_type}/sysv4.h sol2.h ${cpu_type}/sol2.h"
744 case ${target} in
745 *-*-solaris2.1[0-9]*)
746 sol2_tm_file="${sol2_tm_file} sol2-10.h"
747 use_gcc_stdint=wrap
748 ;;
749 *)
750 use_gcc_stdint=provide
751 ;;
752 esac
753 if test x$gnu_ld = xyes; then
754 tm_file="usegld.h ${tm_file}"
755 fi
756 if test x$gas = xyes; then
757 tm_file="usegas.h ${tm_file}"
758 fi
759 tm_p_file="${tm_p_file} sol2-protos.h"
a997b0d8 760 tmake_file="${tmake_file} t-sol2 t-slibgcc"
c2e7ebeb 761 c_target_objs="${c_target_objs} sol2-c.o"
16a1895e 762 cxx_target_objs="${cxx_target_objs} sol2-c.o sol2-cxx.o"
763 extra_objs="sol2.o sol2-stubs.o"
0c7243ae 764 extra_options="${extra_options} sol2.opt"
c2e7ebeb 765 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
766 "":yes:* | yes:yes:* )
767 thread_file=posix
768 ;;
769 esac
0c7243ae 770 ;;
b0a47c39 771*-*-*vms*)
772 extra_options="${extra_options} vms/vms.opt"
773 xmake_file=vms/x-vms
a997b0d8 774 tmake_file="vms/t-vms t-slibgcc"
ded97e77 775 extra_objs="vms.o"
776 target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.c"
777 tm_p_file="${tm_p_file} vms/vms-protos.h"
8f852c44 778 xm_file="vms/xm-vms.h"
09ddc95a 779 c_target_objs="vms-c.o"
780 cxx_target_objs="vms-c.o"
b26acc64 781 fortran_target_objs="vms-f.o"
e55b581d 782 use_gcc_stdint=provide
783 tm_file="${tm_file} vms/vms-stdint.h"
b0a47c39 784 if test x$gnu_ld != xyes; then
785 # Build wrappers for native case.
786 extra_programs="ld\$(exeext) ar\$(exeext)"
787 tmake_file="$tmake_file vms/t-vmsnative"
788 fi
789 ;;
805e22b2 790*-*-vxworks*)
338f7557 791 tmake_file=t-vxworks
e6eccdb3 792 xm_defines=POSIX
793 extra_options="${extra_options} vxworks.opt"
6c181a06 794 extra_objs=vxworks.o
d9799238 795 case ${enable_threads} in
796 no) ;;
797 "" | yes | vxworks) thread_file='vxworks' ;;
798 *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
799 esac
338f7557 800 ;;
430e8f92 801*-*-elf)
802 # Assume that newlib is being used and so __cxa_atexit is provided.
803 default_use_cxa_atexit=yes
f3449a3c 804 use_gcc_stdint=wrap
430e8f92 805 ;;
bb607926 806esac
807
09c6646e 808case ${target} in
16878cba 809aarch64*-*-elf)
810 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
811 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
812 tmake_file="${tmake_file} aarch64/t-aarch64"
813 use_gcc_stdint=wrap
814 case $target in
815 aarch64_be-*)
816 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
817 ;;
818 esac
819 ;;
820aarch64*-*-linux*)
821 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
822 tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
823 tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
824 case $target in
825 aarch64_be-*)
826 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
827 ;;
828 esac
829 ;;
bb607926 830alpha*-*-linux*)
a25bf392 831 tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
0b803a91 832 extra_options="${extra_options} alpha/elf.opt"
bb607926 833 ;;
834alpha*-*-freebsd*)
a25bf392 835 tm_file="elfos.h ${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
0b803a91 836 extra_options="${extra_options} alpha/elf.opt"
bb607926 837 ;;
838alpha*-*-netbsd*)
a25bf392 839 tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
0b803a91 840 extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
841 alpha/elf.opt"
bb607926 842 ;;
bb607926 843alpha*-*-openbsd*)
8e6600a1 844 tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
a25bf392 845 tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
0b803a91 846 extra_options="${extra_options} openbsd.opt alpha/elf.opt"
bb607926 847 # default x-alpha is only appropriate for dec-osf.
bb607926 848 ;;
73777e7b 849alpha*-dec-*vms*)
2936855c 850 tm_file="${tm_file} vms/vms.h alpha/vms.h"
4dc4ff49 851 tmake_file="${tmake_file} alpha/t-vms"
bb607926 852 ;;
d9799238 853arm-wrs-vxworks)
ab39d1bf 854 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
8afdaa80 855 extra_options="${extra_options} arm/vxworks.opt"
06469f9e 856 tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
d9799238 857 ;;
f470dade 858arm*-*-netbsdelf*)
2b6c0e61 859 tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
f466b0a0 860 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
4dc4ff49 861 tmake_file="${tmake_file} arm/t-arm"
f470dade 862 ;;
f49eb158 863arm*-*-linux-*) # ARM GNU/Linux with ELF
deb14f24 864 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"
fcc91c04 865 case $target in
736a63d4 866 arm*b-*-linux*)
295f5c5c 867 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
868 ;;
fcc91c04 869 esac
295f5c5c 870 tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
871 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h arm/arm.h"
872 # Define multilib configuration for arm-linux-androideabi.
6783d878 873 case ${target} in
295f5c5c 874 *-androideabi)
875 tmake_file="$tmake_file arm/t-linux-androideabi"
6783d878 876 ;;
877 esac
295f5c5c 878 # The BPABI long long divmod functions return a 128-bit value in
879 # registers r0-r3. Correctly modeling that requires the use of
880 # TImode.
881 need_64bit_hwint=yes
882 # The EABI requires the use of __cxa_atexit.
883 default_use_cxa_atexit=yes
bb10d7b5 884 with_tls=${with_tls:-gnu}
bb607926 885 ;;
295f5c5c 886arm*-*-uclinux*eabi*) # ARM ucLinux
f3449a3c 887 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
295f5c5c 888 tmake_file="arm/t-arm arm/t-arm-elf arm/t-bpabi"
889 tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h arm/arm.h"
890 # The BPABI long long divmod functions return a 128-bit value in
891 # registers r0-r3. Correctly modeling that requires the use of
892 # TImode.
893 need_64bit_hwint=yes
894 # The EABI requires the use of __cxa_atexit.
895 default_use_cxa_atexit=yes
582b17a6 896 ;;
e222cec3 897arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
3ebc7dec 898 # The BPABI long long divmod functions return a 128-bit value in
30e9913f 899 # registers r0-r3. Correctly modeling that requires the use of
900 # TImode.
901 need_64bit_hwint=yes
a6b58380 902 default_use_cxa_atexit=yes
30e9913f 903 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
2219ac9e 904 tmake_file="arm/t-arm arm/t-arm-elf"
30e9913f 905 case ${target} in
35da3667 906 arm*-*-eabi*)
f1b7ead9 907 tm_file="$tm_file newlib-stdint.h"
a88cbac9 908 tmake_file="${tmake_file} arm/t-bpabi"
f3449a3c 909 use_gcc_stdint=wrap
35da3667 910 ;;
e222cec3 911 arm*-*-rtems*)
1ecdfe84 912 tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
913 tmake_file="${tmake_file} arm/t-bpabi t-rtems arm/t-rtems-eabi"
914 ;;
30e9913f 915 arm*-*-symbianelf*)
916 tm_file="${tm_file} arm/symbian.h"
35da3667 917 # We do not include t-bpabi for Symbian OS because the system
918 # provides its own implementation of the BPABI functions.
67de96d2 919 tmake_file="${tmake_file} arm/t-symbian"
30e9913f 920 ;;
921 esac
922 tm_file="${tm_file} arm/aout.h arm/arm.h"
ccf155b5 923 ;;
1598c1ed 924avr-*-rtems*)
1dbb006a 925 tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
b32bc361 926 tmake_file="avr/t-avr avr/t-multilib t-rtems avr/t-rtems"
795cff42 927 extra_gcc_objs="driver-avr.o avr-devices.o"
47fe598e 928 extra_objs="avr-devices.o avr-log.o"
1598c1ed 929 ;;
bb607926 930avr-*-*)
1dbb006a 931 tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/avr-stdint.h"
fd28e216 932 if test x${with_avrlibc} != xno; then
933 tm_file="${tm_file} ${cpu_type}/avrlibc.h"
934 tm_defines="${tm_defines} WITH_AVRLIBC"
935 fi
b32bc361 936 tmake_file="avr/t-avr avr/t-multilib"
f3449a3c 937 use_gcc_stdint=wrap
795cff42 938 extra_gcc_objs="driver-avr.o avr-devices.o"
47fe598e 939 extra_objs="avr-devices.o avr-log.o"
bb607926 940 ;;
9e6a0967 941bfin*-elf*)
f3449a3c 942 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
e0cbe6c1 943 tmake_file=bfin/t-bfin-elf
944 use_collect2=no
945 ;;
43be3be8 946bfin*-uclinux*)
deb14f24 947 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
e0cbe6c1 948 tmake_file=bfin/t-bfin-uclinux
e0cbe6c1 949 use_collect2=no
950 ;;
bce94ab5 951bfin*-linux-uclibc*)
deb14f24 952 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"
a997b0d8 953 tmake_file="bfin/t-bfin-linux t-slibgcc"
e0cbe6c1 954 use_collect2=no
955 ;;
4a7fad64 956bfin*-rtems*)
b4cebe6e 957 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
9213d2eb 958 tmake_file="t-rtems bfin/t-rtems"
e0cbe6c1 959 ;;
9e6a0967 960bfin*-*)
f3449a3c 961 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
e0cbe6c1 962 use_collect2=no
f3449a3c 963 use_gcc_stdint=wrap
e0cbe6c1 964 ;;
b9fdd12b 965cr16-*-elf)
966 tm_file="elfos.h ${tm_file}"
967 tmake_file="${tmake_file} cr16/t-cr16 "
968 use_collect2=no
969 ;;
9b9e3455 970crisv32-*-elf | crisv32-*-none)
f3449a3c 971 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
9b9e3455 972 tmake_file="cris/t-cris"
973 target_cpu_default=32
974 gas=yes
975 extra_options="${extra_options} cris/elf.opt"
f3449a3c 976 use_gcc_stdint=wrap
9b9e3455 977 ;;
e03f789f 978cris-*-elf | cris-*-none)
f3449a3c 979 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
e03f789f 980 tmake_file="cris/t-cris cris/t-elfmulti"
981 gas=yes
c419af1d 982 extra_options="${extra_options} cris/elf.opt"
f3449a3c 983 use_gcc_stdint=wrap
e03f789f 984 ;;
9b9e3455 985crisv32-*-linux* | cris-*-linux*)
deb14f24 986 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
1afa774a 987 # We need to avoid using t-linux, so override default tmake_file
a997b0d8 988 tmake_file="cris/t-cris cris/t-linux t-slibgcc"
c419af1d 989 extra_options="${extra_options} cris/linux.opt"
9b9e3455 990 case $target in
991 cris-*-*)
992 target_cpu_default=10
993 ;;
994 crisv32-*-*)
995 target_cpu_default=32
996 ;;
997 esac
e03f789f 998 ;;
d19f5793 999epiphany-*-elf )
1000 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1001 tmake_file="epiphany/t-epiphany"
1002 extra_options="${extra_options} fused-madd.opt"
1003 extra_objs="$extra_objs mode-switch-use.o resolve-sw-modes.o"
1004 tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1005 extra_headers="epiphany_intrinsics.h"
1006 ;;
bb607926 1007fr30-*-elf)
ecf20f53 1008 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
bb607926 1009 ;;
efb6037d 1010frv-*-elf)
b1319ddf 1011 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
efb6037d 1012 tmake_file=frv/t-frv
1013 ;;
3e7f6cce 1014frv-*-*linux*)
b1319ddf 1015 tm_file="dbxelf.h elfos.h ${tm_file} \
deb14f24 1016 gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1afa774a 1017 tmake_file="${tmake_file} frv/t-frv frv/t-linux"
3e7f6cce 1018 ;;
be52b6d8 1019moxie-*-elf)
1020 gas=yes
1021 gnu_ld=yes
01a092a9 1022 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
84600db5 1023 tmake_file="${tmake_file} moxie/t-moxie"
be52b6d8 1024 ;;
447e8aaa 1025moxie-*-uclinux*)
1026 gas=yes
1027 gnu_ld=yes
deb14f24 1028 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
84600db5 1029 tmake_file="${tmake_file} moxie/t-moxie"
447e8aaa 1030 ;;
c4fa0b2a 1031moxie-*-rtems*)
84600db5 1032 tmake_file="${tmake_file} moxie/t-moxie t-rtems"
c4fa0b2a 1033 tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1034 ;;
02fe7cca 1035h8300-*-rtems*)
237490bf 1036 tmake_file="h8300/t-h8300 t-rtems h8300/t-rtems"
f3449a3c 1037 tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
02fe7cca 1038 ;;
15b65932 1039h8300-*-elf*)
237490bf 1040 tmake_file="h8300/t-h8300"
f3449a3c 1041 tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
15b65932 1042 ;;
6af9f7ea 1043hppa*64*-*-linux*)
8ab32933 1044 target_cpu_default="MASK_PA_11|MASK_PA_20"
deb14f24 1045 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
f3449a3c 1046 glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1047 pa/pa64-linux.h"
6630177d 1048 gas=yes gnu_ld=yes
805e22b2 1049 need_64bit_hwint=yes
6630177d 1050 ;;
6af9f7ea 1051hppa*-*-linux*)
8ab32933 1052 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
deb14f24 1053 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
6630177d 1054 pa/pa32-regs.h pa/pa32-linux.h"
bb607926 1055 ;;
07cf7615 1056hppa*-*-openbsd*)
1057 target_cpu_default="MASK_PA_11"
1058 tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1059 pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
1060 tmake_file="${tmake_file} pa/t-openbsd"
1061 extra_options="${extra_options} openbsd.opt"
1062 gas=yes
1063 gnu_ld=yes
1064 ;;
8ab32933 1065hppa[12]*-*-hpux10*)
1066 case ${target} in
1067 hppa1.1-*-* | hppa2*-*-*)
1068 target_cpu_default="MASK_PA_11"
1069 ;;
1070 esac
1071 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1072 pa/pa-hpux.h pa/pa-hpux10.h"
4d15365c 1073 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
8ab32933 1074 case ${target} in
1075 *-*-hpux10.[1-9]*)
1076 tm_file="${tm_file} pa/pa-hpux1010.h"
bd57250e 1077 extra_options="${extra_options} pa/pa-hpux1010.opt"
8ab32933 1078 ;;
bb607926 1079 esac
c0045c9e 1080 use_gcc_stdint=provide
1081 tm_file="${tm_file} hpux-stdint.h"
4dc4ff49 1082 tmake_file="t-slibgcc"
334c8279 1083 case ${enable_threads} in
1084 "")
1085 if test x$have_pthread_h = xyes ; then
1086 tmake_file="${tmake_file} pa/t-dce-thr"
1087 fi
1088 ;;
1089 yes | dce)
1090 tmake_file="${tmake_file} pa/t-dce-thr"
1091 ;;
bb607926 1092 esac
bb607926 1093 use_collect2=yes
8ad01423 1094 gas=yes
13b99879 1095 if test "x$with_dwarf2" != x; then
16b36e36 1096 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
13b99879 1097 dwarf2=no
1098 fi
bb607926 1099 ;;
1100hppa*64*-*-hpux11*)
8ab32933 1101 target_cpu_default="MASK_PA_11|MASK_PA_20"
cacee710 1102 if test x$gnu_ld = xyes
1103 then
8ab32933 1104 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
cacee710 1105 fi
8ad01423 1106 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1107 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1108 pa/pa-hpux11.h"
8ab32933 1109 case ${target} in
637c9296 1110 *-*-hpux11.[12]*)
8ab32933 1111 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
bd57250e 1112 extra_options="${extra_options} pa/pa-hpux1111.opt"
8ab32933 1113 ;;
637c9296 1114 *-*-hpux11.[3-9]*)
1115 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1116 extra_options="${extra_options} pa/pa-hpux1131.opt"
1117 ;;
8ab32933 1118 *)
1119 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1120 ;;
1121 esac
bd57250e 1122 extra_options="${extra_options} pa/pa-hpux.opt \
593c1adb 1123 pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
805e22b2 1124 need_64bit_hwint=yes
4dc4ff49 1125 tmake_file="t-slibgcc"
120a2fed 1126 case x${enable_threads} in
4699015f 1127 x | xyes | xposix )
3ebc7dec 1128 thread_file=posix
120a2fed 1129 ;;
1130 esac
8ad01423 1131 gas=yes
43cb9222 1132 case ${target} in
1133 *-*-hpux11.[01]*)
1134 use_gcc_stdint=provide
1135 tm_file="${tm_file} hpux-stdint.h"
1136 ;;
1137 *-*-hpux11.[23]*)
1138 use_gcc_stdint=wrap
1139 tm_file="${tm_file} hpux-stdint.h"
1140 ;;
1141 esac
bb607926 1142 ;;
8ab32933 1143hppa[12]*-*-hpux11*)
1144 case ${target} in
1145 hppa1.1-*-* | hppa2*-*-*)
1146 target_cpu_default="MASK_PA_11"
1147 ;;
1148 esac
1149 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
bd57250e 1150 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
593c1adb 1151 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1152 hpux11.opt"
8ab32933 1153 case ${target} in
637c9296 1154 *-*-hpux11.[12]*)
8ab32933 1155 tm_file="${tm_file} pa/pa-hpux1111.h"
bd57250e 1156 extra_options="${extra_options} pa/pa-hpux1111.opt"
120a2fed 1157 ;;
637c9296 1158 *-*-hpux11.[3-9]*)
1159 tm_file="${tm_file} pa/pa-hpux1131.h"
1160 extra_options="${extra_options} pa/pa-hpux1131.opt"
1161 ;;
120a2fed 1162 esac
4dc4ff49 1163 tmake_file="t-slibgcc"
120a2fed 1164 case x${enable_threads} in
4699015f 1165 x | xyes | xposix )
3ebc7dec 1166 thread_file=posix
120a2fed 1167 ;;
1168 esac
bb607926 1169 use_collect2=yes
8ad01423 1170 gas=yes
43cb9222 1171 case ${target} in
1172 *-*-hpux11.[01]*)
1173 use_gcc_stdint=provide
1174 tm_file="${tm_file} hpux-stdint.h"
1175 ;;
1176 *-*-hpux11.[23]*)
1177 use_gcc_stdint=wrap
1178 tm_file="${tm_file} hpux-stdint.h"
1179 ;;
1180 esac
13b99879 1181 if test "x$with_dwarf2" != x; then
16b36e36 1182 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
13b99879 1183 dwarf2=no
1184 fi
bb607926 1185 ;;
ffd05090 1186i[34567]86-*-darwin*)
ed2b8f56 1187 need_64bit_isa=yes
ffa7199b 1188 # Baseline choice for a machine that allows m64 support.
1189 with_cpu=${with_cpu:-core2}
a997b0d8 1190 tmake_file="${tmake_file} t-slibgcc"
ffd05090 1191 ;;
4a839b30 1192x86_64-*-darwin*)
ffa7199b 1193 with_cpu=${with_cpu:-core2}
a997b0d8 1194 tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
4a839b30 1195 tm_file="${tm_file} ${cpu_type}/darwin64.h"
1196 ;;
bb607926 1197i[34567]86-*-elf*)
f3449a3c 1198 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
bc831fe3 1199 ;;
1200x86_64-*-elf*)
f3449a3c 1201 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 1202 ;;
bb607926 1203i[34567]86-*-freebsd*)
d2307a72 1204 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
a8456aba 1205 ;;
1206x86_64-*-freebsd*)
d2307a72 1207 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 1208 ;;
f406b863 1209i[34567]86-*-netbsdelf*)
d2307a72 1210 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
f466b0a0 1211 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
f406b863 1212 ;;
8bc47d57 1213x86_64-*-netbsd*)
d2307a72 1214 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h"
f466b0a0 1215 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
8bc47d57 1216 ;;
d3ad7bb1 1217i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
0ac7fc08 1218 tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
1a0fb050 1219 extra_options="${extra_options} openbsd.opt"
c7be79ca 1220 # needed to unconfuse gdb
237490bf 1221 tmake_file="${tmake_file} t-openbsd i386/t-openbsd"
bb607926 1222 # we need collect2 until our bug is fixed...
1223 use_collect2=yes
1224 ;;
d3ad7bb1 1225i[34567]86-*-openbsd*)
bcc9ac22 1226 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
8e6600a1 1227 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1a0fb050 1228 extra_options="${extra_options} openbsd.opt"
d3ad7bb1 1229 gas=yes
1230 gnu_ld=yes
d3ad7bb1 1231 ;;
51796b3a 1232x86_64-*-openbsd*)
1233 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1234 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1235 extra_options="${extra_options} openbsd.opt"
1236 gas=yes
1237 gnu_ld=yes
1238 ;;
3bef4012 1239i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
6396cc37 1240 # Intel 80386's running GNU/*
bb607926 1241 # with ELF format using glibc 2
6ee152ce 1242 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
6396cc37 1243 case ${target} in
54bb64fb 1244 i[34567]86-*-linux*)
6ee152ce 1245 tm_file="${tm_file} linux.h"
1c6e0788 1246 # Assume modern glibc
1247 default_gnu_indirect_function=yes
54bb64fb 1248 if test x$enable_targets = xall; then
ba102931 1249 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 1250 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
b3fd46a0 1251 tmake_file="${tmake_file} i386/t-linux64"
596b2ba3 1252 x86_multilibs="${with_multilib_list}"
1253 if test "$x86_multilibs" = "default"; then
1254 x86_multilibs="m64,m32"
1255 fi
1256 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1257 for x86_multilib in ${x86_multilibs}; do
1258 case ${x86_multilib} in
1259 m32 | m64 | mx32)
1260 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1261 ;;
1262 *)
1263 echo "--with-multilib-list=${x86_with_multilib} not supported."
1264 exit 1
1265 esac
1266 done
1267 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
ed2b8f56 1268 need_64bit_isa=yes
54bb64fb 1269 case X"${with_cpu}" in
75eddf9a 1270 Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver2|Xbdver1|Xbtver2|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
54bb64fb 1271 ;;
1272 X)
f067c6b7 1273 if test x$with_cpu_64 = x; then
1274 with_cpu_64=generic
1275 fi
54bb64fb 1276 ;;
1277 *)
1278 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
75eddf9a 1279 echo "generic atom core2 corei7 corei7-avx nocona x86-64 bdver2 bdver1 btver2 btver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
54bb64fb 1280 exit 1
1281 ;;
1282 esac
1283 else
ba102931 1284 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
54bb64fb 1285 fi
1286 ;;
2c6c4996 1287 i[34567]86-*-knetbsd*-gnu)
83dd7eef 1288 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h knetbsd-gnu.h i386/knetbsd-gnu.h"
2c6c4996 1289 ;;
1290 i[34567]86-*-kfreebsd*-gnu)
83dd7eef 1291 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
2c6c4996 1292 ;;
1293 i[34567]86-*-kopensolaris*-gnu)
83dd7eef 1294 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
2c6c4996 1295 ;;
1296 i[34567]86-*-gnu*)
83dd7eef 1297 tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
2c6c4996 1298 ;;
6396cc37 1299 esac
bb607926 1300 ;;
28a6c5e3 1301x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
6ee152ce 1302 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
83dd7eef 1303 i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
28a6c5e3 1304 case ${target} in
1c6e0788 1305 x86_64-*-linux*)
ba102931 1306 tm_file="${tm_file} linux.h i386/linux-common.h i386/linux64.h"
2c6c4996 1307 # Assume modern glibc
1308 default_gnu_indirect_function=yes
1309 ;;
1310 x86_64-*-kfreebsd*-gnu)
1311 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1312 ;;
1313 x86_64-*-knetbsd*-gnu)
1314 tm_file="${tm_file} knetbsd-gnu.h"
1315 ;;
28a6c5e3 1316 esac
237490bf 1317 tmake_file="${tmake_file} i386/t-linux64"
596b2ba3 1318 x86_multilibs="${with_multilib_list}"
1319 if test "$x86_multilibs" = "default"; then
d26d40c8 1320 case ${with_abi} in
1321 x32 | mx32)
1322 x86_multilibs="mx32"
1323 ;;
1324 *)
1325 x86_multilibs="m64,m32"
1326 ;;
1327 esac
596b2ba3 1328 fi
1329 x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1330 for x86_multilib in ${x86_multilibs}; do
1331 case ${x86_multilib} in
1332 m32 | m64 | mx32)
1333 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1334 ;;
1335 *)
1336 echo "--with-multilib-list=${x86_with_multilib} not supported."
1337 exit 1
1338 esac
1339 done
1340 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
5c66405b 1341 ;;
bb607926 1342i[34567]86-pc-msdosdjgpp*)
1343 xm_file=i386/xm-djgpp.h
8c35683d 1344 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
638454a1 1345 native_system_header_dir=/dev/env/DJDIR/include
0c44645a 1346 extra_options="${extra_options} i386/djgpp.opt"
bb607926 1347 gnu_ld=yes
1348 gas=yes
a47075bb 1349 use_gcc_stdint=wrap
bb607926 1350 ;;
bb607926 1351i[34567]86-*-lynxos*)
d895dbf9 1352 xm_defines=POSIX
1353 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
237490bf 1354 tmake_file="${tmake_file} t-lynx"
0c44645a 1355 extra_options="${extra_options} lynx.opt"
d895dbf9 1356 thread_file=lynx
1357 gnu_ld=yes
1358 gas=yes
bb607926 1359 ;;
b1aac5f5 1360i[34567]86-*-nto-qnx*)
2b90ba90 1361 tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
9453823e 1362 extra_options="${extra_options} i386/nto.opt"
b1aac5f5 1363 gnu_ld=yes
1364 gas=yes
1365 ;;
41e38a87 1366i[34567]86-*-rtems*)
f3449a3c 1367 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"
63abf89e 1368 tmake_file="${tmake_file} i386/t-rtems t-rtems"
bb607926 1369 ;;
14f27bc6 1370i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
c2e7ebeb 1371 tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file}"
6f5b6a64 1372 # Set default arch_32 to pentium4, tune_32 to generic like the other
1373 # i386 targets, although config.guess defaults to i386-pc-solaris2*.
05157f42 1374 case ${target} in
264a5d11 1375 *-*-solaris2.9*)
1376 # Solaris 9/x86 cannot execute SSE/SSE2 instructions by default.
949e49d0 1377 with_arch_32=${with_arch_32:-pentiumpro}
05157f42 1378 ;;
1379 *)
1380 with_arch_32=${with_arch_32:-pentium4}
1381 ;;
1382 esac
be67f556 1383 with_tune_32=${with_tune_32:-generic}
8fde03ba 1384 case ${target} in
517cabaa 1385 *-*-solaris2.1[0-9]*)
c2e7ebeb 1386 tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h"
27559c4e 1387 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
c2e7ebeb 1388 tmake_file="$tmake_file i386/t-sol2-64"
ed2b8f56 1389 need_64bit_isa=yes
a2e127ea 1390 case X"${with_cpu}" in
75eddf9a 1391 Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver2|Xbdver1|Xbtver2|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
a2e127ea 1392 ;;
1393 X)
f067c6b7 1394 if test x$with_cpu_64 = x; then
1395 with_cpu_64=generic
1396 fi
a2e127ea 1397 ;;
1398 *)
1399 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
75eddf9a 1400 echo "generic atom core2 corei7 corei7-avx nocona x86-64 bdver2 bdver1 btver2 btver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
a2e127ea 1401 exit 1
1402 ;;
1403 esac
27559c4e 1404 ;;
334c8279 1405 esac
bb607926 1406 ;;
2adf99fa 1407i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
2b90ba90 1408 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h vx-common.h"
2adf99fa 1409 case ${target} in
1410 *-vxworksae*)
c77a1c92 1411 tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
2adf99fa 1412 tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1413 ;;
1414 *)
c77a1c92 1415 tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
2adf99fa 1416 tmake_file="${tmake_file} i386/t-vxworks"
1417 ;;
1418 esac
d9799238 1419 ;;
17b3d2a8 1420i[34567]86-*-cygwin*)
615180dd 1421 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 1422 xm_file=i386/xm-cygwin.h
4dc4ff49 1423 tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
62b4d90e 1424 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
0c44645a 1425 extra_options="${extra_options} i386/cygming.opt"
6c1e551f 1426 extra_objs="winnt.o winnt-stubs.o"
2637551a 1427 c_target_objs="${c_target_objs} msformat-c.o"
1428 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
bb607926 1429 if test x$enable_threads = xyes; then
8728e49b 1430 thread_file='posix'
bb607926 1431 fi
615180dd 1432 use_gcc_stdint=wrap
bb607926 1433 ;;
c8c521bb 1434i[34567]86-*-mingw* | x86_64-*-mingw*)
b550f036 1435 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
e1688c3e 1436 xm_file=i386/xm-mingw32.h
a4f7c8f7 1437 case ${target} in
1438 x86_64-*-* | *-w64-*)
ed2b8f56 1439 need_64bit_isa=yes
a4f7c8f7 1440 ;;
1441 *)
1442 ;;
1443 esac
b550f036 1444 if test x$enable_threads = xposix ; then
1445 tm_file="${tm_file} i386/mingw-pthread.h"
1446 fi
1447 tm_file="${tm_file} i386/mingw32.h"
72f432d4 1448 # This makes the logic if mingw's or the w64 feature set has to be used
1449 case ${target} in
1450 *-w64-*)
ac0366be 1451 user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1452 user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
72f432d4 1453 tm_file="${tm_file} i386/mingw-w64.h"
a4f7c8f7 1454 if test x$enable_targets = xall; then
1455 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1456 case X"${with_cpu}" in
75eddf9a 1457 Xgeneric|Xatom|Xcore2|Xcorei7|Xcorei7-avx|Xnocona|Xx86-64|Xbdver2|Xbdver1|Xbtver2|Xbtver1|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
a4f7c8f7 1458 ;;
1459 X)
1460 if test x$with_cpu_64 = x; then
1461 with_cpu_64=generic
1462 fi
1463 ;;
1464 *)
1465 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
75eddf9a 1466 echo "generic atom core2 corei7 Xcorei7-avx nocona x86-64 bdver2 bdver1 btver2 btver1 amdfam10 barcelona k8 opteron athlon64 athlon-fx athlon64-sse3 k8-sse3 opteron-sse3" 1>&2
a4f7c8f7 1467 exit 1
1468 ;;
1469 esac
1470 fi
72f432d4 1471 ;;
1472 *)
72f432d4 1473 ;;
1474 esac
1475 tm_file="${tm_file} i386/mingw-stdint.h"
a997b0d8 1476 tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
0767c2a8 1477 case ${target} in
aca9e986 1478 x86_64-w64-*)
0767c2a8 1479 tmake_file="${tmake_file} i386/t-mingw-w64"
1480 ;;
aca9e986 1481 i[34567]86-w64-*)
1482 tmake_file="${tmake_file} i386/t-mingw-w32"
1483 ;;
0767c2a8 1484 esac
638454a1 1485 native_system_header_dir=/mingw/include
62b4d90e 1486 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
78e16ab5 1487 extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
72f432d4 1488 case ${target} in
1489 *-w64-*)
1490 extra_options="${extra_options} i386/mingw-w64.opt"
1491 ;;
1492 *)
1493 ;;
1494 esac
6c1e551f 1495 extra_objs="winnt.o winnt-stubs.o"
46f8e3b0 1496 c_target_objs="${c_target_objs} msformat-c.o"
1497 cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
8ffcff2e 1498 gas=yes
1499 gnu_ld=yes
d91ef9b0 1500 default_use_cxa_atexit=yes
8953973a 1501 use_gcc_stdint=wrap
c89ba7eb 1502 case ${enable_threads} in
4dc4ff49 1503 "" | yes | win32)
1504 thread_file='win32'
b550f036 1505 ;;
1506 posix)
1507 thread_file='posix'
b550f036 1508 ;;
c89ba7eb 1509 esac
c8c521bb 1510 case ${target} in
1511 *mingw32crt*)
1512 tm_file="${tm_file} i386/crtdll.h"
1513 ;;
1514 *mingw32msv* | *mingw*)
170a37e8 1515 ;;
bb607926 1516 esac
1517 ;;
af8e12d0 1518i[34567]86-*-interix[3-9]*)
1519 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h"
46f8e3b0 1520 tmake_file="${tmake_file} i386/t-interix"
af8e12d0 1521 extra_options="${extra_options} rpath.opt i386/interix.opt"
1522 extra_objs="winnt.o winnt-stubs.o"
62b4d90e 1523 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
49d31318 1524 if test x$enable_threads = xyes ; then
1525 thread_file='posix'
1526 fi
1527 if test x$stabs = xyes ; then
1528 tm_file="${tm_file} dbxcoff.h"
1529 fi
1530 ;;
bb607926 1531ia64*-*-elf*)
f3449a3c 1532 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
bb607926 1533 tmake_file="ia64/t-ia64"
1534 target_cpu_default="0"
1535 if test x$gas = xyes
1536 then
1537 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1538 fi
1539 if test x$gnu_ld = xyes
1540 then
1541 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1542 fi
bb607926 1543 ;;
49b2e77d 1544ia64*-*-freebsd*)
0670e09b 1545 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
49b2e77d 1546 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1547 tmake_file="${tmake_file} ia64/t-ia64"
49b2e77d 1548 ;;
bb607926 1549ia64*-*-linux*)
deb14f24 1550 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
a997b0d8 1551 tmake_file="${tmake_file} ia64/t-ia64 t-libunwind"
bb607926 1552 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
bb607926 1553 ;;
d838d791 1554ia64*-*-hpux*)
73f49bc2 1555 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
a997b0d8 1556 tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
d838d791 1557 target_cpu_default="MASK_GNU_AS"
120a2fed 1558 case x$enable_threads in
c5e978ad 1559 x | xyes | xposix )
120a2fed 1560 thread_file=posix
1561 ;;
1562 esac
297cec9a 1563 use_collect2=no
23ebf0fe 1564 c_target_objs="ia64-c.o"
1565 cxx_target_objs="ia64-c.o"
593c1adb 1566 extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
43cb9222 1567 use_gcc_stdint=wrap
1568 tm_file="${tm_file} hpux-stdint.h"
637c9296 1569 case ${target} in
1570 *-*-hpux11.3*)
1571 tm_file="${tm_file} ia64/hpux-unix2003.h"
1572 ;;
1573 esac
d838d791 1574 ;;
9b9a2528 1575ia64-hp-*vms*)
8f852c44 1576 tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
1577 tmake_file="${tmake_file} ia64/t-ia64"
9b9a2528 1578 target_cpu_default="0"
1579 if test x$gas = xyes
1580 then
1581 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1582 fi
b0a47c39 1583 extra_options="${extra_options} ia64/vms.opt"
9b9a2528 1584 ;;
54f12d76 1585iq2000*-*-elf*)
773dfb93 1586 tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
54f12d76 1587 out_file=iq2000/iq2000.c
54f12d76 1588 md_file=iq2000/iq2000.md
1589 ;;
f6fe91e8 1590lm32-*-elf*)
1591 tm_file="dbxelf.h elfos.h ${tm_file}"
84600db5 1592 tmake_file="${tmake_file} lm32/t-lm32"
f6fe91e8 1593 ;;
431df6da 1594lm32-*-rtems*)
b4cebe6e 1595 tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
84600db5 1596 tmake_file="${tmake_file} lm32/t-lm32"
431df6da 1597 tmake_file="${tmake_file} t-rtems"
72f8e79f 1598 tmake_file="${tmake_file} lm32/t-rtems"
431df6da 1599 ;;
f6fe91e8 1600lm32-*-uclinux*)
deb14f24 1601 tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
84600db5 1602 tmake_file="${tmake_file} lm32/t-lm32"
f6fe91e8 1603 ;;
bb607926 1604m32r-*-elf*)
c876b1f0 1605 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
19cd32af 1606 ;;
467dc9aa 1607m32rle-*-elf*)
c876b1f0 1608 tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
467dc9aa 1609 ;;
e4c85211 1610m32r-*-rtems*)
c876b1f0 1611 tm_file="dbxelf.h elfos.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
e4c85211 1612 tmake_file="m32r/t-m32r t-rtems"
e4c85211 1613 ;;
467dc9aa 1614m32r-*-linux*)
deb14f24 1615 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
1afa774a 1616 # We override the tmake_file for linux -- why?
a997b0d8 1617 tmake_file="m32r/t-linux t-slibgcc"
467dc9aa 1618 gnu_ld=yes
467dc9aa 1619 if test x$enable_threads = xyes; then
1620 thread_file='posix'
1621 fi
1622 ;;
1623m32rle-*-linux*)
deb14f24 1624 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
1afa774a 1625 # We override the tmake_file for linux -- why?
a997b0d8 1626 tmake_file="m32r/t-linux t-slibgcc"
467dc9aa 1627 gnu_ld=yes
467dc9aa 1628 if test x$enable_threads = xyes; then
1629 thread_file='posix'
1630 fi
1631 ;;
6af9f7ea 1632m68k-*-elf* | fido-*-elf*)
278e2fd1 1633 case ${target} in
1634 fido-*-elf*)
1635 # Check that $with_cpu makes sense.
1636 case $with_cpu in
1637 "" | "fidoa")
1638 ;;
1639 *)
1640 echo "Cannot accept --with-cpu=$with_cpu"
1641 exit 1
1642 ;;
1643 esac
1644 with_cpu=fidoa
1645 ;;
1646 *)
1647 default_m68k_cpu=68020
1648 default_cf_cpu=5206
1649 ;;
1650 esac
f3449a3c 1651 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 1652 tm_defines="${tm_defines} MOTOROLA=1"
278e2fd1 1653 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1654 # Add multilibs for targets other than fido.
1655 case ${target} in
1656 fido-*-elf*)
1657 ;;
1658 *)
1659 tmake_file="$tmake_file m68k/t-mlibs"
1660 ;;
1661 esac
bb607926 1662 ;;
6af9f7ea 1663m68k*-*-netbsdelf*)
f84195ec 1664 default_m68k_cpu=68020
558b196a 1665 default_cf_cpu=5475
124c3198 1666 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
f466b0a0 1667 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
99570287 1668 tm_defines="${tm_defines} MOTOROLA=1"
124c3198 1669 ;;
984408e9 1670m68k*-*-openbsd*)
f84195ec 1671 default_m68k_cpu=68020
558b196a 1672 default_cf_cpu=5475
984408e9 1673 # needed to unconfuse gdb
f84195ec 1674 tm_defines="${tm_defines} OBSD_OLD_GAS"
8e6600a1 1675 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1a0fb050 1676 extra_options="${extra_options} openbsd.opt"
237490bf 1677 tmake_file="t-openbsd m68k/t-openbsd"
984408e9 1678 # we need collect2 until our bug is fixed...
1679 use_collect2=yes
1680 ;;
8bc67792 1681m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
1682 # with uClibc, using the new GNU/Linux-style
1683 # ABI.
f84195ec 1684 default_m68k_cpu=68020
558b196a 1685 default_cf_cpu=5206
deb14f24 1686 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 1687 extra_options="${extra_options} m68k/uclinux.opt"
d9993a19 1688 tm_defines="${tm_defines} MOTOROLA=1"
558b196a 1689 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
13285dde 1690 ;;
237490bf 1691m68k-*-linux*) # Motorola m68k's running GNU/Linux
bb607926 1692 # with ELF format using glibc 2
1693 # aka the GNU/Linux C library 6.
f84195ec 1694 default_m68k_cpu=68020
558b196a 1695 default_cf_cpu=5475
27f1c610 1696 with_arch=${with_arch:-m68k}
deb14f24 1697 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
fbdd0521 1698 extra_options="${extra_options} m68k/ieee.opt"
99570287 1699 tm_defines="${tm_defines} MOTOROLA=1"
27f1c610 1700 tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
bb607926 1701 ;;
41e38a87 1702m68k-*-rtems*)
f84195ec 1703 default_m68k_cpu=68020
558b196a 1704 default_cf_cpu=5206
1705 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems m68k/t-mlibs"
f3449a3c 1706 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 1707 tm_defines="${tm_defines} MOTOROLA=1"
bb607926 1708 ;;
bb607926 1709mcore-*-elf)
7916fcc3 1710 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
bb607926 1711 tmake_file=mcore/t-mcore
58a8c75f 1712 inhibit_libc=true
bb607926 1713 ;;
46222c18 1714mep-*-*)
9ddc64c8 1715 tm_file="dbxelf.h elfos.h ${tm_file}"
46222c18 1716 tmake_file=mep/t-mep
46222c18 1717 c_target_objs="mep-pragma.o"
1718 cxx_target_objs="mep-pragma.o"
1719 if test -d "${srcdir}/../newlib/libc/include" &&
1720 test "x$with_headers" = x; then
1721 with_headers=yes
1722 fi
1723 use_gcc_stdint=wrap
1724 ;;
d34b0d1e 1725microblaze*-linux*)
deb14f24 1726 tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
d34b0d1e 1727 c_target_objs="${c_target_objs} microblaze-c.o"
1728 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
d34b0d1e 1729 ;;
ff219786 1730microblaze*-*-rtems*)
1731 tm_file="${tm_file} dbxelf.h"
1732 tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
1733 c_target_objs="${c_target_objs} microblaze-c.o"
1734 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1735 tmake_file="${tmake_file} microblaze/t-microblaze"
1736 tmake_file="${tmake_file} t-rtems microblaze/t-rtems"
1737 ;;
d34b0d1e 1738microblaze*-*-*)
1739 tm_file="${tm_file} dbxelf.h"
1740 c_target_objs="${c_target_objs} microblaze-c.o"
1741 cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1742 tmake_file="${tmake_file} microblaze/t-microblaze"
1743 ;;
4ace673e 1744mips*-*-netbsd*) # NetBSD/mips, either endian.
b93bf04a 1745 target_cpu_default="MASK_ABICALLS"
0ac7fc08 1746 tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
f466b0a0 1747 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
bb607926 1748 ;;
32108f3d 1749mips*-mti-linux*)
1750 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h mips/mti-linux.h"
1751 tmake_file="${tmake_file} mips/t-mti-linux"
1752 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1753 gnu_ld=yes
1754 gas=yes
1755 test x$with_llsc != x || with_llsc=yes
1756 ;;
606c99b0 1757mips64*-*-linux* | mipsisa64*-*-linux*)
f5dfbb10 1758 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h"
9213d2eb 1759 tmake_file="${tmake_file} mips/t-linux64"
42102a26 1760 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
69f36814 1761 case ${target} in
1762 mips64el-st-linux-gnu)
1763 tm_file="${tm_file} mips/st.h"
1764 tmake_file="${tmake_file} mips/t-st"
1765 ;;
fc84efeb 1766 mips64octeon*-*-linux*)
1767 tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
1768 target_cpu_default=MASK_SOFT_FLOAT_ABI
1769 ;;
606c99b0 1770 mipsisa64r2*-*-linux*)
1771 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1772 ;;
69f36814 1773 esac
d0faeb9d 1774 gnu_ld=yes
1775 gas=yes
bc4c18f7 1776 test x$with_llsc != x || with_llsc=yes
d0faeb9d 1777 ;;
bb607926 1778mips*-*-linux*) # Linux MIPS, either endian.
1f796f40 1779 tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h"
b167b87f 1780 if test x$enable_targets = xall; then
17c6be22 1781 tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
b167b87f 1782 tmake_file="${tmake_file} mips/t-linux64"
b167b87f 1783 fi
f5dfbb10 1784 tm_file="${tm_file} mips/linux-common.h"
09c6646e 1785 case ${target} in
487874ac 1786 mipsisa32r2*)
1787 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
613a38b0 1788 ;;
487874ac 1789 mipsisa32*)
1790 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
613a38b0 1791 esac
bc4c18f7 1792 test x$with_llsc != x || with_llsc=yes
bb607926 1793 ;;
eceb106a 1794mips*-mti-elf*)
1795 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h mips/mti-elf.h"
1796 tmake_file="mips/t-mti-elf"
1797 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1798 ;;
5aeba334 1799mips*-sde-elf*)
f3449a3c 1800 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h"
9213d2eb 1801 tmake_file="mips/t-sde"
0b1d266f 1802 extra_options="${extra_options} mips/sde.opt"
68c9bc25 1803 case "${with_newlib}" in
1804 yes)
1805 # newlib / libgloss.
1806 ;;
1807 *)
1808 # MIPS toolkit libraries.
1809 tm_file="$tm_file mips/sdemtk.h"
1810 tmake_file="$tmake_file mips/t-sdemtk"
68c9bc25 1811 case ${enable_threads} in
1812 "" | yes | mipssde)
1813 thread_file='mipssde'
1814 ;;
1815 esac
1816 ;;
1817 esac
5aeba334 1818 case ${target} in
1819 mipsisa32r2*)
1820 tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1821 ;;
1822 mipsisa32*)
1823 tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
1824 ;;
77a32a8e 1825 mipsisa64r2*)
1826 tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
1827 ;;
5aeba334 1828 mipsisa64*)
1829 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
1830 ;;
1831 esac
1832 ;;
7583e786 1833mipsisa32-*-elf* | mipsisa32el-*-elf* | \
1834mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
77a32a8e 1835mipsisa64-*-elf* | mipsisa64el-*-elf* | \
1836mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
f3449a3c 1837 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 1838 tmake_file="mips/t-isa3264"
7583e786 1839 case ${target} in
1840 mipsisa32r2*)
1841 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1842 ;;
1843 mipsisa32*)
1844 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1845 ;;
77a32a8e 1846 mipsisa64r2*)
1847 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1848 ;;
7583e786 1849 mipsisa64*)
1850 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
1851 ;;
1852 esac
1853 case ${target} in
1854 mipsisa32*-*-elfoabi*)
1855 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
1856 tm_file="${tm_file} mips/elfoabi.h"
1857 ;;
1858 mipsisa64*-*-elfoabi*)
1859 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
1860 tm_file="${tm_file} mips/elfoabi.h"
1861 ;;
1862 *-*-elf*)
1863 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1864 ;;
1865 esac
5381547d 1866 ;;
2857c21b 1867mipsisa64sr71k-*-elf*)
f3449a3c 1868 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2857c21b 1869 tmake_file=mips/t-sr71k
b93bf04a 1870 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
515fdcc2 1871 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2857c21b 1872 ;;
19c56034 1873mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
f3449a3c 1874 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 1875 tmake_file="mips/t-elf mips/t-sb1"
b93bf04a 1876 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
515fdcc2 1877 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
19c56034 1878 ;;
f4deb416 1879mips-*-elf* | mipsel-*-elf*)
f3449a3c 1880 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 1881 tmake_file="mips/t-elf"
bb607926 1882 ;;
f4deb416 1883mips64-*-elf* | mips64el-*-elf*)
f3449a3c 1884 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
9213d2eb 1885 tmake_file="mips/t-elf"
b93bf04a 1886 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
515fdcc2 1887 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
bb607926 1888 ;;
2857c21b 1889mips64vr-*-elf* | mips64vrel-*-elf*)
f3449a3c 1890 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
2857c21b 1891 tmake_file=mips/t-vr
9d463647 1892 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2857c21b 1893 ;;
f4deb416 1894mips64orion-*-elf* | mips64orionel-*-elf*)
f3449a3c 1895 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
9213d2eb 1896 tmake_file="mips/t-elf"
b93bf04a 1897 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
515fdcc2 1898 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
bb607926 1899 ;;
742d48c2 1900mips*-*-rtems*)
f3449a3c 1901 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
9213d2eb 1902 tmake_file="mips/t-elf t-rtems mips/t-rtems"
bb607926 1903 ;;
d9799238 1904mips-wrs-vxworks)
e49cee06 1905 tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
d9799238 1906 tmake_file="${tmake_file} mips/t-vxworks"
d9799238 1907 ;;
f4deb416 1908mipstx39-*-elf* | mipstx39el-*-elf*)
f3449a3c 1909 tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
9213d2eb 1910 tmake_file="mips/t-r3900"
bb607926 1911 ;;
68cbb7e3 1912mmix-knuth-mmixware)
f3449a3c 1913 tm_file="${tm_file} newlib-stdint.h"
805e22b2 1914 need_64bit_hwint=yes
f3449a3c 1915 use_gcc_stdint=wrap
68cbb7e3 1916 ;;
bb607926 1917mn10300-*-*)
05381348 1918 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
bb607926 1919 if test x$stabs = xyes
1920 then
1921 tm_file="${tm_file} dbx.h"
1922 fi
1923 use_collect2=no
f3449a3c 1924 use_gcc_stdint=wrap
bb607926 1925 ;;
bb607926 1926pdp11-*-*)
f3449a3c 1927 tm_file="${tm_file} newlib-stdint.h"
1928 use_gcc_stdint=wrap
bb607926 1929 ;;
8372e9ea 1930picochip-*)
f3449a3c 1931 tm_file="${tm_file} newlib-stdint.h"
1932 use_gcc_stdint=wrap
2bd3350b 1933 tmake_file="picochip/t-picochip t-pnt16-warn"
8372e9ea 1934 ;;
0ac7fc08 1935# port not yet contributed
1936#powerpc-*-openbsd*)
a23b9c51 1937# tmake_file="${tmake_file} rs6000/t-fprules"
0ac7fc08 1938# extra_headers=
1939# ;;
17ac16a1 1940powerpc-*-darwin*)
16ac04e7 1941 extra_options="${extra_options} rs6000/darwin.opt"
8949381a 1942 case ${target} in
9b1f316f 1943 *-darwin1[0-9]* | *-darwin[8-9]*)
3ebc7dec 1944 tmake_file="${tmake_file} rs6000/t-darwin8"
9b1f316f 1945 tm_file="${tm_file} rs6000/darwin8.h"
1946 ;;
1947 *-darwin7*)
1948 tm_file="${tm_file} rs6000/darwin7.h"
1949 ;;
1950 *-darwin[0-6]*)
1951 ;;
8949381a 1952 esac
a997b0d8 1953 tmake_file="${tmake_file} t-slibgcc"
25b7153e 1954 extra_headers=altivec.h
17ac16a1 1955 ;;
84eba009 1956powerpc64-*-darwin*)
84eba009 1957 extra_options="${extra_options} ${cpu_type}/darwin.opt"
a997b0d8 1958 tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
191bb103 1959 tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
84eba009 1960 extra_headers=altivec.h
1961 ;;
2ac000bb 1962powerpc*-*-freebsd*)
1963 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h"
16ac04e7 1964 extra_options="${extra_options} rs6000/sysv4.opt"
2ac000bb 1965 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
c2bac6b7 1966 case ${target} in
2ac000bb 1967 powerpc64*)
1968 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
1969 tmake_file="${tmake_file} rs6000/t-freebsd64"
1970 extra_options="${extra_options} rs6000/linux64.opt"
1971 ;;
1972 *)
1973 tm_file="${tm_file} rs6000/freebsd.h"
1974 ;;
1975 esac
327811ee 1976 ;;
93006578 1977powerpc-*-netbsd*)
5eeaefac 1978 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
f466b0a0 1979 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
5eeaefac 1980 tmake_file="${tmake_file} rs6000/t-netbsd"
16ac04e7 1981 extra_options="${extra_options} rs6000/sysv4.opt"
93006578 1982 ;;
6f0a80d3 1983powerpc-*-eabispe*)
de784bee 1984 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabispe.h"
16ac04e7 1985 extra_options="${extra_options} rs6000/sysv4.opt"
79bbdafd 1986 tmake_file="rs6000/t-spe rs6000/t-ppccomm"
f3449a3c 1987 use_gcc_stdint=wrap
6f0a80d3 1988 ;;
bbf524e7 1989powerpc-*-eabisimaltivec*)
de784bee 1990 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h rs6000/eabialtivec.h"
16ac04e7 1991 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 1992 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
f3449a3c 1993 use_gcc_stdint=wrap
bbf524e7 1994 ;;
bb607926 1995powerpc-*-eabisim*)
de784bee 1996 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
16ac04e7 1997 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 1998 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
f3449a3c 1999 use_gcc_stdint=wrap
bb607926 2000 ;;
2001powerpc-*-elf*)
de784bee 2002 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
16ac04e7 2003 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2004 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 2005 ;;
553c09a8 2006powerpc-*-eabialtivec*)
de784bee 2007 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabialtivec.h"
16ac04e7 2008 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2009 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
f3449a3c 2010 use_gcc_stdint=wrap
553c09a8 2011 ;;
3f5debcf 2012powerpc-xilinx-eabi*)
de784bee 2013 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h rs6000/xilinx.h"
8119d935 2014 extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
a23b9c51 2015 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
f3449a3c 2016 use_gcc_stdint=wrap
3f5debcf 2017 ;;
bb607926 2018powerpc-*-eabi*)
de784bee 2019 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
16ac04e7 2020 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2021 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
f3449a3c 2022 use_gcc_stdint=wrap
bb607926 2023 ;;
2024powerpc-*-rtems*)
de784bee 2025 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
16ac04e7 2026 extra_options="${extra_options} rs6000/sysv4.opt"
a23b9c51 2027 tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
bb607926 2028 ;;
4e5e2802 2029powerpc-*-linux* | powerpc64-*-linux*)
de784bee 2030 tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
16ac04e7 2031 extra_options="${extra_options} rs6000/sysv4.opt"
17aa03f5 2032 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
8d40ea45 2033 maybe_biarch=yes
2034 case ${target} in
4e5e2802 2035 powerpc64-*-linux*spe* | powerpc64-*-linux*paired*)
2036 echo "*** Configuration ${target} not supported" 1>&2
2037 exit 1
2038 ;;
8d40ea45 2039 powerpc-*-linux*spe* | powerpc-*-linux*paired*)
4e5e2802 2040 maybe_biarch=
2041 ;;
2042 powerpc64-*-linux*)
2043 test x$with_cpu != x || cpu_is_64bit=yes
50ec89c7 2044 maybe_biarch=always
4e5e2802 2045 ;;
8d40ea45 2046 esac
2047 case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
50ec89c7 2048 always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
cc5ffbb8 2049 if test x$cpu_is_64bit = xyes; then
2050 tm_file="${tm_file} rs6000/default64.h"
2051 fi
f3449a3c 2052 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
cc5ffbb8 2053 tmake_file="$tmake_file rs6000/t-linux64"
e168332d 2054 extra_options="${extra_options} rs6000/linux64.opt"
cc5ffbb8 2055 ;;
2056 *)
f3449a3c 2057 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
cc5ffbb8 2058 ;;
2059 esac
8d40ea45 2060 case ${target} in
fef79628 2061 powerpc*-*-linux*ppc476*)
2062 tm_file="${tm_file} rs6000/476.h"
2063 extra_options="${extra_options} rs6000/476.opt" ;;
8d40ea45 2064 powerpc*-*-linux*altivec*)
2065 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2066 powerpc*-*-linux*spe*)
2067 tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2068 powerpc*-*-linux*paired*)
2069 tm_file="${tm_file} rs6000/750cl.h" ;;
2070 esac
197f58fa 2071 if test x${enable_secureplt} = xyes; then
2072 tm_file="rs6000/secureplt.h ${tm_file}"
2073 fi
bb607926 2074 ;;
e6eccdb3 2075powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
de784bee 2076 tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
a23b9c51 2077 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
16ac04e7 2078 extra_options="${extra_options} rs6000/sysv4.opt"
805e22b2 2079 extra_headers=ppc-asm.h
e6eccdb3 2080 case ${target} in
2081 *-vxworksae*)
a19f368c 2082 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h"
e6eccdb3 2083 tmake_file="${tmake_file} rs6000/t-vxworksae"
2084 ;;
2085 *-vxworks*)
7c69b636 2086 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
e6eccdb3 2087 ;;
2088 esac
805e22b2 2089 ;;
d895dbf9 2090powerpc-*-lynxos*)
2091 xm_defines=POSIX
2092 tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2093 tmake_file="t-lynx rs6000/t-lynx"
16ac04e7 2094 extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
d895dbf9 2095 thread_file=lynx
2096 gnu_ld=yes
2097 gas=yes
2098 ;;
bb607926 2099powerpcle-*-elf*)
de784bee 2100 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
a23b9c51 2101 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
16ac04e7 2102 extra_options="${extra_options} rs6000/sysv4.opt"
bb607926 2103 ;;
2104powerpcle-*-eabisim*)
de784bee 2105 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
a23b9c51 2106 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
16ac04e7 2107 extra_options="${extra_options} rs6000/sysv4.opt"
f3449a3c 2108 use_gcc_stdint=wrap
bb607926 2109 ;;
2110powerpcle-*-eabi*)
de784bee 2111 tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h"
a23b9c51 2112 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
16ac04e7 2113 extra_options="${extra_options} rs6000/sysv4.opt"
f3449a3c 2114 use_gcc_stdint=wrap
bb607926 2115 ;;
bb607926 2116rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
b5e8a0bc 2117 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
a997b0d8 2118 tmake_file="rs6000/t-aix43 t-slibgcc"
a8bb341c 2119 extra_options="${extra_options} rs6000/aix64.opt"
bb607926 2120 use_collect2=yes
2121 thread_file='aix'
b5e8a0bc 2122 use_gcc_stdint=provide
83287f80 2123 extra_headers=
bb607926 2124 ;;
b1974978 2125rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
b5e8a0bc 2126 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
a8bb341c 2127 extra_options="${extra_options} rs6000/aix64.opt"
a997b0d8 2128 tmake_file="rs6000/t-aix43 t-slibgcc"
bb607926 2129 use_collect2=yes
2130 thread_file='aix'
b5e8a0bc 2131 use_gcc_stdint=wrap
83287f80 2132 extra_headers=
bb607926 2133 ;;
d4115f8c 2134rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
b5e8a0bc 2135 tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
a997b0d8 2136 tmake_file="rs6000/t-aix52 t-slibgcc"
a8bb341c 2137 extra_options="${extra_options} rs6000/aix64.opt"
b1974978 2138 use_collect2=yes
2139 thread_file='aix'
b5e8a0bc 2140 use_gcc_stdint=wrap
b1974978 2141 extra_headers=
2142 ;;
0cc77516 2143rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
b5e8a0bc 2144 tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
a997b0d8 2145 tmake_file="rs6000/t-aix52 t-slibgcc"
d4115f8c 2146 extra_options="${extra_options} rs6000/aix64.opt"
2147 use_collect2=yes
2148 thread_file='aix'
b5e8a0bc 2149 use_gcc_stdint=wrap
4b39bf76 2150 extra_headers=altivec.h
d4115f8c 2151 ;;
0cc77516 2152rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
b5e8a0bc 2153 tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
a997b0d8 2154 tmake_file="rs6000/t-aix52 t-slibgcc"
0cc77516 2155 extra_options="${extra_options} rs6000/aix64.opt"
2156 use_collect2=yes
2157 thread_file='aix'
b5e8a0bc 2158 use_gcc_stdint=wrap
0cc77516 2159 extra_headers=altivec.h
2160 ;;
78e515f7 2161rl78-*-elf*)
2162 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2163 target_has_targetm_common=no
2164 c_target_objs="rl78-c.o"
2165 cxx_target_objs="rl78-c.o"
2166 tmake_file="${tmake_file} rl78/t-rl78"
2167 ;;
24833e1a 2168rx-*-elf*)
3be74046 2169 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
24833e1a 2170 tmake_file="${tmake_file} rx/t-rx"
2171 ;;
582b17a6 2172s390-*-linux*)
fcddec9f 2173 default_gnu_indirect_function=yes
deb14f24 2174 tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
5cd72ba2 2175 if test x$enable_targets = xall; then
2176 tmake_file="${tmake_file} s390/t-linux64"
2177 fi
346e8a0c 2178 ;;
582b17a6 2179s390x-*-linux*)
fcddec9f 2180 default_gnu_indirect_function=yes
deb14f24 2181 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
48de175f 2182 tm_p_file=s390/s390-protos.h
2183 md_file=s390/s390.md
b5ccaa7b 2184 extra_modes=s390/s390-modes.def
48de175f 2185 out_file=s390/s390.c
e38fe738 2186 tmake_file="${tmake_file} s390/t-linux64"
346e8a0c 2187 ;;
7c1f201b 2188s390x-ibm-tpf*)
7966af2d 2189 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
9f88bc9d 2190 tm_p_file=s390/s390-protos.h
2191 md_file=s390/s390.md
2192 extra_modes=s390/s390-modes.def
2193 out_file=s390/s390.c
9f88bc9d 2194 thread_file='tpf'
2195 extra_options="${extra_options} s390/tpf.opt"
7c1f201b 2196 ;;
3dbfe3e4 2197score-*-elf)
b8e22756 2198 gas=yes
2199 gnu_ld=yes
f3449a3c 2200 tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
3dbfe3e4 2201 ;;
6af9f7ea 2202sh-*-elf* | sh[12346l]*-*-elf* | \
ccf1c0f1 2203 sh-*-linux* | sh[2346lbe]*-*-linux* | \
07168dd9 2204 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
237490bf 2205 sh64-*-netbsd* | sh64l*-*-netbsd*)
07168dd9 2206 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2207 if test x${with_endian} = x; then
2208 case ${target} in
2209 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2210 shbe-*-* | sheb-*-*) with_endian=big,little ;;
2211 sh[1234]l* | sh[34]*-*-linux*) with_endian=little ;;
2212 shl* | sh64l* | sh*-*-linux* | \
2213 sh5l* | sh-superh-elf) with_endian=little,big ;;
2214 sh[1234]*-*-*) with_endian=big ;;
2215 *) with_endian=big,little ;;
2216 esac
2217 fi
f555bf81 2218 # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2219 # First word : the default endian.
2220 # Second word: the secondary endian (optional).
07168dd9 2221 case ${with_endian} in
f555bf81 2222 big) TM_ENDIAN_CONFIG=mb ;;
2223 little) TM_ENDIAN_CONFIG=ml ;;
2224 big,little) TM_ENDIAN_CONFIG="mb ml" ;;
2225 little,big) TM_ENDIAN_CONFIG="ml mb" ;;
07168dd9 2226 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
2227 esac
2228 case ${with_endian} in
2229 little*) tm_file="sh/little.h ${tm_file}" ;;
2230 esac
9bc320a5 2231 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
09c6646e 2232 case ${target} in
07168dd9 2233 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
deb14f24 2234 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
f466b0a0 2235 sh*-*-netbsd*)
2236 tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h"
2237 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2238
2239 ;;
cfcf8539 2240 sh*-superh-elf) if test x$with_libgloss != xno; then
2241 with_libgloss=yes
2242 tm_file="${tm_file} sh/newlib.h"
2243 fi
0e6b6360 2244 tm_file="${tm_file} sh/embed-elf.h"
cfcf8539 2245 tm_file="${tm_file} sh/superh.h"
cfcf8539 2246 extra_options="${extra_options} sh/superh.opt" ;;
65a1f1e9 2247 *) if test x$with_newlib = xyes \
2248 && test x$with_libgloss = xyes; then
2249 tm_file="${tm_file} sh/newlib.h"
2250 fi
2251 tm_file="${tm_file} sh/embed-elf.h" ;;
07168dd9 2252 esac
2253 case ${target} in
2254 sh5*-*-netbsd*)
2255 # SHmedia, 32-bit ABI
4dc4ff49 2256 tmake_file="${tmake_file} sh/t-sh64"
07168dd9 2257 ;;
2258 sh64*-netbsd*)
2259 # SHmedia, 64-bit ABI
4dc4ff49 2260 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5-64"
07168dd9 2261 ;;
2262 *-*-netbsd)
07168dd9 2263 ;;
2264 sh64*-*-linux*)
237490bf 2265 tmake_file="${tmake_file} sh/t-sh64"
07168dd9 2266 tm_file="${tm_file} sh/sh64.h"
2267 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2268 ;;
febf5bcd 2269 sh64*)
2270 tmake_file="${tmake_file} sh/t-sh64"
2271 tm_file="${tm_file} sh/sh64.h"
50147a3f 2272 if test x$with_newlib = xyes; then
2273 tm_file="${tm_file} newlib-stdint.h"
2274 fi
febf5bcd 2275 extra_headers="shmedia.h ushmedia.h sshmedia.h"
febf5bcd 2276 ;;
f3449a3c 2277 *-*-elf*)
2278 tm_file="${tm_file} newlib-stdint.h"
2279 ;;
493914a8 2280 esac
07168dd9 2281 # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2282 case `echo ${target} | sed 's/e[lb]-/-/'` in
2283 sh64*-*-netbsd*) sh_cpu_target=sh5-64media ;;
2284 sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
9435e831 2285 sh4a_single_only*) sh_cpu_target=sh4a-single-only ;;
2286 sh4a_single*) sh_cpu_target=sh4a-single ;;
2287 sh4a_nofpu*) sh_cpu_target=sh4a-nofpu ;;
2288 sh4al) sh_cpu_target=sh4al ;;
2289 sh4a*) sh_cpu_target=sh4a ;;
07168dd9 2290 sh4_single_only*) sh_cpu_target=sh4-single-only ;;
2291 sh4_single*) sh_cpu_target=sh4-single ;;
2292 sh4_nofpu*) sh_cpu_target=sh4-nofpu ;;
2293 sh4* | sh-superh-*) sh_cpu_target=sh4 ;;
2294 sh3e*) sh_cpu_target=sh3e ;;
2295 sh*-*-netbsd* | sh3*) sh_cpu_target=sh3 ;;
7105fb72 2296 sh2a_single_only*) sh_cpu_target=sh2a-single-only ;;
2297 sh2a_single*) sh_cpu_target=sh2a-single ;;
2298 sh2a_nofpu*) sh_cpu_target=sh2a-nofpu ;;
2299 sh2a*) sh_cpu_target=sh2a ;;
07168dd9 2300 sh2e*) sh_cpu_target=sh2e ;;
2301 sh2*) sh_cpu_target=sh2 ;;
2302 *) sh_cpu_target=sh1 ;;
aa76b2b5 2303 esac
65a1f1e9 2304 # did the user say --without-fp ?
2305 if test x$with_fp = xno; then
2306 case ${sh_cpu_target} in
2307 sh5-*media) sh_cpu_target=${sh_cpu_target}-nofpu ;;
2308 sh4al | sh1) ;;
2309 sh4a* ) sh_cpu_target=sh4a-nofpu ;;
2310 sh4*) sh_cpu_target=sh4-nofpu ;;
2311 sh3*) sh_cpu_target=sh3 ;;
2312 sh2a*) sh_cpu_target=sh2a-nofpu ;;
2313 sh2*) sh_cpu_target=sh2 ;;
2314 *) echo --without-fp not available for $target: ignored
2315 esac
2316 tm_defines="$tm_defines STRICT_NOFPU=1"
2317 fi
07168dd9 2318 sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2319 case $sh_cpu_default in
2320 sh5-64media-nofpu | sh5-64media | \
2321 sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
7105fb72 2322 sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
9435e831 2323 sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
99b0f6d9 2324 sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
eb4e5153 2325 sh3e | sh3 | sh2e | sh2 | sh1) ;;
07168dd9 2326 "") sh_cpu_default=${sh_cpu_target} ;;
2327 *) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
febf5bcd 2328 esac
07168dd9 2329 sh_multilibs=${with_multilib_list}
f555bf81 2330 if test "$sh_multilibs" = "default" ; then
07168dd9 2331 case ${target} in
65a1f1e9 2332 sh64-superh-linux* | \
07168dd9 2333 sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
2334 sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2335 sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2336 sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
2337 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
7105fb72 2338 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
07168dd9 2339 esac
65a1f1e9 2340 if test x$with_fp = xno; then
2341 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`"
2342 fi
07168dd9 2343 fi
3a6994f8 2344 target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
07168dd9 2345 tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
f555bf81 2346 tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
b56481ad 2347 sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
07168dd9 2348 for sh_multilib in ${sh_multilibs}; do
2349 case ${sh_multilib} in
f555bf81 2350 m1 | m2 | m2e | m3 | m3e | \
2351 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2352 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2353 m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2354 m5-64media | m5-64media-nofpu | \
2355 m5-32media | m5-32media-nofpu | \
2356 m5-compact | m5-compact-nofpu)
2357 # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2358 # It is passed to MULTIILIB_OPTIONS verbatim.
2359 TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2360 tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
07168dd9 2361 ;;
f555bf81 2362 \!*) # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2363 # It is passed the MULTILIB_EXCEPTIONS verbatim.
2364 TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
07168dd9 2365 *)
2366 echo "with_multilib_list=${sh_multilib} not supported."
2367 exit 1
2368 ;;
2369 esac
2370 done
f555bf81 2371 TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
3a6994f8 2372 if test x${enable_incomplete_targets} = xyes ; then
156fac8b 2373 tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
07168dd9 2374 fi
fa22494c 2375 tm_file="$tm_file ./sysroot-suffix.h"
2376 tmake_file="$tmake_file t-sysroot-suffix"
87e19636 2377 ;;
26f6dfe2 2378sh-*-rtems*)
237490bf 2379 tmake_file="sh/t-sh t-rtems sh/t-rtems"
9bc320a5 2380 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
26f6dfe2 2381 ;;
d9799238 2382sh-wrs-vxworks)
237490bf 2383 tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
9bc320a5 2384 tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
d9799238 2385 ;;
bb607926 2386sparc-*-elf*)
1bb0ad55 2387 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
b0168e11 2388 case ${target} in
2389 *-leon-*)
9e64c9a4 2390 tmake_file="sparc/t-sparc sparc/t-leon"
b0168e11 2391 ;;
2392 *-leon[3-9]*)
9e64c9a4 2393 tmake_file="sparc/t-sparc sparc/t-leon3"
b0168e11 2394 ;;
2395 *)
9e64c9a4 2396 tmake_file="sparc/t-sparc sparc/t-elf"
b0168e11 2397 ;;
2398 esac
bb607926 2399 ;;
a711a067 2400sparc-*-rtems*)
1bb0ad55 2401 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
9e64c9a4 2402 tmake_file="sparc/t-sparc sparc/t-elf t-rtems"
a711a067 2403 ;;
2404sparc-*-linux*)
8da0577c 2405 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
a9341855 2406 extra_options="${extra_options} sparc/long-double-switch.opt"
b0168e11 2407 case ${target} in
2408 *-leon-*)
9e64c9a4 2409 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
b0168e11 2410 ;;
2411 *-leon[3-9]*)
9e64c9a4 2412 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
b0168e11 2413 ;;
2414 *)
a997b0d8 2415 tmake_file="${tmake_file} sparc/t-sparc"
b0168e11 2416 ;;
2417 esac
1168681b 2418 if test x$enable_targets = xall; then
2419 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
64c6f17e 2420 tmake_file="${tmake_file} sparc/t-linux64"
1168681b 2421 else
2422 tm_file="${tm_file} sparc/linux.h"
1168681b 2423 fi
bb607926 2424 ;;
a711a067 2425sparc-*-netbsdelf*)
1bb0ad55 2426 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
f466b0a0 2427 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
a711a067 2428 extra_options="${extra_options} sparc/long-double-switch.opt"
9e64c9a4 2429 tmake_file="${tmake_file} sparc/t-sparc"
9afa4711 2430 ;;
8acfe9c6 2431sparc*-*-solaris2*)
8da0577c 2432 tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sol2-bi.h sparc/tso.h"
8fde03ba 2433 case ${target} in
8acfe9c6 2434 sparc64-*-* | sparcv9-*-*)
ea457188 2435 tm_file="sparc/default-64.h ${tm_file}"
f3449a3c 2436 ;;
8acfe9c6 2437 *)
2438 test x$with_cpu != x || with_cpu=v9
517cabaa 2439 ;;
8fde03ba 2440 esac
9e64c9a4 2441 tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2-64"
bb607926 2442 ;;
723e1902 2443sparc-wrs-vxworks)
1bb0ad55 2444 tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
9e64c9a4 2445 tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
723e1902 2446 ;;
bb607926 2447sparc64-*-elf*)
1bb0ad55 2448 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
7abb12da 2449 extra_options="${extra_options}"
9e64c9a4 2450 tmake_file="${tmake_file} sparc/t-sparc"
bb607926 2451 ;;
a711a067 2452sparc64-*-rtems*)
1bb0ad55 2453 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
7abb12da 2454 extra_options="${extra_options}"
9e64c9a4 2455 tmake_file="${tmake_file} sparc/t-sparc t-rtems"
a711a067 2456 ;;
2457sparc64-*-linux*)
8da0577c 2458 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default-64.h sparc/linux64.h sparc/tso.h"
a711a067 2459 extra_options="${extra_options} sparc/long-double-switch.opt"
a997b0d8 2460 tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
a711a067 2461 ;;
cf481f89 2462sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2463 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
a9341855 2464 extra_options="${extra_options} sparc/long-double-switch.opt"
cf481f89 2465 case "x$with_cpu" in
68345096 2466 xultrasparc) ;;
cf481f89 2467 x) with_cpu=ultrasparc ;;
2468 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2469 esac
9e64c9a4 2470 tmake_file="${tmake_file} sparc/t-sparc"
cf481f89 2471 ;;
1897a3df 2472sparc64-*-netbsd*)
1897a3df 2473 tm_file="sparc/biarch64.h ${tm_file}"
1bb0ad55 2474 tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
f466b0a0 2475 extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
a9341855 2476 extra_options="${extra_options} sparc/long-double-switch.opt"
9e64c9a4 2477 tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
1897a3df 2478 ;;
a711a067 2479sparc64-*-openbsd*)
1bb0ad55 2480 tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
a711a067 2481 tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
1a0fb050 2482 extra_options="${extra_options} openbsd.opt"
7abb12da 2483 extra_options="${extra_options}"
a711a067 2484 gas=yes gnu_ld=yes
2485 with_cpu=ultrasparc
9e64c9a4 2486 tmake_file="${tmake_file} sparc/t-sparc"
a711a067 2487 ;;
644459d0 2488spu-*-elf*)
f3449a3c 2489 tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
644459d0 2490 tmake_file="spu/t-spu-elf"
638454a1 2491 native_system_header_dir=/include
6cf5579e 2492 extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
644459d0 2493 extra_modes=spu/spu-modes.def
2494 c_target_objs="${c_target_objs} spu-c.o"
2495 cxx_target_objs="${cxx_target_objs} spu-c.o"
2496 ;;
5aa04b01 2497tic6x-*-elf)
2498 tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
2499 tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
5aa04b01 2500 tmake_file="c6x/t-c6x c6x/t-c6x-elf"
5aa04b01 2501 use_collect2=no
2502 ;;
2503tic6x-*-uclinux)
2504 tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
2505 tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
2506 tm_file="${tm_file} ./sysroot-suffix.h"
a997b0d8 2507 tmake_file="t-sysroot-suffix t-slibgcc"
5aa04b01 2508 tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
5aa04b01 2509 use_collect2=no
2510 ;;
7ce78e23 2511tilegx-*-linux*)
2512 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
2513 tmake_file="${tmake_file} tilegx/t-tilegx"
2514 extra_objs="mul-tables.o"
6adc88f8 2515 c_target_objs="${c_target_objs} tilegx-c.o"
2516 cxx_target_objs="${cxx_target_objs} tilegx-c.o"
1fea9dc6 2517 extra_headers="feedback.h"
7ce78e23 2518 ;;
2519tilepro-*-linux*)
2520 tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
2521 tmake_file="${tmake_file} tilepro/t-tilepro"
2522 extra_objs="mul-tables.o"
6adc88f8 2523 c_target_objs="${c_target_objs} tilepro-c.o"
2524 cxx_target_objs="${cxx_target_objs} tilepro-c.o"
1fea9dc6 2525 extra_headers="feedback.h"
7ce78e23 2526 ;;
20fbb1f2 2527v850-*-rtems*)
2528 target_cpu_default="TARGET_CPU_generic"
2529 tm_file="dbxelf.h elfos.h v850/v850.h"
2530 tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
2531 tmake_file="${tmake_file} v850/t-v850"
2532 tmake_file="${tmake_file} t-rtems v850/t-rtems"
2533 use_collect2=no
2534 c_target_objs="v850-c.o"
2535 cxx_target_objs="v850-c.o"
2536 ;;
f5ec6516 2537v850*-*-*)
2538 case ${target} in
2539 v850e2v3-*-*)
2540 target_cpu_default="TARGET_CPU_v850e2v3"
2541 ;;
2542 v850e2-*-*)
2543 target_cpu_default="TARGET_CPU_v850e2"
2544 ;;
2545 v850e1-*-* | v850es-*-*)
2546 target_cpu_default="TARGET_CPU_v850e1"
2547 ;;
2548 v850e-*-*)
2549 target_cpu_default="TARGET_CPU_v850e"
2550 ;;
2551 v850-*-*)
2552 target_cpu_default="TARGET_CPU_generic"
2553 ;;
2554 esac
156edce8 2555 tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
5dd3389c 2556 if test x$stabs = xyes
2557 then
2558 tm_file="${tm_file} dbx.h"
2559 fi
2560 use_collect2=no
2561 c_target_objs="v850-c.o"
2562 cxx_target_objs="v850-c.o"
f3449a3c 2563 use_gcc_stdint=wrap
5dd3389c 2564 ;;
6718899e 2565vax-*-linux*)
deb14f24 2566 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
6b9d66b3 2567 extra_options="${extra_options} vax/elf.opt"
6718899e 2568 ;;
f470dade 2569vax-*-netbsdelf*)
83accbc0 2570 tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
6b9d66b3 2571 extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
f470dade 2572 ;;
bb607926 2573vax-*-openbsd*)
8e6600a1 2574 tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
1a0fb050 2575 extra_options="${extra_options} openbsd.opt"
bb607926 2576 use_collect2=yes
2577 ;;
9b954fed 2578xstormy16-*-elf)
2579 # For historical reasons, the target files omit the 'x'.
2487a409 2580 tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
9b954fed 2581 tm_p_file=stormy16/stormy16-protos.h
2582 md_file=stormy16/stormy16.md
2583 out_file=stormy16/stormy16.c
840f1481 2584 extra_options=stormy16/stormy16.opt
9b954fed 2585 tmake_file="stormy16/t-stormy16"
9b954fed 2586 ;;
a76109da 2587xtensa*-*-elf*)
be47c99e 2588 tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
b0a67e36 2589 extra_options="${extra_options} xtensa/elf.opt"
f6b7ba2b 2590 ;;
a76109da 2591xtensa*-*-linux*)
deb14f24 2592 tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
237490bf 2593 tmake_file="${tmake_file} xtensa/t-xtensa"
f6b7ba2b 2594 ;;
1acdfc69 2595am33_2.0-*-linux*)
deb14f24 2596 tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
1acdfc69 2597 gas=yes gnu_ld=yes
1acdfc69 2598 use_collect2=no
2599 ;;
a41d0b5e 2600m32c-*-rtems*)
3a0201c8 2601 tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
a41d0b5e 2602 tmake_file="${tmake_file} t-rtems"
2603 c_target_objs="m32c-pragma.o"
2604 cxx_target_objs="m32c-pragma.o"
2605 ;;
85c84d5c 2606m32c-*-elf*)
3a0201c8 2607 tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
85c84d5c 2608 c_target_objs="m32c-pragma.o"
2609 cxx_target_objs="m32c-pragma.o"
85c84d5c 2610 ;;
bb607926 2611*)
09c6646e 2612 echo "*** Configuration ${target} not supported" 1>&2
bb607926 2613 exit 1
2614 ;;
2615esac
2616
561866ed 2617case ${target} in
561866ed 2618i[34567]86-*-linux* | x86_64-*-linux*)
46f8e3b0 2619 tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
561866ed 2620 ;;
2621i[34567]86-*-* | x86_64-*-*)
46f8e3b0 2622 tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
561866ed 2623 ;;
cf61fe8d 2624powerpc*-*-* | rs6000-*-*)
2625 tm_file="${tm_file} rs6000/option-defaults.h"
561866ed 2626esac
2627
c94b1d0e 2628if [ "$target_has_targetcm" = "no" ]; then
2629 c_target_objs="$c_target_objs default-c.o"
2630 cxx_target_objs="$cxx_target_objs default-c.o"
2631fi
2632
3e87b980 2633if [ "$common_out_file" = "" ]; then
2634 if [ "$target_has_targetm_common" = "yes" ]; then
2635 common_out_file="$cpu_type/$cpu_type-common.c"
2636 else
2637 common_out_file="default-common.c"
2638 fi
2639fi
2640
3864b642 2641# Support for --with-cpu and related options (and a few unrelated options,
973f8bf3 2642# too).
370a1d10 2643case ${with_cpu} in
2644 yes | no)
2645 echo "--with-cpu must be passed a value" 1>&2
2646 exit 1
2647 ;;
2648esac
f0b281fe 2649
1f64ad21 2650# Set arch and cpu from ${target} and ${target_noncanonical}. Set cpu
2651# to generic if there is no processor scheduler model for the target.
2652arch=
2653cpu=
05b38372 2654arch_without_sse2=no
ed2b8f56 2655arch_without_64bit=no
1f64ad21 2656case ${target} in
0be8ff0a 2657 i386-*-freebsd*)
2658 if test $fbsd_major -ge 6; then
2659 arch=i486
2660 else
2661 arch=i386
2662 fi
2663 cpu=generic
2664 arch_without_sse2=yes
2665 arch_without_64bit=yes
2666 ;;
1f64ad21 2667 i386-*-*)
2668 arch=i386
2669 cpu=i386
05b38372 2670 arch_without_sse2=yes
ed2b8f56 2671 arch_without_64bit=yes
1f64ad21 2672 ;;
2673 i486-*-*)
2674 arch=i486
2675 cpu=i486
05b38372 2676 arch_without_sse2=yes
ed2b8f56 2677 arch_without_64bit=yes
1f64ad21 2678 ;;
2679 i586-*-*)
05b38372 2680 arch_without_sse2=yes
ed2b8f56 2681 arch_without_64bit=yes
1f64ad21 2682 case ${target_noncanonical} in
2683 k6_2-*)
2684 arch=k6-2
2685 cpu=k6-2
2686 ;;
2687 k6_3-*)
2688 arch=k6-3
2689 cpu=k6-3
2690 ;;
2691 k6-*)
2692 arch=k6
2693 cpu=k6
2694 ;;
2695 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2696 arch=pentium-mmx
2697 cpu=pentium-mmx
2698 ;;
2699 *)
2700 arch=pentium
2701 cpu=pentium
2702 ;;
2703 esac
2704 ;;
2705 i686-*-* | i786-*-*)
2706 case ${target_noncanonical} in
8991ae0a 2707 bdver2-*)
2708 arch=bdver2
2709 cpu=bdver2
2710 ;;
6fc76bb0 2711 bdver1-*)
2712 arch=bdver1
2713 cpu=bdver1
2714 ;;
a97faf6b 2715 btver1-*)
2716 arch=btver1
2717 cpu=btver1
2718 ;;
75eddf9a 2719 btver2-*)
2720 arch=btver2
2721 cpu=btver2
2722 ;;
1f64ad21 2723 amdfam10-*|barcelona-*)
2724 arch=amdfam10
2725 cpu=amdfam10
2726 ;;
2727 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2728 arch=k8-sse3
2729 cpu=k8-sse3
2730 ;;
2731 k8-*|opteron-*|athlon64-*|athlon_fx-*)
2732 arch=k8
2733 cpu=k8
2734 ;;
2735 athlon_xp-*|athlon_mp-*|athlon_4-*)
2736 arch=athlon-4
2737 cpu=athlon-4
05b38372 2738 arch_without_sse2=yes
ed2b8f56 2739 arch_without_64bit=yes
1f64ad21 2740 ;;
2741 athlon_tbird-*|athlon-*)
2742 arch=athlon
2743 cpu=athlon
05b38372 2744 arch_without_sse2=yes
1f64ad21 2745 ;;
2746 geode-*)
2747 arch=geode
2748 cpu=geode
05b38372 2749 arch_without_sse2=yes
1f64ad21 2750 ;;
2751 pentium2-*)
2752 arch=pentium2
2753 cpu=pentium2
05b38372 2754 arch_without_sse2=yes
1f64ad21 2755 ;;
2756 pentium3-*|pentium3m-*)
2757 arch=pentium3
2758 cpu=pentium3
05b38372 2759 arch_without_sse2=yes
1f64ad21 2760 ;;
2761 pentium4-*|pentium4m-*)
2762 arch=pentium4
2763 cpu=pentium4
2764 ;;
2765 prescott-*)
2766 arch=prescott
2767 cpu=prescott
2768 ;;
2769 nocona-*)
2770 arch=nocona
2771 cpu=nocona
2772 ;;
2773 atom-*)
2774 arch=atom
2775 cpu=atom
2776 ;;
2777 core2-*)
2778 arch=core2
2779 cpu=core2
2780 ;;
b0298715 2781 corei7-*)
2782 arch=corei7
2783 cpu=corei7
2784 ;;
e4168d53 2785 corei7_avx-*)
2786 arch=corei7-avx
2787 cpu=corei7-avx
2788 ;;
1f64ad21 2789 pentium_m-*)
2790 arch=pentium-m
2791 cpu=pentium-m
2792 ;;
2793 pentiumpro-*)
2794 arch=pentiumpro
2795 cpu=pentiumpro
05b38372 2796 arch_without_sse2=yes
1f64ad21 2797 ;;
2798 *)
2799 arch=pentiumpro
2800 cpu=generic
05b38372 2801 arch_without_sse2=yes
ed2b8f56 2802 arch_without_64bit=yes
1f64ad21 2803 ;;
2804 esac
2805 ;;
2806 x86_64-*-*)
2807 case ${target_noncanonical} in
8991ae0a 2808 bdver2-*)
2809 arch=bdver2
2810 cpu=bdver2
2811 ;;
6fc76bb0 2812 bdver1-*)
2813 arch=bdver1
2814 cpu=bdver1
2815 ;;
a97faf6b 2816 btver1-*)
2817 arch=btver1
2818 cpu=btver1
2819 ;;
75eddf9a 2820 btver2-*)
2821 arch=btver2
2822 cpu=btver2
2823 ;;
1f64ad21 2824 amdfam10-*|barcelona-*)
2825 arch=amdfam10
2826 cpu=amdfam10
2827 ;;
2828 k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2829 arch=k8-sse3
2830 cpu=k8-sse3
2831 ;;
2832 k8-*|opteron-*|athlon_64-*)
2833 arch=k8
2834 cpu=k8
2835 ;;
2836 nocona-*)
2837 arch=nocona
2838 cpu=nocona
2839 ;;
2840 atom-*)
2841 arch=atom
2842 cpu=atom
2843 ;;
2844 core2-*)
2845 arch=core2
2846 cpu=core2
2847 ;;
b0298715 2848 corei7-*)
2849 arch=corei7
2850 cpu=corei7
2851 ;;
1f64ad21 2852 *)
2853 arch=x86-64
2854 cpu=generic
2855 ;;
2856 esac
2857 ;;
2858esac
2859
370a1d10 2860# If there is no $with_cpu option, try to infer one from ${target}.
2861# This block sets nothing except for with_cpu.
2862if test x$with_cpu = x ; then
2863 case ${target} in
1f64ad21 2864 i[34567]86-*-*|x86_64-*-*)
2865 with_cpu=$cpu
370a1d10 2866 ;;
2867 alphaev6[78]*-*-*)
2868 with_cpu=ev67
2869 ;;
2870 alphaev6*-*-*)
2871 with_cpu=ev6
2872 ;;
2873 alphapca56*-*-*)
2874 with_cpu=pca56
2875 ;;
2876 alphaev56*-*-*)
2877 with_cpu=ev56
2878 ;;
2879 alphaev5*-*-*)
2880 with_cpu=ev5
2881 ;;
de6e318c 2882 frv-*-*linux* | frv400-*-*linux*)
3e7f6cce 2883 with_cpu=fr400
2884 ;;
de6e318c 2885 frv550-*-*linux*)
2886 with_cpu=fr550
2887 ;;
f84195ec 2888 m68k*-*-*)
558b196a 2889 case "$with_arch" in
2890 "cf")
2891 with_cpu=${default_cf_cpu}
2892 ;;
2893 "" | "m68k")
2894 with_cpu=m${default_m68k_cpu}
2895 ;;
2896 esac
f84195ec 2897 ;;
223f6dbc 2898 mips*-*-vxworks)
2899 with_arch=mips2
2900 ;;
76303083 2901 powerpc*-*-*spe*)
2902 if test x$enable_e500_double = xyes; then
2903 with_cpu=8548
2904 else
2905 with_cpu=8540
2906 fi
2907 ;;
b0168e11 2908 sparc-leon*-*)
2909 with_cpu=v8;
2910 ;;
370a1d10 2911 sparc*-*-*)
2912 with_cpu="`echo ${target} | sed 's/-.*$//'`"
370a1d10 2913 ;;
2914 esac
f067c6b7 2915
2916 # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
2917 case ${target} in
2918 i[34567]86-*-*|x86_64-*-*)
1f64ad21 2919 if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
2920 if test x$with_cpu_32 = x; then
2921 with_cpu_32=$with_cpu
2922 fi
2923 if test x$with_cpu_64 = x; then
2924 with_cpu_64=$with_cpu
2925 fi
2926 with_cpu=
2927 fi
2928 ;;
2929 esac
2930fi
2931
2932# Support for --with-arch and related options (and a few unrelated options,
2933# too).
2934case ${with_arch} in
2935 yes | no)
2936 echo "--with-arch must be passed a value" 1>&2
2937 exit 1
2938 ;;
2939esac
2940
2941# If there is no $with_arch option, try to infer one from ${target}.
2942# This block sets nothing except for with_arch.
2943if test x$with_arch = x ; then
2944 case ${target} in
ffcf29bf 2945 i[34567]86-*-darwin*|x86_64-*-darwin*)
2946 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2947 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2948 ;;
2d2e1f85 2949 i[34567]86-*-*)
05b38372 2950 # --with-fpmath sets the default ISA to SSE2, which is the same
2951 # ISA supported by Pentium 4.
2952 if test x$with_fpmath = x || test $arch_without_sse2 = no; then
2953 with_arch=$arch
2954 else
2955 with_arch=pentium4
2d2e1f85 2956 fi
2957 ;;
2958 x86_64-*-*)
1f64ad21 2959 with_arch=$arch
2960 ;;
2961 esac
2962
2963 # Avoid overriding --with-arch-32 and --with-arch-64 values.
2964 case ${target} in
ffcf29bf 2965 i[34567]86-*-darwin*|x86_64-*-darwin*)
2966 # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2967 # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2968 ;;
1f64ad21 2969 i[34567]86-*-*|x86_64-*-*)
2970 if test x$with_arch_32 != x || test x$with_arch_64 != x; then
2971 if test x$with_arch_32 = x; then
525b174b 2972 with_arch_32=$with_arch
1f64ad21 2973 fi
2974 if test x$with_arch_64 = x; then
ed2b8f56 2975 if test $arch_without_64bit = yes; then
2976 # Set the default 64bit arch to x86-64 if the default arch
2977 # doesn't support 64bit.
2978 with_arch_64=x86-64
2979 else
525b174b 2980 with_arch_64=$with_arch
ed2b8f56 2981 fi
1f64ad21 2982 fi
2983 with_arch=
ed2b8f56 2984 elif test $arch_without_64bit$need_64bit_isa = yesyes; then
2985 # Set the default 64bit arch to x86-64 if the default arch
2986 # doesn't support 64bit and we need 64bit ISA.
525b174b 2987 with_arch_32=$with_arch
ed2b8f56 2988 with_arch_64=x86-64
2989 with_arch=
f067c6b7 2990 fi
2991 ;;
2992 esac
370a1d10 2993fi
f0b281fe 2994
2d2e1f85 2995# Support --with-fpmath.
2996if test x$with_fpmath != x; then
2997 case ${target} in
2998 i[34567]86-*-* | x86_64-*-*)
2999 case ${with_fpmath} in
e69704a5 3000 avx)
3001 tm_file="${tm_file} i386/avxmath.h"
3002 ;;
2d2e1f85 3003 sse)
3004 tm_file="${tm_file} i386/ssemath.h"
3005 ;;
3006 *)
3007 echo "Invalid --with-fpmath=$with_fpmath" 1>&2
3008 exit 1
3009 ;;
3010 esac
3011 ;;
3012 *)
3013 echo "--with-fpmath isn't supported for $target." 1>&2
3014 exit 1
3015 ;;
3016 esac
3017fi
3018
0a76a4fd 3019# Similarly for --with-schedule.
3020if test x$with_schedule = x; then
3021 case ${target} in
6af9f7ea 3022 hppa1*)
0a76a4fd 3023 # Override default PA8000 scheduling model.
3024 with_schedule=7100LC
3025 ;;
3026 esac
3027fi
f0b281fe 3028
0a76a4fd 3029# Validate and mark as valid any --with options supported
3030# by this target. In order to use a particular --with option
3031# you must list it in supported_defaults; validating the value
3032# is optional. This case statement should set nothing besides
3033# supported_defaults.
7dd97ab6 3034
0a76a4fd 3035supported_defaults=
3036case "${target}" in
16878cba 3037 aarch64*-*-*)
3038 supported_defaults="cpu arch"
3039 for which in cpu arch; do
3040
3041 eval "val=\$with_$which"
3042 base_val=`echo $val | sed -e 's/\+.*//'`
3043 ext_val=`echo $val | sed -e 's/[a-z0-9\-]\+//'`
3044
3045 if [ $which = arch ]; then
3046 def=aarch64-arches.def
3047 pattern=AARCH64_ARCH
3048 else
3049 def=aarch64-cores.def
3050 pattern=AARCH64_CORE
3051 fi
3052
3053 ext_mask=AARCH64_CPU_DEFAULT_FLAGS
3054
3055 # Find the base CPU or ARCH id in aarch64-cores.def or
3056 # aarch64-arches.def
3057 if [ x"$base_val" = x ] \
3058 || grep "^$pattern(\"$base_val\"," \
3059 ${srcdir}/config/aarch64/$def \
3060 > /dev/null; then
3061
3062 if [ $which = arch ]; then
3063 base_id=`grep "^$pattern(\"$base_val\"," \
3064 ${srcdir}/config/aarch64/$def | \
3065 sed -e 's/^[^,]*,[ ]*//' | \
3066 sed -e 's/,.*$//'`
3067 else
3068 base_id=`grep "^$pattern(\"$base_val\"," \
3069 ${srcdir}/config/aarch64/$def | \
3070 sed -e 's/^[^,]*,[ ]*//' | \
3071 sed -e 's/,.*$//'`
3072 fi
3073
3074 while [ x"$ext_val" != x ]
3075 do
3076 ext_val=`echo $ext_val | sed -e 's/\+//'`
3077 ext=`echo $ext_val | sed -e 's/\+.*//'`
3078 base_ext=`echo $ext | sed -e 's/^no//'`
3079
3080 if [ x"$base_ext" = x ] \
3081 || grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3082 ${srcdir}/config/aarch64/aarch64-option-extensions.def \
3083 > /dev/null; then
3084
3085 ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3086 ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3087 sed -e 's/^[^,]*,[ ]*//' | \
3088 sed -e 's/,.*$//'`
3089 ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3090 ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3091 sed -e 's/^[^,]*,[ ]*[^,]*,[ ]*//' | \
3092 sed -e 's/,.*$//' | \
3093 sed -e 's/).*$//'`
3094
3095 if [ $ext = $base_ext ]; then
3096 # Adding extension
3097 ext_mask="("$ext_mask") | ("$ext_on")"
3098 else
3099 # Removing extension
3100 ext_mask="("$ext_mask") & ~("$ext_off")"
3101 fi
3102
3103 true
3104 else
3105 echo "Unknown extension used in --with-$which=$val" 1>&2
3106 exit 1
3107 fi
3108 ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
3109 done
3110
3111 ext_mask="(("$ext_mask") << 6)"
3112 if [ x"$base_id" != x ]; then
3113 target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
3114 fi
3115 true
3116 else
3117 echo "Unknown $which used in --with-$which=$val" 1>&2
3118 exit 1
3119 fi
3120 done
3121 ;;
3122
f0b281fe 3123 alpha*-*-*)
7dd97ab6 3124 supported_defaults="cpu tune"
3125 for which in cpu tune; do
3126 eval "val=\$with_$which"
8d520382 3127 case "$val" in
3128 "" \
3129 | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
3130 | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
3131 | 21264a)
7dd97ab6 3132 ;;
3133 *)
3134 echo "Unknown CPU used in --with-$which=$val" 1>&2
3135 exit 1
3136 ;;
3137 esac
3138 done
3139 ;;
3140
3141 arm*-*-*)
bb10d7b5 3142 supported_defaults="arch cpu float tune fpu abi mode tls"
7dd97ab6 3143 for which in cpu tune; do
70ac928b 3144 # See if it matches any of the entries in arm-cores.def
7dd97ab6 3145 eval "val=\$with_$which"
1cfd705e 3146 if [ x"$val" = x ] \
61b58075 3147 || grep "^ARM_CORE(\"$val\"," \
1cfd705e 3148 ${srcdir}/config/arm/arm-cores.def \
3149 > /dev/null; then
3150 # Ok
61b58075 3151 new_val=`grep "^ARM_CORE(\"$val\"," \
3152 ${srcdir}/config/arm/arm-cores.def | \
3153 sed -e 's/^[^,]*,[ ]*//' | \
3154 sed -e 's/,.*$//'`
346bfe2d 3155 eval "target_${which}_cname=$new_val"
61b58075 3156 echo "For $val real value is $new_val"
1cfd705e 3157 true
3158 else
3159 echo "Unknown CPU used in --with-$which=$val" 1>&2
3160 exit 1
70ac928b 3161 fi
7dd97ab6 3162 done
3163
8d520382 3164 case "$with_arch" in
3165 "" \
a2cd141b 3166 | armv[23456] | armv2a | armv3m | armv4t | armv5t \
b77c60b7 3167 | armv5te | armv6j |armv6k | armv6z | armv6zk | armv6-m \
530c2b2e 3168 | armv7 | armv7-a | armv7-r | armv7-m | armv8-a \
6b4d6063 3169 | iwmmxt | ep9312)
f0b281fe 3170 # OK
bb678e49 3171 ;;
3172 *)
7dd97ab6 3173 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
f0b281fe 3174 exit 1
3864b642 3175 ;;
3176 esac
f0b281fe 3177
8d520382 3178 case "$with_float" in
3179 "" \
a2cd141b 3180 | soft | hard | softfp)
f0b281fe 3181 # OK
3864b642 3182 ;;
f0b281fe 3183 *)
7dd97ab6 3184 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 3185 exit 1
3864b642 3186 ;;
3187 esac
7dd97ab6 3188
a2cd141b 3189 case "$with_fpu" in
3190 "" \
8f50e6ed 3191 | vfp | vfp3 | vfpv3 \
414f0dcb 3192 | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
3193 | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
530c2b2e 3194 | fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \
3195 | crypto-neon-fp-armv8)
a2cd141b 3196 # OK
3197 ;;
3198 *)
f9273c43 3199 echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
3200 exit 1
3201 ;;
3202 esac
3203
3204 case "$with_abi" in
3205 "" \
6cac4dc0 3206 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
f9273c43 3207 #OK
3208 ;;
3209 *)
3210 echo "Unknown ABI used in --with-abi=$with_abi"
a2cd141b 3211 exit 1
3212 ;;
3213 esac
3214
086571a4 3215 case "$with_mode" in
3216 "" \
3217 | arm | thumb )
3218 #OK
3219 ;;
3220 *)
3221 echo "Unknown mode used in --with-mode=$with_mode"
3222 exit 1
3223 ;;
3224 esac
3225
bb10d7b5 3226 case "$with_tls" in
3227 "" \
3228 | gnu | gnu2)
3229 # OK
3230 ;;
3231 *)
3232 echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
3233 exit 1
3234 ;;
3235 esac
3236
7dd97ab6 3237 if test "x$with_arch" != x && test "x$with_cpu" != x; then
f9273c43 3238 echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
7dd97ab6 3239 fi
3864b642 3240 ;;
3864b642 3241
3e7f6cce 3242 fr*-*-*linux*)
3243 supported_defaults=cpu
3244 case "$with_cpu" in
3245 fr400) ;;
de6e318c 3246 fr550) ;;
3e7f6cce 3247 *)
3248 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3249 exit 1
3250 ;;
3251 esac
3252 ;;
3253
6af9f7ea 3254 fido-*-* | m68k*-*-*)
558b196a 3255 supported_defaults="arch cpu"
3256 case "$with_arch" in
3257 "" | "m68k"| "cf")
3258 m68k_arch_family="$with_arch"
3259 ;;
3260 *)
3261 echo "Invalid --with-arch=$with_arch" 1>&2
3262 exit 1
3263 ;;
3264 esac
f84195ec 3265
3266 # We always have a $with_cpu setting here.
8e80b452 3267 case "$with_cpu" in
8aed3cb3 3268 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3269 m68k_cpu_ident=$with_cpu
3270 ;;
3271 "m68020-40")
3272 m68k_cpu_ident=m68020
3273 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3274 ;;
3275 "m68020-60")
3276 m68k_cpu_ident=m68020
3277 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
8e80b452 3278 ;;
3279 *)
8aed3cb3 3280 # We need the C identifier rather than the string.
3281 m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3282 'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3283 $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3284 ${srcdir}/config/m68k/m68k-devices.def`
3285 if [ x"$m68k_cpu_ident" = x ] ; then
3286 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3287 exit 1
3288 fi
3289 with_cpu="mcpu=$with_cpu"
8e80b452 3290 ;;
3291 esac
3292 ;;
3293
6af9f7ea 3294 hppa*-*-*)
7dd97ab6 3295 supported_defaults="arch schedule"
3296
8d520382 3297 case "$with_arch" in
3298 "" | 1.0 | 1.1 | 2.0)
7dd97ab6 3299 # OK
3300 ;;
3301 *)
3302 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3303 exit 1
3304 ;;
3305 esac
3306
8d520382 3307 case "$with_schedule" in
3308 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
f0b281fe 3309 # OK
3310 ;;
3311 *)
3312 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3313 exit 1
3314 ;;
3315 esac
3864b642 3316 ;;
3864b642 3317
f0b281fe 3318 i[34567]86-*-* | x86_64-*-*)
6fa78bde 3319 supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
f067c6b7 3320 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7dd97ab6 3321 eval "val=\$with_$which"
e83e5390 3322 case ${val} in
9db3d688 3323 i386 | i486 \
e83e5390 3324 | i586 | pentium | pentium-mmx | winchip-c6 | winchip2 \
3325 | c3 | c3-2 | i686 | pentiumpro | pentium2 | pentium3 \
3326 | pentium4 | k6 | k6-2 | k6-3 | athlon | athlon-tbird \
3451fffd 3327 | athlon-4 | athlon-xp | athlon-mp | geode \
9db3d688 3328 | prescott | pentium-m | pentium4m | pentium3m)
3329 case "${target}" in
3330 x86_64-*-*)
f067c6b7 3331 case "x$which" in
3332 *_32)
3333 ;;
3334 *)
3335 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3336 exit 1
3337 ;;
3338 esac
9db3d688 3339 ;;
3340 esac
3341 # OK
3342 ;;
414f0dcb 3343 "" | x86-64 | generic | native \
3344 | k8 | k8-sse3 | athlon64 | athlon64-sse3 | opteron \
75eddf9a 3345 | opteron-sse3 | athlon-fx | bdver2 | bdver1 | btver2 | btver1 \
8991ae0a 3346 | amdfam10 | barcelona | nocona | core2 | corei7 \
d5301cf2 3347 | corei7-avx | core-avx-i | core-avx2 | atom)
7dd97ab6 3348 # OK
3349 ;;
3350 *)
3351 echo "Unknown CPU given in --with-$which=$val." 1>&2
3352 exit 1
3353 ;;
3354 esac
3355 done
3356 ;;
3357
3358 mips*-*-*)
1af9587c 3359 supported_defaults="abi arch arch_32 arch_64 float tune tune_32 tune_64 divide llsc mips-plt synci"
7dd97ab6 3360
e83e5390 3361 case ${with_float} in
3362 "" | soft | hard)
f0b281fe 3363 # OK
3364 ;;
3365 *)
7dd97ab6 3366 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 3367 exit 1
3368 ;;
3369 esac
3864b642 3370
e83e5390 3371 case ${with_abi} in
3372 "" | 32 | o64 | n32 | 64 | eabi)
f0b281fe 3373 # OK
3374 ;;
3375 *)
7dd97ab6 3376 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
f0b281fe 3377 exit 1
3378 ;;
3379 esac
f9262d1e 3380
3381 case ${with_divide} in
3382 "" | breaks | traps)
3383 # OK
3384 ;;
3385 *)
3386 echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3387 exit 1
bc4c18f7 3388 ;;
3389 esac
3390
3391 case ${with_llsc} in
3392 yes)
3393 with_llsc=llsc
3394 ;;
3395 no)
3396 with_llsc="no-llsc"
3397 ;;
3398 "")
3399 # OK
3400 ;;
3401 *)
3402 echo "Unknown llsc type used in --with-llsc" 1>&2
3403 exit 1
3404 ;;
f9262d1e 3405 esac
4a909f69 3406
3407 case ${with_mips_plt} in
3408 yes)
3409 with_mips_plt=plt
3410 ;;
3411 no)
3412 with_mips_plt=no-plt
3413 ;;
3414 "")
3415 ;;
3416 *)
3417 echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
3418 exit 1
3419 ;;
3420 esac
1af9587c 3421
3422 case ${with_synci} in
3423 yes)
3424 with_synci=synci
3425 ;;
32108f3d 3426 no)
1af9587c 3427 with_synci=no-synci
3428 ;;
32108f3d 3429 "")
3430 ;;
1af9587c 3431 *)
3432 echo "Unknown synci type used in --with-synci" 1>&2
3433 exit 1
3434 ;;
3435 esac
3864b642 3436 ;;
3864b642 3437
7dd97ab6 3438 powerpc*-*-* | rs6000-*-*)
cf61fe8d 3439 supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
7dd97ab6 3440
cf61fe8d 3441 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
7dd97ab6 3442 eval "val=\$with_$which"
e83e5390 3443 case ${val} in
83ae44d6 3444 default32 | default64)
cf61fe8d 3445 case $which in
3446 cpu | tune)
3447 ;;
3448 *)
3449 echo "$val only valid for --with-cpu and --with-tune." 1>&2
3450 exit 1
3451 ;;
3452 esac
83ae44d6 3453 with_which="with_$which"
3454 eval $with_which=
3455 ;;
e2fcf81b 3456 405cr)
3457 tm_defines="${tm_defines} CONFIG_PPC405CR"
3458 eval "with_$which=405"
3459 ;;
83ae44d6 3460 "" | common \
94f7a54b 3461 | power | power[234567] | power6x | powerpc | powerpc64 \
e83e5390 3462 | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
257bc844 3463 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
ed08558a 3464 | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
3465 | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
b770074c 3466 | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
3467 | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
7dd97ab6 3468 # OK
3469 ;;
3470 *)
3471 echo "Unknown cpu used in --with-$which=$val." 1>&2
3472 exit 1
3473 ;;
3474 esac
3475 done
3476 ;;
3477
b8c0043c 3478 s390*-*-*)
3479 supported_defaults="arch mode tune"
3480
3481 for which in arch tune; do
3482 eval "val=\$with_$which"
e83e5390 3483 case ${val} in
81769881 3484 "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12)
b8c0043c 3485 # OK
3486 ;;
3487 *)
3488 echo "Unknown cpu used in --with-$which=$val." 1>&2
3489 exit 1
3490 ;;
3491 esac
3492 done
3493
e83e5390 3494 case ${with_mode} in
3495 "" | esa | zarch)
b8c0043c 3496 # OK
3497 ;;
3498 *)
3499 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3500 exit 1
3501 ;;
3502 esac
3503 ;;
3504
07168dd9 3505 sh[123456ble]-*-* | sh-*-*)
3506 supported_defaults="cpu"
3a6994f8 3507 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
07168dd9 3508 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3509 # OK
3510 ;;
7105fb72 3511 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3512 ;;
9435e831 3513 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3514 ;;
07168dd9 3515 *)
3516 echo "Unknown CPU used in --with-cpu=$with_cpu, known values:" 1>&2
3517 echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
9435e831 3518 echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
7105fb72 3519 echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
07168dd9 3520 exit 1
3521 ;;
3522 esac
3523 ;;
f0b281fe 3524 sparc*-*-*)
7dd97ab6 3525 supported_defaults="cpu float tune"
3526
3527 for which in cpu tune; do
3528 eval "val=\$with_$which"
e83e5390 3529 case ${val} in
b0168e11 3530 "" | sparc | sparcv9 | sparc64 \
3531 | v7 | cypress \
3532 | v8 | supersparc | hypersparc | leon \
3533 | sparclite | f930 | f934 | sparclite86x \
3534 | sparclet | tsc701 \
b18dbf25 3535 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
3536 | niagara3 | niagara4)
7dd97ab6 3537 # OK
3538 ;;
3539 *)
3540 echo "Unknown cpu used in --with-$which=$val" 1>&2
3541 exit 1
3542 ;;
3543 esac
3544 done
3864b642 3545
e83e5390 3546 case ${with_float} in
3547 "" | soft | hard)
f0b281fe 3548 # OK
3549 ;;
3550 *)
7dd97ab6 3551 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 3552 exit 1
3553 ;;
3554 esac
3864b642 3555 ;;
3864b642 3556
5474166e 3557 spu-*-*)
3558 supported_defaults="arch tune"
3559
3560 for which in arch tune; do
3561 eval "val=\$with_$which"
3562 case ${val} in
3563 "" | cell | celledp)
3564 # OK
3565 ;;
3566 *)
3567 echo "Unknown cpu used in --with-$which=$val." 1>&2
3568 exit 1
3569 ;;
3570 esac
3571 done
3572 ;;
3573
5aa04b01 3574 tic6x-*-*)
3575 supported_defaults="arch"
3576
3577 case ${with_arch} in
3578 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
3579 # OK
3580 ;;
3581 *)
3582 echo "Unknown arch used in --with-arch=$with_arch." 1>&2
3583 exit 1
3584 ;;
3585 esac
3586 ;;
3587
f0b281fe 3588 v850*-*-*)
7dd97ab6 3589 supported_defaults=cpu
e83e5390 3590 case ${with_cpu} in
f5ec6516 3591 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3)
f0b281fe 3592 # OK
3593 ;;
3594 *)
3595 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3596 exit 1
3597 ;;
3598 esac
3864b642 3599 ;;
0a76a4fd 3600esac
3864b642 3601
0a76a4fd 3602# Set some miscellaneous flags for particular targets.
3603target_cpu_default2=
3604case ${target} in
16878cba 3605 aarch64*-*-*)
3606 if test x$target_cpu_cname = x
3607 then
3608 target_cpu_default2=TARGET_CPU_generic
3609 else
3610 target_cpu_default2=$target_cpu_cname
3611 fi
3612 ;;
3613
f0b281fe 3614 arm*-*-*)
346bfe2d 3615 if test x$target_cpu_cname = x
3616 then
3617 target_cpu_default2=TARGET_CPU_generic
3618 else
3619 target_cpu_default2=TARGET_CPU_$target_cpu_cname
3620 fi
f0b281fe 3621 ;;
582b17a6 3622
6af9f7ea 3623 hppa*-*-*)
8ab32933 3624 target_cpu_default2="MASK_BIG_SWITCH"
f0b281fe 3625 if test x$gas = xyes
bb607926 3626 then
8ab32933 3627 target_cpu_default2="${target_cpu_default2}|MASK_GAS|MASK_JUMP_IN_DELAY"
f0b281fe 3628 fi
3864b642 3629 ;;
3864b642 3630
6af9f7ea 3631 fido*-*-* | m68k*-*-*)
8aed3cb3 3632 target_cpu_default2=$m68k_cpu_ident
d078aadd 3633 tmake_file="m68k/t-opts $tmake_file"
558b196a 3634 if [ x"$m68k_arch_family" != x ]; then
3635 tmake_file="m68k/t-$m68k_arch_family $tmake_file"
3636 fi
8aed3cb3 3637 ;;
3638
b3fd46a0 3639 i[34567]86-*-darwin* | x86_64-*-darwin*)
b3fd46a0 3640 ;;
8a84c748 3641 i[34567]86-*-linux* | x86_64-*-linux* | \
3642 i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
3643 i[34567]86-*-gnu*)
b3fd46a0 3644 ;;
14f27bc6 3645 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
20be3c56 3646 ;;
f7ef49da 3647 i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
6471e33b 3648 ;;
278afeb5 3649 i[34567]86-*-freebsd* | x86_64-*-freebsd*)
278afeb5 3650 ;;
8b21beb2 3651 ia64*-*-linux*)
8b21beb2 3652 ;;
b3fd46a0 3653
f0b281fe 3654 mips*-*-*)
b93bf04a 3655 if test x$gnu_ld = xyes
3656 then
dfae4483 3657 target_cpu_default2="MASK_SPLIT_ADDRESSES"
b93bf04a 3658 fi
09c6646e 3659 case ${target} in
f0b281fe 3660 mips*el-*-*)
3661 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
3662 ;;
3663 esac
1d88eb71 3664 tmake_file="mips/t-mips $tmake_file"
f4deb416 3665 ;;
f0b281fe 3666
3667 powerpc*-*-* | rs6000-*-*)
7dd97ab6 3668 # FIXME: The PowerPC port uses the value set at compile time,
3669 # although it's only cosmetic.
f0b281fe 3670 if test "x$with_cpu" != x
bb607926 3671 then
f0b281fe 3672 target_cpu_default2="\\\"$with_cpu\\\""
bb607926 3673 fi
f0b281fe 3674 out_file=rs6000/rs6000.c
3675 c_target_objs="${c_target_objs} rs6000-c.o"
3676 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
3677 tmake_file="rs6000/t-rs6000 ${tmake_file}"
f4deb416 3678 ;;
3864b642 3679
57d5535b 3680 sh[123456ble]*-*-* | sh-*-*)
3681 c_target_objs="${c_target_objs} sh-c.o"
3682 cxx_target_objs="${cxx_target_objs} sh-c.o"
3683 ;;
3684
b0168e11 3685 sparc-leon*-*)
3686 if test x$with_tune = x ; then
3687 with_tune=leon;
3688 fi
3689
3690 # The SPARC port checks this value at compile-time.
3691 target_cpu_default2="TARGET_CPU_$with_cpu"
3692 ;;
3693
f0b281fe 3694 sparc*-*-*)
7dd97ab6 3695 # Some standard aliases.
3696 case x$with_cpu in
3697 xsparc)
3698 with_cpu=v7
3699 ;;
7dd97ab6 3700 xsparcv9 | xsparc64)
3701 with_cpu=v9
3702 ;;
3703 esac
3704
3ce7ff97 3705 # The SPARC port checks this value at compile-time.
3864b642 3706 target_cpu_default2="TARGET_CPU_$with_cpu"
3707 ;;
b0168e11 3708
f0b281fe 3709 v850*-*-*)
3710 case "x$with_cpu" in
3711 x)
3712 ;;
f5ec6516 3713 xv850e | xv850e1 | xv850e2 | xv850e2v3)
f0b281fe 3714 target_cpu_default2="TARGET_CPU_$with_cpu"
3715 ;;
f5ec6516 3716 xv850es)
3717 target_cpu_default2="TARGET_CPU_v850e1"
3718 ;;
f0b281fe 3719 esac
3720 ;;
0a76a4fd 3721esac
bb607926 3722
0a76a4fd 3723t=
bb10d7b5 3724all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu divide llsc mips-plt synci tls"
0a76a4fd 3725for option in $all_defaults
3726do
4a909f69 3727 eval "val=\$with_"`echo $option | sed s/-/_/g`
0a76a4fd 3728 if test -n "$val"; then
3729 case " $supported_defaults " in
3730 *" $option "*)
3731 ;;
3732 *)
3733 echo "This target does not support --with-$option." 2>&1
fc3e831e 3734 echo "Valid --with options are: $supported_defaults" 2>&1
0a76a4fd 3735 exit 1
3736 ;;
3737 esac
7dd97ab6 3738
0a76a4fd 3739 if test "x$t" = x
3740 then
3741 t="{ \"$option\", \"$val\" }"
3742 else
3743 t="${t}, { \"$option\", \"$val\" }"
7dd97ab6 3744 fi
7dd97ab6 3745 fi
0a76a4fd 3746done
7dd97ab6 3747
0a76a4fd 3748if test "x$t" = x
3749then
3750 configure_default_options="{ { NULL, NULL} }"
3751else
3752 configure_default_options="{ ${t} }"
3753fi
3754
3755if test "$target_cpu_default2" != ""
3756then
3757 if test "$target_cpu_default" != ""
bb607926 3758 then
0a76a4fd 3759 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3760 else
3761 target_cpu_default=$target_cpu_default2
bb607926 3762 fi
0a76a4fd 3763fi