OSDN Git Service

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