OSDN Git Service

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