Sync with upstream 4.9 branch
[official-gcc.git] / embedded-4_9-branch / gcc / config.gcc
blob1e1d67110627dcac71e5be88cac92f7e30c9ad56
1 # GCC target-specific configuration file.
2 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
4 #This file is part of GCC.
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.
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.
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/>.
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.
26 # When you change the cases in the OS or target switches, consider
27 # updating ../libgcc/config.host also.
29 # This file switches on the shell variable ${target}, and also uses the
30 # following shell variables:
32 #  with_*               Various variables as set by configure.
34 #  enable_threads       Either the name, yes or no depending on whether
35 #                       threads support was requested.
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.
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.
57 #  gas_flag             Either yes or no depending on whether GNU as was
58 #                       requested.
60 #  gnu_ld_flag          Either yes or no depending on whether GNU ld was
61 #                       requested.
63 # This file sets the following shell variables for use by the
64 # autoconf-generated configure script:
66 #  cpu_type             The name of the cpu, if different from the first
67 #                       chunk of the canonical target name.
69 #  tm_defines           List of target macros to define for all compilations.
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}.
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.
86 #  tm_p_file            Location of file with declarations for functions
87 #                       in $out_file.
89 #  out_file             The name of the machine description C support
90 #                       file, if different from "$cpu_type/$cpu_type.c".
92 #  common_out_file      The name of the source file for code shared between
93 #                       the compiler proper and the driver.
95 #  md_file              The name of the machine-description file, if
96 #                       different from "$cpu_type/$cpu_type.md".
98 #  tmake_file           A list of machine-description-specific
99 #                       makefile-fragments, if different from
100 #                       "$cpu_type/t-$cpu_type".
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".
106 #  extra_objs           List of extra objects that should be linked into
107 #                       the compiler proper (cc1, cc1obj, cc1plus)
108 #                       depending on target.
110 #  extra_gcc_objs       List of extra objects that should be linked into
111 #                       the compiler driver (gcc) depending on target.
113 #  extra_headers        List of used header files from the directory
114 #                       config/${cpu_type}.
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.
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.
131 #  extra_programs       List of extra executables compiled for this target
132 #                       machine, used when linking.
134 #  extra_options        List of target-dependent .opt files.
136 #  c_target_objs        List of extra target-dependent objects that be
137 #                       linked into the C compiler only.
139 #  cxx_target_objs      List of extra target-dependent objects that be
140 #                       linked into the C++ compiler only.
142 #  fortran_target_objs  List of extra target-dependent objects that be
143 #                       linked into the fortran compiler only.
145 #  target_gtfiles       List of extra source files with type information.
147 #  xm_defines           List of macros to define when compiling for the
148 #                       target machine.
150 #  xm_file              List of files to include when compiling for the
151 #                       target machine.
153 #  use_collect2         Set to yes or no, depending on whether collect2
154 #                       will be used.
156 #  target_cpu_default   Set to override the default target model.
158 #  gdb_needs_out_file_path
159 #                       Set to yes if gdb needs a dir command with
160 #                       `dirname $out_file`.
162 #  thread_file          Set to control which thread package to use.
164 #  gas                  Set to yes or no depending on whether the target
165 #                       system normally uses GNU as.
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
174 #  configure_default_options
175 #                       Set to an initializer for configure_default_options
176 #                       in configargs.h, based on --with-cpu et cetera.
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.
190 # The following variables are used in each case-construct to build up the
191 # outgoing variables:
193 #  gnu_ld               Set to yes or no depending on whether the target
194 #                       system normally uses GNU ld.
196 #  target_has_targetcm  Set to yes or no depending on whether the target
197 #                       has its own definition of targetcm.
199 #  target_has_targetm_common    Set to yes or no depending on whether the
200 #                       target has its own definition of targetm_common.
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='@'
241 # Don't carry these over build->host->target.  Please.
242 xm_file=
243 md_file=
245 # Obsolete configurations.
246 case ${target} in
247    picochip-*                           \
248  | score-*                              \
249  | *-*-solaris2.9*                      \
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
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*                        \
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*                           \
295         echo "*** Configuration ${target} not supported" 1>&2
296         exit 1
297         ;;
298 esac
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
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
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
513 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
514 then
515         extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
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
589 # On a.out targets, we need to use collect2.
590 case ${target} in
591 *-*-*aout*)
592         use_collect2=yes
593         ;;
594 esac
596 # Common C libraries.
597 tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
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"
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"
613 # Additional x86 processors supported by --with-cpu=.  Each processor
614 # MUST be separated by exactly one space.
615 x86_cpus="generic intel"
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
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
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 esac
883 case ${target} in
884 aarch64*-*-elf)
885         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
886         tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
887         tmake_file="${tmake_file} aarch64/t-aarch64"
888         use_gcc_stdint=wrap
889         case $target in
890         aarch64_be-*)
891                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
892                 ;;
893         esac
894         aarch64_multilibs="${with_multilib_list}"
895         if test "$aarch64_multilibs" = "default"; then
896                 aarch64_multilibs="lp64,ilp32"
897         fi
898         aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
899         for aarch64_multilib in ${aarch64_multilibs}; do
900                 case ${aarch64_multilib} in
901                 ilp32 | lp64 )
902                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
903                         ;;
904                 *)
905                         echo "--with-multilib-list=${aarch64_multilib} not supported."
906                         exit 1
907                 esac
908         done
909         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
910         ;;
911 aarch64*-*-linux*)
912         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
913         tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
914         tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
915         case $target in
916         aarch64_be-*)
917                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
918                 ;;
919         esac
920         aarch64_multilibs="${with_multilib_list}"
921         if test "$aarch64_multilibs" = "default"; then
922                 # TODO: turn on ILP32 multilib build after its support is mature.
923                 # aarch64_multilibs="lp64,ilp32"
924                 aarch64_multilibs="lp64"
925         fi
926         aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
927         for aarch64_multilib in ${aarch64_multilibs}; do
928                 case ${aarch64_multilib} in
929                 ilp32 | lp64 )
930                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
931                         ;;
932                 *)
933                         echo "--with-multilib-list=${aarch64_multilib} not supported."
934                         exit 1
935                 esac
936         done
937         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
938         ;;
939 alpha*-*-linux*)
940         tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
941         tmake_file="${tmake_file} alpha/t-linux"
942         extra_options="${extra_options} alpha/elf.opt"
943         ;;
944 alpha*-*-freebsd*)
945         tm_file="elfos.h ${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
946         extra_options="${extra_options} alpha/elf.opt"
947         ;;
948 alpha*-*-netbsd*)
949         tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
950         extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
951                        alpha/elf.opt"
952         ;;
953 alpha*-*-openbsd*)
954         tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
955         tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
956         extra_options="${extra_options} openbsd.opt alpha/elf.opt"
957         # default x-alpha is only appropriate for dec-osf.
958         ;;
959 alpha*-dec-*vms*)
960         tm_file="${tm_file} vms/vms.h alpha/vms.h"
961         tmake_file="${tmake_file} alpha/t-vms"
962         ;;
963 arc*-*-elf*)
964         extra_headers="arc-simd.h"
965         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
966         tmake_file="arc/t-arc-newlib arc/t-arc"
967         case x"${with_cpu}" in
968           xarc600|xarc601|xarc700)
969                 target_cpu_default="TARGET_CPU_$with_cpu"
970                 ;;
971         esac
972         if test x${with_endian} = x; then
973                 case ${target} in
974                 arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
975                 *)                              with_endian=little ;;
976                 esac
977         fi
978         case ${with_endian} in
979         big|little)             ;;
980         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
981         esac
982         case ${with_endian} in
983         big*)   tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\" ${tm_defines}"
984         esac
985         ;;
986 arc*-*-linux-uclibc*)
987         extra_headers="arc-simd.h"
988         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file}"
989         tmake_file="${tmake_file} arc/t-arc-uClibc arc/t-arc"
990         tm_defines="${tm_defines} TARGET_SDATA_DEFAULT=0"
991         tm_defines="${tm_defines} TARGET_MMEDIUM_CALLS_DEFAULT=1"
992         case x"${with_cpu}" in
993           xarc600|xarc601|xarc700)
994                 target_cpu_default="TARGET_CPU_$with_cpu"
995                 ;;
996         esac
997         if test x${with_endian} = x; then
998                 case ${target} in
999                 arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
1000                 *)                              with_endian=little ;;
1001                 esac
1002         fi
1003         case ${with_endian} in
1004         big|little)             ;;
1005         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
1006         esac
1007         case ${with_endian} in
1008         big*)   tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\" ${tm_defines}"
1009         esac
1010         ;;
1011 arm-wrs-vxworks)
1012         tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
1013         extra_options="${extra_options} arm/vxworks.opt"
1014         tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
1015         ;;
1016 arm*-*-netbsdelf*)
1017         tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h ${tm_file} arm/netbsd-elf.h"
1018         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1019         tmake_file="${tmake_file} arm/t-arm"
1020         ;;
1021 arm*-*-linux-*)                 # ARM GNU/Linux with ELF
1022         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"
1023         extra_options="${extra_options} linux-android.opt"
1024         case $target in
1025         arm*b-*-linux*)
1026             tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1027             ;;
1028         esac
1029         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
1030         tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
1031         # Define multilib configuration for arm-linux-androideabi.
1032         case ${target} in
1033         *-androideabi)
1034             tmake_file="$tmake_file arm/t-linux-androideabi"
1035             ;;
1036         esac
1037         # The EABI requires the use of __cxa_atexit.
1038         default_use_cxa_atexit=yes
1039         with_tls=${with_tls:-gnu}
1040         ;;
1041 arm*-*-uclinux*eabi*)           # ARM ucLinux
1042         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
1043         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
1044         tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
1045         # The EABI requires the use of __cxa_atexit.
1046         default_use_cxa_atexit=yes
1047         ;;
1048 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
1049         case ${target} in
1050         arm*eb-*-eabi*)
1051           tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1052         esac
1053         default_use_cxa_atexit=yes
1054         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1055         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
1056         case ${target} in
1057         arm*-*-eabi*)
1058           tm_file="$tm_file newlib-stdint.h"
1059           tmake_file="${tmake_file} arm/t-bpabi"
1060           use_gcc_stdint=wrap
1061           ;;
1062         arm*-*-rtems*)
1063           tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
1064           tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems-eabi"
1065           ;;
1066         arm*-*-symbianelf*)
1067           tm_file="${tm_file} arm/symbian.h"
1068           # We do not include t-bpabi for Symbian OS because the system
1069           # provides its own implementation of the BPABI functions.
1070           tmake_file="${tmake_file} arm/t-symbian"
1071           ;;
1072         esac
1073         tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h"
1074         ;;
1075 avr-*-rtems*)
1076         tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
1077         tmake_file="${tmake_file} avr/t-avr avr/t-multilib avr/t-rtems"
1078         extra_gcc_objs="driver-avr.o avr-devices.o"
1079         extra_objs="avr-devices.o avr-log.o"
1080         ;;
1081 avr-*-*)
1082         tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/avr-stdint.h"
1083         if test x${with_avrlibc} != xno; then
1084             tm_file="${tm_file} ${cpu_type}/avrlibc.h"
1085             tm_defines="${tm_defines} WITH_AVRLIBC"
1086         fi
1087         tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
1088         use_gcc_stdint=wrap
1089         extra_gcc_objs="driver-avr.o avr-devices.o"
1090         extra_objs="avr-devices.o avr-log.o"
1091         ;;
1092 bfin*-elf*)
1093         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1094         tmake_file=bfin/t-bfin-elf
1095         use_collect2=no
1096         ;;
1097 bfin*-uclinux*)
1098         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
1099         tmake_file=bfin/t-bfin-uclinux
1100         use_collect2=no
1101         ;;
1102 bfin*-linux-uclibc*)
1103         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"
1104         tmake_file="bfin/t-bfin-linux t-slibgcc t-linux"
1105         use_collect2=no
1106         ;;
1107 bfin*-rtems*)
1108         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
1109         tmake_file="${tmake_file} bfin/t-rtems"
1110         ;;
1111 bfin*-*)
1112         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1113         use_collect2=no
1114         use_gcc_stdint=wrap
1115         ;;
1116 cr16-*-elf)
1117         tm_file="elfos.h ${tm_file}"
1118         tmake_file="${tmake_file} cr16/t-cr16 "
1119         use_collect2=no
1120         ;;
1121 crisv32-*-elf | crisv32-*-none)
1122         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1123         tmake_file="cris/t-cris"
1124         target_cpu_default=32
1125         gas=yes
1126         extra_options="${extra_options} cris/elf.opt"
1127         use_gcc_stdint=wrap
1128         ;;
1129 cris-*-elf | cris-*-none)
1130         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1131         tmake_file="cris/t-cris cris/t-elfmulti"
1132         gas=yes
1133         extra_options="${extra_options} cris/elf.opt"
1134         use_gcc_stdint=wrap
1135         ;;
1136 crisv32-*-linux* | cris-*-linux*)
1137         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
1138         tmake_file="${tmake_file} cris/t-cris cris/t-linux"
1139         extra_options="${extra_options} cris/linux.opt"
1140         case $target in
1141           cris-*-*)
1142                 target_cpu_default=10
1143                 ;;
1144           crisv32-*-*)
1145                 target_cpu_default=32
1146                 ;;
1147         esac
1148         ;;
1149 epiphany-*-elf )
1150         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1151         tmake_file="epiphany/t-epiphany"
1152         extra_options="${extra_options} fused-madd.opt"
1153         extra_objs="$extra_objs mode-switch-use.o resolve-sw-modes.o"
1154         tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1155         extra_headers="epiphany_intrinsics.h"
1156         ;;
1157 fr30-*-elf)
1158         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1159         ;;
1160 frv-*-elf)
1161         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1162         tmake_file=frv/t-frv
1163         ;;
1164 frv-*-*linux*)
1165         tm_file="dbxelf.h elfos.h ${tm_file} \
1166                  gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1167         tmake_file="${tmake_file} frv/t-frv frv/t-linux"
1168         ;;
1169 moxie-*-elf)
1170         gas=yes
1171         gnu_ld=yes
1172         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1173         tmake_file="${tmake_file} moxie/t-moxie"
1174         ;;
1175 moxie-*-uclinux*)
1176         gas=yes
1177         gnu_ld=yes
1178         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
1179         tmake_file="${tmake_file} moxie/t-moxie"
1180         ;;
1181 moxie-*-rtems*)
1182         tmake_file="${tmake_file} moxie/t-moxie"
1183         tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1184         ;;
1185 h8300-*-rtems*)
1186         tmake_file="${tmake_file} h8300/t-h8300 h8300/t-rtems"
1187         tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
1188         ;;
1189 h8300-*-elf*)
1190         tmake_file="h8300/t-h8300"
1191         tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
1192         ;;
1193 hppa*64*-*-linux*)
1194         target_cpu_default="MASK_PA_11|MASK_PA_20"
1195         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
1196                  glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1197                  pa/pa64-linux.h"
1198         gas=yes gnu_ld=yes
1199         need_64bit_hwint=yes
1200         ;;
1201 hppa*-*-linux*)
1202         target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1203         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
1204                  pa/pa32-regs.h pa/pa32-linux.h"
1205         tmake_file="${tmake_file} pa/t-linux"
1206         ;;
1207 hppa*-*-openbsd*)
1208         target_cpu_default="MASK_PA_11"
1209         tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1210                  pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
1211         extra_options="${extra_options} openbsd.opt"
1212         gas=yes
1213         gnu_ld=yes
1214         ;;
1215 hppa[12]*-*-hpux10*)
1216         case ${target} in
1217         hppa1.1-*-* | hppa2*-*-*)
1218                 target_cpu_default="MASK_PA_11"
1219                 ;;
1220         esac
1221         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1222                  pa/pa-hpux.h pa/pa-hpux10.h"
1223         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
1224         case ${target} in
1225         *-*-hpux10.[1-9]*)
1226                 tm_file="${tm_file} pa/pa-hpux1010.h"
1227                 extra_options="${extra_options} pa/pa-hpux1010.opt"
1228                 ;;
1229         esac
1230         use_gcc_stdint=provide
1231         tm_file="${tm_file} hpux-stdint.h"
1232         tmake_file="t-slibgcc"
1233         case ${enable_threads} in
1234           "")
1235             if test x$have_pthread_h = xyes ; then
1236               tmake_file="${tmake_file} pa/t-dce-thr"
1237             fi
1238             ;;
1239           yes | dce)
1240             tmake_file="${tmake_file} pa/t-dce-thr"
1241             ;;
1242         esac
1243         use_collect2=yes
1244         gas=yes
1245         if test "x$with_dwarf2" != x; then
1246                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1247                 dwarf2=no
1248         fi
1249         ;;
1250 hppa*64*-*-hpux11*)
1251         target_cpu_default="MASK_PA_11|MASK_PA_20"
1252         if test x$gnu_ld = xyes
1253         then
1254                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1255         fi
1256         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1257                  pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1258                  pa/pa-hpux11.h"
1259         case ${target} in
1260         *-*-hpux11.[12]*)
1261                 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1262                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1263                 ;;
1264         *-*-hpux11.[3-9]*)
1265                 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1266                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1267                 ;;
1268         *)
1269                 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1270                 ;;
1271         esac
1272         extra_options="${extra_options} pa/pa-hpux.opt \
1273                        pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
1274         need_64bit_hwint=yes
1275         tmake_file="t-slibgcc"
1276         case x${enable_threads} in
1277         x | xyes | xposix )
1278                 thread_file=posix
1279                 ;;
1280         esac
1281         gas=yes
1282         case ${target} in
1283           *-*-hpux11.[01]*)
1284                 use_gcc_stdint=provide
1285                 tm_file="${tm_file} hpux-stdint.h"
1286                 ;;
1287           *-*-hpux11.[23]*)
1288                 use_gcc_stdint=wrap
1289                 tm_file="${tm_file} hpux-stdint.h"
1290                 ;;
1291         esac
1292         ;;
1293 hppa[12]*-*-hpux11*)
1294         case ${target} in
1295         hppa1.1-*-* | hppa2*-*-*)
1296                 target_cpu_default="MASK_PA_11"
1297                 ;;
1298         esac
1299         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1300                  pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1301         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1302                        hpux11.opt"
1303         case ${target} in
1304         *-*-hpux11.[12]*)
1305                 tm_file="${tm_file} pa/pa-hpux1111.h"
1306                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1307                 ;;
1308         *-*-hpux11.[3-9]*)
1309                 tm_file="${tm_file} pa/pa-hpux1131.h"
1310                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1311                 ;;
1312         esac
1313         tmake_file="t-slibgcc"
1314         case x${enable_threads} in
1315         x | xyes | xposix )
1316                 thread_file=posix
1317                 ;;
1318         esac
1319         use_collect2=yes
1320         gas=yes
1321         case ${target} in
1322           *-*-hpux11.[01]*)
1323                 use_gcc_stdint=provide
1324                 tm_file="${tm_file} hpux-stdint.h"
1325                 ;;
1326           *-*-hpux11.[23]*)
1327                 use_gcc_stdint=wrap
1328                 tm_file="${tm_file} hpux-stdint.h"
1329                 ;;
1330         esac
1331         if test "x$with_dwarf2" != x; then
1332                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1333                 dwarf2=no
1334         fi
1335         ;;
1336 i[34567]86-*-darwin*)
1337         need_64bit_isa=yes
1338         # Baseline choice for a machine that allows m64 support.
1339         with_cpu=${with_cpu:-core2}
1340         tmake_file="${tmake_file} t-slibgcc"
1341         ;;
1342 x86_64-*-darwin*)
1343         with_cpu=${with_cpu:-core2}
1344         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
1345         tm_file="${tm_file} ${cpu_type}/darwin64.h"
1346         ;;
1347 i[34567]86-*-elf*)
1348         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1349         ;;
1350 x86_64-*-elf*)
1351         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1352         ;;
1353 i[34567]86-*-rdos*)
1354     tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
1355     ;;
1356 x86_64-*-rdos*)
1357     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"
1358     tmake_file="i386/t-i386elf t-svr4"
1359     ;;
1360 i[34567]86-*-freebsd*)
1361         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1362         ;;
1363 x86_64-*-freebsd*)
1364         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"
1365         ;;
1366 i[34567]86-*-netbsdelf*)
1367         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
1368         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1369         ;;
1370 x86_64-*-netbsd*)
1371         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"
1372         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1373         ;;
1374 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
1375         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"
1376         extra_options="${extra_options} openbsd.opt"
1377         # needed to unconfuse gdb
1378         tmake_file="${tmake_file} t-openbsd i386/t-openbsd"
1379         # we need collect2 until our bug is fixed...
1380         use_collect2=yes
1381         ;;
1382 i[34567]86-*-openbsd*)
1383         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1384         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1385         extra_options="${extra_options} openbsd.opt"
1386         gas=yes
1387         gnu_ld=yes
1388         ;;
1389 x86_64-*-openbsd*)
1390         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1391         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1392         extra_options="${extra_options} openbsd.opt"
1393         gas=yes
1394         gnu_ld=yes
1395         ;;
1396 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1397                         # Intel 80386's running GNU/*
1398                         # with ELF format using glibc 2
1399         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
1400         case ${target} in
1401         i[34567]86-*-linux*)
1402                 tm_file="${tm_file} linux.h linux-android.h"
1403                 extra_options="${extra_options} linux-android.opt"
1404                 # Assume modern glibc
1405                 default_gnu_indirect_function=yes
1406                 if test x$enable_targets = xall; then
1407                         tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
1408                         tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1409                         tmake_file="${tmake_file} i386/t-linux64"
1410                         x86_multilibs="${with_multilib_list}"
1411                         if test "$x86_multilibs" = "default"; then
1412                                 x86_multilibs="m64,m32"
1413                         fi
1414                         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1415                         for x86_multilib in ${x86_multilibs}; do
1416                                 case ${x86_multilib} in
1417                                 m32 | m64 | mx32)
1418                                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1419                                         ;;
1420                                 *)
1421                                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1422                                         exit 1
1423                                 esac
1424                         done
1425                         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1426                         need_64bit_isa=yes
1427                         if test x$with_cpu = x; then
1428                                 if test x$with_cpu_64 = x; then
1429                                         with_cpu_64=generic
1430                                 fi
1431                         else
1432                                 case " $x86_cpus $x86_archs $x86_64_archs " in
1433                                 *" $with_cpu "*)
1434                                         ;;
1435                                 *)
1436                                         echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1437                                         echo "$x86_cpus $x86_archs $x86_64_archs " 1>&2
1438                                         exit 1
1439                                         ;;
1440                                 esac
1441                         fi
1442                 else
1443                         tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
1444                 fi
1445                 ;;
1446         i[34567]86-*-knetbsd*-gnu)
1447                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h knetbsd-gnu.h i386/knetbsd-gnu.h"
1448                 ;;
1449         i[34567]86-*-kfreebsd*-gnu)
1450                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
1451                 ;;
1452         i[34567]86-*-kopensolaris*-gnu)
1453                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
1454                 ;;
1455         i[34567]86-*-gnu*)
1456                 tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
1457                 ;;
1458         esac
1459         ;;
1460 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
1461         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
1462                  i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
1463         case ${target} in
1464         x86_64-*-linux*)
1465                 tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
1466                 extra_options="${extra_options} linux-android.opt"
1467                 # Assume modern glibc
1468                 default_gnu_indirect_function=yes
1469                 ;;
1470         x86_64-*-kfreebsd*-gnu)
1471                 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1472                 ;;
1473         x86_64-*-knetbsd*-gnu)
1474                 tm_file="${tm_file} knetbsd-gnu.h"
1475                 ;;
1476         esac
1477         tmake_file="${tmake_file} i386/t-linux64"
1478         x86_multilibs="${with_multilib_list}"
1479         if test "$x86_multilibs" = "default"; then
1480                 case ${with_abi} in
1481                 x32 | mx32)
1482                         x86_multilibs="mx32"
1483                         ;;
1484                 *)
1485                         x86_multilibs="m64,m32"
1486                         ;;
1487                 esac
1488         fi
1489         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1490         for x86_multilib in ${x86_multilibs}; do
1491                 case ${x86_multilib} in
1492                 m32 | m64 | mx32)
1493                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1494                         ;;
1495                 *)
1496                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1497                         exit 1
1498                 esac
1499         done
1500         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1501         ;;
1502 i[34567]86-pc-msdosdjgpp*)
1503         xm_file=i386/xm-djgpp.h
1504         tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
1505         native_system_header_dir=/dev/env/DJDIR/include
1506         extra_options="${extra_options} i386/djgpp.opt"
1507         gnu_ld=yes
1508         gas=yes
1509         use_gcc_stdint=wrap
1510         ;;
1511 i[34567]86-*-lynxos*)
1512         xm_defines=POSIX
1513         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1514         tmake_file="${tmake_file} t-lynx"
1515         extra_options="${extra_options} lynx.opt"
1516         thread_file=lynx
1517         gnu_ld=yes
1518         gas=yes
1519         ;;
1520 i[34567]86-*-nto-qnx*)
1521         tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
1522         extra_options="${extra_options} i386/nto.opt"
1523         gnu_ld=yes
1524         gas=yes
1525         ;;
1526 i[34567]86-*-rtems*)
1527         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"
1528         tmake_file="${tmake_file} i386/t-rtems"
1529         ;;
1530 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
1531         tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file}"
1532         # Set default arch_32 to pentium4, tune_32 to generic like the other
1533         # i386 targets, although config.guess defaults to i386-pc-solaris2*.
1534         case ${target} in
1535         *-*-solaris2.9*)
1536                 # Solaris 9/x86 cannot execute SSE/SSE2 instructions by default.
1537                 with_arch_32=${with_arch_32:-pentiumpro}
1538                 ;;
1539         *)
1540                 with_arch_32=${with_arch_32:-pentium4}
1541                 ;;
1542         esac
1543         with_tune_32=${with_tune_32:-generic}
1544         case ${target} in
1545         *-*-solaris2.9*)
1546                 tm_file="${tm_file} i386/sol2-9.h"
1547                 ;;
1548         *-*-solaris2.1[0-9]*)
1549                 tm_file="${tm_file} i386/x86-64.h i386/sol2-bi.h sol2-bi.h"
1550                 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1551                 tmake_file="$tmake_file i386/t-sol2-64"
1552                 need_64bit_isa=yes
1553                 if test x$with_cpu = x; then
1554                         if test x$with_cpu_64 = x; then
1555                                 with_cpu_64=generic
1556                         fi
1557                 else
1558                         case " $x86_cpus $x86_archs $x86_64_archs " in
1559                         *" $with_cpu "*)
1560                                 ;;
1561                         *)
1562                                 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1563                                 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1564                                 exit 1
1565                                 ;;
1566                         esac
1567                 fi
1568                 ;;
1569         esac
1570         ;;
1571 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
1572         tm_file="${tm_file} i386/unix.h i386/att.h elfos.h vx-common.h"
1573         case ${target} in
1574           *-vxworksae*)
1575             tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
1576             tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1577             ;;
1578           *)
1579             tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
1580             tmake_file="${tmake_file} i386/t-vxworks"
1581             ;;
1582         esac
1583         ;;
1584 i[34567]86-*-cygwin*)
1585         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"
1586         xm_file=i386/xm-cygwin.h
1587         tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
1588         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1589         extra_options="${extra_options} i386/cygming.opt"
1590         extra_objs="winnt.o winnt-stubs.o"
1591         c_target_objs="${c_target_objs} msformat-c.o"
1592         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1593         if test x$enable_threads = xyes; then
1594                 thread_file='posix'
1595         fi
1596         use_gcc_stdint=wrap
1597         ;;
1598 x86_64-*-cygwin*)
1599         need_64bit_isa=yes
1600         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"
1601         xm_file=i386/xm-cygwin.h
1602         tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
1603         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1604         extra_options="${extra_options} i386/cygming.opt"
1605         extra_objs="winnt.o winnt-stubs.o"
1606         c_target_objs="${c_target_objs} msformat-c.o"
1607         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1608         if test x$enable_threads = xyes; then
1609                 thread_file='posix'
1610         fi
1611         use_gcc_stdint=wrap
1612         tm_defines="${tm_defines} TARGET_CYGWIN64=1"
1613         ;;
1614 i[34567]86-*-mingw* | x86_64-*-mingw*)
1615         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
1616         xm_file=i386/xm-mingw32.h
1617         c_target_objs="${c_target_objs} winnt-c.o"
1618         cxx_target_objs="${cxx_target_objs} winnt-c.o"
1619         target_has_targetcm="yes"
1620         case ${target} in
1621                 x86_64-*-* | *-w64-*)
1622                         need_64bit_isa=yes
1623                         ;;
1624                 *)
1625                         ;;
1626         esac
1627         if test x$enable_threads = xposix ; then
1628                 tm_file="${tm_file} i386/mingw-pthread.h"
1629         fi
1630         tm_file="${tm_file} i386/mingw32.h"
1631         # This makes the logic if mingw's or the w64 feature set has to be used
1632         case ${target} in
1633                 *-w64-*)
1634                         user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1635                         user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
1636                         tm_file="${tm_file} i386/mingw-w64.h"
1637                         if test x$enable_targets = xall; then
1638                                 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1639                                 if test x$with_cpu = x; then
1640                                         if test x$with_cpu_64 = x; then
1641                                                 with_cpu_64=generic
1642                                         fi
1643                                 else
1644                                         case " $x86_cpus $x86_archs $x86_64_archs " in
1645                                         *" $with_cpu "*)
1646                                                 ;;
1647                                         *)
1648                                                 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1649                                                 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1650                                                 exit 1
1651                                                 ;;
1652                                         esac
1653                                 fi
1654                         fi
1655                         ;;
1656                 *)
1657                         ;;
1658         esac
1659         tm_file="${tm_file} i386/mingw-stdint.h"
1660         tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
1661         case ${target} in
1662                x86_64-w64-*)
1663                         tmake_file="${tmake_file} i386/t-mingw-w64"
1664                         ;;
1665                i[34567]86-w64-*)
1666                         tmake_file="${tmake_file} i386/t-mingw-w32"
1667                         ;;
1668         esac
1669         native_system_header_dir=/mingw/include
1670         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1671         extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
1672         case ${target} in
1673                 *-w64-*)
1674                         extra_options="${extra_options} i386/mingw-w64.opt"
1675                         ;;
1676                 *)
1677                         ;;
1678         esac
1679         extra_objs="winnt.o winnt-stubs.o"
1680         c_target_objs="${c_target_objs} msformat-c.o"
1681         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1682         gas=yes
1683         gnu_ld=yes
1684         default_use_cxa_atexit=yes
1685         use_gcc_stdint=wrap
1686         case ${enable_threads} in
1687           "" | yes | win32)
1688             thread_file='win32'
1689             ;;
1690           posix)
1691             thread_file='posix'
1692             ;;
1693         esac
1694         case ${target} in
1695                 *mingw32crt*)
1696                         tm_file="${tm_file} i386/crtdll.h"
1697                         ;;
1698                 *mingw32msv* | *mingw*)
1699                         ;;
1700         esac
1701         ;;
1702 i[34567]86-*-interix[3-9]*)
1703         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h"
1704         tmake_file="${tmake_file} i386/t-interix"
1705         extra_options="${extra_options} rpath.opt i386/interix.opt"
1706         extra_objs="winnt.o winnt-stubs.o"
1707         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1708         if test x$enable_threads = xyes ; then
1709                 thread_file='posix'
1710         fi
1711         if test x$stabs = xyes ; then
1712                 tm_file="${tm_file} dbxcoff.h"
1713         fi
1714         ;;
1715 ia64*-*-elf*)
1716         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
1717         tmake_file="ia64/t-ia64"
1718         target_cpu_default="0"
1719         if test x$gas = xyes
1720         then
1721                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1722         fi
1723         if test x$gnu_ld = xyes
1724         then
1725                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1726         fi
1727         ;;
1728 ia64*-*-freebsd*)
1729         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1730         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1731         tmake_file="${tmake_file} ia64/t-ia64"
1732         ;;
1733 ia64*-*-linux*)
1734         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
1735         tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
1736         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1737         ;;
1738 ia64*-*-hpux*)
1739         tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
1740         tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
1741         target_cpu_default="MASK_GNU_AS"
1742         case x$enable_threads in
1743         x | xyes | xposix )
1744                 thread_file=posix
1745                 ;;
1746         esac
1747         use_collect2=no
1748         c_target_objs="ia64-c.o"
1749         cxx_target_objs="ia64-c.o"
1750         extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
1751         use_gcc_stdint=wrap
1752         tm_file="${tm_file} hpux-stdint.h"
1753         case ${target} in
1754         *-*-hpux11.3*)
1755                 tm_file="${tm_file} ia64/hpux-unix2003.h"
1756                 ;;
1757         esac
1758         ;;
1759 ia64-hp-*vms*)
1760         tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
1761         tmake_file="${tmake_file} ia64/t-ia64"
1762         target_cpu_default="0"
1763         if test x$gas = xyes
1764         then
1765                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1766         fi
1767         extra_options="${extra_options} ia64/vms.opt"
1768         ;;
1769 iq2000*-*-elf*)
1770         tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
1771         out_file=iq2000/iq2000.c
1772         md_file=iq2000/iq2000.md
1773         ;;
1774 lm32-*-elf*)
1775         tm_file="dbxelf.h elfos.h ${tm_file}"
1776         tmake_file="${tmake_file} lm32/t-lm32"
1777         ;;
1778 lm32-*-rtems*)
1779         tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
1780         tmake_file="${tmake_file} lm32/t-lm32"
1781         tmake_file="${tmake_file} lm32/t-rtems"
1782          ;;
1783 lm32-*-uclinux*)
1784         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
1785         tmake_file="${tmake_file} lm32/t-lm32"
1786         ;;
1787 m32r-*-elf*)
1788         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1789         ;;
1790 m32rle-*-elf*)
1791         tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
1792         ;;
1793 m32r-*-rtems*)
1794         tm_file="dbxelf.h elfos.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
1795         tmake_file="${tmake_file} m32r/t-m32r"
1796         ;;
1797 m32r-*-linux*)
1798         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
1799         tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
1800         gnu_ld=yes
1801         if test x$enable_threads = xyes; then
1802                 thread_file='posix'
1803         fi
1804         ;;
1805 m32rle-*-linux*)
1806         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
1807         tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
1808         gnu_ld=yes
1809         if test x$enable_threads = xyes; then
1810                 thread_file='posix'
1811         fi
1812         ;;
1813 m68k-*-elf* | fido-*-elf*)
1814         case ${target} in
1815         fido-*-elf*)
1816                 # Check that $with_cpu makes sense.
1817                 case $with_cpu in
1818                 "" | "fidoa")
1819                         ;;
1820                 *)
1821                         echo "Cannot accept --with-cpu=$with_cpu"
1822                         exit 1
1823                         ;;
1824                 esac
1825                 with_cpu=fidoa
1826                 ;;
1827         *)
1828                 default_m68k_cpu=68020
1829                 default_cf_cpu=5206
1830                 ;;
1831         esac
1832         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"
1833         tm_defines="${tm_defines} MOTOROLA=1"
1834         tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1835         # Add multilibs for targets other than fido.
1836         case ${target} in
1837         fido-*-elf*)
1838                 ;;
1839         *)
1840                 tmake_file="$tmake_file m68k/t-mlibs"
1841                 ;;
1842         esac
1843         ;;
1844 m68k*-*-netbsdelf*)
1845         default_m68k_cpu=68020
1846         default_cf_cpu=5475
1847         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1848         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1849         tm_defines="${tm_defines} MOTOROLA=1"
1850         ;;
1851 m68k*-*-openbsd*)
1852         default_m68k_cpu=68020
1853         default_cf_cpu=5475
1854         # needed to unconfuse gdb
1855         tm_defines="${tm_defines} OBSD_OLD_GAS"
1856         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1857         extra_options="${extra_options} openbsd.opt"
1858         tmake_file="t-openbsd m68k/t-openbsd"
1859         # we need collect2 until our bug is fixed...
1860         use_collect2=yes
1861         ;;
1862 m68k-*-uclinux*)                # Motorola m68k/ColdFire running uClinux
1863                                 # with uClibc, using the new GNU/Linux-style
1864                                 # ABI.
1865         default_m68k_cpu=68020
1866         default_cf_cpu=5206
1867         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"
1868         extra_options="${extra_options} m68k/uclinux.opt"
1869         tm_defines="${tm_defines} MOTOROLA=1"
1870         tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
1871         ;;
1872 m68k-*-linux*)                  # Motorola m68k's running GNU/Linux
1873                                 # with ELF format using glibc 2
1874                                 # aka the GNU/Linux C library 6.
1875         default_m68k_cpu=68020
1876         default_cf_cpu=5475
1877         with_arch=${with_arch:-m68k}
1878         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
1879         extra_options="${extra_options} m68k/ieee.opt"
1880         tm_defines="${tm_defines} MOTOROLA=1"
1881         tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
1882         ;;
1883 m68k-*-rtems*)
1884         default_m68k_cpu=68020
1885         default_cf_cpu=5206
1886         tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
1887         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"
1888         tm_defines="${tm_defines} MOTOROLA=1"
1889         ;;
1890 mcore-*-elf)
1891         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
1892         tmake_file=mcore/t-mcore
1893         inhibit_libc=true
1894         ;;
1895 mep-*-*)
1896         tm_file="dbxelf.h elfos.h ${tm_file}"
1897         tmake_file=mep/t-mep
1898         c_target_objs="mep-pragma.o"
1899         cxx_target_objs="mep-pragma.o"
1900         if test -d "${srcdir}/../newlib/libc/include" &&
1901            test "x$with_headers" = x; then
1902                 with_headers=yes
1903         fi
1904         use_gcc_stdint=wrap
1905         ;;
1906 microblaze*-linux*)
1907         case $target in
1908                 microblazeel-*)
1909                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1910                         ;;
1911                 microblaze-*)
1912                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1913                         ;;
1914         esac
1915         tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
1916         tm_file="${tm_file} glibc-stdint.h"
1917         c_target_objs="${c_target_objs} microblaze-c.o"
1918         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1919         tmake_file="${tmake_file} microblaze/t-microblaze"
1920         tmake_file="${tmake_file} microblaze/t-microblaze-linux"
1921         ;;
1922 microblaze*-*-rtems*)
1923         case $target in
1924                 microblazeel-*)
1925                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1926                         ;;
1927                 microblaze-*)
1928                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1929                         ;;
1930         esac
1931         tm_file="${tm_file} dbxelf.h"
1932         tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
1933         c_target_objs="${c_target_objs} microblaze-c.o"
1934         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1935         tmake_file="${tmake_file} microblaze/t-microblaze"
1936         tmake_file="${tmake_file} microblaze/t-rtems"
1937         ;;
1938 microblaze*-*-elf)
1939         case $target in
1940                 microblazeel-*)
1941                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1942                         ;;
1943                 microblaze-*)
1944                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1945                         ;;
1946         esac
1947         tm_file="${tm_file} dbxelf.h newlib-stdint.h"
1948         c_target_objs="${c_target_objs} microblaze-c.o"
1949         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1950         tmake_file="${tmake_file} microblaze/t-microblaze"
1951         ;;
1952 mips*-*-netbsd*)                        # NetBSD/mips, either endian.
1953         target_cpu_default="MASK_ABICALLS"
1954         tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
1955         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1956         ;;
1957 mips*-mti-linux*)
1958         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"
1959         extra_options="${extra_options} linux-android.opt"
1960         tmake_file="${tmake_file} mips/t-mti-linux"
1961         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1962         gnu_ld=yes
1963         gas=yes
1964         ;;
1965 mips64*-*-linux* | mipsisa64*-*-linux*)
1966         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"
1967         extra_options="${extra_options} linux-android.opt"
1968         tmake_file="${tmake_file} mips/t-linux64"
1969         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
1970         case ${target} in
1971                 mips64el-st-linux-gnu)
1972                         tm_file="${tm_file} mips/st.h"
1973                         tmake_file="${tmake_file} mips/t-st"
1974                         ;;
1975                 mips64octeon*-*-linux*)
1976                         tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
1977                         target_cpu_default=MASK_SOFT_FLOAT_ABI
1978                         ;;
1979                 mipsisa64r2*-*-linux*)
1980                         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1981                         ;;
1982         esac
1983         gnu_ld=yes
1984         gas=yes
1985         ;;
1986 mips*-*-linux*)                         # Linux MIPS, either endian.
1987         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"
1988         extra_options="${extra_options} linux-android.opt"
1989         if test x$enable_targets = xall; then
1990                 tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
1991                 tmake_file="${tmake_file} mips/t-linux64"
1992         fi
1993         tm_file="${tm_file} mips/linux-common.h"
1994         case ${target} in
1995         mipsisa32r2*)
1996                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1997                 ;;
1998         mipsisa32*)
1999                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2000         esac
2001         ;;
2002 mips*-mti-elf*)
2003         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
2004         tmake_file="mips/t-mti-elf"
2005         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2006         ;;
2007 mips*-sde-elf*)
2008         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
2009         tmake_file="mips/t-sde"
2010         extra_options="${extra_options} mips/sde.opt"
2011         case "${with_newlib}" in
2012           yes)
2013             # newlib / libgloss.
2014             ;;
2015           *)
2016             # MIPS toolkit libraries.
2017             tm_file="$tm_file mips/sdemtk.h"
2018             tmake_file="$tmake_file mips/t-sdemtk"
2019             case ${enable_threads} in
2020               "" | yes | mipssde)
2021                 thread_file='mipssde'
2022                 ;;
2023             esac
2024             ;;
2025         esac
2026         case ${target} in
2027           mipsisa32r2*)
2028             tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2029             ;;
2030           mipsisa32*)
2031             tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
2032             ;;
2033           mipsisa64r2*)
2034             tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
2035             ;;
2036           mipsisa64*)
2037             tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
2038             ;;
2039         esac
2040         ;;
2041 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
2042 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
2043 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
2044 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
2045         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2046         tmake_file="mips/t-isa3264"
2047         case ${target} in
2048           mipsisa32r2*)
2049             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
2050             ;;
2051           mipsisa32*)
2052             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2053             ;;
2054           mipsisa64r2*)
2055             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
2056             ;;
2057           mipsisa64*)
2058             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
2059             ;;
2060         esac
2061         case ${target} in
2062           mipsisa32*-*-elfoabi*)
2063             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
2064             tm_file="${tm_file} mips/elfoabi.h"
2065             ;;
2066           mipsisa64*-*-elfoabi*)
2067             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
2068             tm_file="${tm_file} mips/elfoabi.h"
2069             ;;
2070           *-*-elf*)
2071             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2072             ;;
2073         esac
2074         ;;
2075 mipsisa64sr71k-*-elf*)
2076         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2077         tmake_file=mips/t-sr71k
2078         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2079         ;;
2080 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
2081         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2082         tmake_file="mips/t-elf mips/t-sb1"
2083         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
2084         ;;
2085 mips-*-elf* | mipsel-*-elf* | mipsr5900-*-elf* | mipsr5900el-*-elf*)
2086         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2087         tmake_file="mips/t-elf"
2088         ;;
2089 mips64r5900-*-elf* | mips64r5900el-*-elf*)
2090         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h"
2091         tmake_file="mips/t-elf"
2092         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
2093         ;;
2094 mips64-*-elf* | mips64el-*-elf*)
2095         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2096         tmake_file="mips/t-elf"
2097         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2098         ;;
2099 mips64vr-*-elf* | mips64vrel-*-elf*)
2100         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
2101         tmake_file=mips/t-vr
2102         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2103         ;;
2104 mips64orion-*-elf* | mips64orionel-*-elf*)
2105         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
2106         tmake_file="mips/t-elf"
2107         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2108         ;;
2109 mips*-*-rtems*)
2110         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
2111         tmake_file="${tmake_file} mips/t-elf mips/t-rtems"
2112         ;;
2113 mips-wrs-vxworks)
2114         tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
2115         tmake_file="${tmake_file} mips/t-vxworks"
2116         ;;
2117 mipstx39-*-elf* | mipstx39el-*-elf*)
2118         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
2119         tmake_file="mips/t-r3900"
2120         ;;
2121 mmix-knuth-mmixware)
2122         tm_file="${tm_file} newlib-stdint.h"
2123         need_64bit_hwint=yes
2124         use_gcc_stdint=wrap
2125         ;;
2126 mn10300-*-*)
2127         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2128         if test x$stabs = xyes
2129         then
2130                 tm_file="${tm_file} dbx.h"
2131         fi
2132         use_collect2=no
2133         use_gcc_stdint=wrap
2134         ;;
2135 msp430*-*-*)
2136         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2137         c_target_objs="msp430-c.o"
2138         cxx_target_objs="msp430-c.o"
2139         tmake_file="${tmake_file} msp430/t-msp430"
2140         ;;
2141 nds32le-*-*)
2142         target_cpu_default="0"
2143         tm_defines="${tm_defines}"
2144         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2145         tmake_file="nds32/t-mlibs"
2146         ;;
2147 nds32be-*-*)
2148         target_cpu_default="0|MASK_BIG_ENDIAN"
2149         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2150         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2151         tmake_file="nds32/t-mlibs"
2152         ;;
2153 nios2-*-*)
2154         tm_file="elfos.h ${tm_file}"
2155         tmake_file="${tmake_file} nios2/t-nios2"
2156         case ${target} in
2157         nios2-*-linux*)
2158                 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h nios2/linux.h "
2159                 ;;
2160         nios2-*-elf*)
2161                 tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
2162                 extra_options="${extra_options} nios2/elf.opt"
2163                 ;;
2164         nios2-*-rtems*)
2165                 tm_file="${tm_file} newlib-stdint.h nios2/rtems.h rtems.h"
2166                 tmake_file="${tmake_file} t-rtems nios2/t-rtems"
2167                 ;;
2168         esac
2169         ;;
2170 pdp11-*-*)
2171         tm_file="${tm_file} newlib-stdint.h"
2172         use_gcc_stdint=wrap
2173         ;;
2174 picochip-*)
2175         tm_file="${tm_file} newlib-stdint.h"
2176         use_gcc_stdint=wrap
2177         tmake_file="picochip/t-picochip t-pnt16-warn"
2178         ;;
2179 # port not yet contributed
2180 #powerpc-*-openbsd*)
2181 #       tmake_file="${tmake_file} rs6000/t-fprules"
2182 #       extra_headers=
2183 #       ;;
2184 powerpc-*-darwin*)
2185         extra_options="${extra_options} rs6000/darwin.opt"
2186         case ${target} in
2187           *-darwin1[0-9]* | *-darwin[8-9]*)
2188             tmake_file="${tmake_file} rs6000/t-darwin8"
2189             tm_file="${tm_file} rs6000/darwin8.h"
2190             ;;
2191           *-darwin7*)
2192             tm_file="${tm_file} rs6000/darwin7.h"
2193             ;;
2194           *-darwin[0-6]*)
2195             ;;
2196         esac
2197         tmake_file="${tmake_file} t-slibgcc"
2198         extra_headers=altivec.h
2199         ;;
2200 powerpc64-*-darwin*)
2201         extra_options="${extra_options} ${cpu_type}/darwin.opt"
2202         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
2203         tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
2204         extra_headers=altivec.h
2205         ;;
2206 powerpc*-*-freebsd*)
2207         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h"
2208         extra_options="${extra_options} rs6000/sysv4.opt"
2209         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2210         case ${target} in
2211              powerpc64*)
2212                 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2213                 tmake_file="${tmake_file} rs6000/t-freebsd64"
2214                 extra_options="${extra_options} rs6000/linux64.opt"
2215                 ;;
2216              *)
2217                 tm_file="${tm_file} rs6000/freebsd.h"
2218                 ;;
2219         esac
2220         ;;
2221 powerpc-*-netbsd*)
2222         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
2223         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2224         tmake_file="${tmake_file} rs6000/t-netbsd"
2225         extra_options="${extra_options} rs6000/sysv4.opt"
2226         ;;
2227 powerpc-*-eabispe*)
2228         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"
2229         extra_options="${extra_options} rs6000/sysv4.opt"
2230         tmake_file="rs6000/t-spe rs6000/t-ppccomm"
2231         use_gcc_stdint=wrap
2232         ;;
2233 powerpc-*-eabisimaltivec*)
2234         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"
2235         extra_options="${extra_options} rs6000/sysv4.opt"
2236         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2237         use_gcc_stdint=wrap
2238         ;;
2239 powerpc-*-eabisim*)
2240         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"
2241         extra_options="${extra_options} rs6000/sysv4.opt"
2242         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2243         use_gcc_stdint=wrap
2244         ;;
2245 powerpc-*-elf*)
2246         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
2247         extra_options="${extra_options} rs6000/sysv4.opt"
2248         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2249         ;;
2250 powerpc-*-eabialtivec*)
2251         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"
2252         extra_options="${extra_options} rs6000/sysv4.opt"
2253         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2254         use_gcc_stdint=wrap
2255         ;;
2256 powerpc-xilinx-eabi*)
2257         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"
2258         extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
2259         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
2260         use_gcc_stdint=wrap
2261         ;;
2262 powerpc-*-eabi*)
2263         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"
2264         extra_options="${extra_options} rs6000/sysv4.opt"
2265         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2266         use_gcc_stdint=wrap
2267         ;;
2268 powerpc-*-rtems*)
2269         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"
2270         extra_options="${extra_options} rs6000/sysv4.opt"
2271         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
2272         ;;
2273 powerpc*-*-linux*)
2274         tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
2275         extra_options="${extra_options} rs6000/sysv4.opt"
2276         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2277         extra_objs="$extra_objs rs6000-linux.o"
2278         case ${target} in
2279             powerpc*le-*-*)
2280                 tm_file="${tm_file} rs6000/sysv4le.h" ;;
2281         esac
2282         maybe_biarch=yes
2283         case ${target} in
2284             powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
2285                 echo "*** Configuration ${target} not supported" 1>&2
2286                 exit 1
2287                 ;;
2288             powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
2289                 maybe_biarch=
2290                 ;;
2291             powerpc64*-*-linux*)
2292                 test x$with_cpu != x || cpu_is_64bit=yes
2293                 maybe_biarch=always
2294                 ;;
2295         esac
2296         case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
2297             always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
2298                 if test x$cpu_is_64bit = xyes; then
2299                     tm_file="${tm_file} rs6000/default64.h"
2300                 fi
2301                 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2302                 tmake_file="$tmake_file rs6000/t-linux64"
2303                 case ${target} in
2304                     powerpc*le-*-*)
2305                         tmake_file="$tmake_file rs6000/t-linux64le"
2306                         case ${enable_targets} in
2307                             all | *powerpc64-* | *powerpc-*)
2308                                 tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
2309                         esac ;;
2310                     *)
2311                         case ${enable_targets} in
2312                             all | *powerpc64le-* | *powerpcle-*)
2313                                 tmake_file="$tmake_file rs6000/t-linux64bele" ;;
2314                         esac ;;
2315                 esac
2316                 extra_options="${extra_options} rs6000/linux64.opt"
2317                 ;;
2318             *)
2319                 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2320                 tmake_file="$tmake_file rs6000/t-linux"
2321                 ;;
2322         esac
2323         case ${target} in
2324             powerpc*-*-linux*ppc476*)
2325                 tm_file="${tm_file} rs6000/476.h"
2326                 extra_options="${extra_options} rs6000/476.opt" ;;
2327             powerpc*-*-linux*altivec*)
2328                 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2329             powerpc*-*-linux*spe*)
2330                 tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2331             powerpc*-*-linux*paired*)
2332                 tm_file="${tm_file} rs6000/750cl.h" ;;
2333         esac
2334         if test x${enable_secureplt} = xyes; then
2335                 tm_file="rs6000/secureplt.h ${tm_file}"
2336         fi
2337         ;;
2338 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
2339         tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
2340         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
2341         extra_options="${extra_options} rs6000/sysv4.opt"
2342         extra_headers=ppc-asm.h
2343         case ${target} in
2344           *-vxworksae*)
2345             tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h"
2346             tmake_file="${tmake_file} rs6000/t-vxworksae"
2347             ;;
2348           *-vxworks*)
2349             tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2350             ;;
2351         esac
2352         ;;
2353 powerpc-*-lynxos*)
2354         xm_defines=POSIX
2355         tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2356         tmake_file="t-lynx rs6000/t-lynx"
2357         extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2358         thread_file=lynx
2359         gnu_ld=yes
2360         gas=yes
2361         ;;
2362 powerpcle-*-elf*)
2363         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2364         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2365         extra_options="${extra_options} rs6000/sysv4.opt"
2366         ;;
2367 powerpcle-*-eabisim*)
2368         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"
2369         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2370         extra_options="${extra_options} rs6000/sysv4.opt"
2371         use_gcc_stdint=wrap
2372         ;;
2373 powerpcle-*-eabi*)
2374         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"
2375         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2376         extra_options="${extra_options} rs6000/sysv4.opt"
2377         use_gcc_stdint=wrap
2378         ;;
2379 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2380         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2381         tmake_file="rs6000/t-aix43 t-slibgcc"
2382         extra_options="${extra_options} rs6000/aix64.opt"
2383         use_collect2=yes
2384         thread_file='aix'
2385         use_gcc_stdint=provide
2386         extra_headers=
2387         ;;
2388 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2389         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2390         extra_options="${extra_options} rs6000/aix64.opt"
2391         tmake_file="rs6000/t-aix43 t-slibgcc"
2392         use_collect2=yes
2393         thread_file='aix'
2394         use_gcc_stdint=wrap
2395         extra_headers=
2396         ;;
2397 rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2398         tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
2399         tmake_file="rs6000/t-aix52 t-slibgcc"
2400         extra_options="${extra_options} rs6000/aix64.opt"
2401         use_collect2=yes
2402         thread_file='aix'
2403         use_gcc_stdint=wrap
2404         extra_headers=
2405         ;;
2406 rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2407         tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2408         tmake_file="rs6000/t-aix52 t-slibgcc"
2409         extra_options="${extra_options} rs6000/aix64.opt"
2410         use_collect2=yes
2411         thread_file='aix'
2412         use_gcc_stdint=wrap
2413         extra_headers=altivec.h
2414         ;;
2415 rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2416         tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2417         tmake_file="rs6000/t-aix52 t-slibgcc"
2418         extra_options="${extra_options} rs6000/aix64.opt"
2419         use_collect2=yes
2420         thread_file='aix'
2421         use_gcc_stdint=wrap
2422         extra_headers=altivec.h
2423         ;;
2424 rl78-*-elf*)
2425         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2426         target_has_targetm_common=no
2427         c_target_objs="rl78-c.o"
2428         cxx_target_objs="rl78-c.o"
2429         tmake_file="${tmake_file} rl78/t-rl78"
2430         ;;
2431 rx-*-elf*)
2432         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2433         tmake_file="${tmake_file} rx/t-rx"
2434         ;;
2435 s390-*-linux*)
2436         default_gnu_indirect_function=yes
2437         tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2438         if test x$enable_targets = xall; then
2439                 tmake_file="${tmake_file} s390/t-linux64"
2440         fi
2441         ;;
2442 s390x-*-linux*)
2443         default_gnu_indirect_function=yes
2444         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2445         tm_p_file="linux-protos.h s390/s390-protos.h"
2446         md_file=s390/s390.md
2447         extra_modes=s390/s390-modes.def
2448         out_file=s390/s390.c
2449         tmake_file="${tmake_file} s390/t-linux64"
2450         ;;
2451 s390x-ibm-tpf*)
2452         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
2453         tm_p_file=s390/s390-protos.h
2454         md_file=s390/s390.md
2455         extra_modes=s390/s390-modes.def
2456         out_file=s390/s390.c
2457         thread_file='tpf'
2458         extra_options="${extra_options} s390/tpf.opt"
2459         ;;
2460 score-*-elf)
2461         gas=yes
2462         gnu_ld=yes
2463         tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
2464         ;;
2465 sh-*-elf* | sh[12346l]*-*-elf* | \
2466   sh-*-linux* | sh[2346lbe]*-*-linux* | \
2467   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2468   sh64-*-netbsd* | sh64l*-*-netbsd*)
2469         tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2470         if test x${with_endian} = x; then
2471                 case ${target} in
2472                 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2473                 shbe-*-* | sheb-*-*)               with_endian=big,little ;;
2474                 sh[1234]l* | sh[34]*-*-linux*)     with_endian=little ;;
2475                 shl* | sh64l* | sh*-*-linux* | \
2476                   sh5l* | sh-superh-elf)           with_endian=little,big ;;
2477                 sh[1234]*-*-*)                     with_endian=big ;;
2478                 *)                                 with_endian=big,little ;;
2479                 esac
2480         fi
2481         # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2482         #  First word : the default endian.
2483         #  Second word: the secondary endian (optional).
2484         case ${with_endian} in
2485         big)            TM_ENDIAN_CONFIG=mb ;;
2486         little)         TM_ENDIAN_CONFIG=ml ;;
2487         big,little)     TM_ENDIAN_CONFIG="mb ml" ;;
2488         little,big)     TM_ENDIAN_CONFIG="ml mb" ;;
2489         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
2490         esac
2491         case ${with_endian} in
2492         little*)        tm_file="sh/little.h ${tm_file}" ;;
2493         esac
2494         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
2495         case ${target} in
2496         sh*-*-linux*)   tmake_file="${tmake_file} sh/t-linux"
2497                         tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
2498         sh*-*-netbsd*)
2499                         tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h"
2500                         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2502                         ;;
2503         sh*-superh-elf) if test x$with_libgloss != xno; then
2504                                 with_libgloss=yes
2505                                 tm_file="${tm_file} sh/newlib.h"
2506                         fi
2507                         tm_file="${tm_file} sh/embed-elf.h"
2508                         tm_file="${tm_file} sh/superh.h"
2509                         extra_options="${extra_options} sh/superh.opt" ;;
2510         *)              if test x$with_newlib = xyes \
2511                            && test x$with_libgloss = xyes; then
2512                                 tm_file="${tm_file} sh/newlib.h"
2513                         fi
2514                         tm_file="${tm_file} sh/embed-elf.h" ;;
2515         esac
2516         case ${target} in
2517         sh5*-*-netbsd*)
2518                 # SHmedia, 32-bit ABI
2519                 tmake_file="${tmake_file} sh/t-sh64"
2520                 ;;
2521         sh64*-netbsd*)
2522                 # SHmedia, 64-bit ABI
2523                 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5-64"
2524                 ;;
2525         *-*-netbsd)
2526                 ;;
2527         sh64*-*-linux*)
2528                 tmake_file="${tmake_file} sh/t-sh64"
2529                 tm_file="${tm_file} sh/sh64.h"
2530                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2531                 ;;
2532         sh64*)
2533                 tmake_file="${tmake_file} sh/t-sh64"
2534                 tm_file="${tm_file} sh/sh64.h"
2535                 if test x$with_newlib = xyes; then
2536                         tm_file="${tm_file} newlib-stdint.h"
2537                 fi
2538                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2539                 ;;
2540         *-*-elf*)
2541                 tm_file="${tm_file} newlib-stdint.h"
2542                 ;;
2543         esac
2544         # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2545         case `echo ${target} | sed 's/e[lb]-/-/'` in
2546         sh64*-*-netbsd*)        sh_cpu_target=sh5-64media ;;
2547         sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
2548         sh4a_single_only*)      sh_cpu_target=sh4a-single-only ;;
2549         sh4a_single*)           sh_cpu_target=sh4a-single ;;
2550         sh4a_nofpu*)            sh_cpu_target=sh4a-nofpu ;;
2551         sh4al)                  sh_cpu_target=sh4al ;;
2552         sh4a*)                  sh_cpu_target=sh4a ;;
2553         sh4_single_only*)       sh_cpu_target=sh4-single-only ;;
2554         sh4_single*)            sh_cpu_target=sh4-single ;;
2555         sh4_nofpu*)             sh_cpu_target=sh4-nofpu ;;
2556         sh4* | sh-superh-*)     sh_cpu_target=sh4 ;;
2557         sh3e*)                  sh_cpu_target=sh3e ;;
2558         sh*-*-netbsd* | sh3*)   sh_cpu_target=sh3 ;;
2559         sh2a_single_only*)      sh_cpu_target=sh2a-single-only ;;
2560         sh2a_single*)           sh_cpu_target=sh2a-single ;;
2561         sh2a_nofpu*)            sh_cpu_target=sh2a-nofpu ;;
2562         sh2a*)                  sh_cpu_target=sh2a ;;
2563         sh2e*)                  sh_cpu_target=sh2e ;;
2564         sh2*)                   sh_cpu_target=sh2 ;;
2565         *)                      sh_cpu_target=sh1 ;;
2566         esac
2567         # did the user say --without-fp ?
2568         if test x$with_fp = xno; then
2569                 case ${sh_cpu_target} in
2570                 sh5-*media)     sh_cpu_target=${sh_cpu_target}-nofpu ;;
2571                 sh4al | sh1)    ;;
2572                 sh4a* )         sh_cpu_target=sh4a-nofpu ;;
2573                 sh4*)           sh_cpu_target=sh4-nofpu ;;
2574                 sh3*)           sh_cpu_target=sh3 ;;
2575                 sh2a*)          sh_cpu_target=sh2a-nofpu ;;
2576                 sh2*)           sh_cpu_target=sh2 ;;
2577                 *)      echo --without-fp not available for $target: ignored
2578                 esac
2579                 tm_defines="$tm_defines STRICT_NOFPU=1"
2580         fi
2581         sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2582         case $sh_cpu_default in
2583         sh5-64media-nofpu | sh5-64media | \
2584           sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2585           sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2586           sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2587           sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2588           sh3e | sh3 | sh2e | sh2 | sh1) ;;
2589         "")     sh_cpu_default=${sh_cpu_target} ;;
2590         *)      echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2591         esac
2592         sh_multilibs=${with_multilib_list}
2593         if test "$sh_multilibs" = "default" ; then
2594                 case ${target} in
2595                 sh64-superh-linux* | \
2596                 sh[1234]*)      sh_multilibs=${sh_cpu_target} ;;
2597                 sh64* | sh5*)   sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2598                 sh-superh-*)    sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2599                 sh*-*-linux*)   sh_multilibs=m1,m2,m2a,m3e,m4 ;;
2600                 sh*-*-netbsd*)  sh_multilibs=m3,m3e,m4 ;;
2601                 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2602                 esac
2603                 if test x$with_fp = xno; then
2604                         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`"
2605                 fi
2606         fi
2607         target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2608         tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2609         tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2610         sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2611         for sh_multilib in ${sh_multilibs}; do
2612                 case ${sh_multilib} in
2613                 m1 | m2 | m2e | m3 | m3e | \
2614                 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2615                 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2616                 m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2617                 m5-64media | m5-64media-nofpu | \
2618                 m5-32media | m5-32media-nofpu | \
2619                 m5-compact | m5-compact-nofpu)
2620                         # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2621                         # It is passed to MULTIILIB_OPTIONS verbatim.
2622                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2623                         tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2624                         ;;
2625                 \!*)    # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2626                         # It is passed the MULTILIB_EXCEPTIONS verbatim.
2627                         TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
2628                 *)
2629                         echo "with_multilib_list=${sh_multilib} not supported."
2630                         exit 1
2631                         ;;
2632                 esac
2633         done
2634         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
2635         if test x${enable_incomplete_targets} = xyes ; then
2636                 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"
2637         fi
2638         tm_file="$tm_file ./sysroot-suffix.h"
2639         tmake_file="$tmake_file t-sysroot-suffix"
2640         ;;
2641 sh-*-rtems*)
2642         tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
2643         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
2644         ;;
2645 sh-wrs-vxworks)
2646         tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
2647         tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
2648         ;;
2649 sparc-*-elf*)
2650         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
2651         case ${target} in
2652             *-leon-*)
2653                 tmake_file="sparc/t-sparc sparc/t-leon"
2654                 ;;
2655             *-leon[3-9]*)
2656                 tmake_file="sparc/t-sparc sparc/t-leon3"
2657                 ;;
2658             *)
2659                 tmake_file="sparc/t-sparc sparc/t-elf"
2660                 ;;
2661         esac
2662         ;;
2663 sparc-*-rtems*)
2664         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
2665         tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
2666         ;;
2667 sparc-*-linux*)
2668         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
2669         extra_options="${extra_options} sparc/long-double-switch.opt"
2670         case ${target} in
2671             *-leon-*)
2672                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
2673                 ;;
2674             *-leon[3-9]*)
2675                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
2676                 ;;
2677             *)
2678                 tmake_file="${tmake_file} sparc/t-sparc"
2679                 ;;
2680         esac
2681         if test x$enable_targets = xall; then
2682                 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
2683                 tmake_file="${tmake_file} sparc/t-linux64"
2684         else
2685                 tm_file="${tm_file} sparc/linux.h"
2686                 tmake_file="${tmake_file} sparc/t-linux"
2687         fi
2688         ;;
2689 sparc-*-netbsdelf*)
2690         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2691         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2692         extra_options="${extra_options} sparc/long-double-switch.opt"
2693         tmake_file="${tmake_file} sparc/t-sparc"
2694         ;;
2695 sparc*-*-solaris2*)
2696         tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sol2-bi.h sparc/tso.h"
2697         case ${target} in
2698             sparc64-*-* | sparcv9-*-*)
2699                 tm_file="sparc/default-64.h ${tm_file}"
2700                 ;;
2701             *)
2702                 test x$with_cpu != x || with_cpu=v9
2703                 ;;
2704         esac
2705         tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2-64"
2706         ;;
2707 sparc-wrs-vxworks)
2708         tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2709         tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
2710         ;;
2711 sparc64-*-elf*)
2712         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
2713         extra_options="${extra_options}"
2714         tmake_file="${tmake_file} sparc/t-sparc"
2715         ;;
2716 sparc64-*-rtems*)
2717         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
2718         extra_options="${extra_options}"
2719         tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
2720         ;;
2721 sparc64-*-linux*)
2722         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"
2723         extra_options="${extra_options} sparc/long-double-switch.opt"
2724         tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
2725         ;;
2726 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2727         tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2728         extra_options="${extra_options} sparc/long-double-switch.opt"
2729         case "x$with_cpu" in
2730                 xultrasparc) ;;
2731                 x) with_cpu=ultrasparc ;;
2732                 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2733         esac
2734         tmake_file="${tmake_file} sparc/t-sparc"
2735         ;;
2736 sparc64-*-netbsd*)
2737         tm_file="sparc/biarch64.h ${tm_file}"
2738         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2739         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2740         extra_options="${extra_options} sparc/long-double-switch.opt"
2741         tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
2742         ;;
2743 sparc64-*-openbsd*)
2744         tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
2745         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
2746         extra_options="${extra_options} openbsd.opt"
2747         extra_options="${extra_options}"
2748         gas=yes gnu_ld=yes
2749         with_cpu=ultrasparc
2750         tmake_file="${tmake_file} sparc/t-sparc"
2751         ;;
2752 spu-*-elf*)
2753         tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
2754         tmake_file="spu/t-spu-elf"
2755         native_system_header_dir=/include
2756         extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
2757         extra_modes=spu/spu-modes.def
2758         c_target_objs="${c_target_objs} spu-c.o"
2759         cxx_target_objs="${cxx_target_objs} spu-c.o"
2760         ;;
2761 tic6x-*-elf)
2762         tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
2763         tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
2764         tmake_file="c6x/t-c6x c6x/t-c6x-elf"
2765         use_collect2=no
2766         ;;
2767 tic6x-*-uclinux)
2768         tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
2769         tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
2770         tm_file="${tm_file} ./sysroot-suffix.h"
2771         tmake_file="t-sysroot-suffix t-slibgcc"
2772         tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
2773         use_collect2=no
2774         ;;
2775 tilegx*-*-linux*)
2776         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
2777         tmake_file="${tmake_file} tilegx/t-tilegx"
2778         extra_objs="${extra_objs} mul-tables.o"
2779         c_target_objs="${c_target_objs} tilegx-c.o"
2780         cxx_target_objs="${cxx_target_objs} tilegx-c.o"
2781         extra_headers="feedback.h"
2782         case $target in
2783         tilegxbe-*)
2784                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2785                 ;;
2786         esac
2787         ;;
2788 tilepro*-*-linux*)
2789         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
2790         tmake_file="${tmake_file} tilepro/t-tilepro"
2791         extra_objs="${extra_objs} mul-tables.o"
2792         c_target_objs="${c_target_objs} tilepro-c.o"
2793         cxx_target_objs="${cxx_target_objs} tilepro-c.o"
2794         extra_headers="feedback.h"
2795         ;;
2796 v850-*-rtems*)
2797         target_cpu_default="TARGET_CPU_generic"
2798         tm_file="dbxelf.h elfos.h v850/v850.h"
2799         tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
2800         tmake_file="${tmake_file} v850/t-v850"
2801         tmake_file="${tmake_file} v850/t-rtems"
2802         use_collect2=no
2803         c_target_objs="v850-c.o"
2804         cxx_target_objs="v850-c.o"
2805         ;;
2806 v850*-*-*)
2807         case ${target} in
2808         v850e3v5-*-*)
2809                 target_cpu_default="TARGET_CPU_v850e3v5"
2810                 ;;
2811         v850e2v3-*-*)
2812                 target_cpu_default="TARGET_CPU_v850e2v3"
2813                 ;;
2814         v850e2-*-*)
2815                 target_cpu_default="TARGET_CPU_v850e2"
2816                 ;;
2817         v850e1-*-* | v850es-*-*)
2818                 target_cpu_default="TARGET_CPU_v850e1"
2819                 ;;
2820         v850e-*-*)
2821                 target_cpu_default="TARGET_CPU_v850e"
2822                 ;;
2823         v850-*-*)
2824                 target_cpu_default="TARGET_CPU_generic"
2825                 ;;
2826         esac
2827         tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
2828         if test x$stabs = xyes
2829         then
2830                 tm_file="${tm_file} dbx.h"
2831         fi
2832         use_collect2=no
2833         c_target_objs="v850-c.o"
2834         cxx_target_objs="v850-c.o"
2835         use_gcc_stdint=wrap
2836         ;;
2837 vax-*-linux*)
2838         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
2839         extra_options="${extra_options} vax/elf.opt"
2840         ;;
2841 vax-*-netbsdelf*)
2842         tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2843         extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
2844         ;;
2845 vax-*-openbsd*)
2846         tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
2847         extra_options="${extra_options} openbsd.opt"
2848         use_collect2=yes
2849         ;;
2850 xstormy16-*-elf)
2851         # For historical reasons, the target files omit the 'x'.
2852         tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
2853         tm_p_file=stormy16/stormy16-protos.h
2854         md_file=stormy16/stormy16.md
2855         out_file=stormy16/stormy16.c
2856         extra_options=stormy16/stormy16.opt
2857         tmake_file="stormy16/t-stormy16"
2858         ;;
2859 xtensa*-*-elf*)
2860         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
2861         extra_options="${extra_options} xtensa/elf.opt"
2862         ;;
2863 xtensa*-*-linux*)
2864         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
2865         tmake_file="${tmake_file} xtensa/t-xtensa"
2866         ;;
2867 am33_2.0-*-linux*)
2868         tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
2869         gas=yes gnu_ld=yes
2870         use_collect2=no
2871         ;;
2872 m32c-*-rtems*)
2873         tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
2874         c_target_objs="m32c-pragma.o"
2875         cxx_target_objs="m32c-pragma.o"
2876         ;;
2877 m32c-*-elf*)
2878         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2879         c_target_objs="m32c-pragma.o"
2880         cxx_target_objs="m32c-pragma.o"
2881         ;;
2883         echo "*** Configuration ${target} not supported" 1>&2
2884         exit 1
2885         ;;
2886 esac
2888 case ${target} in
2889 i[34567]86-*-linux* | x86_64-*-linux*)
2890         tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
2891         ;;
2892 i[34567]86-*-* | x86_64-*-*)
2893         tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
2894         ;;
2895 powerpc*-*-* | rs6000-*-*)
2896         tm_file="${tm_file} rs6000/option-defaults.h"
2897 esac
2899 if [ "$target_has_targetcm" = "no" ]; then
2900   c_target_objs="$c_target_objs default-c.o"
2901   cxx_target_objs="$cxx_target_objs default-c.o"
2904 if [ "$common_out_file" = "" ]; then
2905   if [ "$target_has_targetm_common" = "yes" ]; then
2906     common_out_file="$cpu_type/$cpu_type-common.c"
2907   else
2908     common_out_file="default-common.c"
2909   fi
2912 # Support for --with-cpu and related options (and a few unrelated options,
2913 # too).
2914 case ${with_cpu} in
2915   yes | no)
2916     echo "--with-cpu must be passed a value" 1>&2
2917     exit 1
2918     ;;
2919 esac
2921 # Set arch and cpu from ${target} and ${target_noncanonical}.  Set cpu
2922 # to generic if there is no processor scheduler model for the target.
2923 arch=
2924 cpu=
2925 arch_without_sse2=no
2926 arch_without_64bit=no
2927 case ${target} in
2928   i386-*-freebsd*)
2929     if test $fbsd_major -ge 6; then
2930       arch=i486
2931     else
2932       arch=i386
2933     fi
2934     cpu=generic
2935     arch_without_sse2=yes
2936     arch_without_64bit=yes
2937     ;;
2938   i386-*-*)
2939     arch=i386
2940     cpu=i386
2941     arch_without_sse2=yes
2942     arch_without_64bit=yes
2943     ;;
2944   i486-*-*)
2945     arch=i486
2946     cpu=i486
2947     arch_without_sse2=yes
2948     arch_without_64bit=yes
2949     ;;
2950   i586-*-*)
2951     arch_without_sse2=yes
2952     arch_without_64bit=yes
2953     case ${target_noncanonical} in
2954       k6_2-*)
2955         arch=k6-2
2956         cpu=k6-2
2957         ;;
2958       k6_3-*)
2959         arch=k6-3
2960         cpu=k6-3
2961         ;;
2962       k6-*)
2963         arch=k6
2964         cpu=k6
2965         ;;
2966       pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2967         arch=pentium-mmx
2968         cpu=pentium-mmx
2969         ;;
2970       *)
2971         arch=pentium
2972         cpu=pentium
2973         ;;
2974     esac
2975     ;;
2976   i686-*-* | i786-*-*)
2977     case ${target_noncanonical} in
2978       bdver4-*)
2979         arch=bdver4
2980         cpu=bdver4
2981         ;;
2982       bdver3-*)
2983         arch=bdver3
2984         cpu=bdver3
2985         ;;
2986       bdver2-*)
2987         arch=bdver2
2988         cpu=bdver2
2989         ;;
2990       bdver1-*)
2991         arch=bdver1
2992         cpu=bdver1
2993         ;;
2994       btver1-*)
2995         arch=btver1
2996         cpu=btver1
2997         ;;
2998       btver2-*)
2999         arch=btver2
3000         cpu=btver2
3001         ;;
3002       amdfam10-*|barcelona-*)
3003         arch=amdfam10
3004         cpu=amdfam10
3005         ;;
3006       k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3007         arch=k8-sse3
3008         cpu=k8-sse3
3009         ;;
3010       k8-*|opteron-*|athlon64-*|athlon_fx-*)
3011         arch=k8
3012         cpu=k8
3013         ;;
3014       athlon_xp-*|athlon_mp-*|athlon_4-*)
3015         arch=athlon-4
3016         cpu=athlon-4
3017         arch_without_sse2=yes
3018         arch_without_64bit=yes
3019         ;;
3020       athlon_tbird-*|athlon-*)
3021         arch=athlon
3022         cpu=athlon
3023         arch_without_sse2=yes
3024         ;;
3025       geode-*)
3026         arch=geode
3027         cpu=geode
3028         arch_without_sse2=yes
3029         ;;
3030       pentium2-*)
3031         arch=pentium2
3032         cpu=pentium2
3033         arch_without_sse2=yes
3034         ;;
3035       pentium3-*|pentium3m-*)
3036         arch=pentium3
3037         cpu=pentium3
3038         arch_without_sse2=yes
3039         ;;
3040       pentium4-*|pentium4m-*)
3041         arch=pentium4
3042         cpu=pentium4
3043         ;;
3044       prescott-*)
3045         arch=prescott
3046         cpu=prescott
3047         ;;
3048       nocona-*)
3049         arch=nocona
3050         cpu=nocona
3051         ;;
3052       atom-*)
3053         arch=atom
3054         cpu=atom
3055         ;;
3056       slm-*)
3057         arch=slm
3058         cpu=slm
3059         ;;
3060       core2-*)
3061         arch=core2
3062         cpu=core2
3063         ;;
3064       corei7-*)
3065         arch=corei7
3066         cpu=corei7
3067         ;;
3068       corei7_avx-*)
3069         arch=corei7-avx
3070         cpu=corei7-avx
3071         ;;
3072       pentium_m-*)
3073         arch=pentium-m
3074         cpu=pentium-m
3075         ;;
3076       pentiumpro-*)
3077         arch=pentiumpro
3078         cpu=pentiumpro
3079         arch_without_sse2=yes
3080         ;;
3081       *)
3082         arch=pentiumpro
3083         cpu=generic
3084         arch_without_sse2=yes
3085         arch_without_64bit=yes
3086         ;;
3087     esac
3088     ;;
3089   x86_64-*-*)
3090     case ${target_noncanonical} in
3091       bdver4-*)
3092         arch=bdver4
3093         cpu=bdver4
3094         ;;
3095       bdver3-*)
3096         arch=bdver3
3097         cpu=bdver3
3098         ;;
3099       bdver2-*)
3100         arch=bdver2
3101         cpu=bdver2
3102         ;;
3103       bdver1-*)
3104         arch=bdver1
3105         cpu=bdver1
3106         ;;
3107       btver1-*)
3108         arch=btver1
3109         cpu=btver1
3110         ;;
3111       btver2-*)
3112         arch=btver2
3113         cpu=btver2
3114         ;;
3115       amdfam10-*|barcelona-*)
3116         arch=amdfam10
3117         cpu=amdfam10
3118         ;;
3119       k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3120         arch=k8-sse3
3121         cpu=k8-sse3
3122         ;;
3123       k8-*|opteron-*|athlon_64-*)
3124         arch=k8
3125         cpu=k8
3126         ;;
3127       nocona-*)
3128         arch=nocona
3129         cpu=nocona
3130         ;;
3131       atom-*)
3132         arch=atom
3133         cpu=atom
3134         ;;
3135       slm-*)
3136         arch=slm
3137         cpu=slm
3138         ;;
3139       core2-*)
3140         arch=core2
3141         cpu=core2
3142         ;;
3143       corei7-*)
3144         arch=corei7
3145         cpu=corei7
3146         ;;
3147       *)
3148         arch=x86-64
3149         cpu=generic
3150         ;;
3151     esac
3152     ;;
3153 esac
3155 # If there is no $with_cpu option, try to infer one from ${target}.
3156 # This block sets nothing except for with_cpu.
3157 if test x$with_cpu = x ; then
3158   case ${target} in
3159     i[34567]86-*-*|x86_64-*-*)
3160       with_cpu=$cpu
3161       ;;
3162     alphaev6[78]*-*-*)
3163       with_cpu=ev67
3164       ;;
3165     alphaev6*-*-*)
3166       with_cpu=ev6
3167       ;;
3168     alphapca56*-*-*)
3169       with_cpu=pca56
3170       ;;
3171     alphaev56*-*-*)
3172       with_cpu=ev56
3173       ;;
3174     alphaev5*-*-*)
3175       with_cpu=ev5
3176       ;;
3177     frv-*-*linux* | frv400-*-*linux*)
3178       with_cpu=fr400
3179       ;;
3180     frv550-*-*linux*)
3181       with_cpu=fr550
3182       ;;
3183     m68k*-*-*)
3184       case "$with_arch" in
3185         "cf")
3186           with_cpu=${default_cf_cpu}
3187           ;;
3188         "" | "m68k")
3189           with_cpu=m${default_m68k_cpu}
3190           ;;
3191       esac
3192       ;;
3193     powerpc*-*-*spe*)
3194       if test x$enable_e500_double = xyes; then
3195          with_cpu=8548
3196       else
3197          with_cpu=8540
3198       fi       
3199       ;;
3200     sparc*-*-*)
3201       case ${target} in
3202         *-leon-*)
3203           with_cpu=leon
3204           ;;
3205         *-leon[3-9]*)
3206           with_cpu=leon3
3207           ;;
3208         *-leon[3-9]v7*)
3209           with_cpu=leon3v7
3210           ;;
3211         *)
3212           with_cpu="`echo ${target} | sed 's/-.*$//'`"
3213           ;;
3214       esac
3215       ;;
3216   esac
3218   # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
3219   case ${target} in
3220     i[34567]86-*-*|x86_64-*-*)
3221       if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
3222         if test x$with_cpu_32 = x; then
3223           with_cpu_32=$with_cpu
3224         fi
3225         if test x$with_cpu_64 = x; then
3226           with_cpu_64=$with_cpu
3227         fi
3228         with_cpu=
3229       fi
3230       ;;
3231   esac
3234 # Support for --with-arch and related options (and a few unrelated options,
3235 # too).
3236 case ${with_arch} in
3237   yes | no)
3238     echo "--with-arch must be passed a value" 1>&2
3239     exit 1
3240     ;;
3241 esac
3243 # If there is no $with_arch option, try to infer one from ${target}.
3244 # This block sets nothing except for with_arch.
3245 if test x$with_arch = x ; then
3246   case ${target} in
3247     i[34567]86-*-darwin*|x86_64-*-darwin*)
3248       # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3249       # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3250       ;;
3251     i[34567]86-*-*)
3252       # --with-fpmath sets the default ISA to SSE2, which is the same
3253       # ISA supported by Pentium 4.
3254       if test x$with_fpmath = x || test $arch_without_sse2 = no; then
3255         with_arch=$arch
3256       else
3257         with_arch=pentium4
3258       fi
3259       ;;
3260     x86_64-*-*)
3261       with_arch=$arch
3262       ;;
3263     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3264       with_arch=r5900
3265       ;;
3266     mips*-*-vxworks)
3267       with_arch=mips2
3268       ;;
3269   esac
3271   # Avoid overriding --with-arch-32 and --with-arch-64 values.
3272   case ${target} in
3273     i[34567]86-*-darwin*|x86_64-*-darwin*)
3274       # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3275       # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3276       ;;
3277     i[34567]86-*-*|x86_64-*-*)
3278       if test x$with_arch_32 != x || test x$with_arch_64 != x; then
3279         if test x$with_arch_32 = x; then
3280           with_arch_32=$with_arch
3281         fi
3282         if test x$with_arch_64 = x; then
3283           if test $arch_without_64bit = yes; then
3284             # Set the default 64bit arch to x86-64 if the default arch
3285             # doesn't support 64bit.
3286             with_arch_64=x86-64
3287           else
3288             with_arch_64=$with_arch
3289           fi
3290         fi
3291         with_arch=
3292       elif test $arch_without_64bit$need_64bit_isa = yesyes; then
3293         # Set the default 64bit arch to x86-64 if the default arch
3294         # doesn't support 64bit and we need 64bit ISA.
3295         with_arch_32=$with_arch
3296         with_arch_64=x86-64
3297         with_arch=
3298       fi
3299       ;;
3300   esac
3303 # Infer a default setting for --with-float.
3304 if test x$with_float = x; then
3305   case ${target} in
3306     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3307       # The R5900 doesn't support 64-bit float.  32-bit float doesn't
3308       # comply with IEEE 754.
3309       with_float=soft
3310       ;;
3311   esac
3314 # Infer a default setting for --with-fpu.
3315 if test x$with_fpu = x; then
3316   case ${target} in
3317     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3318       # The R5900 FPU only supports single precision.
3319       with_fpu=single
3320       ;;
3321   esac
3324 # Support --with-fpmath.
3325 if test x$with_fpmath != x; then
3326   case ${target} in
3327     i[34567]86-*-* | x86_64-*-*)
3328       case ${with_fpmath} in
3329       avx)
3330         tm_file="${tm_file} i386/avxmath.h"
3331         ;;
3332       sse)
3333         tm_file="${tm_file} i386/ssemath.h"
3334         ;;
3335       *)
3336         echo "Invalid --with-fpmath=$with_fpmath" 1>&2
3337         exit 1
3338         ;;
3339       esac
3340       ;;
3341     *)
3342       echo "--with-fpmath isn't supported for $target." 1>&2
3343       exit 1
3344       ;;
3345   esac
3348 # Similarly for --with-schedule.
3349 if test x$with_schedule = x; then
3350         case ${target} in
3351         hppa1*)
3352                 # Override default PA8000 scheduling model.
3353                 with_schedule=7100LC
3354                 ;;
3355         esac
3358 # Infer a default setting for --with-llsc.
3359 if test x$with_llsc = x; then
3360   case ${target} in
3361     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3362       # The R5900 doesn't support LL(D) and SC(D).
3363       with_llsc=no
3364       ;;
3365     mips*-*-linux*)
3366       # The kernel emulates LL and SC where necessary.
3367       with_llsc=yes
3368       ;;
3369   esac
3372 # Validate and mark as valid any --with options supported
3373 # by this target.  In order to use a particular --with option
3374 # you must list it in supported_defaults; validating the value
3375 # is optional.  This case statement should set nothing besides
3376 # supported_defaults.
3378 supported_defaults=
3379 case "${target}" in
3380         aarch64*-*-*)
3381                 supported_defaults="abi cpu arch"
3382                 for which in cpu arch; do
3384                         eval "val=\$with_$which"
3385                         base_val=`echo $val | sed -e 's/\+.*//'`
3386                         ext_val=`echo $val | sed -e 's/[a-z0-9\-]\+//'`
3388                         if [ $which = arch ]; then
3389                           def=aarch64-arches.def
3390                           pattern=AARCH64_ARCH
3391                         else
3392                           def=aarch64-cores.def
3393                           pattern=AARCH64_CORE
3394                         fi
3396                         ext_mask=AARCH64_CPU_DEFAULT_FLAGS
3398                         # Find the base CPU or ARCH id in aarch64-cores.def or
3399                         # aarch64-arches.def
3400                         if [ x"$base_val" = x ] \
3401                             || grep "^$pattern(\"$base_val\"," \
3402                                     ${srcdir}/config/aarch64/$def \
3403                                     > /dev/null; then
3405                           if [ $which = arch ]; then
3406                                 base_id=`grep "^$pattern(\"$base_val\"," \
3407                                   ${srcdir}/config/aarch64/$def | \
3408                                   sed -e 's/^[^,]*,[    ]*//' | \
3409                                   sed -e 's/,.*$//'`
3410                                 # Extract the architecture flags from aarch64-arches.def
3411                                 ext_mask=`grep "^$pattern(\"$base_val\"," \
3412                                    ${srcdir}/config/aarch64/$def | \
3413                                    sed -e 's/)$//' | \
3414                                    sed -e 's/^.*,//'`
3415                           else
3416                                 base_id=`grep "^$pattern(\"$base_val\"," \
3417                                   ${srcdir}/config/aarch64/$def | \
3418                                   sed -e 's/^[^,]*,[    ]*//' | \
3419                                   sed -e 's/,.*$//'`
3420                           fi
3422                           while [ x"$ext_val" != x ]
3423                           do
3424                                 ext_val=`echo $ext_val | sed -e 's/\+//'`
3425                                 ext=`echo $ext_val | sed -e 's/\+.*//'`
3426                                 base_ext=`echo $ext | sed -e 's/^no//'`
3428                                 if [ x"$base_ext" = x ] \
3429                                     || grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3430                                     ${srcdir}/config/aarch64/aarch64-option-extensions.def \
3431                                     > /dev/null; then
3433                                   ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3434                                         ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3435                                         sed -e 's/^[^,]*,[      ]*//' | \
3436                                         sed -e 's/,.*$//'`
3437                                   ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3438                                         ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3439                                         sed -e 's/^[^,]*,[      ]*[^,]*,[       ]*//' | \
3440                                         sed -e 's/,.*$//' | \
3441                                         sed -e 's/).*$//'`
3443                                   if [ $ext = $base_ext ]; then
3444                                         # Adding extension
3445                                         ext_mask="("$ext_mask") | ("$ext_on")"
3446                                   else
3447                                         # Removing extension
3448                                         ext_mask="("$ext_mask") & ~("$ext_off")"
3449                                   fi
3451                                   true
3452                                 else
3453                                   echo "Unknown extension used in --with-$which=$val" 1>&2
3454                                   exit 1
3455                                 fi
3456                                 ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
3457                           done
3459                           ext_mask="(("$ext_mask") << 6)"
3460                           if [ x"$base_id" != x ]; then
3461                                 target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
3462                           fi
3463                           true
3464                         else
3465                           echo "Unknown $which used in --with-$which=$val" 1>&2
3466                           exit 1
3467                         fi
3468                 done
3469                 ;;
3471         alpha*-*-*)
3472                 supported_defaults="cpu tune"
3473                 for which in cpu tune; do
3474                         eval "val=\$with_$which"
3475                         case "$val" in
3476                         "" \
3477                         | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
3478                         | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
3479                         | 21264a)
3480                                 ;;
3481                         *)
3482                                 echo "Unknown CPU used in --with-$which=$val" 1>&2
3483                                 exit 1
3484                                 ;;
3485                         esac
3486                 done
3487                 ;;
3489         arc*-*-*) # was:        arc*-*-linux-uclibc)
3490                 supported_defaults="cpu"
3491                 case $with_cpu in
3492                   arc600|arc601|arc700)
3493                         ;;
3494                   *) echo "Unknown cpu type"
3495                         exit 1
3496                         ;;
3497                 esac
3498                 ;;
3500         arm*-*-*)
3501                 supported_defaults="arch cpu float tune fpu abi mode tls"
3502                 for which in cpu tune; do
3503                         # See if it matches any of the entries in arm-cores.def
3504                         eval "val=\$with_$which"
3505                         if [ x"$val" = x ] \
3506                             || grep "^ARM_CORE(\"$val\"," \
3507                                     ${srcdir}/config/arm/arm-cores.def \
3508                                     > /dev/null; then
3509                           # Ok
3510                           new_val=`grep "^ARM_CORE(\"$val\"," \
3511                                 ${srcdir}/config/arm/arm-cores.def | \
3512                                 sed -e 's/^[^,]*,[      ]*//' | \
3513                                 sed -e 's/,.*$//'`
3514                           eval "target_${which}_cname=$new_val"
3515                         echo "For $val real value is $new_val"
3516                           true
3517                         else
3518                           echo "Unknown CPU used in --with-$which=$val" 1>&2
3519                           exit 1
3520                         fi
3521                 done
3523                 # See if it matches any of the entries in arm-arches.def
3524                 if [ x"$with_arch" = x ] \
3525                     || grep "^ARM_ARCH(\"$with_arch\"," \
3526                             ${srcdir}/config/arm/arm-arches.def \
3527                             > /dev/null; then
3528                   # OK
3529                   true
3530                 else
3531                   echo "Unknown arch used in --with-arch=$with_arch" 1>&2
3532                   exit 1
3533                 fi
3535                 case "$with_float" in
3536                 "" \
3537                 | soft | hard | softfp)
3538                         # OK
3539                         ;;
3540                 *)
3541                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3542                         exit 1
3543                         ;;
3544                 esac
3546                 # see if it matches any of the entries in arm-fpus.def
3547                 if [ x"$with_fpu" = x ] \
3548                     || grep "^ARM_FPU(\"$with_fpu\"," \
3549                             ${srcdir}/config/arm/arm-fpus.def \
3550                             > /dev/null; then
3551                   # OK
3552                   true
3553                 else
3554                   echo "Unknown fpu used in --with-fpu=$with_fpu" 1>&2
3555                   exit 1
3556                 fi
3558                 case "$with_abi" in
3559                 "" \
3560                 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
3561                         #OK
3562                         ;;
3563                 *)
3564                         echo "Unknown ABI used in --with-abi=$with_abi"
3565                         exit 1
3566                         ;;
3567                 esac
3569                 case "$with_mode" in
3570                 "" \
3571                 | arm | thumb )
3572                         #OK
3573                         ;;
3574                 *)
3575                         echo "Unknown mode used in --with-mode=$with_mode"
3576                         exit 1
3577                         ;;
3578                 esac
3580                 case "$with_tls" in
3581                 "" \
3582                 | gnu | gnu2)
3583                         # OK
3584                         ;;
3585                 *)
3586                         echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
3587                         exit 1
3588                         ;;
3589                 esac
3591                 if test "x$with_arch" != x && test "x$with_cpu" != x; then
3592                         echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
3593                 fi
3595                 # Add extra multilibs
3596                 if test "x$with_multilib_list" != x; then
3597                         arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
3598                         for arm_multilib in ${arm_multilibs}; do
3599                                 case ${arm_multilib} in
3600                                 aprofile)
3601                                 # Note that arm/t-aprofile is a
3602                                 # stand-alone make file fragment to be
3603                                 # used only with itself.  We do not
3604                                 # specifically use the
3605                                 # TM_MULTILIB_OPTION framework because
3606                                 # this shorthand is more
3607                                 # pragmatic. Additionally it is only
3608                                 # designed to work without any
3609                                 # with-cpu, with-arch with-mode
3610                                 # with-fpu or with-float options.
3611                                         if test "x$with_arch" != x \
3612                                             || test "x$with_cpu" != x \
3613                                             || test "x$with_float" != x \
3614                                             || test "x$with_fpu" != x \
3615                                             || test "x$with_mode" != x ; then
3616                                             echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2
3617                                             exit 1
3618                                         fi
3619                                         tmake_file="${tmake_file} arm/t-aprofile"
3620                                         break
3621                                         ;;
3622                                 armv6-m | armv7-m | armv7e-m | armv7-r | armv7-a)
3623                                         if test "x$with_arch" != x \
3624                                             || test "x$with_cpu" != x \
3625                                             || test "x$with_float" != x \
3626                                             || test "x$with_fpu" != x \
3627                                             || test "x$with_mode" != x ; then
3628                                             echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=${with_multilib_list}" 1>&2
3629                                             exit 1
3630                                         fi
3631                                         tmake_file="${tmake_file} arm/t-rmprofile"
3632                                         break
3633                                         ;;
3634                                 default)
3635                                         ;;
3636                                 *)
3637                                         echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
3638                                         exit 1
3639                                         ;;
3640                                 esac
3641                         done
3642                 fi
3643                 ;;
3645         fr*-*-*linux*)
3646                 supported_defaults=cpu
3647                 case "$with_cpu" in
3648                 fr400) ;;
3649                 fr550) ;;
3650                 *)
3651                         echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3652                         exit 1
3653                         ;;
3654                 esac
3655                 ;;
3657         fido-*-* | m68k*-*-*)
3658                 supported_defaults="arch cpu"
3659                 case "$with_arch" in
3660                 "" | "m68k"| "cf")
3661                         m68k_arch_family="$with_arch"
3662                         ;;
3663                 *)
3664                         echo "Invalid --with-arch=$with_arch" 1>&2
3665                         exit 1
3666                         ;;
3667                 esac
3669                 # We always have a $with_cpu setting here.
3670                 case "$with_cpu" in
3671                 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3672                         m68k_cpu_ident=$with_cpu
3673                         ;;
3674                 "m68020-40")
3675                         m68k_cpu_ident=m68020
3676                         tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3677                         ;;
3678                 "m68020-60")
3679                         m68k_cpu_ident=m68020
3680                         tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3681                         ;;
3682                 *)
3683                         # We need the C identifier rather than the string.
3684                         m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3685                            'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3686                             $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3687                                  ${srcdir}/config/m68k/m68k-devices.def`
3688                         if [ x"$m68k_cpu_ident" = x ] ; then
3689                                 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3690                                 exit 1
3691                         fi
3692                         with_cpu="mcpu=$with_cpu"
3693                         ;;
3694                 esac
3695                 ;;
3697         hppa*-*-*)
3698                 supported_defaults="arch schedule"
3700                 case "$with_arch" in
3701                 "" | 1.0 | 1.1 | 2.0)
3702                         # OK
3703                         ;;
3704                 *)
3705                         echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3706                         exit 1
3707                         ;;
3708                 esac
3710                 case "$with_schedule" in
3711                 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
3712                         # OK
3713                         ;;
3714                 *)
3715                         echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3716                         exit 1
3717                         ;;
3718                 esac
3719                 ;;
3721         i[34567]86-*-* | x86_64-*-*)
3722                 supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
3723                 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3724                         eval "val=\$with_$which"
3725                         case " $x86_archs " in
3726                         *" ${val} "*)
3727                                 case "${target}" in
3728                                   x86_64-*-*)
3729                                       case "x$which" in
3730                                         *_32)
3731                                                 ;;
3732                                         *)
3733                                                 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3734                                                 exit 1
3735                                                 ;;
3736                                       esac
3737                                       ;;
3738                                 esac
3739                                 # OK
3740                                 ;;
3741                         *)
3742                                 if test x${val} != x; then
3743                                         case " $x86_64_archs " in
3744                                         *" ${val} "*)
3745                                                 # OK
3746                                                 ;;
3747                                         *)
3748                                                 # Allow $x86_cpus --with-cpu=/--with-tune=
3749                                                 case "x$which" in
3750                                                 xcpu*|xtune*)
3751                                                         case " $x86_cpus " in
3752                                                         *" ${val} "*)
3753                                                                 # OK
3754                                                                 ;;
3755                                                         *)
3756                                                                 echo "Unknown CPU given in --with-$which=$val." 1>&2
3757                                                                 exit 1
3758                                                                 ;;
3759                                                         esac
3760                                                         ;;
3761                                                 *)
3762                                                         echo "Unknown CPU given in --with-$which=$val." 1>&2
3763                                                         exit 1
3764                                                         ;;
3765                                                 esac
3766                                         ;;
3767                                         esac
3768                                 fi
3769                                 ;;
3770                         esac
3771                 done
3772                 ;;
3774         mips*-*-*)
3775                 supported_defaults="abi arch arch_32 arch_64 float fpu nan tune tune_32 tune_64 divide llsc mips-plt synci"
3777                 case ${with_float} in
3778                 "" | soft | hard)
3779                         # OK
3780                         ;;
3781                 *)
3782                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3783                         exit 1
3784                         ;;
3785                 esac
3787                 case ${with_fpu} in
3788                 "" | single | double)
3789                         # OK
3790                         ;;
3791                 *)
3792                         echo "Unknown fpu type used in --with-fpu=$with_fpu" 1>&2
3793                         exit 1
3794                         ;;
3795                 esac
3797                 case ${with_nan} in
3798                 "" | 2008 | legacy)
3799                         # OK
3800                         ;;
3801                 *)
3802                         echo "Unknown NaN encoding used in --with-nan=$with_nan" 1>&2
3803                         exit 1
3804                         ;;
3805                 esac
3807                 case ${with_abi} in
3808                 "" | 32 | o64 | n32 | 64 | eabi)
3809                         # OK
3810                         ;;
3811                 *)
3812                         echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
3813                         exit 1
3814                         ;;
3815                 esac
3817                 case ${with_divide} in
3818                 "" | breaks | traps)
3819                         # OK
3820                         ;;
3821                 *)
3822                         echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3823                         exit 1
3824                         ;;
3825                 esac
3827                 case ${with_llsc} in
3828                 yes)
3829                         with_llsc=llsc
3830                         ;;
3831                 no)
3832                         with_llsc="no-llsc"
3833                         ;;
3834                 "")
3835                         # OK
3836                         ;;
3837                 *)
3838                         echo "Unknown llsc type used in --with-llsc" 1>&2
3839                         exit 1
3840                         ;;
3841                 esac
3843                 case ${with_mips_plt} in
3844                 yes)
3845                         with_mips_plt=plt
3846                         ;;
3847                 no)
3848                         with_mips_plt=no-plt
3849                         ;;
3850                 "")
3851                         ;;
3852                 *)
3853                         echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
3854                         exit 1
3855                         ;;
3856                 esac
3858                 case ${with_synci} in
3859                 yes)
3860                         with_synci=synci
3861                         ;;
3862                 no)
3863                         with_synci=no-synci
3864                         ;;
3865                 "")
3866                         ;;
3867                 *)
3868                         echo "Unknown synci type used in --with-synci" 1>&2
3869                         exit 1
3870                         ;;
3871                 esac
3872                 ;;
3874         nds32*-*-*)
3875                 supported_defaults="arch nds32_lib"
3877                 # process --with-arch
3878                 case "${with_arch}" in
3879                 "" | v2 | v3 | v3m)
3880                         # OK
3881                         ;;
3882                 *)
3883                         echo "Cannot accept --with-arch=$with_arch, available values are: v2 v3 v3m" 1>&2
3884                         exit 1
3885                         ;;
3886                 esac
3888                 # process --with-nds32-lib
3889                 case "${with_nds32_lib}" in
3890                 "")
3891                         # the default library is newlib
3892                         with_nds32_lib=newlib
3893                         ;;
3894                 newlib)
3895                         # OK
3896                         ;;
3897                 mculib)
3898                         # OK
3899                         ;;
3900                 *)
3901                         echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib" 1>&2
3902                         exit 1
3903                         ;;
3904                 esac
3905                 ;;
3907         powerpc*-*-* | rs6000-*-*)
3908                 supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64"
3910                 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3911                         eval "val=\$with_$which"
3912                         case ${val} in
3913                         default32 | default64)
3914                                 case $which in
3915                                 cpu | tune)
3916                                         ;;
3917                                 *)
3918                                         echo "$val only valid for --with-cpu and --with-tune." 1>&2
3919                                         exit 1
3920                                         ;;
3921                                 esac
3922                                 with_which="with_$which"
3923                                 eval $with_which=
3924                                 ;;
3925                         405cr)
3926                                 tm_defines="${tm_defines} CONFIG_PPC405CR"
3927                                 eval "with_$which=405"
3928                                 ;;
3929                         "" | common | native \
3930                         | power | power[2345678] | power6x | powerpc | powerpc64 \
3931                         | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
3932                         | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
3933                         | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
3934                         | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
3935                         | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
3936                         | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
3937                                 # OK
3938                                 ;;
3939                         *)
3940                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
3941                                 exit 1
3942                                 ;;
3943                         esac
3944                 done
3946                 case "$with_abi" in
3947                 "" | elfv1 | elfv2 )
3948                         #OK
3949                         ;;
3950                 *)
3951                         echo "Unknown ABI used in --with-abi=$with_abi"
3952                         exit 1
3953                         ;;
3954                 esac
3955                 ;;
3957         s390*-*-*)
3958                 supported_defaults="arch mode tune"
3960                 for which in arch tune; do
3961                         eval "val=\$with_$which"
3962                         case ${val} in
3963                         "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12)
3964                                 # OK
3965                                 ;;
3966                         *)
3967                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
3968                                 exit 1
3969                                 ;;
3970                         esac
3971                 done
3973                 case ${with_mode} in
3974                 "" | esa | zarch)
3975                         # OK
3976                         ;;
3977                 *)
3978                         echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3979                         exit 1
3980                         ;;
3981                 esac
3982                 ;;
3984         sh[123456ble]-*-* | sh-*-*)
3985                 supported_defaults="cpu"
3986                 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
3987                 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3988                         # OK
3989                         ;;
3990                 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3991                         ;;
3992                 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3993                         ;;
3994                 *)
3995                         echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
3996                         echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
3997                         echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
3998                         echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
3999                         exit 1
4000                         ;;
4001                 esac
4002                 ;;
4003         sparc*-*-*)
4004                 supported_defaults="cpu float tune"
4006                 for which in cpu tune; do
4007                         eval "val=\$with_$which"
4008                         case ${val} in
4009                         "" | sparc | sparcv9 | sparc64 \
4010                         | v7 | cypress \
4011                         | v8 | supersparc | hypersparc | leon | leon3 | leon3v7 \
4012                         | sparclite | f930 | f934 | sparclite86x \
4013                         | sparclet | tsc701 \
4014                         | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
4015                         | niagara3 | niagara4)
4016                                 # OK
4017                                 ;;
4018                         *)
4019                                 echo "Unknown cpu used in --with-$which=$val" 1>&2
4020                                 exit 1
4021                                 ;;
4022                         esac
4023                 done
4025                 case ${with_float} in
4026                 "" | soft | hard)
4027                         # OK
4028                         ;;
4029                 *)
4030                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
4031                         exit 1
4032                         ;;
4033                 esac
4034                 ;;
4036         spu-*-*)
4037                 supported_defaults="arch tune"
4039                 for which in arch tune; do
4040                         eval "val=\$with_$which"
4041                         case ${val} in
4042                         "" | cell | celledp)
4043                                 # OK
4044                                 ;;
4045                         *)
4046                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
4047                                 exit 1
4048                                 ;;
4049                         esac
4050                 done
4051                 ;;
4053         tic6x-*-*)
4054                 supported_defaults="arch"
4056                 case ${with_arch} in
4057                 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
4058                         # OK
4059                         ;;
4060                 *)
4061                         echo "Unknown arch used in --with-arch=$with_arch." 1>&2
4062                         exit 1
4063                         ;;
4064                 esac
4065                 ;;
4067         v850*-*-*)
4068                 supported_defaults=cpu
4069                 case ${with_cpu} in
4070                 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3 | v850e3v5)
4071                         # OK
4072                         ;;
4073                 *)
4074                         echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4075                         exit 1
4076                         ;;
4077                 esac
4078                 ;;
4079 esac
4081 # Set some miscellaneous flags for particular targets.
4082 target_cpu_default2=
4083 case ${target} in
4084         aarch64*-*-*)
4085                 if test x"$target_cpu_cname" != x
4086                 then
4087                         target_cpu_default2=$target_cpu_cname
4088                 fi
4089                 ;;
4091         arm*-*-*)
4092                 if test x$target_cpu_cname = x
4093                 then
4094                         target_cpu_default2=TARGET_CPU_generic
4095                 else
4096                         target_cpu_default2=TARGET_CPU_$target_cpu_cname
4097                 fi
4098                 ;;
4100         hppa*-*-*)
4101                 if test x$gas = xyes
4102                 then
4103                         target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
4104                 fi
4105                 ;;
4107         fido*-*-* | m68k*-*-*)
4108                 target_cpu_default2=$m68k_cpu_ident
4109                 tmake_file="m68k/t-opts $tmake_file"
4110                 if [ x"$m68k_arch_family" != x ]; then
4111                         tmake_file="m68k/t-$m68k_arch_family $tmake_file"
4112                 fi
4113                 ;;
4115         i[34567]86-*-darwin* | x86_64-*-darwin*)
4116                 ;;
4117         i[34567]86-*-linux* | x86_64-*-linux*)
4118                 tmake_file="$tmake_file i386/t-linux"
4119                 ;;
4120         i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
4121                 tmake_file="$tmake_file i386/t-kfreebsd"
4122                 ;;
4123         i[34567]86-*-gnu*)
4124                 tmake_file="$tmake_file i386/t-gnu"
4125                 ;;
4126         i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
4127                 ;;
4128         i[34567]86-*-cygwin* | x86_64-*-cygwin*)
4129                 ;;
4130         i[34567]86-*-mingw* | x86_64-*-mingw*)
4131                 ;;
4132         i[34567]86-*-freebsd* | x86_64-*-freebsd*)
4133                 ;;
4134         ia64*-*-linux*)
4135                 ;;
4137         mips*-*-*)
4138                 if test x$gnu_ld = xyes
4139                 then
4140                         target_cpu_default2="MASK_SPLIT_ADDRESSES"
4141                 fi
4142                 case ${target} in
4143                         mips*el-*-*)
4144                                 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
4145                                 ;;
4146                 esac
4147                 tmake_file="mips/t-mips $tmake_file"
4148                 ;;
4150         powerpc*-*-* | rs6000-*-*)
4151                 # FIXME: The PowerPC port uses the value set at compile time,
4152                 # although it's only cosmetic.
4153                 if test "x$with_cpu" != x
4154                 then
4155                         target_cpu_default2="\\\"$with_cpu\\\""
4156                 fi
4157                 out_file=rs6000/rs6000.c
4158                 c_target_objs="${c_target_objs} rs6000-c.o"
4159                 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
4160                 tmake_file="rs6000/t-rs6000 ${tmake_file}"
4161                 ;;
4163         sh[123456ble]*-*-* | sh-*-*)
4164                 c_target_objs="${c_target_objs} sh-c.o"
4165                 cxx_target_objs="${cxx_target_objs} sh-c.o"
4166                 ;;
4168         sparc*-*-*)
4169                 # Some standard aliases.
4170                 case x$with_cpu in
4171                 xsparc)
4172                         with_cpu=v7
4173                         ;;
4174                 xsparcv9 | xsparc64)
4175                         with_cpu=v9
4176                         ;;
4177                 esac
4179                 if test x$with_tune = x ; then
4180                       case ${target} in
4181                       *-leon-*)
4182                           with_tune=leon
4183                           ;;
4184                       *-leon[3-9]*)
4185                           with_tune=leon3
4186                           ;;
4187                       esac
4188                 fi
4190                 # The SPARC port checks this value at compile-time.
4191                 target_cpu_default2="TARGET_CPU_$with_cpu"
4192                 ;;
4194         v850*-*-*)
4195                 case "x$with_cpu" in
4196                 x)
4197                         ;;
4198                 xv850e | xv850e1 | xv850e2 | xv850e2v3 | xv850e3v5)
4199                         target_cpu_default2="TARGET_CPU_$with_cpu"
4200                         ;;
4201                 xv850es)
4202                         target_cpu_default2="TARGET_CPU_v850e1"
4203                         ;;
4204                 esac
4205                 ;;
4206 esac
4209 all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu nan divide llsc mips-plt synci tls"
4210 for option in $all_defaults
4212         eval "val=\$with_"`echo $option | sed s/-/_/g`
4213         if test -n "$val"; then
4214                 case " $supported_defaults " in
4215                 *" $option "*)
4216                         ;;
4217                 *)
4218                         echo "This target does not support --with-$option." 2>&1
4219                         echo "Valid --with options are: $supported_defaults" 2>&1
4220                         exit 1
4221                         ;;
4222                 esac
4224                 if test "x$t" = x
4225                 then
4226                         t="{ \"$option\", \"$val\" }"
4227                 else
4228                         t="${t}, { \"$option\", \"$val\" }"
4229                 fi
4230         fi
4231 done
4233 if test "x$t" = x
4234 then
4235         configure_default_options="{ { NULL, NULL} }"
4236 else
4237         configure_default_options="{ ${t} }"
4240 if test "$target_cpu_default2" != ""
4241 then
4242         if test "$target_cpu_default" != ""
4243         then
4244                 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
4245         else
4246                 target_cpu_default=$target_cpu_default2
4247         fi