OSDN Git Service

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