]> gcc.gnu.org Git - gcc.git/blame - gcc/config.gcc
sem_res.adb (Large_Storage_Type): A type is large if it requires as many bits as...
[gcc.git] / gcc / config.gcc
CommitLineData
a89ea0df 1# GCC target-specific configuration file.
8d8da227
JM
2# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
3# 2008 Free Software Foundation, Inc.
61ed06c3 4
1322177d 5#This file is part of GCC.
61ed06c3 6
1322177d
LB
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
9dcd6f09 9#Software Foundation; either version 3, or (at your option) any later
1322177d 10#version.
61ed06c3 11
1322177d
LB
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.
61ed06c3
HPN
16
17#You should have received a copy of the GNU General Public License
9dcd6f09
NC
18#along with GCC; see the file COPYING3. If not see
19#<http://www.gnu.org/licenses/>.
61ed06c3 20
a89ea0df
NN
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.
61ed06c3 26
fa958513
DJ
27# When you change the cases in the OS or target switches, consider
28# updating ../libgcc/config.host also.
29
b01bc573 30# This file switches on the shell variable ${target}, and also uses the
61ed06c3
HPN
31# following shell variables:
32#
33# with_* Various variables as set by configure.
34#
615be2cf 35# enable_threads Either the name, yes or no depending on whether
61ed06c3
HPN
36# threads support was requested.
37#
2121a768 38# default_use_cxa_atexit
c5dde55b
NC
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.
2121a768 47#
61ed06c3
HPN
48# gas_flag Either yes or no depending on whether GNU as was
49# requested.
50#
51# gnu_ld_flag Either yes or no depending on whether GNU ld was
52# requested.
53
54# This file sets the following shell variables for use by the
55# autoconf-generated configure script:
56#
b01bc573
NN
57# cpu_type The name of the cpu, if different from the first
58# chunk of the canonical target name.
61ed06c3 59#
d5355cb2
JDA
60# tm_defines List of target macros to define for all compilations.
61#
61ed06c3 62# tm_file A list of target macro files, if different from
32fb7c9d
FS
63# "$cpu_type/$cpu_type.h". Usually it's constructed
64# per target in a way like this:
c40409ce 65# tm_file="${tm_file} dbxelf.h elfos.h svr4.h ${cpu_type.h}/elf.h"
32fb7c9d
FS
66# Note that the preferred order is:
67# - specific target header "${cpu_type}/${cpu_type.h}"
a4a4b1d3 68# - generic headers like dbxelf.h elfos.h, etc.
32fb7c9d
FS
69# - specializing target headers like ${cpu_type.h}/elf.h
70# This helps to keep OS specific stuff out of the CPU
71# defining header ${cpu_type}/${cpu_type.h}.
61ed06c3 72#
9c63c208
SL
73# It is possible to include automatically-generated
74# build-directory files by prefixing them with "./".
75# All other files should relative to $srcdir/config.
76#
61ed06c3
HPN
77# tm_p_file Location of file with declarations for functions
78# in $out_file.
79#
80# out_file The name of the machine description C support
81# file, if different from "$cpu_type/$cpu_type.c".
82#
83# md_file The name of the machine-description file, if
84# different from "$cpu_type/$cpu_type.md".
85#
86# tmake_file A list of machine-description-specific
87# makefile-fragments, if different from
88# "$cpu_type/t-$cpu_type".
89#
1c0ca89d
ZW
90# extra_modes The name of the file containing a list of extra
91# machine modes, if necessary and different from
92# "$cpu_type/$cpu_type-modes.def".
93#
61ed06c3
HPN
94# extra_objs List of extra objects that should be linked into
95# the compiler proper (cc1, cc1obj, cc1plus)
96# depending on target.
97#
30500d84
KC
98# extra_gcc_objs List of extra objects that should be linked into
99# the compiler driver (gcc) depending on target.
100#
61ed06c3 101# extra_headers List of used header files from the directory
817e13c4 102# config/${cpu_type}.
61ed06c3 103#
1617e5ee
GK
104# use_gcc_tgmath If set, add tgmath.h to the list of used header
105# files.
106#
61ed06c3
HPN
107# extra_passes List of extra executables compiled for this target
108# machine, used for compiling from source to object.
109#
110# extra_parts List of extra object files that should be compiled
111# for this target machine.
112#
113# extra_programs Like extra_passes, but these are used when linking.
114#
75685792
RS
115# extra_options List of target-dependent .opt files.
116#
ff7cc307 117# c_target_objs List of extra target-dependent objects that be
aac69a49 118# linked into the C compiler only.
0e5a4ad8 119#
ff7cc307 120# cxx_target_objs List of extra target-dependent objects that be
aac69a49 121# linked into the C++ compiler only.
0e5a4ad8 122#
c776a6d0
DF
123# fortran_target_objs List of extra target-dependent objects that be
124# linked into the fortran compiler only.
125#
ef69da62
SS
126# target_gtfiles List of extra source files with type information.
127#
61ed06c3
HPN
128# xm_defines List of macros to define when compiling for the
129# target machine.
130#
131# xm_file List of files to include when compiling for the
132# target machine.
133#
134# use_collect2 Set to yes or no, depending on whether collect2
135# will be used.
136#
137# target_cpu_default Set to override the default target model.
138#
61ed06c3
HPN
139# gdb_needs_out_file_path
140# Set to yes if gdb needs a dir command with
141# `dirname $out_file`.
142#
61ed06c3
HPN
143# thread_file Set to control which thread package to use.
144#
145# gas Set to yes or no depending on whether the target
146# system normally uses GNU as.
4977bab6
ZW
147#
148# need_64bit_hwint Set to yes if HOST_WIDE_INT must be 64 bits wide
1197924d
KH
149# for this target. This is true iff this target
150# supports "long" or "wchar_t" wider than 32 bits.
11835124
DM
151# The setting made here must match the one made in
152# other locations such as libcpp/configure.ac
7816bea0
DJ
153#
154# configure_default_options
155# Set to an initializer for configure_default_options
156# in configargs.h, based on --with-cpu et cetera.
587dc9c6
NN
157#
158# use_fixproto Set to "yes" if fixproto should be run normally,
159# "no" if fixproto should never be run.
61ed06c3
HPN
160
161# The following variables are used in each case-construct to build up the
162# outgoing variables:
163#
61ed06c3
HPN
164# gnu_ld Set to yes or no depending on whether the target
165# system normally uses GNU ld.
166
167out_file=
61ed06c3
HPN
168tmake_file=
169extra_headers=
1617e5ee 170use_gcc_tgmath=yes
61ed06c3
HPN
171extra_passes=
172extra_parts=
173extra_programs=
174extra_objs=
61ed06c3 175extra_gcc_objs=
75685792 176extra_options=
aac69a49
NC
177c_target_objs=
178cxx_target_objs=
c776a6d0 179fortran_target_objs=
d5355cb2 180tm_defines=
61ed06c3 181xm_defines=
61ed06c3
HPN
182# Set this to force installation and use of collect2.
183use_collect2=
184# Set this to override the default target model.
185target_cpu_default=
61ed06c3
HPN
186# Set this if gdb needs a dir command with `dirname $out_file`
187gdb_needs_out_file_path=
61ed06c3
HPN
188# Set this to control which thread package will be used.
189thread_file=
190# Reinitialize these from the flag values every loop pass, since some
191# configure entries modify them.
192gas="$gas_flag"
193gnu_ld="$gnu_ld_flag"
2121a768 194default_use_cxa_atexit=no
6ab185d6 195target_gtfiles=
4977bab6 196need_64bit_hwint=
61ed06c3 197
ec2a60b0
NN
198# Default to not using fixproto. Targets which need fixproto should
199# specifically set this to 'yes'.
200use_fixproto=no
587dc9c6 201
6a38414a
NN
202# Don't carry these over build->host->target. Please.
203xm_file=
204md_file=
205
9340544b 206# Obsolete configurations.
b01bc573 207case ${target} in
68d154b9 208 mt-* \
4f605349
JM
209 | strongarm*-* \
210 | ep9312*-* \
211 | xscale*-* \
212 | parisc*-* \
213 | m680[012]0-* \
214 | *-*-beos* \
215 | *-*-kaos* \
216 | *-*-linux*aout* \
217 | *-*-linux*libc1* \
218 | *-*-solaris2.[0-6] \
219 | *-*-solaris2.[0-6].* \
220 | *-*-sysv* \
221 | *-*-windiss* \
222 | alpha*-*-unicosmk* \
223 | cris-*-aout \
224 | hppa1.1-*-pro* \
225 | hppa1.1-*-osf* \
226 | hppa1.1-*-bsd* \
227 | i[34567]86-sequent-ptx4* \
4f605349
JM
228 | i[34567]86-*-sco3.2v5* \
229 | i[34567]86-*-uwin* \
230 | powerpc-*-chorusos* \
231 | vax-*-bsd* \
232 | vax-*-ultrix* \
fe15407d 233 )
8998d5bf 234 if test "x$enable_obsolete" != xyes; then
b01bc573 235 echo "*** Configuration ${target} is obsolete." >&2
9340544b
ZW
236 echo "*** Specify --enable-obsolete to build it anyway." >&2
237 echo "*** Support will be REMOVED in the next major release of GCC," >&2
238 echo "*** unless a maintainer comes forward." >&2
239 exit 1
240 fi;;
9340544b
ZW
241esac
242
7c942e17
ZW
243# Unsupported targets list. Do not put an entry in this list unless
244# it would otherwise be caught by a more permissive pattern. The list
245# should be in alphabetical order.
b01bc573 246case ${target} in
7c942e17 247 alpha*-*-linux*libc1* \
8e3a7070 248 | i[34567]86-sequent-sysv \
2d3359eb 249 | i[34567]86-sequent-sysv[123]* \
7c942e17
ZW
250 | i[34567]86-go32-* \
251 | i[34567]86-*-go32* \
252 | m68k-*-linux*aout* \
253 | m68k-*-linux*libc1* \
254 | mips64orion*-*-rtems* \
255 | powerpc-*-linux*libc1* \
256 | sparc-*-linux*aout* \
257 | sparc-*-linux*libc1* \
258 | sparc-hal-solaris2* \
259 | thumb-*-* \
260 | *-*-linux*coff* \
261 | *-*-linux*oldld* \
262 | *-*-rtemsaout* \
263 | *-*-rtemscoff* \
9ab346a1 264 | vax-*-vms* \
7c942e17 265 )
b01bc573 266 echo "*** Configuration ${target} not supported" 1>&2
7c942e17
ZW
267 exit 1
268 ;;
269esac
270
61ed06c3 271# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
ba1e6c0b
JM
272# updated in each machine entry. Also set default extra_headers for some
273# machines.
61ed06c3 274tm_p_file=
b01bc573 275cpu_type=`echo ${target} | sed 's/-.*$//'`
a8e04fe6 276cpu_is_64bit=
b01bc573 277case ${target} in
38b2d076
DD
278m32c*-*-*)
279 cpu_type=m32c
280 tmake_file=m32c/t-m32c
281 ;;
61ed06c3
HPN
282alpha*-*-*)
283 cpu_type=alpha
4977bab6 284 need_64bit_hwint=yes
61ed06c3 285 ;;
2beef00e
AO
286am33_2.0-*-linux*)
287 cpu_type=mn10300
288 ;;
150b72ed
DJ
289strongarm*-*-*)
290 cpu_type=arm
291 ;;
292arm*-*-*)
293 cpu_type=arm
88f77cba 294 extra_headers="mmintrin.h arm_neon.h"
b76c3c4b
PB
295 c_target_objs="arm-c.o"
296 cxx_target_objs="arm-c.o"
150b72ed 297 ;;
0d4a78eb
BS
298bfin*-*)
299 cpu_type=bfin
300 ;;
99c5227a
HPN
301crisv32-*)
302 cpu_type=cris
303 ;;
150b72ed
DJ
304ep9312*-*-*)
305 cpu_type=arm
306 ;;
faf9ab98
AH
307frv*) cpu_type=frv
308 ;;
7d33c31d
KH
309fido-*-*)
310 cpu_type=m68k
311 extra_headers=math-68881.h
312 ;;
150b72ed 313xscale-*-*)
d19fb8e3 314 cpu_type=arm
5a9335ef 315 extra_headers="mmintrin.h"
d19fb8e3 316 ;;
61ed06c3
HPN
317i[34567]86-*-*)
318 cpu_type=i386
b3172cab 319 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
3b8dd071 320 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
8b96a312
L
321 nmmintrin.h bmmintrin.h mmintrin-common.h
322 wmmintrin.h"
61ed06c3 323 ;;
14f73b5a
JH
324x86_64-*-*)
325 cpu_type=i386
b3172cab 326 extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
3b8dd071 327 pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
8b96a312
L
328 nmmintrin.h bmmintrin.h mmintrin-common.h
329 wmmintrin.h"
4977bab6 330 need_64bit_hwint=yes
14f73b5a 331 ;;
817e13c4
JM
332ia64-*-*)
333 extra_headers=ia64intrin.h
4977bab6 334 need_64bit_hwint=yes
817e13c4 335 ;;
c21a2372 336hppa*-*-* | parisc*-*-*)
61ed06c3
HPN
337 cpu_type=pa
338 ;;
ad126521
KI
339m32r*-*-*)
340 cpu_type=m32r
341 ;;
2fd95d71 342m680[012]0-*-*)
61ed06c3 343 cpu_type=m68k
ba1e6c0b
JM
344 extra_headers=math-68881.h
345 ;;
346m68k-*-*)
347 extra_headers=math-68881.h
61ed06c3
HPN
348 ;;
349mips*-*-*)
350 cpu_type=mips
4977bab6 351 need_64bit_hwint=yes
61ed06c3 352 ;;
61ed06c3
HPN
353powerpc*-*-*)
354 cpu_type=rs6000
437cc56a 355 extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h"
4977bab6 356 need_64bit_hwint=yes
a8e04fe6 357 case x$with_cpu in
a951757d 358 xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456]|xpower6x|xrs64a|xcell)
a8e04fe6
AM
359 cpu_is_64bit=yes
360 ;;
361 esac
4977bab6
ZW
362 ;;
363rs6000*-*-*)
364 need_64bit_hwint=yes
365 ;;
bdcee471
CL
366score*-*-*)
367 cpu_type=score
368 ;;
61ed06c3
HPN
369sparc*-*-*)
370 cpu_type=sparc
5f7ca34b 371 need_64bit_hwint=yes
61ed06c3 372 ;;
85d9c13c
TS
373spu*-*-*)
374 cpu_type=spu
375 need_64bit_hwint=yes
376 ;;
4977bab6 377s390*-*-*)
6cecb0aa 378 cpu_type=s390
4977bab6
ZW
379 need_64bit_hwint=yes
380 ;;
b4eb03fe 381# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
a1fcb9a1 382sh[123456789lbe]*-*-* | sh-*-*)
fa5322fa 383 cpu_type=sh
4977bab6 384 need_64bit_hwint=yes
fa5322fa 385 ;;
61ed06c3
HPN
386esac
387
388tm_file=${cpu_type}/${cpu_type}.h
b6d7afec 389if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
61ed06c3 390then
b6d7afec
ZW
391 tm_p_file=${cpu_type}/${cpu_type}-protos.h
392fi
1c0ca89d
ZW
393extra_modes=
394if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
395then
396 extra_modes=${cpu_type}/${cpu_type}-modes.def
397fi
75685792
RS
398if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
399then
400 extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
401fi
e564e618 402
b01bc573 403case ${target} in
922e3e33
UB
404i[34567]86-*-*)
405 if test $enable_cld = yes; then
406 tm_defines="${tm_defines} USE_IX86_CLD=1"
407 fi
408 ;;
e564e618
DB
409x86_64-*-*)
410 tm_file="i386/biarch64.h ${tm_file}"
922e3e33
UB
411 if test $enable_cld = yes; then
412 tm_defines="${tm_defines} USE_IX86_CLD=1"
413 fi
e564e618
DB
414 ;;
415esac
416
61ed06c3 417# On a.out targets, we need to use collect2.
b01bc573 418case ${target} in
61ed06c3
HPN
419*-*-*aout*)
420 use_collect2=yes
421 ;;
0e5a4ad8 422esac
61ed06c3 423
4977bab6 424# Common parts for widely ported systems.
b01bc573 425case ${target} in
4d6d5bb2 426*-*-darwin*)
80c85ca2
MS
427 tm_file="${tm_file} darwin.h"
428 case ${target} in
429 *-*-darwin9*)
430 tm_file="${tm_file} darwin9.h"
431 ;;
432 esac
433 tm_file="${tm_file} ${cpu_type}/darwin.h"
4d6d5bb2 434 tm_p_file="${tm_p_file} darwin-protos.h"
040b1c5a 435 tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
4d6d5bb2 436 target_gtfiles="\$(srcdir)/config/darwin.c"
6ac49599 437 extra_options="${extra_options} darwin.opt"
4d6d5bb2
NN
438 c_target_objs="darwin-c.o"
439 cxx_target_objs="darwin-c.o"
c776a6d0 440 fortran_target_objs="darwin-f.o"
4d6d5bb2 441 extra_objs="darwin.o"
e46b55d0 442 extra_gcc_objs="darwin-driver.o"
747b9f55 443 default_use_cxa_atexit=yes
4d6d5bb2
NN
444 case ${enable_threads} in
445 "" | yes | posix) thread_file='posix' ;;
446 esac
447 ;;
448*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
449 # This is the place-holder for the generic a.out configuration
450 # of FreeBSD. No actual configuration resides here since
451 # there was only ever a bare-bones ix86 configuration for
452 # a.out and it exists solely in the machine-specific section.
453 # This place-holder must exist to avoid dropping into
454 # the generic ELF configuration of FreeBSD (i.e. it must be
455 # ordered before that section).
456 ;;
457*-*-freebsd*)
458 # This is the generic ELF configuration of FreeBSD. Later
459 # machine-specific sections may refine and add to this
460 # configuration.
461 #
462 # Due to tm_file entry ordering issues that vary between cpu
463 # architectures, we only define fbsd_tm_file to allow the
464 # machine-specific section to dictate the final order of all
465 # entries of tm_file with the minor exception that components
466 # of the tm_file set here will always be of the form:
467 #
468 # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
469 #
470 # The machine-specific section should not tamper with this
471 # ordering but may order all other entries of tm_file as it
472 # pleases around the provided core setting.
473 gas=yes
474 gnu_ld=yes
475 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
b2449d40
CR
476 fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
477 tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
4d6d5bb2
NN
478 tmake_file="t-slibgcc-elf-ver t-freebsd"
479 case ${enable_threads} in
480 no)
481 fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
482 ;;
769e49eb 483 "" | yes | posix)
4d6d5bb2
NN
484 thread_file='posix'
485 tmake_file="${tmake_file} t-freebsd-thread"
486 # Before 5.0, FreeBSD can't bind shared libraries to -lc
487 # when "optionally" threaded via weak pthread_* checks.
488 case ${target} in
489 *-*-freebsd[34] | *-*-freebsd[34].*)
490 tmake_file="${tmake_file} t-slibgcc-nolc-override"
491 ;;
492 esac
493 ;;
f7288899 494 *)
4d6d5bb2
NN
495 echo 'Unknown thread configuration for FreeBSD'
496 exit 1
497 ;;
498 esac
499 fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
500 ;;
e3029773
NN
501*-*-linux*libc1* | *-*-linux*aout*)
502 # Avoid the generic linux case.
503 ;;
cfafe973 504*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
4d6d5bb2 505 # Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
e3029773 506 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
464aea98 507 extra_options="${extra_options} linux.opt"
e3029773
NN
508 gas=yes
509 gnu_ld=yes
510 case ${enable_threads} in
511 "" | yes | posix) thread_file='posix' ;;
512 esac
65d151a7 513 tmake_file="t-slibgcc-elf-ver t-linux"
464aea98
JM
514 case ${target} in
515 *-*-*uclibc*)
7bd85ce0
JM
516 tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
517 ;;
518 *)
519 tm_defines="${tm_defines} UCLIBC_DEFAULT=0"
464aea98
JM
520 ;;
521 esac
c5dde55b
NC
522 # Assume that glibc or uClibc are being used and so __cxa_atexit is provided.
523 default_use_cxa_atexit=yes
1617e5ee 524 use_gcc_tgmath=no
e3029773 525 ;;
5eeab2e3 526*-*-gnu*)
e3029773
NN
527 # On the Hurd, the setup is just about the same on
528 # each different CPU. The specific machines that we
529 # support are matched above and just set $cpu_type.
530 tm_file="${cpu_type}/gnu.h"
531 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
532 # GNU tools are the only tools.
533 gas=yes
534 gnu_ld=yes
535 # These details are the same as for Linux.
536 # But here we need a little extra magic.
537 tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
538 case ${target} in
539 alpha*)
540 tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
541 ;;
542 i[34567]86-*-*)
543 tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h gnu.h ${tm_file}"
544 ;;
545 esac
c5dde55b
NC
546 # Assume that glibc is being used and so __cxa_atexit is provided.
547 default_use_cxa_atexit=yes
1617e5ee 548 use_gcc_tgmath=no
e3029773 549 ;;
f982f805 550*-*-netbsd*)
e3029773
NN
551 tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
552 gas=yes
553 gnu_ld=yes
51b7c247 554
e3029773
NN
555 # NetBSD 2.0 and later get POSIX threads enabled by default.
556 # Allow them to be explicitly enabled on any other version.
557 case ${enable_threads} in
558 "")
559 case ${target} in
560 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
561 thread_file='posix'
562 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
563 ;;
564 esac
565 ;;
566 yes | posix)
567 thread_file='posix'
568 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
569 ;;
570 esac
1169f9e0 571
e3029773
NN
572 # NetBSD 1.7 and later are set up to use GCC's crtstuff for
573 # ELF configurations. We will clear extra_parts in the
574 # a.out configurations.
575 case ${target} in
576 *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
577 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
578 ;;
579 esac
2121a768 580
e3029773
NN
581 # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
582 # default (unless overridden by --disable-__cxa_atexit).
583 case ${target} in
584 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
585 default_use_cxa_atexit=yes
586 ;;
587 esac
588 ;;
4d6d5bb2
NN
589*-*-openbsd*)
590 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
e3029773 591 case ${enable_threads} in
4d6d5bb2 592 yes)
e3029773 593 thread_file='posix'
4d6d5bb2 594 tmake_file="${tmake_file} t-openbsd-thread"
e3029773
NN
595 ;;
596 esac
378b66d4
ME
597 case ${target} in
598 *-*-openbsd2.*|*-*-openbsd3.[012])
599 tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
600 esac
e3029773 601 ;;
8179b3c8
NN
602*-*-rtems*)
603 case ${enable_threads} in
604 yes) thread_file='rtems' ;;
605 esac
606 ;;
4977bab6 607*-*-vxworks*)
e3029773 608 tmake_file=t-vxworks
2eab15c9
PE
609 xm_defines=POSIX
610 extra_options="${extra_options} vxworks.opt"
b2f4bed8 611 extra_objs=vxworks.o
55047c9d
PE
612 case ${enable_threads} in
613 no) ;;
614 "" | yes | vxworks) thread_file='vxworks' ;;
615 *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
616 esac
e3029773 617 ;;
c5dde55b
NC
618*-*-elf)
619 # Assume that newlib is being used and so __cxa_atexit is provided.
620 default_use_cxa_atexit=yes
621 ;;
61ed06c3
HPN
622esac
623
b01bc573 624case ${target} in
61ed06c3
HPN
625# Support site-specific machine types.
626*local*)
b01bc573 627 rest=`echo ${target} | sed -e "s/$cpu_type-//"`
61ed06c3 628 tm_file=${cpu_type}/$rest.h
4dc0535b
ZW
629 if test -f $srcdir/config/${cpu_type}/xm-$rest.h
630 then xm_file=${cpu_type}/xm-$rest.h
61ed06c3 631 fi
4dc0535b
ZW
632 if test -f $srcdir/config/${cpu_type}/t-$rest
633 then tmake_file=${cpu_type}/t-$rest
61ed06c3
HPN
634 fi
635 ;;
30102605
RH
636alpha*-*-unicosmk*)
637 use_collect2=yes
638 tm_file="${tm_file} alpha/unicosmk.h"
0e5a4ad8 639
30102605
RH
640 # Don't include t-ieee for now because we don't support that yet
641 # tmake_file="alpha/t-ieee"
642 tmake_file="alpha/t-unicosmk"
ec2a60b0 643 use_fixproto=yes
30102605 644 ;;
61ed06c3
HPN
645alpha*-*-linux*)
646 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
647 target_cpu_default="MASK_GAS"
fbf2ca7b 648 tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
61ed06c3 649 ;;
83248d49
RM
650alpha*-*-gnu*)
651 target_cpu_default="MASK_GAS"
652 tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
653 ;;
61ed06c3 654alpha*-*-freebsd*)
9e405fe5 655 tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
61ed06c3 656 target_cpu_default="MASK_GAS"
cea3bd3e
RH
657 tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
658 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
61ed06c3
HPN
659 ;;
660alpha*-*-netbsd*)
f982f805 661 tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
61ed06c3 662 target_cpu_default="MASK_GAS"
cea3bd3e 663 tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
61ed06c3 664 ;;
61ed06c3 665alpha*-*-openbsd*)
620b87b3 666 tm_defines="${tm_defines} OBSD_NO_DYNAMIC_LIBRARIES OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
ca11c37c 667 tm_file="alpha/alpha.h openbsd.h alpha/openbsd.h"
61ed06c3
HPN
668 # default x-alpha is only appropriate for dec-osf.
669 target_cpu_default="MASK_GAS"
670 tmake_file="alpha/t-alpha alpha/t-ieee"
671 ;;
c7bdf0a6 672alpha*-dec-osf[45]*)
61ed06c3
HPN
673 if test x$stabs = xyes
674 then
675 tm_file="${tm_file} dbx.h"
676 fi
677 if test x$gas != xyes
678 then
679 extra_passes="mips-tfile mips-tdump"
680 fi
681 use_collect2=yes
c7bdf0a6
ZW
682 tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4"
683 tm_file="${tm_file} alpha/osf.h"
817e13c4 684 extra_headers=va_list.h
b01bc573 685 case ${target} in
61ed06c3 686 *-*-osf4*)
d432c7a5 687 # Define TARGET_SUPPORT_ARCH except on 4.0a.
b01bc573 688 case ${target} in
c7bdf0a6 689 *-*-osf4.0a) ;;
620b87b3 690 *) tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
c7bdf0a6 691 esac
61ed06c3
HPN
692 ;;
693 *-*-osf5*)
c7bdf0a6 694 tm_file="${tm_file} alpha/osf5.h"
620b87b3 695 tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
61ed06c3
HPN
696 ;;
697 esac
769e49eb
NN
698 case ${enable_threads} in
699 "" | yes | posix)
2a4e8ebc
RO
700 thread_file='posix'
701 tmake_file="${tmake_file} alpha/t-osf-pthread"
702 ;;
703 esac
61ed06c3 704 ;;
b6bfa876 705alpha64-dec-*vms*)
cf0005c6 706 tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
4977bab6 707 xm_file="alpha/xm-vms.h"
b6bfa876 708 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-vms64 alpha/t-ieee"
b6bfa876
DR
709 prefix=/gnu
710 local_prefix=/gnu
711 ;;
ef057c45 712alpha*-dec-*vms*)
cf0005c6 713 tm_file="${tm_file} alpha/vms.h"
4dc0535b 714 xm_file=alpha/xm-vms.h
61ed06c3 715 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
ef057c45
DR
716 prefix=/gnu
717 local_prefix=/gnu
61ed06c3 718 ;;
2cc07db4 719arc-*-elf*)
c40409ce 720 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
2cc07db4 721 extra_parts="crtinit.o crtfini.o"
ec2a60b0 722 use_fixproto=yes
2cc07db4 723 ;;
61ed06c3 724arm-*-coff* | armel-*-coff*)
ca11c37c 725 tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h"
315cd6b5 726 tmake_file="arm/t-arm arm/t-arm-coff"
61ed06c3 727 ;;
55047c9d 728arm-wrs-vxworks)
c447f774 729 tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
2f71a20a 730 tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
55047c9d 731 ;;
5742588d
DB
732arm*-*-freebsd*|strongarm*-*-freebsd*)
733 tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
2f71a20a 734 tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
5742588d 735 ;;
69474c3c 736arm*-*-netbsdelf*)
ff3afb56 737 tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
2f71a20a 738 tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
69474c3c 739 ;;
61ed06c3 740arm*-*-netbsd*)
f982f805 741 tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
2f71a20a 742 tmake_file="t-netbsd arm/t-arm arm/t-netbsd"
1169f9e0 743 extra_parts=""
5721cd84 744 use_collect2=yes
61ed06c3 745 ;;
14879e76 746arm*-*-linux*) # ARM GNU/Linux with ELF
f7288899 747 tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
d3a9662c
BF
748 case $target in
749 arm*b-*)
750 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
751 ;;
752 esac
077fc835 753 tmake_file="${tmake_file} t-linux arm/t-arm"
077fc835 754 case ${target} in
464aea98 755 arm*-*-linux-*eabi)
077fc835
KH
756 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
757 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
f7288899 758 # The BPABI long long divmod functions return a 128-bit value in
077fc835
KH
759 # registers r0-r3. Correctly modeling that requires the use of
760 # TImode.
761 need_64bit_hwint=yes
762 # The EABI requires the use of __cxa_atexit.
763 default_use_cxa_atexit=yes
764 ;;
765 *)
766 tmake_file="$tmake_file arm/t-linux"
767 ;;
768 esac
769 tm_file="$tm_file arm/aout.h arm/arm.h"
bf98ec6c 770 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
61ed06c3
HPN
771 ;;
772arm*-*-uclinux*) # ARM ucLinux
433d52fd 773 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
2f71a20a 774 tmake_file="arm/t-arm arm/t-arm-elf"
c147eacb
PB
775 case ${target} in
776 arm*-*-uclinux-*eabi)
777 tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
778 tmake_file="$tmake_file arm/t-bpabi"
779 # The BPABI long long divmod functions return a 128-bit value in
780 # registers r0-r3. Correctly modeling that requires the use of
781 # TImode.
782 need_64bit_hwint=yes
783 # The EABI requires the use of __cxa_atexit.
784 default_use_cxa_atexit=yes
785 esac
786 tm_file="$tm_file arm/aout.h arm/arm.h"
bf98ec6c 787 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
61ed06c3 788 ;;
61ed06c3 789arm*-*-ecos-elf)
c40409ce 790 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
315cd6b5 791 tmake_file="arm/t-arm arm/t-arm-elf"
bf98ec6c 792 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
0e5a4ad8 793 ;;
b3f8d95d 794arm*-*-eabi* | arm*-*-symbianelf* )
f7288899 795 # The BPABI long long divmod functions return a 128-bit value in
b3f8d95d
MM
796 # registers r0-r3. Correctly modeling that requires the use of
797 # TImode.
798 need_64bit_hwint=yes
e6fc6c9b 799 default_use_cxa_atexit=yes
b3f8d95d 800 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
0393a68a 801 tmake_file="arm/t-arm arm/t-arm-elf"
b3f8d95d 802 case ${target} in
f9a02408
MM
803 arm*-*-eabi*)
804 tmake_file="${tmake_file} arm/t-bpabi"
805 ;;
b3f8d95d
MM
806 arm*-*-symbianelf*)
807 tm_file="${tm_file} arm/symbian.h"
f9a02408
MM
808 # We do not include t-bpabi for Symbian OS because the system
809 # provides its own implementation of the BPABI functions.
c0354bf4 810 tmake_file="${tmake_file} arm/t-symbian"
b3f8d95d
MM
811 ;;
812 esac
813 tm_file="${tm_file} arm/aout.h arm/arm.h"
bf98ec6c 814 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
336bd6ac 815 ;;
f22b4bc4 816arm*-*-rtems*)
f22b4bc4 817 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
70d64189 818 tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
bf98ec6c 819 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
f22b4bc4 820 ;;
9b6b54e2 821arm*-*-elf | ep9312-*-elf)
c40409ce 822 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
2f71a20a 823 tmake_file="arm/t-arm arm/t-arm-elf"
bf98ec6c 824 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
61ed06c3 825 ;;
52f97a3b 826arm*-wince-pe*)
ca11c37c 827 tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
2f71a20a 828 tmake_file="arm/t-arm arm/t-wince-pe"
c54c7322 829 extra_options="${extra_options} arm/pe.opt"
52f97a3b
NC
830 extra_objs="pe.o"
831 ;;
61ed06c3 832arm-*-pe*)
ca11c37c 833 tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h"
2f71a20a 834 tmake_file="arm/t-arm arm/t-pe"
c54c7322 835 extra_options="${extra_options} arm/pe.opt"
61ed06c3
HPN
836 extra_objs="pe.o"
837 ;;
6b3a0b34
US
838arm*-*-kaos*)
839 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-arm.h"
2f71a20a 840 tmake_file="arm/t-arm arm/t-arm-elf"
bf98ec6c 841 tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
6b3a0b34 842 ;;
63933fc3
RC
843avr-*-rtems*)
844 tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h"
91ff9507 845 tmake_file="avr/t-avr t-rtems avr/t-rtems"
63933fc3 846 ;;
61ed06c3 847avr-*-*)
ca11c37c 848 tm_file="avr/avr.h dbxelf.h"
ec2a60b0 849 use_fixproto=yes
61ed06c3 850 ;;
0d4a78eb
BS
851bfin*-elf*)
852 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h"
6bad46f7
JZ
853 tmake_file=bfin/t-bfin-elf
854 use_collect2=no
855 ;;
1f4174d4 856bfin*-uclinux*)
cfb6473a 857 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h bfin/uclinux.h"
6bad46f7
JZ
858 tmake_file=bfin/t-bfin-uclinux
859 tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
cfb6473a 860 extra_options="${extra_options} linux.opt"
6bad46f7
JZ
861 use_collect2=no
862 ;;
344189f9 863bfin*-linux-uclibc*)
ea2382be 864 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h bfin/linux.h ./linux-sysroot-suffix.h"
6bad46f7
JZ
865 tmake_file="t-slibgcc-elf-ver bfin/t-bfin-linux"
866 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
867 use_collect2=no
868 ;;
152167d5
RC
869bfin*-rtems*)
870 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h"
871 tmake_file="bfin/t-bfin t-rtems bfin/t-rtems"
6bad46f7 872 ;;
0d4a78eb
BS
873bfin*-*)
874 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h"
6bad46f7
JZ
875 tmake_file=bfin/t-bfin
876 use_collect2=no
877 ;;
0b85d816 878cris-*-aout)
32fb7c9d 879 tm_file="dbxelf.h ${tm_file} cris/aout.h"
0b85d816
HPN
880 gas=yes
881 tmake_file="cris/t-cris cris/t-aout"
2a186d97 882 extra_options="${extra_options} cris/aout.opt"
0b85d816 883 ;;
99c5227a
HPN
884crisv32-*-elf | crisv32-*-none)
885 tm_file="dbxelf.h elfos.h ${tm_file}"
886 tmake_file="cris/t-cris"
887 target_cpu_default=32
888 gas=yes
889 extra_options="${extra_options} cris/elf.opt"
890 ;;
0b85d816 891cris-*-elf | cris-*-none)
c40409ce 892 tm_file="dbxelf.h elfos.h ${tm_file}"
0b85d816
HPN
893 tmake_file="cris/t-cris cris/t-elfmulti"
894 gas=yes
2a186d97 895 extra_options="${extra_options} cris/elf.opt"
0b85d816 896 ;;
99c5227a 897crisv32-*-linux* | cris-*-linux*)
c40409ce 898 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
65d151a7 899 # We need to avoid using t-linux, so override default tmake_file
3fc87ac1 900 tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
2a186d97 901 extra_options="${extra_options} cris/linux.opt"
99c5227a
HPN
902 case $target in
903 cris-*-*)
904 target_cpu_default=10
905 ;;
906 crisv32-*-*)
907 target_cpu_default=32
908 ;;
909 esac
0b85d816 910 ;;
db869733
PW
911crx-*-elf)
912 tm_file="elfos.h ${tm_file}"
913 extra_parts="crtbegin.o crtend.o"
914 use_collect2=no
915 ;;
61ed06c3 916fr30-*-elf)
c40409ce 917 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
61ed06c3
HPN
918 tmake_file=fr30/t-fr30
919 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
ec2a60b0 920 use_fixproto=yes
61ed06c3 921 ;;
36a05131
BS
922frv-*-elf)
923 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} frv/frv-abi.h"
924 tmake_file=frv/t-frv
ec2a60b0 925 use_fixproto=yes
36a05131 926 ;;
34208acf
AO
927frv-*-*linux*)
928 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} \
929 linux.h frv/linux.h frv/frv-abi.h"
65d151a7 930 tmake_file="${tmake_file} frv/t-frv frv/t-linux"
34208acf 931 ;;
4c5bf198
RC
932h8300-*-rtems*)
933 tmake_file="h8300/t-h8300 h8300/t-elf t-rtems h8300/t-rtems"
934 tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h"
935 ;;
9f5b774b
R
936h8300-*-elf*)
937 tmake_file="h8300/t-h8300 h8300/t-elf"
ca11c37c 938 tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h"
ec2a60b0 939 use_fixproto=yes
9f5b774b 940 ;;
61ed06c3 941h8300-*-*)
ca11c37c 942 tm_file="h8300/h8300.h dbxcoff.h h8300/coff.h"
ec2a60b0 943 use_fixproto=yes
61ed06c3 944 ;;
c21a2372 945hppa*64*-*-linux* | parisc*64*-*-linux*)
d711cf67 946 target_cpu_default="MASK_PA_11|MASK_PA_20"
581d9404
JDA
947 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \
948 pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h pa/pa64-linux.h"
65d151a7 949 tmake_file="${tmake_file} pa/t-linux64"
c21a2372 950 gas=yes gnu_ld=yes
4977bab6 951 need_64bit_hwint=yes
c21a2372
AM
952 ;;
953hppa*-*-linux* | parisc*-*-linux*)
d711cf67 954 target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
c40409ce 955 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \
c21a2372 956 pa/pa32-regs.h pa/pa32-linux.h"
65d151a7 957 tmake_file="${tmake_file} pa/t-linux"
4720d5ca
JDA
958 # Set the libgcc version number
959 if test x$sjlj = x1; then
960 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
961 else
962 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
8c958ed2 963 fi
61ed06c3 964 ;;
ca11c37c
ZW
965# port not yet contributed.
966#hppa*-*-openbsd*)
d711cf67 967# target_cpu_default="MASK_PA_11"
ca11c37c 968# ;;
61ed06c3 969hppa1.1-*-pro*)
d711cf67
JDA
970 target_cpu_default="MASK_PORTABLE_RUNTIME|MASK_NO_SPACE_REGS|MASK_SOFT_FLOAT"
971 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h \
972 pa/pa-pro-end.h libgloss.h"
587dc9c6 973 tmake_file="pa/t-pro"
61ed06c3
HPN
974 ;;
975hppa1.1-*-osf*)
d711cf67 976 target_cpu_default="MASK_PA_11"
ca11c37c 977 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h pa/pa-osf.h"
587dc9c6 978 tmake_file="pa/t-pa"
61ed06c3
HPN
979 use_collect2=yes
980 ;;
61ed06c3 981hppa1.1-*-bsd*)
d711cf67 982 target_cpu_default="MASK_PA_11"
ca11c37c 983 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h"
587dc9c6 984 tmake_file="pa/t-pa"
61ed06c3
HPN
985 use_collect2=yes
986 ;;
d711cf67
JDA
987hppa[12]*-*-hpux10*)
988 case ${target} in
989 hppa1.1-*-* | hppa2*-*-*)
990 target_cpu_default="MASK_PA_11"
991 ;;
992 esac
993 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
994 pa/pa-hpux.h pa/pa-hpux10.h"
66617831 995 extra_options="${extra_options} pa/pa-hpux.opt"
d711cf67
JDA
996 case ${target} in
997 *-*-hpux10.[1-9]*)
998 tm_file="${tm_file} pa/pa-hpux1010.h"
66617831 999 extra_options="${extra_options} pa/pa-hpux1010.opt"
d711cf67 1000 ;;
61ed06c3 1001 esac
5a1a4450 1002 tmake_file="pa/t-pa-hpux10 pa/t-pa-hpux pa/t-hpux-shlib"
615be2cf
NN
1003 case ${enable_threads} in
1004 "")
1005 if test x$have_pthread_h = xyes ; then
1006 tmake_file="${tmake_file} pa/t-dce-thr"
1007 fi
1008 ;;
1009 yes | dce)
1010 tmake_file="${tmake_file} pa/t-dce-thr"
1011 ;;
61ed06c3 1012 esac
4720d5ca
JDA
1013 # Set the libgcc version number
1014 if test x$sjlj = x1; then
1015 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1016 else
1017 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
9fb1c9db 1018 fi
61ed06c3 1019 use_collect2=yes
ec2a60b0 1020 use_fixproto=yes
543b6009 1021 gas=yes
61ed06c3
HPN
1022 ;;
1023hppa*64*-*-hpux11*)
d711cf67 1024 target_cpu_default="MASK_PA_11|MASK_PA_20"
7b79fe71
JDA
1025 if test x$gnu_ld = xyes
1026 then
d711cf67 1027 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
7b79fe71 1028 fi
543b6009
SE
1029 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1030 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1031 pa/pa-hpux11.h"
d711cf67 1032 case ${target} in
1fb641a1 1033 *-*-hpux11.[1-9]*)
d711cf67 1034 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
66617831 1035 extra_options="${extra_options} pa/pa-hpux1111.opt"
d711cf67
JDA
1036 ;;
1037 *)
1038 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1039 ;;
1040 esac
66617831
RS
1041 extra_options="${extra_options} pa/pa-hpux.opt \
1042 pa/pa-hpux1010.opt pa/pa64-hpux.opt"
4977bab6 1043 need_64bit_hwint=yes
3f0b8b66 1044 tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib"
4720d5ca
JDA
1045 # Set the libgcc version number
1046 if test x$sjlj = x1; then
1047 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1048 else
1049 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
9fb1c9db 1050 fi
8b89a26a
JDA
1051 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
1052 libgcc_stub.a"
7e2055ec 1053 case x${enable_threads} in
27ca3a61 1054 x | xyes | xposix )
f7288899 1055 thread_file=posix
7e2055ec
ZW
1056 ;;
1057 esac
543b6009 1058 gas=yes
61ed06c3 1059 ;;
d711cf67
JDA
1060hppa[12]*-*-hpux11*)
1061 case ${target} in
1062 hppa1.1-*-* | hppa2*-*-*)
1063 target_cpu_default="MASK_PA_11"
1064 ;;
1065 esac
1066 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
66617831
RS
1067 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1068 extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt"
d711cf67
JDA
1069 case ${target} in
1070 *-*-hpux11.[1-9]*)
1071 tm_file="${tm_file} pa/pa-hpux1111.h"
66617831 1072 extra_options="${extra_options} pa/pa-hpux1111.opt"
7e2055ec
ZW
1073 ;;
1074 esac
5a1a4450 1075 tmake_file="pa/t-pa-hpux11 pa/t-pa-hpux pa/t-hpux-shlib"
4720d5ca
JDA
1076 # Set the libgcc version number
1077 if test x$sjlj = x1; then
1078 tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1079 else
1080 tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
9fb1c9db 1081 fi
7e2055ec 1082 case x${enable_threads} in
27ca3a61 1083 x | xyes | xposix )
f7288899 1084 thread_file=posix
7e2055ec
ZW
1085 ;;
1086 esac
61ed06c3 1087 use_collect2=yes
543b6009 1088 gas=yes
61ed06c3 1089 ;;
b069de3b 1090i[34567]86-*-darwin*)
f7288899 1091 need_64bit_hwint=yes
703706d7
GK
1092
1093 # This is so that '.../configure && make' doesn't fail due to
1094 # config.guess deciding that the configuration is i386-*-darwin* and
1095 # then this file using that to set --with-cpu=i386 which has no -m64
1096 # support.
703706d7 1097 with_cpu=${with_cpu:-generic}
1d2b1d91 1098 tmake_file="${tmake_file} i386/t-fprules-softfp64 soft-fp/t-softfp i386/t-crtpc i386/t-crtfm"
b069de3b 1099 ;;
9519e677 1100x86_64-*-darwin*)
9519e677 1101 with_cpu=${with_cpu:-generic}
1d2b1d91 1102 tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin i386/t-fprules-softfp64 soft-fp/t-softfp i386/t-crtpc i386/t-crtfm"
9519e677
EC
1103 tm_file="${tm_file} ${cpu_type}/darwin64.h"
1104 ;;
61ed06c3 1105i[34567]86-*-elf*)
39ed301b 1106 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
14455c64 1107 tmake_file="i386/t-i386elf t-svr4"
a10dc289
HK
1108 use_fixproto=yes
1109 ;;
1110x86_64-*-elf*)
1111 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/x86-64.h"
1112 tmake_file="i386/t-i386elf t-svr4"
ec2a60b0 1113 use_fixproto=yes
61ed06c3 1114 ;;
61ed06c3 1115i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
70305f2b
RH
1116 if test x$gas = xyes
1117 then
1118 tm_file="${tm_file} usegas.h"
1119 fi
39ed301b 1120 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h"
61ed06c3
HPN
1121 tmake_file=t-svr4
1122 extra_parts="crtbegin.o crtend.o"
ec2a60b0 1123 use_fixproto=yes
61ed06c3 1124 ;;
61ed06c3 1125i[34567]86-*-aout*)
39ed301b 1126 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/i386-aout.h"
ec2a60b0 1127 use_fixproto=yes
61ed06c3
HPN
1128 ;;
1129i[34567]86-*-beoself* | i[34567]86-*-beos*)
61ed06c3 1130 tmake_file='i386/t-beos i386/t-crtpic'
39ed301b 1131 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/beos-elf.h"
61ed06c3
HPN
1132 extra_parts='crtbegin.o crtend.o'
1133 ;;
61ed06c3 1134i[34567]86-*-freebsd*)
39ed301b 1135 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
e564e618
DB
1136 ;;
1137x86_64-*-freebsd*)
39ed301b 1138 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"
d3ef67ea 1139 tmake_file="${tmake_file} i386/t-crtstuff"
61ed06c3 1140 ;;
6ea0279f 1141i[34567]86-*-netbsdelf*)
39ed301b 1142 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
6ea0279f 1143 ;;
61ed06c3 1144i[34567]86-*-netbsd*)
39ed301b 1145 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
61ed06c3 1146 tmake_file=t-netbsd
1169f9e0 1147 extra_parts=""
5721cd84 1148 use_collect2=yes
61ed06c3 1149 ;;
7c884404 1150x86_64-*-netbsd*)
39ed301b 1151 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"
d3ef67ea 1152 tmake_file="${tmake_file} i386/t-crtstuff"
7c884404 1153 ;;
378b66d4 1154i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
ca11c37c 1155 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"
f1cf4606
ME
1156 # needed to unconfuse gdb
1157 tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
61ed06c3
HPN
1158 # we need collect2 until our bug is fixed...
1159 use_collect2=yes
1160 ;;
378b66d4 1161i[34567]86-*-openbsd*)
75a3bd9d 1162 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
378b66d4
ME
1163 tm_file="${tm_file} openbsd.h i386/openbsdelf.h"
1164 gas=yes
1165 gnu_ld=yes
378b66d4 1166 ;;
61ed06c3 1167i[34567]86-*-coff*)
39ed301b 1168 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
ec2a60b0 1169 use_fixproto=yes
61ed06c3 1170 ;;
cfafe973
RM
1171i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
1172 # Intel 80386's running GNU/*
61ed06c3 1173 # with ELF format using glibc 2
0f45f0f5 1174 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h"
cfafe973 1175 case ${target} in
0f45f0f5
JM
1176 i[34567]86-*-linux*)
1177 if test x$enable_targets = xall; then
1178 tm_file="${tm_file} i386/x86-64.h i386/linux64.h"
1179 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
27735edb 1180 tmake_file="${tmake_file} i386/t-linux64 i386/t-fprules-softfp64 soft-fp/t-softfp"
0f45f0f5
JM
1181 need_64bit_hwint=yes
1182 # FIXME: -m64 for i[34567]86-*-* should be allowed just
1183 # like -m32 for x86_64-*-*.
1184 case X"${with_cpu}" in
aafc814c 1185 Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
0f45f0f5
JM
1186 ;;
1187 X)
1188 with_cpu=generic
1189 ;;
1190 *)
1191 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
aafc814c 1192 echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
0f45f0f5
JM
1193 exit 1
1194 ;;
1195 esac
1196 else
1197 tm_file="${tm_file} i386/linux.h"
1198 fi
1199 ;;
1200 i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
1201 i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
cfafe973 1202 esac
577565f9 1203 tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
61ed06c3 1204 ;;
44379973 1205x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
39ed301b 1206 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \
32fb7c9d 1207 i386/x86-64.h i386/linux64.h"
44379973
RM
1208 case ${target} in
1209 x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
1210 x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
1211 esac
d3ef67ea 1212 tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm i386/t-fprules-softfp64 soft-fp/t-softfp t-dfprules"
14f73b5a 1213 ;;
61ed06c3 1214i[34567]86-*-gnu*)
61ed06c3 1215 ;;
61ed06c3
HPN
1216i[34567]86-pc-msdosdjgpp*)
1217 xm_file=i386/xm-djgpp.h
267409e8 1218 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
5dd8a9b1 1219 tmake_file=i386/t-djgpp
6ac49599 1220 extra_options="${extra_options} i386/djgpp.opt"
61ed06c3
HPN
1221 gnu_ld=yes
1222 gas=yes
61ed06c3 1223 ;;
61ed06c3 1224i[34567]86-*-lynxos*)
4f587cb0
AN
1225 xm_defines=POSIX
1226 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1227 tmake_file="i386/t-crtstuff t-lynx"
1228 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
6ac49599 1229 extra_options="${extra_options} lynx.opt"
4f587cb0
AN
1230 thread_file=lynx
1231 gnu_ld=yes
1232 gas=yes
61ed06c3 1233 ;;
61fec9ff 1234i[3456x]86-*-netware*)
f199d860 1235 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h tm-dwarf2.h i386/netware.h"
61fec9ff
JB
1236 tmake_file=i386/t-netware
1237 extra_objs=netware.o
1238 case /${with_ld} in
1239 */nwld)
1240 extra_objs="$extra_objs nwld.o"
1241 tm_file="${tm_file} i386/nwld.h"
1242 tmake_file="${tmake_file} i386/t-nwld"
1243 extra_parts="crt0.o libgcc.def libc.def libcpre.def posixpre.def"
1244 ;;
1245 esac
1246 case x${enable_threads} in
1247 x | xyes | xposix) thread_file='posix';;
1248 xnks) thread_file='nks';;
1249 xno) ;;
1250 *) echo 'Unknown thread configuration for NetWare' >&2; exit 1;;
1251 esac
1252 ;;
f2feed2c 1253i[34567]86-*-nto-qnx*)
ca11c37c 1254 tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h svr4.h i386/unix.h i386/nto.h"
f2feed2c
GP
1255 tmake_file=i386/t-nto
1256 gnu_ld=yes
1257 gas=yes
1258 ;;
c7bdf0a6 1259i[34567]86-*-rtems*)
39ed301b 1260 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h"
61ed06c3
HPN
1261 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1262 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1263 ;;
1264i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
ac24fc99 1265 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sco5.h"
61ed06c3
HPN
1266 if test x$gas = xyes
1267 then
70305f2b 1268 tm_file="usegas.h ${tm_file}"
61ed06c3 1269 fi
ac24fc99
KJ
1270 tmake_file=i386/t-sco5
1271 extra_parts="crtbegin.o crtend.o"
6ac49599 1272 extra_options="${extra_options} i386/sco5.opt"
ec2a60b0 1273 use_fixproto=yes
61ed06c3 1274 ;;
61ed06c3 1275i[34567]86-*-solaris2*)
18167442
EB
1276 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h"
1277 case ${target} in
1278 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
ec23ed60
EB
1279 tm_file="${tm_file} sol2-6.h"
1280 ;;
1281 *-*-solaris2.1[0-9]*)
1282 tm_file="${tm_file} sol2-10.h"
1283 ;;
18167442
EB
1284 esac
1285 tm_file="${tm_file} i386/sol2.h"
a2bec818
DJ
1286 tmake_file="t-sol2 i386/t-sol2 t-svr4"
1287 c_target_objs="sol2-c.o"
1288 cxx_target_objs="sol2-c.o"
07a43492
DJ
1289 extra_objs="sol2.o"
1290 tm_p_file="${tm_p_file} sol2-protos.h"
7b3a4df5
RH
1291 if test x$gnu_ld = xyes; then
1292 tmake_file="$tmake_file t-slibgcc-elf-ver"
a8e68029 1293 tm_defines="${tm_defines} TARGET_GNU_LD=1"
7b3a4df5
RH
1294 else
1295 tmake_file="$tmake_file t-slibgcc-sld"
1296 fi
79387e57
RS
1297 if test x$gas = xyes; then
1298 tm_file="usegas.h ${tm_file}"
1299 fi
04db08db 1300 case ${target} in
f42eccdb 1301 *-*-solaris2.[789] | *-*-solaris2.1[0-9]*)
04db08db
RO
1302 tm_file="$tm_file tm-dwarf2.h"
1303 ;;
1304 esac
a8e68029 1305 case ${target} in
f42eccdb 1306 *-*-solaris2.1[0-9]*)
a8e68029
DJ
1307 tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
1308 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
d3ef67ea 1309 tmake_file="$tmake_file i386/t-crtstuff i386/t-sol2-10"
a8e68029 1310 need_64bit_hwint=yes
28a026d9
L
1311 # FIXME: -m64 for i[34567]86-*-* should be allowed just
1312 # like -m32 for x86_64-*-*.
1313 case X"${with_cpu}" in
aafc814c 1314 Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
28a026d9
L
1315 ;;
1316 X)
1317 with_cpu=generic
1318 ;;
1319 *)
1320 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
aafc814c 1321 echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
28a026d9
L
1322 exit 1
1323 ;;
1324 esac
f7288899 1325 # Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
a8e68029
DJ
1326 # part of the base system.
1327 extra_parts="gmon.o crtbegin.o crtend.o"
1328 ;;
1329 *)
1330 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1331 ;;
1332 esac
615be2cf 1333 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
18167442
EB
1334 "":yes:* | yes:yes:* )
1335 case ${target} in
1336 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
1337 thread_file=posix95
1338 ;;
1339 *)
1340 thread_file=posix
1341 ;;
1342 esac
1343 ;;
1344 "":*:yes | yes:*:yes )
1345 thread_file=solaris
1346 ;;
615be2cf 1347 esac
61ed06c3 1348 ;;
23a535c4 1349i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
39ed301b 1350 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h"
61ed06c3
HPN
1351 if test x$stabs = xyes
1352 then
1353 tm_file="${tm_file} dbx.h"
1354 fi
14455c64 1355 tmake_file="i386/t-crtpic t-svr4"
61ed06c3
HPN
1356 extra_parts="crtbegin.o crtend.o"
1357 if test x$enable_threads = xyes; then
1358 thread_file='posix'
1359 fi
ec2a60b0 1360 use_fixproto=yes
61ed06c3
HPN
1361 ;;
1362i[34567]86-*-sysv4*) # Intel 80386's running system V.4
3d05b15f 1363 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h"
61ed06c3
HPN
1364 if test x$stabs = xyes
1365 then
1366 tm_file="${tm_file} dbx.h"
1367 fi
14455c64 1368 tmake_file="i386/t-crtpic t-svr4"
61ed06c3 1369 extra_parts="crtbegin.o crtend.o"
ec2a60b0 1370 use_fixproto=yes
61ed06c3 1371 ;;
d442d7d9 1372i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
f4de8ba6 1373 tm_file="${tm_file} i386/unix.h i386/att.h elfos.h svr4.h vx-common.h"
d442d7d9
PE
1374 case ${target} in
1375 *-vxworksae*)
f4de8ba6 1376 tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
d442d7d9
PE
1377 tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1378 ;;
1379 *)
f4de8ba6 1380 tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
d442d7d9
PE
1381 tmake_file="${tmake_file} i386/t-vxworks"
1382 ;;
1383 esac
55047c9d 1384 ;;
61ed06c3 1385i[34567]86-*-pe | i[34567]86-*-cygwin*)
70e5e841 1386 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h"
4dc0535b 1387 xm_file=i386/xm-cygwin.h
dc4a2f32 1388 tmake_file="i386/t-cygwin i386/t-cygming"
90aa6719 1389 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
6ac49599 1390 extra_options="${extra_options} i386/cygming.opt"
43d9ad1d 1391 extra_objs="winnt.o winnt-stubs.o"
6590fc9f
KT
1392 c_target_objs="cygwin2.o msformat-c.o"
1393 cxx_target_objs="cygwin2.o winnt-cxx.o msformat-c.o"
30500d84 1394 extra_gcc_objs=cygwin1.o
61ed06c3 1395 if test x$enable_threads = xyes; then
70e5e841 1396 thread_file='posix'
61ed06c3 1397 fi
61ed06c3 1398 ;;
e8930cc1 1399i[34567]86-*-mingw* | x86_64-*-mingw*)
70e5e841 1400 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h"
4dc0535b 1401 xm_file=i386/xm-mingw32.h
70e5e841 1402 tmake_file="i386/t-cygming i386/t-mingw32"
90aa6719 1403 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
6ac49599 1404 extra_options="${extra_options} i386/cygming.opt"
43d9ad1d 1405 extra_objs="winnt.o winnt-stubs.o"
6590fc9f
KT
1406 c_target_objs="msformat-c.o"
1407 cxx_target_objs="winnt-cxx.o msformat-c.o"
97388150 1408 default_use_cxa_atexit=yes
50c0d3fd 1409 case ${enable_threads} in
e1a1c424
NC
1410 "" | yes | win32)
1411 thread_file='win32'
1412 tmake_file="${tmake_file} i386/t-gthr-win32"
1413 ;;
50c0d3fd 1414 esac
b01bc573 1415 case ${target} in
e8930cc1
KT
1416 x86_64-*-mingw*)
1417 tmake_file="${tmake_file} i386/t-crtfm"
61ed06c3 1418 ;;
e8930cc1
KT
1419 *)
1420 ;;
1421 esac
1422 case ${target} in
1423 *mingw32crt*)
1424 tm_file="${tm_file} i386/crtdll.h"
1425 ;;
1426 *mingw32msv* | *mingw*)
09eaf5a5 1427 ;;
61ed06c3
HPN
1428 esac
1429 ;;
1430i[34567]86-*-uwin*)
3eae722d 1431 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygwin.h i386/uwin.h"
61ed06c3
HPN
1432 tmake_file="i386/t-cygwin i386/t-uwin"
1433 extra_objs=winnt.o
6ac49599 1434 extra_options="${extra_options} i386/cygming.opt"
90aa6719 1435 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
61ed06c3
HPN
1436 if test x$enable_threads = xyes; then
1437 thread_file='win32'
1438 fi
ec2a60b0 1439 use_fixproto=yes
61ed06c3 1440 ;;
04cec1a7 1441i[34567]86-*-interix3*)
39ed301b 1442 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h i386/i386-interix3.h interix.h interix3.h"
587dc9c6 1443 tmake_file="i386/t-interix"
84512347 1444 extra_objs=winnt.o
90aa6719 1445 target_gtfiles="\$(srcdir)/config/i386/winnt.c"
04cec1a7
DR
1446 if test x$enable_threads = xyes ; then
1447 thread_file='posix'
1448 fi
1449 if test x$stabs = xyes ; then
1450 tm_file="${tm_file} dbxcoff.h"
1451 fi
1452 ;;
6b3a0b34
US
1453i[34567]86-*-kaos*)
1454 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
1455 tmake_file="i386/t-i386elf t-svr4"
1456 ;;
61ed06c3 1457ia64*-*-elf*)
c40409ce 1458 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
61ed06c3
HPN
1459 tmake_file="ia64/t-ia64"
1460 target_cpu_default="0"
1461 if test x$gas = xyes
1462 then
1463 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1464 fi
1465 if test x$gnu_ld = xyes
1466 then
1467 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1468 fi
32b4f6f4 1469 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
ec2a60b0 1470 use_fixproto=yes
61ed06c3 1471 ;;
243a7070 1472ia64*-*-freebsd*)
fee42cc1 1473 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
243a7070
DB
1474 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1475 tmake_file="${tmake_file} ia64/t-ia64"
32b4f6f4 1476 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
243a7070 1477 ;;
61ed06c3 1478ia64*-*-linux*)
c40409ce 1479 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
443728bb
L
1480 tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
1481 if test x$with_system_libunwind != xyes ; then
1482 tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
1483 fi
61ed06c3 1484 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
32b4f6f4 1485 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
61ed06c3 1486 ;;
7e5b9908 1487ia64*-*-hpux*)
c15c90bb 1488 tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h"
23c108af 1489 tmake_file="ia64/t-ia64 ia64/t-hpux"
7e5b9908 1490 target_cpu_default="MASK_GNU_AS"
7e2055ec 1491 case x$enable_threads in
79e8b6c0 1492 x | xyes | xposix )
7e2055ec
ZW
1493 thread_file=posix
1494 ;;
1495 esac
cad61762 1496 use_collect2=no
34c1864f
SE
1497 c_target_objs="ia64-c.o"
1498 cxx_target_objs="ia64-c.o"
dbdd120f 1499 extra_options="${extra_options} ia64/ilp32.opt"
587dc9c6
NN
1500 # If we decide to run fixproto we should define FIXPROTO_DEFINES
1501 # in ia64/t-hpux, and also fix the definition of putenv in
1502 # sys-protos.h (const char not char).
7e5b9908 1503 ;;
6b3d1e47 1504iq2000*-*-elf*)
ca11c37c 1505 tm_file="svr4.h elfos.h iq2000/iq2000.h"
6b3d1e47
SC
1506 tmake_file=iq2000/t-iq2000
1507 out_file=iq2000/iq2000.c
6b3d1e47 1508 md_file=iq2000/iq2000.md
ec2a60b0 1509 use_fixproto=yes
6b3d1e47 1510 ;;
61ed06c3 1511m32r-*-elf*)
c40409ce 1512 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
3a30516d 1513 extra_parts="crtinit.o crtfini.o"
ec2a60b0 1514 use_fixproto=yes
37ec8b7a 1515 ;;
ad126521
KI
1516m32rle-*-elf*)
1517 tm_file="dbxelf.h elfos.h svr4.h m32r/little.h ${tm_file}"
1518 extra_parts="crtinit.o crtfini.o m32rx/crtinit.o m32rx/crtfini.o"
1519 use_fixproto=yes
1520 ;;
1521m32r-*-linux*)
1522 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} m32r/linux.h"
65d151a7 1523 # We override the tmake_file for linux -- why?
986ce408 1524 tmake_file="t-slibgcc-elf-ver m32r/t-linux"
ad126521
KI
1525 gnu_ld=yes
1526 use_fixproto=yes
1527 if test x$enable_threads = xyes; then
1528 thread_file='posix'
1529 fi
1530 ;;
1531m32rle-*-linux*)
1532 tm_file="dbxelf.h elfos.h svr4.h linux.h m32r/little.h ${tm_file} m32r/linux.h"
65d151a7 1533 # We override the tmake_file for linux -- why?
986ce408 1534 tmake_file="t-slibgcc-elf-ver m32r/t-linux"
ad126521
KI
1535 gnu_ld=yes
1536 use_fixproto=yes
1537 if test x$enable_threads = xyes; then
1538 thread_file='posix'
1539 fi
1540 ;;
61ed06c3
HPN
1541# m68hc11 and m68hc12 share the same machine description.
1542m68hc11-*-*|m6811-*-*)
a929bc28 1543 tm_file="dbxelf.h elfos.h usegas.h m68hc11/m68hc11.h"
61ed06c3
HPN
1544 tm_p_file="m68hc11/m68hc11-protos.h"
1545 md_file="m68hc11/m68hc11.md"
1546 out_file="m68hc11/m68hc11.c"
a929bc28 1547 tmake_file="m68hc11/t-m68hc11"
ec2a60b0 1548 use_fixproto=yes
61ed06c3
HPN
1549 ;;
1550m68hc12-*-*|m6812-*-*)
a929bc28 1551 tm_file="m68hc11/m68hc12.h dbxelf.h elfos.h usegas.h m68hc11/m68hc11.h"
61ed06c3 1552 tm_p_file="m68hc11/m68hc11-protos.h"
61ed06c3
HPN
1553 md_file="m68hc11/m68hc11.md"
1554 out_file="m68hc11/m68hc11.c"
a929bc28 1555 tmake_file="m68hc11/t-m68hc11"
df3a97a8 1556 extra_options="${extra_options} m68hc11/m68hc11.opt"
ec2a60b0 1557 use_fixproto=yes
61ed06c3 1558 ;;
61ed06c3 1559m68k-*-aout*)
59fbf3cb 1560 default_m68k_cpu=68020
10e96df4
NS
1561 default_cf_cpu=5206
1562 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-mlibs"
a96533d5 1563 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kemb.h m68k/m68k-aout.h libgloss.h"
61ed06c3
HPN
1564 ;;
1565m68k-*-coff*)
59fbf3cb 1566 default_m68k_cpu=68020
10e96df4
NS
1567 default_cf_cpu=5206
1568 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-mlibs"
cf909b0d 1569 tm_defines="${tm_defines} MOTOROLA=1"
a96533d5 1570 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kemb.h dbxcoff.h m68k/coff.h dbx.h"
ec2a60b0 1571 use_fixproto=yes
61ed06c3 1572 ;;
7d33c31d
KH
1573m68020-*-elf* | m68k-*-elf* | fido-*-elf*)
1574 case ${target} in
1575 fido-*-elf*)
1576 # Check that $with_cpu makes sense.
1577 case $with_cpu in
1578 "" | "fidoa")
1579 ;;
1580 *)
1581 echo "Cannot accept --with-cpu=$with_cpu"
1582 exit 1
1583 ;;
1584 esac
1585 with_cpu=fidoa
1586 ;;
1587 *)
1588 default_m68k_cpu=68020
1589 default_cf_cpu=5206
1590 ;;
1591 esac
a96533d5 1592 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h"
cf909b0d 1593 tm_defines="${tm_defines} MOTOROLA=1"
7d33c31d
KH
1594 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1595 # Add multilibs for targets other than fido.
1596 case ${target} in
1597 fido-*-elf*)
1598 ;;
1599 *)
1600 tmake_file="$tmake_file m68k/t-mlibs"
1601 ;;
1602 esac
bb8602be 1603 extra_parts="crtbegin.o crtend.o"
61ed06c3 1604 ;;
2fd95d71 1605m68010-*-netbsdelf* | m68k*-*-netbsdelf*)
59fbf3cb 1606 default_m68k_cpu=68020
10e96df4 1607 default_cf_cpu=5475
2fd95d71 1608 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
cf909b0d 1609 tm_defines="${tm_defines} MOTOROLA=1"
2fd95d71 1610 ;;
7ea98c5a 1611m68k*-*-openbsd*)
59fbf3cb 1612 default_m68k_cpu=68020
10e96df4 1613 default_cf_cpu=5475
7ea98c5a 1614 # needed to unconfuse gdb
59fbf3cb 1615 tm_defines="${tm_defines} OBSD_OLD_GAS"
a96533d5 1616 tm_file="${tm_file} openbsd.h m68k/openbsd.h"
7ea98c5a
GN
1617 tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
1618 # we need collect2 until our bug is fixed...
1619 use_collect2=yes
1620 ;;
4529dbf1
RS
1621m68k-*-uclinuxoldabi*) # Motorola m68k/ColdFire running uClinux
1622 # with uClibc, using the original
1623 # m68k-elf-based ABI
1624 default_m68k_cpu=68020
10e96df4 1625 default_cf_cpu=5206
a96533d5 1626 tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux-oldabi.h"
cf909b0d 1627 tm_defines="${tm_defines} MOTOROLA=1"
47b41fa3 1628 tmake_file="m68k/t-floatlib m68k/t-uclinux"
4529dbf1
RS
1629 use_fixproto=no
1630 ;;
1631m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
1632 # with uClibc, using the new GNU/Linux-style
1633 # ABI.
59fbf3cb 1634 default_m68k_cpu=68020
10e96df4 1635 default_cf_cpu=5206
3ca43df7 1636 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
cf909b0d 1637 tm_defines="${tm_defines} MOTOROLA=1 UCLIBC_DEFAULT=1"
78218d89 1638 extra_options="${extra_options} linux.opt"
10e96df4 1639 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
ba591f5a
BI
1640 use_fixproto=no
1641 ;;
61ed06c3
HPN
1642m68k-*-linux*) # Motorola m68k's running GNU/Linux
1643 # with ELF format using glibc 2
1644 # aka the GNU/Linux C library 6.
59fbf3cb 1645 default_m68k_cpu=68020
10e96df4 1646 default_cf_cpu=5475
a96533d5 1647 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h m68k/linux.h"
4af06170 1648 extra_options="${extra_options} m68k/ieee.opt"
cf909b0d 1649 tm_defines="${tm_defines} MOTOROLA=1"
8c958ed2
MK
1650 # if not configured with --enable-sjlj-exceptions, bump the
1651 # libgcc version number
1652 if test x$sjlj != x1; then
1653 tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
1654 fi
61ed06c3 1655 ;;
c7bdf0a6 1656m68k-*-rtems*)
59fbf3cb 1657 default_m68k_cpu=68020
10e96df4
NS
1658 default_cf_cpu=5206
1659 tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems m68k/t-mlibs"
a96533d5 1660 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"
cf909b0d 1661 tm_defines="${tm_defines} MOTOROLA=1"
bb8602be 1662 extra_parts="crtbegin.o crtend.o"
61ed06c3 1663 ;;
61ed06c3 1664mcore-*-elf)
c40409ce 1665 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} mcore/mcore-elf.h"
61ed06c3 1666 tmake_file=mcore/t-mcore
ec2a60b0 1667 use_fixproto=yes
a929bc28 1668 inhibit_libc=true
61ed06c3
HPN
1669 ;;
1670mcore-*-pe*)
ca11c37c 1671 tm_file="svr3.h dbxcoff.h ${tm_file} mcore/mcore-pe.h"
61ed06c3 1672 tmake_file=mcore/t-mcore-pe
ec2a60b0 1673 use_fixproto=yes
a929bc28 1674 inhibit_libc=true
61ed06c3 1675 ;;
82563d35
RS
1676mips-sgi-irix[56]*)
1677 tm_file="elfos.h ${tm_file} mips/iris.h"
1678 tmake_file="mips/t-iris mips/t-slibgcc-irix"
5811cb27 1679 target_cpu_default="MASK_ABICALLS"
82563d35
RS
1680 case ${target} in
1681 *-*-irix5*)
1682 tm_file="${tm_file} mips/iris5.h"
1683 ;;
1684
1685 *-*-irix6*)
1686 tm_file="${tm_file} mips/iris6.h"
1687 tmake_file="${tmake_file} mips/t-iris6"
620b87b3 1688 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
82563d35
RS
1689 ;;
1690 esac
1691 if test "x$stabs" = xyes
61ed06c3 1692 then
82563d35 1693 tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
61ed06c3 1694 fi
3e35cb0c
RO
1695 if test "x$gnu_ld" = xyes
1696 then
82563d35 1697 tm_defines="${tm_defines} IRIX_USING_GNU_LD"
3e35cb0c 1698 fi
40f5cc95
RO
1699 case ${enable_threads}:${have_pthread_h} in
1700 "":yes | yes:yes ) thread_file=posix ;;
1701 esac
ec2a60b0 1702 use_fixproto=yes
61ed06c3 1703 ;;
f982f805 1704mips*-*-netbsd*) # NetBSD/mips, either endian.
5811cb27 1705 target_cpu_default="MASK_ABICALLS"
ca11c37c 1706 tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
61ed06c3 1707 ;;
3bd6d4c4
AO
1708mips64*-*-linux*)
1709 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h mips/linux64.h"
65d151a7 1710 tmake_file="${tmake_file} mips/t-linux64"
5d2a73d5 1711 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
3bd6d4c4
AO
1712 gnu_ld=yes
1713 gas=yes
66471b47 1714 test x$with_llsc != x || with_llsc=yes
3bd6d4c4 1715 ;;
61ed06c3 1716mips*-*-linux*) # Linux MIPS, either endian.
2017ed61 1717 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
b01bc573 1718 case ${target} in
9303e5df
NS
1719 mipsisa32r2*)
1720 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
009da785 1721 ;;
9303e5df
NS
1722 mipsisa32*)
1723 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
009da785 1724 esac
66471b47 1725 test x$with_llsc != x || with_llsc=yes
61ed06c3 1726 ;;
ca11c37c 1727mips*-*-openbsd*)
620b87b3 1728 tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS"
5811cb27 1729 target_cpu_default="MASK_ABICALLS"
ca11c37c 1730 tm_file="mips/mips.h openbsd.h mips/openbsd.h mips/sdb.h"
b01bc573 1731 case ${target} in
f7288899 1732 mips*el-*-openbsd*)
ca11c37c
ZW
1733 tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
1734 *) tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";;
1735 esac
61ed06c3 1736 ;;
0ea339ea
NS
1737mips*-sde-elf*)
1738 tm_file="elfos.h ${tm_file} mips/elf.h mips/sde.h"
1739 tmake_file="mips/t-sde mips/t-libgcc-mips16"
d9dced13
RS
1740 case "${with_newlib}" in
1741 yes)
1742 # newlib / libgloss.
1743 ;;
1744 *)
1745 # MIPS toolkit libraries.
1746 tm_file="$tm_file mips/sdemtk.h"
1747 tmake_file="$tmake_file mips/t-sdemtk"
1748 extra_options="$extra_options mips/sdemtk.opt"
1749 case ${enable_threads} in
1750 "" | yes | mipssde)
1751 thread_file='mipssde'
1752 ;;
1753 esac
1754 ;;
1755 esac
0ea339ea
NS
1756 case ${target} in
1757 mipsisa32r2*)
1758 tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1759 ;;
1760 mipsisa32*)
1761 tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
1762 ;;
1763 mipsisa64*)
1764 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
1765 ;;
1766 esac
1767 ;;
e2c14f5d
RS
1768mipsisa32-*-elf* | mipsisa32el-*-elf* | \
1769mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
5c44e275 1770mipsisa64-*-elf* | mipsisa64el-*-elf*)
e9475fa3 1771 tm_file="elfos.h ${tm_file} mips/elf.h"
0ea339ea 1772 tmake_file="mips/t-isa3264 mips/t-libgcc-mips16"
e2c14f5d
RS
1773 case ${target} in
1774 mipsisa32r2*)
1775 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1776 ;;
1777 mipsisa32*)
1778 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1779 ;;
1780 mipsisa64*)
1781 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
1782 ;;
1783 esac
1784 case ${target} in
1785 mipsisa32*-*-elfoabi*)
1786 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
1787 tm_file="${tm_file} mips/elfoabi.h"
1788 ;;
1789 mipsisa64*-*-elfoabi*)
1790 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
1791 tm_file="${tm_file} mips/elfoabi.h"
1792 ;;
1793 *-*-elf*)
1794 tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1795 ;;
1796 esac
5c44e275 1797 ;;
5ce6f47b 1798mipsisa64sr71k-*-elf*)
e9475fa3 1799 tm_file="elfos.h ${tm_file} mips/elf.h"
5ce6f47b 1800 tmake_file=mips/t-sr71k
5811cb27 1801 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
620b87b3 1802 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
ec2a60b0 1803 use_fixproto=yes
5ce6f47b 1804 ;;
3d41dbb0 1805mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
e9475fa3 1806 tm_file="elfos.h ${tm_file} mips/elf.h"
0ea339ea 1807 tmake_file="mips/t-elf mips/t-libgcc-mips16 mips/t-sb1"
5811cb27 1808 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
620b87b3 1809 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
ec2a60b0 1810 use_fixproto=yes
3d41dbb0 1811 ;;
74826b0f 1812mips-*-elf* | mipsel-*-elf*)
e9475fa3 1813 tm_file="elfos.h ${tm_file} mips/elf.h"
0ea339ea 1814 tmake_file="mips/t-elf mips/t-libgcc-mips16"
ec2a60b0 1815 use_fixproto=yes
61ed06c3 1816 ;;
74826b0f 1817mips64-*-elf* | mips64el-*-elf*)
e9475fa3 1818 tm_file="elfos.h ${tm_file} mips/elf.h"
0ea339ea 1819 tmake_file="mips/t-elf mips/t-libgcc-mips16"
5811cb27 1820 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
620b87b3 1821 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
ec2a60b0 1822 use_fixproto=yes
61ed06c3 1823 ;;
5ce6f47b 1824mips64vr-*-elf* | mips64vrel-*-elf*)
e9475fa3 1825 tm_file="mips/vr.h elfos.h ${tm_file} mips/elf.h"
5ce6f47b 1826 tmake_file=mips/t-vr
ec2a60b0 1827 use_fixproto=yes
5ce6f47b 1828 ;;
74826b0f 1829mips64orion-*-elf* | mips64orionel-*-elf*)
e9475fa3 1830 tm_file="elfos.h ${tm_file} mips/elforion.h mips/elf.h"
0ea339ea 1831 tmake_file="mips/t-elf mips/t-libgcc-mips16"
5811cb27 1832 target_cpu_default="MASK_64BIT|MASK_FLOAT64"
620b87b3 1833 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
ec2a60b0 1834 use_fixproto=yes
61ed06c3 1835 ;;
bc98ef7f 1836mips*-*-rtems*)
e9475fa3 1837 tm_file="elfos.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
0ea339ea 1838 tmake_file="mips/t-elf mips/t-libgcc-mips16 t-rtems mips/t-rtems"
61ed06c3 1839 ;;
55047c9d 1840mips-wrs-vxworks)
f4de8ba6 1841 tm_file="elfos.h ${tm_file} svr4.h mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
55047c9d 1842 tmake_file="${tmake_file} mips/t-vxworks"
55047c9d
PE
1843 ;;
1844mips-wrs-windiss) # Instruction-level simulator for VxWorks.
1845 xm_defines=POSIX
1846 tm_file="elfos.h mips/mips.h svr4.h mips/elf.h windiss.h mips/windiss.h"
0ea339ea 1847 tmake_file="${tmake_file} mips/t-elf mips/t-libgcc-mips16"
55047c9d
PE
1848 thread_file=
1849 ;;
74826b0f 1850mipstx39-*-elf* | mipstx39el-*-elf*)
e9475fa3 1851 tm_file="elfos.h ${tm_file} mips/r3900.h mips/elf.h"
0ea339ea 1852 tmake_file="mips/t-r3900 mips/t-libgcc-mips16"
ec2a60b0 1853 use_fixproto=yes
61ed06c3 1854 ;;
bcf684c7 1855mmix-knuth-mmixware)
4977bab6 1856 need_64bit_hwint=yes
bcf684c7 1857 ;;
61ed06c3 1858mn10300-*-*)
c40409ce 1859 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
61ed06c3
HPN
1860 if test x$stabs = xyes
1861 then
1862 tm_file="${tm_file} dbx.h"
1863 fi
1864 use_collect2=no
ec2a60b0 1865 use_fixproto=yes
61ed06c3 1866 ;;
a3fafcb0 1867mt-*-elf)
c85ba4fb 1868 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
a3fafcb0 1869 tmake_file="${tmake_file} mt/t-mt"
c85ba4fb 1870 ;;
61ed06c3
HPN
1871pdp11-*-bsd)
1872 tm_file="${tm_file} pdp11/2bsd.h"
ec2a60b0 1873 use_fixproto=yes
61ed06c3
HPN
1874 ;;
1875pdp11-*-*)
ec2a60b0 1876 use_fixproto=yes
61ed06c3 1877 ;;
ca11c37c
ZW
1878# port not yet contributed
1879#powerpc-*-openbsd*)
49721058 1880# tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
ca11c37c
ZW
1881# extra_headers=
1882# ;;
2bfcf297 1883powerpc64-*-linux*)
a8e04fe6
AM
1884 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1885 test x$with_cpu != x || cpu_is_64bit=yes
1886 test x$cpu_is_64bit != xyes || tm_file="${tm_file} rs6000/default64.h"
1887 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
7f970b70
AM
1888 if test x${enable_secureplt} = xyes; then
1889 tm_file="rs6000/secureplt.h ${tm_file}"
1890 fi
78f5898b 1891 extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
49721058 1892 tmake_file="t-dfprules rs6000/t-fprules ${tmake_file} rs6000/t-ppccomm rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp"
2bfcf297 1893 ;;
ddb28441
RM
1894powerpc64-*-gnu*)
1895 tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux64.h rs6000/gnu.h"
78f5898b 1896 extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
49721058 1897 tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-gnu rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp"
ddb28441 1898 ;;
61ed06c3 1899powerpc-*-beos*)
2bfcf297 1900 tm_file="${tm_file} rs6000/aix.h rs6000/beos.h rs6000/xcoff.h"
49721058 1901 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-beos"
ba1e6c0b 1902 extra_headers=
ec2a60b0 1903 use_fixproto=yes
61ed06c3 1904 ;;
18922061 1905powerpc-*-darwin*)
78f5898b 1906 extra_options="${extra_options} rs6000/darwin.opt"
747b9f55 1907 extra_parts="crt2.o"
f0b81cbc 1908 case ${target} in
ed5b9f96 1909 *-darwin1[0-9]* | *-darwin[8-9]*)
f7288899 1910 tmake_file="${tmake_file} rs6000/t-darwin8"
ed5b9f96
GK
1911 tm_file="${tm_file} rs6000/darwin8.h"
1912 ;;
1913 *-darwin7*)
1914 tm_file="${tm_file} rs6000/darwin7.h"
1915 ;;
1916 *-darwin[0-6]*)
1917 ;;
f0b81cbc 1918 esac
5fb4cf24 1919 extra_headers=altivec.h
18922061 1920 ;;
b8ec3cc8
EC
1921powerpc64-*-darwin*)
1922 tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
1923 extra_options="${extra_options} ${cpu_type}/darwin.opt"
1924 # We're omitting t-darwin8 to avoid building any multilibs
1925 extra_headers=altivec.h
1926 ;;
b91da81f 1927powerpc*-*-freebsd*)
c40409ce 1928 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
49721058 1929 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
78f5898b 1930 extra_options="${extra_options} rs6000/sysv4.opt"
b91da81f 1931 ;;
edf1b3f3 1932powerpc-*-netbsd*)
a4967b8d
JT
1933 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
1934 tmake_file="${tmake_file} rs6000/t-netbsd"
78f5898b 1935 extra_options="${extra_options} rs6000/sysv4.opt"
edf1b3f3 1936 ;;
8da6d80e 1937powerpc-*-chorusos*)
c40409ce 1938 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h chorus.h"
49721058 1939 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos rs6000/t-ppccomm"
78f5898b 1940 extra_options="${extra_options} rs6000/sysv4.opt"
769e49eb
NN
1941 case ${enable_threads} in
1942 yes | posix)
1943 thread_file='posix'
1944 ;;
8da6d80e 1945 esac
ec2a60b0 1946 use_fixproto=yes
8da6d80e 1947 ;;
518878e1 1948powerpc-*-eabispe*)
eca0d5e8 1949 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabispe.h"
78f5898b 1950 extra_options="${extra_options} rs6000/sysv4.opt"
00c060a4 1951 tmake_file="rs6000/t-spe rs6000/t-ppccomm"
518878e1 1952 ;;
cf6ede82 1953powerpc-*-eabisimaltivec*)
eca0d5e8 1954 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h rs6000/eabialtivec.h"
78f5898b 1955 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 1956 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
cf6ede82 1957 ;;
61ed06c3 1958powerpc-*-eabisim*)
eca0d5e8 1959 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
78f5898b 1960 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 1961 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
61ed06c3
HPN
1962 ;;
1963powerpc-*-elf*)
c40409ce 1964 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
78f5898b 1965 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 1966 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
ec2a60b0 1967 use_fixproto=yes
61ed06c3 1968 ;;
10baca6b 1969powerpc-*-eabialtivec*)
eca0d5e8 1970 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabialtivec.h"
78f5898b 1971 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 1972 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
10baca6b 1973 ;;
61ed06c3 1974powerpc-*-eabi*)
eca0d5e8 1975 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
78f5898b 1976 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 1977 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
61ed06c3
HPN
1978 ;;
1979powerpc-*-rtems*)
eca0d5e8 1980 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
78f5898b 1981 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 1982 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
61ed06c3 1983 ;;
7c942e17 1984powerpc-*-linux*altivec*)
10baca6b 1985 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h"
78f5898b 1986 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 1987 tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
10baca6b 1988 ;;
7c942e17 1989powerpc-*-linux*spe*)
eca0d5e8 1990 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h rs6000/e500.h"
78f5898b 1991 extra_options="${extra_options} rs6000/sysv4.opt"
4f011e1e 1992 tmake_file="t-dfprules rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2f3f95e9 1993 ;;
96038623
DE
1994powerpc-*-linux*paired*)
1995 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/750cl.h"
1996 extra_options="${extra_options} rs6000/sysv4.opt"
1997 tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1998 ;;
61ed06c3 1999powerpc-*-linux*)
a8e04fe6 2000 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
78f5898b 2001 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 2002 tmake_file="t-dfprules rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
a8e04fe6
AM
2003 case ${enable_targets}:${cpu_is_64bit} in
2004 *powerpc64* | all:* | *:yes)
2005 if test x$cpu_is_64bit = xyes; then
2006 tm_file="${tm_file} rs6000/default64.h"
2007 fi
2008 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
2009 tmake_file="$tmake_file rs6000/t-linux64"
f75aac9e 2010 extra_options="${extra_options} rs6000/linux64.opt"
a8e04fe6
AM
2011 ;;
2012 *)
2013 tm_file="${tm_file} rs6000/linux.h"
2014 ;;
2015 esac
7f970b70
AM
2016 if test x${enable_secureplt} = xyes; then
2017 tm_file="rs6000/secureplt.h ${tm_file}"
2018 fi
61ed06c3 2019 ;;
ddb28441
RM
2020powerpc-*-gnu-gnualtivec*)
2021 tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h"
78f5898b 2022 extra_options="${extra_options} rs6000/sysv4.opt"
49721058 2023 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
ddb28441
RM
2024 if test x$enable_threads = xyes; then
2025 thread_file='posix'
2026 fi
2027 ;;
2028powerpc-*-gnu*)
2029 tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/gnu.h"
49721058 2030 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
78f5898b 2031 extra_options="${extra_options} rs6000/sysv4.opt"
ddb28441
RM
2032 if test x$enable_threads = xyes; then
2033 thread_file='posix'
2034 fi
2035 ;;
2eab15c9 2036powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
f4de8ba6 2037 tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
49721058 2038 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks"
78f5898b 2039 extra_options="${extra_options} rs6000/sysv4.opt"
4977bab6 2040 extra_headers=ppc-asm.h
2eab15c9
PE
2041 case ${target} in
2042 *-vxworksae*)
eca0d5e8 2043 tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h rs6000/vxworksae.h"
2eab15c9
PE
2044 tmake_file="${tmake_file} rs6000/t-vxworksae"
2045 ;;
2046 *-vxworks*)
eca0d5e8 2047 tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2eab15c9
PE
2048 ;;
2049 esac
4977bab6 2050 ;;
2eab15c9 2051powerpc-wrs-windiss*) # Instruction-level simulator for VxWorks.
bce0deb2 2052 tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/windiss.h"
49721058 2053 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 2054 extra_options="${extra_options} rs6000/sysv4.opt"
2eab15c9 2055 thread_file=""
ec2a60b0 2056 use_fixproto=yes
2eab15c9 2057 ;;
4f587cb0
AN
2058powerpc-*-lynxos*)
2059 xm_defines=POSIX
2060 tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2061 tmake_file="t-lynx rs6000/t-lynx"
78f5898b 2062 extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
4f587cb0 2063 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
6ac49599 2064 extra_options="${extra_options} lynx.opt"
4f587cb0
AN
2065 thread_file=lynx
2066 gnu_ld=yes
2067 gas=yes
2068 ;;
61ed06c3 2069powerpcle-*-sysv*)
c40409ce 2070 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
49721058 2071 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos rs6000/t-ppccomm"
78f5898b 2072 extra_options="${extra_options} rs6000/sysv4.opt"
ec2a60b0 2073 use_fixproto=yes
61ed06c3
HPN
2074 ;;
2075powerpcle-*-elf*)
c40409ce 2076 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
49721058 2077 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 2078 extra_options="${extra_options} rs6000/sysv4.opt"
ec2a60b0 2079 use_fixproto=yes
61ed06c3
HPN
2080 ;;
2081powerpcle-*-eabisim*)
eca0d5e8 2082 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
49721058 2083 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 2084 extra_options="${extra_options} rs6000/sysv4.opt"
61ed06c3
HPN
2085 ;;
2086powerpcle-*-eabi*)
eca0d5e8 2087 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h"
49721058 2088 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 2089 extra_options="${extra_options} rs6000/sysv4.opt"
61ed06c3 2090 ;;
6b3a0b34
US
2091powerpc-*-kaos*)
2092 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h kaos.h rs6000/kaos-ppc.h"
49721058 2093 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 2094 extra_options="${extra_options} rs6000/sysv4.opt"
6b3a0b34
US
2095 ;;
2096powerpcle-*-kaos*)
2097 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h kaos.h rs6000/kaos-ppc.h"
49721058 2098 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
78f5898b 2099 extra_options="${extra_options} rs6000/sysv4.opt"
6b3a0b34 2100 ;;
61ed06c3 2101rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
2bfcf297 2102 tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h"
49721058 2103 tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-newas"
432218ba 2104 extra_options="${extra_options} rs6000/aix41.opt"
61ed06c3 2105 use_collect2=yes
ba1e6c0b 2106 extra_headers=
ec2a60b0 2107 use_fixproto=yes
61ed06c3
HPN
2108 ;;
2109rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
9739c90c 2110 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h"
61ed06c3 2111 tmake_file=rs6000/t-aix43
432218ba 2112 extra_options="${extra_options} rs6000/aix64.opt"
61ed06c3
HPN
2113 use_collect2=yes
2114 thread_file='aix'
ba1e6c0b 2115 extra_headers=
61ed06c3 2116 ;;
5f5d5417 2117rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
9739c90c 2118 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h"
432218ba 2119 extra_options="${extra_options} rs6000/aix64.opt"
61ed06c3 2120 tmake_file=rs6000/t-aix43
61ed06c3
HPN
2121 use_collect2=yes
2122 thread_file='aix'
ba1e6c0b 2123 extra_headers=
61ed06c3 2124 ;;
ca94e524 2125rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
5f5d5417
DE
2126 tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h"
2127 tmake_file=rs6000/t-aix52
432218ba 2128 extra_options="${extra_options} rs6000/aix64.opt"
5f5d5417
DE
2129 use_collect2=yes
2130 thread_file='aix'
2131 extra_headers=
2132 ;;
ba6a1b78 2133rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
ca94e524
DE
2134 tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h"
2135 tmake_file=rs6000/t-aix52
2136 extra_options="${extra_options} rs6000/aix64.opt"
2137 use_collect2=yes
2138 thread_file='aix'
c4a79427 2139 extra_headers=altivec.h
ca94e524 2140 ;;
ba6a1b78
DE
2141rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2142 tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h"
2143 tmake_file=rs6000/t-aix52
2144 extra_options="${extra_options} rs6000/aix64.opt"
2145 use_collect2=yes
2146 thread_file='aix'
2147 extra_headers=altivec.h
2148 ;;
0e5a4ad8 2149s390-*-linux*)
c40409ce 2150 tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
4dc19cc0 2151 tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux"
9628a767 2152 ;;
0e5a4ad8 2153s390x-*-linux*)
58d10f89 2154 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
70eeb10b
UW
2155 tm_p_file=s390/s390-protos.h
2156 md_file=s390/s390.md
1c0ca89d 2157 extra_modes=s390/s390-modes.def
70eeb10b 2158 out_file=s390/s390.c
4dc19cc0 2159 tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux s390/t-linux64"
9628a767 2160 ;;
24fe22c9 2161s390x-ibm-tpf*)
a8ba31f2
EC
2162 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h s390/tpf.h"
2163 tm_p_file=s390/s390-protos.h
2164 md_file=s390/s390.md
2165 extra_modes=s390/s390-modes.def
2166 out_file=s390/s390.c
2167 extra_parts="crtbeginS.o crtendS.o"
2168 tmake_file="s390/t-crtstuff s390/t-tpf"
2169 thread_file='tpf'
2170 extra_options="${extra_options} s390/tpf.opt"
24fe22c9 2171 ;;
bdcee471
CL
2172score-*-elf)
2173 tm_file="dbxelf.h elfos.h score/elf.h score/score.h"
2174 tmake_file=score/t-score-elf
254f5222 2175 extra_objs="score7.o score3.o"
bdcee471 2176 ;;
da28a3b9 2177sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
b55e3aad 2178sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
93fea8d3 2179 sh-*-linux* | sh[2346lbe]*-*-linux* | \
da28a3b9
JR
2180 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2181 sh64-*-netbsd* | sh64l*-*-netbsd*)
2182 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2183 if test x${with_endian} = x; then
2184 case ${target} in
2185 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2186 shbe-*-* | sheb-*-*) with_endian=big,little ;;
2187 sh[1234]l* | sh[34]*-*-linux*) with_endian=little ;;
2188 shl* | sh64l* | sh*-*-linux* | \
2189 sh5l* | sh-superh-elf) with_endian=little,big ;;
2190 sh[1234]*-*-*) with_endian=big ;;
2191 *) with_endian=big,little ;;
2192 esac
2193 fi
2194 case ${with_endian} in
2195 big|little) tmake_file="${tmake_file} sh/t-1e" ;;
2196 big,little|little,big) ;;
2197 *) echo "with_endian=${with_endian} not supported."; exit 1 ;;
2198 esac
2199 case ${with_endian} in
2200 little*) tm_file="sh/little.h ${tm_file}" ;;
2201 esac
2202 tm_file="${tm_file} dbxelf.h elfos.h"
b01bc573 2203 case ${target} in
da28a3b9
JR
2204 sh*-*-netbsd*) ;;
2205 *) tm_file="${tm_file} svr4.h" ;;
dbf87f32 2206 esac
da28a3b9 2207 tm_file="${tm_file} sh/elf.h"
b01bc573 2208 case ${target} in
da28a3b9 2209 sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux"
65f527e0 2210 tm_file="${tm_file} linux.h sh/linux.h" ;;
da28a3b9
JR
2211 sh*-*-kaos*) tm_file="${tm_file} sh/embed-elf.h kaos.h sh/kaos-sh.h"
2212 ;;
2213 sh*-*-netbsd*) tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h" ;;
8c1aaf26
R
2214 sh*-superh-elf) if test x$with_libgloss != xno; then
2215 with_libgloss=yes
2216 tm_file="${tm_file} sh/newlib.h"
2217 fi
8999fdc7
R
2218 tm_file="${tm_file} sh/embed-elf.h sh/superh.h"
2219 tmake_file="${tmake_file} sh/t-superh"
25e651ca 2220 extra_options="${extra_options} sh/superh.opt" ;;
8c1aaf26
R
2221 *) if test x$with_newlib = xyes \
2222 && test x$with_libgloss = xyes; then
2223 tm_file="${tm_file} sh/newlib.h"
2224 fi
2225 tm_file="${tm_file} sh/embed-elf.h" ;;
da28a3b9
JR
2226 esac
2227 case ${target} in
2228 sh5*-*-netbsd*)
2229 # SHmedia, 32-bit ABI
2230 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd"
2231 ;;
2232 sh64*-netbsd*)
2233 # SHmedia, 64-bit ABI
2234 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd sh/t-netbsd-sh5-64"
2235 ;;
2236 *-*-netbsd)
2237 tmake_file="${tmake_file} sh/t-netbsd"
2238 ;;
2239 sh64*-*-linux*)
2240 tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
2241 tm_file="${tm_file} sh/sh64.h"
2242 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2243 ;;
dbf87f32
R
2244 sh64*)
2245 tmake_file="${tmake_file} sh/t-sh64"
2246 tm_file="${tm_file} sh/sh64.h"
2247 extra_headers="shmedia.h ushmedia.h sshmedia.h"
dbf87f32 2248 ;;
b55e3aad
NC
2249 *-*-symbianelf*)
2250 tmake_file="sh/t-symbian"
2251 tm_file="sh/symbian-pre.h sh/little.h ${tm_file} sh/symbian-post.h"
2252 extra_objs="symbian.o"
2253 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
f7288899 2254 ;;
8bc6e101 2255 esac
da28a3b9
JR
2256 # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2257 case `echo ${target} | sed 's/e[lb]-/-/'` in
2258 sh64*-*-netbsd*) sh_cpu_target=sh5-64media ;;
2259 sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
312209c6
AO
2260 sh4a_single_only*) sh_cpu_target=sh4a-single-only ;;
2261 sh4a_single*) sh_cpu_target=sh4a-single ;;
2262 sh4a_nofpu*) sh_cpu_target=sh4a-nofpu ;;
2263 sh4al) sh_cpu_target=sh4al ;;
2264 sh4a*) sh_cpu_target=sh4a ;;
da28a3b9
JR
2265 sh4_single_only*) sh_cpu_target=sh4-single-only ;;
2266 sh4_single*) sh_cpu_target=sh4-single ;;
2267 sh4_nofpu*) sh_cpu_target=sh4-nofpu ;;
2268 sh4* | sh-superh-*) sh_cpu_target=sh4 ;;
2269 sh3e*) sh_cpu_target=sh3e ;;
2270 sh*-*-netbsd* | sh3*) sh_cpu_target=sh3 ;;
157371cf
AO
2271 sh2a_single_only*) sh_cpu_target=sh2a-single-only ;;
2272 sh2a_single*) sh_cpu_target=sh2a-single ;;
2273 sh2a_nofpu*) sh_cpu_target=sh2a-nofpu ;;
2274 sh2a*) sh_cpu_target=sh2a ;;
da28a3b9
JR
2275 sh2e*) sh_cpu_target=sh2e ;;
2276 sh2*) sh_cpu_target=sh2 ;;
2277 *) sh_cpu_target=sh1 ;;
8f48afc1 2278 esac
8c1aaf26
R
2279 # did the user say --without-fp ?
2280 if test x$with_fp = xno; then
2281 case ${sh_cpu_target} in
2282 sh5-*media) sh_cpu_target=${sh_cpu_target}-nofpu ;;
2283 sh4al | sh1) ;;
2284 sh4a* ) sh_cpu_target=sh4a-nofpu ;;
2285 sh4*) sh_cpu_target=sh4-nofpu ;;
2286 sh3*) sh_cpu_target=sh3 ;;
2287 sh2a*) sh_cpu_target=sh2a-nofpu ;;
2288 sh2*) sh_cpu_target=sh2 ;;
2289 *) echo --without-fp not available for $target: ignored
2290 esac
2291 tm_defines="$tm_defines STRICT_NOFPU=1"
2292 fi
da28a3b9
JR
2293 sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2294 case $sh_cpu_default in
2295 sh5-64media-nofpu | sh5-64media | \
2296 sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
157371cf 2297 sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
312209c6 2298 sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
27a0ce7d 2299 sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
bf09b512 2300 sh3e | sh3 | sh2e | sh2 | sh1) ;;
da28a3b9
JR
2301 "") sh_cpu_default=${sh_cpu_target} ;;
2302 *) echo "with_cpu=$with_cpu not supported"; exit 1 ;;
dbf87f32 2303 esac
da28a3b9
JR
2304 sh_multilibs=${with_multilib_list}
2305 if test x${sh_multilibs} = x ; then
2306 case ${target} in
8c1aaf26 2307 sh64-superh-linux* | \
da28a3b9
JR
2308 sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
2309 sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2310 sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2311 sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
2312 sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
157371cf 2313 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
da28a3b9 2314 esac
8c1aaf26
R
2315 if test x$with_fp = xno; then
2316 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`"
2317 fi
da28a3b9 2318 fi
25e651ca 2319 target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
da28a3b9 2320 tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
25e651ca 2321 sh_multilibs=`echo $sh_multilibs,$sh_cpu_default | sed -e 's/[ ,/][ ,]*/ /g' -e 's/ $//' -e 's/^m/sh/' -e 's/ m/ sh/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
da28a3b9
JR
2322 for sh_multilib in ${sh_multilibs}; do
2323 case ${sh_multilib} in
2324 sh1 | sh2 | sh2e | sh3 | sh3e | \
27a0ce7d 2325 sh4 | sh4-single | sh4-single-only | sh4-nofpu | sh4-300 |\
312209c6 2326 sh4a | sh4a-single | sh4a-single-only | sh4a-nofpu | sh4al | \
157371cf 2327 sh2a | sh2a-single | sh2a-single-only | sh2a-nofpu | \
da28a3b9
JR
2328 sh5-64media | sh5-64media-nofpu | \
2329 sh5-32media | sh5-32media-nofpu | \
2330 sh5-compact | sh5-compact-nofpu)
2331 tmake_file="${tmake_file} sh/t-mlib-${sh_multilib}"
25e651ca 2332 tm_defines="$tm_defines SUPPORT_`echo $sh_multilib|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
da28a3b9
JR
2333 ;;
2334 *)
2335 echo "with_multilib_list=${sh_multilib} not supported."
2336 exit 1
2337 ;;
2338 esac
2339 done
25e651ca 2340 if test x${enable_incomplete_targets} = xyes ; then
c0fb94d7 2341 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"
da28a3b9 2342 fi
ec2a60b0 2343 use_fixproto=yes
fa5322fa 2344 ;;
314733e2 2345sh-*-rtems*)
be33b729 2346 tmake_file="sh/t-sh sh/t-elf t-rtems sh/t-rtems"
314733e2
RC
2347 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
2348 ;;
55047c9d
PE
2349sh-wrs-vxworks)
2350 tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
f5c7290e 2351 tm_file="${tm_file} elfos.h svr4.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
55047c9d 2352 ;;
61ed06c3 2353sh-*-*)
10d6ea27 2354 tm_file="${tm_file} dbxcoff.h sh/coff.h"
ec2a60b0 2355 use_fixproto=yes
61ed06c3 2356 ;;
69474c3c 2357sparc-*-netbsdelf*)
0b85af22 2358 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
fe609b0f 2359 extra_options="${extra_options} sparc/long-double-switch.opt"
69474c3c 2360 ;;
91f0fcee 2361sparc64-*-openbsd*)
0b85af22 2362 tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
fe609b0f 2363 extra_options="${extra_options} sparc/little-endian.opt"
91f0fcee
ME
2364 gas=yes gnu_ld=yes
2365 with_cpu=ultrasparc
91f0fcee 2366 ;;
61ed06c3 2367sparc-*-elf*)
81b47219 2368 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h"
a261e0cc 2369 tmake_file="sparc/t-elf sparc/t-crtfm"
61ed06c3 2370 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
ec2a60b0 2371 use_fixproto=yes
61ed06c3 2372 ;;
981f6289 2373sparc-*-linux*) # SPARC's running GNU/Linux, libc6
5f7ca34b 2374 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h"
fe609b0f 2375 extra_options="${extra_options} sparc/long-double-switch.opt"
ccbdd3bc 2376 tmake_file="${tmake_file} sparc/t-linux"
5f7ca34b
DM
2377 if test x$enable_targets = xall; then
2378 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
ccbdd3bc 2379 tmake_file="${tmake_file} sparc/t-linux64"
5f7ca34b
DM
2380 else
2381 tm_file="${tm_file} sparc/linux.h"
5f7ca34b 2382 fi
ccbdd3bc 2383 tmake_file="${tmake_file} sparc/t-crtfm"
61ed06c3 2384 ;;
c7bdf0a6 2385sparc-*-rtems*)
81b47219 2386 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
2d69e3cb 2387 tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
61ed06c3 2388 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
61ed06c3 2389 ;;
8947df0c 2390sparc64-*-solaris2* | sparcv9-*-solaris2*)
ec23ed60
EB
2391 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
2392 case ${target} in
2393 *-*-solaris2.1[0-9]*)
2394 tm_file="${tm_file} sol2-10.h"
2395 ;;
2396 esac
2397 tm_file="${tm_file} sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h"
3fc602a0
RH
2398 if test x$gnu_ld = xyes; then
2399 tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
61ed06c3 2400 fi
f0871dfe 2401 if test x$gas = xyes; then
5d865dac 2402 tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
f0871dfe 2403 fi
fdbe66f2 2404 tm_file="${tm_file} tm-dwarf2.h"
a2bec818 2405 tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
61ed06c3 2406 if test x$gnu_ld = xyes; then
7b3a4df5 2407 tmake_file="$tmake_file t-slibgcc-elf-ver"
61ed06c3 2408 else
7b3a4df5 2409 tmake_file="$tmake_file t-slibgcc-sld"
61ed06c3 2410 fi
a2bec818
DJ
2411 c_target_objs="sol2-c.o"
2412 cxx_target_objs="sol2-c.o"
07a43492
DJ
2413 extra_objs="sol2.o"
2414 tm_p_file="${tm_p_file} sol2-protos.h"
61ed06c3 2415 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
615be2cf 2416 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
fe7378d2
EB
2417 "":yes:* | yes:yes:* ) thread_file=posix ;;
2418 "":*:yes | yes:*:yes ) thread_file=solaris ;;
615be2cf 2419 esac
61ed06c3 2420 ;;
8947df0c 2421sparc-*-solaris2*)
18167442
EB
2422 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
2423 case ${target} in
2424 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
ec23ed60
EB
2425 tm_file="${tm_file} sol2-6.h"
2426 ;;
2427 *-*-solaris2.1[0-9]*)
2428 tm_file="${tm_file} sol2-10.h"
2429 ;;
18167442
EB
2430 esac
2431 tm_file="${tm_file} sparc/sol2.h"
3fc602a0
RH
2432 if test x$gnu_ld = xyes; then
2433 tm_file="${tm_file} sparc/sol2-gld.h"
61ed06c3 2434 fi
5d865dac
EB
2435 if test x$gas = xyes; then
2436 tm_file="${tm_file} sparc/sol2-gas.h"
2437 fi
a2bec818 2438 tmake_file="t-sol2 sparc/t-sol2 sparc/t-crtfm"
61ed06c3 2439 if test x$gnu_ld = xyes; then
7b3a4df5 2440 tmake_file="$tmake_file t-slibgcc-elf-ver"
61ed06c3 2441 else
7b3a4df5 2442 tmake_file="$tmake_file t-slibgcc-sld"
61ed06c3 2443 fi
b01bc573 2444 case ${target} in
8947df0c
RH
2445 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
2446 if test x$gnu_ld = xno; then
2447 tm_file="${tm_file} sparc/sol26-sld.h"
2448 fi
2449 ;;
f42eccdb 2450 *-*-solaris2.[789] | *-*-solaris2.1[0-9]*)
fdbe66f2 2451 tm_file="sparc/biarch64.h ${tm_file} sparc/sol2-bi.h"
3fc602a0
RH
2452 if test x$gnu_ld = xyes; then
2453 tm_file="${tm_file} sparc/sol2-gld-bi.h"
7112135f 2454 fi
f0871dfe
RH
2455 if test x$gas = xyes; then
2456 tm_file="${tm_file} sparc/sol2-gas-bi.h"
2457 fi
fdbe66f2 2458 tm_file="${tm_file} tm-dwarf2.h"
7112135f 2459 tmake_file="$tmake_file sparc/t-sol2-64"
69bdb292 2460 test x$with_cpu != x || with_cpu=v9
7112135f
AO
2461 ;;
2462 esac
a2bec818
DJ
2463 c_target_objs="sol2-c.o"
2464 cxx_target_objs="sol2-c.o"
07a43492
DJ
2465 extra_objs="sol2.o"
2466 tm_p_file="${tm_p_file} sol2-protos.h"
3fc602a0 2467 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
615be2cf 2468 case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
18167442
EB
2469 "":yes:* | yes:yes:* )
2470 case ${target} in
2471 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
2472 thread_file=posix95
2473 ;;
2474 *)
2475 thread_file=posix
2476 ;;
2477 esac
2478 ;;
2479 "":*:yes | yes:*:yes )
2480 thread_file=solaris
2481 ;;
615be2cf 2482 esac
61ed06c3 2483 ;;
61ed06c3 2484sparc-*-sysv4*)
9b8466f4 2485 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sysv4-only.h"
61ed06c3 2486 tmake_file=t-svr4
61ed06c3 2487 extra_parts="crtbegin.o crtend.o"
ec2a60b0 2488 use_fixproto=yes
61ed06c3 2489 ;;
1910440e
RS
2490sparc-wrs-vxworks)
2491 tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2492 tmake_file="${tmake_file} sparc/t-vxworks"
2493 ;;
61ed06c3 2494sparc64-*-elf*)
81b47219 2495 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h"
fe609b0f 2496 extra_options="${extra_options} sparc/little-endian.opt"
2d69e3cb 2497 tmake_file="${tmake_file} sparc/t-crtfm"
61ed06c3 2498 extra_parts="crtbegin.o crtend.o"
ec2a60b0 2499 use_fixproto=yes
61ed06c3 2500 ;;
c7240cbd
DB
2501sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2502 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
fe609b0f 2503 extra_options="${extra_options} sparc/long-double-switch.opt"
2d69e3cb 2504 tmake_file="${tmake_file} sparc/t-crtfm"
c7240cbd 2505 case "x$with_cpu" in
e0054185 2506 xultrasparc) ;;
c7240cbd
DB
2507 x) with_cpu=ultrasparc ;;
2508 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2509 esac
2510 ;;
981f6289 2511sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
5f7ca34b 2512 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h linux.h sparc/linux64.h"
fe609b0f 2513 extra_options="${extra_options} sparc/long-double-switch.opt"
fbf2ca7b 2514 tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
61ed06c3 2515 ;;
4cb7482c 2516sparc64-*-netbsd*)
4cb7482c
MG
2517 tm_file="sparc/biarch64.h ${tm_file}"
2518 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
fe609b0f
EB
2519 extra_options="${extra_options} sparc/long-double-switch.opt"
2520 tmake_file="${tmake_file} sparc/t-netbsd64"
4cb7482c 2521 ;;
85d9c13c
TS
2522spu-*-elf*)
2523 tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h"
2524 tmake_file="spu/t-spu-elf"
2525 extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h"
2526 extra_modes=spu/spu-modes.def
2527 c_target_objs="${c_target_objs} spu-c.o"
2528 cxx_target_objs="${cxx_target_objs} spu-c.o"
2529 ;;
d19fb8e3 2530strongarm-*-elf*)
c40409ce 2531 tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
315cd6b5 2532 tmake_file="arm/t-arm arm/t-strongarm-elf"
d19fb8e3 2533 out_file=arm/arm.c
d19fb8e3 2534 md_file=arm/arm.md
1c0ca89d 2535 extra_modes=arm/arm-modes.def
ec2a60b0 2536 use_fixproto=yes
d19fb8e3 2537 ;;
d19fb8e3 2538strongarm-*-pe)
ca11c37c 2539 tm_file="arm/semi.h arm/aout.h arm/coff.h dbxcoff.h arm/strongarm-coff.h arm/arm.h arm/pe.h arm/strongarm-pe.h"
315cd6b5 2540 tmake_file="arm/t-arm arm/t-strongarm-pe"
d19fb8e3 2541 out_file=arm/arm.c
d19fb8e3 2542 md_file=arm/arm.md
1c0ca89d 2543 extra_modes=arm/arm-modes.def
c54c7322 2544 extra_options="${extra_options} arm/pe.opt"
d19fb8e3 2545 extra_objs=pe.o
ec2a60b0 2546 use_fixproto=yes
d19fb8e3 2547 ;;
6b3a0b34
US
2548strongarm-*-kaos*)
2549 tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h kaos.h arm/kaos-strongarm.h"
315cd6b5 2550 tmake_file="arm/t-arm arm/t-strongarm-elf"
6b3a0b34
US
2551 out_file=arm/arm.c
2552 md_file=arm/arm.md
2553 extra_modes=arm/arm-modes.def
2554 ;;
70d65164
NC
2555v850e1-*-*)
2556 target_cpu_default="TARGET_CPU_v850e1"
2557 tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
2558 tm_p_file=v850/v850-protos.h
2559 tmake_file=v850/t-v850e
2560 md_file=v850/v850.md
2561 out_file=v850/v850.c
df3a97a8 2562 extra_options="${extra_options} v850/v850.opt"
70d65164
NC
2563 if test x$stabs = xyes
2564 then
2565 tm_file="${tm_file} dbx.h"
2566 fi
2567 use_collect2=no
2568 c_target_objs="v850-c.o"
2569 cxx_target_objs="v850-c.o"
ec2a60b0 2570 use_fixproto=yes
70d65164 2571 ;;
b4378319
NC
2572v850e-*-*)
2573 target_cpu_default="TARGET_CPU_v850e"
2574 tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
2575 tm_p_file=v850/v850-protos.h
c490cc89 2576 tmake_file=v850/t-v850e
b4378319
NC
2577 md_file=v850/v850.md
2578 out_file=v850/v850.c
df3a97a8 2579 extra_options="${extra_options} v850/v850.opt"
b4378319
NC
2580 if test x$stabs = xyes
2581 then
2582 tm_file="${tm_file} dbx.h"
2583 fi
2584 use_collect2=no
2585 c_target_objs="v850-c.o"
2586 cxx_target_objs="v850-c.o"
ec2a60b0 2587 use_fixproto=yes
b4378319 2588 ;;
61ed06c3
HPN
2589v850-*-*)
2590 target_cpu_default="TARGET_CPU_generic"
c40409ce 2591 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
61ed06c3
HPN
2592 tmake_file=v850/t-v850
2593 if test x$stabs = xyes
2594 then
2595 tm_file="${tm_file} dbx.h"
2596 fi
2597 use_collect2=no
c3edd394
NC
2598 c_target_objs="v850-c.o"
2599 cxx_target_objs="v850-c.o"
ec2a60b0 2600 use_fixproto=yes
61ed06c3 2601 ;;
8aeea6e6 2602vax-*-bsd*) # VAXen running BSD
169274cd 2603 tm_file="${tm_file} vax/bsd.h"
8f99553f 2604 tmake_file=vax/t-memfuncs
61ed06c3 2605 use_collect2=yes
ec2a60b0 2606 use_fixproto=yes
61ed06c3 2607 ;;
8aeea6e6 2608vax-*-sysv*) # VAXen running system V
61ed06c3 2609 tm_file="${tm_file} vax/vaxv.h"
8f99553f 2610 tmake_file=vax/t-memfuncs
ec2a60b0 2611 use_fixproto=yes
61ed06c3 2612 ;;
69474c3c 2613vax-*-netbsdelf*)
ec20cffb 2614 tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
69474c3c 2615 ;;
61ed06c3 2616vax-*-netbsd*)
f982f805 2617 tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
61ed06c3 2618 tmake_file=t-netbsd
1169f9e0 2619 extra_parts=""
5721cd84 2620 use_collect2=yes
61ed06c3
HPN
2621 ;;
2622vax-*-openbsd*)
ca11c37c 2623 tm_file="vax/vax.h vax/openbsd1.h openbsd.h vax/openbsd.h"
61ed06c3
HPN
2624 use_collect2=yes
2625 ;;
8aeea6e6 2626vax-*-ultrix*) # VAXen running ultrix
61ed06c3 2627 tm_file="${tm_file} vax/ultrix.h"
8f99553f 2628 tmake_file=vax/t-memfuncs
ec2a60b0 2629 use_fixproto=yes
61ed06c3 2630 ;;
d19fb8e3 2631xscale-*-elf)
c40409ce 2632 tm_file="arm/xscale-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
315cd6b5 2633 tmake_file="arm/t-arm arm/t-xscale-elf"
d19fb8e3 2634 out_file=arm/arm.c
d19fb8e3 2635 md_file=arm/arm.md
1c0ca89d 2636 extra_modes=arm/arm-modes.def
ec2a60b0 2637 use_fixproto=yes
d19fb8e3
NC
2638 ;;
2639xscale-*-coff)
ca11c37c 2640 tm_file="arm/semi.h arm/aout.h arm/coff.h dbxcoff.h arm/xscale-coff.h arm/arm.h"
315cd6b5 2641 tmake_file="arm/t-arm arm/t-xscale-coff"
d19fb8e3 2642 out_file=arm/arm.c
d19fb8e3 2643 md_file=arm/arm.md
1c0ca89d 2644 extra_modes=arm/arm-modes.def
ec2a60b0 2645 use_fixproto=yes
d19fb8e3 2646 ;;
14d269bb
GK
2647xstormy16-*-elf)
2648 # For historical reasons, the target files omit the 'x'.
c40409ce 2649 tm_file="dbxelf.h elfos.h svr4.h stormy16/stormy16.h"
14d269bb
GK
2650 tm_p_file=stormy16/stormy16-protos.h
2651 md_file=stormy16/stormy16.md
2652 out_file=stormy16/stormy16.c
d45d2353 2653 extra_options=stormy16/stormy16.opt
14d269bb
GK
2654 tmake_file="stormy16/t-stormy16"
2655 extra_parts="crtbegin.o crtend.o"
ec2a60b0 2656 use_fixproto=yes
14d269bb 2657 ;;
03984308
BW
2658xtensa-*-elf*)
2659 tm_file="${tm_file} dbxelf.h elfos.h svr4.h xtensa/elf.h"
1f37a5b2 2660 tmake_file="xtensa/t-xtensa xtensa/t-elf"
03984308
BW
2661 ;;
2662xtensa-*-linux*)
2663 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h"
65d151a7 2664 tmake_file="${tmake_file} xtensa/t-xtensa xtensa/t-linux"
03984308 2665 ;;
2beef00e
AO
2666am33_2.0-*-linux*)
2667 tm_file="mn10300/mn10300.h dbxelf.h elfos.h linux.h mn10300/linux.h"
65d151a7 2668 tmake_file="${tmake_file} mn10300/t-linux"
2beef00e 2669 gas=yes gnu_ld=yes
2beef00e
AO
2670 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2671 use_collect2=no
2672 ;;
38b2d076
DD
2673m32c-*-elf*)
2674 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
2675 c_target_objs="m32c-pragma.o"
2676 cxx_target_objs="m32c-pragma.o"
2677 use_fixproto=yes
2678 ;;
61ed06c3 2679*)
b01bc573 2680 echo "*** Configuration ${target} not supported" 1>&2
61ed06c3
HPN
2681 exit 1
2682 ;;
2683esac
2684
f6bc51cb
L
2685case ${target} in
2686i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
2687 tmake_file="${tmake_file} i386/t-gmm_malloc"
2688 ;;
2689i[34567]86-*-linux* | x86_64-*-linux*)
2690 tmake_file="${tmake_file} i386/t-pmm_malloc"
2691 ;;
2692i[34567]86-*-* | x86_64-*-*)
2693 tmake_file="${tmake_file} i386/t-gmm_malloc"
2694 ;;
2695esac
2696
73f09c99 2697# Support for --with-cpu and related options (and a few unrelated options,
a89ea0df 2698# too).
35341073
NN
2699case ${with_cpu} in
2700 yes | no)
2701 echo "--with-cpu must be passed a value" 1>&2
2702 exit 1
2703 ;;
2704esac
83079d89 2705
35341073
NN
2706# If there is no $with_cpu option, try to infer one from ${target}.
2707# This block sets nothing except for with_cpu.
2708if test x$with_cpu = x ; then
2709 case ${target} in
2710 ep9312-*-*)
2711 # A Cirrus ARM variant.
2712 with_cpu="ep9312"
2713 ;;
d326eaf0
JH
2714 i386-*-*)
2715 with_cpu=i386
2716 ;;
35341073
NN
2717 i486-*-*)
2718 with_cpu=i486
2719 ;;
2720 i586-*-*)
43aba518 2721 case ${target_noncanonical} in
35341073
NN
2722 k6_2-*)
2723 with_cpu=k6-2
2724 ;;
2725 k6_3-*)
2726 with_cpu=k6-3
2727 ;;
2728 k6-*)
2729 with_cpu=k6
2730 ;;
2731 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2732 with_cpu=pentium-mmx
2733 ;;
2734 *)
2735 with_cpu=pentium
2736 ;;
2737 esac
2738 ;;
2739 i686-*-* | i786-*-*)
43aba518 2740 case ${target_noncanonical} in
aafc814c 2741 amdfam10-*|barcelona-*)
21efb4d4
HJ
2742 with_cpu=amdfam10
2743 ;;
9a609388 2744 k8-*|opteron-*|athlon_64-*)
35341073
NN
2745 with_cpu=k8
2746 ;;
2747 athlon_xp-*|athlon_mp-*|athlon_4-*)
2748 with_cpu=athlon-4
2749 ;;
2750 athlon_tbird-*|athlon-*)
2751 with_cpu=athlon
2752 ;;
537bbabd
EC
2753 geode-*)
2754 with_cpu=geode
2755 ;;
35341073
NN
2756 pentium2-*)
2757 with_cpu=pentium2
2758 ;;
5bbeea44 2759 pentium3-*|pentium3m-*)
35341073
NN
2760 with_cpu=pentium3
2761 ;;
5bbeea44 2762 pentium4-*|pentium4m-*)
35341073
NN
2763 with_cpu=pentium4
2764 ;;
5bbeea44
JH
2765 prescott-*)
2766 with_cpu=prescott
2767 ;;
2768 nocona-*)
2769 with_cpu=nocona
2770 ;;
30fd45a0
EC
2771 core2-*)
2772 with_cpu=core2
2773 ;;
5bbeea44
JH
2774 pentium_m-*)
2775 with_cpu=pentium-m
2776 ;;
d326eaf0 2777 pentiumpro-*)
35341073
NN
2778 with_cpu=pentiumpro
2779 ;;
d326eaf0
JH
2780 *)
2781 with_cpu=generic
2782 ;;
35341073
NN
2783 esac
2784 ;;
2785 x86_64-*-*)
d326eaf0 2786 case ${target_noncanonical} in
aafc814c 2787 amdfam10-*|barcelona-*)
21efb4d4
HJ
2788 with_cpu=amdfam10
2789 ;;
d326eaf0
JH
2790 k8-*|opteron-*|athlon_64-*)
2791 with_cpu=k8
2792 ;;
2793 nocona-*)
2794 with_cpu=nocona
2795 ;;
30fd45a0
EC
2796 core2-*)
2797 with_cpu=core2
2798 ;;
d326eaf0
JH
2799 *)
2800 with_cpu=generic
2801 ;;
2802 esac
35341073
NN
2803 ;;
2804 alphaev6[78]*-*-*)
2805 with_cpu=ev67
2806 ;;
2807 alphaev6*-*-*)
2808 with_cpu=ev6
2809 ;;
2810 alphapca56*-*-*)
2811 with_cpu=pca56
2812 ;;
2813 alphaev56*-*-*)
2814 with_cpu=ev56
2815 ;;
2816 alphaev5*-*-*)
2817 with_cpu=ev5
2818 ;;
faf9ab98 2819 frv-*-*linux* | frv400-*-*linux*)
34208acf
AO
2820 with_cpu=fr400
2821 ;;
faf9ab98
AH
2822 frv550-*-*linux*)
2823 with_cpu=fr550
2824 ;;
59fbf3cb
NS
2825 m680[012]0-*-*)
2826 with_cpu=`echo ${target} | sed 's/-.*$//'`
2827 ;;
2828 m68k*-*-*)
10e96df4
NS
2829 case "$with_arch" in
2830 "cf")
2831 with_cpu=${default_cf_cpu}
2832 ;;
2833 "" | "m68k")
2834 with_cpu=m${default_m68k_cpu}
2835 ;;
2836 esac
59fbf3cb 2837 ;;
9200d6c8
RS
2838 mips*-*-vxworks)
2839 with_arch=mips2
2840 ;;
35341073
NN
2841 sparc*-*-*)
2842 with_cpu="`echo ${target} | sed 's/-.*$//'`"
35341073
NN
2843 ;;
2844 esac
2845fi
83079d89 2846
78011587 2847# Similarly for --with-float
2d84a437 2848if test x$with_float = x; then
78011587
PB
2849 case ${target} in
2850 ep9312-*-*)
2851 with_float=hard
2852 ;;
2853 esac
2854fi
2855
fe3e7450
AM
2856# Similarly for --with-schedule.
2857if test x$with_schedule = x; then
2858 case ${target} in
2859 hppa1* | parisc1*)
2860 # Override default PA8000 scheduling model.
2861 with_schedule=7100LC
2862 ;;
2863 esac
2864fi
83079d89 2865
fe3e7450
AM
2866# Validate and mark as valid any --with options supported
2867# by this target. In order to use a particular --with option
2868# you must list it in supported_defaults; validating the value
2869# is optional. This case statement should set nothing besides
2870# supported_defaults.
7816bea0 2871
fe3e7450
AM
2872supported_defaults=
2873case "${target}" in
83079d89 2874 alpha*-*-*)
7816bea0
DJ
2875 supported_defaults="cpu tune"
2876 for which in cpu tune; do
2877 eval "val=\$with_$which"
b597bfd8
NN
2878 case "$val" in
2879 "" \
2880 | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
2881 | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
2882 | 21264a)
7816bea0
DJ
2883 ;;
2884 *)
2885 echo "Unknown CPU used in --with-$which=$val" 1>&2
2886 exit 1
2887 ;;
2888 esac
2889 done
2890 ;;
2891
2892 arm*-*-*)
3cf94279 2893 supported_defaults="arch cpu float tune fpu abi mode"
7816bea0 2894 for which in cpu tune; do
2682e19f 2895 # See if it matches any of the entries in arm-cores.def
7816bea0 2896 eval "val=\$with_$which"
b73f075a 2897 if [ x"$val" = x ] \
d98a72fd 2898 || grep "^ARM_CORE(\"$val\"," \
b73f075a
PB
2899 ${srcdir}/config/arm/arm-cores.def \
2900 > /dev/null; then
2901 # Ok
d98a72fd
RE
2902 new_val=`grep "^ARM_CORE(\"$val\"," \
2903 ${srcdir}/config/arm/arm-cores.def | \
2904 sed -e 's/^[^,]*,[ ]*//' | \
2905 sed -e 's/,.*$//'`
32078532 2906 eval "target_${which}_cname=$new_val"
d98a72fd 2907 echo "For $val real value is $new_val"
b73f075a
PB
2908 true
2909 else
2910 echo "Unknown CPU used in --with-$which=$val" 1>&2
2911 exit 1
2682e19f 2912 fi
7816bea0
DJ
2913 done
2914
b597bfd8
NN
2915 case "$with_arch" in
2916 "" \
9b66ebb1 2917 | armv[23456] | armv2a | armv3m | armv4t | armv5t \
bf98ec6c
PB
2918 | armv5te | armv6j |armv6k | armv6z | armv6zk | armv6-m \
2919 | armv7 | armv7-a | armv7-r | armv7-m \
fa91adc6 2920 | iwmmxt | ep9312)
83079d89 2921 # OK
4ed47bea
JM
2922 ;;
2923 *)
7816bea0 2924 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
83079d89 2925 exit 1
73f09c99
DJ
2926 ;;
2927 esac
83079d89 2928
b597bfd8
NN
2929 case "$with_float" in
2930 "" \
9b66ebb1 2931 | soft | hard | softfp)
83079d89 2932 # OK
73f09c99 2933 ;;
83079d89 2934 *)
7816bea0 2935 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
83079d89 2936 exit 1
73f09c99
DJ
2937 ;;
2938 esac
7816bea0 2939
9b66ebb1
PB
2940 case "$with_fpu" in
2941 "" \
88f77cba 2942 | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | neon )
9b66ebb1
PB
2943 # OK
2944 ;;
2945 *)
5848830f
PB
2946 echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
2947 exit 1
2948 ;;
2949 esac
2950
2951 case "$with_abi" in
2952 "" \
2953 | apcs-gnu | atpcs | aapcs | iwmmxt )
2954 #OK
2955 ;;
2956 *)
2957 echo "Unknown ABI used in --with-abi=$with_abi"
9b66ebb1
PB
2958 exit 1
2959 ;;
2960 esac
2961
3cf94279
PB
2962 case "$with_mode" in
2963 "" \
2964 | arm | thumb )
2965 #OK
2966 ;;
2967 *)
2968 echo "Unknown mode used in --with-mode=$with_mode"
2969 exit 1
2970 ;;
2971 esac
2972
7816bea0 2973 if test "x$with_arch" != x && test "x$with_cpu" != x; then
5848830f 2974 echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
7816bea0 2975 fi
73f09c99 2976 ;;
73f09c99 2977
34208acf
AO
2978 fr*-*-*linux*)
2979 supported_defaults=cpu
2980 case "$with_cpu" in
2981 fr400) ;;
faf9ab98 2982 fr550) ;;
34208acf
AO
2983 *)
2984 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
2985 exit 1
2986 ;;
2987 esac
2988 ;;
2989
7d33c31d 2990 fido-*-* | m680[012]0-*-* | m68k*-*-*)
10e96df4
NS
2991 supported_defaults="arch cpu"
2992 case "$with_arch" in
2993 "" | "m68k"| "cf")
2994 m68k_arch_family="$with_arch"
2995 ;;
2996 *)
2997 echo "Invalid --with-arch=$with_arch" 1>&2
2998 exit 1
2999 ;;
3000 esac
59fbf3cb
NS
3001
3002 # We always have a $with_cpu setting here.
3704aae9 3003 case "$with_cpu" in
900ec02d
JB
3004 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3005 m68k_cpu_ident=$with_cpu
3006 ;;
3007 "m68020-40")
3008 m68k_cpu_ident=m68020
3009 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3010 ;;
3011 "m68020-60")
3012 m68k_cpu_ident=m68020
3013 tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3704aae9
RZ
3014 ;;
3015 *)
900ec02d
JB
3016 # We need the C identifier rather than the string.
3017 m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3018 'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3019 $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3020 ${srcdir}/config/m68k/m68k-devices.def`
3021 if [ x"$m68k_cpu_ident" = x ] ; then
3022 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3023 exit 1
3024 fi
3025 with_cpu="mcpu=$with_cpu"
3704aae9
RZ
3026 ;;
3027 esac
3028 ;;
3029
83079d89 3030 hppa*-*-* | parisc*-*-*)
7816bea0
DJ
3031 supported_defaults="arch schedule"
3032
b597bfd8
NN
3033 case "$with_arch" in
3034 "" | 1.0 | 1.1 | 2.0)
7816bea0
DJ
3035 # OK
3036 ;;
3037 *)
3038 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3039 exit 1
3040 ;;
3041 esac
3042
b597bfd8
NN
3043 case "$with_schedule" in
3044 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
83079d89
DJ
3045 # OK
3046 ;;
3047 *)
3048 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3049 exit 1
3050 ;;
3051 esac
73f09c99 3052 ;;
73f09c99 3053
83079d89 3054 i[34567]86-*-* | x86_64-*-*)
7816bea0
DJ
3055 supported_defaults="arch cpu tune"
3056 for which in arch cpu tune; do
3057 eval "val=\$with_$which"
16aa42c0 3058 case ${val} in
d326eaf0 3059 i386 | i486 \
16aa42c0
NN
3060 | i586 | pentium | pentium-mmx | winchip-c6 | winchip2 \
3061 | c3 | c3-2 | i686 | pentiumpro | pentium2 | pentium3 \
3062 | pentium4 | k6 | k6-2 | k6-3 | athlon | athlon-tbird \
537bbabd 3063 | athlon-4 | athlon-xp | athlon-mp | geode \
d326eaf0
JH
3064 | prescott | pentium-m | pentium4m | pentium3m)
3065 case "${target}" in
3066 x86_64-*-*)
3067 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3068 exit 1
3069 ;;
3070 esac
3071 # OK
3072 ;;
aafc814c 3073 "" | amdfam10 | barcelona | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | generic)
7816bea0
DJ
3074 # OK
3075 ;;
3076 *)
3077 echo "Unknown CPU given in --with-$which=$val." 1>&2
3078 exit 1
3079 ;;
3080 esac
3081 done
3082 ;;
3083
3084 mips*-*-*)
66471b47 3085 supported_defaults="abi arch float tune divide llsc"
7816bea0 3086
16aa42c0
NN
3087 case ${with_float} in
3088 "" | soft | hard)
83079d89
DJ
3089 # OK
3090 ;;
3091 *)
7816bea0 3092 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
83079d89
DJ
3093 exit 1
3094 ;;
3095 esac
73f09c99 3096
16aa42c0
NN
3097 case ${with_abi} in
3098 "" | 32 | o64 | n32 | 64 | eabi)
83079d89
DJ
3099 # OK
3100 ;;
3101 *)
7816bea0 3102 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
83079d89
DJ
3103 exit 1
3104 ;;
3105 esac
9f0df97a
DD
3106
3107 case ${with_divide} in
3108 "" | breaks | traps)
3109 # OK
3110 ;;
3111 *)
3112 echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3113 exit 1
66471b47
DD
3114 ;;
3115 esac
3116
3117 case ${with_llsc} in
3118 yes)
3119 with_llsc=llsc
3120 ;;
3121 no)
3122 with_llsc="no-llsc"
3123 ;;
3124 "")
3125 # OK
3126 ;;
3127 *)
3128 echo "Unknown llsc type used in --with-llsc" 1>&2
3129 exit 1
3130 ;;
9f0df97a 3131 esac
73f09c99 3132 ;;
73f09c99 3133
6e0eea31
NS
3134 mt-*-*)
3135 supported_defaults="arch"
3136
3137 case "$with_arch" in
3138 "" \
3139 | ms1-64-001 \
3140 | ms1-16-002 \
3141 | ms1-16-003 \
3142 | ms2 \
3143 | "")
3144 # OK
3145 ;;
3146 *)
3147 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
3148 exit 1
3149 ;;
3150 esac
3151 ;;
3152
7816bea0
DJ
3153 powerpc*-*-* | rs6000-*-*)
3154 supported_defaults="cpu float tune"
3155
3156 for which in cpu tune; do
3157 eval "val=\$with_$which"
16aa42c0 3158 case ${val} in
1ab1739c
JJ
3159 default32 | default64)
3160 with_which="with_$which"
3161 eval $with_which=
3162 ;;
b0bfee6e
DE
3163 405cr)
3164 tm_defines="${tm_defines} CONFIG_PPC405CR"
3165 eval "with_$which=405"
3166 ;;
1ab1739c 3167 "" | common \
44cd321e 3168 | power | power[23456] | power6x | powerpc | powerpc64 \
16aa42c0 3169 | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
4adf8008
PB
3170 | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
3171 | 505 | 601 | 602 | 603 | 603e | ec603e | 604 \
fa41c305 3172 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
a951757d 3173 | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
7816bea0
DJ
3174 # OK
3175 ;;
3176 *)
3177 echo "Unknown cpu used in --with-$which=$val." 1>&2
3178 exit 1
3179 ;;
3180 esac
3181 done
3182 ;;
3183
f13e0d4e
UW
3184 s390*-*-*)
3185 supported_defaults="arch mode tune"
3186
3187 for which in arch tune; do
3188 eval "val=\$with_$which"
16aa42c0 3189 case ${val} in
93538e8e 3190 "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10)
f13e0d4e
UW
3191 # OK
3192 ;;
3193 *)
3194 echo "Unknown cpu used in --with-$which=$val." 1>&2
3195 exit 1
3196 ;;
3197 esac
3198 done
3199
16aa42c0
NN
3200 case ${with_mode} in
3201 "" | esa | zarch)
f13e0d4e
UW
3202 # OK
3203 ;;
3204 *)
3205 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3206 exit 1
3207 ;;
3208 esac
3209 ;;
3210
da28a3b9
JR
3211 sh[123456ble]-*-* | sh-*-*)
3212 supported_defaults="cpu"
25e651ca 3213 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
da28a3b9
JR
3214 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3215 # OK
3216 ;;
157371cf
AO
3217 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3218 ;;
312209c6
AO
3219 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3220 ;;
da28a3b9
JR
3221 *)
3222 echo "Unknown CPU used in --with-cpu=$with_cpu, known values:" 1>&2
3223 echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
312209c6 3224 echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
157371cf 3225 echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
da28a3b9
JR
3226 exit 1
3227 ;;
3228 esac
3229 ;;
83079d89 3230 sparc*-*-*)
7816bea0
DJ
3231 supported_defaults="cpu float tune"
3232
3233 for which in cpu tune; do
3234 eval "val=\$with_$which"
16aa42c0
NN
3235 case ${val} in
3236 "" | sparc | sparcv9 | sparc64 | sparc86x \
3237 | v7 | cypress | v8 | supersparc | sparclite | f930 \
3238 | f934 | hypersparc | sparclite86x | sparclet | tsc701 \
9eeaed6e 3239 | v9 | ultrasparc | ultrasparc3 | niagara | niagara2)
7816bea0
DJ
3240 # OK
3241 ;;
3242 *)
3243 echo "Unknown cpu used in --with-$which=$val" 1>&2
3244 exit 1
3245 ;;
3246 esac
3247 done
73f09c99 3248
16aa42c0
NN
3249 case ${with_float} in
3250 "" | soft | hard)
83079d89
DJ
3251 # OK
3252 ;;
3253 *)
7816bea0 3254 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
83079d89
DJ
3255 exit 1
3256 ;;
3257 esac
73f09c99 3258 ;;
73f09c99 3259
39aeae85
SL
3260 spu-*-*)
3261 supported_defaults="arch tune"
3262
3263 for which in arch tune; do
3264 eval "val=\$with_$which"
3265 case ${val} in
3266 "" | cell | celledp)
3267 # OK
3268 ;;
3269 *)
3270 echo "Unknown cpu used in --with-$which=$val." 1>&2
3271 exit 1
3272 ;;
3273 esac
3274 done
3275 ;;
3276
83079d89 3277 v850*-*-*)
7816bea0 3278 supported_defaults=cpu
16aa42c0
NN
3279 case ${with_cpu} in
3280 "" | v850e | v850e1)
83079d89
DJ
3281 # OK
3282 ;;
3283 *)
3284 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3285 exit 1
3286 ;;
3287 esac
73f09c99 3288 ;;
fe3e7450 3289esac
73f09c99 3290
fe3e7450
AM
3291# Set some miscellaneous flags for particular targets.
3292target_cpu_default2=
3293case ${target} in
83079d89 3294 alpha*-*-*)
83079d89
DJ
3295 if test x$gas = xyes
3296 then
7816bea0 3297 target_cpu_default2="MASK_GAS"
83079d89 3298 fi
73f09c99 3299 ;;
73f09c99 3300
83079d89 3301 arm*-*-*)
32078532
RE
3302 if test x$target_cpu_cname = x
3303 then
3304 target_cpu_default2=TARGET_CPU_generic
3305 else
3306 target_cpu_default2=TARGET_CPU_$target_cpu_cname
3307 fi
83079d89 3308 ;;
0e5a4ad8 3309
83079d89 3310 hppa*-*-* | parisc*-*-*)
d711cf67 3311 target_cpu_default2="MASK_BIG_SWITCH"
83079d89 3312 if test x$gas = xyes
61ed06c3 3313 then
d711cf67 3314 target_cpu_default2="${target_cpu_default2}|MASK_GAS|MASK_JUMP_IN_DELAY"
83079d89 3315 fi
73f09c99 3316 ;;
73f09c99 3317
7d33c31d 3318 fido*-*-* | m680[012]0-*-* | m68k*-*-*)
900ec02d 3319 target_cpu_default2=$m68k_cpu_ident
10e96df4
NS
3320 if [ x"$m68k_arch_family" != x ]; then
3321 tmake_file="m68k/t-$m68k_arch_family $tmake_file"
3322 fi
900ec02d
JB
3323 ;;
3324
83079d89 3325 mips*-*-*)
5811cb27
RS
3326 if test x$gnu_ld = xyes
3327 then
21c425ee 3328 target_cpu_default2="MASK_SPLIT_ADDRESSES"
5811cb27 3329 fi
b01bc573 3330 case ${target} in
83079d89
DJ
3331 mips*el-*-*)
3332 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
3333 ;;
3334 esac
83079d89
DJ
3335 if test "x$enable_gofast" = xyes
3336 then
c15c90bb 3337 tm_defines="US_SOFTWARE_GOFAST $tm_defines"
83079d89
DJ
3338 tmake_file="mips/t-gofast $tmake_file"
3339 else
3340 tmake_file="mips/t-mips $tmake_file"
74826b0f
EC
3341 fi
3342 ;;
83079d89
DJ
3343
3344 powerpc*-*-* | rs6000-*-*)
7816bea0
DJ
3345 # FIXME: The PowerPC port uses the value set at compile time,
3346 # although it's only cosmetic.
83079d89 3347 if test "x$with_cpu" != x
61ed06c3 3348 then
83079d89 3349 target_cpu_default2="\\\"$with_cpu\\\""
61ed06c3 3350 fi
83079d89
DJ
3351 out_file=rs6000/rs6000.c
3352 c_target_objs="${c_target_objs} rs6000-c.o"
3353 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
3354 tmake_file="rs6000/t-rs6000 ${tmake_file}"
4d4cbc0e
AH
3355
3356 if test x$enable_e500_double = xyes
3357 then
3358 tm_file="$tm_file rs6000/e500-double.h"
3359 fi
74826b0f 3360 ;;
73f09c99 3361
a6ab9fc0
R
3362 sh[123456ble]*-*-* | sh-*-*)
3363 c_target_objs="${c_target_objs} sh-c.o"
3364 cxx_target_objs="${cxx_target_objs} sh-c.o"
3365 ;;
3366
83079d89 3367 sparc*-*-*)
7816bea0
DJ
3368 # Some standard aliases.
3369 case x$with_cpu in
3370 xsparc)
3371 with_cpu=v7
3372 ;;
7816bea0
DJ
3373 xsparcv9 | xsparc64)
3374 with_cpu=v9
3375 ;;
3376 esac
3377
a4d05547 3378 # The SPARC port checks this value at compile-time.
73f09c99
DJ
3379 target_cpu_default2="TARGET_CPU_$with_cpu"
3380 ;;
83079d89 3381 v850*-*-*)
7816bea0
DJ
3382 # FIXME: The v850 is "special" in that it does not support
3383 # runtime CPU selection, only --with-cpu.
83079d89
DJ
3384 case "x$with_cpu" in
3385 x)
3386 ;;
3387 xv850e)
3388 target_cpu_default2="TARGET_CPU_$with_cpu"
3389 ;;
3390 esac
3391 ;;
fe3e7450 3392esac
61ed06c3 3393
fe3e7450 3394t=
66471b47 3395all_defaults="abi cpu arch tune schedule float mode fpu divide llsc"
fe3e7450
AM
3396for option in $all_defaults
3397do
3398 eval "val=\$with_$option"
3399 if test -n "$val"; then
3400 case " $supported_defaults " in
3401 *" $option "*)
3402 ;;
3403 *)
3404 echo "This target does not support --with-$option." 2>&1
6e0eea31 3405 echo "Valid --with options are: $supported_defaults" 2>&1
fe3e7450
AM
3406 exit 1
3407 ;;
3408 esac
7816bea0 3409
fe3e7450
AM
3410 if test "x$t" = x
3411 then
3412 t="{ \"$option\", \"$val\" }"
3413 else
3414 t="${t}, { \"$option\", \"$val\" }"
7816bea0 3415 fi
7816bea0 3416 fi
fe3e7450 3417done
7816bea0 3418
fe3e7450
AM
3419if test "x$t" = x
3420then
3421 configure_default_options="{ { NULL, NULL} }"
3422else
3423 configure_default_options="{ ${t} }"
3424fi
3425
3426if test "$target_cpu_default2" != ""
3427then
3428 if test "$target_cpu_default" != ""
61ed06c3 3429 then
fe3e7450
AM
3430 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3431 else
3432 target_cpu_default=$target_cpu_default2
61ed06c3 3433 fi
fe3e7450 3434fi
This page took 2.489099 seconds and 5 git commands to generate.