Add the 'akaros' threading model to gcc (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 2016-05-26 needed for various command line options like -rdynamic
883   extra_options="$extra_options gnu-user.opt"
884   # brho 2015-04-17
885   # We need this for the shared libgcc_s.so
886   tmake_file="t-slibgcc"
887   # Linux has these options (among others that I removed).  I think it's saying
888   # to use the glibc targetcm, which needs glibc-c.o to be built, which needs
889   # the t-glibc makefrag
890   c_target_objs="${c_target_objs} glibc-c.o"
891   cxx_target_objs="${cxx_target_objs} glibc-c.o"
892   tmake_file="${tmake_file} t-glibc"
893   target_has_targetcm=yes
894   # We've had these options for a while, linux also has them (and tgmath=no)
895   default_use_cxa_atexit=yes
896   use_gcc_stdint=wrap
897   gas=yes
898   gnu_ld=yes
899   ;;
900 esac
901
902 case ${target} in
903 aarch64*-*-elf)
904         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
905         tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
906         tmake_file="${tmake_file} aarch64/t-aarch64"
907         use_gcc_stdint=wrap
908         case $target in
909         aarch64_be-*)
910                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
911                 ;;
912         esac
913         aarch64_multilibs="${with_multilib_list}"
914         if test "$aarch64_multilibs" = "default"; then
915                 aarch64_multilibs="lp64,ilp32"
916         fi
917         aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
918         for aarch64_multilib in ${aarch64_multilibs}; do
919                 case ${aarch64_multilib} in
920                 ilp32 | lp64 )
921                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
922                         ;;
923                 *)
924                         echo "--with-multilib-list=${aarch64_multilib} not supported."
925                         exit 1
926                 esac
927         done
928         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
929         ;;
930 aarch64*-*-linux*)
931         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
932         tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
933         tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
934         case $target in
935         aarch64_be-*)
936                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
937                 ;;
938         esac
939         aarch64_multilibs="${with_multilib_list}"
940         if test "$aarch64_multilibs" = "default"; then
941                 # TODO: turn on ILP32 multilib build after its support is mature.
942                 # aarch64_multilibs="lp64,ilp32"
943                 aarch64_multilibs="lp64"
944         fi
945         aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
946         for aarch64_multilib in ${aarch64_multilibs}; do
947                 case ${aarch64_multilib} in
948                 ilp32 | lp64 )
949                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
950                         ;;
951                 *)
952                         echo "--with-multilib-list=${aarch64_multilib} not supported."
953                         exit 1
954                 esac
955         done
956         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
957         ;;
958 alpha*-*-linux*)
959         tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
960         tmake_file="${tmake_file} alpha/t-linux"
961         extra_options="${extra_options} alpha/elf.opt"
962         ;;
963 alpha*-*-freebsd*)
964         tm_file="elfos.h ${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
965         extra_options="${extra_options} alpha/elf.opt"
966         ;;
967 alpha*-*-netbsd*)
968         tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
969         extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
970                        alpha/elf.opt"
971         ;;
972 alpha*-*-openbsd*)
973         tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
974         tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
975         extra_options="${extra_options} openbsd.opt alpha/elf.opt"
976         # default x-alpha is only appropriate for dec-osf.
977         ;;
978 alpha*-dec-*vms*)
979         tm_file="${tm_file} vms/vms.h alpha/vms.h"
980         tmake_file="${tmake_file} alpha/t-vms"
981         ;;
982 arc*-*-elf*)
983         extra_headers="arc-simd.h"
984         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
985         tmake_file="arc/t-arc-newlib arc/t-arc"
986         case x"${with_cpu}" in
987           xarc600|xarc601|xarc700)
988                 target_cpu_default="TARGET_CPU_$with_cpu"
989                 ;;
990         esac
991         if test x${with_endian} = x; then
992                 case ${target} in
993                 arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
994                 *)                              with_endian=little ;;
995                 esac
996         fi
997         case ${with_endian} in
998         big|little)             ;;
999         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
1000         esac
1001         case ${with_endian} in
1002         big*)   tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\" ${tm_defines}"
1003         esac
1004         ;;
1005 arc*-*-linux-uclibc*)
1006         extra_headers="arc-simd.h"
1007         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file}"
1008         tmake_file="${tmake_file} arc/t-arc-uClibc arc/t-arc"
1009         tm_defines="${tm_defines} TARGET_SDATA_DEFAULT=0"
1010         tm_defines="${tm_defines} TARGET_MMEDIUM_CALLS_DEFAULT=1"
1011         case x"${with_cpu}" in
1012           xarc600|xarc601|xarc700)
1013                 target_cpu_default="TARGET_CPU_$with_cpu"
1014                 ;;
1015         esac
1016         if test x${with_endian} = x; then
1017                 case ${target} in
1018                 arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
1019                 *)                              with_endian=little ;;
1020                 esac
1021         fi
1022         case ${with_endian} in
1023         big|little)             ;;
1024         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
1025         esac
1026         case ${with_endian} in
1027         big*)   tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\" ${tm_defines}"
1028         esac
1029         ;;
1030 arm-wrs-vxworks)
1031         tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
1032         extra_options="${extra_options} arm/vxworks.opt"
1033         tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
1034         ;;
1035 arm*-*-netbsdelf*)
1036         tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h ${tm_file} arm/netbsd-elf.h"
1037         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1038         tmake_file="${tmake_file} arm/t-arm"
1039         ;;
1040 arm*-*-linux-*)                 # ARM GNU/Linux with ELF
1041         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"
1042         extra_options="${extra_options} linux-android.opt"
1043         case $target in
1044         arm*b-*-linux*)
1045             tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1046             ;;
1047         esac
1048         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
1049         tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
1050         # Define multilib configuration for arm-linux-androideabi.
1051         case ${target} in
1052         *-androideabi)
1053             tmake_file="$tmake_file arm/t-linux-androideabi"
1054             ;;
1055         esac
1056         # The EABI requires the use of __cxa_atexit.
1057         default_use_cxa_atexit=yes
1058         with_tls=${with_tls:-gnu}
1059         ;;
1060 arm*-*-uclinux*eabi*)           # ARM ucLinux
1061         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
1062         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
1063         tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
1064         # The EABI requires the use of __cxa_atexit.
1065         default_use_cxa_atexit=yes
1066         ;;
1067 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
1068         case ${target} in
1069         arm*eb-*-eabi*)
1070           tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1071         esac
1072         default_use_cxa_atexit=yes
1073         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1074         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
1075         case ${target} in
1076         arm*-*-eabi*)
1077           tm_file="$tm_file newlib-stdint.h"
1078           tmake_file="${tmake_file} arm/t-bpabi"
1079           use_gcc_stdint=wrap
1080           ;;
1081         arm*-*-rtems*)
1082           tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
1083           tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems-eabi"
1084           ;;
1085         arm*-*-symbianelf*)
1086           tm_file="${tm_file} arm/symbian.h"
1087           # We do not include t-bpabi for Symbian OS because the system
1088           # provides its own implementation of the BPABI functions.
1089           tmake_file="${tmake_file} arm/t-symbian"
1090           ;;
1091         esac
1092         tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h"
1093         ;;
1094 avr-*-rtems*)
1095         tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
1096         tmake_file="${tmake_file} avr/t-avr avr/t-multilib avr/t-rtems"
1097         extra_gcc_objs="driver-avr.o avr-devices.o"
1098         extra_objs="avr-devices.o avr-log.o"
1099         ;;
1100 avr-*-*)
1101         tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/avr-stdint.h"
1102         if test x${with_avrlibc} != xno; then
1103             tm_file="${tm_file} ${cpu_type}/avrlibc.h"
1104             tm_defines="${tm_defines} WITH_AVRLIBC"
1105         fi
1106         tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
1107         use_gcc_stdint=wrap
1108         extra_gcc_objs="driver-avr.o avr-devices.o"
1109         extra_objs="avr-devices.o avr-log.o"
1110         ;;
1111 bfin*-elf*)
1112         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1113         tmake_file=bfin/t-bfin-elf
1114         use_collect2=no
1115         ;;
1116 bfin*-uclinux*)
1117         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
1118         tmake_file=bfin/t-bfin-uclinux
1119         use_collect2=no
1120         ;;
1121 bfin*-linux-uclibc*)
1122         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"
1123         tmake_file="bfin/t-bfin-linux t-slibgcc t-linux"
1124         use_collect2=no
1125         ;;
1126 bfin*-rtems*)
1127         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
1128         tmake_file="${tmake_file} bfin/t-rtems"
1129         ;;
1130 bfin*-*)
1131         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1132         use_collect2=no
1133         use_gcc_stdint=wrap
1134         ;;
1135 cr16-*-elf)
1136         tm_file="elfos.h ${tm_file}"
1137         tmake_file="${tmake_file} cr16/t-cr16 "
1138         use_collect2=no
1139         ;;
1140 crisv32-*-elf | crisv32-*-none)
1141         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1142         tmake_file="cris/t-cris"
1143         target_cpu_default=32
1144         gas=yes
1145         extra_options="${extra_options} cris/elf.opt"
1146         use_gcc_stdint=wrap
1147         ;;
1148 cris-*-elf | cris-*-none)
1149         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1150         tmake_file="cris/t-cris cris/t-elfmulti"
1151         gas=yes
1152         extra_options="${extra_options} cris/elf.opt"
1153         use_gcc_stdint=wrap
1154         ;;
1155 crisv32-*-linux* | cris-*-linux*)
1156         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
1157         tmake_file="${tmake_file} cris/t-cris cris/t-linux"
1158         extra_options="${extra_options} cris/linux.opt"
1159         case $target in
1160           cris-*-*)
1161                 target_cpu_default=10
1162                 ;;
1163           crisv32-*-*)
1164                 target_cpu_default=32
1165                 ;;
1166         esac
1167         ;;
1168 epiphany-*-elf )
1169         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1170         tmake_file="epiphany/t-epiphany"
1171         extra_options="${extra_options} fused-madd.opt"
1172         extra_objs="$extra_objs mode-switch-use.o resolve-sw-modes.o"
1173         tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1174         extra_headers="epiphany_intrinsics.h"
1175         ;;
1176 fr30-*-elf)
1177         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1178         ;;
1179 frv-*-elf)
1180         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1181         tmake_file=frv/t-frv
1182         ;;
1183 frv-*-*linux*)
1184         tm_file="dbxelf.h elfos.h ${tm_file} \
1185                  gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1186         tmake_file="${tmake_file} frv/t-frv frv/t-linux"
1187         ;;
1188 moxie-*-elf)
1189         gas=yes
1190         gnu_ld=yes
1191         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1192         tmake_file="${tmake_file} moxie/t-moxie"
1193         ;;
1194 moxie-*-uclinux*)
1195         gas=yes
1196         gnu_ld=yes
1197         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
1198         tmake_file="${tmake_file} moxie/t-moxie"
1199         ;;
1200 moxie-*-rtems*)
1201         tmake_file="${tmake_file} moxie/t-moxie"
1202         tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1203         ;;
1204 h8300-*-rtems*)
1205         tmake_file="${tmake_file} h8300/t-h8300 h8300/t-rtems"
1206         tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
1207         ;;
1208 h8300-*-elf*)
1209         tmake_file="h8300/t-h8300"
1210         tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
1211         ;;
1212 hppa*64*-*-linux*)
1213         target_cpu_default="MASK_PA_11|MASK_PA_20"
1214         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
1215                  glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1216                  pa/pa64-linux.h"
1217         gas=yes gnu_ld=yes
1218         need_64bit_hwint=yes
1219         ;;
1220 hppa*-*-linux*)
1221         target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1222         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
1223                  pa/pa32-regs.h pa/pa32-linux.h"
1224         tmake_file="${tmake_file} pa/t-linux"
1225         ;;
1226 hppa*-*-openbsd*)
1227         target_cpu_default="MASK_PA_11"
1228         tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1229                  pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
1230         extra_options="${extra_options} openbsd.opt"
1231         gas=yes
1232         gnu_ld=yes
1233         ;;
1234 hppa[12]*-*-hpux10*)
1235         case ${target} in
1236         hppa1.1-*-* | hppa2*-*-*)
1237                 target_cpu_default="MASK_PA_11"
1238                 ;;
1239         esac
1240         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1241                  pa/pa-hpux.h pa/pa-hpux10.h"
1242         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
1243         case ${target} in
1244         *-*-hpux10.[1-9]*)
1245                 tm_file="${tm_file} pa/pa-hpux1010.h"
1246                 extra_options="${extra_options} pa/pa-hpux1010.opt"
1247                 ;;
1248         esac
1249         use_gcc_stdint=provide
1250         tm_file="${tm_file} hpux-stdint.h"
1251         tmake_file="t-slibgcc"
1252         case ${enable_threads} in
1253           "")
1254             if test x$have_pthread_h = xyes ; then
1255               tmake_file="${tmake_file} pa/t-dce-thr"
1256             fi
1257             ;;
1258           yes | dce)
1259             tmake_file="${tmake_file} pa/t-dce-thr"
1260             ;;
1261         esac
1262         use_collect2=yes
1263         gas=yes
1264         if test "x$with_dwarf2" != x; then
1265                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1266                 dwarf2=no
1267         fi
1268         ;;
1269 hppa*64*-*-hpux11*)
1270         target_cpu_default="MASK_PA_11|MASK_PA_20"
1271         if test x$gnu_ld = xyes
1272         then
1273                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1274         fi
1275         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1276                  pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1277                  pa/pa-hpux11.h"
1278         case ${target} in
1279         *-*-hpux11.[12]*)
1280                 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1281                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1282                 ;;
1283         *-*-hpux11.[3-9]*)
1284                 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1285                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1286                 ;;
1287         *)
1288                 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1289                 ;;
1290         esac
1291         extra_options="${extra_options} pa/pa-hpux.opt \
1292                        pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
1293         need_64bit_hwint=yes
1294         tmake_file="t-slibgcc"
1295         case x${enable_threads} in
1296         x | xyes | xposix )
1297                 thread_file=posix
1298                 ;;
1299         esac
1300         gas=yes
1301         case ${target} in
1302           *-*-hpux11.[01]*)
1303                 use_gcc_stdint=provide
1304                 tm_file="${tm_file} hpux-stdint.h"
1305                 ;;
1306           *-*-hpux11.[23]*)
1307                 use_gcc_stdint=wrap
1308                 tm_file="${tm_file} hpux-stdint.h"
1309                 ;;
1310         esac
1311         ;;
1312 hppa[12]*-*-hpux11*)
1313         case ${target} in
1314         hppa1.1-*-* | hppa2*-*-*)
1315                 target_cpu_default="MASK_PA_11"
1316                 ;;
1317         esac
1318         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1319                  pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1320         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1321                        hpux11.opt"
1322         case ${target} in
1323         *-*-hpux11.[12]*)
1324                 tm_file="${tm_file} pa/pa-hpux1111.h"
1325                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1326                 ;;
1327         *-*-hpux11.[3-9]*)
1328                 tm_file="${tm_file} pa/pa-hpux1131.h"
1329                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1330                 ;;
1331         esac
1332         tmake_file="t-slibgcc"
1333         case x${enable_threads} in
1334         x | xyes | xposix )
1335                 thread_file=posix
1336                 ;;
1337         esac
1338         use_collect2=yes
1339         gas=yes
1340         case ${target} in
1341           *-*-hpux11.[01]*)
1342                 use_gcc_stdint=provide
1343                 tm_file="${tm_file} hpux-stdint.h"
1344                 ;;
1345           *-*-hpux11.[23]*)
1346                 use_gcc_stdint=wrap
1347                 tm_file="${tm_file} hpux-stdint.h"
1348                 ;;
1349         esac
1350         if test "x$with_dwarf2" != x; then
1351                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1352                 dwarf2=no
1353         fi
1354         ;;
1355 i[34567]86-*-darwin*)
1356         need_64bit_isa=yes
1357         # Baseline choice for a machine that allows m64 support.
1358         with_cpu=${with_cpu:-core2}
1359         tmake_file="${tmake_file} t-slibgcc"
1360         ;;
1361 x86_64-*-darwin*)
1362         with_cpu=${with_cpu:-core2}
1363         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
1364         tm_file="${tm_file} ${cpu_type}/darwin64.h"
1365         ;;
1366 i[34567]86-*-elf*)
1367         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1368         ;;
1369 x86_64-*-elf*)
1370         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1371         ;;
1372 i[34567]86-*-rdos*)
1373     tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
1374     ;;
1375 x86_64-*-rdos*)
1376     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"
1377     tmake_file="i386/t-i386elf t-svr4"
1378     ;;
1379 # hasn't been compiled in a long time (2015-04-17)
1380 i[34567]86-*-akaros*)
1381         # i386 linux, plus akaros/h i386/akaros.h
1382         # consider adding i386/gnu-user-common.h i386/gnu-user.h etc
1383         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"
1384         # linux doesn't use the tmake_file here, but a subset of these is still
1385         # needed (probably the FP stuff)
1386         tmake_file="${tmake_file} t-slibgcc-elf-ver t-linux i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
1387         ;;
1388 x86_64-*-akaros*)
1389         # similar to linux, but minus some gnu bits.  gnu-user64 wants an x32 ld
1390         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"
1391         tmake_file="${tmake_file} i386/t-linux64"
1392         # linux does not need these tmake files, but we need at least some of them.
1393         # without these, compilation failed.
1394         tmake_file="${tmake_file} i386/t-fprules-softfp soft-fp/t-softfp i386/t-linux"
1395         ;;
1396 riscv*-*-akaros*)
1397         tm_file="dbxelf.h elfos.h gnu-user.h akaros.h ${tm_file} riscv/akaros.h riscv/akaros64.h glibc-stdint.h"
1398         tmake_file="${tmake_file} t-slibgcc-elf-ver t-linux"
1399         ;;
1400 i[34567]86-*-freebsd*)
1401         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1402         ;;
1403 x86_64-*-freebsd*)
1404         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"
1405         ;;
1406 i[34567]86-*-netbsdelf*)
1407         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
1408         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1409         ;;
1410 x86_64-*-netbsd*)
1411         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"
1412         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1413         ;;
1414 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
1415         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"
1416         extra_options="${extra_options} openbsd.opt"
1417         # needed to unconfuse gdb
1418         tmake_file="${tmake_file} t-openbsd i386/t-openbsd"
1419         # we need collect2 until our bug is fixed...
1420         use_collect2=yes
1421         ;;
1422 i[34567]86-*-openbsd*)
1423         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1424         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1425         extra_options="${extra_options} openbsd.opt"
1426         gas=yes
1427         gnu_ld=yes
1428         ;;
1429 x86_64-*-openbsd*)
1430         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1431         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1432         extra_options="${extra_options} openbsd.opt"
1433         gas=yes
1434         gnu_ld=yes
1435         ;;
1436 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1437                         # Intel 80386's running GNU/*
1438                         # with ELF format using glibc 2
1439         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
1440         case ${target} in
1441         i[34567]86-*-linux*)
1442                 tm_file="${tm_file} linux.h linux-android.h"
1443                 extra_options="${extra_options} linux-android.opt"
1444                 # Assume modern glibc
1445                 default_gnu_indirect_function=yes
1446                 if test x$enable_targets = xall; then
1447                         tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
1448                         tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1449                         tmake_file="${tmake_file} i386/t-linux64"
1450                         x86_multilibs="${with_multilib_list}"
1451                         if test "$x86_multilibs" = "default"; then
1452                                 x86_multilibs="m64,m32"
1453                         fi
1454                         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1455                         for x86_multilib in ${x86_multilibs}; do
1456                                 case ${x86_multilib} in
1457                                 m32 | m64 | mx32)
1458                                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1459                                         ;;
1460                                 *)
1461                                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1462                                         exit 1
1463                                 esac
1464                         done
1465                         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1466                         need_64bit_isa=yes
1467                         if test x$with_cpu = x; then
1468                                 if test x$with_cpu_64 = x; then
1469                                         with_cpu_64=generic
1470                                 fi
1471                         else
1472                                 case " $x86_cpus $x86_archs $x86_64_archs " in
1473                                 *" $with_cpu "*)
1474                                         ;;
1475                                 *)
1476                                         echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1477                                         echo "$x86_cpus $x86_archs $x86_64_archs " 1>&2
1478                                         exit 1
1479                                         ;;
1480                                 esac
1481                         fi
1482                 else
1483                         tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
1484                 fi
1485                 ;;
1486         i[34567]86-*-knetbsd*-gnu)
1487                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h knetbsd-gnu.h i386/knetbsd-gnu.h"
1488                 ;;
1489         i[34567]86-*-kfreebsd*-gnu)
1490                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
1491                 ;;
1492         i[34567]86-*-kopensolaris*-gnu)
1493                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
1494                 ;;
1495         i[34567]86-*-gnu*)
1496                 tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
1497                 ;;
1498         esac
1499         ;;
1500 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
1501         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
1502                  i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
1503         case ${target} in
1504         x86_64-*-linux*)
1505                 tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
1506                 extra_options="${extra_options} linux-android.opt"
1507                 # Assume modern glibc
1508                 default_gnu_indirect_function=yes
1509                 ;;
1510         x86_64-*-kfreebsd*-gnu)
1511                 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1512                 ;;
1513         x86_64-*-knetbsd*-gnu)
1514                 tm_file="${tm_file} knetbsd-gnu.h"
1515                 ;;
1516         esac
1517         tmake_file="${tmake_file} i386/t-linux64"
1518         x86_multilibs="${with_multilib_list}"
1519         if test "$x86_multilibs" = "default"; then
1520                 case ${with_abi} in
1521                 x32 | mx32)
1522                         x86_multilibs="mx32"
1523                         ;;
1524                 *)
1525                         x86_multilibs="m64,m32"
1526                         ;;
1527                 esac
1528         fi
1529         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1530         for x86_multilib in ${x86_multilibs}; do
1531                 case ${x86_multilib} in
1532                 m32 | m64 | mx32)
1533                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1534                         ;;
1535                 *)
1536                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1537                         exit 1
1538                 esac
1539         done
1540         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1541         ;;
1542 i[34567]86-pc-msdosdjgpp*)
1543         xm_file=i386/xm-djgpp.h
1544         tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
1545         native_system_header_dir=/dev/env/DJDIR/include
1546         extra_options="${extra_options} i386/djgpp.opt"
1547         gnu_ld=yes
1548         gas=yes
1549         use_gcc_stdint=wrap
1550         ;;
1551 i[34567]86-*-lynxos*)
1552         xm_defines=POSIX
1553         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1554         tmake_file="${tmake_file} t-lynx"
1555         extra_options="${extra_options} lynx.opt"
1556         thread_file=lynx
1557         gnu_ld=yes
1558         gas=yes
1559         ;;
1560 i[34567]86-*-nto-qnx*)
1561         tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
1562         extra_options="${extra_options} i386/nto.opt"
1563         gnu_ld=yes
1564         gas=yes
1565         ;;
1566 i[34567]86-*-rtems*)
1567         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"
1568         tmake_file="${tmake_file} i386/t-rtems"
1569         ;;
1570 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
1571         tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file}"
1572         # Set default arch_32 to pentium4, tune_32 to generic like the other
1573         # i386 targets, although config.guess defaults to i386-pc-solaris2*.
1574         case ${target} in
1575         *-*-solaris2.9*)
1576                 # Solaris 9/x86 cannot execute SSE/SSE2 instructions by default.
1577                 with_arch_32=${with_arch_32:-pentiumpro}
1578                 ;;
1579         *)
1580                 with_arch_32=${with_arch_32:-pentium4}
1581                 ;;
1582         esac
1583         with_tune_32=${with_tune_32:-generic}
1584         case ${target} in
1585         *-*-solaris2.9*)
1586                 tm_file="${tm_file} i386/sol2-9.h"
1587                 ;;
1588         *-*-solaris2.1[0-9]*)
1589                 tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h"
1590                 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1591                 tmake_file="$tmake_file i386/t-sol2-64"
1592                 need_64bit_isa=yes
1593                 if test x$with_cpu = x; then
1594                         if test x$with_cpu_64 = x; then
1595                                 with_cpu_64=generic
1596                         fi
1597                 else
1598                         case " $x86_cpus $x86_archs $x86_64_archs " in
1599                         *" $with_cpu "*)
1600                                 ;;
1601                         *)
1602                                 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1603                                 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1604                                 exit 1
1605                                 ;;
1606                         esac
1607                 fi
1608                 ;;
1609         esac
1610         ;;
1611 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
1612         tm_file="${tm_file} i386/unix.h i386/att.h elfos.h vx-common.h"
1613         case ${target} in
1614           *-vxworksae*)
1615             tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
1616             tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1617             ;;
1618           *)
1619             tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
1620             tmake_file="${tmake_file} i386/t-vxworks"
1621             ;;
1622         esac
1623         ;;
1624 i[34567]86-*-cygwin*)
1625         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"
1626         xm_file=i386/xm-cygwin.h
1627         tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
1628         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1629         extra_options="${extra_options} i386/cygming.opt"
1630         extra_objs="winnt.o winnt-stubs.o"
1631         c_target_objs="${c_target_objs} msformat-c.o"
1632         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1633         if test x$enable_threads = xyes; then
1634                 thread_file='posix'
1635         fi
1636         use_gcc_stdint=wrap
1637         ;;
1638 x86_64-*-cygwin*)
1639         need_64bit_isa=yes
1640         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"
1641         xm_file=i386/xm-cygwin.h
1642         tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
1643         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1644         extra_options="${extra_options} i386/cygming.opt"
1645         extra_objs="winnt.o winnt-stubs.o"
1646         c_target_objs="${c_target_objs} msformat-c.o"
1647         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1648         if test x$enable_threads = xyes; then
1649                 thread_file='posix'
1650         fi
1651         use_gcc_stdint=wrap
1652         tm_defines="${tm_defines} TARGET_CYGWIN64=1"
1653         ;;
1654 i[34567]86-*-mingw* | x86_64-*-mingw*)
1655         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
1656         xm_file=i386/xm-mingw32.h
1657         c_target_objs="${c_target_objs} winnt-c.o"
1658         cxx_target_objs="${cxx_target_objs} winnt-c.o"
1659         target_has_targetcm="yes"
1660         case ${target} in
1661                 x86_64-*-* | *-w64-*)
1662                         need_64bit_isa=yes
1663                         ;;
1664                 *)
1665                         ;;
1666         esac
1667         if test x$enable_threads = xposix ; then
1668                 tm_file="${tm_file} i386/mingw-pthread.h"
1669         fi
1670         tm_file="${tm_file} i386/mingw32.h"
1671         # This makes the logic if mingw's or the w64 feature set has to be used
1672         case ${target} in
1673                 *-w64-*)
1674                         user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1675                         user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
1676                         tm_file="${tm_file} i386/mingw-w64.h"
1677                         if test x$enable_targets = xall; then
1678                                 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1679                                 if test x$with_cpu = x; then
1680                                         if test x$with_cpu_64 = x; then
1681                                                 with_cpu_64=generic
1682                                         fi
1683                                 else
1684                                         case " $x86_cpus $x86_archs $x86_64_archs " in
1685                                         *" $with_cpu "*)
1686                                                 ;;
1687                                         *)
1688                                                 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1689                                                 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1690                                                 exit 1
1691                                                 ;;
1692                                         esac
1693                                 fi
1694                         fi
1695                         ;;
1696                 *)
1697                         ;;
1698         esac
1699         tm_file="${tm_file} i386/mingw-stdint.h"
1700         tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
1701         case ${target} in
1702                x86_64-w64-*)
1703                         tmake_file="${tmake_file} i386/t-mingw-w64"
1704                         ;;
1705                i[34567]86-w64-*)
1706                         tmake_file="${tmake_file} i386/t-mingw-w32"
1707                         ;;
1708         esac
1709         native_system_header_dir=/mingw/include
1710         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1711         extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
1712         case ${target} in
1713                 *-w64-*)
1714                         extra_options="${extra_options} i386/mingw-w64.opt"
1715                         ;;
1716                 *)
1717                         ;;
1718         esac
1719         extra_objs="winnt.o winnt-stubs.o"
1720         c_target_objs="${c_target_objs} msformat-c.o"
1721         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1722         gas=yes
1723         gnu_ld=yes
1724         default_use_cxa_atexit=yes
1725         use_gcc_stdint=wrap
1726         case ${enable_threads} in
1727           "" | yes | win32)
1728             thread_file='win32'
1729             ;;
1730           posix)
1731             thread_file='posix'
1732             ;;
1733         esac
1734         case ${target} in
1735                 *mingw32crt*)
1736                         tm_file="${tm_file} i386/crtdll.h"
1737                         ;;
1738                 *mingw32msv* | *mingw*)
1739                         ;;
1740         esac
1741         ;;
1742 i[34567]86-*-interix[3-9]*)
1743         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h"
1744         tmake_file="${tmake_file} i386/t-interix"
1745         extra_options="${extra_options} rpath.opt i386/interix.opt"
1746         extra_objs="winnt.o winnt-stubs.o"
1747         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1748         if test x$enable_threads = xyes ; then
1749                 thread_file='posix'
1750         fi
1751         if test x$stabs = xyes ; then
1752                 tm_file="${tm_file} dbxcoff.h"
1753         fi
1754         ;;
1755 ia64*-*-elf*)
1756         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
1757         tmake_file="ia64/t-ia64"
1758         target_cpu_default="0"
1759         if test x$gas = xyes
1760         then
1761                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1762         fi
1763         if test x$gnu_ld = xyes
1764         then
1765                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1766         fi
1767         ;;
1768 ia64*-*-freebsd*)
1769         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1770         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1771         tmake_file="${tmake_file} ia64/t-ia64"
1772         ;;
1773 ia64*-*-linux*)
1774         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
1775         tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
1776         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1777         ;;
1778 ia64*-*-hpux*)
1779         tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
1780         tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
1781         target_cpu_default="MASK_GNU_AS"
1782         case x$enable_threads in
1783         x | xyes | xposix )
1784                 thread_file=posix
1785                 ;;
1786         esac
1787         use_collect2=no
1788         c_target_objs="ia64-c.o"
1789         cxx_target_objs="ia64-c.o"
1790         extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
1791         use_gcc_stdint=wrap
1792         tm_file="${tm_file} hpux-stdint.h"
1793         case ${target} in
1794         *-*-hpux11.3*)
1795                 tm_file="${tm_file} ia64/hpux-unix2003.h"
1796                 ;;
1797         esac
1798         ;;
1799 ia64-hp-*vms*)
1800         tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
1801         tmake_file="${tmake_file} ia64/t-ia64"
1802         target_cpu_default="0"
1803         if test x$gas = xyes
1804         then
1805                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1806         fi
1807         extra_options="${extra_options} ia64/vms.opt"
1808         ;;
1809 iq2000*-*-elf*)
1810         tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
1811         out_file=iq2000/iq2000.c
1812         md_file=iq2000/iq2000.md
1813         ;;
1814 lm32-*-elf*)
1815         tm_file="dbxelf.h elfos.h ${tm_file}"
1816         tmake_file="${tmake_file} lm32/t-lm32"
1817         ;;
1818 lm32-*-rtems*)
1819         tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
1820         tmake_file="${tmake_file} lm32/t-lm32"
1821         tmake_file="${tmake_file} lm32/t-rtems"
1822          ;;
1823 lm32-*-uclinux*)
1824         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
1825         tmake_file="${tmake_file} lm32/t-lm32"
1826         ;;
1827 m32r-*-elf*)
1828         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1829         ;;
1830 m32rle-*-elf*)
1831         tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
1832         ;;
1833 m32r-*-rtems*)
1834         tm_file="dbxelf.h elfos.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
1835         tmake_file="${tmake_file} m32r/t-m32r"
1836         ;;
1837 m32r-*-linux*)
1838         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
1839         tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
1840         gnu_ld=yes
1841         if test x$enable_threads = xyes; then
1842                 thread_file='posix'
1843         fi
1844         ;;
1845 m32rle-*-linux*)
1846         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
1847         tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
1848         gnu_ld=yes
1849         if test x$enable_threads = xyes; then
1850                 thread_file='posix'
1851         fi
1852         ;;
1853 m68k-*-elf* | fido-*-elf*)
1854         case ${target} in
1855         fido-*-elf*)
1856                 # Check that $with_cpu makes sense.
1857                 case $with_cpu in
1858                 "" | "fidoa")
1859                         ;;
1860                 *)
1861                         echo "Cannot accept --with-cpu=$with_cpu"
1862                         exit 1
1863                         ;;
1864                 esac
1865                 with_cpu=fidoa
1866                 ;;
1867         *)
1868                 default_m68k_cpu=68020
1869                 default_cf_cpu=5206
1870                 ;;
1871         esac
1872         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"
1873         tm_defines="${tm_defines} MOTOROLA=1"
1874         tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1875         # Add multilibs for targets other than fido.
1876         case ${target} in
1877         fido-*-elf*)
1878                 ;;
1879         *)
1880                 tmake_file="$tmake_file m68k/t-mlibs"
1881                 ;;
1882         esac
1883         ;;
1884 m68k*-*-netbsdelf*)
1885         default_m68k_cpu=68020
1886         default_cf_cpu=5475
1887         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1888         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1889         tm_defines="${tm_defines} MOTOROLA=1"
1890         ;;
1891 m68k*-*-openbsd*)
1892         default_m68k_cpu=68020
1893         default_cf_cpu=5475
1894         # needed to unconfuse gdb
1895         tm_defines="${tm_defines} OBSD_OLD_GAS"
1896         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1897         extra_options="${extra_options} openbsd.opt"
1898         tmake_file="t-openbsd m68k/t-openbsd"
1899         # we need collect2 until our bug is fixed...
1900         use_collect2=yes
1901         ;;
1902 m68k-*-uclinux*)                # Motorola m68k/ColdFire running uClinux
1903                                 # with uClibc, using the new GNU/Linux-style
1904                                 # ABI.
1905         default_m68k_cpu=68020
1906         default_cf_cpu=5206
1907         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"
1908         extra_options="${extra_options} m68k/uclinux.opt"
1909         tm_defines="${tm_defines} MOTOROLA=1"
1910         tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
1911         ;;
1912 m68k-*-linux*)                  # Motorola m68k's running GNU/Linux
1913                                 # with ELF format using glibc 2
1914                                 # aka the GNU/Linux C library 6.
1915         default_m68k_cpu=68020
1916         default_cf_cpu=5475
1917         with_arch=${with_arch:-m68k}
1918         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
1919         extra_options="${extra_options} m68k/ieee.opt"
1920         tm_defines="${tm_defines} MOTOROLA=1"
1921         tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
1922         ;;
1923 m68k-*-rtems*)
1924         default_m68k_cpu=68020
1925         default_cf_cpu=5206
1926         tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
1927         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"
1928         tm_defines="${tm_defines} MOTOROLA=1"
1929         ;;
1930 mcore-*-elf)
1931         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
1932         tmake_file=mcore/t-mcore
1933         inhibit_libc=true
1934         ;;
1935 mep-*-*)
1936         tm_file="dbxelf.h elfos.h ${tm_file}"
1937         tmake_file=mep/t-mep
1938         c_target_objs="mep-pragma.o"
1939         cxx_target_objs="mep-pragma.o"
1940         if test -d "${srcdir}/../newlib/libc/include" &&
1941            test "x$with_headers" = x; then
1942                 with_headers=yes
1943         fi
1944         use_gcc_stdint=wrap
1945         ;;
1946 microblaze*-linux*)
1947         case $target in
1948                 microblazeel-*)
1949                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1950                         ;;
1951                 microblaze-*)
1952                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1953                         ;;
1954         esac
1955         tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
1956         tm_file="${tm_file} glibc-stdint.h"
1957         c_target_objs="${c_target_objs} microblaze-c.o"
1958         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1959         tmake_file="${tmake_file} microblaze/t-microblaze"
1960         tmake_file="${tmake_file} microblaze/t-microblaze-linux"
1961         ;;
1962 microblaze*-*-rtems*)
1963         case $target in
1964                 microblazeel-*)
1965                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1966                         ;;
1967                 microblaze-*)
1968                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1969                         ;;
1970         esac
1971         tm_file="${tm_file} dbxelf.h"
1972         tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
1973         c_target_objs="${c_target_objs} microblaze-c.o"
1974         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1975         tmake_file="${tmake_file} microblaze/t-microblaze"
1976         tmake_file="${tmake_file} microblaze/t-rtems"
1977         ;;
1978 microblaze*-*-elf)
1979         case $target in
1980                 microblazeel-*)
1981                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1982                         ;;
1983                 microblaze-*)
1984                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1985                         ;;
1986         esac
1987         tm_file="${tm_file} dbxelf.h newlib-stdint.h"
1988         c_target_objs="${c_target_objs} microblaze-c.o"
1989         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1990         tmake_file="${tmake_file} microblaze/t-microblaze"
1991         ;;
1992 mips*-*-netbsd*)                        # NetBSD/mips, either endian.
1993         target_cpu_default="MASK_ABICALLS"
1994         tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
1995         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1996         ;;
1997 mips*-mti-linux*)
1998         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"
1999         extra_options="${extra_options} linux-android.opt"
2000         tmake_file="${tmake_file} mips/t-mti-linux"
2001         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2002         gnu_ld=yes
2003         gas=yes
2004         ;;
2005 mips64*-*-linux* | mipsisa64*-*-linux*)
2006         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"
2007         extra_options="${extra_options} linux-android.opt"
2008         tmake_file="${tmake_file} mips/t-linux64"
2009         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
2010         case ${target} in
2011                 mips64el-st-linux-gnu)
2012                         tm_file="${tm_file} mips/st.h"
2013                         tmake_file="${tmake_file} mips/t-st"
2014                         ;;
2015                 mips64octeon*-*-linux*)
2016                         tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
2017                         target_cpu_default=MASK_SOFT_FLOAT_ABI
2018                         ;;
2019                 mipsisa64r2*-*-linux*)
2020                         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
2021                         ;;
2022         esac
2023         gnu_ld=yes
2024         gas=yes
2025         ;;
2026 mips*-*-linux*)                         # Linux MIPS, either endian.
2027         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"
2028         extra_options="${extra_options} linux-android.opt"
2029         if test x$enable_targets = xall; then
2030                 tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
2031                 tmake_file="${tmake_file} mips/t-linux64"
2032         fi
2033         tm_file="${tm_file} mips/linux-common.h"
2034         case ${target} in
2035         mipsisa32r2*)
2036                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
2037                 ;;
2038         mipsisa32*)
2039                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2040         esac
2041         ;;
2042 mips*-mti-elf*)
2043         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2044         tmake_file="mips/t-mti-elf"
2045         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2046         ;;
2047 mips*-sde-elf*)
2048         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
2049         tmake_file="mips/t-sde"
2050         extra_options="${extra_options} mips/sde.opt"
2051         case "${with_newlib}" in
2052           yes)
2053             # newlib / libgloss.
2054             ;;
2055           *)
2056             # MIPS toolkit libraries.
2057             tm_file="$tm_file mips/sdemtk.h"
2058             tmake_file="$tmake_file mips/t-sdemtk"
2059             case ${enable_threads} in
2060               "" | yes | mipssde)
2061                 thread_file='mipssde'
2062                 ;;
2063             esac
2064             ;;
2065         esac
2066         case ${target} in
2067           mipsisa32r2*)
2068             tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2069             ;;
2070           mipsisa32*)
2071             tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
2072             ;;
2073           mipsisa64r2*)
2074             tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
2075             ;;
2076           mipsisa64*)
2077             tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
2078             ;;
2079         esac
2080         ;;
2081 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
2082 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
2083 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
2084 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
2085         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2086         tmake_file="mips/t-isa3264"
2087         case ${target} in
2088           mipsisa32r2*)
2089             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
2090             ;;
2091           mipsisa32*)
2092             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2093             ;;
2094           mipsisa64r2*)
2095             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
2096             ;;
2097           mipsisa64*)
2098             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
2099             ;;
2100         esac
2101         case ${target} in
2102           mipsisa32*-*-elfoabi*)
2103             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
2104             tm_file="${tm_file} mips/elfoabi.h"
2105             ;;
2106           mipsisa64*-*-elfoabi*)
2107             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
2108             tm_file="${tm_file} mips/elfoabi.h"
2109             ;;
2110           *-*-elf*)
2111             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2112             ;;
2113         esac
2114         ;;
2115 mipsisa64sr71k-*-elf*)
2116         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2117         tmake_file=mips/t-sr71k
2118         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2119         ;;
2120 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
2121         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2122         tmake_file="mips/t-elf mips/t-sb1"
2123         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
2124         ;;
2125 mips-*-elf* | mipsel-*-elf* | mipsr5900-*-elf* | mipsr5900el-*-elf*)
2126         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2127         tmake_file="mips/t-elf"
2128         ;;
2129 mips64r5900-*-elf* | mips64r5900el-*-elf*)
2130         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h"
2131         tmake_file="mips/t-elf"
2132         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
2133         ;;
2134 mips64-*-elf* | mips64el-*-elf*)
2135         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2136         tmake_file="mips/t-elf"
2137         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2138         ;;
2139 mips64vr-*-elf* | mips64vrel-*-elf*)
2140         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
2141         tmake_file=mips/t-vr
2142         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2143         ;;
2144 mips64orion-*-elf* | mips64orionel-*-elf*)
2145         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
2146         tmake_file="mips/t-elf"
2147         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2148         ;;
2149 mips*-*-rtems*)
2150         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
2151         tmake_file="${tmake_file} mips/t-elf mips/t-rtems"
2152         ;;
2153 mips-wrs-vxworks)
2154         tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
2155         tmake_file="${tmake_file} mips/t-vxworks"
2156         ;;
2157 mipstx39-*-elf* | mipstx39el-*-elf*)
2158         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
2159         tmake_file="mips/t-r3900"
2160         ;;
2161 mmix-knuth-mmixware)
2162         tm_file="${tm_file} newlib-stdint.h"
2163         need_64bit_hwint=yes
2164         use_gcc_stdint=wrap
2165         ;;
2166 mn10300-*-*)
2167         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2168         if test x$stabs = xyes
2169         then
2170                 tm_file="${tm_file} dbx.h"
2171         fi
2172         use_collect2=no
2173         use_gcc_stdint=wrap
2174         ;;
2175 msp430*-*-*)
2176         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2177         c_target_objs="msp430-c.o"
2178         cxx_target_objs="msp430-c.o"
2179         tmake_file="${tmake_file} msp430/t-msp430"
2180         ;;
2181 nds32le-*-*)
2182         target_cpu_default="0"
2183         tm_defines="${tm_defines}"
2184         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2185         tmake_file="nds32/t-mlibs"
2186         ;;
2187 nds32be-*-*)
2188         target_cpu_default="0|MASK_BIG_ENDIAN"
2189         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2190         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2191         tmake_file="nds32/t-mlibs"
2192         ;;
2193 nios2-*-*)
2194         tm_file="elfos.h ${tm_file}"
2195         tmake_file="${tmake_file} nios2/t-nios2"
2196         case ${target} in
2197         nios2-*-linux*)
2198                 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h nios2/linux.h "
2199                 ;;
2200         nios2-*-elf*)
2201                 tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
2202                 extra_options="${extra_options} nios2/elf.opt"
2203                 ;;
2204         nios2-*-rtems*)
2205                 tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
2206                 tmake_file="${tmake_file} t-rtems nios2/t-rtems"
2207                 ;;
2208         esac
2209         ;;
2210 pdp11-*-*)
2211         tm_file="${tm_file} newlib-stdint.h"
2212         use_gcc_stdint=wrap
2213         ;;
2214 picochip-*)
2215         tm_file="${tm_file} newlib-stdint.h"
2216         use_gcc_stdint=wrap
2217         tmake_file="picochip/t-picochip t-pnt16-warn"
2218         ;;
2219 # port not yet contributed
2220 #powerpc-*-openbsd*)
2221 #       tmake_file="${tmake_file} rs6000/t-fprules"
2222 #       extra_headers=
2223 #       ;;
2224 powerpc-*-darwin*)
2225         extra_options="${extra_options} rs6000/darwin.opt"
2226         case ${target} in
2227           *-darwin1[0-9]* | *-darwin[8-9]*)
2228             tmake_file="${tmake_file} rs6000/t-darwin8"
2229             tm_file="${tm_file} rs6000/darwin8.h"
2230             ;;
2231           *-darwin7*)
2232             tm_file="${tm_file} rs6000/darwin7.h"
2233             ;;
2234           *-darwin[0-6]*)
2235             ;;
2236         esac
2237         tmake_file="${tmake_file} t-slibgcc"
2238         extra_headers=altivec.h
2239         ;;
2240 powerpc64-*-darwin*)
2241         extra_options="${extra_options} ${cpu_type}/darwin.opt"
2242         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
2243         tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
2244         extra_headers=altivec.h
2245         ;;
2246 powerpc*-*-freebsd*)
2247         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h"
2248         extra_options="${extra_options} rs6000/sysv4.opt"
2249         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2250         case ${target} in
2251              powerpc64*)
2252                 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2253                 tmake_file="${tmake_file} rs6000/t-freebsd64"
2254                 extra_options="${extra_options} rs6000/linux64.opt"
2255                 ;;
2256              *)
2257                 tm_file="${tm_file} rs6000/freebsd.h"
2258                 ;;
2259         esac
2260         ;;
2261 powerpc-*-netbsd*)
2262         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
2263         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2264         tmake_file="${tmake_file} rs6000/t-netbsd"
2265         extra_options="${extra_options} rs6000/sysv4.opt"
2266         ;;
2267 powerpc-*-eabispe*)
2268         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"
2269         extra_options="${extra_options} rs6000/sysv4.opt"
2270         tmake_file="rs6000/t-spe rs6000/t-ppccomm"
2271         use_gcc_stdint=wrap
2272         ;;
2273 powerpc-*-eabisimaltivec*)
2274         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"
2275         extra_options="${extra_options} rs6000/sysv4.opt"
2276         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2277         use_gcc_stdint=wrap
2278         ;;
2279 powerpc-*-eabisim*)
2280         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"
2281         extra_options="${extra_options} rs6000/sysv4.opt"
2282         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2283         use_gcc_stdint=wrap
2284         ;;
2285 powerpc-*-elf*)
2286         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
2287         extra_options="${extra_options} rs6000/sysv4.opt"
2288         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2289         ;;
2290 powerpc-*-eabialtivec*)
2291         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"
2292         extra_options="${extra_options} rs6000/sysv4.opt"
2293         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2294         use_gcc_stdint=wrap
2295         ;;
2296 powerpc-xilinx-eabi*)
2297         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"
2298         extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
2299         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
2300         use_gcc_stdint=wrap
2301         ;;
2302 powerpc-*-eabi*)
2303         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"
2304         extra_options="${extra_options} rs6000/sysv4.opt"
2305         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2306         use_gcc_stdint=wrap
2307         ;;
2308 powerpc-*-rtems*)
2309         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"
2310         extra_options="${extra_options} rs6000/sysv4.opt"
2311         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
2312         ;;
2313 powerpc*-*-linux*)
2314         tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
2315         extra_options="${extra_options} rs6000/sysv4.opt"
2316         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2317         extra_objs="$extra_objs rs6000-linux.o"
2318         case ${target} in
2319             powerpc*le-*-*)
2320                 tm_file="${tm_file} rs6000/sysv4le.h" ;;
2321         esac
2322         maybe_biarch=yes
2323         case ${target} in
2324             powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
2325                 echo "*** Configuration ${target} not supported" 1>&2
2326                 exit 1
2327                 ;;
2328             powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
2329                 maybe_biarch=
2330                 ;;
2331             powerpc64*-*-linux*)
2332                 test x$with_cpu != x || cpu_is_64bit=yes
2333                 maybe_biarch=always
2334                 ;;
2335         esac
2336         case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
2337             always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
2338                 if test x$cpu_is_64bit = xyes; then
2339                     tm_file="${tm_file} rs6000/default64.h"
2340                 fi
2341                 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2342                 tmake_file="$tmake_file rs6000/t-linux64"
2343                 case ${target} in
2344                     powerpc*le-*-*)
2345                         tmake_file="$tmake_file rs6000/t-linux64le"
2346                         case ${enable_targets} in
2347                             all | *powerpc64-* | *powerpc-*)
2348                                 tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
2349                         esac ;;
2350                     *)
2351                         case ${enable_targets} in
2352                             all | *powerpc64le-* | *powerpcle-*)
2353                                 tmake_file="$tmake_file rs6000/t-linux64bele" ;;
2354                         esac ;;
2355                 esac
2356                 extra_options="${extra_options} rs6000/linux64.opt"
2357                 ;;
2358             *)
2359                 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2360                 tmake_file="$tmake_file rs6000/t-linux"
2361                 ;;
2362         esac
2363         case ${target} in
2364             powerpc*-*-linux*ppc476*)
2365                 tm_file="${tm_file} rs6000/476.h"
2366                 extra_options="${extra_options} rs6000/476.opt" ;;
2367             powerpc*-*-linux*altivec*)
2368                 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2369             powerpc*-*-linux*spe*)
2370                 tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2371             powerpc*-*-linux*paired*)
2372                 tm_file="${tm_file} rs6000/750cl.h" ;;
2373         esac
2374         if test x${enable_secureplt} = xyes; then
2375                 tm_file="rs6000/secureplt.h ${tm_file}"
2376         fi
2377         ;;
2378 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
2379         tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
2380         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
2381         extra_options="${extra_options} rs6000/sysv4.opt"
2382         extra_headers=ppc-asm.h
2383         case ${target} in
2384           *-vxworksae*)
2385             tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h"
2386             tmake_file="${tmake_file} rs6000/t-vxworksae"
2387             ;;
2388           *-vxworks*)
2389             tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2390             ;;
2391         esac
2392         ;;
2393 powerpc-*-lynxos*)
2394         xm_defines=POSIX
2395         tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2396         tmake_file="t-lynx rs6000/t-lynx"
2397         extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2398         thread_file=lynx
2399         gnu_ld=yes
2400         gas=yes
2401         ;;
2402 powerpcle-*-elf*)
2403         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2404         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2405         extra_options="${extra_options} rs6000/sysv4.opt"
2406         ;;
2407 powerpcle-*-eabisim*)
2408         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"
2409         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2410         extra_options="${extra_options} rs6000/sysv4.opt"
2411         use_gcc_stdint=wrap
2412         ;;
2413 powerpcle-*-eabi*)
2414         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"
2415         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2416         extra_options="${extra_options} rs6000/sysv4.opt"
2417         use_gcc_stdint=wrap
2418         ;;
2419 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2420         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2421         tmake_file="rs6000/t-aix43 t-slibgcc"
2422         extra_options="${extra_options} rs6000/aix64.opt"
2423         use_collect2=yes
2424         thread_file='aix'
2425         use_gcc_stdint=provide
2426         extra_headers=
2427         ;;
2428 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2429         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2430         extra_options="${extra_options} rs6000/aix64.opt"
2431         tmake_file="rs6000/t-aix43 t-slibgcc"
2432         use_collect2=yes
2433         thread_file='aix'
2434         use_gcc_stdint=wrap
2435         extra_headers=
2436         ;;
2437 rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2438         tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
2439         tmake_file="rs6000/t-aix52 t-slibgcc"
2440         extra_options="${extra_options} rs6000/aix64.opt"
2441         use_collect2=yes
2442         thread_file='aix'
2443         use_gcc_stdint=wrap
2444         extra_headers=
2445         ;;
2446 rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2447         tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2448         tmake_file="rs6000/t-aix52 t-slibgcc"
2449         extra_options="${extra_options} rs6000/aix64.opt"
2450         use_collect2=yes
2451         thread_file='aix'
2452         use_gcc_stdint=wrap
2453         extra_headers=altivec.h
2454         ;;
2455 rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2456         tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2457         tmake_file="rs6000/t-aix52 t-slibgcc"
2458         extra_options="${extra_options} rs6000/aix64.opt"
2459         use_collect2=yes
2460         thread_file='aix'
2461         use_gcc_stdint=wrap
2462         extra_headers=altivec.h
2463         ;;
2464 rl78-*-elf*)
2465         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2466         target_has_targetm_common=no
2467         c_target_objs="rl78-c.o"
2468         cxx_target_objs="rl78-c.o"
2469         tmake_file="${tmake_file} rl78/t-rl78"
2470         ;;
2471 rx-*-elf*)
2472         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2473         tmake_file="${tmake_file} rx/t-rx"
2474         ;;
2475 s390-*-linux*)
2476         default_gnu_indirect_function=yes
2477         tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2478         if test x$enable_targets = xall; then
2479                 tmake_file="${tmake_file} s390/t-linux64"
2480         fi
2481         ;;
2482 s390x-*-linux*)
2483         default_gnu_indirect_function=yes
2484         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2485         tm_p_file="linux-protos.h s390/s390-protos.h"
2486         md_file=s390/s390.md
2487         extra_modes=s390/s390-modes.def
2488         out_file=s390/s390.c
2489         tmake_file="${tmake_file} s390/t-linux64"
2490         ;;
2491 s390x-ibm-tpf*)
2492         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
2493         tm_p_file=s390/s390-protos.h
2494         md_file=s390/s390.md
2495         extra_modes=s390/s390-modes.def
2496         out_file=s390/s390.c
2497         thread_file='tpf'
2498         extra_options="${extra_options} s390/tpf.opt"
2499         ;;
2500 score-*-elf)
2501         gas=yes
2502         gnu_ld=yes
2503         tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
2504         ;;
2505 sh-*-elf* | sh[12346l]*-*-elf* | \
2506   sh-*-linux* | sh[2346lbe]*-*-linux* | \
2507   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2508   sh64-*-netbsd* | sh64l*-*-netbsd*)
2509         tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2510         if test x${with_endian} = x; then
2511                 case ${target} in
2512                 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2513                 shbe-*-* | sheb-*-*)               with_endian=big,little ;;
2514                 sh[1234]l* | sh[34]*-*-linux*)     with_endian=little ;;
2515                 shl* | sh64l* | sh*-*-linux* | \
2516                   sh5l* | sh-superh-elf)           with_endian=little,big ;;
2517                 sh[1234]*-*-*)                     with_endian=big ;;
2518                 *)                                 with_endian=big,little ;;
2519                 esac
2520         fi
2521         # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2522         #  First word : the default endian.
2523         #  Second word: the secondary endian (optional).
2524         case ${with_endian} in
2525         big)            TM_ENDIAN_CONFIG=mb ;;
2526         little)         TM_ENDIAN_CONFIG=ml ;;
2527         big,little)     TM_ENDIAN_CONFIG="mb ml" ;;
2528         little,big)     TM_ENDIAN_CONFIG="ml mb" ;;
2529         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
2530         esac
2531         case ${with_endian} in
2532         little*)        tm_file="sh/little.h ${tm_file}" ;;
2533         esac
2534         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
2535         case ${target} in
2536         sh*-*-linux*)   tmake_file="${tmake_file} sh/t-linux"
2537                         tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
2538         sh*-*-netbsd*)
2539                         tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h"
2540                         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2541
2542                         ;;
2543         sh*-superh-elf) if test x$with_libgloss != xno; then
2544                                 with_libgloss=yes
2545                                 tm_file="${tm_file} sh/newlib.h"
2546                         fi
2547                         tm_file="${tm_file} sh/embed-elf.h"
2548                         tm_file="${tm_file} sh/superh.h"
2549                         extra_options="${extra_options} sh/superh.opt" ;;
2550         *)              if test x$with_newlib = xyes \
2551                            && test x$with_libgloss = xyes; then
2552                                 tm_file="${tm_file} sh/newlib.h"
2553                         fi
2554                         tm_file="${tm_file} sh/embed-elf.h" ;;
2555         esac
2556         case ${target} in
2557         sh5*-*-netbsd*)
2558                 # SHmedia, 32-bit ABI
2559                 tmake_file="${tmake_file} sh/t-sh64"
2560                 ;;
2561         sh64*-netbsd*)
2562                 # SHmedia, 64-bit ABI
2563                 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5-64"
2564                 ;;
2565         *-*-netbsd)
2566                 ;;
2567         sh64*-*-linux*)
2568                 tmake_file="${tmake_file} sh/t-sh64"
2569                 tm_file="${tm_file} sh/sh64.h"
2570                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2571                 ;;
2572         sh64*)
2573                 tmake_file="${tmake_file} sh/t-sh64"
2574                 tm_file="${tm_file} sh/sh64.h"
2575                 if test x$with_newlib = xyes; then
2576                         tm_file="${tm_file} newlib-stdint.h"
2577                 fi
2578                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2579                 ;;
2580         *-*-elf*)
2581                 tm_file="${tm_file} newlib-stdint.h"
2582                 ;;
2583         esac
2584         # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2585         case `echo ${target} | sed 's/e[lb]-/-/'` in
2586         sh64*-*-netbsd*)        sh_cpu_target=sh5-64media ;;
2587         sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
2588         sh4a_single_only*)      sh_cpu_target=sh4a-single-only ;;
2589         sh4a_single*)           sh_cpu_target=sh4a-single ;;
2590         sh4a_nofpu*)            sh_cpu_target=sh4a-nofpu ;;
2591         sh4al)                  sh_cpu_target=sh4al ;;
2592         sh4a*)                  sh_cpu_target=sh4a ;;
2593         sh4_single_only*)       sh_cpu_target=sh4-single-only ;;
2594         sh4_single*)            sh_cpu_target=sh4-single ;;
2595         sh4_nofpu*)             sh_cpu_target=sh4-nofpu ;;
2596         sh4* | sh-superh-*)     sh_cpu_target=sh4 ;;
2597         sh3e*)                  sh_cpu_target=sh3e ;;
2598         sh*-*-netbsd* | sh3*)   sh_cpu_target=sh3 ;;
2599         sh2a_single_only*)      sh_cpu_target=sh2a-single-only ;;
2600         sh2a_single*)           sh_cpu_target=sh2a-single ;;
2601         sh2a_nofpu*)            sh_cpu_target=sh2a-nofpu ;;
2602         sh2a*)                  sh_cpu_target=sh2a ;;
2603         sh2e*)                  sh_cpu_target=sh2e ;;
2604         sh2*)                   sh_cpu_target=sh2 ;;
2605         *)                      sh_cpu_target=sh1 ;;
2606         esac
2607         # did the user say --without-fp ?
2608         if test x$with_fp = xno; then
2609                 case ${sh_cpu_target} in
2610                 sh5-*media)     sh_cpu_target=${sh_cpu_target}-nofpu ;;
2611                 sh4al | sh1)    ;;
2612                 sh4a* )         sh_cpu_target=sh4a-nofpu ;;
2613                 sh4*)           sh_cpu_target=sh4-nofpu ;;
2614                 sh3*)           sh_cpu_target=sh3 ;;
2615                 sh2a*)          sh_cpu_target=sh2a-nofpu ;;
2616                 sh2*)           sh_cpu_target=sh2 ;;
2617                 *)      echo --without-fp not available for $target: ignored
2618                 esac
2619                 tm_defines="$tm_defines STRICT_NOFPU=1"
2620         fi
2621         sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2622         case $sh_cpu_default in
2623         sh5-64media-nofpu | sh5-64media | \
2624           sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2625           sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2626           sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2627           sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2628           sh3e | sh3 | sh2e | sh2 | sh1) ;;
2629         "")     sh_cpu_default=${sh_cpu_target} ;;
2630         *)      echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2631         esac
2632         sh_multilibs=${with_multilib_list}
2633         if test "$sh_multilibs" = "default" ; then
2634                 case ${target} in
2635                 sh64-superh-linux* | \
2636                 sh[1234]*)      sh_multilibs=${sh_cpu_target} ;;
2637                 sh64* | sh5*)   sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2638                 sh-superh-*)    sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2639                 sh*-*-linux*)   sh_multilibs=m1,m2,m2a,m3e,m4 ;;
2640                 sh*-*-netbsd*)  sh_multilibs=m3,m3e,m4 ;;
2641                 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2642                 esac
2643                 if test x$with_fp = xno; then
2644                         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`"
2645                 fi
2646         fi
2647         target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2648         tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2649         tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2650         sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2651         for sh_multilib in ${sh_multilibs}; do
2652                 case ${sh_multilib} in
2653                 m1 | m2 | m2e | m3 | m3e | \
2654                 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2655                 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2656                 m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2657                 m5-64media | m5-64media-nofpu | \
2658                 m5-32media | m5-32media-nofpu | \
2659                 m5-compact | m5-compact-nofpu)
2660                         # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2661                         # It is passed to MULTIILIB_OPTIONS verbatim.
2662                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2663                         tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2664                         ;;
2665                 \!*)    # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2666                         # It is passed the MULTILIB_EXCEPTIONS verbatim.
2667                         TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
2668                 *)
2669                         echo "with_multilib_list=${sh_multilib} not supported."
2670                         exit 1
2671                         ;;
2672                 esac
2673         done
2674         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
2675         if test x${enable_incomplete_targets} = xyes ; then
2676                 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"
2677         fi
2678         tm_file="$tm_file ./sysroot-suffix.h"
2679         tmake_file="$tmake_file t-sysroot-suffix"
2680         ;;
2681 sh-*-rtems*)
2682         tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
2683         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
2684         ;;
2685 sh-wrs-vxworks)
2686         tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
2687         tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
2688         ;;
2689 sparc-*-elf*)
2690         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
2691         case ${target} in
2692             *-leon-*)
2693                 tmake_file="sparc/t-sparc sparc/t-leon"
2694                 ;;
2695             *-leon[3-9]*)
2696                 tmake_file="sparc/t-sparc sparc/t-leon3"
2697                 ;;
2698             *)
2699                 tmake_file="sparc/t-sparc sparc/t-elf"
2700                 ;;
2701         esac
2702         ;;
2703 sparc-*-rtems*)
2704         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
2705         tmake_file="${tmake_file} sparc/t-sparc sparc/t-elf sparc/t-rtems"
2706         ;;
2707 sparc-*-linux*)
2708         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
2709         extra_options="${extra_options} sparc/long-double-switch.opt"
2710         case ${target} in
2711             *-leon-*)
2712                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
2713                 ;;
2714             *-leon[3-9]*)
2715                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
2716                 ;;
2717             *)
2718                 tmake_file="${tmake_file} sparc/t-sparc"
2719                 ;;
2720         esac
2721         if test x$enable_targets = xall; then
2722                 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
2723                 tmake_file="${tmake_file} sparc/t-linux64"
2724         else
2725                 tm_file="${tm_file} sparc/linux.h"
2726                 tmake_file="${tmake_file} sparc/t-linux"
2727         fi
2728         ;;
2729 sparc-*-netbsdelf*)
2730         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2731         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2732         extra_options="${extra_options} sparc/long-double-switch.opt"
2733         tmake_file="${tmake_file} sparc/t-sparc"
2734         ;;
2735 sparc*-*-solaris2*)
2736         tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sol2-bi.h sparc/tso.h"
2737         case ${target} in
2738             sparc64-*-* | sparcv9-*-*)
2739                 tm_file="sparc/default-64.h ${tm_file}"
2740                 ;;
2741             *)
2742                 test x$with_cpu != x || with_cpu=v9
2743                 ;;
2744         esac
2745         tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2-64"
2746         ;;
2747 sparc-wrs-vxworks)
2748         tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2749         tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
2750         ;;
2751 sparc64-*-elf*)
2752         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
2753         extra_options="${extra_options}"
2754         tmake_file="${tmake_file} sparc/t-sparc"
2755         ;;
2756 sparc64-*-rtems*)
2757         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
2758         extra_options="${extra_options}"
2759         tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
2760         ;;
2761 sparc64-*-linux*)
2762         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"
2763         extra_options="${extra_options} sparc/long-double-switch.opt"
2764         tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
2765         ;;
2766 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2767         tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2768         extra_options="${extra_options} sparc/long-double-switch.opt"
2769         case "x$with_cpu" in
2770                 xultrasparc) ;;
2771                 x) with_cpu=ultrasparc ;;
2772                 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2773         esac
2774         tmake_file="${tmake_file} sparc/t-sparc"
2775         ;;
2776 sparc64-*-netbsd*)
2777         tm_file="sparc/biarch64.h ${tm_file}"
2778         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2779         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2780         extra_options="${extra_options} sparc/long-double-switch.opt"
2781         tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
2782         ;;
2783 sparc64-*-openbsd*)
2784         tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
2785         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
2786         extra_options="${extra_options} openbsd.opt"
2787         extra_options="${extra_options}"
2788         gas=yes gnu_ld=yes
2789         with_cpu=ultrasparc
2790         tmake_file="${tmake_file} sparc/t-sparc"
2791         ;;
2792 spu-*-elf*)
2793         tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
2794         tmake_file="spu/t-spu-elf"
2795         native_system_header_dir=/include
2796         extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
2797         extra_modes=spu/spu-modes.def
2798         c_target_objs="${c_target_objs} spu-c.o"
2799         cxx_target_objs="${cxx_target_objs} spu-c.o"
2800         ;;
2801 tic6x-*-elf)
2802         tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
2803         tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
2804         tmake_file="c6x/t-c6x c6x/t-c6x-elf"
2805         use_collect2=no
2806         ;;
2807 tic6x-*-uclinux)
2808         tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
2809         tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
2810         tm_file="${tm_file} ./sysroot-suffix.h"
2811         tmake_file="t-sysroot-suffix t-slibgcc"
2812         tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
2813         use_collect2=no
2814         ;;
2815 tilegx*-*-linux*)
2816         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
2817         tmake_file="${tmake_file} tilegx/t-tilegx"
2818         extra_objs="${extra_objs} mul-tables.o"
2819         c_target_objs="${c_target_objs} tilegx-c.o"
2820         cxx_target_objs="${cxx_target_objs} tilegx-c.o"
2821         extra_headers="feedback.h"
2822         case $target in
2823         tilegxbe-*)
2824                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2825                 ;;
2826         esac
2827         ;;
2828 tilepro*-*-linux*)
2829         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
2830         tmake_file="${tmake_file} tilepro/t-tilepro"
2831         extra_objs="${extra_objs} mul-tables.o"
2832         c_target_objs="${c_target_objs} tilepro-c.o"
2833         cxx_target_objs="${cxx_target_objs} tilepro-c.o"
2834         extra_headers="feedback.h"
2835         ;;
2836 v850-*-rtems*)
2837         target_cpu_default="TARGET_CPU_generic"
2838         tm_file="dbxelf.h elfos.h v850/v850.h"
2839         tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
2840         tmake_file="${tmake_file} v850/t-v850"
2841         tmake_file="${tmake_file} v850/t-rtems"
2842         use_collect2=no
2843         c_target_objs="v850-c.o"
2844         cxx_target_objs="v850-c.o"
2845         ;;
2846 v850*-*-*)
2847         case ${target} in
2848         v850e3v5-*-*)
2849                 target_cpu_default="TARGET_CPU_v850e3v5"
2850                 ;;
2851         v850e2v3-*-*)
2852                 target_cpu_default="TARGET_CPU_v850e2v3"
2853                 ;;
2854         v850e2-*-*)
2855                 target_cpu_default="TARGET_CPU_v850e2"
2856                 ;;
2857         v850e1-*-* | v850es-*-*)
2858                 target_cpu_default="TARGET_CPU_v850e1"
2859                 ;;
2860         v850e-*-*)
2861                 target_cpu_default="TARGET_CPU_v850e"
2862                 ;;
2863         v850-*-*)
2864                 target_cpu_default="TARGET_CPU_generic"
2865                 ;;
2866         esac
2867         tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
2868         if test x$stabs = xyes
2869         then
2870                 tm_file="${tm_file} dbx.h"
2871         fi
2872         use_collect2=no
2873         c_target_objs="v850-c.o"
2874         cxx_target_objs="v850-c.o"
2875         use_gcc_stdint=wrap
2876         ;;
2877 vax-*-linux*)
2878         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
2879         extra_options="${extra_options} vax/elf.opt"
2880         ;;
2881 vax-*-netbsdelf*)
2882         tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2883         extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
2884         ;;
2885 vax-*-openbsd*)
2886         tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
2887         extra_options="${extra_options} openbsd.opt"
2888         use_collect2=yes
2889         ;;
2890 xstormy16-*-elf)
2891         # For historical reasons, the target files omit the 'x'.
2892         tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
2893         tm_p_file=stormy16/stormy16-protos.h
2894         md_file=stormy16/stormy16.md
2895         out_file=stormy16/stormy16.c
2896         extra_options=stormy16/stormy16.opt
2897         tmake_file="stormy16/t-stormy16"
2898         ;;
2899 xtensa*-*-elf*)
2900         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
2901         extra_options="${extra_options} xtensa/elf.opt"
2902         ;;
2903 xtensa*-*-linux*)
2904         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
2905         tmake_file="${tmake_file} xtensa/t-xtensa"
2906         ;;
2907 am33_2.0-*-linux*)
2908         tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
2909         gas=yes gnu_ld=yes
2910         use_collect2=no
2911         ;;
2912 m32c-*-rtems*)
2913         tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
2914         c_target_objs="m32c-pragma.o"
2915         cxx_target_objs="m32c-pragma.o"
2916         ;;
2917 m32c-*-elf*)
2918         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2919         c_target_objs="m32c-pragma.o"
2920         cxx_target_objs="m32c-pragma.o"
2921         ;;
2922 *)
2923         echo "*** Configuration ${target} not supported" 1>&2
2924         exit 1
2925         ;;
2926 esac
2927
2928 case ${target} in
2929 i[34567]86-*-linux* | x86_64-*-linux*)
2930         tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
2931         ;;
2932 i[34567]86-*-* | x86_64-*-*)
2933         tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
2934         ;;
2935 powerpc*-*-* | rs6000-*-*)
2936         tm_file="${tm_file} rs6000/option-defaults.h"
2937 esac
2938
2939 if [ "$target_has_targetcm" = "no" ]; then
2940   c_target_objs="$c_target_objs default-c.o"
2941   cxx_target_objs="$cxx_target_objs default-c.o"
2942 fi
2943
2944 if [ "$common_out_file" = "" ]; then
2945   if [ "$target_has_targetm_common" = "yes" ]; then
2946     common_out_file="$cpu_type/$cpu_type-common.c"
2947   else
2948     common_out_file="default-common.c"
2949   fi
2950 fi
2951
2952 # Support for --with-cpu and related options (and a few unrelated options,
2953 # too).
2954 case ${with_cpu} in
2955   yes | no)
2956     echo "--with-cpu must be passed a value" 1>&2
2957     exit 1
2958     ;;
2959 esac
2960
2961 # Set arch and cpu from ${target} and ${target_noncanonical}.  Set cpu
2962 # to generic if there is no processor scheduler model for the target.
2963 arch=
2964 cpu=
2965 arch_without_sse2=no
2966 arch_without_64bit=no
2967 case ${target} in
2968   i386-*-freebsd*)
2969     if test $fbsd_major -ge 6; then
2970       arch=i486
2971     else
2972       arch=i386
2973     fi
2974     cpu=generic
2975     arch_without_sse2=yes
2976     arch_without_64bit=yes
2977     ;;
2978   i386-*-*)
2979     arch=i386
2980     cpu=i386
2981     arch_without_sse2=yes
2982     arch_without_64bit=yes
2983     ;;
2984   i486-*-*)
2985     arch=i486
2986     cpu=i486
2987     arch_without_sse2=yes
2988     arch_without_64bit=yes
2989     ;;
2990   i586-*-*)
2991     arch_without_sse2=yes
2992     arch_without_64bit=yes
2993     case ${target_noncanonical} in
2994       k6_2-*)
2995         arch=k6-2
2996         cpu=k6-2
2997         ;;
2998       k6_3-*)