OSDN Git Service

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