OSDN Git Service

Move crtstuff support 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-freebsd 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       tmake_file="${tmake_file} t-freebsd-thread"
565       ;;
566     *)
567       echo 'Unknown thread configuration for FreeBSD'
568       exit 1
569       ;;
570   esac
571   fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
572   extra_options="$extra_options rpath.opt freebsd.opt"
573   case ${target} in
574     *-*-freebsd[345].*)
575       :;;
576     *)
577       default_use_cxa_atexit=yes;;
578   esac
579   # need_64bit_hwint=yes # system compiler has this for all arch!
580   use_gcc_stdint=wrap
581   ;;
582 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
583   extra_options="$extra_options gnu-user.opt"
584   gas=yes
585   gnu_ld=yes
586   case ${enable_threads} in
587     "" | yes | posix) thread_file='posix' ;;
588   esac
589   tmake_file="t-linux t-slibgcc"
590   case $target in
591     *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-kopensolaris*-gnu)
592       :;;
593     *-*-gnu*)
594       native_system_header_dir=/include
595       ;;
596   esac
597   # glibc / uclibc / bionic switch.
598   # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
599   case $target in
600     *linux*)
601       extra_options="$extra_options linux.opt";;
602   esac
603   case $target in
604     *-*-*android*)
605       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
606       ;;
607     *-*-*uclibc*)
608       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
609       ;;
610     *)
611       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
612       ;;
613   esac
614   # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
615   # is provided.
616   default_use_cxa_atexit=yes
617   use_gcc_tgmath=no
618   use_gcc_stdint=wrap
619   # Add Android userspace support to Linux targets.
620   case $target in
621     *linux*)
622       tm_file="$tm_file linux-android.h"
623       extra_options="$extra_options linux-android.opt"
624       ;;
625   esac
626   # Enable compilation for Android by default for *android* targets.
627   case $target in
628     *-*-*android*)
629       tm_defines="$tm_defines ANDROID_DEFAULT=1"
630       ;;
631     *)
632       tm_defines="$tm_defines ANDROID_DEFAULT=0"
633       ;;
634   esac
635   ;;
636 *-*-netbsd*)
637   tmake_file="t-libgcc-pic t-slibgcc"
638   gas=yes
639   gnu_ld=yes
640
641   # NetBSD 2.0 and later get POSIX threads enabled by default.
642   # Allow them to be explicitly enabled on any other version.
643   case ${enable_threads} in
644     "")
645       case ${target} in
646         *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
647           thread_file='posix'
648           tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
649           ;;
650       esac
651       ;;
652     yes | posix)
653       thread_file='posix'
654       tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
655       ;;
656   esac
657
658   # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
659   # default (unless overridden by --disable-__cxa_atexit).
660   case ${target} in
661     *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
662       default_use_cxa_atexit=yes
663       ;;
664   esac
665   ;;
666 *-*-openbsd*)
667   tmake_file="t-openbsd t-libgcc-pic"
668   case ${enable_threads} in
669     yes)
670       thread_file='posix'
671       tmake_file="${tmake_file} t-openbsd-thread"
672       ;;
673   esac
674   case ${target} in
675     *-*-openbsd2.*|*-*-openbsd3.[012])
676       tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
677   esac
678   ;;
679 *-*-rtems*)
680   case ${enable_threads} in
681     yes) thread_file='rtems' ;;
682   esac
683   extra_options="${extra_options} rtems.opt"
684   use_gcc_stdint=wrap
685   ;;
686 *-*-uclinux*)
687   extra_options="$extra_options gnu-user.opt"
688   use_gcc_stdint=wrap
689   tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
690   ;;
691 *-*-solaris2*)
692   # i?86-*-solaris2* needs to insert headers between cpu default and
693   # Solaris 2 specific ones.
694   sol2_tm_file="dbxelf.h elfos.h ${cpu_type}/sysv4.h sol2.h ${cpu_type}/sol2.h"
695   case ${target} in
696     *-*-solaris2.1[0-9]*)
697       sol2_tm_file="${sol2_tm_file} sol2-10.h"
698       use_gcc_stdint=wrap
699       ;;
700     *)
701       use_gcc_stdint=provide
702       ;;
703   esac
704   if test x$gnu_ld = xyes; then
705     tm_file="usegld.h ${tm_file}"
706   fi
707   if test x$gas = xyes; then
708     tm_file="usegas.h ${tm_file}"
709   fi
710   tm_p_file="${tm_p_file} sol2-protos.h"
711   tmake_file="${tmake_file} t-sol2 t-slibgcc"
712   c_target_objs="${c_target_objs} sol2-c.o"
713   cxx_target_objs="${cxx_target_objs} sol2-c.o sol2-cxx.o"
714   extra_objs="sol2.o sol2-stubs.o"
715   extra_options="${extra_options} sol2.opt"
716   case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
717     "":yes:* | yes:yes:* )
718       thread_file=posix
719       ;;
720   esac
721   ;;
722 *-*-*vms*)
723   extra_options="${extra_options} vms/vms.opt"
724   xmake_file=vms/x-vms
725   tmake_file="vms/t-vms t-slibgcc"
726   extra_objs="vms.o"
727   target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.c"
728   tm_p_file="${tm_p_file} vms/vms-protos.h"
729   if test x$gnu_ld != xyes; then
730     # Build wrappers for native case.
731     extra_programs="ld\$(exeext) ar\$(exeext)"
732     tmake_file="$tmake_file vms/t-vmsnative"
733   fi
734   ;;
735 *-*-vxworks*)
736   tmake_file=t-vxworks
737   xm_defines=POSIX
738   extra_options="${extra_options} vxworks.opt"
739   extra_objs=vxworks.o
740   case ${enable_threads} in
741     no) ;;
742     "" | yes | vxworks) thread_file='vxworks' ;;
743     *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
744   esac
745   ;;
746 *-*-elf)
747   # Assume that newlib is being used and so __cxa_atexit is provided.
748   default_use_cxa_atexit=yes
749   use_gcc_stdint=wrap
750   ;;
751 esac
752
753 case ${target} in
754 alpha*-*-linux*)
755         tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
756         extra_options="${extra_options} alpha/elf.opt"
757         target_cpu_default="MASK_GAS"
758         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
759         ;;
760 alpha*-*-freebsd*)
761         tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
762         extra_options="${extra_options} alpha/elf.opt"
763         target_cpu_default="MASK_GAS"
764         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
765         ;;
766 alpha*-*-netbsd*)
767         tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
768         extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
769                        alpha/elf.opt"
770         target_cpu_default="MASK_GAS"
771         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
772         ;;
773 alpha*-*-openbsd*)
774         tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
775         tm_file="alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
776         extra_options="${extra_options} openbsd.opt alpha/elf.opt"
777         # default x-alpha is only appropriate for dec-osf.
778         target_cpu_default="MASK_GAS"
779         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
780         ;;
781 alpha*-dec-osf5.1*)
782         if test x$stabs = xyes
783         then
784                 tm_file="${tm_file} dbx.h"
785         fi
786         # mips-tfile and mips-tdump are only used with the native assembler
787         # and require the Tru64 UNIX <a.out.h>, so only build native.
788         if test x$gas != xyes && test x${host} = x${target}
789         then
790                 extra_passes="mips-tfile mips-tdump"
791         fi
792         use_collect2=yes
793         tmake_file="t-slibgcc"
794         tm_file="${tm_file} alpha/osf5.h"
795         tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1"
796         extra_options="${extra_options} rpath.opt alpha/osf5.opt"
797         extra_headers=va_list.h
798         use_gcc_stdint=provide
799         case ${enable_threads} in
800           "" | yes | posix)
801             thread_file='posix'
802             ;;
803         esac
804         ;;
805 alpha64-dec-*vms*)
806         tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
807         xm_file="alpha/xm-vms.h vms/xm-vms64.h"
808         tmake_file="${tmake_file} alpha/t-alpha vms/t-vms64 alpha/t-vms alpha/t-ieee"
809         ;;
810 alpha*-dec-*vms*)
811         tm_file="${tm_file} alpha/vms.h"
812         xm_file="alpha/xm-vms.h"
813         tmake_file="${tmake_file} alpha/t-alpha alpha/t-vms alpha/t-ieee"
814         ;;
815 arm-wrs-vxworks)
816         tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
817         extra_options="${extra_options} arm/vxworks.opt"
818         tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
819         ;;
820 arm*-*-freebsd*)
821         tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
822         tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
823         ;;
824 arm*-*-netbsdelf*)
825         tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
826         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
827         tmake_file="${tmake_file} arm/t-arm arm/t-netbsd"
828         ;;
829 arm*-*-linux*)                  # ARM GNU/Linux with ELF
830         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"
831         case $target in
832         arm*b-*)
833                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
834                 ;;
835         esac
836         tmake_file="${tmake_file} t-linux arm/t-arm"
837         case ${target} in
838         arm*-*-linux-*eabi)
839             tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
840             libgcc_tm_file="$libgcc_tm_file arm/bpabi-lib.h"
841             tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
842             # Define multilib configuration for arm-linux-androideabi.
843             case ${target} in
844             *-androideabi)
845                 tmake_file="$tmake_file arm/t-linux-androideabi"
846                 ;;
847             esac
848             # The BPABI long long divmod functions return a 128-bit value in
849             # registers r0-r3.  Correctly modeling that requires the use of
850             # TImode.
851             need_64bit_hwint=yes
852             # The EABI requires the use of __cxa_atexit.
853             default_use_cxa_atexit=yes
854             ;;
855         *)
856             tmake_file="$tmake_file arm/t-linux"
857             ;;
858         esac
859         with_tls=${with_tls:-gnu}
860         tm_file="$tm_file arm/aout.h arm/arm.h"
861         ;;
862 arm*-*-uclinux*)                # ARM ucLinux
863         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
864         tmake_file="arm/t-arm arm/t-arm-elf"
865         case ${target} in
866         arm*-*-uclinux*eabi)
867             tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
868             libgcc_tm_file="$libgcc_tm_file arm/bpabi-lib.h"
869             tmake_file="$tmake_file arm/t-bpabi"
870             # The BPABI long long divmod functions return a 128-bit value in
871             # registers r0-r3.  Correctly modeling that requires the use of
872             # TImode.
873             need_64bit_hwint=yes
874             # The EABI requires the use of __cxa_atexit.
875             default_use_cxa_atexit=yes
876         esac
877         tm_file="$tm_file arm/aout.h arm/arm.h"
878         ;;
879 arm*-*-ecos-elf)
880         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"
881         tmake_file="arm/t-arm arm/t-arm-elf"
882         ;;
883 arm*-*-eabi* | arm*-*-symbianelf* )
884         # The BPABI long long divmod functions return a 128-bit value in
885         # registers r0-r3.  Correctly modeling that requires the use of
886         # TImode.
887         need_64bit_hwint=yes
888         default_use_cxa_atexit=yes
889         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
890         libgcc_tm_file="$libgcc_tm_file arm/bpabi-lib.h"
891         tmake_file="arm/t-arm arm/t-arm-elf"
892         case ${target} in
893         arm*-*-eabi*)
894           tm_file="$tm_file newlib-stdint.h"
895           tmake_file="${tmake_file} arm/t-bpabi"
896           use_gcc_stdint=wrap
897           ;;
898         arm*-*-symbianelf*)
899           tm_file="${tm_file} arm/symbian.h"
900           libgcc_tm_file="$libgcc_tm_file arm/symbian-lib.h"
901           # We do not include t-bpabi for Symbian OS because the system
902           # provides its own implementation of the BPABI functions.
903           tmake_file="${tmake_file} arm/t-symbian"
904           ;;
905         esac
906         tm_file="${tm_file} arm/aout.h arm/arm.h"
907         ;;
908 arm*-*-rtems*)
909         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"
910         tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
911         ;;
912 arm*-*-elf)
913         tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
914         tmake_file="arm/t-arm arm/t-arm-elf"
915         ;;
916 arm*-wince-pe*)
917         tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
918         tmake_file="arm/t-arm arm/t-wince-pe"
919         extra_options="${extra_options} arm/pe.opt"
920         extra_objs="pe.o"
921         ;;
922 avr-*-rtems*)
923         tm_file="elfos.h avr/elf.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
924         libgcc_tm_file="$libgcc_tm_file avr/avr-lib.h"
925         tmake_file="avr/t-avr t-rtems avr/t-rtems"
926         extra_gcc_objs="driver-avr.o avr-devices.o"
927         extra_objs="avr-devices.o avr-log.o"
928         ;;
929 avr-*-*)
930         tm_file="elfos.h avr/elf.h avr/avr.h dbxelf.h newlib-stdint.h"
931         libgcc_tm_file="$libgcc_tm_file avr/avr-lib.h"
932         use_gcc_stdint=wrap
933         extra_gcc_objs="driver-avr.o avr-devices.o"
934         extra_objs="avr-devices.o avr-log.o"
935         ;;
936 bfin*-elf*)
937         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
938         tmake_file=bfin/t-bfin-elf
939         use_collect2=no
940         ;;
941 bfin*-uclinux*)
942         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
943         tmake_file=bfin/t-bfin-uclinux
944         use_collect2=no
945         ;;
946 bfin*-linux-uclibc*)
947         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"
948         tmake_file="bfin/t-bfin-linux t-slibgcc"
949         use_collect2=no
950         ;;
951 bfin*-rtems*)
952         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
953         tmake_file="bfin/t-bfin t-rtems bfin/t-rtems"
954         ;;
955 bfin*-*)
956         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
957         tmake_file=bfin/t-bfin
958         use_collect2=no
959         use_gcc_stdint=wrap
960         ;;
961 crisv32-*-elf | crisv32-*-none)
962         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
963         tmake_file="cris/t-cris"
964         target_cpu_default=32
965         gas=yes
966         extra_options="${extra_options} cris/elf.opt"
967         use_gcc_stdint=wrap
968         ;;
969 cris-*-elf | cris-*-none)
970         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
971         tmake_file="cris/t-cris cris/t-elfmulti"
972         gas=yes
973         extra_options="${extra_options} cris/elf.opt"
974         use_gcc_stdint=wrap
975         ;;
976 crisv32-*-linux* | cris-*-linux*)
977         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
978         # We need to avoid using t-linux, so override default tmake_file
979         tmake_file="cris/t-cris cris/t-linux t-slibgcc"
980         extra_options="${extra_options} cris/linux.opt"
981         case $target in
982           cris-*-*)
983                 target_cpu_default=10
984                 ;;
985           crisv32-*-*)
986                 target_cpu_default=32
987                 ;;
988         esac
989         ;;
990 fr30-*-elf)
991         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
992         tmake_file=fr30/t-fr30
993         ;;
994 frv-*-elf)
995         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
996         libgcc_tm_file="${libgcc_tm_file} frv/frv-abi.h"
997         tmake_file=frv/t-frv
998         ;;
999 frv-*-*linux*)
1000         tm_file="dbxelf.h elfos.h ${tm_file} \
1001                  gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1002         libgcc_tm_file="${libgcc_tm_file} frv/frv-abi.h"
1003         tmake_file="${tmake_file} frv/t-frv frv/t-linux"
1004         ;;
1005 moxie-*-elf)
1006         gas=yes
1007         gnu_ld=yes
1008         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1009         tmake_file="${tmake_file} moxie/t-moxie"
1010         ;;
1011 moxie-*-uclinux*)
1012         gas=yes
1013         gnu_ld=yes
1014         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
1015         tmake_file="${tmake_file} moxie/t-moxie"
1016         ;;
1017 moxie-*-rtems*)
1018         tmake_file="${tmake_file} moxie/t-moxie t-rtems"
1019         tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1020         ;;
1021 h8300-*-rtems*)
1022         tmake_file="h8300/t-h8300 t-rtems h8300/t-rtems"
1023         tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
1024         libgcc_tm_file="$libgcc_tm_file h8300/h8300-lib.h"
1025         ;;
1026 h8300-*-elf*)
1027         tmake_file="h8300/t-h8300"
1028         tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
1029         libgcc_tm_file="$libgcc_tm_file h8300/h8300-lib.h"
1030         ;;
1031 hppa*64*-*-linux*)
1032         target_cpu_default="MASK_PA_11|MASK_PA_20"
1033         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
1034                  glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1035                  pa/pa64-linux.h"
1036         tmake_file="${tmake_file} pa/t-linux64"
1037         gas=yes gnu_ld=yes
1038         need_64bit_hwint=yes
1039         ;;
1040 hppa*-*-linux*)
1041         target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1042         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
1043                  pa/pa32-regs.h pa/pa32-linux.h"
1044         tmake_file="${tmake_file} pa/t-linux"
1045         ;;
1046 # port not yet contributed.
1047 #hppa*-*-openbsd*)
1048 #       target_cpu_default="MASK_PA_11"
1049 #       ;;
1050 hppa[12]*-*-hpux10*)
1051         case ${target} in
1052         hppa1.1-*-* | hppa2*-*-*)
1053                 target_cpu_default="MASK_PA_11"
1054                 ;;
1055         esac
1056         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1057                  pa/pa-hpux.h pa/pa-hpux10.h"
1058         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
1059         case ${target} in
1060         *-*-hpux10.[1-9]*)
1061                 tm_file="${tm_file} pa/pa-hpux1010.h"
1062                 extra_options="${extra_options} pa/pa-hpux1010.opt"
1063                 ;;
1064         esac
1065         use_gcc_stdint=provide
1066         tm_file="${tm_file} hpux-stdint.h"
1067         tmake_file="pa/t-pa-hpux10 pa/t-pa-hpux t-slibgcc"
1068         case ${enable_threads} in
1069           "")
1070             if test x$have_pthread_h = xyes ; then
1071               tmake_file="${tmake_file} pa/t-dce-thr"
1072             fi
1073             ;;
1074           yes | dce)
1075             tmake_file="${tmake_file} pa/t-dce-thr"
1076             ;;
1077         esac
1078         use_collect2=yes
1079         gas=yes
1080         if test "x$with_dwarf2" != x; then
1081                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1082                 dwarf2=no
1083         fi
1084         ;;
1085 hppa*64*-*-hpux11*)
1086         target_cpu_default="MASK_PA_11|MASK_PA_20"
1087         if test x$gnu_ld = xyes
1088         then
1089                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1090         fi
1091         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1092                  pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1093                  pa/pa-hpux11.h"
1094         case ${target} in
1095         *-*-hpux11.[12]*)
1096                 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1097                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1098                 ;;
1099         *-*-hpux11.[3-9]*)
1100                 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1101                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1102                 ;;
1103         *)
1104                 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1105                 ;;
1106         esac
1107         extra_options="${extra_options} pa/pa-hpux.opt \
1108                        pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
1109         need_64bit_hwint=yes
1110         tmake_file="pa/t-pa64 pa/t-pa-hpux t-slibgcc"
1111         case x${enable_threads} in
1112         x | xyes | xposix )
1113                 thread_file=posix
1114                 ;;
1115         esac
1116         gas=yes
1117         case ${target} in
1118           *-*-hpux11.[01]*)
1119                 use_gcc_stdint=provide
1120                 tm_file="${tm_file} hpux-stdint.h"
1121                 ;;
1122           *-*-hpux11.[23]*)
1123                 use_gcc_stdint=wrap
1124                 tm_file="${tm_file} hpux-stdint.h"
1125                 ;;
1126         esac
1127         ;;
1128 hppa[12]*-*-hpux11*)
1129         case ${target} in
1130         hppa1.1-*-* | hppa2*-*-*)
1131                 target_cpu_default="MASK_PA_11"
1132                 ;;
1133         esac
1134         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1135                  pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1136         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1137                        hpux11.opt"
1138         case ${target} in
1139         *-*-hpux11.[12]*)
1140                 tm_file="${tm_file} pa/pa-hpux1111.h"
1141                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1142                 ;;
1143         *-*-hpux11.[3-9]*)
1144                 tm_file="${tm_file} pa/pa-hpux1131.h"
1145                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1146                 ;;
1147         esac
1148         tmake_file="pa/t-pa-hpux11 pa/t-pa-hpux t-slibgcc"
1149         case x${enable_threads} in
1150         x | xyes | xposix )
1151                 thread_file=posix
1152                 ;;
1153         esac
1154         use_collect2=yes
1155         gas=yes
1156         case ${target} in
1157           *-*-hpux11.[01]*)
1158                 use_gcc_stdint=provide
1159                 tm_file="${tm_file} hpux-stdint.h"
1160                 ;;
1161           *-*-hpux11.[23]*)
1162                 use_gcc_stdint=wrap
1163                 tm_file="${tm_file} hpux-stdint.h"
1164                 ;;
1165         esac
1166         if test "x$with_dwarf2" != x; then
1167                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1168                 dwarf2=no
1169         fi
1170         ;;
1171 i[34567]86-*-darwin*)
1172         need_64bit_isa=yes
1173         # Baseline choice for a machine that allows m64 support.
1174         with_cpu=${with_cpu:-core2}
1175         tmake_file="${tmake_file} t-slibgcc"
1176         libgcc_tm_file="$libgcc_tm_file i386/darwin-lib.h"
1177         ;;
1178 x86_64-*-darwin*)
1179         with_cpu=${with_cpu:-core2}
1180         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
1181         tm_file="${tm_file} ${cpu_type}/darwin64.h"
1182         libgcc_tm_file="$libgcc_tm_file i386/darwin-lib.h"
1183         ;;
1184 i[34567]86-*-elf*)
1185         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1186         tmake_file="${tmake_file} t-svr4"
1187         ;;
1188 x86_64-*-elf*)
1189         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1190         tmake_file="${tmake_file} t-svr4"
1191         ;;
1192 i[34567]86-*-freebsd*)
1193         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1194         ;;
1195 x86_64-*-freebsd*)
1196         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"
1197         ;;
1198 i[34567]86-*-netbsdelf*)
1199         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
1200         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1201         ;;
1202 x86_64-*-netbsd*)
1203         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"
1204         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1205         ;;
1206 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
1207         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"
1208         extra_options="${extra_options} openbsd.opt"
1209         # needed to unconfuse gdb
1210         tmake_file="${tmake_file} t-openbsd i386/t-openbsd"
1211         # we need collect2 until our bug is fixed...
1212         use_collect2=yes
1213         ;;
1214 i[34567]86-*-openbsd*)
1215         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1216         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1217         extra_options="${extra_options} openbsd.opt"
1218         gas=yes
1219         gnu_ld=yes
1220         ;;
1221 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1222                         # Intel 80386's running GNU/*
1223                         # with ELF format using glibc 2
1224         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
1225         case ${target} in
1226         i[34567]86-*-linux*)
1227                 tm_file="${tm_file} linux.h"
1228                 # Assume modern glibc
1229                 default_gnu_indirect_function=yes
1230                 if test x$enable_targets = xall; then
1231                         tm_file="${tm_file} i386/x86-64.h i386/gnu-user64.h i386/linux64.h"
1232                         tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1233                         tmake_file="${tmake_file} i386/t-linux64"
1234                         x86_multilibs="${with_multilib_list}"
1235                         if test "$x86_multilibs" = "default"; then
1236                                 x86_multilibs="m64,m32"
1237                         fi
1238                         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1239                         for x86_multilib in ${x86_multilibs}; do
1240                                 case ${x86_multilib} in
1241                                 m32 | m64 | mx32)
1242                                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1243                                         ;;
1244                                 *)
1245                                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1246                                         exit 1
1247                                 esac
1248                         done
1249                         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1250                         need_64bit_isa=yes
1251                         case X"${with_cpu}" in
1252                         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)
1253                                 ;;
1254                         X)
1255                                 if test x$with_cpu_64 = x; then
1256                                         with_cpu_64=generic
1257                                 fi
1258                                 ;;
1259                         *)
1260                                 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1261                                 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
1262                                 exit 1
1263                                 ;;
1264                         esac
1265                 else
1266                         tm_file="${tm_file} i386/gnu-user.h i386/linux.h"
1267                 fi
1268                 ;;
1269         i[34567]86-*-knetbsd*-gnu)
1270                 tm_file="${tm_file} i386/gnu-user.h knetbsd-gnu.h i386/knetbsd-gnu.h"
1271                 ;;
1272         i[34567]86-*-kfreebsd*-gnu)
1273                 tm_file="${tm_file} i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
1274                 ;;
1275         i[34567]86-*-kopensolaris*-gnu)
1276                 tm_file="${tm_file} i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
1277                 ;;
1278         i[34567]86-*-gnu*)
1279                 tm_file="$tm_file i386/gnu-user.h gnu.h i386/gnu.h"
1280                 ;;
1281         esac
1282         ;;
1283 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
1284         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
1285                  i386/x86-64.h i386/gnu-user64.h"
1286         case ${target} in
1287         x86_64-*-linux*)
1288                 tm_file="${tm_file} linux.h i386/linux64.h"
1289                 # Assume modern glibc
1290                 default_gnu_indirect_function=yes
1291                 ;;
1292         x86_64-*-kfreebsd*-gnu)
1293                 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1294                 ;;
1295         x86_64-*-knetbsd*-gnu)
1296                 tm_file="${tm_file} knetbsd-gnu.h"
1297                 ;;
1298         esac
1299         tmake_file="${tmake_file} i386/t-linux64"
1300         x86_multilibs="${with_multilib_list}"
1301         if test "$x86_multilibs" = "default"; then
1302                 x86_multilibs="m64,m32"
1303         fi
1304         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1305         for x86_multilib in ${x86_multilibs}; do
1306                 case ${x86_multilib} in
1307                 m32 | m64 | mx32)
1308                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1309                         ;;
1310                 *)
1311                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1312                         exit 1
1313                 esac
1314         done
1315         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1316         ;;
1317 i[34567]86-pc-msdosdjgpp*)
1318         xm_file=i386/xm-djgpp.h
1319         tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
1320         native_system_header_dir=/dev/env/DJDIR/include
1321         extra_options="${extra_options} i386/djgpp.opt"
1322         gnu_ld=yes
1323         gas=yes
1324         use_gcc_stdint=wrap
1325         ;;
1326 i[34567]86-*-lynxos*)
1327         xm_defines=POSIX
1328         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1329         tmake_file="${tmake_file} t-lynx"
1330         extra_options="${extra_options} lynx.opt"
1331         thread_file=lynx
1332         gnu_ld=yes
1333         gas=yes
1334         ;;
1335 i[34567]86-*-nto-qnx*)
1336         tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
1337         extra_options="${extra_options} i386/nto.opt"
1338         tmake_file="${tmake_file} i386/t-nto"
1339         gnu_ld=yes
1340         gas=yes
1341         ;;
1342 i[34567]86-*-rtems*)
1343         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"
1344         tmake_file="${tmake_file} i386/t-rtems t-rtems"
1345         ;;
1346 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
1347         tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file}"
1348         # Set default arch_32 to pentium4, tune_32 to generic like the other
1349         # i386 targets, although config.guess defaults to i386-pc-solaris2*.
1350         case ${target} in
1351         *-*-solaris2.[89]*)
1352                 # Solaris 8 and 9/x86 cannot execute SSE/SSE2 instructions by
1353                 # default.
1354                 with_arch_32=${with_arch_32:-pentiumpro}
1355                 ;;
1356         *)
1357                 with_arch_32=${with_arch_32:-pentium4}
1358                 ;;
1359         esac
1360         with_tune_32=${with_tune_32:-generic}
1361         case ${target} in
1362         *-*-solaris2.1[0-9]*)
1363                 tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h"
1364                 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1365                 tmake_file="$tmake_file i386/t-sol2-64"
1366                 need_64bit_isa=yes
1367                 case X"${with_cpu}" in
1368                 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)
1369                         ;;
1370                 X)
1371                         if test x$with_cpu_64 = x; then
1372                                 with_cpu_64=generic
1373                         fi
1374                         ;;
1375                 *)
1376                         echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1377                         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
1378                         exit 1
1379                         ;;
1380                 esac
1381                 ;;
1382         esac
1383         ;;
1384 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
1385         tm_file="${tm_file} i386/unix.h i386/att.h elfos.h vx-common.h"
1386         case ${target} in
1387           *-vxworksae*)
1388             tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
1389             tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1390             ;;
1391           *)
1392             tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
1393             tmake_file="${tmake_file} i386/t-vxworks"
1394             ;;
1395         esac
1396         ;;
1397 i[34567]86-*-cygwin*)
1398         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"
1399         xm_file=i386/xm-cygwin.h
1400         tmake_file="${tmake_file} i386/t-cygming i386/t-cygwin t-slibgcc"
1401         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1402         extra_options="${extra_options} i386/cygming.opt"
1403         extra_objs="winnt.o winnt-stubs.o"
1404         c_target_objs="${c_target_objs} msformat-c.o"
1405         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1406         if test x$enable_threads = xyes; then
1407                 thread_file='posix'
1408         fi
1409         use_gcc_stdint=wrap
1410         ;;
1411 i[34567]86-*-mingw* | x86_64-*-mingw*)
1412         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
1413         xm_file=i386/xm-mingw32.h
1414         case ${target} in
1415                 x86_64-*-* | *-w64-*)
1416                         need_64bit_isa=yes
1417                         ;;
1418                 *)
1419                         ;;
1420         esac
1421         if test x$enable_threads = xposix ; then
1422                 tm_file="${tm_file} i386/mingw-pthread.h"
1423         fi
1424         tm_file="${tm_file} i386/mingw32.h"
1425         # This makes the logic if mingw's or the w64 feature set has to be used
1426         case ${target} in
1427                 *-w64-*)
1428                         user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1429                         user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
1430                         tm_file="${tm_file} i386/mingw-w64.h"
1431                         if test x$enable_targets = xall; then
1432                                 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1433                                 case X"${with_cpu}" in
1434                                 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)
1435                                         ;;
1436                                 X)
1437                                         if test x$with_cpu_64 = x; then
1438                                                 with_cpu_64=generic
1439                                         fi
1440                                         ;;
1441                                 *)
1442                                         echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1443                                         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
1444                                         exit 1
1445                                         ;;
1446                                 esac
1447                         fi
1448                         ;;
1449                 *)
1450                         ;;
1451         esac
1452         tm_file="${tm_file} i386/mingw-stdint.h"
1453         tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
1454         case ${target} in
1455                x86_64-w64-*)
1456                         tmake_file="${tmake_file} i386/t-mingw-w64"
1457                         ;;
1458                i[34567]86-w64-*)
1459                         tmake_file="${tmake_file} i386/t-mingw-w32"
1460                         ;;
1461         esac
1462         native_system_header_dir=/mingw/include
1463         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1464         extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
1465         case ${target} in
1466                 *-w64-*)
1467                         extra_options="${extra_options} i386/mingw-w64.opt"
1468                         ;;
1469                 *)
1470                         ;;
1471         esac
1472         extra_objs="winnt.o winnt-stubs.o"
1473         c_target_objs="${c_target_objs} msformat-c.o"
1474         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1475         default_use_cxa_atexit=yes
1476         use_gcc_stdint=wrap
1477         case ${enable_threads} in
1478           "" | yes | win32)       thread_file='win32'
1479             tmake_file="${tmake_file} i386/t-gthr-win32"
1480             ;;
1481           posix)
1482             thread_file='posix'
1483             ;;
1484         esac
1485         case ${target} in
1486                 *mingw32crt*)
1487                         tm_file="${tm_file} i386/crtdll.h"
1488                         ;;
1489                 *mingw32msv* | *mingw*)
1490                         ;;
1491         esac
1492         ;;
1493 i[34567]86-*-interix3*)
1494         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"
1495         tmake_file="${tmake_file} i386/t-interix"
1496         extra_options="${extra_options} rpath.opt interix.opt"
1497         extra_objs=winnt.o
1498         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1499         if test x$enable_threads = xyes ; then
1500                 thread_file='posix'
1501         fi
1502         if test x$stabs = xyes ; then
1503                 tm_file="${tm_file} dbxcoff.h"
1504         fi
1505         ;;
1506 ia64*-*-elf*)
1507         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
1508         tmake_file="ia64/t-ia64"
1509         target_cpu_default="0"
1510         if test x$gas = xyes
1511         then
1512                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1513         fi
1514         if test x$gnu_ld = xyes
1515         then
1516                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1517         fi
1518         ;;
1519 ia64*-*-freebsd*)
1520         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1521         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1522         tmake_file="${tmake_file} ia64/t-ia64"
1523         ;;
1524 ia64*-*-linux*)
1525         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
1526         tmake_file="${tmake_file} ia64/t-ia64 t-libunwind"
1527         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1528         ;;
1529 ia64*-*-hpux*)
1530         tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
1531         tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
1532         target_cpu_default="MASK_GNU_AS"
1533         case x$enable_threads in
1534         x | xyes | xposix )
1535                 thread_file=posix
1536                 ;;
1537         esac
1538         use_collect2=no
1539         c_target_objs="ia64-c.o"
1540         cxx_target_objs="ia64-c.o"
1541         extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
1542         use_gcc_stdint=wrap
1543         tm_file="${tm_file} hpux-stdint.h"
1544         case ${target} in
1545         *-*-hpux11.3*)
1546                 tm_file="${tm_file} ia64/hpux-unix2003.h"
1547                 ;;
1548         esac
1549         ;;
1550 ia64-hp-*vms*)
1551         tm_file="${tm_file} elfos.h ia64/sysv4.h ia64/elf.h ia64/vms.h ia64/vms64.h"
1552         xm_file="vms/xm-vms.h vms/xm-vms64.h"
1553         tmake_file="${tmake_file} vms/t-vms64 ia64/t-ia64"
1554         target_cpu_default="0"
1555         if test x$gas = xyes
1556         then
1557                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1558         fi
1559         extra_options="${extra_options} ia64/vms.opt"
1560         ;;
1561 iq2000*-*-elf*)
1562         tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
1563         tmake_file=iq2000/t-iq2000
1564         out_file=iq2000/iq2000.c
1565         md_file=iq2000/iq2000.md
1566         ;;
1567 lm32-*-elf*)
1568         tm_file="dbxelf.h elfos.h ${tm_file}"
1569         tmake_file="${tmake_file} lm32/t-lm32"
1570         ;;
1571 lm32-*-rtems*)
1572         tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
1573         tmake_file="${tmake_file} lm32/t-lm32"
1574         tmake_file="${tmake_file} t-rtems"
1575          ;;
1576 lm32-*-uclinux*)
1577         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
1578         tmake_file="${tmake_file} lm32/t-lm32"
1579         ;;
1580 m32r-*-elf*)
1581         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1582         ;;
1583 m32rle-*-elf*)
1584         tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
1585         ;;
1586 m32r-*-rtems*)
1587         tm_file="dbxelf.h elfos.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
1588         tmake_file="m32r/t-m32r t-rtems"
1589         ;;
1590 m32r-*-linux*)
1591         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
1592         # We override the tmake_file for linux -- why?
1593         tmake_file="m32r/t-linux t-slibgcc"
1594         gnu_ld=yes
1595         if test x$enable_threads = xyes; then
1596                 thread_file='posix'
1597         fi
1598         ;;
1599 m32rle-*-linux*)
1600         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
1601         # We override the tmake_file for linux -- why?
1602         tmake_file="m32r/t-linux t-slibgcc"
1603         gnu_ld=yes
1604         if test x$enable_threads = xyes; then
1605                 thread_file='posix'
1606         fi
1607         ;;
1608 m68k-*-elf* | fido-*-elf*)
1609         case ${target} in
1610         fido-*-elf*)
1611                 # Check that $with_cpu makes sense.
1612                 case $with_cpu in
1613                 "" | "fidoa")
1614                         ;;
1615                 *)
1616                         echo "Cannot accept --with-cpu=$with_cpu"
1617                         exit 1
1618                         ;;
1619                 esac
1620                 with_cpu=fidoa
1621                 ;;
1622         *)
1623                 default_m68k_cpu=68020
1624                 default_cf_cpu=5206
1625                 ;;
1626         esac
1627         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"
1628         tm_defines="${tm_defines} MOTOROLA=1"
1629         tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1630         # Add multilibs for targets other than fido.
1631         case ${target} in
1632         fido-*-elf*)
1633                 ;;
1634         *)
1635                 tmake_file="$tmake_file m68k/t-mlibs"
1636                 ;;
1637         esac
1638         ;;
1639 m68k*-*-netbsdelf*)
1640         default_m68k_cpu=68020
1641         default_cf_cpu=5475
1642         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1643         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1644         tm_defines="${tm_defines} MOTOROLA=1"
1645         ;;
1646 m68k*-*-openbsd*)
1647         default_m68k_cpu=68020
1648         default_cf_cpu=5475
1649         # needed to unconfuse gdb
1650         tm_defines="${tm_defines} OBSD_OLD_GAS"
1651         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1652         extra_options="${extra_options} openbsd.opt"
1653         tmake_file="t-openbsd m68k/t-openbsd"
1654         # we need collect2 until our bug is fixed...
1655         use_collect2=yes
1656         ;;
1657 m68k-*-uclinux*)                # Motorola m68k/ColdFire running uClinux
1658                                 # with uClibc, using the new GNU/Linux-style
1659                                 # ABI.
1660         default_m68k_cpu=68020
1661         default_cf_cpu=5206
1662         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"
1663         extra_options="${extra_options} m68k/uclinux.opt"
1664         tm_defines="${tm_defines} MOTOROLA=1"
1665         tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
1666         ;;
1667 m68k-*-linux*)                  # Motorola m68k's running GNU/Linux
1668                                 # with ELF format using glibc 2
1669                                 # aka the GNU/Linux C library 6.
1670         default_m68k_cpu=68020
1671         default_cf_cpu=5475
1672         with_arch=${with_arch:-m68k}
1673         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
1674         extra_options="${extra_options} m68k/ieee.opt"
1675         tm_defines="${tm_defines} MOTOROLA=1"
1676         tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
1677         ;;
1678 m68k-*-rtems*)
1679         default_m68k_cpu=68020
1680         default_cf_cpu=5206
1681         tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems m68k/t-mlibs"
1682         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"
1683         tm_defines="${tm_defines} MOTOROLA=1"
1684         ;;
1685 mcore-*-elf)
1686         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
1687         tmake_file=mcore/t-mcore
1688         inhibit_libc=true
1689         ;;
1690 mep-*-*)
1691         tm_file="dbxelf.h elfos.h ${tm_file}"
1692         tmake_file=mep/t-mep
1693         c_target_objs="mep-pragma.o"
1694         cxx_target_objs="mep-pragma.o"
1695         if test -d "${srcdir}/../newlib/libc/include" &&
1696            test "x$with_headers" = x; then
1697                 with_headers=yes
1698         fi
1699         use_gcc_stdint=wrap
1700         ;;
1701 microblaze*-linux*)
1702         tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
1703         c_target_objs="${c_target_objs} microblaze-c.o"
1704         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1705         tmake_file="${tmake_file} t-linux microblaze/t-microblaze"
1706         ;;
1707 microblaze*-*-*)
1708         tm_file="${tm_file} dbxelf.h"
1709         c_target_objs="${c_target_objs} microblaze-c.o"
1710         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1711         tmake_file="${tmake_file} microblaze/t-microblaze"
1712         ;;
1713 mips-sgi-irix6.5*)
1714         tm_file="elfos.h ${tm_file} mips/iris6.h"
1715         tmake_file="mips/t-irix6 t-slibgcc"
1716         extra_options="${extra_options} rpath.opt mips/iris6.opt"
1717         target_cpu_default="MASK_ABICALLS"
1718         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
1719         # Only IRIX Development Foundation 1.3 for IRIX 6.5 provides stdint.h.
1720         use_gcc_stdint=wrap
1721         if test "x$stabs" = xyes
1722         then
1723                 tm_file="${tm_file} dbx.h"
1724         fi
1725         if test "x$gnu_ld" = xyes
1726         then
1727                 tm_defines="${tm_defines} IRIX_USING_GNU_LD"
1728         fi
1729         case ${enable_threads}:${have_pthread_h} in
1730           "":yes | yes:yes ) thread_file=posix ;;
1731         esac
1732         ;;
1733 mips*-*-netbsd*)                        # NetBSD/mips, either endian.
1734         target_cpu_default="MASK_ABICALLS"
1735         tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
1736         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1737         ;;
1738 mips64*-*-linux* | mipsisa64*-*-linux*)
1739         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"
1740         tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16"
1741         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
1742         case ${target} in
1743                 mips64el-st-linux-gnu)
1744                         tm_file="${tm_file} mips/st.h"
1745                         tmake_file="${tmake_file} mips/t-st"
1746                         ;;
1747                 mips64octeon*-*-linux*)
1748                         tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
1749                         target_cpu_default=MASK_SOFT_FLOAT_ABI
1750                         ;;
1751                 mipsisa64r2*-*-linux*)
1752                         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1753                         ;;
1754         esac
1755         gnu_ld=yes
1756         gas=yes
1757         test x$with_llsc != x || with_llsc=yes
1758         ;;
1759 mips*-*-linux*)                         # Linux MIPS, either endian.
1760         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h"
1761         tmake_file="${tmake_file} mips/t-libgcc-mips16"
1762         if test x$enable_targets = xall; then
1763                 tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
1764                 tmake_file="${tmake_file} mips/t-linux64"
1765         fi
1766         case ${target} in
1767         mipsisa32r2*)
1768                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1769                 ;;
1770         mipsisa32*)
1771                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1772         esac
1773         test x$with_llsc != x || with_llsc=yes
1774         ;;
1775 mips*-*-openbsd*)
1776         tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_OBJECT OBSD_HAS_CORRECT_SPECS"
1777         target_cpu_default="MASK_ABICALLS"
1778         tm_file="mips/mips.h openbsd.h openbsd-stdint.h openbsd-libpthread.h mips/openbsd.h mips/sdb.h"
1779         extra_options="${extra_options} openbsd.opt"
1780         case ${target} in
1781         mips*el-*-openbsd*)
1782             tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0";;
1783         *)  tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=MASK_BIG_ENDIAN";;
1784         esac
1785         ;;
1786 mips*-sde-elf*)
1787         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/sde.h"
1788         tmake_file="mips/t-sde mips/t-libgcc-mips16"
1789         extra_options="${extra_options} mips/sde.opt"
1790         case "${with_newlib}" in
1791           yes)
1792             # newlib / libgloss.
1793             ;;
1794           *)
1795             # MIPS toolkit libraries.
1796             tm_file="$tm_file mips/sdemtk.h"
1797             tmake_file="$tmake_file mips/t-sdemtk"
1798             case ${enable_threads} in
1799               "" | yes | mipssde)
1800                 thread_file='mipssde'
1801                 ;;
1802             esac
1803             ;;
1804         esac
1805         case ${target} in
1806           mipsisa32r2*)
1807             tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1808             ;;
1809           mipsisa32*)
1810             tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
1811             ;;
1812           mipsisa64r2*)
1813             tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
1814             ;;
1815           mipsisa64*)
1816             tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
1817             ;;
1818         esac
1819         ;;
1820 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
1821 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
1822 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
1823 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
1824         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1825         tmake_file="mips/t-isa3264 mips/t-libgcc-mips16"
1826         case ${target} in
1827           mipsisa32r2*)
1828             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1829             ;;
1830           mipsisa32*)
1831             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1832             ;;
1833           mipsisa64r2*)
1834             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1835             ;;
1836           mipsisa64*)
1837             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
1838             ;;
1839         esac
1840         case ${target} in
1841           mipsisa32*-*-elfoabi*)
1842             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
1843             tm_file="${tm_file} mips/elfoabi.h"
1844             ;;
1845           mipsisa64*-*-elfoabi*)
1846             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
1847             tm_file="${tm_file} mips/elfoabi.h"
1848             ;;
1849           *-*-elf*)
1850             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1851             ;;
1852         esac
1853         ;;
1854 mipsisa64sr71k-*-elf*)
1855         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1856         tmake_file=mips/t-sr71k
1857         target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1858         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
1859         ;;
1860 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
1861         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1862         tmake_file="mips/t-elf mips/t-libgcc-mips16 mips/t-sb1"
1863         target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1864         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
1865         ;;
1866 mips-*-elf* | mipsel-*-elf*)
1867         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1868         tmake_file="mips/t-elf mips/t-libgcc-mips16"
1869         ;;
1870 mips64-*-elf* | mips64el-*-elf*)
1871         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
1872         tmake_file="mips/t-elf mips/t-libgcc-mips16"
1873         target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1874         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1875         ;;
1876 mips64vr-*-elf* | mips64vrel-*-elf*)
1877         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
1878         tmake_file=mips/t-vr
1879         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
1880         ;;
1881 mips64orion-*-elf* | mips64orionel-*-elf*)
1882         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
1883         tmake_file="mips/t-elf mips/t-libgcc-mips16"
1884         target_cpu_default="MASK_64BIT|MASK_FLOAT64"
1885         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1886         ;;
1887 mips*-*-rtems*)
1888         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
1889         tmake_file="mips/t-elf mips/t-libgcc-mips16 t-rtems mips/t-rtems"
1890         ;;
1891 mips-wrs-vxworks)
1892         tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
1893         tmake_file="${tmake_file} mips/t-vxworks"
1894         ;;
1895 mipstx39-*-elf* | mipstx39el-*-elf*)
1896         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
1897         tmake_file="mips/t-r3900 mips/t-libgcc-mips16"
1898         ;;
1899 mmix-knuth-mmixware)
1900         tm_file="${tm_file} newlib-stdint.h"
1901         need_64bit_hwint=yes
1902         use_gcc_stdint=wrap
1903         ;;
1904 mn10300-*-*)
1905         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1906         if test x$stabs = xyes
1907         then
1908                 tm_file="${tm_file} dbx.h"
1909         fi
1910         use_collect2=no
1911         use_gcc_stdint=wrap
1912         ;;
1913 pdp11-*-*)
1914         tm_file="${tm_file} newlib-stdint.h"
1915         use_gcc_stdint=wrap
1916         ;;
1917 picochip-*)
1918         tm_file="${tm_file} newlib-stdint.h"
1919         use_gcc_stdint=wrap
1920         tmake_file="picochip/t-picochip t-pnt16-warn"
1921         ;;
1922 # port not yet contributed
1923 #powerpc-*-openbsd*)
1924 #       tmake_file="${tmake_file} rs6000/t-fprules"
1925 #       extra_headers=
1926 #       ;;
1927 powerpc-*-darwin*)
1928         extra_options="${extra_options} rs6000/darwin.opt"
1929         case ${target} in
1930           *-darwin1[0-9]* | *-darwin[8-9]*)
1931             tmake_file="${tmake_file} rs6000/t-darwin8"
1932             tm_file="${tm_file} rs6000/darwin8.h"
1933             ;;
1934           *-darwin7*)
1935             tm_file="${tm_file} rs6000/darwin7.h"
1936             ;;
1937           *-darwin[0-6]*)
1938             ;;
1939         esac
1940         tmake_file="${tmake_file} t-slibgcc"
1941         extra_headers=altivec.h
1942         ;;
1943 powerpc64-*-darwin*)
1944         extra_options="${extra_options} ${cpu_type}/darwin.opt"
1945         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
1946         tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
1947         extra_headers=altivec.h
1948         ;;
1949 powerpc-*-freebsd*)
1950         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
1951         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1952         extra_options="${extra_options} rs6000/sysv4.opt"
1953         ;;
1954 powerpc-*-netbsd*)
1955         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
1956         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1957         tmake_file="${tmake_file} rs6000/t-netbsd"
1958         extra_options="${extra_options} rs6000/sysv4.opt"
1959         ;;
1960 powerpc-*-eabispe*)
1961         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"
1962         extra_options="${extra_options} rs6000/sysv4.opt"
1963         tmake_file="rs6000/t-spe rs6000/t-ppccomm"
1964         use_gcc_stdint=wrap
1965         ;;
1966 powerpc-*-eabisimaltivec*)
1967         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"
1968         extra_options="${extra_options} rs6000/sysv4.opt"
1969         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
1970         use_gcc_stdint=wrap
1971         ;;
1972 powerpc-*-eabisim*)
1973         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"
1974         extra_options="${extra_options} rs6000/sysv4.opt"
1975         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1976         use_gcc_stdint=wrap
1977         ;;
1978 powerpc-*-elf*)
1979         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
1980         extra_options="${extra_options} rs6000/sysv4.opt"
1981         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1982         ;;
1983 powerpc-*-eabialtivec*)
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/eabialtivec.h"
1985         extra_options="${extra_options} rs6000/sysv4.opt"
1986         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
1987         use_gcc_stdint=wrap
1988         ;;
1989 powerpc-xilinx-eabi*)
1990         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"
1991         extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
1992         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
1993         use_gcc_stdint=wrap
1994         ;;
1995 powerpc-*-eabi*)
1996         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"
1997         extra_options="${extra_options} rs6000/sysv4.opt"
1998         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1999         use_gcc_stdint=wrap
2000         ;;
2001 powerpc-*-rtems*)
2002         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"
2003         extra_options="${extra_options} rs6000/sysv4.opt"
2004         tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
2005         ;;
2006 powerpc-*-linux* | powerpc64-*-linux*)
2007         tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
2008         extra_options="${extra_options} rs6000/sysv4.opt"
2009         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2010         maybe_biarch=yes
2011         case ${target} in
2012             powerpc64-*-linux*spe* | powerpc64-*-linux*paired*)
2013                 echo "*** Configuration ${target} not supported" 1>&2
2014                 exit 1
2015                 ;;
2016             powerpc-*-linux*spe* | powerpc-*-linux*paired*)
2017                 maybe_biarch=
2018                 ;;
2019             powerpc64-*-linux*)
2020                 test x$with_cpu != x || cpu_is_64bit=yes
2021                 maybe_biarch=always
2022                 ;;
2023         esac
2024         case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
2025             always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
2026                 if test x$cpu_is_64bit = xyes; then
2027                     tm_file="${tm_file} rs6000/default64.h"
2028                 fi
2029                 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2030                 tmake_file="$tmake_file rs6000/t-linux64"
2031                 extra_options="${extra_options} rs6000/linux64.opt"
2032                 ;;
2033             *)
2034                 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2035                 ;;
2036         esac
2037         case ${target} in
2038             powerpc*-*-linux*ppc476*)
2039                 tm_file="${tm_file} rs6000/476.h"
2040                 extra_options="${extra_options} rs6000/476.opt" ;;
2041             powerpc*-*-linux*altivec*)
2042                 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2043             powerpc*-*-linux*spe*)
2044                 tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2045             powerpc*-*-linux*paired*)
2046                 tm_file="${tm_file} rs6000/750cl.h" ;;
2047         esac
2048         if test x${enable_secureplt} = xyes; then
2049                 tm_file="rs6000/secureplt.h ${tm_file}"
2050         fi
2051         ;;
2052 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
2053         tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
2054         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
2055         extra_options="${extra_options} rs6000/sysv4.opt"
2056         extra_headers=ppc-asm.h
2057         case ${target} in
2058           *-vxworksae*)
2059             tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h"
2060             tmake_file="${tmake_file} rs6000/t-vxworksae"
2061             ;;
2062           *-vxworks*)
2063             tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2064             ;;
2065         esac
2066         ;;
2067 powerpc-*-lynxos*)
2068         xm_defines=POSIX
2069         tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2070         tmake_file="t-lynx rs6000/t-lynx"
2071         extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2072         thread_file=lynx
2073         gnu_ld=yes
2074         gas=yes
2075         ;;
2076 powerpcle-*-elf*)
2077         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2078         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2079         extra_options="${extra_options} rs6000/sysv4.opt"
2080         ;;
2081 powerpcle-*-eabisim*)
2082         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"
2083         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2084         extra_options="${extra_options} rs6000/sysv4.opt"
2085         use_gcc_stdint=wrap
2086         ;;
2087 powerpcle-*-eabi*)
2088         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"
2089         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2090         extra_options="${extra_options} rs6000/sysv4.opt"
2091         use_gcc_stdint=wrap
2092         ;;
2093 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2094         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2095         tmake_file="rs6000/t-aix43 t-slibgcc"
2096         extra_options="${extra_options} rs6000/aix64.opt"
2097         use_collect2=yes
2098         thread_file='aix'
2099         use_gcc_stdint=provide
2100         extra_headers=
2101         ;;
2102 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2103         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2104         extra_options="${extra_options} rs6000/aix64.opt"
2105         tmake_file="rs6000/t-aix43 t-slibgcc"
2106         use_collect2=yes
2107         thread_file='aix'
2108         use_gcc_stdint=wrap
2109         extra_headers=
2110         ;;
2111 rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2112         tm_file="${tm_file} rs6000/aix.h rs6000/aix52.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=
2119         ;;
2120 rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2121         tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2122         tmake_file="rs6000/t-aix52 t-slibgcc"
2123         extra_options="${extra_options} rs6000/aix64.opt"
2124         use_collect2=yes
2125         thread_file='aix'
2126         use_gcc_stdint=wrap
2127         extra_headers=altivec.h
2128         ;;
2129 rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2130         tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2131         tmake_file="rs6000/t-aix52 t-slibgcc"
2132         extra_options="${extra_options} rs6000/aix64.opt"
2133         use_collect2=yes
2134         thread_file='aix'
2135         use_gcc_stdint=wrap
2136         extra_headers=altivec.h
2137         ;;
2138 rx-*-elf*)
2139         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2140         libgcc_tm_file="${libgcc_tm_file} rx/rx-abi.h rx/rx-lib.h"
2141         tmake_file="${tmake_file} rx/t-rx"
2142         ;;
2143 s390-*-linux*)
2144         tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2145         if test x$enable_targets = xall; then
2146                 tmake_file="${tmake_file} s390/t-linux64"
2147         fi
2148         ;;
2149 s390x-*-linux*)
2150         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2151         tm_p_file=s390/s390-protos.h
2152         md_file=s390/s390.md
2153         extra_modes=s390/s390-modes.def
2154         out_file=s390/s390.c
2155         tmake_file="${tmake_file} s390/t-linux64"
2156         ;;
2157 s390x-ibm-tpf*)
2158         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
2159         tm_p_file=s390/s390-protos.h
2160         md_file=s390/s390.md
2161         extra_modes=s390/s390-modes.def
2162         out_file=s390/s390.c
2163         thread_file='tpf'
2164         extra_options="${extra_options} s390/tpf.opt"
2165         ;;
2166 score-*-elf)
2167         gas=yes
2168         gnu_ld=yes
2169         tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
2170         ;;
2171 sh-*-elf* | sh[12346l]*-*-elf* | \
2172   sh-*-linux* | sh[2346lbe]*-*-linux* | \
2173   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2174   sh64-*-netbsd* | sh64l*-*-netbsd*)
2175         tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2176         if test x${with_endian} = x; then
2177                 case ${target} in
2178                 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2179                 shbe-*-* | sheb-*-*)               with_endian=big,little ;;
2180                 sh[1234]l* | sh[34]*-*-linux*)     with_endian=little ;;
2181                 shl* | sh64l* | sh*-*-linux* | \
2182                   sh5l* | sh-superh-elf)           with_endian=little,big ;;
2183                 sh[1234]*-*-*)                     with_endian=big ;;
2184                 *)                                 with_endian=big,little ;;
2185                 esac
2186         fi
2187         # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2188         #  First word : the default endian.
2189         #  Second word: the secondary endian (optional).
2190         case ${with_endian} in
2191         big)            TM_ENDIAN_CONFIG=mb ;;
2192         little)         TM_ENDIAN_CONFIG=ml ;;
2193         big,little)     TM_ENDIAN_CONFIG="mb ml" ;;
2194         little,big)     TM_ENDIAN_CONFIG="ml mb" ;;
2195         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
2196         esac
2197         case ${with_endian} in
2198         little*)        tm_file="sh/little.h ${tm_file}" ;;
2199         esac
2200         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
2201         case ${target} in
2202         sh*-*-linux*)   tmake_file="${tmake_file} sh/t-linux"
2203                         tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
2204         sh*-*-netbsd*)
2205                         tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h"
2206                         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2207
2208                         ;;
2209         sh*-superh-elf) if test x$with_libgloss != xno; then
2210                                 with_libgloss=yes
2211                                 tm_file="${tm_file} sh/newlib.h"
2212                         fi
2213                         tm_file="${tm_file} sh/embed-elf.h"
2214                         tm_file="${tm_file} sh/superh.h"
2215                         extra_options="${extra_options} sh/superh.opt" ;;
2216         *)              if test x$with_newlib = xyes \
2217                            && test x$with_libgloss = xyes; then
2218                                 tm_file="${tm_file} sh/newlib.h"
2219                         fi
2220                         tm_file="${tm_file} sh/embed-elf.h" ;;
2221         esac
2222         case ${target} in
2223         sh5*-*-netbsd*)
2224                 # SHmedia, 32-bit ABI
2225                 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd"
2226                 ;;
2227         sh64*-netbsd*)
2228                 # SHmedia, 64-bit ABI
2229                 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd sh/t-netbsd-sh5-64"
2230                 ;;
2231         *-*-netbsd)
2232                 tmake_file="${tmake_file} sh/t-netbsd"
2233                 ;;
2234         sh64*-*-linux*)
2235                 tmake_file="${tmake_file} sh/t-sh64"
2236                 tm_file="${tm_file} sh/sh64.h"
2237                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2238                 ;;
2239         sh64*)
2240                 tmake_file="${tmake_file} sh/t-sh64"
2241                 tm_file="${tm_file} sh/sh64.h"
2242                 if test x$with_newlib = xyes; then
2243                         tm_file="${tm_file} newlib-stdint.h"
2244                 fi
2245                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2246                 ;;
2247         *-*-elf*)
2248                 tm_file="${tm_file} newlib-stdint.h"
2249                 ;;
2250         esac
2251         # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2252         case `echo ${target} | sed 's/e[lb]-/-/'` in
2253         sh64*-*-netbsd*)        sh_cpu_target=sh5-64media ;;
2254         sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
2255         sh4a_single_only*)      sh_cpu_target=sh4a-single-only ;;
2256         sh4a_single*)           sh_cpu_target=sh4a-single ;;
2257         sh4a_nofpu*)            sh_cpu_target=sh4a-nofpu ;;
2258         sh4al)                  sh_cpu_target=sh4al ;;
2259         sh4a*)                  sh_cpu_target=sh4a ;;
2260         sh4_single_only*)       sh_cpu_target=sh4-single-only ;;
2261         sh4_single*)            sh_cpu_target=sh4-single ;;
2262         sh4_nofpu*)             sh_cpu_target=sh4-nofpu ;;
2263         sh4* | sh-superh-*)     sh_cpu_target=sh4 ;;
2264         sh3e*)                  sh_cpu_target=sh3e ;;
2265         sh*-*-netbsd* | sh3*)   sh_cpu_target=sh3 ;;
2266         sh2a_single_only*)      sh_cpu_target=sh2a-single-only ;;
2267         sh2a_single*)           sh_cpu_target=sh2a-single ;;
2268         sh2a_nofpu*)            sh_cpu_target=sh2a-nofpu ;;
2269         sh2a*)                  sh_cpu_target=sh2a ;;
2270         sh2e*)                  sh_cpu_target=sh2e ;;
2271         sh2*)                   sh_cpu_target=sh2 ;;
2272         *)                      sh_cpu_target=sh1 ;;
2273         esac
2274         # did the user say --without-fp ?
2275         if test x$with_fp = xno; then
2276                 case ${sh_cpu_target} in
2277                 sh5-*media)     sh_cpu_target=${sh_cpu_target}-nofpu ;;
2278                 sh4al | sh1)    ;;
2279                 sh4a* )         sh_cpu_target=sh4a-nofpu ;;
2280                 sh4*)           sh_cpu_target=sh4-nofpu ;;
2281                 sh3*)           sh_cpu_target=sh3 ;;
2282                 sh2a*)          sh_cpu_target=sh2a-nofpu ;;
2283                 sh2*)           sh_cpu_target=sh2 ;;
2284                 *)      echo --without-fp not available for $target: ignored
2285                 esac
2286                 tm_defines="$tm_defines STRICT_NOFPU=1"
2287         fi
2288         sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2289         case $sh_cpu_default in
2290         sh5-64media-nofpu | sh5-64media | \
2291           sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2292           sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2293           sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2294           sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2295           sh3e | sh3 | sh2e | sh2 | sh1) ;;
2296         "")     sh_cpu_default=${sh_cpu_target} ;;
2297         *)      echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2298         esac
2299         sh_multilibs=${with_multilib_list}
2300         if test "$sh_multilibs" = "default" ; then
2301                 case ${target} in
2302                 sh64-superh-linux* | \
2303                 sh[1234]*)      sh_multilibs=${sh_cpu_target} ;;
2304                 sh64* | sh5*)   sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2305                 sh-superh-*)    sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2306                 sh*-*-linux*)   sh_multilibs=m1,m3e,m4 ;;
2307                 sh*-*-netbsd*)  sh_multilibs=m3,m3e,m4 ;;
2308                 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2309                 esac
2310                 if test x$with_fp = xno; then
2311                         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`"
2312                 fi
2313         fi
2314         target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2315         tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2316         tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2317         sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2318         for sh_multilib in ${sh_multilibs}; do
2319                 case ${sh_multilib} in
2320                 m1 | m2 | m2e | m3 | m3e | \
2321                 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2322                 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2323                 m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2324                 m5-64media | m5-64media-nofpu | \
2325                 m5-32media | m5-32media-nofpu | \
2326                 m5-compact | m5-compact-nofpu)
2327                         # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2328                         # It is passed to MULTIILIB_OPTIONS verbatim.
2329                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2330                         tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2331                         ;;
2332                 \!*)    # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2333                         # It is passed the MULTILIB_EXCEPTIONS verbatim.
2334                         TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
2335                 *)
2336                         echo "with_multilib_list=${sh_multilib} not supported."
2337                         exit 1
2338                         ;;
2339                 esac
2340         done
2341         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
2342         if test x${enable_incomplete_targets} = xyes ; then
2343                 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"
2344         fi
2345         tm_file="$tm_file ./sysroot-suffix.h"
2346         tmake_file="$tmake_file t-sysroot-suffix"
2347         ;;
2348 sh-*-rtems*)
2349         tmake_file="sh/t-sh t-rtems sh/t-rtems"
2350         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
2351         ;;
2352 sh-wrs-vxworks)
2353         tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
2354         tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
2355         ;;
2356 sparc-*-elf*)
2357         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
2358         case ${target} in
2359             *-leon-*)
2360                 tmake_file="sparc/t-sparc sparc/t-leon"
2361                 ;;
2362             *-leon[3-9]*)
2363                 tmake_file="sparc/t-sparc sparc/t-leon3"
2364                 ;;
2365             *)
2366                 tmake_file="sparc/t-sparc sparc/t-elf"
2367                 ;;
2368         esac
2369         ;;
2370 sparc-*-rtems*)
2371         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
2372         tmake_file="sparc/t-sparc sparc/t-elf t-rtems"
2373         ;;
2374 sparc-*-linux*)
2375         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h"
2376         extra_options="${extra_options} sparc/long-double-switch.opt"
2377         case ${target} in
2378             *-leon-*)
2379                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
2380                 ;;
2381             *-leon[3-9]*)
2382                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
2383                 ;;
2384             *)
2385                 tmake_file="${tmake_file} sparc/t-sparc"
2386                 ;;
2387         esac
2388         if test x$enable_targets = xall; then
2389                 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
2390                 tmake_file="${tmake_file} sparc/t-linux64"
2391         else
2392                 tm_file="${tm_file} sparc/linux.h"
2393         fi
2394         ;;
2395 sparc-*-netbsdelf*)
2396         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2397         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2398         extra_options="${extra_options} sparc/long-double-switch.opt"
2399         tmake_file="${tmake_file} sparc/t-sparc"
2400         ;;
2401 sparc*-*-solaris2*)
2402         tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sol2-bi.h"
2403         case ${target} in
2404             sparc64-*-* | sparcv9-*-*)
2405                 tm_file="sparc/default-64.h ${tm_file}"
2406                 ;;
2407             *)
2408                 test x$with_cpu != x || with_cpu=v9
2409                 ;;
2410         esac
2411         tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2-64"
2412         ;;
2413 sparc-wrs-vxworks)
2414         tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2415         tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
2416         ;;
2417 sparc64-*-elf*)
2418         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
2419         extra_options="${extra_options}"
2420         tmake_file="${tmake_file} sparc/t-sparc"
2421         ;;
2422 sparc64-*-rtems*)
2423         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
2424         extra_options="${extra_options}"
2425         tmake_file="${tmake_file} sparc/t-sparc t-rtems"
2426         ;;
2427 sparc64-*-linux*)
2428         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"
2429         extra_options="${extra_options} sparc/long-double-switch.opt"
2430         tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
2431         ;;
2432 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2433         tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2434         extra_options="${extra_options} sparc/long-double-switch.opt"
2435         case "x$with_cpu" in
2436                 xultrasparc) ;;
2437                 x) with_cpu=ultrasparc ;;
2438                 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2439         esac
2440         tmake_file="${tmake_file} sparc/t-sparc"
2441         ;;
2442 sparc64-*-netbsd*)
2443         tm_file="sparc/biarch64.h ${tm_file}"
2444         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2445         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2446         extra_options="${extra_options} sparc/long-double-switch.opt"
2447         tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
2448         ;;
2449 sparc64-*-openbsd*)
2450         tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
2451         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
2452         extra_options="${extra_options} openbsd.opt"
2453         extra_options="${extra_options}"
2454         gas=yes gnu_ld=yes
2455         with_cpu=ultrasparc
2456         tmake_file="${tmake_file} sparc/t-sparc"
2457         ;;
2458 spu-*-elf*)
2459         tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
2460         tmake_file="spu/t-spu-elf"
2461         native_system_header_dir=/include
2462         extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
2463         extra_modes=spu/spu-modes.def
2464         c_target_objs="${c_target_objs} spu-c.o"
2465         cxx_target_objs="${cxx_target_objs} spu-c.o"
2466         ;;
2467 tic6x-*-elf)
2468         tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
2469         tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
2470         libgcc_tm_file="${libgcc_tm_file} c6x/c6x-abi.h"
2471         tmake_file="c6x/t-c6x c6x/t-c6x-elf"
2472         use_collect2=no
2473         ;;
2474 tic6x-*-uclinux)
2475         tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
2476         tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
2477         tm_file="${tm_file} ./sysroot-suffix.h"
2478         libgcc_tm_file="${libgcc_tm_file} c6x/c6x-abi.h"
2479         tmake_file="t-sysroot-suffix t-slibgcc"
2480         tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
2481         use_collect2=no
2482         ;;
2483 v850*-*-*)
2484         case ${target} in
2485         v850e2v3-*-*)
2486                 target_cpu_default="TARGET_CPU_v850e2v3"
2487                 ;;
2488         v850e2-*-*)
2489                 target_cpu_default="TARGET_CPU_v850e2"
2490                 ;;
2491         v850e1-*-* | v850es-*-*)
2492                 target_cpu_default="TARGET_CPU_v850e1"
2493                 ;;
2494         v850e-*-*)
2495                 target_cpu_default="TARGET_CPU_v850e"
2496                 ;;
2497         v850-*-*)
2498                 target_cpu_default="TARGET_CPU_generic"
2499                 ;;
2500         esac
2501         tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
2502         if test x$stabs = xyes
2503         then
2504                 tm_file="${tm_file} dbx.h"
2505         fi
2506         use_collect2=no
2507         c_target_objs="v850-c.o"
2508         cxx_target_objs="v850-c.o"
2509         use_gcc_stdint=wrap
2510         ;;
2511 vax-*-linux*)
2512         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
2513         extra_options="${extra_options} vax/elf.opt"
2514         tmake_file="${tmake_file} vax/t-linux"
2515         ;;
2516 vax-*-netbsdelf*)
2517         tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2518         extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
2519         ;;
2520 vax-*-openbsd*)
2521         tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
2522         extra_options="${extra_options} openbsd.opt"
2523         use_collect2=yes
2524         ;;
2525 xstormy16-*-elf)
2526         # For historical reasons, the target files omit the 'x'.
2527         tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
2528         tm_p_file=stormy16/stormy16-protos.h
2529         md_file=stormy16/stormy16.md
2530         out_file=stormy16/stormy16.c
2531         extra_options=stormy16/stormy16.opt
2532         tmake_file="stormy16/t-stormy16"
2533         ;;
2534 xtensa*-*-elf*)
2535         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
2536         extra_options="${extra_options} xtensa/elf.opt"
2537         tmake_file="xtensa/t-xtensa xtensa/t-elf"
2538         ;;
2539 xtensa*-*-linux*)
2540         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
2541         tmake_file="${tmake_file} xtensa/t-xtensa"
2542         ;;
2543 am33_2.0-*-linux*)
2544         tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
2545         gas=yes gnu_ld=yes
2546         use_collect2=no
2547         ;;
2548 m32c-*-rtems*)
2549         tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
2550         tmake_file="${tmake_file} t-rtems"
2551         c_target_objs="m32c-pragma.o"
2552         cxx_target_objs="m32c-pragma.o"
2553         ;;
2554 m32c-*-elf*)
2555         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2556         c_target_objs="m32c-pragma.o"
2557         cxx_target_objs="m32c-pragma.o"
2558         ;;
2559 *)
2560         echo "*** Configuration ${target} not supported" 1>&2
2561         exit 1
2562         ;;
2563 esac
2564
2565 case ${target} in
2566 i[34567]86-*-linux* | x86_64-*-linux*)
2567         tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
2568         libgcc_tm_file="${libgcc_tm_file} i386/value-unwind.h"
2569         ;;
2570 i[34567]86-*-* | x86_64-*-*)
2571         tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
2572         ;;
2573 powerpc*-*-* | rs6000-*-*)
2574         tm_file="${tm_file} rs6000/option-defaults.h"
2575 esac
2576
2577 if [ "$target_has_targetcm" = "no" ]; then
2578   c_target_objs="$c_target_objs default-c.o"
2579   cxx_target_objs="$cxx_target_objs default-c.o"
2580 fi
2581
2582 if [ "$common_out_file" = "" ]; then
2583   if [ "$target_has_targetm_common" = "yes" ]; then
2584     common_out_file="$cpu_type/$cpu_type-common.c"
2585   else
2586     common_out_file="default-common.c"
2587   fi
2588 fi
2589
2590 # Support for --with-cpu and related options (and a few unrelated options,
2591 # too).
2592 case ${with_cpu} in
2593   yes | no)
2594     echo "--with-cpu must be passed a value" 1>&2
2595     exit 1
2596     ;;
2597 esac
2598
2599 # Set arch and cpu from ${target} and ${target_noncanonical}.  Set cpu
2600 # to generic if there is no processor scheduler model for the target.
2601 arch=
2602 cpu=
2603 arch_without_sse2=no
2604 arch_without_64bit=no
2605 case ${target} in
2606   i386-*-freebsd*)
2607     if test $fbsd_major -ge 6; then
2608       arch=i486
2609     else
2610       arch=i386
2611     fi
2612     cpu=generic
2613     arch_without_sse2=yes
2614     arch_without_64bit=yes
2615     ;;
2616   i386-*-*)
2617     arch=i386
2618     cpu=i386
2619     arch_without_sse2=yes
2620     arch_without_64bit=yes
2621     ;;
2622   i486-*-*)
2623     arch=i486
2624     cpu=i486
2625     arch_without_sse2=yes
2626     arch_without_64bit=yes
2627     ;;
2628   i586-*-*)
2629     arch_without_sse2=yes
2630     arch_without_64bit=yes
2631     case ${target_noncanonical} in
2632       k6_2-*)
2633         arch=k6-2
2634         cpu=k6-2
2635         ;;
2636       k6_3-*)
2637         arch=k6-3
2638         cpu=k6-3
2639         ;;
2640       k6-*)
2641         arch=k6
2642         cpu=k6
2643         ;;
2644       pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2645         arch=pentium-mmx
2646         cpu=pentium-mmx
2647         ;;
2648       *)
2649         arch=pentium
2650         cpu=pentium
2651         ;;
2652     esac
2653     ;;
2654   i686-*-* | i786-*-*)
2655     case ${target_noncanonical} in
2656       bdver2-*)
2657         arch=bdver2
2658         cpu=bdver2
2659         ;;
2660       bdver1-*)
2661         arch=bdver1
2662         cpu=bdver1
2663         ;;
2664       btver1-*)
2665         arch=btver1
2666         cpu=btver1
2667         ;;
2668       amdfam10-*|barcelona-*)
2669         arch=amdfam10
2670         cpu=amdfam10
2671         ;;
2672       k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2673         arch=k8-sse3
2674         cpu=k8-sse3
2675         ;;
2676       k8-*|opteron-*|athlon64-*|athlon_fx-*)
2677         arch=k8
2678         cpu=k8
2679         ;;
2680       athlon_xp-*|athlon_mp-*|athlon_4-*)
2681         arch=athlon-4
2682         cpu=athlon-4
2683         arch_without_sse2=yes
2684         arch_without_64bit=yes
2685         ;;
2686       athlon_tbird-*|athlon-*)
2687         arch=athlon
2688         cpu=athlon
2689         arch_without_sse2=yes
2690         ;;
2691       geode-*)
2692         arch=geode
2693         cpu=geode
2694         arch_without_sse2=yes
2695         ;;
2696       pentium2-*)
2697         arch=pentium2
2698         cpu=pentium2
2699         arch_without_sse2=yes
2700         ;;
2701       pentium3-*|pentium3m-*)
2702         arch=pentium3
2703         cpu=pentium3
2704         arch_without_sse2=yes
2705         ;;
2706       pentium4-*|pentium4m-*)
2707         arch=pentium4
2708         cpu=pentium4
2709         ;;
2710       prescott-*)
2711         arch=prescott
2712         cpu=prescott
2713         ;;
2714       nocona-*)
2715         arch=nocona
2716         cpu=nocona
2717         ;;
2718       atom-*)
2719         arch=atom
2720         cpu=atom
2721         ;;
2722       core2-*)
2723         arch=core2
2724         cpu=core2
2725         ;;
2726       corei7-*)
2727         arch=corei7
2728         cpu=corei7
2729         ;;
2730       corei7_avx-*)
2731         arch=corei7-avx
2732         cpu=corei7-avx
2733         ;;
2734       pentium_m-*)
2735         arch=pentium-m
2736         cpu=pentium-m
2737         ;;
2738       pentiumpro-*)
2739         arch=pentiumpro
2740         cpu=pentiumpro
2741         arch_without_sse2=yes
2742         ;;
2743       *)
2744         arch=pentiumpro
2745         cpu=generic
2746         arch_without_sse2=yes
2747         arch_without_64bit=yes
2748         ;;
2749     esac
2750     ;;
2751   x86_64-*-*)
2752     case ${target_noncanonical} in
2753       bdver2-*)
2754         arch=bdver2
2755         cpu=bdver2
2756         ;;
2757       bdver1-*)
2758         arch=bdver1
2759         cpu=bdver1
2760         ;;
2761       btver1-*)
2762         arch=btver1
2763         cpu=btver1
2764         ;;
2765       amdfam10-*|barcelona-*)
2766         arch=amdfam10
2767         cpu=amdfam10
2768         ;;
2769       k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2770         arch=k8-sse3
2771         cpu=k8-sse3
2772         ;;
2773       k8-*|opteron-*|athlon_64-*)
2774         arch=k8
2775         cpu=k8
2776         ;;
2777       nocona-*)
2778         arch=nocona
2779         cpu=nocona
2780         ;;
2781       atom-*)
2782         arch=atom
2783         cpu=atom
2784         ;;
2785       core2-*)
2786         arch=core2
2787         cpu=core2
2788         ;;
2789       corei7-*)
2790         arch=corei7
2791         cpu=corei7
2792         ;;
2793       *)
2794         arch=x86-64
2795         cpu=generic
2796         ;;
2797     esac
2798     ;;
2799 esac
2800
2801 # If there is no $with_cpu option, try to infer one from ${target}.
2802 # This block sets nothing except for with_cpu.
2803 if test x$with_cpu = x ; then
2804   case ${target} in
2805     i[34567]86-*-*|x86_64-*-*)
2806       with_cpu=$cpu
2807       ;;
2808     alphaev6[78]*-*-*)
2809       with_cpu=ev67
2810       ;;
2811     alphaev6*-*-*)
2812       with_cpu=ev6
2813       ;;
2814     alphapca56*-*-*)
2815       with_cpu=pca56
2816       ;;
2817     alphaev56*-*-*)
2818       with_cpu=ev56
2819       ;;
2820     alphaev5*-*-*)
2821       with_cpu=ev5
2822       ;;
2823     frv-*-*linux* | frv400-*-*linux*)
2824       with_cpu=fr400
2825       ;;
2826     frv550-*-*linux*)
2827       with_cpu=fr550
2828       ;;
2829     m68k*-*-*)
2830       case "$with_arch" in
2831         "cf")
2832           with_cpu=${default_cf_cpu}
2833           ;;
2834         "" | "m68k")
2835           with_cpu=m${default_m68k_cpu}
2836           ;;
2837       esac
2838       ;;
2839     mips*-*-vxworks)
2840       with_arch=mips2
2841       ;;
2842     sparc-leon*-*)
2843       with_cpu=v8;
2844       ;;
2845     sparc*-*-*)
2846       with_cpu="`echo ${target} | sed 's/-.*$//'`"
2847       ;;
2848   esac
2849
2850   # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
2851   case ${target} in
2852     i[34567]86-*-*|x86_64-*-*)
2853       if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
2854         if test x$with_cpu_32 = x; then
2855           with_cpu_32=$with_cpu
2856         fi
2857         if test x$with_cpu_64 = x; then
2858           with_cpu_64=$with_cpu
2859         fi
2860         with_cpu=
2861       fi
2862       ;;
2863   esac
2864 fi
2865
2866 # Support for --with-arch and related options (and a few unrelated options,
2867 # too).
2868 case ${with_arch} in
2869   yes | no)
2870     echo "--with-arch must be passed a value" 1>&2
2871     exit 1
2872     ;;
2873 esac
2874
2875 # If there is no $with_arch option, try to infer one from ${target}.
2876 # This block sets nothing except for with_arch.
2877 if test x$with_arch = x ; then
2878   case ${target} in
2879     i[34567]86-*-darwin*|x86_64-*-darwin*)
2880       # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2881       # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2882       ;;
2883     i[34567]86-*-*)
2884       # --with-fpmath sets the default ISA to SSE2, which is the same
2885       # ISA supported by Pentium 4.
2886       if test x$with_fpmath = x || test $arch_without_sse2 = no; then
2887         with_arch=$arch
2888       else
2889         with_arch=pentium4
2890       fi
2891       ;;
2892     x86_64-*-*)
2893       with_arch=$arch
2894       ;;
2895   esac
2896
2897   # Avoid overriding --with-arch-32 and --with-arch-64 values.
2898   case ${target} in
2899     i[34567]86-*-darwin*|x86_64-*-darwin*)
2900       # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
2901       # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
2902       ;;
2903     i[34567]86-*-*|x86_64-*-*)
2904       if test x$with_arch_32 != x || test x$with_arch_64 != x; then
2905         if test x$with_arch_32 = x; then
2906           with_arch_32=$with_arch
2907         fi
2908         if test x$with_arch_64 = x; then
2909           if test $arch_without_64bit = yes; then
2910             # Set the default 64bit arch to x86-64 if the default arch
2911             # doesn't support 64bit.
2912             with_arch_64=x86-64
2913           else
2914             with_arch_64=$with_arch
2915           fi
2916         fi
2917         with_arch=
2918       elif test $arch_without_64bit$need_64bit_isa = yesyes; then
2919         # Set the default 64bit arch to x86-64 if the default arch
2920         # doesn't support 64bit and we need 64bit ISA.
2921         with_arch_32=$with_arch
2922         with_arch_64=x86-64
2923         with_arch=
2924       fi
2925       ;;
2926   esac
2927 fi
2928
2929 # Support --with-fpmath.
2930 if test x$with_fpmath != x; then
2931   case ${target} in
2932     i[34567]86-*-* | x86_64-*-*)
2933       case ${with_fpmath} in
2934       avx)
2935         tm_file="${tm_file} i386/avxmath.h"
2936         ;;
2937       sse)
2938         tm_file="${tm_file} i386/ssemath.h"
2939         ;;
2940       *)
2941         echo "Invalid --with-fpmath=$with_fpmath" 1>&2
2942         exit 1
2943         ;;
2944       esac
2945       ;;
2946     *)
2947       echo "--with-fpmath isn't supported for $target." 1>&2
2948       exit 1
2949       ;;
2950   esac
2951 fi
2952
2953 # Similarly for --with-schedule.
2954 if test x$with_schedule = x; then
2955         case ${target} in
2956         hppa1*)
2957                 # Override default PA8000 scheduling model.
2958                 with_schedule=7100LC
2959                 ;;
2960         esac
2961 fi
2962
2963 # Support --enable-initfini-array.
2964 if test x$enable_initfini_array = xyes; then
2965   tm_file="${tm_file} initfini-array.h"
2966 fi
2967
2968 # Validate and mark as valid any --with options supported
2969 # by this target.  In order to use a particular --with option
2970 # you must list it in supported_defaults; validating the value
2971 # is optional.  This case statement should set nothing besides
2972 # supported_defaults.
2973
2974 supported_defaults=
2975 case "${target}" in
2976         alpha*-*-*)
2977                 supported_defaults="cpu tune"
2978                 for which in cpu tune; do
2979                         eval "val=\$with_$which"
2980                         case "$val" in
2981                         "" \
2982                         | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
2983                         | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
2984                         | 21264a)
2985                                 ;;
2986                         *)
2987                                 echo "Unknown CPU used in --with-$which=$val" 1>&2
2988                                 exit 1
2989                                 ;;
2990                         esac
2991                 done
2992                 ;;
2993
2994         arm*-*-*)
2995                 supported_defaults="arch cpu float tune fpu abi mode tls"
2996                 for which in cpu tune; do
2997                         # See if it matches any of the entries in arm-cores.def
2998                         eval "val=\$with_$which"
2999                         if [ x"$val" = x ] \
3000                             || grep "^ARM_CORE(\"$val\"," \
3001                                     ${srcdir}/config/arm/arm-cores.def \
3002                                     > /dev/null; then
3003                           # Ok
3004                           new_val=`grep "^ARM_CORE(\"$val\"," \
3005                                 ${srcdir}/config/arm/arm-cores.def | \
3006                                 sed -e 's/^[^,]*,[      ]*//' | \
3007                                 sed -e 's/,.*$//'`
3008                           eval "target_${which}_cname=$new_val"
3009                         echo "For $val real value is $new_val"
3010                           true
3011                         else
3012                           echo "Unknown CPU used in --with-$which=$val" 1>&2
3013                           exit 1
3014                         fi
3015                 done
3016
3017                 case "$with_arch" in
3018                 "" \
3019                 | armv[23456] | armv2a | armv3m | armv4t | armv5t \
3020                 | armv5te | armv6j |armv6k | armv6z | armv6zk | armv6-m \
3021                 | armv7 | armv7-a | armv7-r | armv7-m \
3022                 | iwmmxt | ep9312)
3023                         # OK
3024                         ;;
3025                 *)
3026                         echo "Unknown arch used in --with-arch=$with_arch" 1>&2
3027                         exit 1
3028                         ;;
3029                 esac
3030
3031                 case "$with_float" in
3032                 "" \
3033                 | soft | hard | softfp)
3034                         # OK
3035                         ;;
3036                 *)
3037                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3038                         exit 1
3039                         ;;
3040                 esac
3041
3042                 case "$with_fpu" in
3043                 "" \
3044                 | fpa | fpe2 | fpe3 | maverick | vfp | vfp3 | vfpv3 \
3045                 | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
3046                 | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
3047                 | fpv4-sp-d16 | neon-vfpv4)
3048                         # OK
3049                         ;;
3050                 *)
3051                         echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
3052                         exit 1
3053                         ;;
3054                 esac
3055
3056                 case "$with_abi" in
3057                 "" \
3058                 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
3059                         #OK
3060                         ;;
3061                 *)
3062                         echo "Unknown ABI used in --with-abi=$with_abi"
3063                         exit 1
3064                         ;;
3065                 esac
3066
3067                 case "$with_mode" in
3068                 "" \
3069                 | arm | thumb )
3070                         #OK
3071                         ;;
3072                 *)
3073                         echo "Unknown mode used in --with-mode=$with_mode"
3074                         exit 1
3075                         ;;
3076                 esac
3077
3078                 case "$with_tls" in
3079                 "" \
3080                 | gnu | gnu2)
3081                         # OK
3082                         ;;
3083                 *)
3084                         echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
3085                         exit 1
3086                         ;;
3087                 esac
3088
3089                 if test "x$with_arch" != x && test "x$with_cpu" != x; then
3090                         echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
3091                 fi
3092                 ;;
3093
3094         fr*-*-*linux*)
3095                 supported_defaults=cpu
3096                 case "$with_cpu" in
3097                 fr400) ;;
3098                 fr550) ;;
3099                 *)
3100                         echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3101                         exit 1
3102                         ;;
3103                 esac
3104                 ;;
3105
3106         fido-*-* | m68k*-*-*)
3107                 supported_defaults="arch cpu"
3108                 case "$with_arch" in
3109                 "" | "m68k"| "cf")
3110                         m68k_arch_family="$with_arch"
3111                         ;;
3112                 *)
3113                         echo "Invalid --with-arch=$with_arch" 1>&2
3114                         exit 1
3115                         ;;
3116                 esac
3117
3118                 # We always have a $with_cpu setting here.
3119                 case "$with_cpu" in
3120                 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3121                         m68k_cpu_ident=$with_cpu
3122                         ;;
3123                 "m68020-40")
3124                         m68k_cpu_ident=m68020
3125                         tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3126                         ;;
3127                 "m68020-60")
3128                         m68k_cpu_ident=m68020
3129                         tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3130                         ;;
3131                 *)
3132                         # We need the C identifier rather than the string.
3133                         m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3134                            'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3135                             $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3136                                  ${srcdir}/config/m68k/m68k-devices.def`
3137                         if [ x"$m68k_cpu_ident" = x ] ; then
3138                                 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3139                                 exit 1
3140                         fi
3141                         with_cpu="mcpu=$with_cpu"
3142                         ;;
3143                 esac
3144                 ;;
3145
3146         hppa*-*-*)
3147                 supported_defaults="arch schedule"
3148
3149                 case "$with_arch" in
3150                 "" | 1.0 | 1.1 | 2.0)
3151                         # OK
3152                         ;;
3153                 *)
3154                         echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3155                         exit 1
3156                         ;;
3157                 esac
3158
3159                 case "$with_schedule" in
3160                 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
3161                         # OK
3162                         ;;
3163                 *)
3164                         echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3165                         exit 1
3166                         ;;
3167                 esac
3168                 ;;
3169
3170         i[34567]86-*-* | x86_64-*-*)
3171                 supported_defaults="arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
3172                 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3173                         eval "val=\$with_$which"
3174                         case ${val} in
3175                         i386 | i486 \
3176                         | i586 | pentium | pentium-mmx | winchip-c6 | winchip2 \
3177                         | c3 | c3-2 | i686 | pentiumpro | pentium2 | pentium3 \
3178                         | pentium4 | k6 | k6-2 | k6-3 | athlon | athlon-tbird \
3179                         | athlon-4 | athlon-xp | athlon-mp | geode \
3180                         | prescott | pentium-m | pentium4m | pentium3m)
3181                                 case "${target}" in
3182                                   x86_64-*-*)
3183                                       case "x$which" in
3184                                         *_32)
3185                                                 ;;
3186                                         *)
3187                                                 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3188                                                 exit 1
3189                                                 ;;
3190                                       esac
3191                                       ;;
3192                                 esac
3193                                 # OK
3194                                 ;;
3195                         "" | x86-64 | generic | native \
3196                         | k8 | k8-sse3 | athlon64 | athlon64-sse3 | opteron \
3197                         | opteron-sse3 | athlon-fx | bdver2 | bdver1 | btver1 \
3198                         | amdfam10 | barcelona | nocona | core2 | corei7 \
3199                         | corei7-avx | core-avx-i | core-avx2 | atom)
3200                                 # OK
3201                                 ;;
3202                         *)
3203                                 echo "Unknown CPU given in --with-$which=$val." 1>&2
3204                                 exit 1
3205                                 ;;
3206                         esac
3207                 done
3208                 ;;
3209
3210         mips*-*-*)
3211                 supported_defaults="abi arch arch_32 arch_64 float tune tune_32 tune_64 divide llsc mips-plt synci"
3212
3213                 case ${with_float} in
3214                 "" | soft | hard)
3215                         # OK
3216                         ;;
3217                 *)
3218                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3219                         exit 1
3220                         ;;
3221                 esac
3222
3223                 case ${with_abi} in
3224                 "" | 32 | o64 | n32 | 64 | eabi)
3225                         # OK
3226                         ;;
3227                 *)
3228                         echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
3229                         exit 1
3230                         ;;
3231                 esac
3232
3233                 case ${with_divide} in
3234                 "" | breaks | traps)
3235                         # OK
3236                         ;;
3237                 *)
3238                         echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3239                         exit 1
3240                         ;;
3241                 esac
3242
3243                 case ${with_llsc} in
3244                 yes)
3245                         with_llsc=llsc
3246                         ;;
3247                 no)
3248                         with_llsc="no-llsc"
3249                         ;;
3250                 "")
3251                         # OK
3252                         ;;
3253                 *)
3254                         echo "Unknown llsc type used in --with-llsc" 1>&2
3255                         exit 1
3256                         ;;
3257                 esac
3258
3259                 case ${with_mips_plt} in
3260                 yes)
3261                         with_mips_plt=plt
3262                         ;;
3263                 no)
3264                         with_mips_plt=no-plt
3265                         ;;
3266                 "")
3267                         ;;
3268                 *)
3269                         echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
3270                         exit 1
3271                         ;;
3272                 esac
3273
3274                 case ${with_synci} in
3275                 yes)
3276                         with_synci=synci
3277                         ;;
3278                 "" | no)
3279                         # No is the default.
3280                         with_synci=no-synci
3281                         ;;
3282                 *)
3283                         echo "Unknown synci type used in --with-synci" 1>&2
3284                         exit 1
3285                         ;;
3286                 esac
3287                 ;;
3288
3289         powerpc*-*-* | rs6000-*-*)
3290                 supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"
3291
3292                 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3293                         eval "val=\$with_$which"
3294                         case ${val} in
3295                         default32 | default64)
3296                                 case $which in
3297                                 cpu | tune)
3298                                         ;;
3299                                 *)
3300                                         echo "$val only valid for --with-cpu and --with-tune." 1>&2
3301                                         exit 1
3302                                         ;;
3303                                 esac
3304                                 with_which="with_$which"
3305                                 eval $with_which=
3306                                 ;;
3307                         405cr)
3308                                 tm_defines="${tm_defines} CONFIG_PPC405CR"
3309                                 eval "with_$which=405"
3310                                 ;;
3311                         "" | common \
3312                         | power | power[234567] | power6x | powerpc | powerpc64 \
3313                         | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
3314                         | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
3315                         | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
3316                         | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
3317                         | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | titan\
3318                         | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
3319                                 # OK
3320                                 ;;
3321                         *)
3322                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
3323                                 exit 1
3324                                 ;;
3325                         esac
3326                 done
3327                 ;;
3328
3329         s390*-*-*)
3330                 supported_defaults="arch mode tune"
3331
3332                 for which in arch tune; do
3333                         eval "val=\$with_$which"
3334                         case ${val} in
3335                         "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196)
3336                                 # OK
3337                                 ;;
3338                         *)
3339                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
3340                                 exit 1
3341                                 ;;
3342                         esac
3343                 done
3344
3345                 case ${with_mode} in
3346                 "" | esa | zarch)
3347                         # OK
3348                         ;;
3349                 *)
3350                         echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3351                         exit 1
3352                         ;;
3353                 esac
3354                 ;;
3355
3356         sh[123456ble]-*-* | sh-*-*)
3357                 supported_defaults="cpu"
3358                 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
3359                 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3360                         # OK
3361                         ;;
3362                 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3363                         ;;
3364                 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3365                         ;;
3366                 *)
3367                         echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
3368                         echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
3369                         echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
3370                         echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
3371                         exit 1
3372                         ;;
3373                 esac
3374                 ;;
3375         sparc*-*-*)
3376                 supported_defaults="cpu float tune"
3377
3378                 for which in cpu tune; do
3379                         eval "val=\$with_$which"
3380                         case ${val} in
3381                         "" | sparc | sparcv9 | sparc64 \
3382                         | v7 | cypress \
3383                         | v8 | supersparc | hypersparc | leon \
3384                         | sparclite | f930 | f934 | sparclite86x \
3385                         | sparclet | tsc701 \
3386                         | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
3387                         | niagara3 | niagara4)
3388                                 # OK
3389                                 ;;
3390                         *)
3391                                 echo "Unknown cpu used in --with-$which=$val" 1>&2
3392                                 exit 1
3393                                 ;;
3394                         esac
3395                 done
3396
3397                 case ${with_float} in
3398                 "" | soft | hard)
3399                         # OK
3400                         ;;
3401                 *)
3402                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3403                         exit 1
3404                         ;;
3405                 esac
3406                 ;;
3407
3408         spu-*-*)
3409                 supported_defaults="arch tune"
3410
3411                 for which in arch tune; do
3412                         eval "val=\$with_$which"
3413                         case ${val} in
3414                         "" | cell | celledp)
3415                                 # OK
3416                                 ;;
3417                         *)
3418                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
3419                                 exit 1
3420                                 ;;
3421                         esac
3422                 done
3423                 ;;
3424
3425         tic6x-*-*)
3426                 supported_defaults="arch"
3427
3428                 case ${with_arch} in
3429                 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
3430                         # OK
3431                         ;;
3432                 *)
3433                         echo "Unknown arch used in --with-arch=$with_arch." 1>&2
3434                         exit 1
3435                         ;;
3436                 esac
3437                 ;;
3438
3439         v850*-*-*)
3440                 supported_defaults=cpu
3441                 case ${with_cpu} in
3442                 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3)
3443                         # OK
3444                         ;;
3445                 *)
3446                         echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3447                         exit 1
3448                         ;;
3449                 esac
3450                 ;;
3451 esac
3452
3453 # Set some miscellaneous flags for particular targets.
3454 target_cpu_default2=
3455 case ${target} in
3456         alpha*-*-*)
3457                 if test x$gas = xyes
3458                 then
3459                         target_cpu_default2="MASK_GAS"
3460                 fi
3461                 ;;
3462
3463         arm*-*-*)
3464                 if test x$target_cpu_cname = x
3465                 then
3466                         target_cpu_default2=TARGET_CPU_generic
3467                 else
3468                         target_cpu_default2=TARGET_CPU_$target_cpu_cname
3469                 fi
3470                 ;;
3471
3472         hppa*-*-*)
3473                 target_cpu_default2="MASK_BIG_SWITCH"
3474                 if test x$gas = xyes
3475                 then
3476                         target_cpu_default2="${target_cpu_default2}|MASK_GAS|MASK_JUMP_IN_DELAY"
3477                 fi
3478                 ;;
3479
3480         fido*-*-* | m68k*-*-*)
3481                 target_cpu_default2=$m68k_cpu_ident
3482                 tmake_file="m68k/t-opts $tmake_file"
3483                 if [ x"$m68k_arch_family" != x ]; then
3484                         tmake_file="m68k/t-$m68k_arch_family $tmake_file"
3485                 fi
3486                 ;;
3487
3488         i[34567]86-*-darwin* | x86_64-*-darwin*)
3489                 ;;
3490         i[34567]86-*-linux* | x86_64-*-linux* | \
3491           i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
3492           i[34567]86-*-gnu*)
3493                 ;;
3494         i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
3495                 ;;
3496         i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
3497                 ;;
3498         i[34567]86-*-freebsd* | x86_64-*-freebsd*)
3499                 ;;
3500         ia64*-*-linux*)
3501                 ;;
3502
3503         mips*-*-*)
3504                 if test x$gnu_ld = xyes
3505                 then
3506                         target_cpu_default2="MASK_SPLIT_ADDRESSES"
3507                 fi
3508                 case ${target} in
3509                         mips*el-*-*)
3510                                 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
3511                                 ;;
3512                 esac
3513                 tmake_file="mips/t-mips $tmake_file"
3514                 ;;
3515
3516         powerpc*-*-* | rs6000-*-*)
3517                 # FIXME: The PowerPC port uses the value set at compile time,
3518                 # although it's only cosmetic.
3519                 if test "x$with_cpu" != x
3520                 then
3521                         target_cpu_default2="\\\"$with_cpu\\\""
3522                 fi
3523                 out_file=rs6000/rs6000.c
3524                 c_target_objs="${c_target_objs} rs6000-c.o"
3525                 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
3526                 tmake_file="rs6000/t-rs6000 ${tmake_file}"
3527
3528                 if test x$enable_e500_double = xyes
3529                 then
3530                         tm_file="$tm_file rs6000/e500-double.h"
3531                 fi
3532                 ;;
3533
3534         sh[123456ble]*-*-* | sh-*-*)
3535                 c_target_objs="${c_target_objs} sh-c.o"
3536                 cxx_target_objs="${cxx_target_objs} sh-c.o"
3537                 ;;
3538
3539         sparc-leon*-*)
3540                 if test x$with_tune = x ; then
3541                   with_tune=leon;
3542                 fi
3543
3544                 # The SPARC port checks this value at compile-time.
3545                 target_cpu_default2="TARGET_CPU_$with_cpu"
3546                 ;;
3547
3548         sparc*-*-*)
3549                 # Some standard aliases.
3550                 case x$with_cpu in
3551                 xsparc)
3552                         with_cpu=v7
3553                         ;;
3554                 xsparcv9 | xsparc64)
3555                         with_cpu=v9
3556                         ;;
3557                 esac
3558
3559                 # The SPARC port checks this value at compile-time.
3560                 target_cpu_default2="TARGET_CPU_$with_cpu"
3561                 ;;
3562
3563         v850*-*-*)
3564                 case "x$with_cpu" in
3565                 x)
3566                         ;;
3567                 xv850e | xv850e1 | xv850e2 | xv850e2v3)
3568                         target_cpu_default2="TARGET_CPU_$with_cpu"
3569                         ;;
3570                 xv850es)
3571                         target_cpu_default2="TARGET_CPU_v850e1"
3572                         ;;
3573                 esac
3574                 ;;
3575 esac
3576
3577 t=
3578 all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu divide llsc mips-plt synci tls"
3579 for option in $all_defaults
3580 do
3581         eval "val=\$with_"`echo $option | sed s/-/_/g`
3582         if test -n "$val"; then
3583                 case " $supported_defaults " in
3584                 *" $option "*)
3585                         ;;
3586                 *)
3587                         echo "This target does not support --with-$option." 2>&1
3588                         echo "Valid --with options are: $supported_defaults" 2>&1
3589                         exit 1
3590                         ;;
3591                 esac
3592
3593                 if test "x$t" = x
3594                 then
3595                         t="{ \"$option\", \"$val\" }"
3596                 else
3597                         t="${t}, { \"$option\", \"$val\" }"
3598                 fi
3599         fi
3600 done
3601
3602 if test "x$t" = x
3603 then
3604         configure_default_options="{ { NULL, NULL} }"
3605 else
3606         configure_default_options="{ ${t} }"
3607 fi
3608
3609 if test "$target_cpu_default2" != ""
3610 then
3611         if test "$target_cpu_default" != ""
3612         then
3613                 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3614         else
3615                 target_cpu_default=$target_cpu_default2
3616         fi
3617 fi