1132718Skan# GCC target-specific configuration file.
2169689Skan# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
3132718Skan# Free Software Foundation, Inc.
490075Sobrien
590075Sobrien#This file is part of GCC.
690075Sobrien
790075Sobrien#GCC is free software; you can redistribute it and/or modify it under
890075Sobrien#the terms of the GNU General Public License as published by the Free
990075Sobrien#Software Foundation; either version 2, or (at your option) any later
1090075Sobrien#version.
1190075Sobrien
1290075Sobrien#GCC is distributed in the hope that it will be useful, but WITHOUT
1390075Sobrien#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1490075Sobrien#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1590075Sobrien#for more details.
1690075Sobrien
1790075Sobrien#You should have received a copy of the GNU General Public License
1890075Sobrien#along with GCC; see the file COPYING.  If not, write to the Free
19169689Skan#Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20169689Skan#02110-1301, USA.
2190075Sobrien
22132718Skan# This is the GCC target-specific configuration file
23132718Skan# where a configuration type is mapped to different system-specific
24132718Skan# definitions and files.  This is invoked by the autoconf-generated
25132718Skan# configure script.  Putting it in a separate shell file lets us skip
26132718Skan# running autoconf when modifying target-specific information.
2790075Sobrien
28132718Skan# This file switches on the shell variable ${target}, and also uses the
2990075Sobrien# following shell variables:
3090075Sobrien#
3190075Sobrien#  with_*		Various variables as set by configure.
3290075Sobrien#
33169689Skan#  enable_threads	Either the name, yes or no depending on whether
3490075Sobrien#			threads support was requested.
3590075Sobrien#
36132718Skan#  default_use_cxa_atexit
37169689Skan#			  The default value for the $enable___cxa_atexit
38169689Skan#			variable.  enable___cxa_atexit needs to be set to
39169689Skan#			"yes" for the correct operation of C++ destructors
40169689Skan#			but it relies upon the presence of a non-standard C
41169689Skan#			library	function called	__cxa_atexit.
42169689Skan#			  Since not all C libraries provide __cxa_atexit the
43169689Skan#			default value of $default_use_cxa_atexit is set to
44169689Skan#			"no" except for targets which are known to be OK.
45132718Skan#
4690075Sobrien#  gas_flag		Either yes or no depending on whether GNU as was
4790075Sobrien#			requested.
4890075Sobrien#
4990075Sobrien#  gnu_ld_flag		Either yes or no depending on whether GNU ld was
5090075Sobrien#			requested.
5190075Sobrien
5290075Sobrien# This file sets the following shell variables for use by the
5390075Sobrien# autoconf-generated configure script:
5490075Sobrien#
55132718Skan#  cpu_type		The name of the cpu, if different from the first
56132718Skan#			chunk of the canonical target name.
5790075Sobrien#
58117395Skan#  tm_defines		List of target macros to define for all compilations.
59117395Skan#
6090075Sobrien#  tm_file		A list of target macro files, if different from
6190075Sobrien#			"$cpu_type/$cpu_type.h". Usually it's constructed
6290075Sobrien#			per target in a way like this:
6390075Sobrien#			tm_file="${tm_file} dbxelf.h elfos.h svr4.h ${cpu_type.h}/elf.h"
6490075Sobrien#			Note that the preferred order is:
6590075Sobrien#			- specific target header "${cpu_type}/${cpu_type.h}"
66169689Skan#			- generic headers like dbxelf.h elfos.h, etc.
6790075Sobrien#			- specializing target headers like ${cpu_type.h}/elf.h
6890075Sobrien#			This helps to keep OS specific stuff out of the CPU
6990075Sobrien#			defining header ${cpu_type}/${cpu_type.h}.
7090075Sobrien#
7190075Sobrien#  tm_p_file		Location of file with declarations for functions
7290075Sobrien#			in $out_file.
7390075Sobrien#
7490075Sobrien#  out_file		The name of the machine description C support
7590075Sobrien#			file, if different from "$cpu_type/$cpu_type.c".
7690075Sobrien#
7790075Sobrien#  md_file		The name of the machine-description file, if
7890075Sobrien#			different from "$cpu_type/$cpu_type.md".
7990075Sobrien#
8090075Sobrien#  tmake_file		A list of machine-description-specific
8190075Sobrien#			makefile-fragments, if different from
8290075Sobrien#			"$cpu_type/t-$cpu_type".
8390075Sobrien#
84117395Skan#  extra_modes          The name of the file containing a list of extra
85117395Skan#                       machine modes, if necessary and different from
86117395Skan#                       "$cpu_type/$cpu_type-modes.def".
8790075Sobrien#
8890075Sobrien#  extra_objs		List of extra objects that should be linked into
8990075Sobrien#			the compiler proper (cc1, cc1obj, cc1plus)
9090075Sobrien#			depending on target.
9190075Sobrien#
92132718Skan#  extra_gcc_objs	List of extra objects that should be linked into
93132718Skan#			the compiler driver (gcc) depending on target.
94132718Skan#
9590075Sobrien#  extra_headers	List of used header files from the directory
9690075Sobrien#			config/${cpu_type}.
9790075Sobrien#
9890075Sobrien#  extra_passes		List of extra executables compiled for this target
9990075Sobrien#			machine, used for compiling from source to object.
10090075Sobrien#
10190075Sobrien#  extra_parts		List of extra object files that should be compiled
10290075Sobrien#			for this target machine.
10390075Sobrien#
10490075Sobrien#  extra_programs	Like extra_passes, but these are used when linking.
10590075Sobrien#
106169689Skan#  extra_options	List of target-dependent .opt files.
107169689Skan#
10890075Sobrien#  c_target_objs	List of extra target-dependent objects that be
10990075Sobrien#			linked into the C compiler only.
11090075Sobrien#
11190075Sobrien#  cxx_target_objs	List of extra target-dependent objects that be
11290075Sobrien#			linked into the C++ compiler only.
11390075Sobrien#
114117395Skan#  target_gtfiles       List of extra source files with type information.
115117395Skan#
11690075Sobrien#  xm_defines		List of macros to define when compiling for the
11790075Sobrien#			target machine.
11890075Sobrien#
11990075Sobrien#  xm_file		List of files to include when compiling for the
12090075Sobrien#			target machine.
12190075Sobrien#
12290075Sobrien#  use_collect2		Set to yes or no, depending on whether collect2
12390075Sobrien#			will be used.
12490075Sobrien#
12590075Sobrien#  target_cpu_default	Set to override the default target model.
12690075Sobrien#
12790075Sobrien#  gdb_needs_out_file_path
12890075Sobrien#			Set to yes if gdb needs a dir command with
12990075Sobrien#			`dirname $out_file`.
13090075Sobrien#
13190075Sobrien#  thread_file		Set to control which thread package to use.
13290075Sobrien#
13390075Sobrien#  gas			Set to yes or no depending on whether the target
13490075Sobrien#			system normally uses GNU as.
135132718Skan#
136132718Skan#  need_64bit_hwint	Set to yes if HOST_WIDE_INT must be 64 bits wide
137169689Skan#			for this target.  This is true iff this target
138169689Skan#			supports "long" or "wchar_t" wider than 32 bits.
139132718Skan#
140132718Skan#  configure_default_options
141132718Skan#			Set to an initializer for configure_default_options
142132718Skan#			in configargs.h, based on --with-cpu et cetera.
143132718Skan#
144132718Skan#  use_fixproto		Set to "yes" if fixproto should be run normally,
145132718Skan#			"no" if fixproto should never be run.
14690075Sobrien
14790075Sobrien# The following variables are used in each case-construct to build up the
14890075Sobrien# outgoing variables:
14990075Sobrien#
15090075Sobrien#  gnu_ld		Set to yes or no depending on whether the target
15190075Sobrien#			system normally uses GNU ld.
15290075Sobrien
15390075Sobrienout_file=
15490075Sobrientmake_file=
15590075Sobrienextra_headers=
15690075Sobrienextra_passes=
15790075Sobrienextra_parts=
15890075Sobrienextra_programs=
15990075Sobrienextra_objs=
16090075Sobrienextra_gcc_objs=
161169689Skanextra_options=
16290075Sobrienc_target_objs=
16390075Sobriencxx_target_objs=
164117395Skantm_defines=
16590075Sobrienxm_defines=
16690075Sobrien# Set this to force installation and use of collect2.
16790075Sobrienuse_collect2=
16890075Sobrien# Set this to override the default target model.
16990075Sobrientarget_cpu_default=
17090075Sobrien# Set this if gdb needs a dir command with `dirname $out_file`
17190075Sobriengdb_needs_out_file_path=
17290075Sobrien# Set this to control which thread package will be used.
17390075Sobrienthread_file=
17490075Sobrien# Reinitialize these from the flag values every loop pass, since some
17590075Sobrien# configure entries modify them.
17690075Sobriengas="$gas_flag"
17790075Sobriengnu_ld="$gnu_ld_flag"
178132718Skandefault_use_cxa_atexit=no
179117395Skantarget_gtfiles=
180132718Skanneed_64bit_hwint=
18190075Sobrien
182132718Skan# Default to not using fixproto.  Targets which need fixproto should
183132718Skan# specifically set this to 'yes'.
184132718Skanuse_fixproto=no
185132718Skan
186132718Skan# Don't carry these over build->host->target.  Please.
187132718Skanxm_file=
188132718Skanmd_file=
189132718Skan
19096263Sobrien# Obsolete configurations.
191132718Skancase ${target} in
192169689Skan   c4x-*		\
193169689Skan | tic4x-*		\
194169689Skan )
19596263Sobrien    if test "x$enable_obsolete" != xyes; then
196132718Skan      echo "*** Configuration ${target} is obsolete." >&2
19796263Sobrien      echo "*** Specify --enable-obsolete to build it anyway." >&2
19896263Sobrien      echo "*** Support will be REMOVED in the next major release of GCC," >&2
19996263Sobrien      echo "*** unless a maintainer comes forward." >&2
20096263Sobrien      exit 1
20196263Sobrien    fi;;
20296263Sobrienesac
20396263Sobrien
204132718Skan# Unsupported targets list.  Do not put an entry in this list unless
205132718Skan# it would otherwise be caught by a more permissive pattern.  The list
206132718Skan# should be in alphabetical order.
207132718Skancase ${target} in
208132718Skan   alpha*-*-linux*libc1*		\
209132718Skan | i[34567]86-sequent-sysv		\
210132718Skan | i[34567]86-sequent-sysv[123]*	\
211132718Skan | i[34567]86-go32-*			\
212132718Skan | i[34567]86-*-go32*			\
213132718Skan | m68k-*-linux*aout*			\
214132718Skan | m68k-*-linux*libc1*			\
215132718Skan | mips64orion*-*-rtems*		\
216132718Skan | powerpc-*-linux*libc1*		\
217132718Skan | sparc-*-linux*aout*			\
218132718Skan | sparc-*-linux*libc1*			\
219132718Skan | sparc-hal-solaris2*			\
220132718Skan | thumb-*-*				\
221132718Skan | *-*-linux*coff*			\
222132718Skan | *-*-linux*oldld*			\
223132718Skan | *-*-rtemsaout*			\
224132718Skan | *-*-rtemscoff*			\
225132718Skan | vax-*-vms*				\
226132718Skan )
227132718Skan	echo "*** Configuration ${target} not supported" 1>&2
228132718Skan	exit 1
229132718Skan	;;
230132718Skanesac
231132718Skan
23290075Sobrien# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
23390075Sobrien# updated in each machine entry.  Also set default extra_headers for some
23490075Sobrien# machines.
23590075Sobrientm_p_file=
236132718Skancpu_type=`echo ${target} | sed 's/-.*$//'`
237146895Skancpu_is_64bit=
238132718Skancase ${target} in
239169689Skanm32c*-*-*)
240169689Skan        cpu_type=m32c
241169689Skan	tmake_file=m32c/t-m32c
242169689Skan        ;;
24390075Sobrienalpha*-*-*)
24490075Sobrien	cpu_type=alpha
245132718Skan	need_64bit_hwint=yes
24690075Sobrien	;;
247132718Skanam33_2.0-*-linux*)
248132718Skan	cpu_type=mn10300
249132718Skan	;;
25090075Sobrienstrongarm*-*-*)
25190075Sobrien	cpu_type=arm
25290075Sobrien	;;
25390075Sobrienarm*-*-*)
25490075Sobrien	cpu_type=arm
255132718Skan	extra_headers="mmintrin.h"
25690075Sobrien	;;
257169689Skanbfin*-*)
258169689Skan	cpu_type=bfin
259169689Skan	;;
260132718Skanep9312*-*-*)
261132718Skan	cpu_type=arm
262132718Skan	;;
263169689Skanfrv*)	cpu_type=frv
264169689Skan	;;
26590075Sobrienxscale-*-*)
26690075Sobrien	cpu_type=arm
267132718Skan	extra_headers="mmintrin.h"
26890075Sobrien	;;
26990075Sobrieni[34567]86-*-*)
27090075Sobrien	cpu_type=i386
271219639Smm	extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
272251212Spfg		       pmmintrin.h tmmintrin.h ammintrin.h"
27390075Sobrien	;;
27490075Sobrienx86_64-*-*)
27590075Sobrien	cpu_type=i386
276219639Smm	extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
277251212Spfg		       pmmintrin.h tmmintrin.h ammintrin.h"
278132718Skan	need_64bit_hwint=yes
27990075Sobrien	;;
28090075Sobrienia64-*-*)
28190075Sobrien	extra_headers=ia64intrin.h
282132718Skan	need_64bit_hwint=yes
28390075Sobrien	;;
28490075Sobrienhppa*-*-* | parisc*-*-*)
28590075Sobrien	cpu_type=pa
28690075Sobrien	;;
287132718Skanm32r*-*-*)
288132718Skan        cpu_type=m32r
289132718Skan        ;;
29096263Sobrienm680[012]0-*-*)
29190075Sobrien	cpu_type=m68k
29290075Sobrien	extra_headers=math-68881.h
29390075Sobrien	;;
29490075Sobrienm68k-*-*)
29590075Sobrien	extra_headers=math-68881.h
29690075Sobrien	;;
29790075Sobrienmips*-*-*)
29890075Sobrien	cpu_type=mips
299132718Skan	need_64bit_hwint=yes
30090075Sobrien	;;
30190075Sobrienpowerpc*-*-*)
30290075Sobrien	cpu_type=rs6000
303117395Skan	extra_headers="ppc-asm.h altivec.h spe.h"
304132718Skan	need_64bit_hwint=yes
305146895Skan	case x$with_cpu in
306169689Skan	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456]|xrs64a)
307146895Skan		cpu_is_64bit=yes
308146895Skan		;;
309146895Skan	esac
31090075Sobrien	;;
311132718Skanrs6000*-*-*)
312132718Skan	need_64bit_hwint=yes
313132718Skan	;;
314169689Skanscore*-*-*)
315169689Skan	cpu_type=score
316169689Skan	;;
317132718Skansparc64*-*-*)
318132718Skan	cpu_type=sparc
319132718Skan	need_64bit_hwint=yes
320132718Skan	;;
32190075Sobriensparc*-*-*)
32290075Sobrien	cpu_type=sparc
32390075Sobrien	;;
324132718Skans390*-*-*)
325169689Skan	cpu_type=s390
326132718Skan	need_64bit_hwint=yes
327132718Skan	;;
328117395Skan# Note the 'l'; we need to be able to match e.g. "shle" or "shl".
329169689Skansh[123456789lbe]*-*-*)
33096263Sobrien	cpu_type=sh
331132718Skan	need_64bit_hwint=yes
33296263Sobrien	;;
333117395Skantic4x-*-*)
334117395Skan        cpu_type=c4x
335117395Skan        ;;
33690075Sobrienesac
33790075Sobrien
33890075Sobrientm_file=${cpu_type}/${cpu_type}.h
33990075Sobrienif test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
34090075Sobrienthen
34190075Sobrien	tm_p_file=${cpu_type}/${cpu_type}-protos.h
34290075Sobrienfi
343117395Skanextra_modes=
344117395Skanif test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
345117395Skanthen
346117395Skan	extra_modes=${cpu_type}/${cpu_type}-modes.def
347117395Skanfi
348169689Skanif test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
349169689Skanthen
350169689Skan	extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
351169689Skanfi
35290075Sobrien
353132718Skancase ${target} in
35490075Sobrienx86_64-*-*)
35590075Sobrien	tm_file="i386/biarch64.h ${tm_file}"
35690075Sobrien	;;
35790075Sobrienesac
35890075Sobrien
35990075Sobrien# On a.out targets, we need to use collect2.
360132718Skancase ${target} in
36190075Sobrien*-*-*aout*)
36290075Sobrien	use_collect2=yes
36390075Sobrien	;;
36490075Sobrienesac
36590075Sobrien
366132718Skan# Common parts for widely ported systems.
367132718Skancase ${target} in
368132718Skan*-*-darwin*)
369132718Skan  tm_file="${tm_file} darwin.h"
370169689Skan  case ${target} in
371169689Skan  *-*-darwin9*)
372169689Skan    tm_file="${tm_file} darwin9.h"
373169689Skan    ;;
374169689Skan  esac
375169689Skan  tm_file="${tm_file} ${cpu_type}/darwin.h"
376132718Skan  tm_p_file="${tm_p_file} darwin-protos.h"
377169689Skan  tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin"
378132718Skan  target_gtfiles="\$(srcdir)/config/darwin.c"
379169689Skan  extra_options="${extra_options} darwin.opt"
380132718Skan  c_target_objs="darwin-c.o"
381132718Skan  cxx_target_objs="darwin-c.o"
382132718Skan  extra_objs="darwin.o"
383169689Skan  default_use_cxa_atexit=yes
384132718Skan  case ${enable_threads} in
385132718Skan    "" | yes | posix) thread_file='posix' ;;
386132718Skan  esac
387132718Skan  ;;
388132718Skan*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
389132718Skan  # This is the place-holder for the generic a.out configuration
390132718Skan  # of FreeBSD.  No actual configuration resides here since
391132718Skan  # there was only ever a bare-bones ix86 configuration for
392132718Skan  # a.out and it exists solely in the machine-specific section.
393132718Skan  # This place-holder must exist to avoid dropping into
394132718Skan  # the generic ELF configuration of FreeBSD (i.e. it must be
395132718Skan  # ordered before that section).
396132718Skan  ;;
397132718Skan*-*-freebsd*)
398132718Skan  # This is the generic ELF configuration of FreeBSD.  Later
399132718Skan  # machine-specific sections may refine and add to this
400132718Skan  # configuration.
401132718Skan  #
402132718Skan  # Due to tm_file entry ordering issues that vary between cpu
403132718Skan  # architectures, we only define fbsd_tm_file to allow the
404132718Skan  # machine-specific section to dictate the final order of all
405132718Skan  # entries of tm_file with the minor exception that components
406132718Skan  # of the tm_file set here will always be of the form:
407132718Skan  #
408132718Skan  # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
409132718Skan  #
410132718Skan  # The machine-specific section should not tamper with this
411132718Skan  # ordering but may order all other entries of tm_file as it
412132718Skan  # pleases around the provided core setting.
413132718Skan  gas=yes
414132718Skan  gnu_ld=yes
415132718Skan  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
416132718Skan  case ${target} in
417132718Skan    *-*-freebsd3 | *-*-freebsd[3].*)
418132718Skan      tm_defines="${tm_defines} FBSD_MAJOR=3" ;;
419132718Skan    *-*-freebsd4 | *-*-freebsd[4].*)
420132718Skan      tm_defines="${tm_defines} FBSD_MAJOR=4" ;;
421132718Skan    *-*-freebsd5 | *-*-freebsd[5].*)
422132718Skan      tm_defines="${tm_defines} FBSD_MAJOR=5" ;;
423132718Skan    *-*-freebsd6 | *-*-freebsd[6].*)
424132718Skan      tm_defines="${tm_defines} FBSD_MAJOR=6" ;;
425161651Skan    *-*-freebsd7 | *-*-freebsd[7].*)
426161651Skan      tm_defines="${tm_defines} FBSD_MAJOR=7" ;;
427161651Skan    *-*-freebsd8 | *-*-freebsd[8].*)
428161651Skan      tm_defines="${tm_defines} FBSD_MAJOR=8" ;;
429161651Skan    *-*-freebsd9 | *-*-freebsd[9].*)
430161651Skan      tm_defines="${tm_defines} FBSD_MAJOR=9" ;;
431252179Spfg    *-*-freebsd10 | *-*-freebsd10.*)
432252176Spfg      tm_defines="${tm_defines} FBSD_MAJOR=10" ;;
433252179Spfg    *-*-freebsd11 | *-*-freebsd11.*)
434252176Spfg      tm_defines="${tm_defines} FBSD_MAJOR=11" ;;
435132718Skan    *)
436132718Skan      echo 'Please update *-*-freebsd* in gcc/config.gcc'
437132718Skan      exit 1
438132718Skan      ;;
439132718Skan  esac
440132718Skan  tmake_file="t-slibgcc-elf-ver t-freebsd"
441132718Skan  case ${enable_threads} in
442132718Skan    no)
443132718Skan      fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
444132718Skan      ;;
445132718Skan    "" | yes | posix)
446132718Skan      thread_file='posix'
447132718Skan      tmake_file="${tmake_file} t-freebsd-thread"
448132718Skan      # Before 5.0, FreeBSD can't bind shared libraries to -lc
449132718Skan      # when "optionally" threaded via weak pthread_* checks.
450132718Skan      case ${target} in
451132718Skan        *-*-freebsd[34] | *-*-freebsd[34].*)
452132718Skan          tmake_file="${tmake_file} t-slibgcc-nolc-override"
453132718Skan          ;;
454132718Skan      esac
455132718Skan      ;;
456169689Skan    *)
457132718Skan      echo 'Unknown thread configuration for FreeBSD'
458132718Skan      exit 1
459132718Skan      ;;
460132718Skan  esac
461132718Skan  fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
462132718Skan  ;;
463132718Skan*-*-linux*libc1* | *-*-linux*aout*)
464132718Skan  # Avoid the generic linux case.
465132718Skan  ;;
466169689Skan*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
467132718Skan  # Must come before *-*-gnu* (because of *-*-linux-gnu* systems).
468132718Skan  extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
469169689Skan  extra_options="${extra_options} linux.opt"
470132718Skan  gas=yes
471132718Skan  gnu_ld=yes
472132718Skan  case ${enable_threads} in
473132718Skan    "" | yes | posix) thread_file='posix' ;;
474132718Skan  esac
475169689Skan  tmake_file="t-slibgcc-elf-ver t-linux"
476169689Skan  case ${target} in
477169689Skan    *-*-*uclibc*)
478169689Skan      tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
479169689Skan      ;;
480169689Skan    *)
481169689Skan      tm_defines="${tm_defines} UCLIBC_DEFAULT=0"
482169689Skan      ;;
483169689Skan  esac
484169689Skan  # Assume that glibc or uClibc are being used and so __cxa_atexit is provided.
485169689Skan  default_use_cxa_atexit=yes
486132718Skan  ;;
48790075Sobrien*-*-gnu*)
488132718Skan  # On the Hurd, the setup is just about the same on
489132718Skan  # each different CPU.  The specific machines that we
490132718Skan  # support are matched above and just set $cpu_type.
491132718Skan  tm_file="${cpu_type}/gnu.h"
492132718Skan  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
493132718Skan  # GNU tools are the only tools.
494132718Skan  gas=yes
495132718Skan  gnu_ld=yes
496132718Skan  # These details are the same as for Linux.
497132718Skan  # But here we need a little extra magic.
498132718Skan  tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
499132718Skan  case ${target} in
500132718Skan    alpha*)
501132718Skan      tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
502132718Skan      ;;
503132718Skan    i[34567]86-*-*)
504132718Skan      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}"
505132718Skan      ;;
506132718Skan  esac
507169689Skan  # Assume that glibc is being used and so __cxa_atexit is provided.
508169689Skan  default_use_cxa_atexit=yes
509132718Skan  ;;
51090075Sobrien*-*-netbsd*)
511132718Skan  tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
512132718Skan  gas=yes
513132718Skan  gnu_ld=yes
514117395Skan
515132718Skan  # NetBSD 2.0 and later get POSIX threads enabled by default.
516132718Skan  # Allow them to be explicitly enabled on any other version.
517132718Skan  case ${enable_threads} in
518132718Skan    "")
519132718Skan      case ${target} in
520132718Skan        *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
521132718Skan          thread_file='posix'
522132718Skan          tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
523132718Skan          ;;
524132718Skan      esac
525132718Skan      ;;
526132718Skan    yes | posix)
527132718Skan      thread_file='posix'
528132718Skan      tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
529132718Skan      ;;
530132718Skan  esac
531117395Skan
532132718Skan  # NetBSD 1.7 and later are set up to use GCC's crtstuff for
533132718Skan  # ELF configurations.  We will clear extra_parts in the
534132718Skan  # a.out configurations.
535132718Skan  case ${target} in
536132718Skan    *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
537132718Skan      extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
538132718Skan      ;;
539132718Skan  esac
540132718Skan
541132718Skan  # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
542132718Skan  # default (unless overridden by --disable-__cxa_atexit).
543132718Skan  case ${target} in
544132718Skan    *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
545132718Skan      default_use_cxa_atexit=yes
546132718Skan      ;;
547132718Skan  esac
548132718Skan  ;;
549132718Skan*-*-openbsd*)
550132718Skan  tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
551132718Skan  case ${enable_threads} in
552132718Skan    yes)
553132718Skan      thread_file='posix'
554132718Skan      tmake_file="${tmake_file} t-openbsd-thread"
555132718Skan      ;;
556132718Skan  esac
557169689Skan  case ${target} in
558169689Skan    *-*-openbsd2.*|*-*-openbsd3.[012])
559169689Skan      tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
560169689Skan  esac
561132718Skan  ;;
562132718Skan*-*-rtems*)
563132718Skan  case ${enable_threads} in
564132718Skan    yes) thread_file='rtems' ;;
565132718Skan  esac
566132718Skan  ;;
567132718Skan*-*-vxworks*)
568132718Skan  tmake_file=t-vxworks
569169689Skan  tm_file="${tm_file} elfos.h svr4.h"
570169689Skan  xm_defines=POSIX
571169689Skan  extra_options="${extra_options} vxworks.opt"
572132718Skan  case ${enable_threads} in
573132718Skan    no) ;;
574132718Skan    "" | yes | vxworks) thread_file='vxworks' ;;
575132718Skan    *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
576132718Skan  esac
577132718Skan  ;;
578169689Skan*-*-elf)
579169689Skan  # Assume that newlib is being used and so __cxa_atexit is provided.
580169689Skan  default_use_cxa_atexit=yes
581169689Skan  ;;
58290075Sobrienesac
58390075Sobrien
584132718Skancase ${target} in
58590075Sobrien# Support site-specific machine types.
58690075Sobrien*local*)
587132718Skan	rest=`echo ${target} | sed -e "s/$cpu_type-//"`
58890075Sobrien	tm_file=${cpu_type}/$rest.h
58990075Sobrien	if test -f $srcdir/config/${cpu_type}/xm-$rest.h
59090075Sobrien	then xm_file=${cpu_type}/xm-$rest.h
59190075Sobrien	fi
59290075Sobrien	if test -f $srcdir/config/${cpu_type}/t-$rest
59390075Sobrien	then tmake_file=${cpu_type}/t-$rest
59490075Sobrien	fi
59590075Sobrien	;;
59690075Sobrienalpha*-*-unicosmk*)
59790075Sobrien	use_collect2=yes
59890075Sobrien	tm_file="${tm_file} alpha/unicosmk.h"
59990075Sobrien
60090075Sobrien	# Don't include t-ieee for now because we don't support that yet
60190075Sobrien	# tmake_file="alpha/t-ieee"
60290075Sobrien	tmake_file="alpha/t-unicosmk"
603132718Skan	use_fixproto=yes
60490075Sobrien	;;
60590075Sobrienalpha*-*-linux*)
60690075Sobrien	tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
60790075Sobrien	target_cpu_default="MASK_GAS"
608169689Skan	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee alpha/t-linux"
60990075Sobrien	;;
610117395Skanalpha*-*-gnu*)
611117395Skan	target_cpu_default="MASK_GAS"
612117395Skan	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
613117395Skan	;;
61490075Sobrienalpha*-*-freebsd*)
61590075Sobrien	tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
61690075Sobrien	target_cpu_default="MASK_GAS"
61790075Sobrien	tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
61890075Sobrien	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
61990075Sobrien	;;
62090075Sobrienalpha*-*-netbsd*)
62190075Sobrien	tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
62290075Sobrien	target_cpu_default="MASK_GAS"
62390075Sobrien	tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
62490075Sobrien	;;
62590075Sobrienalpha*-*-openbsd*)
626169689Skan	tm_defines="${tm_defines} OBSD_NO_DYNAMIC_LIBRARIES OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
627132718Skan	tm_file="alpha/alpha.h openbsd.h alpha/openbsd.h"
62890075Sobrien	# default x-alpha is only appropriate for dec-osf.
62990075Sobrien	target_cpu_default="MASK_GAS"
63090075Sobrien	tmake_file="alpha/t-alpha alpha/t-ieee"
63190075Sobrien	;;
632117395Skanalpha*-dec-osf[45]*)
63390075Sobrien	if test x$stabs = xyes
63490075Sobrien	then
63590075Sobrien		tm_file="${tm_file} dbx.h"
63690075Sobrien	fi
63790075Sobrien	if test x$gas != xyes
63890075Sobrien	then
63990075Sobrien		extra_passes="mips-tfile mips-tdump"
64090075Sobrien	fi
64190075Sobrien	use_collect2=yes
642117395Skan	tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4"
643117395Skan	tm_file="${tm_file} alpha/osf.h"
64490075Sobrien	extra_headers=va_list.h
645132718Skan	case ${target} in
64690075Sobrien	  *-*-osf4*)
647169689Skan	    # Define TARGET_SUPPORT_ARCH except on 4.0a.
648132718Skan	    case ${target} in
649117395Skan		*-*-osf4.0a) ;;
650169689Skan		*) tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
651117395Skan	    esac
65290075Sobrien	    ;;
65390075Sobrien	  *-*-osf5*)
654117395Skan	    tm_file="${tm_file} alpha/osf5.h"
655169689Skan	    tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
65690075Sobrien	    ;;
65790075Sobrien	esac
658132718Skan	case ${enable_threads} in
659132718Skan	  "" | yes | posix)
660132718Skan	    thread_file='posix'
661132718Skan	    tmake_file="${tmake_file} alpha/t-osf-pthread"
662132718Skan	    ;;
663132718Skan	esac
66490075Sobrien	;;
66590075Sobrienalpha64-dec-*vms*)
666117395Skan	tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
667132718Skan	xm_file="alpha/xm-vms.h"
66890075Sobrien	tmake_file="alpha/t-alpha alpha/t-vms alpha/t-vms64 alpha/t-ieee"
66990075Sobrien	prefix=/gnu
67090075Sobrien	local_prefix=/gnu
67190075Sobrien	;;
67290075Sobrienalpha*-dec-*vms*)
673117395Skan	tm_file="${tm_file} alpha/vms.h"
67490075Sobrien	xm_file=alpha/xm-vms.h
67590075Sobrien	tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
67690075Sobrien	prefix=/gnu
67790075Sobrien	local_prefix=/gnu
67890075Sobrien	;;
67990075Sobrienarc-*-elf*)
68090075Sobrien	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
68190075Sobrien	extra_parts="crtinit.o crtfini.o"
682132718Skan	use_fixproto=yes
68390075Sobrien	;;
68490075Sobrienarm-*-coff* | armel-*-coff*)
685132718Skan	tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h"
686169689Skan	tmake_file="arm/t-arm arm/t-arm-coff"
68790075Sobrien	;;
68890075Sobrienarm-semi-aof | armel-semi-aof)
68990075Sobrien	tm_file="arm/semiaof.h arm/aof.h arm/arm.h"
690169689Skan	tmake_file="arm/t-arm arm/t-semi"
69190075Sobrien	;;
692132718Skanarm-wrs-vxworks)
693132718Skan	tm_file="dbxelf.h elfos.h svr4.h vxworks.h arm/elf.h arm/aout.h arm/arm.h arm/vxworks.h"
694169689Skan	tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
695132718Skan	;;
69690075Sobrienarm*-*-freebsd*|strongarm*-*-freebsd*)
69790075Sobrien	tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
698169689Skan	tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
69990075Sobrien	;;
70096263Sobrienarm*-*-netbsdelf*)
701117395Skan	tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
702169689Skan	tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
70396263Sobrien	;;
70490075Sobrienarm*-*-netbsd*)
70590075Sobrien	tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
706169689Skan	tmake_file="t-netbsd arm/t-arm arm/t-netbsd"
707117395Skan	extra_parts=""
70890075Sobrien	use_collect2=yes
70990075Sobrien	;;
71090075Sobrienarm*-*-linux*)			# ARM GNU/Linux with ELF
711169689Skan	tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
712169689Skan	tmake_file="${tmake_file} t-linux arm/t-arm"
713169689Skan	case ${target} in
714169689Skan	arm*-*-linux-*eabi)
715169689Skan	    tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
716169689Skan	    tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
717169689Skan  	    # The BPABI long long divmod functions return a 128-bit value in
718169689Skan	    # registers r0-r3.  Correctly modeling that requires the use of
719169689Skan	    # TImode.
720169689Skan	    need_64bit_hwint=yes
721169689Skan	    # The EABI requires the use of __cxa_atexit.
722169689Skan	    default_use_cxa_atexit=yes
723169689Skan	    ;;
724169689Skan	*)
725169689Skan	    tmake_file="$tmake_file arm/t-linux"
726169689Skan	    ;;
727169689Skan	esac
728169689Skan	tm_file="$tm_file arm/aout.h arm/arm.h"
72990075Sobrien	;;
73090075Sobrienarm*-*-uclinux*)		# ARM ucLinux
73190075Sobrien	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"
732169689Skan	tmake_file="arm/t-arm arm/t-arm-elf"
73390075Sobrien	;;
73490075Sobrienarm*-*-ecos-elf)
73590075Sobrien	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
736169689Skan	tmake_file="arm/t-arm arm/t-arm-elf"
73790075Sobrien	;;
738169689Skanarm*-*-eabi* | arm*-*-symbianelf* )
739169689Skan	# The BPABI long long divmod functions return a 128-bit value in
740169689Skan	# registers r0-r3.  Correctly modeling that requires the use of
741169689Skan	# TImode.
742169689Skan	need_64bit_hwint=yes
743169689Skan	default_use_cxa_atexit=yes
744169689Skan	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
745169689Skan	tmake_file="arm/t-arm arm/t-arm-elf"
746169689Skan	case ${target} in
747169689Skan	arm*-*-eabi*)
748169689Skan	  tmake_file="${tmake_file} arm/t-bpabi"
749169689Skan	  ;;
750169689Skan	arm*-*-symbianelf*)
751169689Skan	  tm_file="${tm_file} arm/symbian.h"
752169689Skan	  # We do not include t-bpabi for Symbian OS because the system
753169689Skan	  # provides its own implementation of the BPABI functions.
754169689Skan	  tmake_file="${tmake_file} arm/t-symbian"
755169689Skan	  ;;
756169689Skan	esac
757169689Skan	tm_file="${tm_file} arm/aout.h arm/arm.h"
758169689Skan	;;
75996263Sobrienarm*-*-rtems*)
76096263Sobrien	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"
761169689Skan	tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
76296263Sobrien	;;
763132718Skanarm*-*-elf | ep9312-*-elf)
76490075Sobrien	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
765169689Skan	tmake_file="arm/t-arm arm/t-arm-elf"
76690075Sobrien	;;
767132718Skanarm*-wince-pe*)
768132718Skan	tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
769169689Skan	tmake_file="arm/t-arm arm/t-wince-pe"
770169689Skan	extra_options="${extra_options} arm/pe.opt"
771132718Skan	extra_objs="pe.o"
77290075Sobrien	;;
77390075Sobrienarm-*-pe*)
774132718Skan	tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h"
775169689Skan	tmake_file="arm/t-arm arm/t-pe"
776169689Skan	extra_options="${extra_options} arm/pe.opt"
77790075Sobrien	extra_objs="pe.o"
77890075Sobrien	;;
779132718Skanarm*-*-kaos*)
780132718Skan	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"
781169689Skan	tmake_file="arm/t-arm arm/t-arm-elf"
782132718Skan	;;
783146895Skanavr-*-rtems*)
784146895Skan	tm_file="avr/avr.h dbxelf.h avr/rtems.h rtems.h"
785146895Skan	tmake_file="avr/t-avr t-rtems avr/t-rtems"
786146895Skan	;;
78790075Sobrienavr-*-*)
788132718Skan	tm_file="avr/avr.h dbxelf.h"
789132718Skan	use_fixproto=yes
79090075Sobrien	;;
791169689Skanbfin*-elf*)
792169689Skan	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h"
793169689Skan        tmake_file=bfin/t-bfin-elf
794169689Skan        use_collect2=no
795169689Skan        ;;
796169689Skanbfin*-uclinux*)
797169689Skan	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/uclinux.h"
798169689Skan        tmake_file=bfin/t-bfin-elf
799169689Skan        use_collect2=no
800169689Skan        ;;
801169689Skanbfin*-rtems*)
802169689Skan	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h"
803169689Skan	tmake_file="bfin/t-bfin t-rtems bfin/t-rtems"
804169689Skan        ;;
805169689Skanbfin*-*)
806169689Skan	tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h"
807169689Skan        tmake_file=bfin/t-bfin
808169689Skan        use_collect2=no
809169689Skan        ;;
810117395Skanc4x-*-rtems* | tic4x-*-rtems*)
811146895Skan	tmake_file="c4x/t-c4x t-rtems c4x/t-rtems"
81296263Sobrien	tm_file="c4x/c4x.h c4x/rtems.h rtems.h"
81390075Sobrien	c_target_objs="c4x-c.o"
81490075Sobrien	cxx_target_objs="c4x-c.o"
81590075Sobrien	;;
816117395Skanc4x-* | tic4x-*)
81790075Sobrien	tmake_file=c4x/t-c4x
81890075Sobrien	c_target_objs="c4x-c.o"
81990075Sobrien	cxx_target_objs="c4x-c.o"
82090075Sobrien	;;
82190075Sobriencris-*-aout)
82290075Sobrien	tm_file="dbxelf.h ${tm_file} cris/aout.h"
82390075Sobrien	gas=yes
82490075Sobrien	tmake_file="cris/t-cris cris/t-aout"
825169689Skan	extra_options="${extra_options} cris/aout.opt"
82690075Sobrien	;;
82790075Sobriencris-*-elf | cris-*-none)
82890075Sobrien	tm_file="dbxelf.h elfos.h ${tm_file}"
82990075Sobrien	tmake_file="cris/t-cris cris/t-elfmulti"
83090075Sobrien	gas=yes
831169689Skan	extra_options="${extra_options} cris/elf.opt"
83290075Sobrien	;;
83390075Sobriencris-*-linux*)
83490075Sobrien	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
835169689Skan	# We need to avoid using t-linux, so override default tmake_file
83690075Sobrien	tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
837169689Skan	extra_options="${extra_options} cris/linux.opt"
83890075Sobrien	;;
839169689Skancrx-*-elf)
840169689Skan	tm_file="elfos.h ${tm_file}"
841169689Skan	extra_parts="crtbegin.o crtend.o"
842169689Skan	use_collect2=no
84390075Sobrien	;;
84490075Sobrienfr30-*-elf)
84590075Sobrien	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
84690075Sobrien	tmake_file=fr30/t-fr30
84790075Sobrien	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
848132718Skan	use_fixproto=yes
84990075Sobrien	;;
850117395Skanfrv-*-elf)
851117395Skan	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} frv/frv-abi.h"
852117395Skan	tmake_file=frv/t-frv
853132718Skan	use_fixproto=yes
854117395Skan	;;
855169689Skanfrv-*-*linux*)
856169689Skan	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} \
857169689Skan	         linux.h frv/linux.h frv/frv-abi.h"
858169689Skan	tmake_file="${tmake_file} frv/t-frv frv/t-linux"
859169689Skan	;;
860169689Skanh8300-*-rtemscoff*)
861132718Skan	tmake_file="h8300/t-h8300 t-rtems h8300/t-rtems"
862132718Skan	tm_file="h8300/h8300.h dbxcoff.h h8300/coff.h h8300/rtems.h rtems.h"
86390075Sobrien	;;
864169689Skanh8300-*-rtems*)
865169689Skan	tmake_file="h8300/t-h8300 h8300/t-elf t-rtems h8300/t-rtems"
866169689Skan	tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h"
867169689Skan	;;
86890075Sobrienh8300-*-elf*)
86990075Sobrien	tmake_file="h8300/t-h8300 h8300/t-elf"
870132718Skan	tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h"
871132718Skan	use_fixproto=yes
87290075Sobrien	;;
87390075Sobrienh8300-*-*)
874132718Skan	tm_file="h8300/h8300.h dbxcoff.h h8300/coff.h"
875132718Skan	use_fixproto=yes
87690075Sobrien	;;
87790075Sobrienhppa*64*-*-linux* | parisc*64*-*-linux*)
878169689Skan	target_cpu_default="MASK_PA_11|MASK_PA_20"
879117395Skan	tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \
880117395Skan		 pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h pa/pa64-linux.h"
881169689Skan	tmake_file="${tmake_file} pa/t-linux64"
88290075Sobrien	gas=yes gnu_ld=yes
883132718Skan	need_64bit_hwint=yes
88490075Sobrien	;;
88590075Sobrienhppa*-*-linux* | parisc*-*-linux*)
886169689Skan	target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
88790075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \
88890075Sobrien		 pa/pa32-regs.h pa/pa32-linux.h"
889169689Skan	tmake_file="${tmake_file} pa/t-linux"
890169689Skan	# Set the libgcc version number
891169689Skan	if test x$sjlj = x1; then
892169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
893169689Skan	else
894169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
895132718Skan	fi
89690075Sobrien	;;
897132718Skan# port not yet contributed.
898132718Skan#hppa*-*-openbsd*)
899132718Skan#	target_cpu_default="MASK_PA_11"
900132718Skan#	;;
90190075Sobrienhppa1.1-*-pro*)
902169689Skan	target_cpu_default="MASK_PORTABLE_RUNTIME|MASK_NO_SPACE_REGS|MASK_SOFT_FLOAT"
903169689Skan	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h \
904169689Skan		 pa/pa-pro-end.h libgloss.h"
905132718Skan	tmake_file="pa/t-pro"
90690075Sobrien	;;
90790075Sobrienhppa1.1-*-osf*)
90890075Sobrien	target_cpu_default="MASK_PA_11"
909132718Skan	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h pa/pa-osf.h"
910132718Skan	tmake_file="pa/t-pa"
91190075Sobrien	use_collect2=yes
91290075Sobrien	;;
91390075Sobrienhppa1.1-*-bsd*)
914169689Skan	target_cpu_default="MASK_PA_11"
915132718Skan	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h"
916132718Skan	tmake_file="pa/t-pa"
91790075Sobrien	use_collect2=yes
91890075Sobrien	;;
919169689Skanhppa[12]*-*-hpux10*)
920169689Skan	case ${target} in
921169689Skan	hppa1.1-*-* | hppa2*-*-*)
922169689Skan		target_cpu_default="MASK_PA_11"
92390075Sobrien		;;
92490075Sobrien	esac
925169689Skan	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
926169689Skan		 pa/pa-hpux.h pa/pa-hpux10.h"
927169689Skan	extra_options="${extra_options} pa/pa-hpux.opt"
928169689Skan	case ${target} in
929169689Skan	*-*-hpux10.[1-9]*)
930169689Skan		tm_file="${tm_file} pa/pa-hpux1010.h"
931169689Skan		extra_options="${extra_options} pa/pa-hpux1010.opt"
93290075Sobrien		;;
93390075Sobrien	esac
934169689Skan	tmake_file="pa/t-pa-hpux10 pa/t-pa-hpux pa/t-hpux-shlib"
935169689Skan	case ${enable_threads} in
936169689Skan	  "")
937169689Skan	    if test x$have_pthread_h = xyes ; then
938169689Skan	      tmake_file="${tmake_file} pa/t-dce-thr"
939169689Skan	    fi
940169689Skan	    ;;
941169689Skan	  yes | dce)
942169689Skan	    tmake_file="${tmake_file} pa/t-dce-thr"
943169689Skan	    ;;
944169689Skan	esac
945169689Skan	# Set the libgcc version number
946169689Skan	if test x$sjlj = x1; then
947169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
948169689Skan	else
949169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
950169689Skan	fi
95190075Sobrien	use_collect2=yes
952132718Skan	use_fixproto=yes
953169689Skan	gas=yes
95490075Sobrien	;;
95590075Sobrienhppa*64*-*-hpux11*)
956169689Skan	target_cpu_default="MASK_PA_11|MASK_PA_20"
957117395Skan	if test x$gnu_ld = xyes
958117395Skan	then
959117395Skan		target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
960117395Skan	fi
961169689Skan	tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
962169689Skan		 pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
963169689Skan		 pa/pa-hpux11.h"
964169689Skan	case ${target} in
965169689Skan	*-*-hpux11.[1-9]*)
966169689Skan		tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
967169689Skan		extra_options="${extra_options} pa/pa-hpux1111.opt"
968169689Skan		;;
969169689Skan	*)
970169689Skan		tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
971169689Skan		;;
972169689Skan	esac
973169689Skan	extra_options="${extra_options} pa/pa-hpux.opt \
974169689Skan		       pa/pa-hpux1010.opt pa/pa64-hpux.opt"
975169689Skan	need_64bit_hwint=yes
976169689Skan	tmake_file="pa/t-pa64 pa/t-pa-hpux pa/t-hpux-shlib"
977169689Skan	# Set the libgcc version number
978169689Skan	if test x$sjlj = x1; then
979169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
980169689Skan	else
981169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
982169689Skan	fi
983169689Skan	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
984169689Skan		     libgcc_stub.a"
985122180Skan	case x${enable_threads} in
986169689Skan	x | xyes | xposix )
987169689Skan		thread_file=posix
988122180Skan		;;
989122180Skan	esac
990169689Skan	gas=yes
99190075Sobrien	;;
992169689Skanhppa[12]*-*-hpux11*)
993169689Skan	case ${target} in
994169689Skan	hppa1.1-*-* | hppa2*-*-*)
995169689Skan		target_cpu_default="MASK_PA_11"
996122180Skan		;;
997122180Skan	esac
998169689Skan	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
999169689Skan		 pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1000169689Skan	extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt"
1001169689Skan	case ${target} in
1002169689Skan	*-*-hpux11.[1-9]*)
1003169689Skan		tm_file="${tm_file} pa/pa-hpux1111.h"
1004169689Skan		extra_options="${extra_options} pa/pa-hpux1111.opt"
1005169689Skan		;;
1006169689Skan	esac
1007169689Skan	tmake_file="pa/t-pa-hpux11 pa/t-pa-hpux pa/t-hpux-shlib"
1008169689Skan	# Set the libgcc version number
1009169689Skan	if test x$sjlj = x1; then
1010169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-sjlj-ver"
1011169689Skan	else
1012169689Skan	    tmake_file="$tmake_file pa/t-slibgcc-dwarf-ver"
1013169689Skan	fi
1014122180Skan	case x${enable_threads} in
1015169689Skan	x | xyes | xposix )
1016169689Skan		thread_file=posix
1017122180Skan		;;
1018122180Skan	esac
101990075Sobrien	use_collect2=yes
1020169689Skan	gas=yes
102190075Sobrien	;;
1022169689Skani[34567]86-*-darwin*)
1023169689Skan	need_64bit_hwint=yes
1024169689Skan
1025169689Skan	# This is so that '.../configure && make' doesn't fail due to
1026169689Skan	# config.guess deciding that the configuration is i386-*-darwin* and
1027169689Skan	# then this file using that to set --with-cpu=i386 which has no -m64
1028169689Skan	# support.
1029169689Skan	with_arch=${with_arch:-nocona}
1030169689Skan	with_cpu=${with_cpu:-generic}
103190075Sobrien	;;
1032169689Skanx86_64-*-darwin*)
1033169689Skan	with_arch=${with_arch:-nocona}
1034169689Skan	with_cpu=${with_cpu:-generic}
1035169689Skan	tmake_file="t-darwin ${cpu_type}/t-darwin64 t-slibgcc-darwin"
1036169689Skan	tm_file="${tm_file} ${cpu_type}/darwin64.h"
103790075Sobrien	;;
103890075Sobrieni[34567]86-*-elf*)
1039117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
104090075Sobrien	tmake_file="i386/t-i386elf t-svr4"
1041132718Skan	use_fixproto=yes
104290075Sobrien	;;
104390075Sobrieni[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
104490075Sobrien	if test x$gas = xyes
104590075Sobrien	then
104690075Sobrien		tm_file="${tm_file} usegas.h"
104790075Sobrien	fi
1048117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h"
104990075Sobrien	tmake_file=t-svr4
105090075Sobrien	extra_parts="crtbegin.o crtend.o"
1051132718Skan	use_fixproto=yes
105290075Sobrien	;;
105390075Sobrieni[34567]86-*-aout*)
1054117395Skan	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/i386-aout.h"
1055132718Skan	use_fixproto=yes
105690075Sobrien	;;
105790075Sobrieni[34567]86-*-beoself* | i[34567]86-*-beos*)
105890075Sobrien	tmake_file='i386/t-beos i386/t-crtpic'
1059117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/beos-elf.h"
106090075Sobrien	extra_parts='crtbegin.o crtend.o'
106190075Sobrien	;;
106290075Sobrieni[34567]86-*-freebsd*)
1063117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
106490075Sobrien	;;
106590075Sobrienx86_64-*-freebsd*)
1066117395Skan	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"
106790075Sobrien	;;
106890075Sobrieni[34567]86-*-netbsdelf*)
1069117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
107090075Sobrien	;;
107190075Sobrieni[34567]86-*-netbsd*)
1072117395Skan	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
107390075Sobrien	tmake_file=t-netbsd
1074117395Skan	extra_parts=""
107590075Sobrien	use_collect2=yes
107690075Sobrien	;;
107790075Sobrienx86_64-*-netbsd*)
1078117395Skan	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"
107990075Sobrien	;;
1080169689Skani[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
1081132718Skan	tm_file="i386/i386.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h i386/openbsd.h"
108290075Sobrien	# needed to unconfuse gdb
108390075Sobrien	tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
108490075Sobrien	# we need collect2 until our bug is fixed...
108590075Sobrien	use_collect2=yes
108690075Sobrien	;;
1087169689Skani[34567]86-*-openbsd*)
1088169689Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1089169689Skan	tm_file="${tm_file} openbsd.h i386/openbsdelf.h"
1090169689Skan	gas=yes
1091169689Skan	gnu_ld=yes
1092169689Skan	;;
109390075Sobrieni[34567]86-*-coff*)
1094117395Skan	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
1095132718Skan	use_fixproto=yes
109690075Sobrien	;;
1097169689Skani[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
1098169689Skan			# Intel 80386's running GNU/*
109990075Sobrien			# with ELF format using glibc 2
1100117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
1101169689Skan	case ${target} in
1102169689Skan	i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
1103169689Skan	i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
1104169689Skan	esac
1105169689Skan	tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtfm t-dfprules"
110690075Sobrien	;;
1107169689Skanx86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
1108117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \
110990075Sobrien		 i386/x86-64.h i386/linux64.h"
1110169689Skan	case ${target} in
1111169689Skan	x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
1112169689Skan	x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
1113169689Skan	esac
1114169689Skan	tmake_file="${tmake_file} i386/t-linux64 i386/t-crtfm t-dfprules"
111590075Sobrien	;;
111690075Sobrieni[34567]86-*-gnu*)
111790075Sobrien	;;
111890075Sobrieni[34567]86-pc-msdosdjgpp*)
111990075Sobrien	xm_file=i386/xm-djgpp.h
1120132718Skan	tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
112190075Sobrien	tmake_file=i386/t-djgpp
1122169689Skan	extra_options="${extra_options} i386/djgpp.opt"
112390075Sobrien	gnu_ld=yes
112490075Sobrien	gas=yes
112590075Sobrien	;;
1126169689Skani[34567]86-*-lynxos*)
1127169689Skan	xm_defines=POSIX
1128169689Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1129169689Skan	tmake_file="i386/t-crtstuff t-lynx"
1130169689Skan	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1131169689Skan	extra_options="${extra_options} lynx.opt"
1132169689Skan	thread_file=lynx
113390075Sobrien	gnu_ld=yes
113490075Sobrien	gas=yes
113590075Sobrien	;;
1136169689Skani[3456x]86-*-netware*)
1137169689Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h tm-dwarf2.h i386/netware.h"
1138169689Skan 	tmake_file=i386/t-netware
1139169689Skan	extra_objs=netware.o
1140169689Skan	case /${with_ld} in
1141169689Skan	*/nwld)
1142169689Skan		extra_objs="$extra_objs nwld.o"
1143169689Skan		tm_file="${tm_file} i386/nwld.h"
1144169689Skan	 	tmake_file="${tmake_file} i386/t-nwld"
1145169689Skan		extra_parts="crt0.o libgcc.def libc.def libcpre.def posixpre.def"
1146169689Skan		;;
1147169689Skan	esac
1148169689Skan	case x${enable_threads} in
1149169689Skan	x | xyes | xposix) thread_file='posix';;
1150169689Skan	xnks) thread_file='nks';;
1151169689Skan	xno) ;;
1152169689Skan	*) echo 'Unknown thread configuration for NetWare' >&2; exit 1;;
1153169689Skan	esac
115490075Sobrien	;;
1155132718Skani[34567]86-*-nto-qnx*)
1156132718Skan	tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h svr4.h i386/unix.h i386/nto.h"
1157132718Skan	tmake_file=i386/t-nto
1158132718Skan	gnu_ld=yes
1159132718Skan	gas=yes
116090075Sobrien	;;
1161117395Skani[34567]86-*-rtems*)
1162117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h"
116390075Sobrien	extra_parts="crtbegin.o crtend.o crti.o crtn.o"
116490075Sobrien	tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
116590075Sobrien	;;
116690075Sobrieni[34567]86-*-sco3.2v5*)	# 80386 running SCO Open Server 5
1167122180Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sco5.h"
116890075Sobrien	if test x$gas = xyes
116990075Sobrien	then
117090075Sobrien		tm_file="usegas.h ${tm_file}"
117190075Sobrien	fi
1172122180Skan	tmake_file=i386/t-sco5
1173122180Skan	extra_parts="crtbegin.o crtend.o"
1174169689Skan	extra_options="${extra_options} i386/sco5.opt"
1175132718Skan	use_fixproto=yes
117690075Sobrien	;;
117790075Sobrieni[34567]86-*-solaris2*)
1178169689Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h"
1179169689Skan	case ${target} in
1180169689Skan	*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
1181169689Skan		tm_file="${tm_file} sol2-6.h"
1182169689Skan		;;
1183169689Skan	*-*-solaris2.1[0-9]*)
1184169689Skan		tm_file="${tm_file} sol2-10.h"
1185169689Skan		;;
1186169689Skan	esac
1187169689Skan	tm_file="${tm_file} i386/sol2.h"
1188169689Skan	tmake_file="t-sol2 i386/t-sol2 t-svr4"
1189169689Skan	c_target_objs="sol2-c.o"
1190169689Skan	cxx_target_objs="sol2-c.o"
1191169689Skan	extra_objs="sol2.o"
1192169689Skan	tm_p_file="${tm_p_file} sol2-protos.h"
119390075Sobrien	if test x$gnu_ld = xyes; then
119490075Sobrien		tmake_file="$tmake_file t-slibgcc-elf-ver"
1195169689Skan		tm_defines="${tm_defines} TARGET_GNU_LD=1"
119690075Sobrien	else
119790075Sobrien		tmake_file="$tmake_file t-slibgcc-sld"
119890075Sobrien	fi
1199169689Skan	if test x$gas = xyes; then
1200169689Skan		tm_file="usegas.h ${tm_file}"
1201169689Skan	fi
1202132718Skan	case ${target} in
1203169689Skan	*-*-solaris2.[789] | *-*-solaris2.1[0-9]*)
1204132718Skan		tm_file="$tm_file tm-dwarf2.h"
1205132718Skan		;;
1206132718Skan	esac
1207169689Skan	case ${target} in
1208169689Skan	*-*-solaris2.1[0-9]*)
1209169689Skan		tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
1210169689Skan		tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1211169689Skan		tmake_file="$tmake_file i386/t-sol2-10"
1212169689Skan		need_64bit_hwint=yes
1213169689Skan		# FIXME: -m64 for i[34567]86-*-* should be allowed just
1214169689Skan		# like -m32 for x86_64-*-*.
1215169689Skan		case X"${with_cpu}" in
1216251212Spfg		Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
1217169689Skan			;;
1218169689Skan		X)
1219169689Skan			with_cpu=generic
1220169689Skan			;;
1221169689Skan		*)
1222169689Skan			echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1223251212Spfg			echo "generic core2 nocona x86-64 amdfam10 barcelona k8 opteron athlon64 athlon-fx" 1>&2
1224169689Skan			exit 1
1225169689Skan			;;
1226169689Skan		esac
1227169689Skan		# Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as
1228169689Skan		# part of the base system.
1229169689Skan		extra_parts="gmon.o crtbegin.o crtend.o"
1230169689Skan		;;
1231169689Skan	*)
1232169689Skan		extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1233169689Skan		;;
1234169689Skan	esac
1235169689Skan	case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
1236169689Skan	  "":yes:* | yes:yes:* )
1237169689Skan		case ${target} in
1238169689Skan		  *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
1239169689Skan			thread_file=posix95
1240169689Skan			;;
1241169689Skan		  *)
1242169689Skan			thread_file=posix
1243169689Skan			;;
1244169689Skan		esac
1245169689Skan		;;
1246169689Skan	  "":*:yes | yes:*:yes )
1247169689Skan		thread_file=solaris
1248169689Skan		;;
1249169689Skan	esac
125090075Sobrien	;;
125190075Sobrieni[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
1252117395Skan       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h"
125390075Sobrien       if test x$stabs = xyes
125490075Sobrien       then
125590075Sobrien               tm_file="${tm_file} dbx.h"
125690075Sobrien       fi
125790075Sobrien       tmake_file="i386/t-crtpic t-svr4"
125890075Sobrien       extra_parts="crtbegin.o crtend.o"
125990075Sobrien       if test x$enable_threads = xyes; then
126090075Sobrien	       thread_file='posix'
126190075Sobrien       fi
1262132718Skan	use_fixproto=yes
126390075Sobrien       ;;
126490075Sobrieni[34567]86-*-sysv4*)		# Intel 80386's running system V.4
1265117395Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h"
126690075Sobrien	if test x$stabs = xyes
126790075Sobrien	then
126890075Sobrien		tm_file="${tm_file} dbx.h"
126990075Sobrien	fi
127090075Sobrien	tmake_file="i386/t-crtpic t-svr4"
127190075Sobrien	extra_parts="crtbegin.o crtend.o"
1272132718Skan	use_fixproto=yes
127390075Sobrien	;;
1274169689Skani[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
1275169689Skan	tm_file="${tm_file} i386/sysv4.h i386/unix.h i386/att.h vx-common.h"
1276169689Skan	case ${target} in
1277169689Skan	  *-vxworksae*)
1278169689Skan	    tm_file="${tm_file} vxworksae.h i386/vxworksae.h"
1279169689Skan	    tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1280169689Skan	    ;;
1281169689Skan	  *)
1282169689Skan	    tm_file="${tm_file} vxworks.h i386/vxworks.h"
1283169689Skan	    tmake_file="${tmake_file} i386/t-vxworks"
1284169689Skan	    ;;
1285169689Skan	esac
128690075Sobrien	;;
128790075Sobrieni[34567]86-*-pe | i[34567]86-*-cygwin*)
1288132718Skan	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h"
128990075Sobrien	xm_file=i386/xm-cygwin.h
1290132718Skan	tmake_file="i386/t-cygwin i386/t-cygming"
1291169689Skan	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1292169689Skan	extra_options="${extra_options} i386/cygming.opt"
1293169689Skan	extra_objs="winnt.o winnt-stubs.o"
1294132718Skan	c_target_objs=cygwin2.o
1295169689Skan	cxx_target_objs="cygwin2.o winnt-cxx.o"
1296132718Skan	extra_gcc_objs=cygwin1.o
129790075Sobrien	if test x$enable_threads = xyes; then
1298132718Skan		thread_file='posix'
129990075Sobrien	fi
130090075Sobrien	;;
130190075Sobrieni[34567]86-*-mingw32*)
1302132718Skan	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h"
130390075Sobrien	xm_file=i386/xm-mingw32.h
1304132718Skan	tmake_file="i386/t-cygming i386/t-mingw32"
1305169689Skan	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1306169689Skan	extra_options="${extra_options} i386/cygming.opt"
1307169689Skan	extra_objs="winnt.o winnt-stubs.o"
1308169689Skan	cxx_target_objs=winnt-cxx.o
1309169689Skan	case ${enable_threads} in
1310169689Skan	  "" | yes | win32)
1311169689Skan	  thread_file='win32'
1312169689Skan	  tmake_file="${tmake_file} i386/t-gthr-win32"
1313169689Skan	  ;;
1314169689Skan	esac
1315132718Skan	case ${target} in
131690075Sobrien		*mingw32crt*)
131790075Sobrien			tm_file="${tm_file} i386/crtdll.h"
131890075Sobrien			;;
1319132718Skan		*mingw32msv* | *mingw32*)
132090075Sobrien			;;
132190075Sobrien	esac
132290075Sobrien	;;
132390075Sobrieni[34567]86-*-uwin*)
1324132718Skan	tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygwin.h i386/uwin.h"
132590075Sobrien	tmake_file="i386/t-cygwin i386/t-uwin"
132690075Sobrien	extra_objs=winnt.o
1327169689Skan	extra_options="${extra_options} i386/cygming.opt"
1328169689Skan	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
132990075Sobrien	if test x$enable_threads = xyes; then
133090075Sobrien		thread_file='win32'
133190075Sobrien	fi
1332132718Skan	use_fixproto=yes
133390075Sobrien	;;
133490075Sobrieni[34567]86-*-interix3*)
1335117395Skan	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"
1336132718Skan	tmake_file="i386/t-interix"
1337117395Skan	extra_objs=winnt.o
1338169689Skan	target_gtfiles="\$(srcdir)/config/i386/winnt.c"
133990075Sobrien	if test x$enable_threads = xyes ; then
134090075Sobrien		thread_file='posix'
134190075Sobrien	fi
134290075Sobrien	if test x$stabs = xyes ; then
134390075Sobrien		tm_file="${tm_file} dbxcoff.h"
134490075Sobrien	fi
134590075Sobrien	;;
1346132718Skani[34567]86-*-kaos*)
1347132718Skan	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
1348132718Skan	tmake_file="i386/t-i386elf t-svr4"
134990075Sobrien	;;
135090075Sobrienia64*-*-elf*)
135190075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
135290075Sobrien	tmake_file="ia64/t-ia64"
135390075Sobrien	target_cpu_default="0"
135490075Sobrien	if test x$gas = xyes
135590075Sobrien	then
135690075Sobrien		target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
135790075Sobrien	fi
135890075Sobrien	if test x$gnu_ld = xyes
135990075Sobrien	then
136090075Sobrien		target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
136190075Sobrien	fi
1362117395Skan	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1363132718Skan	use_fixproto=yes
136490075Sobrien	;;
136590075Sobrienia64*-*-freebsd*)
136696263Sobrien	tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
136790075Sobrien	target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
136890075Sobrien	tmake_file="${tmake_file} ia64/t-ia64"
1369117395Skan	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
137090075Sobrien	;;
137190075Sobrienia64*-*-linux*)
137290075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
1373169689Skan	tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc"
1374146895Skan	if test x$with_system_libunwind != xyes ; then
1375146895Skan		tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind"
1376146895Skan	fi
137790075Sobrien	target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1378117395Skan	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
137990075Sobrien	;;
138090075Sobrienia64*-*-hpux*)
1381132718Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h"
138290075Sobrien	tmake_file="ia64/t-ia64 ia64/t-hpux"
138390075Sobrien	target_cpu_default="MASK_GNU_AS"
1384122180Skan	case x$enable_threads in
1385122180Skan	xyes | xposix )
1386122180Skan		thread_file=posix
1387122180Skan		;;
1388122180Skan	esac
1389117395Skan	use_collect2=no
1390117395Skan	c_target_objs="ia64-c.o"
1391117395Skan	cxx_target_objs="ia64-c.o"
1392169689Skan	extra_options="${extra_options} ia64/ilp32.opt"
1393132718Skan	# If we decide to run fixproto we should define FIXPROTO_DEFINES
1394132718Skan	# in ia64/t-hpux, and also fix the definition of putenv in
1395132718Skan	# sys-protos.h (const char not char).
139690075Sobrien	;;
1397132718Skaniq2000*-*-elf*)
1398132718Skan        tm_file="svr4.h elfos.h iq2000/iq2000.h"
1399132718Skan        tmake_file=iq2000/t-iq2000
1400132718Skan        out_file=iq2000/iq2000.c
1401132718Skan        md_file=iq2000/iq2000.md
1402132718Skan	use_fixproto=yes
1403132718Skan        ;;
140490075Sobrienm32r-*-elf*)
140590075Sobrien	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
1406132718Skan	extra_parts="crtinit.o crtfini.o"
1407132718Skan	use_fixproto=yes
1408132718Skan 	;;
1409132718Skanm32rle-*-elf*)
1410132718Skan	tm_file="dbxelf.h elfos.h svr4.h m32r/little.h ${tm_file}"
1411117395Skan	extra_parts="crtinit.o crtfini.o m32rx/crtinit.o m32rx/crtfini.o"
1412132718Skan	use_fixproto=yes
141390075Sobrien	;;
1414132718Skanm32r-*-linux*)
1415132718Skan	tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} m32r/linux.h"
1416169689Skan	# We override the tmake_file for linux -- why?
1417169689Skan	tmake_file="t-slibgcc-elf-ver m32r/t-linux"
1418132718Skan	gnu_ld=yes
1419132718Skan	use_fixproto=yes
1420132718Skan	if test x$enable_threads = xyes; then
1421132718Skan		thread_file='posix'
1422132718Skan	fi
1423132718Skan 	;;
1424132718Skanm32rle-*-linux*)
1425132718Skan	tm_file="dbxelf.h elfos.h svr4.h linux.h m32r/little.h ${tm_file} m32r/linux.h"
1426169689Skan	# We override the tmake_file for linux -- why?
1427169689Skan	tmake_file="t-slibgcc-elf-ver m32r/t-linux"
1428132718Skan	gnu_ld=yes
1429132718Skan	use_fixproto=yes
1430132718Skan	if test x$enable_threads = xyes; then
1431132718Skan		thread_file='posix'
1432132718Skan	fi
1433132718Skan	;;
143490075Sobrien# m68hc11 and m68hc12 share the same machine description.
143590075Sobrienm68hc11-*-*|m6811-*-*)
143690075Sobrien	tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
143790075Sobrien	tm_p_file="m68hc11/m68hc11-protos.h"
143890075Sobrien	md_file="m68hc11/m68hc11.md"
143990075Sobrien	out_file="m68hc11/m68hc11.c"
144090075Sobrien	tmake_file="m68hc11/t-m68hc11-gas"
1441132718Skan	use_fixproto=yes
144290075Sobrien        ;;
144390075Sobrienm68hc12-*-*|m6812-*-*)
144490075Sobrien	tm_file="m68hc11/m68hc12.h dbxelf.h elfos.h m68hc11/m68hc11.h"
144590075Sobrien	tm_p_file="m68hc11/m68hc11-protos.h"
144690075Sobrien	md_file="m68hc11/m68hc11.md"
144790075Sobrien	out_file="m68hc11/m68hc11.c"
144890075Sobrien	tmake_file="m68hc11/t-m68hc11-gas"
1449169689Skan	extra_options="${extra_options} m68hc11/m68hc11.opt"
1450132718Skan	use_fixproto=yes
145190075Sobrien        ;;
145290075Sobrienm68k-*-aout*)
145390075Sobrien	tmake_file=m68k/t-m68kbare
1454132718Skan	tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kemb.h m68k/m68k-aout.h libgloss.h"
145590075Sobrien	;;
145690075Sobrienm68k-*-coff*)
145790075Sobrien	tmake_file=m68k/t-m68kbare
1458169689Skan	tm_defines="${tm_defines} MOTOROLA USE_GAS"
1459132718Skan	tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kemb.h dbxcoff.h m68k/coff.h dbx.h"
1460132718Skan	use_fixproto=yes
146190075Sobrien	;;
146290075Sobrienm68020-*-elf* | m68k-*-elf*)
1463132718Skan	tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h"
1464169689Skan	tm_defines="${tm_defines} MOTOROLA USE_GAS"
146590075Sobrien	tmake_file=m68k/t-m68kelf
146690075Sobrien	extra_parts="crtbegin.o crtend.o"
146790075Sobrien	;;
146896263Sobrienm68010-*-netbsdelf* | m68k*-*-netbsdelf*)
146996263Sobrien	tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1470169689Skan	tm_defines="${tm_defines} MOTOROLA USE_GAS"
1471132718Skan	case ${target} in
147296263Sobrien	m68010*)
147396263Sobrien		target_cpu_default="0"
147496263Sobrien		;;
147596263Sobrien	*)
147696263Sobrien		target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD"
147796263Sobrien		;;
147896263Sobrien	esac
147996263Sobrien	;;
148090075Sobrienm68k*-*-openbsd*)
148190075Sobrien	# needed to unconfuse gdb
1482169689Skan	tm_defines="${tm_defines} OBSD_OLD_GAS TARGET_DEFAULT=(MASK_68020|MASK_68881|MASK_BITFIELD)"
1483132718Skan	tm_file="m68k/m68k.h openbsd.h m68k/openbsd.h"
148490075Sobrien	tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
148590075Sobrien	# we need collect2 until our bug is fixed...
148690075Sobrien	use_collect2=yes
148790075Sobrien	;;
1488132718Skanm68k-*-uclinux*)		# Motorola m68k/ColdFire running uClinux with uClibc
1489132718Skan	tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux.h"
1490169689Skan 	tm_defines="${tm_defines} MOTOROLA USE_GAS"
1491132718Skan	tmake_file=m68k/t-uclinux
1492132718Skan	use_fixproto=no
149390075Sobrien	;;
149490075Sobrienm68k-*-linux*)		# Motorola m68k's running GNU/Linux
149590075Sobrien				# with ELF format using glibc 2
149690075Sobrien				# aka the GNU/Linux C library 6.
1497132718Skan	tm_file="m68k/m68k.h dbxelf.h elfos.h svr4.h linux.h m68k/linux.h"
1498169689Skan	extra_options="${extra_options} m68k/ieee.opt"
1499169689Skan	tm_defines="${tm_defines} MOTOROLA USE_GAS"
1500132718Skan	# if not configured with --enable-sjlj-exceptions, bump the
1501132718Skan	# libgcc version number
1502132718Skan	if test x$sjlj != x1; then
1503132718Skan	    tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
1504132718Skan	fi
150590075Sobrien	;;
1506117395Skanm68k-*-rtems*)
1507122180Skan	tmake_file="m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems"
1508132718Skan	tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h"
1509169689Skan	tm_defines="${tm_defines} MOTOROLA USE_GAS"
151090075Sobrien	extra_parts="crtbegin.o crtend.o"
151190075Sobrien	;;
151290075Sobrienmcore-*-elf)
151390075Sobrien	tm_file="dbxelf.h elfos.h svr4.h ${tm_file} mcore/mcore-elf.h"
151490075Sobrien	tmake_file=mcore/t-mcore
1515132718Skan	use_fixproto=yes
151690075Sobrien	;;
151790075Sobrienmcore-*-pe*)
1518132718Skan	tm_file="svr3.h dbxcoff.h ${tm_file} mcore/mcore-pe.h"
151990075Sobrien	tmake_file=mcore/t-mcore-pe
1520132718Skan	use_fixproto=yes
152190075Sobrien	;;
1522169689Skanmips-sgi-irix[56]*)
1523169689Skan	tm_file="elfos.h ${tm_file} mips/iris.h"
1524169689Skan	tmake_file="mips/t-iris mips/t-slibgcc-irix"
1525169689Skan	target_cpu_default="MASK_ABICALLS"
1526169689Skan	case ${target} in
1527169689Skan	*-*-irix5*)
1528169689Skan		tm_file="${tm_file} mips/iris5.h"
1529169689Skan		;;
1530169689Skan
1531169689Skan	*-*-irix6*)
1532169689Skan		tm_file="${tm_file} mips/iris6.h"
1533169689Skan		tmake_file="${tmake_file} mips/t-iris6"
1534169689Skan		tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
1535169689Skan		;;
1536169689Skan	esac
1537169689Skan	if test "x$stabs" = xyes
1538117395Skan	then
1539169689Skan		tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
1540117395Skan	fi
154190075Sobrien	if test "x$gnu_ld" = xyes
154290075Sobrien	then
1543169689Skan		tm_defines="${tm_defines} IRIX_USING_GNU_LD"
154490075Sobrien	fi
154590075Sobrien#	if test x$enable_threads = xyes; then
154690075Sobrien#		thread_file='irix'
154790075Sobrien#	fi
1548132718Skan	use_fixproto=yes
154990075Sobrien	;;
1550169689Skanmips*-*-netbsd*)			# NetBSD/mips, either endian.
1551132718Skan	target_cpu_default="MASK_ABICALLS"
1552132718Skan	tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
155390075Sobrien	;;
1554132718Skanmips64*-*-linux*)
1555132718Skan	tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h mips/linux64.h"
1556169689Skan	tmake_file="${tmake_file} mips/t-linux64"
1557169689Skan	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
1558132718Skan	gnu_ld=yes
1559132718Skan	gas=yes
1560132718Skan	;;
156190075Sobrienmips*-*-linux*)				# Linux MIPS, either endian.
1562117395Skan        tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
1563132718Skan	case ${target} in
156490075Sobrien        mipsisa32*-*)
156590075Sobrien                target_cpu_default="MASK_SOFT_FLOAT"
1566169689Skan		tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
156790075Sobrien                ;;
156890075Sobrien        esac
156990075Sobrien	;;
1570132718Skanmips*-*-openbsd*)
1571169689Skan	tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS"
1572169689Skan	target_cpu_default="MASK_ABICALLS"
1573132718Skan	tm_file="mips/mips.h openbsd.h mips/openbsd.h mips/sdb.h"
1574132718Skan	case ${target} in
1575169689Skan	mips*el-*-openbsd*)
1576132718Skan	    tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
1577132718Skan	*)  tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";;
1578132718Skan        esac
157990075Sobrien	;;
1580117395Skanmipsisa32-*-elf* | mipsisa32el-*-elf*)
1581169689Skan	tm_file="elfos.h ${tm_file} mips/elf.h"
1582117395Skan	tmake_file=mips/t-isa3264
1583169689Skan	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_EABI"
1584132718Skan	use_fixproto=yes
158590075Sobrien	;;
1586132718Skanmipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
1587169689Skan	tm_file="elfos.h ${tm_file} mips/elf.h"
1588132718Skan	tmake_file=mips/t-isa3264
1589169689Skan	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_EABI"
1590132718Skan	use_fixproto=yes
1591132718Skan	;;
1592117395Skanmipsisa64-*-elf* | mipsisa64el-*-elf*)
1593169689Skan	tm_file="elfos.h ${tm_file} mips/elf.h"
159490075Sobrien	tmake_file=mips/t-isa3264
1595169689Skan	target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1596169689Skan	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_EABI"
1597132718Skan	use_fixproto=yes
159890075Sobrien	;;
1599117395Skanmipsisa64sr71k-*-elf*)
1600169689Skan        tm_file="elfos.h ${tm_file} mips/elf.h"
1601117395Skan        tmake_file=mips/t-sr71k
1602169689Skan	target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1603169689Skan	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
1604132718Skan	use_fixproto=yes
1605117395Skan        ;;
1606117395Skanmipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
1607169689Skan	tm_file="elfos.h ${tm_file} mips/elf.h"
1608169689Skan	tmake_file="mips/t-elf mips/t-sb1"
1609169689Skan	target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1610169689Skan	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
1611132718Skan	use_fixproto=yes
161290075Sobrien	;;
1613117395Skanmips-*-elf* | mipsel-*-elf*)
1614169689Skan	tm_file="elfos.h ${tm_file} mips/elf.h"
161590075Sobrien	tmake_file=mips/t-elf
1616132718Skan	use_fixproto=yes
161790075Sobrien	;;
1618117395Skanmips64-*-elf* | mips64el-*-elf*)
1619169689Skan	tm_file="elfos.h ${tm_file} mips/elf.h"
162090075Sobrien	tmake_file=mips/t-elf
1621169689Skan	target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1622169689Skan	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1623132718Skan	use_fixproto=yes
162490075Sobrien	;;
1625117395Skanmips64vr-*-elf* | mips64vrel-*-elf*)
1626169689Skan        tm_file="mips/vr.h elfos.h ${tm_file} mips/elf.h"
1627117395Skan        tmake_file=mips/t-vr
1628132718Skan	use_fixproto=yes
1629117395Skan        ;;
1630117395Skanmips64orion-*-elf* | mips64orionel-*-elf*)
1631169689Skan	tm_file="elfos.h ${tm_file} mips/elforion.h mips/elf.h"
163290075Sobrien	tmake_file=mips/t-elf
1633169689Skan	target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1634169689Skan	tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1635132718Skan	use_fixproto=yes
163690075Sobrien	;;
163790075Sobrienmips*-*-rtems*)
1638169689Skan	tm_file="elfos.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
1639122180Skan	tmake_file="mips/t-elf t-rtems mips/t-rtems"
164090075Sobrien	;;
1641132718Skanmips-wrs-vxworks)
1642132718Skan	# We want vxworks.h after mips/elf.h, which unfortunately means we
1643132718Skan	# have to redo the tm_file list from scratch.
1644132718Skan	tm_file="elfos.h mips/mips.h svr4.h mips/elf.h vxworks.h mips/vxworks.h"
1645132718Skan	tmake_file="${tmake_file} mips/t-vxworks"
1646132718Skan	;;
1647132718Skanmips-wrs-windiss)	# Instruction-level simulator for VxWorks.
1648132718Skan	xm_defines=POSIX
1649132718Skan	tm_file="elfos.h mips/mips.h svr4.h mips/elf.h windiss.h mips/windiss.h"
1650132718Skan	tmake_file="${tmake_file} mips/t-elf"
1651132718Skan	thread_file=
1652132718Skan	;;
1653117395Skanmipstx39-*-elf* | mipstx39el-*-elf*)
1654169689Skan	tm_file="elfos.h ${tm_file} mips/r3900.h mips/elf.h"
165590075Sobrien	tmake_file=mips/t-r3900
1656132718Skan	use_fixproto=yes
165790075Sobrien	;;
165890075Sobrienmmix-knuth-mmixware)
1659132718Skan	need_64bit_hwint=yes
166090075Sobrien	;;
166190075Sobrienmn10300-*-*)
166290075Sobrien	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
166390075Sobrien	if test x$stabs = xyes
166490075Sobrien	then
166590075Sobrien		tm_file="${tm_file} dbx.h"
166690075Sobrien	fi
166790075Sobrien	use_collect2=no
1668132718Skan	use_fixproto=yes
166990075Sobrien	;;
1670169689Skanmt-*-elf)
1671169689Skan        tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
1672169689Skan        tmake_file="${tmake_file} mt/t-mt"
1673169689Skan        ;;
167496263Sobrienns32k-*-netbsdelf*)
1675132718Skan	echo "GCC does not yet support the ${target} target"; exit 1
167696263Sobrien	;;
167790075Sobrienns32k-*-netbsd*)
1678117395Skan	tm_file="${tm_file} netbsd.h netbsd-aout.h ns32k/netbsd.h"
167990075Sobrien	# On NetBSD, the headers are already okay, except for math.h.
1680117395Skan	tmake_file="t-netbsd ns32k/t-ns32k"
1681117395Skan	extra_parts=""
168290075Sobrien	use_collect2=yes
168390075Sobrien	;;
168490075Sobrienpdp11-*-bsd)
168590075Sobrien	tm_file="${tm_file} pdp11/2bsd.h"
1686132718Skan	use_fixproto=yes
168790075Sobrien        ;;
168890075Sobrienpdp11-*-*)
1689132718Skan	use_fixproto=yes
169090075Sobrien	;;
1691132718Skan# port not yet contributed
1692132718Skan#powerpc-*-openbsd*)
1693169689Skan#	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
1694132718Skan#	extra_headers=
1695132718Skan#	;;
169690075Sobrienpowerpc64-*-linux*)
1697146895Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1698146895Skan	test x$with_cpu != x || cpu_is_64bit=yes
1699146895Skan	test x$cpu_is_64bit != xyes || tm_file="${tm_file} rs6000/default64.h"
1700146895Skan	tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
1701169689Skan	if test x${enable_secureplt} = xyes; then
1702169689Skan		tm_file="rs6000/secureplt.h ${tm_file}"
1703169689Skan	fi
1704169689Skan	extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
1705169689Skan	tmake_file="t-dfprules rs6000/t-fprules ${tmake_file} rs6000/t-ppccomm rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp"
170690075Sobrien	;;
170796263Sobrienpowerpc64-*-gnu*)
170896263Sobrien	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"
1709169689Skan	extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt"
1710169689Skan	tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-gnu rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp"
171196263Sobrien	;;
171290075Sobrienpowerpc-*-beos*)
171390075Sobrien	tm_file="${tm_file} rs6000/aix.h rs6000/beos.h rs6000/xcoff.h"
1714169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-beos"
171590075Sobrien	extra_headers=
1716132718Skan	use_fixproto=yes
171790075Sobrien	;;
171890075Sobrienpowerpc-*-darwin*)
1719169689Skan	extra_options="${extra_options} rs6000/darwin.opt"
1720169689Skan	extra_parts="crt2.o"
1721169689Skan	case ${target} in
1722169689Skan	  *-darwin1[0-9]* | *-darwin[8-9]*)
1723169689Skan	    tmake_file="${tmake_file} rs6000/t-darwin8"
1724169689Skan	    tm_file="${tm_file} rs6000/darwin8.h"
1725169689Skan	    ;;
1726169689Skan	  *-darwin7*)
1727169689Skan	    tm_file="${tm_file} rs6000/darwin7.h"
1728169689Skan	    ;;
1729169689Skan	  *-darwin[0-6]*)
1730169689Skan	    ;;
1731169689Skan	esac
173290075Sobrien	extra_headers=altivec.h
173390075Sobrien	;;
1734169689Skanpowerpc64-*-darwin*)
1735169689Skan	tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
1736169689Skan	extra_options="${extra_options} ${cpu_type}/darwin.opt"
1737169689Skan	# We're omitting t-darwin8 to avoid building any multilibs
1738169689Skan	extra_headers=altivec.h
1739169689Skan	;;
174090075Sobrienpowerpc*-*-freebsd*)
174190075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
1742169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1743169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
174490075Sobrien	;;
174590075Sobrienpowerpc-*-netbsd*)
1746117395Skan	tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
1747117395Skan	tmake_file="${tmake_file} rs6000/t-netbsd"
1748169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
174990075Sobrien	;;
175090075Sobrienpowerpc-*-chorusos*)
175190075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h chorus.h"
1752169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos rs6000/t-ppccomm"
1753169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1754132718Skan	case ${enable_threads} in
1755132718Skan	  yes | posix)
1756132718Skan	    thread_file='posix'
1757132718Skan	    ;;
175890075Sobrien	esac
1759132718Skan	use_fixproto=yes
176090075Sobrien	;;
1761117395Skanpowerpc-*-eabispe*)
1762117395Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabispe.h"
1763169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1764132718Skan	tmake_file="rs6000/t-spe rs6000/t-ppccomm"
1765117395Skan	;;
176690075Sobrienpowerpc-*-eabisimaltivec*)
176790075Sobrien	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"
1768169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1769169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
177090075Sobrien	;;
177190075Sobrienpowerpc-*-eabisim*)
177290075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
1773169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1774169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
177590075Sobrien	;;
177690075Sobrienpowerpc-*-elf*)
177790075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1778169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1779169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1780132718Skan	use_fixproto=yes
178190075Sobrien	;;
178290075Sobrienpowerpc-*-eabialtivec*)
178390075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
1784169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1785169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
178690075Sobrien	;;
178790075Sobrienpowerpc-*-eabi*)
178890075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h"
1789169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1790169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
179190075Sobrien	;;
179290075Sobrienpowerpc-*-rtems*)
179396263Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
1794169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1795169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
179690075Sobrien	;;
1797132718Skanpowerpc-*-linux*altivec*)
179890075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h"
1799169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1800169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
180190075Sobrien	;;
1802132718Skanpowerpc-*-linux*spe*)
1803132718Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
1804169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1805169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1806132718Skan	;;
180790075Sobrienpowerpc-*-linux*)
1808146895Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1809169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1810169689Skan	tmake_file="t-dfprules rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1811146895Skan	case ${enable_targets}:${cpu_is_64bit} in
1812146895Skan	    *powerpc64* | all:* | *:yes)
1813146895Skan		if test x$cpu_is_64bit = xyes; then
1814146895Skan		    tm_file="${tm_file} rs6000/default64.h"
1815146895Skan		fi
1816146895Skan		tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h"
1817146895Skan		tmake_file="$tmake_file rs6000/t-linux64"
1818169689Skan		extra_options="${extra_options} rs6000/linux64.opt"
1819146895Skan		;;
1820146895Skan	    *)
1821146895Skan		tm_file="${tm_file} rs6000/linux.h"
1822146895Skan		;;
1823146895Skan	esac
1824169689Skan	if test x${enable_secureplt} = xyes; then
1825169689Skan		tm_file="rs6000/secureplt.h ${tm_file}"
1826169689Skan	fi
182790075Sobrien	;;
182896263Sobrienpowerpc-*-gnu-gnualtivec*)
182996263Sobrien	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"
1830169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1831169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
183296263Sobrien	if test x$enable_threads = xyes; then
183396263Sobrien		thread_file='posix'
183496263Sobrien	fi
183596263Sobrien	;;
183696263Sobrienpowerpc-*-gnu*)
183796263Sobrien	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"
1838169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
1839169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
184096263Sobrien	if test x$enable_threads = xyes; then
184196263Sobrien		thread_file='posix'
184296263Sobrien	fi
184396263Sobrien	;;
1844169689Skanpowerpc-wrs-vxworks|powerpc-wrs-vxworksae)
1845132718Skan	# We want vxworks.h after rs6000/sysv4.h, which unfortunately
1846132718Skan	# means we have to redo the tm_file list from scratch.
1847132718Skan	tm_file="rs6000/rs6000.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1848169689Skan	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks"
1849169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1850132718Skan	extra_headers=ppc-asm.h
1851169689Skan	case ${target} in
1852169689Skan	  *-vxworksae*)
1853169689Skan	    tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/vxworksae.h"
1854169689Skan	    tmake_file="${tmake_file} rs6000/t-vxworksae"
1855169689Skan	    ;;
1856169689Skan	  *-vxworks*)
1857169689Skan	    tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h"
1858169689Skan	    ;;
1859169689Skan	esac
1860132718Skan	;;
1861169689Skanpowerpc-wrs-windiss*)  # Instruction-level simulator for VxWorks.
1862117395Skan	tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/windiss.h"
1863169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1864169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1865169689Skan	thread_file=""
1866132718Skan	use_fixproto=yes
1867169689Skan	;;
1868169689Skanpowerpc-*-lynxos*)
1869169689Skan	xm_defines=POSIX
1870169689Skan	tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
1871169689Skan	tmake_file="t-lynx rs6000/t-lynx"
1872169689Skan	extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
1873169689Skan	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1874169689Skan	extra_options="${extra_options} lynx.opt"
1875169689Skan	thread_file=lynx
1876169689Skan	gnu_ld=yes
1877169689Skan	gas=yes
1878169689Skan	;;
187990075Sobrienpowerpcle-*-sysv*)
188090075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
1881169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos rs6000/t-ppccomm"
1882169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1883132718Skan	use_fixproto=yes
188490075Sobrien	;;
188590075Sobrienpowerpcle-*-elf*)
188690075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
1887169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1888169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
1889132718Skan	use_fixproto=yes
189090075Sobrien	;;
189190075Sobrienpowerpcle-*-eabisim*)
189290075Sobrien	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"
1893169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1894169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
189590075Sobrien	;;
189690075Sobrienpowerpcle-*-eabi*)
189790075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
1898169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1899169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
190090075Sobrien	;;
1901132718Skanpowerpc-*-kaos*)
1902132718Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h kaos.h rs6000/kaos-ppc.h"
1903169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1904169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
190590075Sobrien	;;
1906132718Skanpowerpcle-*-kaos*)
1907132718Skan	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"
1908169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
1909169689Skan	extra_options="${extra_options} rs6000/sysv4.opt"
191090075Sobrien	;;
191190075Sobrienrs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
191290075Sobrien	tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h"
1913169689Skan	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-newas"
1914169689Skan	extra_options="${extra_options} rs6000/aix41.opt"
191590075Sobrien	use_collect2=yes
191690075Sobrien	extra_headers=
1917132718Skan	use_fixproto=yes
191890075Sobrien	;;
191990075Sobrienrs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
1920132718Skan	tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h"
192190075Sobrien	tmake_file=rs6000/t-aix43
1922169689Skan	extra_options="${extra_options} rs6000/aix64.opt"
192390075Sobrien	use_collect2=yes
192490075Sobrien	thread_file='aix'
192590075Sobrien	extra_headers=
192690075Sobrien	;;
1927117395Skanrs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
1928132718Skan	tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h"
1929169689Skan	extra_options="${extra_options} rs6000/aix64.opt"
193090075Sobrien	tmake_file=rs6000/t-aix43
193190075Sobrien	use_collect2=yes
193290075Sobrien	thread_file='aix'
193390075Sobrien	extra_headers=
193490075Sobrien	;;
1935117395Skanrs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
1936117395Skan	tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h"
1937117395Skan	tmake_file=rs6000/t-aix52
1938169689Skan	extra_options="${extra_options} rs6000/aix64.opt"
1939117395Skan	use_collect2=yes
1940117395Skan	thread_file='aix'
1941117395Skan	extra_headers=
1942117395Skan	;;
194390075Sobriens390-*-linux*)
194490075Sobrien	tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
1945169689Skan	tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux"
194690075Sobrien	;;
194790075Sobriens390x-*-linux*)
194896263Sobrien	tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
194990075Sobrien	tm_p_file=s390/s390-protos.h
195090075Sobrien	md_file=s390/s390.md
1951117395Skan	extra_modes=s390/s390-modes.def
195290075Sobrien	out_file=s390/s390.c
1953169689Skan	tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux s390/t-linux64"
195490075Sobrien	;;
1955132718Skans390x-ibm-tpf*)
1956169689Skan        tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h s390/tpf.h"
1957169689Skan        tm_p_file=s390/s390-protos.h
1958169689Skan        md_file=s390/s390.md
1959169689Skan        extra_modes=s390/s390-modes.def
1960169689Skan        out_file=s390/s390.c
1961169689Skan        extra_parts="crtbeginS.o crtendS.o"
1962169689Skan        tmake_file="s390/t-crtstuff s390/t-tpf"
1963169689Skan        thread_file='tpf'
1964169689Skan	extra_options="${extra_options} s390/tpf.opt"
1965132718Skan	;;
1966169689Skanscore-*-elf)
1967169689Skan        tm_file="dbxelf.h elfos.h score/elf.h score/score.h"
1968169689Skan        tmake_file=score/t-score-elf
1969169689Skan        extra_objs="score-mdaux.o"
1970169689Skan        ;;
1971169689Skansh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
1972169689Skansh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
1973169689Skan  sh-*-linux* | sh[346lbe]*-*-linux* | \
1974169689Skan  sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
1975169689Skan   sh64-*-netbsd* | sh64l*-*-netbsd*)
1976169689Skan	tmake_file="${tmake_file} sh/t-sh sh/t-elf"
1977169689Skan	if test x${with_endian} = x; then
1978169689Skan		case ${target} in
1979169689Skan		sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
1980169689Skan		shbe-*-* | sheb-*-*)		   with_endian=big,little ;;
1981169689Skan		sh[1234]l* | sh[34]*-*-linux*)	   with_endian=little ;;
1982169689Skan		shl* | sh64l* | sh*-*-linux* | \
1983169689Skan		  sh5l* | sh-superh-elf)	   with_endian=little,big ;;
1984169689Skan		sh[1234]*-*-*)			   with_endian=big ;;
1985169689Skan		*)				   with_endian=big,little ;;
1986169689Skan		esac
1987169689Skan	fi
1988169689Skan	case ${with_endian} in
1989169689Skan	big|little)	tmake_file="${tmake_file} sh/t-1e" ;;
1990169689Skan	big,little|little,big) ;;
1991169689Skan	*)	echo "with_endian=${with_endian} not supported."; exit 1 ;;
1992169689Skan	esac
1993169689Skan	case ${with_endian} in
1994169689Skan	little*)	tm_file="sh/little.h ${tm_file}" ;;
1995169689Skan	esac
1996169689Skan	tm_file="${tm_file} dbxelf.h elfos.h"
1997132718Skan	case ${target} in
1998169689Skan	sh*-*-netbsd*)	;;
1999169689Skan	*)		tm_file="${tm_file} svr4.h" ;;
2000117395Skan	esac
2001169689Skan	tm_file="${tm_file} sh/elf.h"
2002132718Skan	case ${target} in
2003169689Skan	sh*-*-linux*)	tmake_file="${tmake_file} sh/t-linux"
2004169689Skan			tm_file="${tm_file} linux.h sh/linux.h" ;;
2005169689Skan	sh*-*-kaos*)	tm_file="${tm_file} sh/embed-elf.h kaos.h sh/kaos-sh.h"
2006169689Skan			;;
2007169689Skan	sh*-*-netbsd*)	tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h" ;;
2008169689Skan	sh*-superh-elf)	if test x$with_libgloss != xno; then
2009169689Skan				with_libgloss=yes
2010169689Skan				tm_file="${tm_file} sh/newlib.h"
2011169689Skan			fi
2012169689Skan			tm_file="${tm_file} sh/embed-elf.h"
2013169689Skan			extra_options="${extra_options} sh/superh.opt" ;;
2014169689Skan	*)		if test x$with_newlib = xyes \
2015169689Skan			   && test x$with_libgloss = xyes; then
2016169689Skan				tm_file="${tm_file} sh/newlib.h"
2017169689Skan			fi
2018169689Skan			tm_file="${tm_file} sh/embed-elf.h" ;;
2019169689Skan	esac
2020169689Skan	case ${target} in
2021169689Skan	sh5*-*-netbsd*)
2022169689Skan		# SHmedia, 32-bit ABI
2023169689Skan		tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd"
2024169689Skan		;;
2025169689Skan	sh64*-netbsd*)
2026169689Skan		# SHmedia, 64-bit ABI
2027169689Skan		tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd sh/t-netbsd-sh5-64"
2028169689Skan		;;
2029169689Skan	*-*-netbsd)
2030169689Skan                tmake_file="${tmake_file} sh/t-netbsd"
2031169689Skan		;;
2032169689Skan	sh64*-*-linux*)
2033169689Skan		tmake_file="${tmake_file} sh/t-sh64 sh/t-linux64"
2034169689Skan		tm_file="${tm_file} sh/sh64.h"
2035169689Skan		extra_headers="shmedia.h ushmedia.h sshmedia.h"
2036169689Skan		;;
2037117395Skan	sh64*)
2038117395Skan		tmake_file="${tmake_file} sh/t-sh64"
2039117395Skan		tm_file="${tm_file} sh/sh64.h"
2040117395Skan		extra_headers="shmedia.h ushmedia.h sshmedia.h"
2041117395Skan		;;
2042169689Skan	*-*-symbianelf*)
2043169689Skan		tmake_file="sh/t-symbian"
2044169689Skan		tm_file="sh/symbian-pre.h sh/little.h ${tm_file} sh/symbian-post.h"
2045169689Skan		extra_objs="symbian.o"
2046169689Skan		extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
2047169689Skan		;;
2048117395Skan	esac
2049169689Skan	# sed el/eb endian suffixes away to avoid confusion with sh[23]e
2050169689Skan	case `echo ${target} | sed 's/e[lb]-/-/'` in
2051169689Skan	sh64*-*-netbsd*)	sh_cpu_target=sh5-64media ;;
2052169689Skan	sh64* | sh5*-*-netbsd*)	sh_cpu_target=sh5-32media ;;
2053169689Skan	sh4a_single_only*)	sh_cpu_target=sh4a-single-only ;;
2054169689Skan	sh4a_single*)		sh_cpu_target=sh4a-single ;;
2055169689Skan	sh4a_nofpu*)		sh_cpu_target=sh4a-nofpu ;;
2056169689Skan	sh4al)			sh_cpu_target=sh4al ;;
2057169689Skan	sh4a*)			sh_cpu_target=sh4a ;;
2058169689Skan	sh4_single_only*)	sh_cpu_target=sh4-single-only ;;
2059169689Skan	sh4_single*)		sh_cpu_target=sh4-single ;;
2060169689Skan	sh4_nofpu*)		sh_cpu_target=sh4-nofpu ;;
2061169689Skan	sh4* | sh-superh-*)	sh_cpu_target=sh4 ;;
2062169689Skan	sh3e*)			sh_cpu_target=sh3e ;;
2063169689Skan	sh*-*-netbsd* | sh3*)	sh_cpu_target=sh3 ;;
2064169689Skan	sh2a_single_only*)	sh_cpu_target=sh2a-single-only ;;
2065169689Skan	sh2a_single*)		sh_cpu_target=sh2a-single ;;
2066169689Skan	sh2a_nofpu*)		sh_cpu_target=sh2a-nofpu ;;
2067169689Skan	sh2a*)			sh_cpu_target=sh2a ;;
2068169689Skan	sh2e*)			sh_cpu_target=sh2e ;;
2069169689Skan	sh2*)			sh_cpu_target=sh2 ;;
2070169689Skan	*)			sh_cpu_target=sh1 ;;
2071117395Skan	esac
2072169689Skan	# did the user say --without-fp ?
2073169689Skan	if test x$with_fp = xno; then
2074169689Skan		case ${sh_cpu_target} in
2075169689Skan		sh5-*media)	sh_cpu_target=${sh_cpu_target}-nofpu ;;
2076169689Skan		sh4al | sh1)	;;
2077169689Skan		sh4a* )		sh_cpu_target=sh4a-nofpu ;;
2078169689Skan		sh4*)		sh_cpu_target=sh4-nofpu ;;
2079169689Skan		sh3*)		sh_cpu_target=sh3 ;;
2080169689Skan		sh2a*)		sh_cpu_target=sh2a-nofpu ;;
2081169689Skan		sh2*)		sh_cpu_target=sh2 ;;
2082169689Skan		*)	echo --without-fp not available for $target: ignored
2083169689Skan		esac
2084169689Skan		tm_defines="$tm_defines STRICT_NOFPU=1"
2085169689Skan	fi
2086169689Skan	sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2087169689Skan	case $sh_cpu_default in
2088169689Skan	sh5-64media-nofpu | sh5-64media | \
2089169689Skan	  sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2090169689Skan	  sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2091169689Skan	  sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2092169689Skan	  sh4-single-only | sh4-single | sh4-nofpu | sh4 | \
2093169689Skan	  sh3e | sh3 | sh2e | sh2 | sh1) ;;
2094169689Skan	"")	sh_cpu_default=${sh_cpu_target} ;;
2095169689Skan	*)	echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2096132718Skan	esac
2097169689Skan	sh_multilibs=${with_multilib_list}
2098169689Skan	if test x${sh_multilibs} = x ; then
2099169689Skan		case ${target} in
2100169689Skan		sh64-superh-linux* | \
2101169689Skan		sh[1234]*)	sh_multilibs=${sh_cpu_target} ;;
2102169689Skan		sh64* | sh5*)	sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2103169689Skan		sh-superh-*)	sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2104169689Skan		sh*-*-linux*)	sh_multilibs=m1,m3e,m4 ;;
2105169689Skan		sh*-*-netbsd*)	sh_multilibs=m3,m3e,m4 ;;
2106169689Skan		*) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2107169689Skan		esac
2108169689Skan		if test x$with_fp = xno; then
2109169689Skan			sh_multilibs="`echo $sh_multilibs|sed -e s/m4/sh4-nofpu/ -e s/,m4-[^,]*//g -e s/,m[23]e// -e s/m2a,m2a-single/m2a-nofpu/ -e s/m5-..m....,//g`"
2110169689Skan		fi
2111169689Skan	fi
2112169689Skan	target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2113169689Skan	tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2114169689Skan	sh_multilibs=`echo $sh_multilibs,$sh_cpu_default | sed -e 's/[ 	,/][ 	,]*/ /g' -e 's/ $//' -e 's/^m/sh/' -e 's/ m/ sh/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2115169689Skan	for sh_multilib in ${sh_multilibs}; do
2116169689Skan		case ${sh_multilib} in
2117169689Skan		sh1 | sh2 | sh2e | sh3 | sh3e | \
2118169689Skan		sh4 | sh4-single | sh4-single-only | sh4-nofpu | \
2119169689Skan		sh4a | sh4a-single | sh4a-single-only | sh4a-nofpu | sh4al | \
2120169689Skan		sh2a | sh2a-single | sh2a-single-only | sh2a-nofpu | \
2121169689Skan		sh5-64media | sh5-64media-nofpu | \
2122169689Skan		sh5-32media | sh5-32media-nofpu | \
2123169689Skan		sh5-compact | sh5-compact-nofpu)
2124169689Skan			tmake_file="${tmake_file} sh/t-mlib-${sh_multilib}"
2125169689Skan			tm_defines="$tm_defines SUPPORT_`echo $sh_multilib|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2126169689Skan			;;
2127169689Skan		*)
2128169689Skan			echo "with_multilib_list=${sh_multilib} not supported."
2129169689Skan			exit 1
2130169689Skan			;;
2131169689Skan		esac
2132169689Skan	done
2133169689Skan	if test x${enable_incomplete_targets} = xyes ; then
2134169689Skan		tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1 SUPPORT_SH5_32MEDIA=1 SUPPORT_SH5_32MEDIA_NOFPU=1 SUPPORT_SH5_64MEDIA=1 SUPPORT_SH5_64MEDIA_NOFPU=1"
2135169689Skan	fi
2136132718Skan	use_fixproto=yes
213790075Sobrien	;;
2138132718Skansh-*-rtemscoff*)
2139169689Skan	tmake_file="sh/t-sh t-rtems sh/t-rtems"
2140132718Skan	tm_file="${tm_file} dbxcoff.h sh/coff.h sh/rtems.h rtems.h"
214190075Sobrien	;;
214290075Sobriensh-*-rtems*)
2143169689Skan	tmake_file="sh/t-sh sh/t-elf t-rtems sh/t-rtems"
2144132718Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
214590075Sobrien	;;
2146132718Skansh-wrs-vxworks)
2147132718Skan	tmake_file="$tmake_file sh/t-sh sh/t-elf sh/t-vxworks"
2148132718Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/vxworks.h"
2149132718Skan	;;
215090075Sobriensh-*-*)
2151132718Skan	tm_file="${tm_file} dbxcoff.h sh/coff.h"
2152132718Skan	use_fixproto=yes
215390075Sobrien	;;
215496263Sobriensparc-*-netbsdelf*)
2155169689Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2156169689Skan	extra_options="${extra_options} sparc/long-double-switch.opt"
215796263Sobrien	;;
2158102780Skansparc64-*-openbsd*)
2159169689Skan	tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
2160169689Skan	extra_options="${extra_options} sparc/little-endian.opt"
2161102780Skan	gas=yes gnu_ld=yes
2162102780Skan	with_cpu=ultrasparc
2163102780Skan	;;
216490075Sobriensparc-*-elf*)
2165169689Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h"
216696263Sobrien	tmake_file="sparc/t-elf sparc/t-crtfm"
216790075Sobrien	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2168132718Skan	use_fixproto=yes
216990075Sobrien	;;
2170117395Skansparc-*-linux*)		# SPARC's running GNU/Linux, libc6
217190075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
2172169689Skan	extra_options="${extra_options} sparc/long-double-switch.opt"
2173169689Skan	tmake_file="${tmake_file} sparc/t-linux sparc/t-crtfm"
217490075Sobrien	;;
2175117395Skansparc-*-rtems*)
2176169689Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
217796263Sobrien	tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
217890075Sobrien	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
217990075Sobrien	;;
218096263Sobriensparc64-*-solaris2* | sparcv9-*-solaris2*)
2181169689Skan	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
2182169689Skan	case ${target} in
2183169689Skan	*-*-solaris2.1[0-9]*)
2184169689Skan		tm_file="${tm_file} sol2-10.h"
2185169689Skan		;;
2186169689Skan	esac
2187169689Skan	tm_file="${tm_file} sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h"
218896263Sobrien	if test x$gnu_ld = xyes; then
218996263Sobrien		tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
219090075Sobrien	fi
219196263Sobrien	if test x$gas = xyes; then
2192169689Skan		tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
219396263Sobrien	fi
2194169689Skan	tm_file="${tm_file} tm-dwarf2.h"
2195169689Skan	tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
219690075Sobrien	if test x$gnu_ld = xyes; then
219790075Sobrien		tmake_file="$tmake_file t-slibgcc-elf-ver"
219890075Sobrien	else
219990075Sobrien		tmake_file="$tmake_file t-slibgcc-sld"
220090075Sobrien	fi
2201169689Skan	c_target_objs="sol2-c.o"
2202169689Skan	cxx_target_objs="sol2-c.o"
2203169689Skan	extra_objs="sol2.o"
2204169689Skan	tm_p_file="${tm_p_file} sol2-protos.h"
220590075Sobrien	extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
2206169689Skan	case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
2207169689Skan	  "":yes:* | yes:yes:* ) thread_file=posix ;;
2208169689Skan	  "":*:yes | yes:*:yes ) thread_file=solaris ;;
2209169689Skan	esac
2210132718Skan	need_64bit_hwint=yes
221190075Sobrien	;;
221290075Sobriensparc-*-solaris2*)
2213169689Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h"
2214169689Skan	case ${target} in
2215169689Skan	*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
2216169689Skan		tm_file="${tm_file} sol2-6.h"
2217169689Skan		;;
2218169689Skan	*-*-solaris2.1[0-9]*)
2219169689Skan		tm_file="${tm_file} sol2-10.h"
2220169689Skan		;;
2221169689Skan	esac
2222169689Skan	tm_file="${tm_file} sparc/sol2.h"
222396263Sobrien	if test x$gnu_ld = xyes; then
222496263Sobrien		tm_file="${tm_file} sparc/sol2-gld.h"
222590075Sobrien	fi
2226169689Skan	if test x$gas = xyes; then
2227169689Skan		tm_file="${tm_file} sparc/sol2-gas.h"
2228169689Skan	fi
2229169689Skan	tmake_file="t-sol2 sparc/t-sol2 sparc/t-crtfm"
223090075Sobrien	if test x$gnu_ld = xyes; then
223190075Sobrien		tmake_file="$tmake_file t-slibgcc-elf-ver"
223290075Sobrien	else
223390075Sobrien		tmake_file="$tmake_file t-slibgcc-sld"
223490075Sobrien	fi
2235132718Skan	case ${target} in
2236117395Skan	*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
2237117395Skan		if test x$gnu_ld = xno; then
2238117395Skan			tm_file="${tm_file} sparc/sol26-sld.h"
2239117395Skan		fi
2240117395Skan		;;
2241169689Skan	*-*-solaris2.[789] | *-*-solaris2.1[0-9]*)
224296263Sobrien		tm_file="sparc/biarch64.h ${tm_file} sparc/sol2-bi.h"
224396263Sobrien		if test x$gnu_ld = xyes; then
224496263Sobrien			tm_file="${tm_file} sparc/sol2-gld-bi.h"
224590075Sobrien		fi
224696263Sobrien		if test x$gas = xyes; then
224796263Sobrien			tm_file="${tm_file} sparc/sol2-gas-bi.h"
224896263Sobrien		fi
2249169689Skan		tm_file="${tm_file} tm-dwarf2.h"
225090075Sobrien		tmake_file="$tmake_file sparc/t-sol2-64"
2251132718Skan		need_64bit_hwint=yes
2252169689Skan		test x$with_cpu != x || with_cpu=v9
225390075Sobrien		;;
225490075Sobrien	esac
2255169689Skan	c_target_objs="sol2-c.o"
2256169689Skan	cxx_target_objs="sol2-c.o"
2257169689Skan	extra_objs="sol2.o"
2258169689Skan	tm_p_file="${tm_p_file} sol2-protos.h"
225996263Sobrien	extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2260169689Skan	case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
2261169689Skan	  "":yes:* | yes:yes:* )
2262169689Skan		case ${target} in
2263169689Skan		  *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
2264169689Skan			thread_file=posix95
2265169689Skan			;;
2266169689Skan		  *)
2267169689Skan			thread_file=posix
2268169689Skan			;;
2269169689Skan		esac
2270169689Skan		;;
2271169689Skan	  "":*:yes | yes:*:yes )
2272169689Skan		thread_file=solaris
2273169689Skan		;;
2274169689Skan	esac
227590075Sobrien	;;
227690075Sobriensparc-*-sysv4*)
2277132718Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sysv4-only.h"
227890075Sobrien	tmake_file=t-svr4
227990075Sobrien	extra_parts="crtbegin.o crtend.o"
2280132718Skan	use_fixproto=yes
228190075Sobrien	;;
228290075Sobriensparc64-*-elf*)
2283169689Skan	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h"
2284169689Skan	extra_options="${extra_options} sparc/little-endian.opt"
228596263Sobrien	tmake_file="${tmake_file} sparc/t-crtfm"
228690075Sobrien	extra_parts="crtbegin.o crtend.o"
2287132718Skan	use_fixproto=yes
228890075Sobrien	;;
228990075Sobriensparc64-*-freebsd*|ultrasparc-*-freebsd*)
229090075Sobrien	tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2291169689Skan	extra_options="${extra_options} sparc/long-double-switch.opt"
229296263Sobrien	tmake_file="${tmake_file} sparc/t-crtfm"
229390075Sobrien	case "x$with_cpu" in
229496263Sobrien		xultrasparc) ;;
229590075Sobrien		x) with_cpu=ultrasparc ;;
229690075Sobrien		*) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
229790075Sobrien	esac
2298132718Skan	need_64bit_hwint=yes
229990075Sobrien	;;
2300117395Skansparc64-*-linux*)		# 64-bit SPARC's running GNU/Linux
230190075Sobrien	tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
2302169689Skan	extra_options="${extra_options} sparc/long-double-switch.opt"
2303169689Skan	tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm"
230490075Sobrien	;;
230596263Sobriensparc64-*-netbsd*)
230696263Sobrien	tm_file="sparc/biarch64.h ${tm_file}"
230796263Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2308169689Skan	extra_options="${extra_options} sparc/long-double-switch.opt"
2309169689Skan	tmake_file="${tmake_file} sparc/t-netbsd64"
231096263Sobrien	;;
231190075Sobrienstrongarm-*-elf*)
231290075Sobrien	tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
2313169689Skan	tmake_file="arm/t-arm arm/t-strongarm-elf"
231490075Sobrien	out_file=arm/arm.c
231590075Sobrien	md_file=arm/arm.md
2316117395Skan	extra_modes=arm/arm-modes.def
2317132718Skan	use_fixproto=yes
231890075Sobrien	;;
2319132718Skanstrongarm-*-pe)
2320132718Skan	tm_file="arm/semi.h arm/aout.h arm/coff.h dbxcoff.h arm/strongarm-coff.h arm/arm.h arm/pe.h arm/strongarm-pe.h"
2321169689Skan	tmake_file="arm/t-arm arm/t-strongarm-pe"
232290075Sobrien	out_file=arm/arm.c
232390075Sobrien	md_file=arm/arm.md
2324117395Skan	extra_modes=arm/arm-modes.def
2325169689Skan	extra_options="${extra_options} arm/pe.opt"
2326132718Skan	extra_objs=pe.o
2327132718Skan	use_fixproto=yes
232890075Sobrien	;;
2329132718Skanstrongarm-*-kaos*)
2330132718Skan	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"
2331169689Skan	tmake_file="arm/t-arm arm/t-strongarm-elf"
233290075Sobrien	out_file=arm/arm.c
233390075Sobrien	md_file=arm/arm.md
2334117395Skan	extra_modes=arm/arm-modes.def
233590075Sobrien	;;
2336132718Skanv850e1-*-*)
2337132718Skan	target_cpu_default="TARGET_CPU_v850e1"
2338132718Skan	tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
2339132718Skan	tm_p_file=v850/v850-protos.h
2340132718Skan	tmake_file=v850/t-v850e
2341132718Skan	md_file=v850/v850.md
2342132718Skan	out_file=v850/v850.c
2343169689Skan	extra_options="${extra_options} v850/v850.opt"
234490075Sobrien	if test x$stabs = xyes
234590075Sobrien	then
234690075Sobrien		tm_file="${tm_file} dbx.h"
234790075Sobrien	fi
234890075Sobrien	use_collect2=no
234990075Sobrien	c_target_objs="v850-c.o"
235090075Sobrien	cxx_target_objs="v850-c.o"
2351132718Skan	use_fixproto=yes
235290075Sobrien	;;
2353117395Skanv850e-*-*)
2354117395Skan	target_cpu_default="TARGET_CPU_v850e"
2355117395Skan	tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
2356117395Skan	tm_p_file=v850/v850-protos.h
2357132718Skan	tmake_file=v850/t-v850e
2358117395Skan	md_file=v850/v850.md
2359117395Skan	out_file=v850/v850.c
2360169689Skan	extra_options="${extra_options} v850/v850.opt"
2361117395Skan	if test x$stabs = xyes
2362117395Skan	then
2363117395Skan		tm_file="${tm_file} dbx.h"
2364117395Skan	fi
2365117395Skan	use_collect2=no
2366117395Skan	c_target_objs="v850-c.o"
2367117395Skan	cxx_target_objs="v850-c.o"
2368132718Skan	use_fixproto=yes
2369117395Skan	;;
237090075Sobrienv850-*-*)
237190075Sobrien	target_cpu_default="TARGET_CPU_generic"
237290075Sobrien	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
237390075Sobrien	tmake_file=v850/t-v850
237490075Sobrien	if test x$stabs = xyes
237590075Sobrien	then
237690075Sobrien		tm_file="${tm_file} dbx.h"
237790075Sobrien	fi
237890075Sobrien	use_collect2=no
237990075Sobrien	c_target_objs="v850-c.o"
238090075Sobrien	cxx_target_objs="v850-c.o"
2381132718Skan	use_fixproto=yes
238290075Sobrien	;;
238390075Sobrienvax-*-bsd*)			# VAXen running BSD
2384117395Skan	tm_file="${tm_file} vax/bsd.h"
2385169689Skan	tmake_file=vax/t-memfuncs
238690075Sobrien	use_collect2=yes
2387132718Skan	use_fixproto=yes
238890075Sobrien	;;
238990075Sobrienvax-*-sysv*)			# VAXen running system V
239090075Sobrien	tm_file="${tm_file} vax/vaxv.h"
2391169689Skan	tmake_file=vax/t-memfuncs
2392132718Skan	use_fixproto=yes
239390075Sobrien	;;
239496263Sobrienvax-*-netbsdelf*)
2395117395Skan	tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
239696263Sobrien	;;
239790075Sobrienvax-*-netbsd*)
239890075Sobrien	tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
239990075Sobrien	tmake_file=t-netbsd
2400117395Skan	extra_parts=""
240190075Sobrien	use_collect2=yes
240290075Sobrien	;;
240390075Sobrienvax-*-openbsd*)
2404132718Skan	tm_file="vax/vax.h vax/openbsd1.h openbsd.h vax/openbsd.h"
240590075Sobrien	use_collect2=yes
240690075Sobrien	;;
240790075Sobrienvax-*-ultrix*)			# VAXen running ultrix
240890075Sobrien	tm_file="${tm_file} vax/ultrix.h"
2409169689Skan	tmake_file=vax/t-memfuncs
2410132718Skan	use_fixproto=yes
241190075Sobrien	;;
241290075Sobrienxscale-*-elf)
241390075Sobrien	tm_file="arm/xscale-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
2414169689Skan	tmake_file="arm/t-arm arm/t-xscale-elf"
241590075Sobrien	out_file=arm/arm.c
241690075Sobrien	md_file=arm/arm.md
2417117395Skan	extra_modes=arm/arm-modes.def
2418132718Skan	use_fixproto=yes
241990075Sobrien	;;
242090075Sobrienxscale-*-coff)
2421132718Skan	tm_file="arm/semi.h arm/aout.h arm/coff.h dbxcoff.h arm/xscale-coff.h arm/arm.h"
2422169689Skan	tmake_file="arm/t-arm arm/t-xscale-coff"
242390075Sobrien	out_file=arm/arm.c
242490075Sobrien	md_file=arm/arm.md
2425117395Skan	extra_modes=arm/arm-modes.def
2426132718Skan	use_fixproto=yes
242790075Sobrien	;;
242890075Sobrienxstormy16-*-elf)
242990075Sobrien	# For historical reasons, the target files omit the 'x'.
243090075Sobrien	tm_file="dbxelf.h elfos.h svr4.h stormy16/stormy16.h"
243190075Sobrien	tm_p_file=stormy16/stormy16-protos.h
243290075Sobrien	md_file=stormy16/stormy16.md
243390075Sobrien	out_file=stormy16/stormy16.c
2434169689Skan	extra_options=stormy16/stormy16.opt
243590075Sobrien	tmake_file="stormy16/t-stormy16"
243690075Sobrien	extra_parts="crtbegin.o crtend.o"
2437132718Skan	use_fixproto=yes
243890075Sobrien	;;
243990075Sobrienxtensa-*-elf*)
244090075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h xtensa/elf.h"
2441132718Skan	tmake_file="xtensa/t-xtensa xtensa/t-elf"
244290075Sobrien	;;
244390075Sobrienxtensa-*-linux*)
244490075Sobrien	tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h"
2445169689Skan	tmake_file="${tmake_file} xtensa/t-xtensa xtensa/t-linux"
244690075Sobrien	;;
2447132718Skanam33_2.0-*-linux*)
2448132718Skan	tm_file="mn10300/mn10300.h dbxelf.h elfos.h linux.h mn10300/linux.h"
2449169689Skan	tmake_file="${tmake_file} mn10300/t-linux"
2450132718Skan	gas=yes gnu_ld=yes
2451132718Skan	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2452132718Skan	use_collect2=no
2453132718Skan	;;
2454169689Skanm32c-*-elf*)
2455169689Skan	tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
2456169689Skan	c_target_objs="m32c-pragma.o"
2457169689Skan	cxx_target_objs="m32c-pragma.o"
2458169689Skan	use_fixproto=yes
2459169689Skan 	;;
246090075Sobrien*)
2461132718Skan	echo "*** Configuration ${target} not supported" 1>&2
246290075Sobrien	exit 1
246390075Sobrien	;;
246490075Sobrienesac
246590075Sobrien
2466169689Skancase ${target} in
2467169689Skani[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
2468169689Skan	tmake_file="${tmake_file} i386/t-gmm_malloc"
2469169689Skan	;;
2470169689Skani[34567]86-*-linux* | x86_64-*-linux*)
2471169689Skan	tmake_file="${tmake_file} i386/t-pmm_malloc"
2472169689Skan	;;
2473169689Skani[34567]86-*-* | x86_64-*-*)
2474169689Skan	tmake_file="${tmake_file} i386/t-gmm_malloc"
2475169689Skan	;;
2476169689Skanesac
2477169689Skan
2478132718Skan# Support for --with-cpu and related options (and a few unrelated options,
2479132718Skan# too).
2480132718Skancase ${with_cpu} in
2481132718Skan  yes | no)
2482132718Skan    echo "--with-cpu must be passed a value" 1>&2
2483132718Skan    exit 1
2484132718Skan    ;;
248590075Sobrienesac
248690075Sobrien
2487132718Skan# If there is no $with_cpu option, try to infer one from ${target}.
2488132718Skan# This block sets nothing except for with_cpu.
2489132718Skanif test x$with_cpu = x ; then
2490132718Skan  case ${target} in
2491132718Skan    ep9312-*-*)
2492132718Skan      # A Cirrus ARM variant.
2493132718Skan      with_cpu="ep9312"
2494132718Skan      ;;
2495169689Skan    i386-*-*)
2496169689Skan      with_cpu=i386
2497169689Skan      ;;
2498132718Skan    i486-*-*)
2499132718Skan      with_cpu=i486
2500132718Skan      ;;
2501132718Skan    i586-*-*)
2502132718Skan      case ${target_noncanonical} in
2503132718Skan        k6_2-*)
2504132718Skan          with_cpu=k6-2
2505132718Skan          ;;
2506132718Skan        k6_3-*)
2507132718Skan          with_cpu=k6-3
2508132718Skan          ;;
2509132718Skan        k6-*)
2510132718Skan          with_cpu=k6
2511132718Skan          ;;
2512132718Skan        pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2513132718Skan          with_cpu=pentium-mmx
2514132718Skan          ;;
2515132718Skan        *)
2516132718Skan          with_cpu=pentium
2517132718Skan          ;;
2518132718Skan      esac
2519132718Skan      ;;
2520132718Skan    i686-*-* | i786-*-*)
2521132718Skan      case ${target_noncanonical} in
2522251212Spfg        amdfam10-*|barcelona-*)
2523251212Spfg          with_cpu=amdfam10
2524251212Spfg          ;;
2525132718Skan        k8-*|opteron-*|athlon_64-*)
2526132718Skan          with_cpu=k8
2527132718Skan          ;;
2528132718Skan        athlon_xp-*|athlon_mp-*|athlon_4-*)
2529132718Skan          with_cpu=athlon-4
2530132718Skan          ;;
2531132718Skan        athlon_tbird-*|athlon-*)
2532132718Skan          with_cpu=athlon
2533132718Skan          ;;
2534132718Skan        pentium2-*)
2535132718Skan          with_cpu=pentium2
2536132718Skan          ;;
2537132718Skan        pentium3-*|pentium3m-*)
2538132718Skan          with_cpu=pentium3
2539132718Skan          ;;
2540132718Skan        pentium4-*|pentium4m-*)
2541132718Skan          with_cpu=pentium4
2542132718Skan          ;;
2543132718Skan        prescott-*)
2544132718Skan          with_cpu=prescott
2545132718Skan          ;;
2546132718Skan        nocona-*)
2547132718Skan          with_cpu=nocona
2548132718Skan          ;;
2549219374Smm	core2-*)
2550219374Smm	  with_cpu=core2
2551219374Smm	  ;;
2552132718Skan        pentium_m-*)
2553132718Skan          with_cpu=pentium-m
2554132718Skan          ;;
2555169689Skan        pentiumpro-*)
2556132718Skan          with_cpu=pentiumpro
2557132718Skan          ;;
2558169689Skan        *)
2559169689Skan          with_cpu=generic
2560169689Skan          ;;
2561132718Skan      esac
2562132718Skan      ;;
2563132718Skan    x86_64-*-*)
2564169689Skan      case ${target_noncanonical} in
2565251212Spfg        amdfam10-*|barcelona-*)
2566251212Spfg          with_cpu=amdfam10
2567251212Spfg          ;;
2568169689Skan        k8-*|opteron-*|athlon_64-*)
2569169689Skan          with_cpu=k8
2570169689Skan          ;;
2571169689Skan        nocona-*)
2572169689Skan          with_cpu=nocona
2573169689Skan          ;;
2574219374Smm	core2-*)
2575219374Smm	  with_cpu=core2
2576219374Smm	  ;;
2577169689Skan        *)
2578169689Skan          with_cpu=generic
2579169689Skan          ;;
2580169689Skan      esac
2581132718Skan      ;;
2582132718Skan    alphaev6[78]*-*-*)
2583132718Skan      with_cpu=ev67
2584132718Skan      ;;
2585132718Skan    alphaev6*-*-*)
2586132718Skan      with_cpu=ev6
2587132718Skan      ;;
2588132718Skan    alphapca56*-*-*)
2589132718Skan      with_cpu=pca56
2590132718Skan      ;;
2591132718Skan    alphaev56*-*-*)
2592132718Skan      with_cpu=ev56
2593132718Skan      ;;
2594132718Skan    alphaev5*-*-*)
2595132718Skan      with_cpu=ev5
2596132718Skan      ;;
2597169689Skan    frv-*-*linux* | frv400-*-*linux*)
2598169689Skan      with_cpu=fr400
2599169689Skan      ;;
2600169689Skan    frv550-*-*linux*)
2601169689Skan      with_cpu=fr550
2602169689Skan      ;;
2603132718Skan    sparc*-*-*)
2604132718Skan      with_cpu="`echo ${target} | sed 's/-.*$//'`"
2605132718Skan      ;;
2606132718Skan  esac
2607132718Skanfi
2608132718Skan
2609169689Skan# Similarly for --with-float
2610169689Skanif test x$with_float = x; then
2611169689Skan	case ${target} in
2612169689Skan	ep9312-*-*)
2613169689Skan		with_float=hard
2614169689Skan		;;
2615169689Skan	esac
2616169689Skanfi
2617169689Skan
2618146895Skan# Similarly for --with-schedule.
2619146895Skanif test x$with_schedule = x; then
2620146895Skan	case ${target} in
2621146895Skan	hppa1* | parisc1*)
2622146895Skan		# Override default PA8000 scheduling model.
2623146895Skan		with_schedule=7100LC
2624146895Skan		;;
2625146895Skan	esac
2626146895Skanfi
2627132718Skan
2628146895Skan# Validate and mark as valid any --with options supported
2629146895Skan# by this target.  In order to use a particular --with option
2630146895Skan# you must list it in supported_defaults; validating the value
2631146895Skan# is optional.  This case statement should set nothing besides
2632146895Skan# supported_defaults.
2633132718Skan
2634146895Skansupported_defaults=
2635146895Skancase "${target}" in
2636132718Skan	alpha*-*-*)
2637132718Skan		supported_defaults="cpu tune"
2638132718Skan		for which in cpu tune; do
2639132718Skan			eval "val=\$with_$which"
2640132718Skan			case "$val" in
2641132718Skan			"" \
2642132718Skan			| ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
2643132718Skan			| pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
2644132718Skan			| 21264a)
2645132718Skan				;;
2646132718Skan			*)
2647132718Skan				echo "Unknown CPU used in --with-$which=$val" 1>&2
2648132718Skan				exit 1
2649132718Skan				;;
2650132718Skan			esac
2651132718Skan		done
2652132718Skan		;;
2653132718Skan
2654132718Skan	arm*-*-*)
2655169689Skan		supported_defaults="arch cpu float tune fpu abi mode"
2656132718Skan		for which in cpu tune; do
2657169689Skan			# See if it matches any of the entries in arm-cores.def
2658132718Skan			eval "val=\$with_$which"
2659169689Skan			if [ x"$val" = x ] \
2660169689Skan			    || grep "^ARM_CORE(\"$val\"," \
2661169689Skan				    ${srcdir}/config/arm/arm-cores.def \
2662169689Skan				    > /dev/null; then
2663169689Skan			  # Ok
2664169689Skan			  new_val=`grep "^ARM_CORE(\"$val\"," \
2665169689Skan				${srcdir}/config/arm/arm-cores.def | \
2666169689Skan				sed -e 's/^[^,]*,[ 	]*//' | \
2667169689Skan				sed -e 's/,.*$//'`
2668169689Skan			  eval "target_${which}_cname=$new_val"
2669169689Skan			echo "For $val real value is $new_val"
2670169689Skan			  true
2671169689Skan			else
2672169689Skan			  echo "Unknown CPU used in --with-$which=$val" 1>&2
2673169689Skan			  exit 1
2674169689Skan			fi
2675132718Skan		done
2676132718Skan
2677132718Skan		case "$with_arch" in
2678132718Skan		"" \
2679169689Skan		| armv[23456] | armv2a | armv3m | armv4t | armv5t \
2680169689Skan		| armv5te | armv6j |armv6k | armv6z | armv6zk \
2681169689Skan		| iwmmxt | ep9312)
2682132718Skan			# OK
268390075Sobrien			;;
2684132718Skan		*)
2685132718Skan			echo "Unknown arch used in --with-arch=$with_arch" 1>&2
2686132718Skan			exit 1
268790075Sobrien			;;
2688132718Skan		esac
2689132718Skan
2690132718Skan		case "$with_float" in
2691132718Skan		"" \
2692169689Skan		| soft | hard | softfp)
2693132718Skan			# OK
269490075Sobrien			;;
269590075Sobrien		*)
2696132718Skan			echo "Unknown floating point type used in --with-float=$with_float" 1>&2
2697132718Skan			exit 1
269890075Sobrien			;;
2699132718Skan		esac
2700132718Skan
2701169689Skan		case "$with_fpu" in
2702169689Skan		"" \
2703169689Skan		| fpa | fpe2 | fpe3 | maverick | vfp )
2704169689Skan			# OK
2705169689Skan			;;
2706169689Skan		*)
2707169689Skan			echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
2708169689Skan			exit 1
2709169689Skan			;;
2710169689Skan		esac
2711169689Skan
2712169689Skan		case "$with_abi" in
2713169689Skan		"" \
2714169689Skan		| apcs-gnu | atpcs | aapcs | iwmmxt )
2715169689Skan			#OK
2716169689Skan			;;
2717169689Skan		*)
2718169689Skan			echo "Unknown ABI used in --with-abi=$with_abi"
2719169689Skan			exit 1
2720169689Skan			;;
2721169689Skan		esac
2722169689Skan
2723169689Skan		case "$with_mode" in
2724169689Skan		"" \
2725169689Skan		| arm | thumb )
2726169689Skan			#OK
2727169689Skan			;;
2728169689Skan		*)
2729169689Skan			echo "Unknown mode used in --with-mode=$with_mode"
2730169689Skan			exit 1
2731169689Skan			;;
2732169689Skan		esac
2733169689Skan
2734132718Skan		if test "x$with_arch" != x && test "x$with_cpu" != x; then
2735169689Skan			echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
2736132718Skan		fi
2737132718Skan		;;
2738132718Skan
2739169689Skan	fr*-*-*linux*)
2740169689Skan		supported_defaults=cpu
2741169689Skan		case "$with_cpu" in
2742169689Skan		fr400) ;;
2743169689Skan		fr550) ;;
2744169689Skan		*)
2745169689Skan			echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
2746169689Skan			exit 1
2747169689Skan			;;
2748169689Skan		esac
2749169689Skan		;;
2750169689Skan
2751169689Skan	m68k*-linux*)
2752169689Skan		supported_defaults="cpu"
2753169689Skan		case "$with_cpu" in
2754169689Skan		"" | "m68020" | "m68030" | "m68040" | "m68060" | "m68020-40" | "m68020-60")
2755169689Skan			# OK
2756169689Skan			;;
2757169689Skan		*)
2758169689Skan			echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
2759169689Skan			echo "m68020 m68030 m68040 m68060 m68020-40 m68020-60" 1>&2
2760169689Skan			exit 1
2761169689Skan			;;
2762169689Skan		esac
2763169689Skan		;;
2764169689Skan
2765132718Skan	hppa*-*-* | parisc*-*-*)
2766132718Skan		supported_defaults="arch schedule"
2767132718Skan
2768132718Skan		case "$with_arch" in
2769132718Skan		"" | 1.0 | 1.1 | 2.0)
2770132718Skan			# OK
277190075Sobrien			;;
2772132718Skan		*)
2773132718Skan			echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
2774132718Skan			exit 1
277590075Sobrien			;;
2776132718Skan		esac
2777132718Skan
2778132718Skan		case "$with_schedule" in
2779132718Skan		"" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
2780132718Skan			# OK
278190075Sobrien			;;
2782132718Skan		*)
2783132718Skan			echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
2784132718Skan			exit 1
278590075Sobrien			;;
2786132718Skan		esac
2787132718Skan		;;
2788132718Skan
2789132718Skan	i[34567]86-*-* | x86_64-*-*)
2790132718Skan		supported_defaults="arch cpu tune"
2791132718Skan		for which in arch cpu tune; do
2792132718Skan			eval "val=\$with_$which"
2793132718Skan			case ${val} in
2794169689Skan			i386 | i486 \
2795132718Skan			| i586 | pentium | pentium-mmx | winchip-c6 | winchip2 \
2796132718Skan			| c3 | c3-2 | i686 | pentiumpro | pentium2 | pentium3 \
2797132718Skan			| pentium4 | k6 | k6-2 | k6-3 | athlon | athlon-tbird \
2798169689Skan			| athlon-4 | athlon-xp | athlon-mp \
2799169689Skan			| prescott | pentium-m | pentium4m | pentium3m)
2800169689Skan				case "${target}" in
2801169689Skan				  x86_64-*-*)
2802169689Skan				      echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
2803169689Skan				      exit 1
2804169689Skan				      ;;
2805169689Skan				esac
2806132718Skan				# OK
2807132718Skan				;;
2808251212Spfg			"" | amdfam10 | barcelona | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | generic)
2809169689Skan				# OK
2810169689Skan				;;
2811132718Skan			*)
2812132718Skan				echo "Unknown CPU given in --with-$which=$val." 1>&2
2813132718Skan				exit 1
2814132718Skan				;;
2815132718Skan			esac
2816132718Skan		done
2817132718Skan		;;
2818132718Skan
2819132718Skan	mips*-*-*)
2820169689Skan		supported_defaults="abi arch float tune divide"
2821132718Skan
2822132718Skan		case ${with_float} in
2823132718Skan		"" | soft | hard)
2824132718Skan			# OK
282590075Sobrien			;;
282690075Sobrien		*)
2827132718Skan			echo "Unknown floating point type used in --with-float=$with_float" 1>&2
2828132718Skan			exit 1
282990075Sobrien			;;
2830132718Skan		esac
2831132718Skan
2832132718Skan		case ${with_abi} in
2833132718Skan		"" | 32 | o64 | n32 | 64 | eabi)
2834132718Skan			# OK
283590075Sobrien			;;
2836132718Skan		*)
2837132718Skan			echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
2838132718Skan			exit 1
283990075Sobrien			;;
2840132718Skan		esac
2841169689Skan
2842169689Skan		case ${with_divide} in
2843169689Skan		"" | breaks | traps)
2844169689Skan			# OK
2845169689Skan			;;
2846169689Skan		*)
2847169689Skan			echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
2848169689Skan			exit 1
2849169689Skan		esac
2850132718Skan		;;
2851132718Skan
2852169689Skan	mt-*-*)
2853169689Skan		supported_defaults="arch"
2854169689Skan
2855169689Skan		case "$with_arch" in
2856169689Skan		"" \
2857169689Skan		| ms1-64-001 \
2858169689Skan		| ms1-16-002 \
2859169689Skan		| ms1-16-003 \
2860169689Skan		| ms2 \
2861169689Skan		| "")
2862169689Skan			# OK
2863169689Skan			;;
2864169689Skan		*)
2865169689Skan			echo "Unknown arch used in --with-arch=$with_arch" 1>&2
2866169689Skan			exit 1
2867169689Skan			;;
2868169689Skan		esac
2869169689Skan		;;
2870169689Skan
2871132718Skan	powerpc*-*-* | rs6000-*-*)
2872132718Skan		supported_defaults="cpu float tune"
2873132718Skan
2874132718Skan		for which in cpu tune; do
2875132718Skan			eval "val=\$with_$which"
2876132718Skan			case ${val} in
2877132718Skan			default32 | default64)
2878132718Skan				with_which="with_$which"
2879132718Skan				eval $with_which=
2880132718Skan				;;
2881169689Skan			405cr)
2882169689Skan				tm_defines="${tm_defines} CONFIG_PPC405CR"
2883169689Skan				eval "with_$which=405"
2884169689Skan				;;
2885132718Skan			"" | common \
2886169689Skan			| power | power[23456] | powerpc | powerpc64 \
2887132718Skan			| rios | rios1 | rios2 | rsc | rsc1 | rs64a \
2888132718Skan			| 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
2889132718Skan			| 601 | 602 | 603 | 603e | ec603e | 604 \
2890132718Skan			| 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
2891169689Skan			| 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5)
2892132718Skan				# OK
2893132718Skan				;;
2894132718Skan			*)
2895132718Skan				echo "Unknown cpu used in --with-$which=$val." 1>&2
2896132718Skan				exit 1
2897132718Skan				;;
2898132718Skan			esac
2899132718Skan		done
2900132718Skan		;;
2901132718Skan
2902132718Skan	s390*-*-*)
2903132718Skan		supported_defaults="arch mode tune"
2904132718Skan
2905132718Skan		for which in arch tune; do
2906132718Skan			eval "val=\$with_$which"
2907132718Skan			case ${val} in
2908169689Skan			"" | g5 | g6 | z900 | z990 | z9-109)
2909132718Skan				# OK
2910132718Skan				;;
2911132718Skan			*)
2912132718Skan				echo "Unknown cpu used in --with-$which=$val." 1>&2
2913132718Skan				exit 1
2914132718Skan				;;
2915132718Skan			esac
2916132718Skan		done
2917132718Skan
2918132718Skan		case ${with_mode} in
2919132718Skan		"" | esa | zarch)
2920132718Skan			# OK
292190075Sobrien			;;
2922132718Skan		*)
2923132718Skan			echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
2924132718Skan			exit 1
292590075Sobrien			;;
2926132718Skan		esac
2927132718Skan		;;
2928132718Skan
2929169689Skan	sh[123456ble]-*-* | sh-*-*)
2930169689Skan		supported_defaults="cpu"
2931169689Skan		case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
2932169689Skan		"" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
2933169689Skan			# OK
2934169689Skan			;;
2935169689Skan		m2a | m2a-single | m2a-single-only | m2a-nofpu)
2936169689Skan			;;
2937169689Skan		m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
2938169689Skan		        ;;
2939169689Skan		*)
2940169689Skan			echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
2941169689Skan			echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
2942169689Skan			echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
2943169689Skan			echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
2944169689Skan			exit 1
2945169689Skan			;;
2946169689Skan		esac
2947169689Skan		;;
2948132718Skan	sparc*-*-*)
2949132718Skan		supported_defaults="cpu float tune"
2950132718Skan
2951132718Skan		for which in cpu tune; do
2952132718Skan			eval "val=\$with_$which"
2953132718Skan			case ${val} in
2954132718Skan			"" | sparc | sparcv9 | sparc64 | sparc86x \
2955132718Skan			| v7 | cypress | v8 | supersparc | sparclite | f930 \
2956132718Skan			| f934 | hypersparc | sparclite86x | sparclet | tsc701 \
2957169689Skan			| v9 | ultrasparc | ultrasparc3 | niagara)
2958132718Skan				# OK
2959132718Skan				;;
2960132718Skan			*)
2961132718Skan				echo "Unknown cpu used in --with-$which=$val" 1>&2
2962132718Skan				exit 1
2963132718Skan				;;
2964132718Skan			esac
2965132718Skan		done
2966132718Skan
2967132718Skan		case ${with_float} in
2968132718Skan		"" | soft | hard)
2969132718Skan			# OK
297090075Sobrien			;;
2971132718Skan		*)
2972132718Skan			echo "Unknown floating point type used in --with-float=$with_float" 1>&2
2973132718Skan			exit 1
2974132718Skan			;;
2975132718Skan		esac
2976132718Skan		;;
2977132718Skan
2978132718Skan	v850*-*-*)
2979132718Skan		supported_defaults=cpu
2980132718Skan		case ${with_cpu} in
2981132718Skan		"" | v850e | v850e1)
2982132718Skan			# OK
2983132718Skan			;;
2984132718Skan		*)
2985132718Skan			echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
2986132718Skan			exit 1
2987132718Skan			;;
2988132718Skan		esac
2989132718Skan		;;
2990146895Skanesac
299190075Sobrien
2992146895Skan# Set some miscellaneous flags for particular targets.
2993146895Skantarget_cpu_default2=
2994146895Skancase ${target} in
2995132718Skan	alpha*-*-*)
2996132718Skan		if test x$gas = xyes
299790075Sobrien		then
299890075Sobrien			target_cpu_default2="MASK_GAS"
299990075Sobrien		fi
3000132718Skan		;;
3001132718Skan
3002132718Skan	arm*-*-*)
3003169689Skan		if test x$target_cpu_cname = x
3004169689Skan		then
3005169689Skan			target_cpu_default2=TARGET_CPU_generic
3006169689Skan		else
3007169689Skan			target_cpu_default2=TARGET_CPU_$target_cpu_cname
3008169689Skan		fi
3009169689Skan		;;
3010169689Skan
3011169689Skan	m68k*-linux*)
3012132718Skan		case "x$with_cpu" in
301390075Sobrien		x)
301490075Sobrien			# The most generic
3015169689Skan			target_cpu_default2="(MASK_68020|MASK_68881|MASK_BITFIELD)"
301690075Sobrien			;;
3017169689Skan		xm68020)
3018169689Skan			target_cpu_default2="(MASK_68020|MASK_68881|MASK_BITFIELD)"
3019169689Skan			;;
3020169689Skan		xm68030)
3021169689Skan			target_cpu_default2="(MASK_68030|MASK_68020|MASK_68881|MASK_BITFIELD)"
3022169689Skan			;;
3023169689Skan		xm68040)
3024169689Skan			target_cpu_default2="(MASK_68040|MASK_68040_ONLY|MASK_68020|MASK_68881|MASK_BITFIELD)"
3025169689Skan			;;
3026169689Skan		xm68060)
3027169689Skan			target_cpu_default2="(MASK_68060|MASK_68040_ONLY|MASK_68020|MASK_68881|MASK_BITFIELD)"
3028169689Skan			;;
3029169689Skan		xm68020-40)
3030169689Skan			target_cpu_default2="(MASK_BITFIELD|MASK_68881|MASK_68020|MASK_68040)"
3031169689Skan			;;
3032169689Skan		xm68020-60)
3033169689Skan			target_cpu_default2="(MASK_BITFIELD|MASK_68881|MASK_68020|MASK_68040|MASK_68060)"
3034169689Skan			;;
3035132718Skan		*)
3036169689Skan			echo "Unknown CPU used in --with-cpu=$with_cpu"  1>&2
3037169689Skan			exit 1
303890075Sobrien			;;
3039132718Skan		esac
3040132718Skan		;;
304190075Sobrien
3042132718Skan	hppa*-*-* | parisc*-*-*)
3043169689Skan		target_cpu_default2="MASK_BIG_SWITCH"
3044132718Skan		if test x$gas = xyes
3045132718Skan		then
3046169689Skan			target_cpu_default2="${target_cpu_default2}|MASK_GAS|MASK_JUMP_IN_DELAY"
3047132718Skan		fi
3048132718Skan		;;
304990075Sobrien
3050132718Skan	mips*-*-*)
3051169689Skan		if test x$gnu_ld = xyes
3052169689Skan		then
3053169689Skan			target_cpu_default2="MASK_SPLIT_ADDRESSES"
3054169689Skan		fi
3055132718Skan		case ${target} in
3056132718Skan			mips*el-*-*)
3057132718Skan				tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
3058132718Skan				;;
3059132718Skan		esac
3060132718Skan		if test "x$enable_gofast" = xyes
3061132718Skan		then
3062132718Skan			tm_defines="US_SOFTWARE_GOFAST $tm_defines"
3063132718Skan			tmake_file="mips/t-gofast $tmake_file"
3064132718Skan		else
3065132718Skan			tmake_file="mips/t-mips $tmake_file"
3066117395Skan		fi
3067117395Skan		;;
3068132718Skan
3069132718Skan	powerpc*-*-* | rs6000-*-*)
3070132718Skan		# FIXME: The PowerPC port uses the value set at compile time,
3071132718Skan		# although it's only cosmetic.
3072132718Skan		if test "x$with_cpu" != x
3073132718Skan		then
3074132718Skan			target_cpu_default2="\\\"$with_cpu\\\""
3075132718Skan		fi
3076132718Skan		out_file=rs6000/rs6000.c
3077132718Skan		c_target_objs="${c_target_objs} rs6000-c.o"
3078132718Skan		cxx_target_objs="${cxx_target_objs} rs6000-c.o"
3079132718Skan		tmake_file="rs6000/t-rs6000 ${tmake_file}"
3080169689Skan
3081169689Skan                if test x$enable_e500_double = xyes
3082169689Skan                then
3083169689Skan                        tm_file="$tm_file rs6000/e500-double.h"
3084169689Skan                fi
3085117395Skan		;;
308690075Sobrien
3087169689Skan	sh[123456ble]*-*-* | sh-*-*)
3088169689Skan		c_target_objs="${c_target_objs} sh-c.o"
3089169689Skan		cxx_target_objs="${cxx_target_objs} sh-c.o"
3090169689Skan		;;
3091169689Skan
3092132718Skan	sparc*-*-*)
3093132718Skan		# Some standard aliases.
3094132718Skan		case x$with_cpu in
3095132718Skan		xsparc)
3096132718Skan			with_cpu=v7
309790075Sobrien			;;
3098132718Skan		xsparcv9 | xsparc64)
3099132718Skan			with_cpu=v9
310090075Sobrien			;;
3101132718Skan		esac
310290075Sobrien
3103169689Skan		# The SPARC port checks this value at compile-time.
3104132718Skan		target_cpu_default2="TARGET_CPU_$with_cpu"
3105132718Skan		;;
3106132718Skan	v850*-*-*)
3107132718Skan		# FIXME: The v850 is "special" in that it does not support
3108132718Skan		# runtime CPU selection, only --with-cpu.
3109132718Skan		case "x$with_cpu" in
3110117395Skan		x)
3111117395Skan			;;
3112117395Skan		xv850e)
3113117395Skan			target_cpu_default2="TARGET_CPU_$with_cpu"
3114117395Skan			;;
3115132718Skan		esac
3116132718Skan		;;
3117146895Skanesac
3118132718Skan
3119146895Skant=
3120169689Skanall_defaults="abi cpu arch tune schedule float mode fpu divide"
3121146895Skanfor option in $all_defaults
3122146895Skando
3123146895Skan	eval "val=\$with_$option"
3124146895Skan	if test -n "$val"; then
3125146895Skan		case " $supported_defaults " in
3126146895Skan		*" $option "*)
3127146895Skan			;;
3128146895Skan		*)
3129146895Skan			echo "This target does not support --with-$option." 2>&1
3130169689Skan			echo "Valid --with options are: $supported_defaults" 2>&1
3131146895Skan			exit 1
3132146895Skan			;;
3133146895Skan		esac
3134132718Skan
3135146895Skan		if test "x$t" = x
3136146895Skan		then
3137146895Skan			t="{ \"$option\", \"$val\" }"
3138146895Skan		else
3139146895Skan			t="${t}, { \"$option\", \"$val\" }"
3140132718Skan		fi
314190075Sobrien	fi
3142146895Skandone
314390075Sobrien
3144146895Skanif test "x$t" = x
3145146895Skanthen
3146146895Skan	configure_default_options="{ { NULL, NULL} }"
3147146895Skanelse
3148146895Skan	configure_default_options="{ ${t} }"
3149146895Skanfi
3150146895Skan
3151146895Skanif test "$target_cpu_default2" != ""
3152146895Skanthen
3153146895Skan	if test "$target_cpu_default" != ""
315490075Sobrien	then
3155146895Skan		target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3156146895Skan	else
3157146895Skan		target_cpu_default=$target_cpu_default2
315890075Sobrien	fi
3159146895Skanfi
3160