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