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