]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config.gcc
2003-07-04 H.J. Lu <hongjiu.lu@intel.com>
[thirdparty/gcc.git] / gcc / config.gcc
CommitLineData
bb607926 1# GCC build-, host- and target-specific configuration file.
d0faeb9d 2# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
3# Free Software Foundation, Inc.
bb607926 4
f12b58b3 5#This file is part of GCC.
bb607926 6
f12b58b3 7#GCC is free software; you can redistribute it and/or modify it under
8#the terms of the GNU General Public License as published by the Free
9#Software Foundation; either version 2, or (at your option) any later
10#version.
bb607926 11
f12b58b3 12#GCC is distributed in the hope that it will be useful, but WITHOUT
13#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14#FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15#for more details.
bb607926 16
17#You should have received a copy of the GNU General Public License
f12b58b3 18#along with GCC; see the file COPYING. If not, write to the Free
19#Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20#02111-1307, USA.
bb607926 21
22# This is the GCC build-, host- and target-specific configuration file
23# where a configuration type, as recognized and generated by config.bfd,
24# is mapped to different system-specific definitions and files. This is
25# invoked by the autoconf-generated configure script, called for build,
26# host and target in that order, setting ${machine} to each. Putting it
27# in a separate shell file lets us skip running autoconf when modifying
28# build-, host- and target-specific information.
29
30# This file switches on the shell variable ${machine}, and also uses the
31# following shell variables:
32#
33# with_* Various variables as set by configure.
34#
35# enable_threads_flag Either the name, yes or no depending on whether
36# threads support was requested.
37#
bc5ae993 38# default_use_cxa_atexit
39# "no" by default, can be set to "yes" if a target
40# wishes to use __cxa_atexit() by default if the
41# $enable___cxa_atexit variable is not set.
42#
bb607926 43# gas_flag Either yes or no depending on whether GNU as was
44# requested.
45#
46# gnu_ld_flag Either yes or no depending on whether GNU ld was
47# requested.
48
49# This file sets the following shell variables for use by the
50# autoconf-generated configure script:
51#
52# cpu_type The name of the cpu, if different from machine.
53#
8d4f8d46 54# tm_defines List of target macros to define for all compilations.
55#
bb607926 56# tm_file A list of target macro files, if different from
277773bd 57# "$cpu_type/$cpu_type.h". Usually it's constructed
58# per target in a way like this:
7a6d1a72 59# tm_file="${tm_file} dbxelf.h elfos.h svr4.h ${cpu_type.h}/elf.h"
277773bd 60# Note that the preferred order is:
61# - specific target header "${cpu_type}/${cpu_type.h}"
7a6d1a72 62# - generic headers like dbxelf.h elfos.h, netware.h, etc.
277773bd 63# - specializing target headers like ${cpu_type.h}/elf.h
64# This helps to keep OS specific stuff out of the CPU
65# defining header ${cpu_type}/${cpu_type.h}.
bb607926 66#
67# tm_p_file Location of file with declarations for functions
68# in $out_file.
69#
70# out_file The name of the machine description C support
71# file, if different from "$cpu_type/$cpu_type.c".
72#
73# md_file The name of the machine-description file, if
74# different from "$cpu_type/$cpu_type.md".
75#
76# tmake_file A list of machine-description-specific
77# makefile-fragments, if different from
78# "$cpu_type/t-$cpu_type".
79#
b5ccaa7b 80# extra_modes The name of the file containing a list of extra
81# machine modes, if necessary and different from
82# "$cpu_type/$cpu_type-modes.def".
83#
bb607926 84# extra_objs List of extra objects that should be linked into
85# the compiler proper (cc1, cc1obj, cc1plus)
86# depending on target.
87#
88# extra_headers List of used header files from the directory
b965afcd 89# config/${cpu_type}.
bb607926 90#
91# host_xmake_file List of host-specific makefile-fragments.
92#
93# extra_passes List of extra executables compiled for this target
94# machine, used for compiling from source to object.
95#
96# extra_parts List of extra object files that should be compiled
97# for this target machine.
98#
99# extra_programs Like extra_passes, but these are used when linking.
100#
424da949 101# host_extra_objs List of extra host-dependent objects that should
bb607926 102# be linked into the compiler proper.
103#
424da949 104# host_extra_gcc_objs List of extra host-dependent objects that should
bb607926 105# be linked into the gcc driver.
106#
b197fbcf 107# out_host_hook_obj An object file that provides the host hooks.
108#
424da949 109# c_target_objs List of extra target-dependent objects that be
8daa9e98 110# linked into the C compiler only.
582b17a6 111#
424da949 112# cxx_target_objs List of extra target-dependent objects that be
8daa9e98 113# linked into the C++ compiler only.
582b17a6 114#
eb1bd38b 115# target_gtfiles List of extra source files with type information.
116#
bb607926 117# build_xm_defines List of macros to define when compiling for the
118# build machine.
119#
120# build_xm_file List of files to include when compiling for the
121# build machine.
122#
123# host_xm_defines List of macros to define when compiling for the
124# host machine.
125#
126# host_xm_file List of files to include when compiling for the
127# host machine.
128#
129# xm_defines List of macros to define when compiling for the
130# target machine.
131#
132# xm_file List of files to include when compiling for the
133# target machine.
134#
135# use_collect2 Set to yes or no, depending on whether collect2
136# will be used.
137#
138# target_cpu_default Set to override the default target model.
139#
140# build_install_headers_dir
141# Target to use when installing header files.
142#
bb607926 143# gdb_needs_out_file_path
144# Set to yes if gdb needs a dir command with
145# `dirname $out_file`.
146#
147# build_exeext Set to the suffix, if the build machine requires
148# executables to have a file name suffix.
149#
150# host_exeext Set to the suffix, if the host machine requires
151# executables to have a file name suffix.
152#
153# thread_file Set to control which thread package to use.
154#
155# gas Set to yes or no depending on whether the target
156# system normally uses GNU as.
805e22b2 157#
158# need_64bit_hwint Set to yes if HOST_WIDE_INT must be 64 bits wide
159# for this target. This is true iff
160# MAX_LONG_TYPE_SIZE is 64. (The code which
161# determines the underlying integral type for
162# HOST_WIDE_INT cannot see the definition of
163# MAX_LONG_TYPE_SIZE.)
7dd97ab6 164#
165# configure_default_options
166# Set to an initializer for configure_default_options
167# in configargs.h, based on --with-cpu et cetera.
bb607926 168
169# The following variables are used in each case-construct to build up the
170# outgoing variables:
171#
172# xmake_file Makefile-fragment when this system is as a host,
173# for host_xmake_file.
174#
175# extra_host_objs List of extra objects that should be linked into
176# the compiler proper when this system is a host,
177# for host_extra_objs.
178#
b197fbcf 179# host_hook_obj An object file that provides the host hooks.
180#
bb607926 181# install_headers_dir Makefile-target for how the header file directory
182# is installed, when this system is a build system,
183# for build_install_headers_dir.
184#
bb607926 185# exeext The suffix for executables on this system.
186#
187# gnu_ld Set to yes or no depending on whether the target
188# system normally uses GNU ld.
189
190out_file=
191xmake_file=
192tmake_file=
193extra_headers=
194extra_passes=
195extra_parts=
196extra_programs=
197extra_objs=
198extra_host_objs=
199extra_gcc_objs=
8daa9e98 200c_target_objs=
201cxx_target_objs=
b197fbcf 202host_hook_obj=host-default.o
8d4f8d46 203tm_defines=
bb607926 204xm_defines=
bb607926 205# Set this to force installation and use of collect2.
206use_collect2=
207# Set this to override the default target model.
208target_cpu_default=
209# Set this to control how the header file directory is installed.
210install_headers_dir=install-headers-tar
bb607926 211# Set this if gdb needs a dir command with `dirname $out_file`
212gdb_needs_out_file_path=
213# Set this if the build machine requires executables to have a
214# file name suffix.
215exeext=
216# Set this to control which thread package will be used.
217thread_file=
218# Reinitialize these from the flag values every loop pass, since some
219# configure entries modify them.
220gas="$gas_flag"
221gnu_ld="$gnu_ld_flag"
222enable_threads=$enable_threads_flag
bc5ae993 223default_use_cxa_atexit=no
22ac052b 224target_gtfiles=
805e22b2 225need_64bit_hwint=
bb607926 226
b696fe80 227# Don't carry these over build->host->target. Please.
228xm_file=
229md_file=
230
c2527f80 231# Obsolete configurations.
c2527f80 232case $machine in
ece7f381 233 dummy)
e48f919a 234 if test "x$enable_obsolete" != xyes; then
c2527f80 235 echo "*** Configuration $machine is obsolete." >&2
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;;
c2527f80 241esac
242
ece7f381 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.
246case $machine in
247 alpha*-*-linux*libc1* \
248 | i[34567]86-sequent-sysv* \
249 | i[34567]86-go32-* \
250 | i[34567]86-*-go32* \
251 | m68k-*-linux*aout* \
252 | m68k-*-linux*libc1* \
253 | mips64orion*-*-rtems* \
254 | powerpc-*-linux*libc1* \
255 | sparc-*-linux*aout* \
256 | sparc-*-linux*libc1* \
257 | sparc-hal-solaris2* \
258 | thumb-*-* \
259 | *-*-linux*coff* \
260 | *-*-linux*oldld* \
261 | *-*-rtemsaout* \
262 | *-*-rtemscoff* \
263 )
264 echo "*** Configuration $machine not supported" 1>&2
265 exit 1
266 ;;
267esac
268
bb607926 269# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
83287f80 270# updated in each machine entry. Also set default extra_headers for some
271# machines.
bb607926 272tm_p_file=
273cpu_type=`echo $machine | sed 's/-.*$//'`
274case $machine in
275alpha*-*-*)
276 cpu_type=alpha
805e22b2 277 need_64bit_hwint=yes
bb607926 278 ;;
6e421549 279strongarm*-*-*)
280 cpu_type=arm
281 ;;
282arm*-*-*)
283 cpu_type=arm
755eb2b4 284 extra_headers="mmintrin.h"
6e421549 285 ;;
286ep9312*-*-*)
287 cpu_type=arm
288 ;;
289xscale-*-*)
331beb1a 290 cpu_type=arm
755eb2b4 291 extra_headers="mmintrin.h"
331beb1a 292 ;;
bb607926 293i[34567]86-*-*)
294 cpu_type=i386
7a8ca04a 295 extra_headers="mmintrin.h xmmintrin.h emmintrin.h pmmintrin.h"
bb607926 296 ;;
5c66405b 297x86_64-*-*)
298 cpu_type=i386
e829311e 299 extra_headers="mmintrin.h xmmintrin.h emmintrin.h"
805e22b2 300 need_64bit_hwint=yes
5c66405b 301 ;;
b965afcd 302ia64-*-*)
303 extra_headers=ia64intrin.h
805e22b2 304 need_64bit_hwint=yes
b965afcd 305 ;;
6630177d 306hppa*-*-* | parisc*-*-*)
bb607926 307 cpu_type=pa
308 ;;
124c3198 309m680[012]0-*-*)
bb607926 310 cpu_type=m68k
83287f80 311 extra_headers=math-68881.h
312 ;;
313m68k-*-*)
314 extra_headers=math-68881.h
bb607926 315 ;;
316mips*-*-*)
317 cpu_type=mips
805e22b2 318 need_64bit_hwint=yes
bb607926 319 ;;
bb607926 320powerpc*-*-*)
321 cpu_type=rs6000
6f0a80d3 322 extra_headers="ppc-asm.h altivec.h spe.h"
805e22b2 323 need_64bit_hwint=yes
324 ;;
325rs6000*-*-*)
326 need_64bit_hwint=yes
327 ;;
328sparc64*-*-*)
329 cpu_type=sparc
330 need_64bit_hwint=yes
bb607926 331 ;;
bb607926 332sparc*-*-*)
333 cpu_type=sparc
334 ;;
805e22b2 335s390*-*-*)
336 need_64bit_hwint=yes
337 ;;
4ee34c70 338# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
339sh[123456789l]*-*-*)
87e19636 340 cpu_type=sh
805e22b2 341 need_64bit_hwint=yes
87e19636 342 ;;
7960374c 343tic4x-*-*)
344 cpu_type=c4x
345 ;;
bb607926 346esac
347
348tm_file=${cpu_type}/${cpu_type}.h
20ffb0b1 349if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
bb607926 350then
20ffb0b1 351 tm_p_file=${cpu_type}/${cpu_type}-protos.h
352fi
b5ccaa7b 353extra_modes=
354if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
355then
356 extra_modes=${cpu_type}/${cpu_type}-modes.def
357fi
a8456aba 358
359case $machine in
360x86_64-*-*)
361 tm_file="i386/biarch64.h ${tm_file}"
362 ;;
363esac
364
bb607926 365# On a.out targets, we need to use collect2.
366case $machine in
367*-*-*aout*)
368 use_collect2=yes
369 ;;
582b17a6 370esac
bb607926 371
805e22b2 372# Common parts for widely ported systems.
bb607926 373case $machine in
374*-*-linux*)
48c8ccc5 375 case $machine in
ece7f381 376 *-*-linux*libc1* | *-*-linux*aout*)
48c8ccc5 377 ;;
378 *)
4aa81c94 379 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
380 gas=yes gnu_ld=yes
48c8ccc5 381 case x${enable_threads} in
382 x | xyes | xposix) thread_file='posix'
383 ;;
384 esac
385 ;;
386 esac
bb607926 387 ;;
2567d1ca 388*-*-gnu*)
389 # On the Hurd, the setup is just about the same on
390 # each different CPU. The specific machines that we
391 # support are matched above and just set $cpu_type.
a26ea229 392 tm_file="${cpu_type}/gnu.h"
0d6378a9 393 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
2567d1ca 394 # GNU always uses ELF.
395 elf=yes
396 # GNU tools are the only tools.
397 gnu_ld=yes
398 gas=yes
399 # These details are the same as for Linux.
2567d1ca 400 # But here we need a little extra magic.
32e8a7fc 401 tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
a26ea229 402 case $machine in
7698a084 403 alpha*)
404 tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
405 ;;
a26ea229 406 i[34567]86-*-*)
d2307a72 407 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}"
a26ea229 408 ;;
a26ea229 409 esac
2567d1ca 410 ;;
bb607926 411*-*-openbsd*)
412 tm_file=${cpu_type}/openbsd.h
c7be79ca 413 tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
bb607926 414 if test x$enable_threads = xyes; then
415 thread_file='posix'
416 tmake_file="${tmake_file} t-openbsd-thread"
417 fi
418 ;;
4ace673e 419*-*-netbsd*)
9e121a36 420 tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
4ace673e 421 gas=yes
422 gnu_ld=yes
b7ac288f 423
424 # NetBSD 2.0 and later get POSIX threads enabled by default.
425 # Allow them to be explicitly enabled on any other version.
09f85456 426 case x${enable_threads} in
b7ac288f 427 x)
428 case $machine in
429 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
430 thread_file='posix'
431 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
432 ;;
433 esac
434 ;;
09f85456 435 xyes | xposix)
436 thread_file='posix'
66860219 437 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
09f85456 438 ;;
439 esac
9a33b00e 440
441 # NetBSD 1.7 and later are set up to use GCC's crtstuff for
442 # ELF configurations. We will clear extra_parts in the
443 # a.out configurations.
444 case $machine in
9f6a375a 445 *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
9a33b00e 446 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
447 ;;
448 esac
bc5ae993 449
450 # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
451 # default (unless overridden by --disable-__cxa_atexit).
452 case $machine in
453 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
454 default_use_cxa_atexit=yes
455 ;;
456 esac
4ace673e 457 ;;
1307f5d6 458*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
459 # This is the place-holder for the generic a.out configuration
460 # of FreeBSD. No actual configuration resides here since
461 # there was only ever a bare-bones ix86 configuration for
462 # a.out and it exists solely in the machine-specific section.
463 # This place-holder must exist to avoid dropping into
464 # the generic ELF configuration of FreeBSD (i.e. it must be
465 # ordered before that section).
466 ;;
467*-*-freebsd*)
468 # This is the generic ELF configuration of FreeBSD. Later
469 # machine-specific sections may refine and add to this
470 # configuration.
471 #
472 # Due to tm_file entry ordering issues that vary between cpu
473 # architectures, we only define fbsd_tm_file to allow the
474 # machine-specific section to dictate the final order of all
475 # entries of tm_file with the minor exception that components
476 # of the tm_file set here will always be of the form:
477 #
327811ee 478 # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
1307f5d6 479 #
480 # The machine-specific section should not tamper with this
481 # ordering but may order all other entries of tm_file as it
482 # pleases around the provided core setting.
483 gas=yes
484 gnu_ld=yes
485 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
486 case $machine in
487 *-*-freebsd3 | *-*-freebsd[3].*) fbsd_tm_file="freebsd3.h";;
488 *-*-freebsd4 | *-*-freebsd[4].*) fbsd_tm_file="freebsd4.h";;
489 *-*-freebsd5 | *-*-freebsd[5].*) fbsd_tm_file="freebsd5.h";;
490 *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";;
491 *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
492 esac
bf13a391 493 tmake_file="t-slibgcc-elf-ver t-freebsd"
49b2e77d 494 xmake_file=none
1307f5d6 495 case x${enable_threads} in
496 xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";;
497 x | xyes | xpthreads | xposix)
498 thread_file='posix'
499 tmake_file="${tmake_file} t-freebsd-thread"
bf13a391 500 # Before 5.0, FreeBSD can't bind shared libraries to -lc
501 # when "optionally" threaded via weak pthread_* checks.
502 case $machine in
503 *-*-freebsd[34] | *-*-freebsd[34].*)
504 tmake_file="${tmake_file} t-slibgcc-nolc-override";;
505 esac
1307f5d6 506 ;;
507 *) echo 'Unknown thread configuration for FreeBSD'; exit 1;;
508 esac
0ba2c1cf 509 fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
1307f5d6 510 ;;
1638c263 511*-*-darwin*)
512 tm_file="${tm_file} darwin.h"
513 tm_p_file="${tm_p_file} darwin-protos.h"
514 tmake_file="t-darwin"
515 target_gtfiles="\$(srcdir)/config/darwin.c"
516 c_target_objs="darwin-c.o"
517 cxx_target_objs="darwin-c.o"
518 extra_parts="crt2.o"
95315a36 519 extra_objs="darwin.o"
1638c263 520 ;;
805e22b2 521*-*-vxworks*)
522 tmake_file=t-vxworks
523 tm_file="${tm_file} elfos.h svr4.h vxworks.h"
524 thread_file='vxworks'
525 use_collect2=yes
805e22b2 526 ;;
bb607926 527esac
528
529case $machine in
530# Support site-specific machine types.
531*local*)
bb607926 532 rest=`echo $machine | sed -e "s/$cpu_type-//"`
bb607926 533 tm_file=${cpu_type}/$rest.h
e1688c3e 534 if test -f $srcdir/config/${cpu_type}/xm-$rest.h
535 then xm_file=${cpu_type}/xm-$rest.h
bb607926 536 fi
e1688c3e 537 if test -f $srcdir/config/${cpu_type}/x-$rest
538 then xmake_file=${cpu_type}/x-$rest
539 fi
540 if test -f $srcdir/config/${cpu_type}/t-$rest
541 then tmake_file=${cpu_type}/t-$rest
bb607926 542 fi
543 ;;
9caef960 544alpha*-*-unicosmk*)
545 use_collect2=yes
546 tm_file="${tm_file} alpha/unicosmk.h"
582b17a6 547
9caef960 548 # Don't include t-ieee for now because we don't support that yet
549 # tmake_file="alpha/t-ieee"
550 tmake_file="alpha/t-unicosmk"
551 ;;
bb607926 552alpha*-*-linux*)
553 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
554 target_cpu_default="MASK_GAS"
e1ff7102 555 tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
bb607926 556 ;;
7698a084 557alpha*-*-gnu*)
558 target_cpu_default="MASK_GAS"
559 tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
560 ;;
bb607926 561alpha*-*-freebsd*)
1307f5d6 562 tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
bb607926 563 target_cpu_default="MASK_GAS"
e1ff7102 564 tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
565 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
bb607926 566 ;;
567alpha*-*-netbsd*)
4ace673e 568 tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
bb607926 569 target_cpu_default="MASK_GAS"
e1ff7102 570 tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
bb607926 571 ;;
572
573alpha*-*-openbsd*)
f75effa0 574 tm_file="${cpu_type}/${cpu_type}.h ${tm_file}"
bb607926 575 # default x-alpha is only appropriate for dec-osf.
576 target_cpu_default="MASK_GAS"
577 tmake_file="alpha/t-alpha alpha/t-ieee"
578 ;;
582b17a6 579
41e38a87 580alpha*-dec-osf[45]*)
bb607926 581 if test x$stabs = xyes
582 then
583 tm_file="${tm_file} dbx.h"
584 fi
585 if test x$gas != xyes
586 then
587 extra_passes="mips-tfile mips-tdump"
588 fi
589 use_collect2=yes
41e38a87 590 tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4"
591 tm_file="${tm_file} alpha/osf.h"
b965afcd 592 extra_headers=va_list.h
bb607926 593 case $machine in
bb607926 594 *-*-osf4*)
bb607926 595 # Some versions of OSF4 (specifically X4.0-9 296.7) have
596 # a broken tar, so we use cpio instead.
597 install_headers_dir=install-headers-cpio
41e38a87 598 # Set target_cpu_default except on 4.0a.
599 case $machine in
600 *-*-osf4.0a) ;;
601 *) target_cpu_default=MASK_SUPPORT_ARCH
602 esac
bb607926 603 ;;
604 *-*-osf5*)
41e38a87 605 tm_file="${tm_file} alpha/osf5.h"
bb607926 606 target_cpu_default=MASK_SUPPORT_ARCH
607 ;;
608 esac
609 ;;
56685c17 610alpha64-dec-*vms*)
f75effa0 611 tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
805e22b2 612 xm_file="alpha/xm-vms.h"
56685c17 613 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-vms64 alpha/t-ieee"
614 xmake_file=alpha/x-vms
615 exeext=.exe
616 # This removes the cpu type and manufacturer components and
617 # replaces "." with "_" in the operating system version.
618 case $host in *-*-*vms*)
619 target_alias=`echo $host \
620 | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
621 ;;
622 esac
ffe38693 623 install_headers_dir=install-headers-cp
56685c17 624 prefix=/gnu
625 local_prefix=/gnu
626 ;;
73777e7b 627alpha*-dec-*vms*)
f75effa0 628 tm_file="${tm_file} alpha/vms.h"
e1688c3e 629 xm_file=alpha/xm-vms.h
bb607926 630 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
40752711 631 xmake_file=alpha/x-vms
73777e7b 632 exeext=.exe
633 # This removes the cpu type and manufacturer components and
634 # replaces "." with "_" in the operating system version.
635 case $host in *-*-*vms*)
636 target_alias=`echo $host \
637 | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
638 ;;
639 esac
ffe38693 640 install_headers_dir=install-headers-cp
73777e7b 641 prefix=/gnu
642 local_prefix=/gnu
bb607926 643 ;;
01d15dc5 644arc-*-elf*)
7a6d1a72 645 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
01d15dc5 646 extra_parts="crtinit.o crtfini.o"
647 ;;
bb607926 648arm-*-coff* | armel-*-coff*)
de660240 649 tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h"
bb607926 650 tmake_file=arm/t-arm-coff
651 ;;
bb607926 652arm-semi-aof | armel-semi-aof)
de660240 653 tm_file="arm/semiaof.h arm/aof.h arm/arm.h"
23573244 654 tmake_file=arm/t-semi
bb607926 655 ;;
66f02fd0 656arm*-*-freebsd*|strongarm*-*-freebsd*)
657 tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
658 tmake_file="${tmake_file} arm/t-strongarm-elf"
659 ;;
f470dade 660arm*-*-netbsdelf*)
2b6c0e61 661 tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
662 tmake_file="${tmake_file} arm/t-netbsd"
f470dade 663 ;;
bb607926 664arm*-*-netbsd*)
4ace673e 665 tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
bb607926 666 tmake_file="t-netbsd arm/t-netbsd"
9a33b00e 667 extra_parts=""
87a1ff8e 668 use_collect2=yes
bb607926 669 ;;
c806acc4 670arm*-*-linux*) # ARM GNU/Linux with ELF
7a6d1a72 671 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
32e8a7fc 672 tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
bb607926 673 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
674 gnu_ld=yes
675 case x${enable_threads} in
676 x | xyes | xpthreads | xposix)
677 thread_file='posix'
678 ;;
679 esac
680 ;;
681arm*-*-uclinux*) # ARM ucLinux
7a6d1a72 682 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h arm/uclinux-elf.h"
bb607926 683 tmake_file=arm/t-arm-elf
684 ;;
bb607926 685arm*-*-ecos-elf)
7a6d1a72 686 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
bb607926 687 tmake_file=arm/t-arm-elf
582b17a6 688 ;;
214507b9 689arm*-*-rtems*)
214507b9 690 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"
691 tmake_file="arm/t-arm-elf t-rtems"
692 if test x$enable_threads = xyes; then
693 thread_file='rtems'
694 fi
695 ;;
7d57ec45 696arm*-*-elf | ep9312-*-elf)
7a6d1a72 697 tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
bb607926 698 tmake_file=arm/t-arm-elf
699 ;;
ebde2335 700arm*-wince-pe*)
701 tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h arm/pe.h arm/wince-pe.h"
702 tmake_file=arm/t-wince-pe
703 extra_objs="pe.o"
704 ;;
bb607926 705arm-*-pe*)
83e163bd 706 tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h arm/pe.h"
bb607926 707 tmake_file=arm/t-pe
708 extra_objs="pe.o"
709 ;;
578f5dbf 710arm*-*-kaos*)
711 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"
712 tmake_file=arm/t-arm-elf
713 ;;
bb607926 714avr-*-*)
715 ;;
7960374c 716c4x-*-rtems* | tic4x-*-rtems*)
742d48c2 717 tmake_file="c4x/t-c4x t-rtems"
dfaadc1e 718 tm_file="c4x/c4x.h c4x/rtems.h rtems.h"
742d48c2 719 if test x$enable_threads = xyes; then
720 thread_file='rtems'
721 fi
10cac3d7 722 c_target_objs="c4x-c.o"
723 cxx_target_objs="c4x-c.o"
742d48c2 724 ;;
7960374c 725c4x-* | tic4x-*)
bb607926 726 tmake_file=c4x/t-c4x
10cac3d7 727 c_target_objs="c4x-c.o"
728 cxx_target_objs="c4x-c.o"
bb607926 729 ;;
e03f789f 730cris-*-aout)
277773bd 731 tm_file="dbxelf.h ${tm_file} cris/aout.h"
e03f789f 732 gas=yes
733 tmake_file="cris/t-cris cris/t-aout"
734 ;;
735cris-*-elf | cris-*-none)
7a6d1a72 736 tm_file="dbxelf.h elfos.h ${tm_file}"
e03f789f 737 tmake_file="cris/t-cris cris/t-elfmulti"
738 gas=yes
739 ;;
740cris-*-linux*)
7a6d1a72 741 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
e03f789f 742 tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
e03f789f 743 ;;
bb607926 744d30v-*)
7a6d1a72 745 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
bb607926 746 ;;
747dsp16xx-*)
748 ;;
bb607926 749fr30-*-elf)
7a6d1a72 750 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
bb607926 751 tmake_file=fr30/t-fr30
752 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
753 ;;
efb6037d 754frv-*-elf)
755 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} frv/frv-abi.h"
756 tmake_file=frv/t-frv
757 ;;
742d48c2 758h8300-*-rtems*)
759 tmake_file="h8300/t-h8300 t-rtems"
214507b9 760 tm_file="h8300/h8300.h h8300/rtems.h rtems.h"
742d48c2 761 if test x$enable_threads = xyes; then
762 thread_file='rtems'
763 fi
742d48c2 764 ;;
15b65932 765h8300-*-elf*)
766 tmake_file="h8300/t-h8300 h8300/t-elf"
767 tm_file="h8300/h8300.h h8300/elf.h"
15b65932 768 ;;
bb607926 769h8300-*-*)
bb607926 770 ;;
6630177d 771hppa*64*-*-linux* | parisc*64*-*-linux*)
772 target_cpu_default="(MASK_PA_11 | MASK_PA_20)"
9bd9af5d 773 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \
774 pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h pa/pa64-linux.h"
6630177d 775 tmake_file=pa/t-linux64
6630177d 776 gas=yes gnu_ld=yes
805e22b2 777 need_64bit_hwint=yes
6630177d 778 ;;
779hppa*-*-linux* | parisc*-*-linux*)
ee376abe 780 target_cpu_default="MASK_PA_11 | MASK_NO_SPACE_REGS"
7a6d1a72 781 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \
6630177d 782 pa/pa32-regs.h pa/pa32-linux.h"
32e8a7fc 783 tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
bb607926 784 ;;
785hppa*-*-openbsd*)
786 target_cpu_default="MASK_PA_11"
8cff5eeb 787 tmake_file=pa/t-bsd
bb607926 788 ;;
789hppa1.1-*-pro*)
790 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
7a6d1a72 791 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
8cff5eeb 792 tmake_file="pa/t-bsd pa/t-pro"
711b6446 793 xmake_file="pa/x-ada"
bb607926 794 ;;
795hppa1.1-*-osf*)
796 target_cpu_default="MASK_PA_11"
797 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
8cff5eeb 798 tmake_file="pa/t-bsd pa/t-pa"
711b6446 799 xmake_file="pa/x-ada"
bb607926 800 use_collect2=yes
801 ;;
802hppa1.1-*-rtems*)
803 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
214507b9 804 tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h rtems.h"
b91c6222 805 tmake_file="pa/t-bsd pa/t-pro t-rtems"
711b6446 806 xmake_file="pa/x-ada"
b91c6222 807 if test x$enable_threads = xyes; then
808 thread_file='rtems'
809 fi
bb607926 810 ;;
bb607926 811hppa1.1-*-bsd*)
812 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
813 target_cpu_default="MASK_PA_11"
8cff5eeb 814 tmake_file="pa/t-bsd pa/t-pa"
711b6446 815 xmake_file="pa/x-ada"
bb607926 816 use_collect2=yes
817 ;;
bb607926 818hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
819 target_cpu_default="MASK_PA_11"
820 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
8b29fefa 821 tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
711b6446 822 xmake_file="pa/x-ada"
bb607926 823 if test x$enable_threads = x; then
824 enable_threads=$have_pthread_h
825 fi
826 case x${enable_threads} in
827 xyes | xdce)
828 tmake_file="${tmake_file} pa/t-dce-thr"
829 ;;
830 esac
831 install_headers_dir=install-headers-cpio
832 use_collect2=yes
833 ;;
834hppa1.0-*-hpux10*)
835 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
8b29fefa 836 tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
711b6446 837 xmake_file="pa/x-ada"
bb607926 838 if test x$enable_threads = x; then
839 enable_threads=$have_pthread_h
840 fi
841 case x${enable_threads} in
842 xyes | xdce)
843 tmake_file="${tmake_file} pa/t-dce-thr"
844 ;;
845 esac
846 install_headers_dir=install-headers-cpio
847 use_collect2=yes
848 ;;
849hppa*64*-*-hpux11*)
9bd9af5d 850 if test x$gas = xyes
851 then
852 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
853 pa/pa64-regs.h pa/long_double.h pa/pa-hpux.h \
854 pa/pa-hpux11.h pa/pa-64.h pa/pa64-hpux.h"
855 else
856 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h pa/elf.h \
857 pa/pa64-regs.h pa/long_double.h pa/pa-hpux.h \
858 pa/pa-hpux11.h pa/pa-64.h pa/pa64-hpux.h"
859 fi
805e22b2 860 need_64bit_hwint=yes
3c066828 861 tmake_file="pa/t-pa64 pa/t-pa-hpux"
711b6446 862 xmake_file="pa/x-ada"
f9f97de8 863 target_cpu_default="(MASK_PA_11|MASK_PA_20|MASK_GAS)"
de419443 864 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
b166f502 865 if test x$gnu_ld = xyes
866 then
867 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
868 fi
bb607926 869# if [ x$enable_threads = x ]; then
870# enable_threads=$have_pthread_h
871# fi
872# if [ x$enable_threads = xyes ]; then
873# thread_file='dce'
874# tmake_file="${tmake_file} pa/t-dce-thr"
875# fi
876 install_headers_dir=install-headers-cpio
bb607926 877 ;;
878hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
879 target_cpu_default="MASK_PA_11"
880 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
8b29fefa 881 tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
711b6446 882 xmake_file="pa/x-ada"
bb607926 883# if test x$enable_threads = x; then
884# enable_threads=$have_pthread_h
885# fi
886# if test x$enable_threads = xyes; then
887# thread_file='dce'
888# tmake_file="${tmake_file} pa/t-dce-thr"
889# fi
890 install_headers_dir=install-headers-cpio
891 use_collect2=yes
892 ;;
893hppa1.0-*-hpux11*)
894 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
8b29fefa 895 tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
711b6446 896 xmake_file="pa/x-ada"
bb607926 897# if test x$enable_threads = x; then
898# enable_threads=$have_pthread_h
899# fi
900# if test x$enable_threads = xyes; then
901# thread_file='dce'
902# tmake_file="${tmake_file} pa/t-dce-thr"
903# fi
904 install_headers_dir=install-headers-cpio
905 use_collect2=yes
906 ;;
bb607926 907i370-*-opened*) # IBM 360/370/390 Architecture
b1cc82fe 908 xm_defines='FATAL_EXIT_CODE=12'
bb607926 909 tm_file=i370/oe.h
8cff5eeb 910 tmake_file="i370/t-oe i370/t-i370"
10cac3d7 911 c_target_objs="i370-c.o"
912 cxx_target_objs="i370-c.o"
bb607926 913 ;;
914i370-*-mvs*)
b1cc82fe 915 xm_defines='FATAL_EXIT_CODE=12'
bb607926 916 tm_file=i370/mvs.h
10cac3d7 917 tmake_file="i370/t-i370"
918 c_target_objs="i370-c.o"
919 cxx_target_objs="i370-c.o"
bb607926 920 ;;
921i370-*-linux*)
7a6d1a72 922 tm_file="dbxelf.h elfos.h svr4.h linux.h i370/linux.h ${tm_file}"
32e8a7fc 923 tmake_file="t-slibgcc-elf-ver t-linux"
bb607926 924 # broken_install=yes
bb607926 925 elf=yes
bb607926 926 ;;
ffd05090 927i[34567]86-*-darwin*)
1638c263 928 tm_file="${tm_file} i386/darwin.h"
ffd05090 929 ;;
bb607926 930i[34567]86-*-elf*)
d2307a72 931 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
8cff5eeb 932 tmake_file="i386/t-i386elf t-svr4"
bb607926 933 ;;
bb607926 934i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
b1cc82fe 935 xm_defines="SMALL_ARG_MAX"
ece7f381 936 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h"
bb607926 937 extra_parts="crtbegin.o crtend.o"
938 tmake_file=i386/t-crtpic
939 ;;
bb607926 940i[34567]86-*-netware) # Intel 80386's running netware
d2307a72 941 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h netware.h i386/netware.h"
bb607926 942 tmake_file=i386/t-netware
943 ;;
bb607926 944i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
f92a3fd0 945 if test x$gas = xyes
946 then
947 tm_file="${tm_file} usegas.h"
948 fi
b1cc82fe 949 xm_defines="SMALL_ARG_MAX"
d2307a72 950 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h"
bb607926 951 tmake_file=t-svr4
952 extra_parts="crtbegin.o crtend.o"
953 install_headers_dir=install-headers-cpio
954 ;;
bb607926 955i[34567]86-*-aout*)
d2307a72 956 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/i386-aout.h"
bb607926 957 ;;
958i[34567]86-*-beoself* | i[34567]86-*-beos*)
bb607926 959 tmake_file='i386/t-beos i386/t-crtpic'
d2307a72 960 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/beos-elf.h"
bb607926 961 extra_parts='crtbegin.o crtend.o'
962 ;;
41e38a87 963i[34567]86-*-freebsd2 | i[34567]86-*-freebsd2.* | i[34567]86-*-freebsd*aout*)
d2307a72 964 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/freebsd-aout.h"
bb607926 965 tmake_file=t-freebsd
966 ;;
967i[34567]86-*-freebsd*)
d2307a72 968 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
a8456aba 969 ;;
970x86_64-*-freebsd*)
d2307a72 971 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
bb607926 972 ;;
f406b863 973i[34567]86-*-netbsdelf*)
d2307a72 974 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
f406b863 975 ;;
bb607926 976i[34567]86-*-netbsd*)
d2307a72 977 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
bb607926 978 tmake_file=t-netbsd
9a33b00e 979 extra_parts=""
87a1ff8e 980 use_collect2=yes
bb607926 981 ;;
8bc47d57 982x86_64-*-netbsd*)
d2307a72 983 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"
8bc47d57 984 ;;
bb607926 985i[34567]86-*-openbsd*)
d2307a72 986 tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h ${tm_file}"
c7be79ca 987 # needed to unconfuse gdb
988 tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
bb607926 989 # we need collect2 until our bug is fixed...
990 use_collect2=yes
991 ;;
992i[34567]86-*-coff*)
d2307a72 993 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
bb607926 994 ;;
bb607926 995i[34567]86-*-linux*aout*) # Intel 80386's running GNU/Linux
996 # with a.out format
bb607926 997 tmake_file="t-linux-aout i386/t-crtstuff"
d2307a72 998 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h linux-aout.h i386/linux-aout.h"
bb607926 999 gnu_ld=yes
bb607926 1000 ;;
1001i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux
1002 # with ELF format using the
1003 # GNU/Linux C library 5
d2307a72 1004 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
32e8a7fc 1005 tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 i386/t-crtstuff"
bb607926 1006 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1007 gnu_ld=yes
bb607926 1008 if test x$enable_threads = xyes; then
1009 thread_file='single'
1010 fi
1011 ;;
1012i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
1013 # with ELF format using glibc 2
1014 # aka GNU/Linux C library 6
d2307a72 1015 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
32e8a7fc 1016 tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
bb607926 1017 ;;
5c66405b 1018x86_64-*-linux*)
d2307a72 1019 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \
277773bd 1020 i386/x86-64.h i386/linux64.h"
2ee36fb7 1021 tmake_file="t-slibgcc-elf-ver t-linux i386/t-linux64"
5c66405b 1022 ;;
bb607926 1023i[34567]86-*-gnu*)
bb607926 1024 ;;
bb607926 1025i[34567]86-pc-msdosdjgpp*)
1026 xm_file=i386/xm-djgpp.h
f283da8d 1027 tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
c070948e 1028 tmake_file=i386/t-djgpp
bb607926 1029 gnu_ld=yes
1030 gas=yes
1031 exeext=.exe
bb607926 1032 case $host in *pc-msdosdjgpp*)
1033 target_alias=djgpp
1034 ;;
1035 esac
1036 ;;
1037i[34567]86-moss-msdos* | i[34567]86-*-moss*)
d2307a72 1038 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h i386/moss.h"
bb607926 1039 tmake_file=t-libc-ok
1040 gnu_ld=yes
1041 gas=yes
1042 ;;
1043i[34567]86-*-lynxos*)
1044 if test x$gas = xyes
1045 then
d2307a72 1046 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx.h i386/lynx.h"
bb607926 1047 else
d2307a72 1048 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx-ng.h i386/lynx-ng.h"
bb607926 1049 fi
bb607926 1050 ;;
1051i[34567]86-*-mach*)
d2307a72 1052 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/mach.h"
bb607926 1053# tmake_file=t-libc-ok
1054 use_collect2=yes
1055 ;;
41e38a87 1056i[34567]86-*-rtems*)
d2307a72 1057 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h"
bb607926 1058 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1059 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
742d48c2 1060 if test x$enable_threads = xyes; then
1061 thread_file='rtems'
1062 fi
bb607926 1063 ;;
1064i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
bb607926 1065 install_headers_dir=install-headers-cpio
f9e40cfb 1066 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sco5.h"
bb607926 1067 if test x$gas = xyes
1068 then
f92a3fd0 1069 tm_file="usegas.h ${tm_file}"
bb607926 1070 fi
f9e40cfb 1071 tmake_file=i386/t-sco5
1072 extra_parts="crtbegin.o crtend.o"
bb607926 1073 ;;
bb607926 1074i[34567]86-*-solaris2*)
b1cc82fe 1075 xm_defines="SMALL_ARG_MAX"
0307caef 1076 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h i386/sol2.h"
8cff5eeb 1077 tmake_file="i386/t-sol2 t-svr4"
32e8a7fc 1078 if test x$gnu_ld = xyes; then
1079 tmake_file="$tmake_file t-slibgcc-elf-ver"
1080 else
1081 tmake_file="$tmake_file t-slibgcc-sld"
1082 fi
bb607926 1083 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
bb607926 1084 if test x${enable_threads} = x; then
1085 enable_threads=$have_pthread_h
1086 if test x${enable_threads} = x; then
1087 enable_threads=$have_thread_h
1088 fi
1089 fi
1090 if test x${enable_threads} = xyes; then
1091 if test x${have_pthread_h} = xyes; then
1092 thread_file='posix'
1093 else
1094 thread_file='solaris'
1095 fi
1096 fi
1097 ;;
16031d31 1098i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
d2307a72 1099 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h"
bb607926 1100 if test x$stabs = xyes
1101 then
1102 tm_file="${tm_file} dbx.h"
1103 fi
8cff5eeb 1104 tmake_file="i386/t-crtpic t-svr4"
bb607926 1105 extra_parts="crtbegin.o crtend.o"
1106 if test x$enable_threads = xyes; then
1107 thread_file='posix'
1108 fi
1109 ;;
1110i[34567]86-*-sysv4*) # Intel 80386's running system V.4
b1cc82fe 1111 xm_defines="SMALL_ARG_MAX"
493529eb 1112 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h"
bb607926 1113 if test x$stabs = xyes
1114 then
1115 tm_file="${tm_file} dbx.h"
1116 fi
8cff5eeb 1117 tmake_file="i386/t-crtpic t-svr4"
bb607926 1118 extra_parts="crtbegin.o crtend.o"
1119 ;;
1120i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
d2307a72 1121 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h i386/udk.h"
8cff5eeb 1122 tmake_file="i386/t-crtpic i386/t-udk t-svr4"
bb607926 1123 extra_parts="crtbegin.o crtend.o"
1124 install_headers_dir=install-headers-cpio
1125 ;;
bb607926 1126i[34567]86-*-sysv*) # Intel 80386's running system V
bb607926 1127 if test x$gas = xyes
1128 then
1129 if test x$stabs = xyes
1130 then
d2307a72 1131 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/svr3gas.h i386/svr3dbx.h"
bb607926 1132 tmake_file=i386/t-svr3dbx
41e38a87 1133 extra_parts="svr3.ifile svr3z.ifile"
bb607926 1134 else
d2307a72 1135 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/svr3gas.h"
bb607926 1136 extra_parts="crtbegin.o crtend.o"
1137 tmake_file=i386/t-crtstuff
1138 fi
1139 else
d2307a72 1140 tm_file="${tm_file} svr3.h i386/unix.h i386/att.h i386/sysv3.h"
bb607926 1141 extra_parts="crtbegin.o crtend.o"
1142 tmake_file=i386/t-crtstuff
1143 fi
1144 tmake_file="$tmake_file i386/t-crtpic"
1145 ;;
1146i386-*-vsta) # Intel 80386's running VSTa kernel
d2307a72 1147 xm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/xm-vsta.h"
1148 tm_file="${tm_file} i386/vsta.h"
bb607926 1149 ;;
bb607926 1150i[34567]86-*-pe | i[34567]86-*-cygwin*)
8728e49b 1151 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h"
e1688c3e 1152 xm_file=i386/xm-cygwin.h
8728e49b 1153 tmake_file="i386/t-cygming i386/t-cygwin"
bb607926 1154 extra_objs=winnt.o
8728e49b 1155 c_target_objs=cygwin2.o
1156 cxx_target_objs=cygwin2.o
bb607926 1157 if test x$enable_threads = xyes; then
8728e49b 1158 thread_file='posix'
bb607926 1159 fi
1160 exeext=.exe
1161 ;;
1162i[34567]86-*-mingw32*)
8728e49b 1163 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h"
e1688c3e 1164 xm_file=i386/xm-mingw32.h
8728e49b 1165 tmake_file="i386/t-cygming i386/t-mingw32"
dba327a6 1166 xmake_file=i386/x-mingw32
bb607926 1167 extra_objs=winnt.o
bb607926 1168 if test x$enable_threads = xyes; then
1169 thread_file='win32'
1170 fi
1171 exeext=.exe
1172 case $machine in
170a37e8 1173 *mingw32crt*)
bb607926 1174 tm_file="${tm_file} i386/crtdll.h"
1175 ;;
8728e49b 1176 *mingw32msv* | *mingw32*)
170a37e8 1177 ;;
bb607926 1178 esac
1179 ;;
1180i[34567]86-*-uwin*)
2b41198e 1181 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygwin.h i386/uwin.h"
bb607926 1182 tmake_file="i386/t-cygwin i386/t-uwin"
1183 extra_objs=winnt.o
bb607926 1184 if test x$enable_threads = xyes; then
1185 thread_file='win32'
1186 fi
1187 exeext=.exe
1188 ;;
49d31318 1189i[34567]86-*-interix3*)
d2307a72 1190 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"
c070948e 1191 tmake_file="t-interix i386/t-interix"
2fbafe8b 1192 extra_objs=winnt.o
c070948e 1193 xmake_file="x-interix"
49d31318 1194 if test x$enable_threads = xyes ; then
1195 thread_file='posix'
1196 fi
1197 if test x$stabs = xyes ; then
1198 tm_file="${tm_file} dbxcoff.h"
1199 fi
1200 ;;
bb607926 1201i[34567]86-*-interix*)
d2307a72 1202 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h interix.h"
8cff5eeb 1203 tmake_file="t-interix i386/t-interix"
2fbafe8b 1204 extra_objs=winnt.o
bb607926 1205 if test x$enable_threads = xyes ; then
1206 thread_file='posix'
1207 fi
1208 if test x$stabs = xyes ; then
1209 tm_file="${tm_file} dbxcoff.h"
1210 fi
1211 ;;
578f5dbf 1212i[34567]86-*-kaos*)
1213 tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
1214 tmake_file="i386/t-i386elf t-svr4"
1215 ;;
bb607926 1216i960-*-coff*)
1217 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1218 tmake_file=i960/t-960bare
4f7a0ef9 1219 c_target_objs="i960-c.o"
1220 cxx_target_objs="i960-c.o"
bb607926 1221 ;;
1222i960-*-rtems)
1223 tmake_file="i960/t-960bare t-rtems"
214507b9 1224 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/rtems.h rtems.h"
742d48c2 1225 if test x$enable_threads = xyes; then
1226 thread_file='rtems'
1227 fi
4f7a0ef9 1228 c_target_objs="i960-c.o"
1229 cxx_target_objs="i960-c.o"
bb607926 1230 ;;
1231i960-*-*) # Default i960 environment.
1232 use_collect2=yes
29122112 1233 tmake_file=i960/t-960bare
4f7a0ef9 1234 c_target_objs="i960-c.o"
1235 cxx_target_objs="i960-c.o"
bb607926 1236 ;;
1237ia64*-*-elf*)
7a6d1a72 1238 tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
bb607926 1239 tmake_file="ia64/t-ia64"
1240 target_cpu_default="0"
1241 if test x$gas = xyes
1242 then
1243 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1244 fi
1245 if test x$gnu_ld = xyes
1246 then
1247 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1248 fi
127ab935 1249 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
bb607926 1250 ;;
49b2e77d 1251ia64*-*-freebsd*)
0670e09b 1252 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
49b2e77d 1253 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1254 tmake_file="${tmake_file} ia64/t-ia64"
127ab935 1255 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
49b2e77d 1256 ;;
bb607926 1257ia64*-*-linux*)
7a6d1a72 1258 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
32e8a7fc 1259 tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc"
bb607926 1260 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
127ab935 1261 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
805e22b2 1262 if test x"$use_libunwind_exceptions" = xyes; then
1263 tmake_file="$tmake_file t-libunwind"
1264 fi
bb607926 1265 ;;
d838d791 1266ia64*-*-hpux*)
7a6d1a72 1267 tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h ia64/hpux_longdouble.h"
4c9b2035 1268 tmake_file="ia64/t-ia64 ia64/t-hpux"
d838d791 1269 target_cpu_default="MASK_GNU_AS"
1270 if test x$enable_threads = xyes; then
1271 thread_file='posix'
1272 fi
297cec9a 1273 use_collect2=no
23ebf0fe 1274 c_target_objs="ia64-c.o"
1275 cxx_target_objs="ia64-c.o"
d838d791 1276 ;;
3c791c03 1277ip2k-*-elf)
41806125 1278 tm_file="elfos.h ${tm_file}"
ee362681 1279 ;;
bb607926 1280m32r-*-elf*)
7a6d1a72 1281 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
4f889607 1282 extra_parts="crtinit.o crtfini.o"
19cd32af 1283 ;;
bb607926 1284# m68hc11 and m68hc12 share the same machine description.
1285m68hc11-*-*|m6811-*-*)
7a6d1a72 1286 tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
bb607926 1287 tm_p_file="m68hc11/m68hc11-protos.h"
1288 md_file="m68hc11/m68hc11.md"
1289 out_file="m68hc11/m68hc11.c"
1290 tmake_file="m68hc11/t-m68hc11-gas"
1291 ;;
1292m68hc12-*-*|m6812-*-*)
7a6d1a72 1293 tm_file="m68hc11/m68hc12.h dbxelf.h elfos.h m68hc11/m68hc11.h"
bb607926 1294 tm_p_file="m68hc11/m68hc11-protos.h"
bb607926 1295 md_file="m68hc11/m68hc11.md"
1296 out_file="m68hc11/m68hc11.c"
1297 tmake_file="m68hc11/t-m68hc11-gas"
1298 ;;
bb607926 1299m68000-hp-hpux*) # HP 9000 series 300
bb607926 1300 if test x$gas = xyes
1301 then
bb607926 1302 tm_file=m68k/hp310g.h
1303 else
bb607926 1304 tm_file=m68k/hp310.h
1305 fi
8cff5eeb 1306 tmake_file=m68k/t-hp320
bb607926 1307 install_headers_dir=install-headers-cpio
1308 use_collect2=yes
bb607926 1309 ;;
bb607926 1310m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
bb607926 1311 if test x$gas = xyes
1312 then
bb607926 1313 tm_file=m68k/hp320g.h
1314 else
bb607926 1315 tm_file=m68k/hpux7.h
1316 fi
1317 install_headers_dir=install-headers-cpio
1318 use_collect2=yes
bb607926 1319 ;;
1320m68k-hp-hpux*) # HP 9000 series 300
bb607926 1321 if test x$gas = xyes
1322 then
bb607926 1323 tm_file=m68k/hp320g.h
1324 else
bb607926 1325 tm_file=m68k/hp320.h
1326 fi
1327 install_headers_dir=install-headers-cpio
1328 use_collect2=yes
bb607926 1329 ;;
bb607926 1330m68k-*-aout*)
1331 tmake_file=m68k/t-m68kbare
1332 tm_file="m68k/m68k-aout.h libgloss.h"
bb607926 1333 ;;
1334m68k-*-coff*)
1335 tmake_file=m68k/t-m68kbare
1336 tm_file="m68k/m68k-coff.h dbx.h"
bb607926 1337 ;;
1338m68020-*-elf* | m68k-*-elf*)
2f50f9f1 1339 tm_file="m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h"
bb607926 1340 tmake_file=m68k/t-m68kelf
37f722b2 1341 extra_parts="crtbegin.o crtend.o"
bb607926 1342 ;;
124c3198 1343m68010-*-netbsdelf* | m68k*-*-netbsdelf*)
1344 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1345 case $machine in
1346 m68010*)
1347 target_cpu_default="0"
1348 ;;
1349 *)
1350 target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD"
1351 ;;
1352 esac
124c3198 1353 ;;
bb607926 1354m68k*-*-netbsd*)
1355 tm_file=m68k/netbsd.h
1356 tmake_file=t-netbsd
9a33b00e 1357 extra_parts=""
87a1ff8e 1358 use_collect2=yes
bb607926 1359 ;;
1360m68k*-*-openbsd*)
c7be79ca 1361 # needed to unconfuse gdb
1362 tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
bb607926 1363 # we need collect2 until our bug is fixed...
1364 use_collect2=yes
1365 ;;
bb607926 1366m68k-*-sysv4*) # Motorola m68k's running system V.4
1367 tm_file=m68k/m68kv4.h
bb607926 1368 tmake_file=t-svr4
1369 extra_parts="crtbegin.o crtend.o"
bb607926 1370 ;;
bb607926 1371m68k-*-linux*) # Motorola m68k's running GNU/Linux
1372 # with ELF format using glibc 2
1373 # aka the GNU/Linux C library 6.
bb607926 1374 tm_file=m68k/linux.h
56935b5d 1375 tmake_file="t-slibgcc-elf-ver t-linux"
bb607926 1376 ;;
41e38a87 1377m68k-*-rtems*)
bb607926 1378 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
214507b9 1379 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"
37f722b2 1380 extra_parts="crtbegin.o crtend.o"
742d48c2 1381 if test x$enable_threads = xyes; then
1382 thread_file='rtems'
1383 fi
bb607926 1384 ;;
bb607926 1385mcore-*-elf)
7a6d1a72 1386 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} mcore/mcore-elf.h"
bb607926 1387 tmake_file=mcore/t-mcore
1388 ;;
1389mcore-*-pe*)
1390 tm_file=mcore/mcore-pe.h
1391 tmake_file=mcore/t-mcore-pe
1392 ;;
61ab9ea9 1393mips-sgi-irix6*o32) # SGI System V.4., IRIX 6, O32 ABI
ce10b255 1394 tm_file="${tm_file} mips/iris5.h"
61ab9ea9 1395 if test x$gas = xyes
1396 then
ce10b255 1397 tm_file="${tm_file} mips/iris5gas.h mips/iris6-o32-gas.h"
61ab9ea9 1398 if test x$stabs = xyes
1399 then
8a76f31d 1400 tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
61ab9ea9 1401 fi
6cba0fa7 1402 tmake_file=mips/t-iris5-gas
61ab9ea9 1403 else
ce10b255 1404 tm_file="${tm_file} mips/iris6-o32-as.h"
61ab9ea9 1405 tmake_file=mips/t-iris5-as
1406 fi
1407 tm_file="${tm_file} mips/iris6-o32.h"
1408 tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6"
61ab9ea9 1409 xm_file=mips/xm-iris5.h
ce10b255 1410 target_cpu_default="MASK_ABICALLS"
61ab9ea9 1411 # mips-tfile doesn't work yet
1412 # See comment in mips/iris5.h file.
1413 use_collect2=yes
1414# if test x$enable_threads = xyes; then
1415# thread_file='irix'
1416# fi
1417 ;;
bb607926 1418mips-sgi-irix6*) # SGI System V.4., IRIX 6
ce10b255 1419 tm_file="${tm_file} mips/iris5.h mips/iris6.h"
bb607926 1420 if test "x$gnu_ld" = xyes
1421 then
ce10b255 1422 tm_file="${tm_file} mips/iris6gld.h"
bb607926 1423 fi
61ab9ea9 1424 tmake_file="mips/t-iris mips/t-iris5-6 mips/t-iris6"
ce10b255 1425 target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT"
1426 tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
bb607926 1427# if test x$enable_threads = xyes; then
1428# thread_file='irix'
1429# fi
1430 ;;
bb607926 1431mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
ce10b255 1432 tm_file="${tm_file} mips/iris5.h mips/iris6.h mips/cross64.h"
3239b2ba 1433 xm_file=mips/xm-iris5.h
8cff5eeb 1434 tmake_file="mips/t-iris mips/t-cross64"
ce10b255 1435 target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT"
1436 tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
bb607926 1437 # See comment in mips/iris[56].h files.
1438 use_collect2=yes
1439# if test x$enable_threads = xyes; then
1440# thread_file='irix'
1441# fi
1442 ;;
bb607926 1443mips-sgi-irix5*) # SGI System V.4., IRIX 5
ce10b255 1444 tm_file="${tm_file} mips/iris5.h"
bb607926 1445 if test x$gas = xyes
1446 then
ce10b255 1447 tm_file="${tm_file} mips/iris5gas.h"
bb607926 1448 if test x$stabs = xyes
1449 then
8a76f31d 1450 tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
bb607926 1451 fi
6cba0fa7 1452 tmake_file=mips/t-iris5-gas
bb607926 1453 else
61ab9ea9 1454 tmake_file=mips/t-iris5-as
bb607926 1455 fi
61ab9ea9 1456 tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6"
3239b2ba 1457 xm_file=mips/xm-iris5.h
ce10b255 1458 target_cpu_default="MASK_ABICALLS"
bb607926 1459 # mips-tfile doesn't work yet
bb607926 1460 # See comment in mips/iris5.h file.
1461 use_collect2=yes
1462# if test x$enable_threads = xyes; then
1463# thread_file='irix'
1464# fi
1465 ;;
4ace673e 1466mips*-*-netbsd*) # NetBSD/mips, either endian.
52b9a586 1467 target_cpu_default="MASK_GAS|MASK_ABICALLS"
a9c6f96e 1468 tm_file="elfos.h ${tm_file} mips/netbsd.h"
805e22b2 1469 tmake_file="${tmake_file}"
bb607926 1470 ;;
d0faeb9d 1471mips64*-*-linux*)
1472 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h mips/linux64.h"
ece7f381 1473 tmake_file="t-slibgcc-elf-ver t-linux mips/t-linux64"
d0faeb9d 1474
1475 # This default ABI is a partial lie: t-linux64 overrides the
1476 # DRIVER_SELF_SPEC that sets the default abi, in the spec file
1477 # that is installed. What GCC thinks of as the default must
1478 # remain as ABI_32 such that the SONAMEs of the libgcc shared
1479 # libraries remain compatible with those of mips-linux-gnu.
1480 tm_defines="MIPS_ISA_DEFAULT=1 MIPS_ABI_DEFAULT=ABI_32"
1481 target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT"
1482 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
1483 gnu_ld=yes
1484 gas=yes
1485 if test x$enable_threads = xyes; then
1486 thread_file='posix'
1487 fi
1488 ;;
bb607926 1489mips*-*-linux*) # Linux MIPS, either endian.
858ac7b9 1490 tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
bb607926 1491 case $machine in
613a38b0 1492 mipsisa32*-*)
613a38b0 1493 target_cpu_default="MASK_SOFT_FLOAT"
3c791c03 1494 tm_defines="MIPS_ISA_DEFAULT=32"
613a38b0 1495 ;;
1496 esac
805e22b2 1497 tmake_file="t-slibgcc-elf-ver t-linux"
bb607926 1498 ;;
1499mips*el-*-openbsd*) # mips little endian
1500 target_cpu_default="MASK_GAS|MASK_ABICALLS"
1501 ;;
1502mips*-*-openbsd*) # mips big endian
1503 target_cpu_default="MASK_GAS|MASK_ABICALLS"
1504 tm_file="mips/openbsd-be.h ${tm_file}"
1505 ;;
f4deb416 1506mipsisa32-*-elf* | mipsisa32el-*-elf*)
efd092f3 1507 tm_file="${tm_file} mips/elf.h"
582b17a6 1508 tmake_file=mips/t-isa3264
4d5b08a8 1509 tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_EABI"
582b17a6 1510 ;;
a02568c6 1511mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
1512 tm_file="${tm_file} mips/elf.h"
1513 tmake_file=mips/t-isa3264
1514 tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_EABI"
1515 ;;
5381547d 1516mipsisa64-*-elf* | mipsisa64el-*-elf*)
efd092f3 1517 tm_file="${tm_file} mips/elf.h"
5381547d 1518 tmake_file=mips/t-isa3264
1519 target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
2c018156 1520 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_EABI"
5381547d 1521 ;;
2857c21b 1522mipsisa64sr71k-*-elf*)
1523 tm_file="${tm_file} mips/elf.h"
1524 tmake_file=mips/t-sr71k
1525 target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
2c018156 1526 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2857c21b 1527 ;;
19c56034 1528mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
efd092f3 1529 tm_file="${tm_file} mips/elf.h"
19c56034 1530 tmake_file=mips/t-elf
1531 target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1532 tm_defines="MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
1533 ;;
f4deb416 1534mips-*-elf* | mipsel-*-elf*)
3c791c03 1535 tm_file="${tm_file} mips/elf.h"
bb607926 1536 tmake_file=mips/t-elf
1537 ;;
f4deb416 1538mips64-*-elf* | mips64el-*-elf*)
3c791c03 1539 tm_file="${tm_file} mips/elf64.h"
bb607926 1540 tmake_file=mips/t-elf
3c791c03 1541 target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1542 tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
bb607926 1543 ;;
2857c21b 1544mips64vr-*-elf* | mips64vrel-*-elf*)
1545 tm_file="mips/vr.h ${tm_file} mips/elf64.h"
0e760677 1546 tm_defines="MIPS_ABI_DEFAULT=ABI_O64 MIPS_MARCH_CONTROLS_SOFT_FLOAT=1"
2857c21b 1547 tmake_file=mips/t-vr
1548 ;;
f4deb416 1549mips64orion-*-elf* | mips64orionel-*-elf*)
3c791c03 1550 tm_file="${tm_file} mips/elforion.h mips/elf64.h"
1551 tmake_file=mips/t-elf
bb607926 1552 tmake_file=mips/t-elf
3c791c03 1553 target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1554 tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
bb607926 1555 ;;
742d48c2 1556mips*-*-rtems*)
3c791c03 1557 tm_file="${tm_file} mips/elf.h mips/rtems.h rtems.h"
742d48c2 1558 tmake_file="mips/t-elf t-rtems"
1559 if test x$enable_threads = xyes; then
1560 thread_file='rtems'
1561 fi
bb607926 1562 ;;
f4deb416 1563mipstx39-*-elf* | mipstx39el-*-elf*)
efd092f3 1564 tm_file="${tm_file} mips/r3900.h mips/elf.h"
bb607926 1565 tmake_file=mips/t-r3900
1566 ;;
68cbb7e3 1567mmix-knuth-mmixware)
805e22b2 1568 need_64bit_hwint=yes
68cbb7e3 1569 ;;
bb607926 1570mn10300-*-*)
7a6d1a72 1571 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
bb607926 1572 if test x$stabs = xyes
1573 then
1574 tm_file="${tm_file} dbx.h"
1575 fi
1576 use_collect2=no
1577 ;;
f470dade 1578ns32k-*-netbsdelf*)
1579 echo "GCC does not yet support the ${machine} target"; exit 1
1580 ;;
bb607926 1581ns32k-*-netbsd*)
5f16a202 1582 tm_file="${tm_file} netbsd.h netbsd-aout.h ns32k/netbsd.h"
bb607926 1583 # On NetBSD, the headers are already okay, except for math.h.
b2dd7dbf 1584 tmake_file="t-netbsd ns32k/t-ns32k"
9a33b00e 1585 extra_parts=""
87a1ff8e 1586 use_collect2=yes
bb607926 1587 ;;
1588pdp11-*-bsd)
1589 tm_file="${tm_file} pdp11/2bsd.h"
1590 ;;
1591pdp11-*-*)
1592 ;;
1593avr-*-*)
1594 ;;
bb607926 1595powerpc-*-openbsd*)
ece7f381 1596 tmake_file="${tmake_file} rs6000/t-fprules "
83287f80 1597 extra_headers=
bb607926 1598 ;;
8eaf2dd1 1599powerpc64-*-linux*)
527d5be8 1600 tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1601 case x$with_cpu in
1602 x|xpowerpc64|xdefault64) tm_file="${tm_file} rs6000/default64.h";;
1603 esac
1604 tm_file="${tm_file} rs6000/linux64.h"
1605 tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-linux rs6000/t-ppccomm rs6000/t-linux64"
8eaf2dd1 1606 ;;
fca26bb8 1607powerpc64-*-gnu*)
1608 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"
1638c263 1609 tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-gnu rs6000/t-linux64"
fca26bb8 1610 ;;
bb607926 1611powerpc-*-beos*)
8eaf2dd1 1612 tm_file="${tm_file} rs6000/aix.h rs6000/beos.h rs6000/xcoff.h"
1638c263 1613 tmake_file="rs6000/t-fprules rs6000/t-beos"
83287f80 1614 extra_headers=
bb607926 1615 ;;
17ac16a1 1616powerpc-*-darwin*)
1638c263 1617 tm_file="${tm_file} rs6000/darwin.h"
1618 tmake_file="rs6000/t-fprules t-darwin rs6000/t-darwin"
25b7153e 1619 extra_headers=altivec.h
805e22b2 1620 # override ppc default
1621 need_64bit_hwint=
b197fbcf 1622 # powerpc-darwin host support.
1623 host_hook_obj=host-darwin.o
1624 xmake_file=rs6000/x-darwin
17ac16a1 1625 ;;
327811ee 1626powerpc*-*-freebsd*)
7a6d1a72 1627 tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
1638c263 1628 tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
327811ee 1629 ;;
93006578 1630powerpc-*-netbsd*)
5eeaefac 1631 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
1632 tmake_file="${tmake_file} rs6000/t-netbsd"
93006578 1633 ;;
e37e4a50 1634powerpc-*-chorusos*)
7a6d1a72 1635 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h chorus.h"
1638c263 1636 tmake_file="rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm"
e37e4a50 1637 case x${enable_threads} in
1638 xyes | xpthreads | xposix)
1639 thread_file='posix'
1640 ;;
1641 esac
1642 ;;
6f0a80d3 1643powerpc-*-eabispe*)
6f0a80d3 1644 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabispe.h"
79bbdafd 1645 tmake_file="rs6000/t-spe rs6000/t-ppccomm"
6f0a80d3 1646 ;;
bbf524e7 1647powerpc-*-eabisimaltivec*)
bbf524e7 1648 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
1638c263 1649 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
bbf524e7 1650 ;;
bb607926 1651powerpc-*-eabisim*)
7a6d1a72 1652 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
1638c263 1653 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 1654 ;;
1655powerpc-*-elf*)
7a6d1a72 1656 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1638c263 1657 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 1658 ;;
553c09a8 1659powerpc-*-eabialtivec*)
553c09a8 1660 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
1638c263 1661 tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
553c09a8 1662 ;;
bb607926 1663powerpc-*-eabi*)
7a6d1a72 1664 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h"
1638c263 1665 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 1666 ;;
1667powerpc-*-rtems*)
214507b9 1668 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
ece7f381 1669 tmake_file="rs6000/t-fprules t-rtems rs6000/t-ppccomm"
742d48c2 1670 if test x$enable_threads = xyes; then
1671 thread_file='rtems'
1672 fi
bb607926 1673 ;;
ece7f381 1674powerpc-*-linux*altivec*)
553c09a8 1675 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h"
1638c263 1676 tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
553c09a8 1677 ;;
ece7f381 1678powerpc-*-linux*spe*)
f797f85f 1679 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
1680 tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
1681 ;;
bb607926 1682powerpc-*-linux*)
7a6d1a72 1683 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
1638c263 1684 tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
bb607926 1685 ;;
fca26bb8 1686powerpc-*-gnu-gnualtivec*)
1687 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"
1638c263 1688 tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
fca26bb8 1689 if test x$enable_threads = xyes; then
1690 thread_file='posix'
1691 fi
1692 ;;
1693powerpc-*-gnu*)
1694 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"
1638c263 1695 tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
fca26bb8 1696 if test x$enable_threads = xyes; then
1697 thread_file='posix'
1698 fi
1699 ;;
bb607926 1700powerpc-wrs-vxworks*)
805e22b2 1701 # We want vxworks.h after rs6000/sysv4.h, which unfortunately
1702 # means we have to redo the tm_file list from scratch.
1703 tm_file="rs6000/rs6000.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1704 tm_file="${tm_file} vxworks.h rs6000/vxworks.h"
1638c263 1705 tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
805e22b2 1706 extra_headers=ppc-asm.h
1707 ;;
16d627c6 1708powerpc-wrs-windiss*)
16d627c6 1709 tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/windiss.h"
1638c263 1710 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
16d627c6 1711 thread_file=""
1712 ;;
bb607926 1713powerpcle-*-sysv*)
7a6d1a72 1714 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
1638c263 1715 tmake_file="rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm"
bb607926 1716 ;;
1717powerpcle-*-elf*)
7a6d1a72 1718 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
1638c263 1719 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 1720 ;;
1721powerpcle-*-eabisim*)
7a6d1a72 1722 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
1638c263 1723 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 1724 ;;
1725powerpcle-*-eabi*)
7a6d1a72 1726 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
1638c263 1727 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
bb607926 1728 ;;
578f5dbf 1729powerpc-*-kaos*)
1730 tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h kaos.h rs6000/kaos-ppc.h"
1731 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1732 ;;
1733powerpcle-*-kaos*)
1734 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"
1735 tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1736 ;;
bb607926 1737rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
8eaf2dd1 1738 tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h"
1638c263 1739 tmake_file="rs6000/t-fprules rs6000/t-newas"
bb607926 1740 use_collect2=yes
83287f80 1741 extra_headers=
bb607926 1742 ;;
1743rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
527d5be8 1744 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h"
bb607926 1745 tmake_file=rs6000/t-aix43
bb607926 1746 use_collect2=yes
1747 thread_file='aix'
83287f80 1748 extra_headers=
bb607926 1749 ;;
b1974978 1750rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
527d5be8 1751 tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h"
bb607926 1752 tmake_file=rs6000/t-aix43
bb607926 1753 use_collect2=yes
1754 thread_file='aix'
83287f80 1755 extra_headers=
bb607926 1756 ;;
b1974978 1757rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
b1974978 1758 tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h"
1759 tmake_file=rs6000/t-aix52
1760 use_collect2=yes
1761 thread_file='aix'
1762 extra_headers=
1763 ;;
bb607926 1764rs6000-*-lynxos*)
327811ee 1765 tm_file="lynx.h rs6000/lynx.h"
1638c263 1766 tmake_file=rs6000/t-fprules
bb607926 1767 use_collect2=yes
1768 ;;
582b17a6 1769s390-*-linux*)
7a6d1a72 1770 tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
1b2d98e9 1771 tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff"
346e8a0c 1772 ;;
582b17a6 1773s390x-*-linux*)
d50213e6 1774 tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
48de175f 1775 tm_p_file=s390/s390-protos.h
1776 md_file=s390/s390.md
b5ccaa7b 1777 extra_modes=s390/s390-modes.def
48de175f 1778 out_file=s390/s390.c
1b2d98e9 1779 tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff s390/t-linux64"
346e8a0c 1780 ;;
578f5dbf 1781sh-*-elf* | sh[2346l]*-*-elf* | sh*-*-kaos*)
bb607926 1782 tmake_file="sh/t-sh sh/t-elf"
febf5bcd 1783 case $machine in
1784 shl* | sh64l*)
1785 tm_file="sh/little.h ${tm_file}"
1786 tmake_file="${tmake_file} sh/t-le"
1787 ;;
1788 esac
87ab0a3d 1789 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h"
febf5bcd 1790 case $machine in
1791 sh64*)
1792 tmake_file="${tmake_file} sh/t-sh64"
1793 tm_file="${tm_file} sh/sh64.h"
1794 extra_headers="shmedia.h ushmedia.h sshmedia.h"
febf5bcd 1795 ;;
493914a8 1796 sh4_single*) target_cpu_default="SELECT_SH4_SINGLE" ;;
1797 sh4*) target_cpu_default="SELECT_SH4" ;;
1798 sh3e*) target_cpu_default="SELECT_SH3E" ;;
1799 sh3*) target_cpu_default="SELECT_SH3" ;;
87ed74ef 1800 sh2e*) target_cpu_default="SELECT_SH2E" ;;
493914a8 1801 sh2*) target_cpu_default="SELECT_SH2" ;;
1802 esac
1803 case $machine in
1804 sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;;
aa76b2b5 1805 esac
1806 case $machine in
578f5dbf 1807 sh*-*-kaos*) tm_file="${tm_file} kaos.h sh/kaos-sh.h" ;;
febf5bcd 1808 esac
87e19636 1809 ;;
bb607926 1810sh-*-rtemself*)
1811 tmake_file="sh/t-sh sh/t-elf t-rtems"
87ab0a3d 1812 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/rtemself.h rtems.h"
742d48c2 1813 if test x$enable_threads = xyes; then
1814 thread_file='rtems'
1815 fi
bb607926 1816 ;;
1817sh-*-rtems*)
1818 tmake_file="sh/t-sh t-rtems"
1566e12e 1819 tm_file="${tm_file} dbxcoff.h sh/coff.h sh/rtems.h rtems.h"
742d48c2 1820 if test x$enable_threads = xyes; then
1821 thread_file='rtems'
1822 fi
bb607926 1823 ;;
493914a8 1824sh-*-linux* | sh[2346lbe]*-*-linux*)
805e22b2 1825 tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
493914a8 1826 case $machine in
1827 sh*be-*-* | sh*eb-*-*) ;;
1828 *)
1829 tm_file="sh/little.h ${tm_file}"
1830 tmake_file="${tmake_file} sh/t-le"
1831 ;;
1832 esac
1833 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
493914a8 1834 case $machine in
1835 sh64*)
1836 tmake_file="${tmake_file} sh/t-sh64"
1837 tm_file="${tm_file} sh/sh64.h"
1838 extra_headers="shmedia.h ushmedia.h sshmedia.h"
493914a8 1839 ;;
1840 sh4_single*) target_cpu_default="SELECT_SH4_SINGLE" ;;
1841 sh4*) target_cpu_default="SELECT_SH4" ;;
1842 sh3e[lb]e*) target_cpu_default="SELECT_SH3E" ;;
1843 sh3e[lb]*) target_cpu_default="SELECT_SH3" ;;
1844 sh3e*) target_cpu_default="SELECT_SH3E" ;;
1845 sh3*) target_cpu_default="SELECT_SH3" ;;
87ed74ef 1846 sh2e[lb]e*) target_cpu_default="SELECT_SH2E" ;;
1847 sh2e[lb]*) target_cpu_default="SELECT_SH2" ;;
1848 sh2e*) target_cpu_default="SELECT_SH2E" ;;
493914a8 1849 sh2*) target_cpu_default="SELECT_SH2" ;;
1850 esac
1851 case $machine in
1852 sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;;
1853 esac
bb607926 1854 ;;
dca09811 1855sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
1856 sh64-*-netbsd* | sh64l*-*-netbsd*)
4ee34c70 1857 tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h netbsd.h netbsd-elf.h sh/netbsd-elf.h"
1858 tmake_file="${tmake_file} sh/t-sh sh/t-elf"
1859 case $machine in
1860 sh*l*-*)
1861 tm_file="sh/little.h ${tm_file}"
1862 tmake_file="${tmake_file} sh/t-le"
1863 ;;
1864 *)
1865 tmake_file="${tmake_file} sh/t-be"
1866 ;;
1867 esac
dca09811 1868 case $machine in
1869 sh5*-*)
1870 # SHmedia, 32-bit ABI
87ed74ef 1871 target_cpu_default="SH5_BIT|SH4_BIT|SH3_BIT|SH_E_BIT"
61ddddf5 1872 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5"
dca09811 1873 ;;
1874 sh64*-*)
1875 # SHmedia, 64-bit ABI
1876 target_cpu_default="SH5_BIT|SH4_BIT"
61ddddf5 1877 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5 sh/t-netbsd-sh5-64"
dca09811 1878 ;;
1879 *)
1880 # SH3, software floating point
1881 target_cpu_default="SH1_BIT|SH2_BIT|SH3_BIT"
1882 tmake_file="${tmake_file} sh/t-netbsd"
1883 ;;
1884 esac
4ee34c70 1885 ;;
bb607926 1886sh-*-*)
1566e12e 1887 tm_file="${tm_file} dbxcoff.h sh/coff.h"
bb607926 1888 ;;
1889sparc-tti-*)
da88aad2 1890 tm_file="${tm_file} sparc/pbd.h"
bb607926 1891 ;;
f470dade 1892sparc-*-netbsdelf*)
1897a3df 1893 tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
f470dade 1894 ;;
bb607926 1895sparc-*-openbsd*)
fbf80593 1896 tm_file="sparc/sparc.h ${tm_file}"
c7be79ca 1897 # needed to unconfuse gdb
1898 tmake_file="t-libc-ok t-openbsd sparc/t-openbsd"
bb607926 1899 # we need collect2 until our bug is fixed...
1900 use_collect2=yes
1901 ;;
61f2f0de 1902sparc64-*-openbsd*)
1903 tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
61f2f0de 1904 gas=yes gnu_ld=yes
1905 with_cpu=ultrasparc
61f2f0de 1906 ;;
bb607926 1907sparc-*-elf*)
0307caef 1908 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h"
f24facde 1909 tmake_file="sparc/t-elf sparc/t-crtfm"
bb607926 1910 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
bb607926 1911 ;;
7800959d 1912sparc-*-linux*) # SPARC's running GNU/Linux, libc6
7a6d1a72 1913 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
f24facde 1914 tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm"
bb607926 1915 ;;
41e38a87 1916sparc-*-rtems*)
0307caef 1917 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
8c9facdb 1918 tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
bb607926 1919 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
742d48c2 1920 if test x$enable_threads = xyes; then
1921 thread_file='rtems'
1922 fi
bb607926 1923 ;;
8ed09732 1924sparc64-*-solaris2* | sparcv9-*-solaris2*)
0307caef 1925 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h"
d5a614bc 1926 if test x$gnu_ld = xyes; then
1927 tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
bb607926 1928 fi
b25d9808 1929 if test x$gas = xyes; then
1930 tm_file="${tm_file} sparc/sol2-gas-bi.h"
1931 fi
f24facde 1932 tmake_file="sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
bb607926 1933 if test x$gnu_ld = xyes; then
32e8a7fc 1934 tmake_file="$tmake_file t-slibgcc-elf-ver"
bb607926 1935 else
32e8a7fc 1936 tmake_file="$tmake_file t-slibgcc-sld"
bb607926 1937 fi
bb607926 1938 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
bb607926 1939 if test x${enable_threads} = x ; then
1940 enable_threads=$have_pthread_h
1941 if test x${enable_threads} = x ; then
1942 enable_threads=$have_thread_h
1943 fi
1944 fi
1945 if test x${enable_threads} = xyes ; then
1946 if test x${have_pthread_h} = xyes ; then
1947 thread_file='posix'
1948 else
1949 thread_file='solaris'
1950 fi
1951 fi
805e22b2 1952 need_64bit_hwint=yes
bb607926 1953 ;;
8ed09732 1954sparc-*-solaris2*)
0307caef 1955 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h"
d5a614bc 1956 if test x$gnu_ld = xyes; then
1957 tm_file="${tm_file} sparc/sol2-gld.h"
bb607926 1958 fi
f24facde 1959 tmake_file="sparc/t-sol2 sparc/t-crtfm"
bb607926 1960 if test x$gnu_ld = xyes; then
32e8a7fc 1961 tmake_file="$tmake_file t-slibgcc-elf-ver"
bb607926 1962 else
32e8a7fc 1963 tmake_file="$tmake_file t-slibgcc-sld"
bb607926 1964 fi
046d147a 1965 case $machine in
8ed09732 1966 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
1967 if test x$gnu_ld = xno; then
1968 tm_file="${tm_file} sparc/sol26-sld.h"
1969 fi
1970 ;;
1971 *-*-solaris2.[789])
d5a614bc 1972 tm_file="sparc/biarch64.h ${tm_file} sparc/sol2-bi.h"
1973 if test x$gnu_ld = xyes; then
1974 tm_file="${tm_file} sparc/sol2-gld-bi.h"
046d147a 1975 fi
b25d9808 1976 if test x$gas = xyes; then
1977 tm_file="${tm_file} sparc/sol2-gas-bi.h"
1978 fi
046d147a 1979 tmake_file="$tmake_file sparc/t-sol2-64"
805e22b2 1980 need_64bit_hwint=yes
046d147a 1981 ;;
1982 esac
d5a614bc 1983 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
bb607926 1984 if test x${enable_threads} = x; then
1985 enable_threads=$have_pthread_h
1986 if test x${enable_threads} = x; then
1987 enable_threads=$have_thread_h
1988 fi
1989 fi
1990 if test x${enable_threads} = xyes; then
1991 if test x${have_pthread_h} = xyes; then
1992 thread_file='posix'
1993 else
1994 thread_file='solaris'
1995 fi
1996 fi
1997 ;;
bb607926 1998sparc-*-sysv4*)
06585cbc 1999 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sysv4-only.h"
bb607926 2000 tmake_file=t-svr4
bb607926 2001 extra_parts="crtbegin.o crtend.o"
2002 ;;
bb607926 2003sparclite-*-coff*)
da88aad2 2004 tm_file="${tm_file} gofast.h sparc/lite.h svr3.h sparc/litecoff.h dbxcoff.h libgloss.h"
bb607926 2005 tmake_file=sparc/t-sparclite
2006 ;;
bb607926 2007sparclite-*-elf*)
0307caef 2008 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h"
8c9facdb 2009 tmake_file="sparc/t-sparclite sparc/t-crtfm"
bb607926 2010 extra_parts="crtbegin.o crtend.o"
2011 ;;
582b17a6 2012sparc86x-*-elf*)
0307caef 2013 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h"
8c9facdb 2014 tmake_file="sparc/t-sp86x sparc/t-crtfm"
bb607926 2015 extra_parts="crtbegin.o crtend.o"
2016 ;;
2017sparc64-*-aout*)
9039f5c3 2018 tm_file="sparc/sparc.h sparc/aout.h sparc/sp64-aout.h"
bb607926 2019 ;;
2020sparc64-*-elf*)
0307caef 2021 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h"
8c9facdb 2022 tmake_file="${tmake_file} sparc/t-crtfm"
bb607926 2023 extra_parts="crtbegin.o crtend.o"
2024 ;;
cf481f89 2025sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2026 tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
8c9facdb 2027 tmake_file="${tmake_file} sparc/t-crtfm"
cf481f89 2028 xmake_file=none
2029 case "x$with_cpu" in
68345096 2030 xultrasparc) ;;
cf481f89 2031 x) with_cpu=ultrasparc ;;
2032 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2033 esac
805e22b2 2034 need_64bit_hwint=yes
cf481f89 2035 ;;
7800959d 2036sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
0b8c20bf 2037 tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux64 sparc/t-crtfm"
74b68692 2038 tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
bb607926 2039 ;;
1897a3df 2040sparc64-*-netbsd*)
2041 tmake_file="${tmake_file} sparc/t-netbsd64"
2042 tm_file="sparc/biarch64.h ${tm_file}"
2043 tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
1897a3df 2044 ;;
331beb1a 2045strongarm-*-elf*)
7a6d1a72 2046 tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
331beb1a 2047 tmake_file=arm/t-strongarm-elf
2048 out_file=arm/arm.c
331beb1a 2049 md_file=arm/arm.md
b5ccaa7b 2050 extra_modes=arm/arm-modes.def
331beb1a 2051 ;;
331beb1a 2052strongarm-*-pe)
83e163bd 2053 tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h arm/pe.h arm/strongarm-pe.h"
331beb1a 2054 tmake_file=arm/t-strongarm-pe
2055 out_file=arm/arm.c
331beb1a 2056 md_file=arm/arm.md
b5ccaa7b 2057 extra_modes=arm/arm-modes.def
331beb1a 2058 extra_objs=pe.o
2059 ;;
578f5dbf 2060strongarm-*-kaos*)
2061 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"
2062 tmake_file=arm/t-strongarm-elf
2063 out_file=arm/arm.c
2064 md_file=arm/arm.md
2065 extra_modes=arm/arm-modes.def
2066 ;;
5dd3389c 2067v850e-*-*)
2068 target_cpu_default="TARGET_CPU_v850e"
2069 tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
2070 tm_p_file=v850/v850-protos.h
2071 tmake_file=v850/t-v850
2072 md_file=v850/v850.md
2073 out_file=v850/v850.c
2074 if test x$stabs = xyes
2075 then
2076 tm_file="${tm_file} dbx.h"
2077 fi
2078 use_collect2=no
2079 c_target_objs="v850-c.o"
2080 cxx_target_objs="v850-c.o"
2081 ;;
bb607926 2082v850-*-*)
2083 target_cpu_default="TARGET_CPU_generic"
7a6d1a72 2084 tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
bb607926 2085 tmake_file=v850/t-v850
2086 if test x$stabs = xyes
2087 then
2088 tm_file="${tm_file} dbx.h"
2089 fi
2090 use_collect2=no
e101acea 2091 c_target_objs="v850-c.o"
2092 cxx_target_objs="v850-c.o"
bb607926 2093 ;;
6c842310 2094vax-*-bsd*) # VAXen running BSD
b31ef245 2095 tm_file="${tm_file} vax/bsd.h"
bb607926 2096 use_collect2=yes
bb607926 2097 ;;
6c842310 2098vax-*-sysv*) # VAXen running system V
bb607926 2099 tm_file="${tm_file} vax/vaxv.h"
bb607926 2100 ;;
f470dade 2101vax-*-netbsdelf*)
83accbc0 2102 tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
f470dade 2103 ;;
bb607926 2104vax-*-netbsd*)
4ace673e 2105 tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
bb607926 2106 tmake_file=t-netbsd
9a33b00e 2107 extra_parts=""
87a1ff8e 2108 use_collect2=yes
bb607926 2109 ;;
2110vax-*-openbsd*)
bb607926 2111 tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
bb607926 2112 use_collect2=yes
2113 ;;
6c842310 2114vax-*-ultrix*) # VAXen running ultrix
bb607926 2115 tm_file="${tm_file} vax/ultrix.h"
bb607926 2116 ;;
6c842310 2117vax-*-vms*) # VAXen running VMS
805e22b2 2118 echo "Configuration $machine no longer supported" 1>&2
2119 exit 1
bb607926 2120 ;;
6c842310 2121vax-*-*) # VAX default entry
bb607926 2122 ;;
331beb1a 2123xscale-*-elf)
7a6d1a72 2124 tm_file="arm/xscale-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
331beb1a 2125 tmake_file=arm/t-xscale-elf
2126 out_file=arm/arm.c
331beb1a 2127 md_file=arm/arm.md
b5ccaa7b 2128 extra_modes=arm/arm-modes.def
331beb1a 2129 ;;
2130xscale-*-coff)
0de49d7e 2131 tm_file="arm/semi.h arm/aout.h arm/coff.h arm/xscale-coff.h arm/arm.h"
331beb1a 2132 tmake_file=arm/t-xscale-coff
2133 out_file=arm/arm.c
331beb1a 2134 md_file=arm/arm.md
b5ccaa7b 2135 extra_modes=arm/arm-modes.def
331beb1a 2136 ;;
9b954fed 2137xstormy16-*-elf)
2138 # For historical reasons, the target files omit the 'x'.
7a6d1a72 2139 tm_file="dbxelf.h elfos.h svr4.h stormy16/stormy16.h"
9b954fed 2140 tm_p_file=stormy16/stormy16-protos.h
2141 md_file=stormy16/stormy16.md
2142 out_file=stormy16/stormy16.c
2143 tmake_file="stormy16/t-stormy16"
2144 extra_parts="crtbegin.o crtend.o"
2145 ;;
f6b7ba2b 2146xtensa-*-elf*)
2147 tm_file="${tm_file} dbxelf.h elfos.h svr4.h xtensa/elf.h"
54a0bb9d 2148 tmake_file="xtensa/t-xtensa xtensa/t-elf"
f6b7ba2b 2149 ;;
2150xtensa-*-linux*)
2151 tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h"
19cda8f6 2152 tmake_file="t-slibgcc-elf-ver t-linux xtensa/t-xtensa xtensa/t-linux"
f6b7ba2b 2153 ;;
bb607926 2154*)
41e38a87 2155 echo "*** Configuration $machine not supported" 1>&2
bb607926 2156 exit 1
2157 ;;
2158esac
2159
2160case $machine in
bb607926 2161*-*-sysv*)
2162 install_headers_dir=install-headers-cpio
2163 ;;
2164esac
2165
3864b642 2166# Support for --with-cpu and related options (and a few unrelated options,
f0b281fe 2167# too). Only do this if $machine is the target, or we'll try to validate
2168# the CPU argument against the wrong machine type.
3864b642 2169
f0b281fe 2170if test "x$pass2done" = xyes
3864b642 2171then
f0b281fe 2172 case "x$with_cpu" in
2173 xyes | xno)
2174 echo "--with-cpu must be passed a value" 1>&2
2175 exit 1
3864b642 2176 ;;
f0b281fe 2177 esac
2178
2179 # If there is no $with_cpu option, try to infer one from ${machine}.
2180 # This block sets nothing except for with_cpu.
2181 if test x$with_cpu = x
2182 then
2183 case $machine in
2184 ep9312-*-*)
2185 # A Cirrus ARM variant.
2186 with_cpu="ep9312"
0e3f52ef 2187 ;;
f0b281fe 2188 i486-*-*)
2189 with_cpu=i486
0e3f52ef 2190 ;;
f0b281fe 2191 i586-*-*)
2192 case $target_alias in
2193 k6_2-*)
2194 with_cpu=k6-2
2195 ;;
2196 k6_3-*)
2197 with_cpu=k6-3
2198 ;;
2199 k6-*)
2200 with_cpu=k6
2201 ;;
2202 pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2203 with_cpu=pentium-mmx
2204 ;;
2205 *)
2206 with_cpu=pentium
2207 ;;
2208 esac
bb607926 2209 ;;
f0b281fe 2210 i686-*-* | i786-*-*)
2211 case $target_alias in
2212 k8-*)
2213 with_cpu=k8
2214 ;;
2215 athlon_xp-*|athlon_mp-*|athlon_4-*)
2216 with_cpu=athlon-4
2217 ;;
2218 athlon_tbird-*|athlon-*)
2219 with_cpu=athlon
2220 ;;
2221 pentium2-*)
2222 with_cpu=pentium2
2223 ;;
2224 pentium3-*)
2225 with_cpu=pentium3
2226 ;;
2227 pentium4-*)
2228 with_cpu=pentium4
2229 ;;
2230 *)
2231 with_cpu=pentiumpro
2232 ;;
2233 esac
bb607926 2234 ;;
f0b281fe 2235 x86_64-*-*)
3864b642 2236 with_cpu=k8
805e22b2 2237 ;;
f0b281fe 2238 alpha*-*-*)
2239 case $machine in
2240 alphaev6[78]*)
2241 with_cpu=ev67
2242 ;;
2243 alphaev6*)
2244 with_cpu=ev6
2245 ;;
2246 alphapca56*)
2247 with_cpu=pca56
2248 ;;
2249 alphaev56*)
2250 with_cpu=ev56
2251 ;;
2252 alphaev5*)
2253 with_cpu=ev5
2254 ;;
2255 esac
0e3f52ef 2256 ;;
f0b281fe 2257 sparc*-*-*)
2258 with_cpu="`echo $machine | sed 's/-.*$//'`"
f6940372 2259 if [ x$with_cpu = xsparc64 ]; then
2260 with_cpu=v9
2261 fi
0e3f52ef 2262 ;;
f0b281fe 2263 esac
2264 fi
2265
2266 # Similarly for --with-schedule.
2267 if test x$with_schedule = x; then
2268 case $machine in
2269 hppa1* | parisc1*)
2270 # Override default PA8000 scheduling model.
2271 with_schedule=7100LC
0e3f52ef 2272 ;;
f0b281fe 2273 esac
2274 fi
2275
7dd97ab6 2276 # Validate and mark as valid any --with options supported
2277 # by this target. In order to use a particular --with option
2278 # you must list it in supported_defaults; validating the value
2279 # is optional. This case statement should set nothing besides
2280 # supported_defaults.
2281
2282 supported_defaults=
2283 case "$machine" in
f0b281fe 2284 alpha*-*-*)
7dd97ab6 2285 supported_defaults="cpu tune"
2286 for which in cpu tune; do
2287 eval "val=\$with_$which"
2288 case "x$val" in
2289 x \
2290 | xev4 | xev45 | x21064 | xev5 | x21164 | xev56 | x21164a \
2291 | xpca56 | x21164PC | x21164pc | xev6 | x21264 | xev67 \
2292 | x21264a)
2293 ;;
2294 *)
2295 echo "Unknown CPU used in --with-$which=$val" 1>&2
2296 exit 1
2297 ;;
2298 esac
2299 done
2300 ;;
2301
2302 arm*-*-*)
2303 supported_defaults="arch cpu float tune"
2304 for which in cpu tune; do
2305 eval "val=\$with_$which"
2306 case "x$val" in
2307 x \
2308 | xarm[236789] | xarm250 | xarm[67][01]0 \
2309 | xarm60 | xarm620 | xarm7d | xarm7di \
2310 | xarm7m | xarm7dm | xarm7dmi | xarm[79]tdmi \
2311 | xarm70 | xarm700i | xarm710t | xarm720 \
2312 | xarm720t | xarm740t | xarm710c | xarm920 \
2313 | xarm920t | xarm940t | xarm9e | xarm10tdmi \
2314 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2315 | xarm1020t \
755eb2b4 2316 | xxscale | xiwmmxt \
7dd97ab6 2317 | xep9312 \
2318 | xstrongarm | xstrongarm110 | xstrongarm11[01]0)
2319 # OK
2320 ;;
2321 *)
2322 echo "Unknown CPU used in --with-$which=$val" 1>&2
2323 exit 1
2324 ;;
2325 esac
2326 done
2327
2328 case "x$with_arch" in
f0b281fe 2329 x \
7dd97ab6 2330 | xarmv[2345] | xarmv2a | xarmv3m | xarmv4t | xarmv5t \
2331 | xarmv5te | ep9312)
f0b281fe 2332 # OK
bb678e49 2333 ;;
2334 *)
7dd97ab6 2335 echo "Unknown arch used in --with-arch=$with_arch" 1>&2
f0b281fe 2336 exit 1
3864b642 2337 ;;
2338 esac
f0b281fe 2339
7dd97ab6 2340 case "x$with_float" in
f0b281fe 2341 x \
7dd97ab6 2342 | xsoft | xhard)
f0b281fe 2343 # OK
3864b642 2344 ;;
f0b281fe 2345 *)
7dd97ab6 2346 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 2347 exit 1
3864b642 2348 ;;
2349 esac
7dd97ab6 2350
2351 if test "x$with_arch" != x && test "x$with_cpu" != x; then
2352 echo "Warning: --with-arch overrides --with-cpu" 1>&2
2353 fi
3864b642 2354 ;;
3864b642 2355
f0b281fe 2356 hppa*-*-* | parisc*-*-*)
7dd97ab6 2357 supported_defaults="arch schedule"
2358
2359 case "x$with_arch" in
2360 x | x1.0 | x1.1 | x2.0)
2361 # OK
2362 ;;
2363 *)
2364 echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
2365 exit 1
2366 ;;
2367 esac
2368
f0b281fe 2369 case "x$with_schedule" in
2370 x | x700 | x7100 | x7100LC | x7200 | x7300 | x8000)
2371 # OK
2372 ;;
2373 *)
2374 echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
2375 exit 1
2376 ;;
2377 esac
3864b642 2378 ;;
3864b642 2379
f0b281fe 2380 i[34567]86-*-* | x86_64-*-*)
7dd97ab6 2381 supported_defaults="arch cpu tune"
2382 for which in arch cpu tune; do
2383 eval "val=\$with_$which"
2384 case "x$val" in
2385 x \
2386 | xi386 | xi486 \
2387 | xi586 | xpentium | xpentium-mmx | xwinchip-c6 | xwinchip2 \
2388 | xc3 | xc3-2 | xi686 | xpentiumpro | xpentium2 | xpentium3 \
2389 | xpentium4 | xk6 | xk6-2 | xk6-3 | xathlon | xathlon-tbird \
2390 | xathlon-4 | xathlon-xp | xathlon-mp | xk8)
2391 # OK
2392 ;;
2393 *)
2394 echo "Unknown CPU given in --with-$which=$val." 1>&2
2395 exit 1
2396 ;;
2397 esac
2398 done
2399 ;;
2400
2401 mips*-*-*)
2402 supported_defaults="abi arch float tune"
2403
2404 case "x$with_float" in
f0b281fe 2405 x \
7dd97ab6 2406 | xsoft | xhard)
f0b281fe 2407 # OK
2408 ;;
2409 *)
7dd97ab6 2410 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 2411 exit 1
2412 ;;
2413 esac
3864b642 2414
7dd97ab6 2415 case "x$with_abi" in
f0b281fe 2416 x \
7dd97ab6 2417 | x32 | xo64 | xn32 | x64 | xeabi)
f0b281fe 2418 # OK
2419 ;;
2420 *)
7dd97ab6 2421 echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
f0b281fe 2422 exit 1
2423 ;;
2424 esac
3864b642 2425 ;;
3864b642 2426
7dd97ab6 2427 powerpc*-*-* | rs6000-*-*)
2428 supported_defaults="cpu float tune"
2429
2430 for which in cpu tune; do
2431 eval "val=\$with_$which"
2432 case "x$val" in
2433 x \
2434 | xdefault32 | xdefault64 \
2435 | xcommon \
2436 | xpower | xpower2 | xpower3 | xpower4 \
2437 | xpowerpc | xpowerpc64 \
2438 | xrios | xrios1 | xrios2 | xrsc | xrsc1 | xrs64a \
2439 | x401 | x403 | x405 | x405fp | x440 | x440fp | x505 \
2440 | x601 | x602 | x603 | x603e | xec603e | x604 \
2441 | x604e | x620 | x630 | x740 | x750 | x7400 | x7450 \
c1ca366c 2442 | x8540 | x801 | x821 | x823 | x860 | x970)
7dd97ab6 2443 # OK
2444 ;;
2445 *)
2446 echo "Unknown cpu used in --with-$which=$val." 1>&2
2447 exit 1
2448 ;;
2449 esac
2450 done
2451 ;;
2452
b8c0043c 2453 s390*-*-*)
2454 supported_defaults="arch mode tune"
2455
2456 for which in arch tune; do
2457 eval "val=\$with_$which"
2458 case x$val in
2459 x \
2460 | xg5 | xg6 | xz900 | xz990)
2461 # OK
2462 ;;
2463 *)
2464 echo "Unknown cpu used in --with-$which=$val." 1>&2
2465 exit 1
2466 ;;
2467 esac
2468 done
2469
2470 case "x$with_mode" in
2471 x \
2472 | xesa | xzarch)
2473 # OK
2474 ;;
2475 *)
2476 echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
2477 exit 1
2478 ;;
2479 esac
2480 ;;
2481
f0b281fe 2482 sparc*-*-*)
7dd97ab6 2483 supported_defaults="cpu float tune"
2484
2485 for which in cpu tune; do
2486 eval "val=\$with_$which"
2487 case x$val in
2488 x \
17d7f512 2489 | xsparc | xsparcv9 | xsparc64 | xsparc86x \
7dd97ab6 2490 | xv7 | xcypress | xv8 | xsupersparc | xsparclite | xf930 \
2491 | xf934 | xhypersparc | xsparclite86x | xsparclet | tsc701 \
2492 | xv9 | xultrasparc | xultrasparc3)
2493 # OK
2494 ;;
2495 *)
2496 echo "Unknown cpu used in --with-$which=$val" 1>&2
2497 exit 1
2498 ;;
2499 esac
2500 done
3864b642 2501
7dd97ab6 2502 case "x$with_float" in
2503 x \
2504 | xsoft | xhard)
f0b281fe 2505 # OK
2506 ;;
2507 *)
7dd97ab6 2508 echo "Unknown floating point type used in --with-float=$with_float" 1>&2
f0b281fe 2509 exit 1
2510 ;;
2511 esac
3864b642 2512 ;;
3864b642 2513
f0b281fe 2514 v850*-*-*)
7dd97ab6 2515 supported_defaults=cpu
f0b281fe 2516 case "x$with_cpu" in
2517 x | xv850e)
2518 # OK
2519 ;;
2520 *)
2521 echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
2522 exit 1
2523 ;;
2524 esac
3864b642 2525 ;;
2526 esac
3864b642 2527
7dd97ab6 2528 # Set some miscellaneous flags for particular targets.
f0b281fe 2529 target_cpu_default2=
2530 case $machine in
2531 alpha*-*-*)
f0b281fe 2532 if test x$gas = xyes
2533 then
7dd97ab6 2534 target_cpu_default2="MASK_GAS"
f0b281fe 2535 fi
3864b642 2536 ;;
3864b642 2537
f0b281fe 2538 arm*-*-*)
2539 case "x$with_cpu" in
2540 x)
2541 # The most generic
2542 target_cpu_default2="TARGET_CPU_generic"
bb607926 2543 ;;
f0b281fe 2544
2545 *)
2546 target_cpu_default2="TARGET_CPU_$with_cpu"
bb607926 2547 ;;
f0b281fe 2548 esac
2549 ;;
582b17a6 2550
f0b281fe 2551 hppa*-*-* | parisc*-*-*)
2552 if test x$gas = xyes
bb607926 2553 then
f0b281fe 2554 target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
2555 fi
3864b642 2556 ;;
3864b642 2557
f0b281fe 2558 mips*-*-*)
2559 case $machine in
2560 mips*-*-ecoff* | mips*-*-elf*)
2561 if test x$gas = xyes
2562 then
2563 if test x$gnu_ld = xyes
2564 then
2565 target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
2566 else
2567 target_cpu_default2="MASK_GAS"
2568 fi
2569 fi
2570 ;;
2571 mips*-*-*)
2572 if test x$gas = xyes
f4deb416 2573 then
f4deb416 2574 target_cpu_default2="MASK_GAS"
2575 fi
f0b281fe 2576 ;;
2577 esac
2578 case $machine in
2579 mips*el-*-*)
2580 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
2581 ;;
2582 esac
2583 case $tm_file in
2584 *mips/elf.h* | *mips/elf64.h*)
2585 tm_defines="OBJECT_FORMAT_ELF $tm_defines"
2586 ;;
2587 esac
2588 if test "x$enable_gofast" = xyes
2589 then
2590 tm_defines="INIT_SUBTARGET_OPTABS=INIT_GOFAST_OPTABS $tm_defines"
2591 tm_file="gofast.h $tm_file"
2592 tmake_file="mips/t-gofast $tmake_file"
2593 else
2594 tmake_file="mips/t-mips $tmake_file"
f4deb416 2595 fi
2596 ;;
f0b281fe 2597
2598 powerpc*-*-* | rs6000-*-*)
7dd97ab6 2599 if test x$enable_altivec = xyes
2600 then
2601 tm_file="$tm_file rs6000/altivec-defs.h"
2602 fi
2603 # FIXME: The PowerPC port uses the value set at compile time,
2604 # although it's only cosmetic.
f0b281fe 2605 if test "x$with_cpu" != x
bb607926 2606 then
f0b281fe 2607 target_cpu_default2="\\\"$with_cpu\\\""
bb607926 2608 fi
f0b281fe 2609 out_file=rs6000/rs6000.c
2610 c_target_objs="${c_target_objs} rs6000-c.o"
2611 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
2612 tmake_file="rs6000/t-rs6000 ${tmake_file}"
f4deb416 2613 ;;
3864b642 2614
f0b281fe 2615 sparc*-*-*)
7dd97ab6 2616 # Some standard aliases.
2617 case x$with_cpu in
2618 xsparc)
2619 with_cpu=v7
2620 ;;
2621 xsparc86x)
2622 with_cpu=sparclite86x
2623 ;;
2624 xsparcv9 | xsparc64)
2625 with_cpu=v9
2626 ;;
2627 esac
2628
2629 # The Sparc port checks this value at compile-time.
3864b642 2630 target_cpu_default2="TARGET_CPU_$with_cpu"
2631 ;;
f0b281fe 2632 v850*-*-*)
7dd97ab6 2633 # FIXME: The v850 is "special" in that it does not support
2634 # runtime CPU selection, only --with-cpu.
f0b281fe 2635 case "x$with_cpu" in
2636 x)
2637 ;;
2638 xv850e)
2639 target_cpu_default2="TARGET_CPU_$with_cpu"
2640 ;;
2641 esac
2642 ;;
bb607926 2643 esac
bb607926 2644
7dd97ab6 2645 t=
b8c0043c 2646 all_defaults="abi cpu arch tune schedule float mode"
7dd97ab6 2647 for option in $all_defaults
2648 do
2649 eval "val=\$with_$option"
2650 if test -n "$val"; then
2651 case " $supported_defaults " in
2652 *" $option "*)
2653 ;;
2654 *)
2655 echo "This target does not support --with-$option." 2>&1
2656 exit 1
2657 ;;
2658 esac
2659
2660 if test "x$t" = x
2661 then
2662 t="{ \"$option\", \"$val\" }"
2663 else
2664 t="${t}, { \"$option\", \"$val\" }"
2665 fi
2666 fi
2667 done
2668 if test "x$t" = x
2669 then
2670 configure_default_options="{ { NULL, NULL} }"
2671 else
2672 configure_default_options="{ ${t} }"
2673 fi
2674
f0b281fe 2675 if test "$target_cpu_default2" != ""
bb607926 2676 then
f0b281fe 2677 if test "$target_cpu_default" != ""
2678 then
2679 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2680 else
2681 target_cpu_default=$target_cpu_default2
2682 fi
bb607926 2683 fi
2684fi
2685
bb607926 2686# Save data on machine being used to compile GCC in build_xm_file.
2687# Save data on host machine in vars host_xm_file and host_xmake_file.
2688if test x$pass1done = x
2689then
e1688c3e 2690 if test x$xm_file != x
2691 then build_xm_file=$xm_file
bb607926 2692 fi
2693 build_xm_defines=$xm_defines
2694 build_install_headers_dir=$install_headers_dir
2695 build_exeext=$exeext
2696 pass1done=yes
2697else
2698 if test x$pass2done = x
2699 then
e1688c3e 2700 if test x$xm_file != x
2701 then host_xm_file=$xm_file
bb607926 2702 fi
2703 host_xm_defines=$xm_defines
bb607926 2704 host_xmake_file="$xmake_file"
bb607926 2705 host_extra_gcc_objs=$extra_gcc_objs
2706 host_extra_objs=$extra_host_objs
2707 host_exeext=$exeext
b197fbcf 2708 out_host_hook_obj=$host_hook_obj
bb607926 2709 pass2done=yes
2710 fi
2711fi