[AArch64 costs 18/18] Dump a message if we are unable to cost an insn.
[official-gcc.git] / gcc / config.gcc
blobbc1e4c56843c9589027977d7881cbf93579cc291
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=yes
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-*                              \
250     if test "x$enable_obsolete" != xyes; then
251       echo "*** Configuration ${target} is obsolete." >&2
252       echo "*** Specify --enable-obsolete to build it anyway." >&2
253       echo "*** Support will be REMOVED in the next major release of GCC," >&2
254       echo "*** unless a maintainer comes forward." >&2
255       exit 1
256     fi;;
257 esac
259 # Unsupported targets list.  Do not put an entry in this list unless
260 # it would otherwise be caught by a more permissive pattern.  The list
261 # should be in alphabetical order.
262 case ${target} in
263  # Avoid special cases that are not obsolete
264    arm*-*-*eabi*                        \
266         ;;
267    arm*-wince-pe*                       \
268  | arm*-*-ecos-elf                      \
269  | arm*-*-elf                           \
270  | arm*-*-freebsd*                      \
271  | arm*-*-linux*                        \
272  | arm*-*-uclinux*                      \
273  | i[34567]86-go32-*                    \
274  | i[34567]86-*-go32*                   \
275  | m68k-*-uclinuxoldabi*                \
276  | mips64orion*-*-rtems*                \
277  | pdp11-*-bsd                          \
278  | sparc-hal-solaris2*                  \
279  | thumb-*-*                            \
280  | *-*-freebsd[12] | *-*-freebsd[12].*  \
281  | *-*-freebsd*aout*                    \
282  | *-*-linux*aout*                      \
283  | *-*-linux*coff*                      \
284  | *-*-linux*libc1*                     \
285  | *-*-linux*oldld*                     \
286  | *-*-rtemsaout*                       \
287  | *-*-rtemscoff*                       \
288  | *-*-solaris2                         \
289  | *-*-solaris2.[0-9]                   \
290  | *-*-solaris2.[0-9].*                 \
291  | *-*-sysv*                            \
292  | vax-*-vms*                           \
294         echo "*** Configuration ${target} not supported" 1>&2
295         exit 1
296         ;;
297 esac
299 # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
300 # updated in each machine entry.  Also set default extra_headers for some
301 # machines.
302 tm_p_file=
303 cpu_type=`echo ${target} | sed 's/-.*$//'`
304 cpu_is_64bit=
305 case ${target} in
306 m32c*-*-*)
307         cpu_type=m32c
308         tmake_file=m32c/t-m32c
309         target_has_targetm_common=no
310         ;;
311 aarch64*-*-*)
312         cpu_type=aarch64
313         need_64bit_hwint=yes
314         extra_headers="arm_neon.h"
315         extra_objs="aarch64-builtins.o aarch-common.o"
316         target_has_targetm_common=yes
317         ;;
318 alpha*-*-*)
319         cpu_type=alpha
320         need_64bit_hwint=yes
321         extra_options="${extra_options} g.opt"
322         ;;
323 am33_2.0-*-linux*)
324         cpu_type=mn10300
325         ;;
326 arc*-*-*)
327         cpu_type=arc
328         ;;
329 arm*-*-*)
330         cpu_type=arm
331         extra_objs="aarch-common.o"
332         extra_headers="mmintrin.h arm_neon.h arm_acle.h"
333         target_type_format_char='%'
334         c_target_objs="arm-c.o"
335         cxx_target_objs="arm-c.o"
336         need_64bit_hwint=yes
337         extra_options="${extra_options} arm/arm-tables.opt"
338         ;;
339 avr-*-*)
340         cpu_type=avr
341         c_target_objs="avr-c.o"
342         cxx_target_objs="avr-c.o"
343         extra_options="${extra_options} avr/avr-tables.opt"
344         ;;
345 bfin*-*)
346         cpu_type=bfin
347         ;;
348 crisv32-*)
349         cpu_type=cris
350         ;;
351 frv*)   cpu_type=frv
352         extra_options="${extra_options} g.opt"
353         ;;
354 moxie*) cpu_type=moxie
355         target_has_targetm_common=no
356         ;;
357 fido-*-*)
358         cpu_type=m68k
359         extra_headers=math-68881.h
360         extra_options="${extra_options} m68k/m68k-tables.opt"
361         ;;
362 i[34567]86-*-*)
363         cpu_type=i386
364         c_target_objs="i386-c.o"
365         cxx_target_objs="i386-c.o"
366         need_64bit_hwint=yes
367         extra_options="${extra_options} fused-madd.opt"
368         extra_headers="cpuid.h mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
369                        pmmintrin.h tmmintrin.h ammintrin.h smmintrin.h
370                        nmmintrin.h bmmintrin.h fma4intrin.h wmmintrin.h
371                        immintrin.h x86intrin.h avxintrin.h xopintrin.h
372                        ia32intrin.h cross-stdarg.h lwpintrin.h popcntintrin.h
373                        lzcntintrin.h bmiintrin.h bmi2intrin.h tbmintrin.h
374                        avx2intrin.h avx512fintrin.h fmaintrin.h f16cintrin.h
375                        rtmintrin.h xtestintrin.h rdseedintrin.h prfchwintrin.h
376                        adxintrin.h fxsrintrin.h xsaveintrin.h xsaveoptintrin.h
377                        avx512cdintrin.h avx512erintrin.h avx512pfintrin.h
378                        shaintrin.h clflushoptintrin.h xsavecintrin.h
379                        xsavesintrin.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 clflushoptintrin.h xsavecintrin.h
397                        xsavesintrin.h"
398         need_64bit_hwint=yes
399         ;;
400 ia64-*-*)
401         extra_headers=ia64intrin.h
402         need_64bit_hwint=yes
403         extra_options="${extra_options} g.opt fused-madd.opt"
404         ;;
405 hppa*-*-*)
406         cpu_type=pa
407         ;;
408 lm32*)
409         extra_options="${extra_options} g.opt"
410         ;;
411 m32r*-*-*)
412         cpu_type=m32r
413         extra_options="${extra_options} g.opt"
414         ;;
415 m68k-*-*)
416         extra_headers=math-68881.h
417         extra_options="${extra_options} m68k/m68k-tables.opt"
418         ;;
419 microblaze*-*-*)
420         cpu_type=microblaze
421         extra_options="${extra_options} g.opt"
422         ;;
423 mips*-*-*)
424         cpu_type=mips
425         need_64bit_hwint=yes
426         extra_headers="loongson.h"
427         extra_options="${extra_options} g.opt mips/mips-tables.opt"
428         ;;
429 nds32*)
430         cpu_type=nds32
431         extra_headers="nds32_intrinsic.h"
432         ;;
433 nios2-*-*)
434         cpu_type=nios2
435         extra_options="${extra_options} g.opt"
436         ;;      
437 picochip-*-*)
438         cpu_type=picochip
439         ;;
440 powerpc*-*-*)
441         cpu_type=rs6000
442         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"
443         need_64bit_hwint=yes
444         case x$with_cpu in
445             xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500)
446                 cpu_is_64bit=yes
447                 ;;
448         esac
449         extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
450         ;;
451 rs6000*-*-*)
452         need_64bit_hwint=yes
453         extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt"
454         ;;
455 score*-*-*)
456         cpu_type=score
457         extra_options="${extra_options} g.opt"
458         ;;
459 sparc*-*-*)
460         cpu_type=sparc
461         c_target_objs="sparc-c.o"
462         cxx_target_objs="sparc-c.o"
463         extra_headers="visintrin.h"
464         need_64bit_hwint=yes
465         ;;
466 spu*-*-*)
467         cpu_type=spu
468         need_64bit_hwint=yes
469         ;;
470 s390*-*-*)
471         cpu_type=s390
472         need_64bit_hwint=yes
473         extra_options="${extra_options} fused-madd.opt"
474         extra_headers="s390intrin.h htmintrin.h htmxlintrin.h"
475         ;;
476 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
477 sh[123456789lbe]*-*-* | sh-*-*)
478         cpu_type=sh
479         need_64bit_hwint=yes
480         extra_options="${extra_options} fused-madd.opt"
481         extra_objs="${extra_objs} sh_treg_combine.o sh-mem.o sh_optimize_sett_clrt.o"
482         ;;
483 v850*-*-*)
484         cpu_type=v850
485         ;;
486 tic6x-*-*)
487         cpu_type=c6x
488         extra_headers="c6x_intrinsics.h"
489         extra_options="${extra_options} c6x/c6x-tables.opt"
490         ;;
491 xtensa*-*-*)
492         extra_options="${extra_options} fused-madd.opt"
493         ;;
494 tilegx*-*-*)
495         cpu_type=tilegx
496         need_64bit_hwint=yes
497         ;;
498 tilepro*-*-*)
499         cpu_type=tilepro
500         need_64bit_hwint=yes
501         ;;
502 esac
504 tm_file=${cpu_type}/${cpu_type}.h
505 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
506 then
507         tm_p_file=${cpu_type}/${cpu_type}-protos.h
509 extra_modes=
510 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
511 then
512         extra_modes=${cpu_type}/${cpu_type}-modes.def
514 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}.opt
515 then
516         extra_options="${extra_options} ${cpu_type}/${cpu_type}.opt"
519 case ${target} in
520 aarch64*-*-*)
521         tm_p_file="${tm_p_file} arm/aarch-common-protos.h"
522         case ${with_abi} in
523         "")
524                 if test "x$with_multilib_list" = xilp32; then
525                         tm_file="aarch64/biarchilp32.h ${tm_file}"
526                 else
527                         tm_file="aarch64/biarchlp64.h ${tm_file}"
528                 fi
529                 ;;
530         ilp32)
531                 tm_file="aarch64/biarchilp32.h ${tm_file}"
532                 ;;
533         lp64)
534                 tm_file="aarch64/biarchlp64.h ${tm_file}"
535                 ;;
536         *)
537                 echo "Unknown ABI used in --with-abi=$with_abi"
538                 exit 1
539         esac
540         ;;
541 i[34567]86-*-*)
542         if test "x$with_abi" != x; then
543                 echo "This target does not support --with-abi."
544                 exit 1
545         fi
546         if test "x$enable_cld" = xyes; then
547                 tm_defines="${tm_defines} USE_IX86_CLD=1"
548         fi
549         if test "x$enable_frame_pointer" = xyes; then
550                 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
551         fi
552         tm_file="vxworks-dummy.h ${tm_file}"
553         ;;
554 x86_64-*-*)
555         case ${with_abi} in
556         "")
557                 if test "x$with_multilib_list" = xmx32; then
558                         tm_file="i386/biarchx32.h ${tm_file}"
559                 else
560                         tm_file="i386/biarch64.h ${tm_file}"
561                 fi
562                 ;;
563         64 | m64)
564                 tm_file="i386/biarch64.h ${tm_file}"
565                 ;;
566         x32 | mx32)
567                 tm_file="i386/biarchx32.h ${tm_file}"
568                 ;;
569         *)
570                 echo "Unknown ABI used in --with-abi=$with_abi"
571                 exit 1
572         esac
573         if test "x$enable_cld" = xyes; then
574                 tm_defines="${tm_defines} USE_IX86_CLD=1"
575         fi
576         if test "x$enable_frame_pointer" = xyes; then
577                 tm_defines="${tm_defines} USE_IX86_FRAME_POINTER=1"
578         fi
579         tm_file="vxworks-dummy.h ${tm_file}"
580         ;;
581 arm*-*-*)
582         tm_p_file="${tm_p_file} arm/aarch-common-protos.h"
583         tm_file="vxworks-dummy.h ${tm_file}"
584         ;;
585 mips*-*-* | sh*-*-* | sparc*-*-*)
586         tm_file="vxworks-dummy.h ${tm_file}"
587         ;;
588 esac
590 # On a.out targets, we need to use collect2.
591 case ${target} in
592 *-*-*aout*)
593         use_collect2=yes
594         ;;
595 esac
597 # Common C libraries.
598 tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
600 # 32-bit x86 processors supported by --with-arch=.  Each processor
601 # MUST be separated by exactly one space.
602 x86_archs="athlon athlon-4 athlon-fx athlon-mp athlon-tbird \
603 athlon-xp k6 k6-2 k6-3 geode c3 c3-2 winchip-c6 winchip2 i386 i486 \
604 i586 i686 pentium pentium-m pentium-mmx pentium2 pentium3 pentium3m \
605 pentium4 pentium4m pentiumpro prescott"
607 # 64-bit x86 processors supported by --with-arch=.  Each processor
608 # MUST be separated by exactly one space.
609 x86_64_archs="amdfam10 athlon64 athlon64-sse3 barcelona bdver1 bdver2 \
610 bdver3 bdver4 btver1 btver2 k8 k8-sse3 opteron opteron-sse3 nocona \
611 core2 corei7 corei7-avx core-avx-i core-avx2 atom slm nehalem westmere \
612 sandybridge ivybridge haswell broadwell bonnell silvermont x86-64 native"
614 # Additional x86 processors supported by --with-cpu=.  Each processor
615 # MUST be separated by exactly one space.
616 x86_cpus="generic intel"
618 # Common parts for widely ported systems.
619 case ${target} in
620 *-*-darwin*)
621   tmake_file="t-darwin ${cpu_type}/t-darwin"
622   tm_file="${tm_file} darwin.h"
623   case ${target} in
624   *-*-darwin9*)
625     tm_file="${tm_file} darwin9.h"
626     ;;
627   *-*-darwin[12][0-9]*)
628     tm_file="${tm_file} darwin9.h darwin10.h"
629     ;;
630   esac
631   tm_file="${tm_file} ${cpu_type}/darwin.h"
632   tm_p_file="${tm_p_file} darwin-protos.h"
633   target_gtfiles="\$(srcdir)/config/darwin.c"
634   extra_options="${extra_options} darwin.opt"
635   c_target_objs="${c_target_objs} darwin-c.o"
636   cxx_target_objs="${cxx_target_objs} darwin-c.o"
637   fortran_target_objs="darwin-f.o"
638   target_has_targetcm=yes
639   extra_objs="darwin.o"
640   extra_gcc_objs="darwin-driver.o"
641   default_use_cxa_atexit=yes
642   use_gcc_stdint=wrap
643   case ${enable_threads} in
644     "" | yes | posix) thread_file='posix' ;;
645   esac
646   ;;
647 *-*-freebsd*)
648   # This is the generic ELF configuration of FreeBSD.  Later
649   # machine-specific sections may refine and add to this
650   # configuration.
651   #
652   # Due to tm_file entry ordering issues that vary between cpu
653   # architectures, we only define fbsd_tm_file to allow the
654   # machine-specific section to dictate the final order of all
655   # entries of tm_file with the minor exception that components
656   # of the tm_file set here will always be of the form:
657   #
658   # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
659   #
660   # The machine-specific section should not tamper with this
661   # ordering but may order all other entries of tm_file as it
662   # pleases around the provided core setting.
663   gas=yes
664   gnu_ld=yes
665   fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
666   tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
667   tmake_file="t-slibgcc"
668   case ${enable_threads} in
669     no)
670       fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h"
671       ;;
672     "" | yes | posix)
673       thread_file='posix'
674       ;;
675     *)
676       echo 'Unknown thread configuration for FreeBSD'
677       exit 1
678       ;;
679   esac
680   fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h freebsd-stdint.h"
681   extra_options="$extra_options rpath.opt freebsd.opt"
682   case ${target} in
683     *-*-freebsd[345].*)
684       :;;
685     *)
686       default_use_cxa_atexit=yes;;
687   esac
688   # need_64bit_hwint=yes # system compiler has this for all arch!
689   use_gcc_stdint=wrap
690   ;;
691 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
692   extra_options="$extra_options gnu-user.opt"
693   gas=yes
694   gnu_ld=yes
695   case ${enable_threads} in
696     "" | yes | posix) thread_file='posix' ;;
697   esac
698   tmake_file="t-slibgcc"
699   case $target in
700     *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-kopensolaris*-gnu)
701       :;;
702     *-*-gnu*)
703       native_system_header_dir=/include
704       ;;
705   esac
706   # Linux C libraries selection switch: glibc / uclibc / bionic.
707   # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
708   case $target in
709     *linux*)
710       tm_p_file="${tm_p_file} linux-protos.h"
711       tmake_file="${tmake_file} t-linux"
712       extra_objs="${extra_objs} linux.o"
713       extra_options="${extra_options} linux.opt"
714       ;;
715   esac
716   case $target in
717     *-*-*android*)
718       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
719       ;;
720     *-*-*uclibc*)
721       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
722       ;;
723     *)
724       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
725       ;;
726   esac
727   # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
728   # is provided.
729   default_use_cxa_atexit=yes
730   use_gcc_tgmath=no
731   use_gcc_stdint=wrap
732   # Enable compilation for Android by default for *android* targets.
733   case $target in
734     *-*-*android*)
735       tm_defines="$tm_defines ANDROID_DEFAULT=1"
736       ;;
737     *)
738       tm_defines="$tm_defines ANDROID_DEFAULT=0"
739       ;;
740   esac
741   c_target_objs="${c_target_objs} glibc-c.o"
742   cxx_target_objs="${cxx_target_objs} glibc-c.o"
743   tmake_file="${tmake_file} t-glibc"
744   target_has_targetcm=yes
745   ;;
746 *-*-netbsd*)
747   tmake_file="t-slibgcc"
748   gas=yes
749   gnu_ld=yes
751   # NetBSD 2.0 and later get POSIX threads enabled by default.
752   # Allow them to be explicitly enabled on any other version.
753   case ${enable_threads} in
754     "")
755       case ${target} in
756         *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
757           thread_file='posix'
758           tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
759           ;;
760       esac
761       ;;
762     yes | posix)
763       thread_file='posix'
764       tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
765       ;;
766   esac
768   # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
769   # default (unless overridden by --disable-__cxa_atexit).
770   case ${target} in
771     *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
772       default_use_cxa_atexit=yes
773       ;;
774   esac
775   ;;
776 *-*-openbsd*)
777   tmake_file="t-openbsd"
778   case ${enable_threads} in
779     yes)
780       thread_file='posix'
781       ;;
782   esac
783   case ${target} in
784     *-*-openbsd2.*|*-*-openbsd3.[012])
785       tm_defines="${tm_defines} HAS_LIBC_R=1" ;;
786   esac
787   case ${target} in
788     *-*-openbsd4.[3-9]|*-*-openbsd[5-9]*)
789       default_use_cxa_atexit=yes
790       ;;
791   esac
792   ;;
793 *-*-rtems*)
794   case ${enable_threads} in
795     yes) thread_file='rtems' ;;
796   esac
797   tmake_file="${tmake_file} t-rtems"
798   extra_options="${extra_options} rtems.opt"
799   default_use_cxa_atexit=yes
800   use_gcc_stdint=wrap
801   ;;
802 *-*-uclinux*)
803   extra_options="$extra_options gnu-user.opt"
804   use_gcc_stdint=wrap
805   tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
806   ;;
807 *-*-rdos*)
808   use_gcc_stdint=wrap
809   ;;
810 *-*-solaris2*)
811   # i?86-*-solaris2* needs to insert headers between cpu default and
812   # Solaris 2 specific ones.
813   sol2_tm_file_head="dbxelf.h elfos.h ${cpu_type}/sysv4.h"
814   sol2_tm_file_tail="${cpu_type}/sol2.h sol2.h"
815   sol2_tm_file="${sol2_tm_file_head} ${sol2_tm_file_tail}"
816   use_gcc_stdint=wrap
817   if test x$gnu_ld = xyes; then
818     tm_file="usegld.h ${tm_file}"
819   fi
820   if test x$gas = xyes; then
821     tm_file="usegas.h ${tm_file}"
822   fi
823   tm_p_file="${tm_p_file} sol2-protos.h"
824   tmake_file="${tmake_file} t-sol2 t-slibgcc"
825   c_target_objs="${c_target_objs} sol2-c.o"
826   cxx_target_objs="${cxx_target_objs} sol2-c.o sol2-cxx.o"
827   extra_objs="sol2.o sol2-stubs.o"
828   extra_options="${extra_options} sol2.opt"
829   case ${enable_threads}:${have_pthread_h}:${have_thread_h} in
830     "":yes:* | yes:yes:* )
831       thread_file=posix
832       ;;
833   esac
834   ;;
835 *-*-*vms*)
836   extra_options="${extra_options} vms/vms.opt"
837   xmake_file=vms/x-vms
838   tmake_file="vms/t-vms t-slibgcc"
839   extra_objs="vms.o"
840   target_gtfiles="$target_gtfiles \$(srcdir)/config/vms/vms.c"
841   tm_p_file="${tm_p_file} vms/vms-protos.h"
842   xm_file="vms/xm-vms.h"
843   c_target_objs="vms-c.o"
844   cxx_target_objs="vms-c.o"
845   fortran_target_objs="vms-f.o"
846   use_gcc_stdint=provide
847   tm_file="${tm_file} vms/vms-stdint.h"
848   if test x$gnu_ld != xyes; then
849     # Build wrappers for native case.
850     extra_programs="ld\$(exeext) ar\$(exeext)"
851     tmake_file="$tmake_file vms/t-vmsnative"
852   fi
853   ;;
854 *-*-vxworks*)
855   tmake_file=t-vxworks
856   xm_defines=POSIX
857   extra_options="${extra_options} vxworks.opt"
858   extra_objs="$extra_objs vxworks.o"
859   case ${enable_threads} in
860     no) ;;
861     "" | yes | vxworks) thread_file='vxworks' ;;
862     *) echo 'Unknown thread configuration for VxWorks'; exit 1 ;;
863   esac
864   ;;
865 *-*-elf|arc*-*-elf*)
866   # Assume that newlib is being used and so __cxa_atexit is provided.
867   default_use_cxa_atexit=yes
868   use_gcc_stdint=wrap
869   ;;
870 esac
872 case ${target} in
873 aarch64*-*-elf)
874         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
875         tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
876         tmake_file="${tmake_file} aarch64/t-aarch64"
877         use_gcc_stdint=wrap
878         case $target in
879         aarch64_be-*)
880                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
881                 ;;
882         esac
883         aarch64_multilibs="${with_multilib_list}"
884         if test "$aarch64_multilibs" = "default"; then
885                 aarch64_multilibs="lp64,ilp32"
886         fi
887         aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
888         for aarch64_multilib in ${aarch64_multilibs}; do
889                 case ${aarch64_multilib} in
890                 ilp32 | lp64 )
891                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
892                         ;;
893                 *)
894                         echo "--with-multilib-list=${aarch64_multilib} not supported."
895                         exit 1
896                 esac
897         done
898         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
899         ;;
900 aarch64*-*-linux*)
901         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
902         tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
903         tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
904         case $target in
905         aarch64_be-*)
906                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
907                 ;;
908         esac
909         aarch64_multilibs="${with_multilib_list}"
910         if test "$aarch64_multilibs" = "default"; then
911                 # TODO: turn on ILP32 multilib build after its support is mature.
912                 # aarch64_multilibs="lp64,ilp32"
913                 aarch64_multilibs="lp64"
914         fi
915         aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
916         for aarch64_multilib in ${aarch64_multilibs}; do
917                 case ${aarch64_multilib} in
918                 ilp32 | lp64 )
919                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${aarch64_multilib}"
920                         ;;
921                 *)
922                         echo "--with-multilib-list=${aarch64_multilib} not supported."
923                         exit 1
924                 esac
925         done
926         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
927         ;;
928 alpha*-*-linux*)
929         tm_file="elfos.h ${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
930         tmake_file="${tmake_file} alpha/t-linux"
931         extra_options="${extra_options} alpha/elf.opt"
932         ;;
933 alpha*-*-freebsd*)
934         tm_file="elfos.h ${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
935         extra_options="${extra_options} alpha/elf.opt"
936         ;;
937 alpha*-*-netbsd*)
938         tm_file="elfos.h ${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
939         extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
940                        alpha/elf.opt"
941         ;;
942 alpha*-*-openbsd*)
943         tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
944         tm_file="elfos.h alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
945         extra_options="${extra_options} openbsd.opt alpha/elf.opt"
946         # default x-alpha is only appropriate for dec-osf.
947         ;;
948 alpha*-dec-*vms*)
949         tm_file="${tm_file} vms/vms.h alpha/vms.h"
950         tmake_file="${tmake_file} alpha/t-vms"
951         ;;
952 arc*-*-elf*)
953         extra_headers="arc-simd.h"
954         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
955         tmake_file="arc/t-arc-newlib arc/t-arc"
956         case x"${with_cpu}" in
957           xarc600|xarc601|xarc700)
958                 target_cpu_default="TARGET_CPU_$with_cpu"
959                 ;;
960         esac
961         if test x${with_endian} = x; then
962                 case ${target} in
963                 arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
964                 *)                              with_endian=little ;;
965                 esac
966         fi
967         case ${with_endian} in
968         big|little)             ;;
969         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
970         esac
971         case ${with_endian} in
972         big*)   tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\" ${tm_defines}"
973         esac
974         ;;
975 arc*-*-linux-uclibc*)
976         extra_headers="arc-simd.h"
977         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file}"
978         tmake_file="${tmake_file} arc/t-arc-uClibc arc/t-arc"
979         tm_defines="${tm_defines} TARGET_SDATA_DEFAULT=0"
980         tm_defines="${tm_defines} TARGET_MMEDIUM_CALLS_DEFAULT=1"
981         case x"${with_cpu}" in
982           xarc600|xarc601|xarc700)
983                 target_cpu_default="TARGET_CPU_$with_cpu"
984                 ;;
985         esac
986         if test x${with_endian} = x; then
987                 case ${target} in
988                 arc*be-*-* | arc*eb-*-*)        with_endian=big ;;
989                 *)                              with_endian=little ;;
990                 esac
991         fi
992         case ${with_endian} in
993         big|little)             ;;
994         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
995         esac
996         case ${with_endian} in
997         big*)   tm_defines="DRIVER_ENDIAN_SELF_SPECS=\\\"%{!EL:%{!mlittle-endian:-mbig-endian}}\\\" ${tm_defines}"
998         esac
999         ;;
1000 arm-wrs-vxworks)
1001         tm_file="elfos.h arm/elf.h arm/aout.h ${tm_file} vx-common.h vxworks.h arm/vxworks.h"
1002         extra_options="${extra_options} arm/vxworks.opt"
1003         tmake_file="${tmake_file} arm/t-arm arm/t-vxworks"
1004         ;;
1005 arm*-*-netbsdelf*)
1006         tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h ${tm_file} arm/netbsd-elf.h"
1007         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1008         tmake_file="${tmake_file} arm/t-arm"
1009         ;;
1010 arm*-*-linux-*)                 # ARM GNU/Linux with ELF
1011         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"
1012         extra_options="${extra_options} linux-android.opt"
1013         case $target in
1014         arm*b-*-linux*)
1015             tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1016             ;;
1017         esac
1018         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
1019         tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h arm/aout.h arm/arm.h"
1020         # Define multilib configuration for arm-linux-androideabi.
1021         case ${target} in
1022         *-androideabi)
1023             tmake_file="$tmake_file arm/t-linux-androideabi"
1024             ;;
1025         esac
1026         # The EABI requires the use of __cxa_atexit.
1027         default_use_cxa_atexit=yes
1028         with_tls=${with_tls:-gnu}
1029         ;;
1030 arm*-*-uclinux*eabi*)           # ARM ucLinux
1031         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h glibc-stdint.h"
1032         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf arm/t-bpabi"
1033         tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h arm/aout.h vxworks-dummy.h arm/arm.h"
1034         # The EABI requires the use of __cxa_atexit.
1035         default_use_cxa_atexit=yes
1036         ;;
1037 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
1038         case ${target} in
1039         arm*eb-*-eabi*)
1040           tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
1041         esac
1042         default_use_cxa_atexit=yes
1043         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
1044         tmake_file="${tmake_file} arm/t-arm arm/t-arm-elf"
1045         case ${target} in
1046         arm*-*-eabi*)
1047           tm_file="$tm_file newlib-stdint.h"
1048           tmake_file="${tmake_file} arm/t-bpabi"
1049           use_gcc_stdint=wrap
1050           ;;
1051         arm*-*-rtems*)
1052           tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
1053           tmake_file="${tmake_file} arm/t-bpabi arm/t-rtems-eabi"
1054           ;;
1055         arm*-*-symbianelf*)
1056           tm_file="${tm_file} arm/symbian.h"
1057           # We do not include t-bpabi for Symbian OS because the system
1058           # provides its own implementation of the BPABI functions.
1059           tmake_file="${tmake_file} arm/t-symbian"
1060           ;;
1061         esac
1062         tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h"
1063         ;;
1064 avr-*-rtems*)
1065         tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
1066         tmake_file="${tmake_file} avr/t-avr avr/t-multilib avr/t-rtems"
1067         extra_gcc_objs="driver-avr.o avr-devices.o"
1068         extra_objs="avr-devices.o avr-log.o"
1069         ;;
1070 avr-*-*)
1071         tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/avr-stdint.h"
1072         if test x${with_avrlibc} != xno; then
1073             tm_file="${tm_file} ${cpu_type}/avrlibc.h"
1074             tm_defines="${tm_defines} WITH_AVRLIBC"
1075         fi
1076         tmake_file="${tmake_file} avr/t-avr avr/t-multilib"
1077         use_gcc_stdint=wrap
1078         extra_gcc_objs="driver-avr.o avr-devices.o"
1079         extra_objs="avr-devices.o avr-log.o"
1080         ;;
1081 bfin*-elf*)
1082         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1083         tmake_file=bfin/t-bfin-elf
1084         use_collect2=no
1085         ;;
1086 bfin*-uclinux*)
1087         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h"
1088         tmake_file=bfin/t-bfin-uclinux
1089         use_collect2=no
1090         ;;
1091 bfin*-linux-uclibc*)
1092         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"
1093         tmake_file="bfin/t-bfin-linux t-slibgcc t-linux"
1094         use_collect2=no
1095         ;;
1096 bfin*-rtems*)
1097         tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h bfin/rtems.h rtems.h newlib-stdint.h"
1098         tmake_file="${tmake_file} bfin/t-rtems"
1099         ;;
1100 bfin*-*)
1101         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h bfin/elf.h"
1102         use_collect2=no
1103         use_gcc_stdint=wrap
1104         ;;
1105 cr16-*-elf)
1106         tm_file="elfos.h ${tm_file}"
1107         tmake_file="${tmake_file} cr16/t-cr16 "
1108         use_collect2=no
1109         ;;
1110 crisv32-*-elf | crisv32-*-none)
1111         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1112         tmake_file="cris/t-cris"
1113         target_cpu_default=32
1114         gas=yes
1115         extra_options="${extra_options} cris/elf.opt"
1116         use_gcc_stdint=wrap
1117         ;;
1118 cris-*-elf | cris-*-none)
1119         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1120         tmake_file="cris/t-cris cris/t-elfmulti"
1121         gas=yes
1122         extra_options="${extra_options} cris/elf.opt"
1123         use_gcc_stdint=wrap
1124         ;;
1125 crisv32-*-linux* | cris-*-linux*)
1126         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h"
1127         # We need to avoid using t-linux, so override default tmake_file
1128         tmake_file="cris/t-cris cris/t-linux t-slibgcc t-linux"
1129         extra_options="${extra_options} cris/linux.opt"
1130         case $target in
1131           cris-*-*)
1132                 target_cpu_default=10
1133                 ;;
1134           crisv32-*-*)
1135                 target_cpu_default=32
1136                 ;;
1137         esac
1138         ;;
1139 epiphany-*-elf )
1140         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1141         tmake_file="epiphany/t-epiphany"
1142         extra_options="${extra_options} fused-madd.opt"
1143         extra_objs="$extra_objs mode-switch-use.o resolve-sw-modes.o"
1144         tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}"
1145         extra_headers="epiphany_intrinsics.h"
1146         ;;
1147 fr30-*-elf)
1148         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1149         ;;
1150 frv-*-elf)
1151         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1152         tmake_file=frv/t-frv
1153         ;;
1154 frv-*-*linux*)
1155         tm_file="dbxelf.h elfos.h ${tm_file} \
1156                  gnu-user.h linux.h glibc-stdint.h frv/linux.h"
1157         tmake_file="${tmake_file} frv/t-frv frv/t-linux"
1158         ;;
1159 moxie-*-elf)
1160         gas=yes
1161         gnu_ld=yes
1162         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1163         tmake_file="${tmake_file} moxie/t-moxie"
1164         ;;
1165 moxie-*-uclinux*)
1166         gas=yes
1167         gnu_ld=yes
1168         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h"
1169         tmake_file="${tmake_file} moxie/t-moxie"
1170         ;;
1171 moxie-*-rtems*)
1172         tmake_file="${tmake_file} moxie/t-moxie"
1173         tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h"
1174         ;;
1175 h8300-*-rtems*)
1176         tmake_file="${tmake_file} h8300/t-h8300 h8300/t-rtems"
1177         tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
1178         ;;
1179 h8300-*-elf*)
1180         tmake_file="h8300/t-h8300"
1181         tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
1182         ;;
1183 hppa*64*-*-linux*)
1184         target_cpu_default="MASK_PA_11|MASK_PA_20"
1185         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \
1186                  glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \
1187                  pa/pa64-linux.h"
1188         gas=yes gnu_ld=yes
1189         need_64bit_hwint=yes
1190         ;;
1191 hppa*-*-linux*)
1192         target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS"
1193         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
1194                  pa/pa32-regs.h pa/pa32-linux.h"
1195         tmake_file="${tmake_file} pa/t-linux"
1196         ;;
1197 hppa*-*-openbsd*)
1198         target_cpu_default="MASK_PA_11"
1199         tm_file="${tm_file} dbxelf.h elfos.h openbsd.h openbsd-stdint.h openbsd-libpthread.h \
1200                  pa/pa-openbsd.h pa/pa32-regs.h pa/pa32-openbsd.h"
1201         extra_options="${extra_options} openbsd.opt"
1202         gas=yes
1203         gnu_ld=yes
1204         ;;
1205 hppa[12]*-*-hpux10*)
1206         case ${target} in
1207         hppa1.1-*-* | hppa2*-*-*)
1208                 target_cpu_default="MASK_PA_11"
1209                 ;;
1210         esac
1211         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1212                  pa/pa-hpux.h pa/pa-hpux10.h"
1213         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt"
1214         case ${target} in
1215         *-*-hpux10.[1-9]*)
1216                 tm_file="${tm_file} pa/pa-hpux1010.h"
1217                 extra_options="${extra_options} pa/pa-hpux1010.opt"
1218                 ;;
1219         esac
1220         use_gcc_stdint=provide
1221         tm_file="${tm_file} hpux-stdint.h"
1222         tmake_file="t-slibgcc"
1223         case ${enable_threads} in
1224           "")
1225             if test x$have_pthread_h = xyes ; then
1226               tmake_file="${tmake_file} pa/t-dce-thr"
1227             fi
1228             ;;
1229           yes | dce)
1230             tmake_file="${tmake_file} pa/t-dce-thr"
1231             ;;
1232         esac
1233         use_collect2=yes
1234         gas=yes
1235         if test "x$with_dwarf2" != x; then
1236                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1237                 dwarf2=no
1238         fi
1239         ;;
1240 hppa*64*-*-hpux11*)
1241         target_cpu_default="MASK_PA_11|MASK_PA_20"
1242         if test x$gnu_ld = xyes
1243         then
1244                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1245         fi
1246         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h \
1247                  pa/pa64-regs.h pa/pa-hpux.h pa/pa-hpux1010.h \
1248                  pa/pa-hpux11.h"
1249         case ${target} in
1250         *-*-hpux11.[12]*)
1251                 tm_file="${tm_file} pa/pa-hpux1111.h pa/pa-64.h pa/pa64-hpux.h"
1252                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1253                 ;;
1254         *-*-hpux11.[3-9]*)
1255                 tm_file="${tm_file} pa/pa-hpux1131.h pa/pa-64.h pa/pa64-hpux.h"
1256                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1257                 ;;
1258         *)
1259                 tm_file="${tm_file} pa/pa-64.h pa/pa64-hpux.h"
1260                 ;;
1261         esac
1262         extra_options="${extra_options} pa/pa-hpux.opt \
1263                        pa/pa-hpux1010.opt pa/pa64-hpux.opt hpux11.opt"
1264         need_64bit_hwint=yes
1265         tmake_file="t-slibgcc"
1266         case x${enable_threads} in
1267         x | xyes | xposix )
1268                 thread_file=posix
1269                 ;;
1270         esac
1271         gas=yes
1272         case ${target} in
1273           *-*-hpux11.[01]*)
1274                 use_gcc_stdint=provide
1275                 tm_file="${tm_file} hpux-stdint.h"
1276                 ;;
1277           *-*-hpux11.[23]*)
1278                 use_gcc_stdint=wrap
1279                 tm_file="${tm_file} hpux-stdint.h"
1280                 ;;
1281         esac
1282         ;;
1283 hppa[12]*-*-hpux11*)
1284         case ${target} in
1285         hppa1.1-*-* | hppa2*-*-*)
1286                 target_cpu_default="MASK_PA_11"
1287                 ;;
1288         esac
1289         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \
1290                  pa/pa-hpux.h pa/pa-hpux1010.h pa/pa-hpux11.h"
1291         extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux1010.opt \
1292                        hpux11.opt"
1293         case ${target} in
1294         *-*-hpux11.[12]*)
1295                 tm_file="${tm_file} pa/pa-hpux1111.h"
1296                 extra_options="${extra_options} pa/pa-hpux1111.opt"
1297                 ;;
1298         *-*-hpux11.[3-9]*)
1299                 tm_file="${tm_file} pa/pa-hpux1131.h"
1300                 extra_options="${extra_options} pa/pa-hpux1131.opt"
1301                 ;;
1302         esac
1303         tmake_file="t-slibgcc"
1304         case x${enable_threads} in
1305         x | xyes | xposix )
1306                 thread_file=posix
1307                 ;;
1308         esac
1309         use_collect2=yes
1310         gas=yes
1311         case ${target} in
1312           *-*-hpux11.[01]*)
1313                 use_gcc_stdint=provide
1314                 tm_file="${tm_file} hpux-stdint.h"
1315                 ;;
1316           *-*-hpux11.[23]*)
1317                 use_gcc_stdint=wrap
1318                 tm_file="${tm_file} hpux-stdint.h"
1319                 ;;
1320         esac
1321         if test "x$with_dwarf2" != x; then
1322                 echo "Warning: dwarf2 debug format is not supported for this target, --with-dwarf2 ignored" 1>&2
1323                 dwarf2=no
1324         fi
1325         ;;
1326 i[34567]86-*-darwin*)
1327         need_64bit_isa=yes
1328         # Baseline choice for a machine that allows m64 support.
1329         with_cpu=${with_cpu:-core2}
1330         tmake_file="${tmake_file} t-slibgcc"
1331         ;;
1332 x86_64-*-darwin*)
1333         with_cpu=${with_cpu:-core2}
1334         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
1335         tm_file="${tm_file} ${cpu_type}/darwin64.h"
1336         ;;
1337 i[34567]86-*-elf*)
1338         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1339         ;;
1340 x86_64-*-elf*)
1341         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h"
1342         ;;
1343 i[34567]86-*-rdos*)
1344     tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/rdos.h"
1345     ;;
1346 x86_64-*-rdos*)
1347     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"
1348     tmake_file="i386/t-i386elf t-svr4"
1349     ;;
1350 i[34567]86-*-freebsd*)
1351         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
1352         ;;
1353 x86_64-*-freebsd*)
1354         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"
1355         ;;
1356 i[34567]86-*-netbsdelf*)
1357         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
1358         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1359         ;;
1360 x86_64-*-netbsd*)
1361         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"
1362         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1363         ;;
1364 i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123])
1365         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"
1366         extra_options="${extra_options} openbsd.opt"
1367         # needed to unconfuse gdb
1368         tmake_file="${tmake_file} t-openbsd i386/t-openbsd"
1369         # we need collect2 until our bug is fixed...
1370         use_collect2=yes
1371         ;;
1372 i[34567]86-*-openbsd*)
1373         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1374         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/openbsdelf.h"
1375         extra_options="${extra_options} openbsd.opt"
1376         gas=yes
1377         gnu_ld=yes
1378         ;;
1379 x86_64-*-openbsd*)
1380         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h"
1381         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h i386/x86-64.h i386/openbsdelf.h"
1382         extra_options="${extra_options} openbsd.opt"
1383         gas=yes
1384         gnu_ld=yes
1385         ;;
1386 i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu)
1387                         # Intel 80386's running GNU/*
1388                         # with ELF format using glibc 2
1389         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h"
1390         case ${target} in
1391         i[34567]86-*-linux*)
1392                 tm_file="${tm_file} linux.h linux-android.h"
1393                 extra_options="${extra_options} linux-android.opt"
1394                 # Assume modern glibc
1395                 default_gnu_indirect_function=yes
1396                 if test x$enable_targets = xall; then
1397                         tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
1398                         tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1399                         tmake_file="${tmake_file} i386/t-linux64"
1400                         x86_multilibs="${with_multilib_list}"
1401                         if test "$x86_multilibs" = "default"; then
1402                                 x86_multilibs="m64,m32"
1403                         fi
1404                         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1405                         for x86_multilib in ${x86_multilibs}; do
1406                                 case ${x86_multilib} in
1407                                 m32 | m64 | mx32)
1408                                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1409                                         ;;
1410                                 *)
1411                                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1412                                         exit 1
1413                                 esac
1414                         done
1415                         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1416                         need_64bit_isa=yes
1417                         if test x$with_cpu = x; then
1418                                 if test x$with_cpu_64 = x; then
1419                                         with_cpu_64=generic
1420                                 fi
1421                         else
1422                                 case " $x86_cpus $x86_archs $x86_64_archs " in
1423                                 *" $with_cpu "*)
1424                                         ;;
1425                                 *)
1426                                         echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1427                                         echo "$x86_cpus $x86_archs $x86_64_archs " 1>&2
1428                                         exit 1
1429                                         ;;
1430                                 esac
1431                         fi
1432                 else
1433                         tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h i386/linux-common.h i386/linux.h"
1434                 fi
1435                 ;;
1436         i[34567]86-*-knetbsd*-gnu)
1437                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h knetbsd-gnu.h i386/knetbsd-gnu.h"
1438                 ;;
1439         i[34567]86-*-kfreebsd*-gnu)
1440                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kfreebsd-gnu.h i386/kfreebsd-gnu.h"
1441                 ;;
1442         i[34567]86-*-kopensolaris*-gnu)
1443                 tm_file="${tm_file} i386/gnu-user-common.h i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h"
1444                 ;;
1445         i[34567]86-*-gnu*)
1446                 tm_file="$tm_file i386/gnu-user-common.h i386/gnu-user.h gnu.h i386/gnu.h"
1447                 ;;
1448         esac
1449         ;;
1450 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
1451         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
1452                  i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
1453         case ${target} in
1454         x86_64-*-linux*)
1455                 tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
1456                 extra_options="${extra_options} linux-android.opt"
1457                 # Assume modern glibc
1458                 default_gnu_indirect_function=yes
1459                 ;;
1460         x86_64-*-kfreebsd*-gnu)
1461                 tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"
1462                 ;;
1463         x86_64-*-knetbsd*-gnu)
1464                 tm_file="${tm_file} knetbsd-gnu.h"
1465                 ;;
1466         esac
1467         tmake_file="${tmake_file} i386/t-linux64"
1468         x86_multilibs="${with_multilib_list}"
1469         if test "$x86_multilibs" = "default"; then
1470                 case ${with_abi} in
1471                 x32 | mx32)
1472                         x86_multilibs="mx32"
1473                         ;;
1474                 *)
1475                         x86_multilibs="m64,m32"
1476                         ;;
1477                 esac
1478         fi
1479         x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
1480         for x86_multilib in ${x86_multilibs}; do
1481                 case ${x86_multilib} in
1482                 m32 | m64 | mx32)
1483                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG},${x86_multilib}"
1484                         ;;
1485                 *)
1486                         echo "--with-multilib-list=${x86_with_multilib} not supported."
1487                         exit 1
1488                 esac
1489         done
1490         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
1491         ;;
1492 i[34567]86-pc-msdosdjgpp*)
1493         xm_file=i386/xm-djgpp.h
1494         tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
1495         native_system_header_dir=/dev/env/DJDIR/include
1496         extra_options="${extra_options} i386/djgpp.opt"
1497         gnu_ld=yes
1498         gas=yes
1499         use_gcc_stdint=wrap
1500         ;;
1501 i[34567]86-*-lynxos*)
1502         xm_defines=POSIX
1503         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/lynx.h lynx.h"
1504         tmake_file="${tmake_file} t-lynx"
1505         extra_options="${extra_options} lynx.opt"
1506         thread_file=lynx
1507         gnu_ld=yes
1508         gas=yes
1509         ;;
1510 i[34567]86-*-nto-qnx*)
1511         tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h"
1512         extra_options="${extra_options} i386/nto.opt"
1513         gnu_ld=yes
1514         gas=yes
1515         ;;
1516 i[34567]86-*-rtems*)
1517         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"
1518         tmake_file="${tmake_file} i386/t-rtems"
1519         ;;
1520 i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
1521         # Set default arch_32 to pentium4, tune_32 to generic like the other
1522         # i386 targets, although config.guess defaults to i386-pc-solaris2*.
1523         with_arch_32=${with_arch_32:-pentium4}
1524         with_tune_32=${with_tune_32:-generic}
1525         tm_file="${tm_file} i386/unix.h i386/att.h ${sol2_tm_file_head} i386/x86-64.h ${sol2_tm_file_tail}"
1526         tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1527         tmake_file="$tmake_file i386/t-sol2"
1528         need_64bit_isa=yes
1529         if test x$with_cpu = x; then
1530                 if test x$with_cpu_64 = x; then
1531                         with_cpu_64=generic
1532                 fi
1533         else
1534                 case " $x86_cpus $x86_archs $x86_64_archs " in
1535                 *" $with_cpu "*)
1536                         ;;
1537                 *)
1538                         echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1539                         echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1540                         exit 1
1541                         ;;
1542                 esac
1543         fi
1544         ;;
1545 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
1546         tm_file="${tm_file} i386/unix.h i386/att.h elfos.h vx-common.h"
1547         case ${target} in
1548           *-vxworksae*)
1549             tm_file="${tm_file} vxworksae.h i386/vx-common.h i386/vxworksae.h"
1550             tmake_file="${tmake_file} i386/t-vxworks i386/t-vxworksae"
1551             ;;
1552           *)
1553             tm_file="${tm_file} vxworks.h i386/vx-common.h i386/vxworks.h"
1554             tmake_file="${tmake_file} i386/t-vxworks"
1555             ;;
1556         esac
1557         ;;
1558 i[34567]86-*-cygwin*)
1559         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"
1560         xm_file=i386/xm-cygwin.h
1561         tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
1562         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1563         extra_options="${extra_options} i386/cygming.opt"
1564         extra_objs="winnt.o winnt-stubs.o"
1565         c_target_objs="${c_target_objs} msformat-c.o"
1566         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1567         if test x$enable_threads = xyes; then
1568                 thread_file='posix'
1569         fi
1570         use_gcc_stdint=wrap
1571         ;;
1572 x86_64-*-cygwin*)
1573         need_64bit_isa=yes
1574         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"
1575         xm_file=i386/xm-cygwin.h
1576         tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
1577         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1578         extra_options="${extra_options} i386/cygming.opt"
1579         extra_objs="winnt.o winnt-stubs.o"
1580         c_target_objs="${c_target_objs} msformat-c.o"
1581         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1582         if test x$enable_threads = xyes; then
1583                 thread_file='posix'
1584         fi
1585         use_gcc_stdint=wrap
1586         tm_defines="${tm_defines} TARGET_CYGWIN64=1"
1587         ;;
1588 i[34567]86-*-mingw* | x86_64-*-mingw*)
1589         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
1590         xm_file=i386/xm-mingw32.h
1591         c_target_objs="${c_target_objs} winnt-c.o"
1592         cxx_target_objs="${cxx_target_objs} winnt-c.o"
1593         target_has_targetcm="yes"
1594         case ${target} in
1595                 x86_64-*-* | *-w64-*)
1596                         need_64bit_isa=yes
1597                         ;;
1598                 *)
1599                         ;;
1600         esac
1601         if test x$enable_threads = xposix ; then
1602                 tm_file="${tm_file} i386/mingw-pthread.h"
1603         fi
1604         tm_file="${tm_file} i386/mingw32.h"
1605         # This makes the logic if mingw's or the w64 feature set has to be used
1606         case ${target} in
1607                 *-w64-*)
1608                         user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
1609                         user_headers_inc_next_pre="${user_headers_inc_next_pre} stddef.h stdarg.h"
1610                         tm_file="${tm_file} i386/mingw-w64.h"
1611                         if test x$enable_targets = xall; then
1612                                 tm_defines="${tm_defines} TARGET_BI_ARCH=1"
1613                                 if test x$with_cpu = x; then
1614                                         if test x$with_cpu_64 = x; then
1615                                                 with_cpu_64=generic
1616                                         fi
1617                                 else
1618                                         case " $x86_cpus $x86_archs $x86_64_archs " in
1619                                         *" $with_cpu "*)
1620                                                 ;;
1621                                         *)
1622                                                 echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
1623                                                 echo "$x86_cpus $x86_archs $x86_64_archs" 1>&2
1624                                                 exit 1
1625                                                 ;;
1626                                         esac
1627                                 fi
1628                         fi
1629                         ;;
1630                 *)
1631                         ;;
1632         esac
1633         tm_file="${tm_file} i386/mingw-stdint.h"
1634         tmake_file="${tmake_file} t-winnt i386/t-cygming t-slibgcc"
1635         case ${target} in
1636                x86_64-w64-*)
1637                         tmake_file="${tmake_file} i386/t-mingw-w64"
1638                         ;;
1639                i[34567]86-w64-*)
1640                         tmake_file="${tmake_file} i386/t-mingw-w32"
1641                         ;;
1642         esac
1643         native_system_header_dir=/mingw/include
1644         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1645         extra_options="${extra_options} i386/cygming.opt i386/mingw.opt"
1646         case ${target} in
1647                 *-w64-*)
1648                         extra_options="${extra_options} i386/mingw-w64.opt"
1649                         ;;
1650                 *)
1651                         ;;
1652         esac
1653         extra_objs="winnt.o winnt-stubs.o"
1654         c_target_objs="${c_target_objs} msformat-c.o"
1655         cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
1656         gas=yes
1657         gnu_ld=yes
1658         default_use_cxa_atexit=yes
1659         use_gcc_stdint=wrap
1660         case ${enable_threads} in
1661           "" | yes | win32)
1662             thread_file='win32'
1663             ;;
1664           posix)
1665             thread_file='posix'
1666             ;;
1667         esac
1668         case ${target} in
1669                 *mingw32crt*)
1670                         tm_file="${tm_file} i386/crtdll.h"
1671                         ;;
1672                 *mingw32msv* | *mingw*)
1673                         ;;
1674         esac
1675         ;;
1676 i[34567]86-*-interix[3-9]*)
1677         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h"
1678         tmake_file="${tmake_file} i386/t-interix"
1679         extra_options="${extra_options} rpath.opt i386/interix.opt"
1680         extra_objs="winnt.o winnt-stubs.o"
1681         target_gtfiles="\$(srcdir)/config/i386/winnt.c"
1682         if test x$enable_threads = xyes ; then
1683                 thread_file='posix'
1684         fi
1685         if test x$stabs = xyes ; then
1686                 tm_file="${tm_file} dbxcoff.h"
1687         fi
1688         ;;
1689 ia64*-*-elf*)
1690         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ia64/sysv4.h ia64/elf.h"
1691         tmake_file="ia64/t-ia64"
1692         target_cpu_default="0"
1693         if test x$gas = xyes
1694         then
1695                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1696         fi
1697         if test x$gnu_ld = xyes
1698         then
1699                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1700         fi
1701         ;;
1702 ia64*-*-freebsd*)
1703         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1704         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1705         tmake_file="${tmake_file} ia64/t-ia64"
1706         ;;
1707 ia64*-*-linux*)
1708         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
1709         tmake_file="${tmake_file} ia64/t-ia64 ia64/t-linux t-libunwind"
1710         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1711         ;;
1712 ia64*-*-hpux*)
1713         tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/hpux.h"
1714         tmake_file="ia64/t-ia64 ia64/t-hpux t-slibgcc"
1715         target_cpu_default="MASK_GNU_AS"
1716         case x$enable_threads in
1717         x | xyes | xposix )
1718                 thread_file=posix
1719                 ;;
1720         esac
1721         use_collect2=no
1722         c_target_objs="ia64-c.o"
1723         cxx_target_objs="ia64-c.o"
1724         extra_options="${extra_options} ia64/ilp32.opt hpux11.opt"
1725         use_gcc_stdint=wrap
1726         tm_file="${tm_file} hpux-stdint.h"
1727         case ${target} in
1728         *-*-hpux11.3*)
1729                 tm_file="${tm_file} ia64/hpux-unix2003.h"
1730                 ;;
1731         esac
1732         ;;
1733 ia64-hp-*vms*)
1734         tm_file="${tm_file} elfos.h ia64/sysv4.h vms/vms.h ia64/vms.h"
1735         tmake_file="${tmake_file} ia64/t-ia64"
1736         target_cpu_default="0"
1737         if test x$gas = xyes
1738         then
1739                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1740         fi
1741         extra_options="${extra_options} ia64/vms.opt"
1742         ;;
1743 iq2000*-*-elf*)
1744         tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h"
1745         out_file=iq2000/iq2000.c
1746         md_file=iq2000/iq2000.md
1747         ;;
1748 lm32-*-elf*)
1749         tm_file="dbxelf.h elfos.h ${tm_file}"
1750         tmake_file="${tmake_file} lm32/t-lm32"
1751         ;;
1752 lm32-*-rtems*)
1753         tm_file="dbxelf.h elfos.h ${tm_file} lm32/rtems.h rtems.h newlib-stdint.h"
1754         tmake_file="${tmake_file} lm32/t-lm32"
1755         tmake_file="${tmake_file} lm32/t-rtems"
1756          ;;
1757 lm32-*-uclinux*)
1758         tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h"
1759         tmake_file="${tmake_file} lm32/t-lm32"
1760         ;;
1761 m32r-*-elf*)
1762         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
1763         ;;
1764 m32rle-*-elf*)
1765         tm_file="dbxelf.h elfos.h newlib-stdint.h m32r/little.h ${tm_file}"
1766         ;;
1767 m32r-*-rtems*)
1768         tm_file="dbxelf.h elfos.h ${tm_file} m32r/rtems.h rtems.h newlib-stdint.h"
1769         tmake_file="${tmake_file} m32r/t-m32r"
1770         ;;
1771 m32r-*-linux*)
1772         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h"
1773         tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
1774         gnu_ld=yes
1775         if test x$enable_threads = xyes; then
1776                 thread_file='posix'
1777         fi
1778         ;;
1779 m32rle-*-linux*)
1780         tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h"
1781         tmake_file="${tmake_file} m32r/t-linux t-slibgcc"
1782         gnu_ld=yes
1783         if test x$enable_threads = xyes; then
1784                 thread_file='posix'
1785         fi
1786         ;;
1787 m68k-*-elf* | fido-*-elf*)
1788         case ${target} in
1789         fido-*-elf*)
1790                 # Check that $with_cpu makes sense.
1791                 case $with_cpu in
1792                 "" | "fidoa")
1793                         ;;
1794                 *)
1795                         echo "Cannot accept --with-cpu=$with_cpu"
1796                         exit 1
1797                         ;;
1798                 esac
1799                 with_cpu=fidoa
1800                 ;;
1801         *)
1802                 default_m68k_cpu=68020
1803                 default_cf_cpu=5206
1804                 ;;
1805         esac
1806         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"
1807         tm_defines="${tm_defines} MOTOROLA=1"
1808         tmake_file="m68k/t-floatlib m68k/t-m68kbare m68k/t-m68kelf"
1809         # Add multilibs for targets other than fido.
1810         case ${target} in
1811         fido-*-elf*)
1812                 ;;
1813         *)
1814                 tmake_file="$tmake_file m68k/t-mlibs"
1815                 ;;
1816         esac
1817         ;;
1818 m68k*-*-netbsdelf*)
1819         default_m68k_cpu=68020
1820         default_cf_cpu=5475
1821         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1822         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1823         tm_defines="${tm_defines} MOTOROLA=1"
1824         ;;
1825 m68k*-*-openbsd*)
1826         default_m68k_cpu=68020
1827         default_cf_cpu=5475
1828         # needed to unconfuse gdb
1829         tm_defines="${tm_defines} OBSD_OLD_GAS"
1830         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h m68k/openbsd.h"
1831         extra_options="${extra_options} openbsd.opt"
1832         tmake_file="t-openbsd m68k/t-openbsd"
1833         # we need collect2 until our bug is fixed...
1834         use_collect2=yes
1835         ;;
1836 m68k-*-uclinux*)                # Motorola m68k/ColdFire running uClinux
1837                                 # with uClibc, using the new GNU/Linux-style
1838                                 # ABI.
1839         default_m68k_cpu=68020
1840         default_cf_cpu=5206
1841         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"
1842         extra_options="${extra_options} m68k/uclinux.opt"
1843         tm_defines="${tm_defines} MOTOROLA=1"
1844         tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
1845         ;;
1846 m68k-*-linux*)                  # Motorola m68k's running GNU/Linux
1847                                 # with ELF format using glibc 2
1848                                 # aka the GNU/Linux C library 6.
1849         default_m68k_cpu=68020
1850         default_cf_cpu=5475
1851         with_arch=${with_arch:-m68k}
1852         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h"
1853         extra_options="${extra_options} m68k/ieee.opt"
1854         tm_defines="${tm_defines} MOTOROLA=1"
1855         tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs"
1856         ;;
1857 m68k-*-rtems*)
1858         default_m68k_cpu=68020
1859         default_cf_cpu=5206
1860         tmake_file="${tmake_file} m68k/t-floatlib m68k/t-m68kbare m68k/t-crtstuff m68k/t-rtems m68k/t-mlibs"
1861         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"
1862         tm_defines="${tm_defines} MOTOROLA=1"
1863         ;;
1864 mcore-*-elf)
1865         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h"
1866         tmake_file=mcore/t-mcore
1867         inhibit_libc=true
1868         ;;
1869 mep-*-*)
1870         tm_file="dbxelf.h elfos.h ${tm_file}"
1871         tmake_file=mep/t-mep
1872         c_target_objs="mep-pragma.o"
1873         cxx_target_objs="mep-pragma.o"
1874         if test -d "${srcdir}/../newlib/libc/include" &&
1875            test "x$with_headers" = x; then
1876                 with_headers=yes
1877         fi
1878         use_gcc_stdint=wrap
1879         ;;
1880 microblaze*-linux*)
1881         case $target in
1882                 microblazeel-*)
1883                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1884                         ;;
1885                 microblaze-*)
1886                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1887                         ;;
1888         esac
1889         tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h"
1890         tm_file="${tm_file} glibc-stdint.h"
1891         c_target_objs="${c_target_objs} microblaze-c.o"
1892         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1893         tmake_file="${tmake_file} microblaze/t-microblaze"
1894         tmake_file="${tmake_file} microblaze/t-microblaze-linux"
1895         ;;
1896 microblaze*-*-rtems*)
1897         case $target in
1898                 microblazeel-*)
1899                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1900                         ;;
1901                 microblaze-*)
1902                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1903                         ;;
1904         esac
1905         tm_file="${tm_file} dbxelf.h"
1906         tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h"
1907         c_target_objs="${c_target_objs} microblaze-c.o"
1908         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1909         tmake_file="${tmake_file} microblaze/t-microblaze"
1910         tmake_file="${tmake_file} microblaze/t-rtems"
1911         ;;
1912 microblaze*-*-elf)
1913         case $target in
1914                 microblazeel-*)
1915                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=0"
1916                         ;;
1917                 microblaze-*)
1918                         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=4321"
1919                         ;;
1920         esac
1921         tm_file="${tm_file} dbxelf.h newlib-stdint.h"
1922         c_target_objs="${c_target_objs} microblaze-c.o"
1923         cxx_target_objs="${cxx_target_objs} microblaze-c.o"
1924         tmake_file="${tmake_file} microblaze/t-microblaze"
1925         ;;
1926 mips*-*-netbsd*)                        # NetBSD/mips, either endian.
1927         target_cpu_default="MASK_ABICALLS"
1928         tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h"
1929         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
1930         ;;
1931 mips*-mti-linux*)
1932         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"
1933         extra_options="${extra_options} linux-android.opt"
1934         tmake_file="${tmake_file} mips/t-mti-linux"
1935         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1936         gnu_ld=yes
1937         gas=yes
1938         ;;
1939 mips64*-*-linux* | mipsisa64*-*-linux*)
1940         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"
1941         extra_options="${extra_options} linux-android.opt"
1942         tmake_file="${tmake_file} mips/t-linux64"
1943         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
1944         case ${target} in
1945                 mips64el-st-linux-gnu)
1946                         tm_file="${tm_file} mips/st.h"
1947                         tmake_file="${tmake_file} mips/t-st"
1948                         ;;
1949                 mips64octeon*-*-linux*)
1950                         tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
1951                         target_cpu_default=MASK_SOFT_FLOAT_ABI
1952                         ;;
1953                 mipsisa64r2*-*-linux*)
1954                         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
1955                         ;;
1956         esac
1957         gnu_ld=yes
1958         gas=yes
1959         ;;
1960 mips*-*-linux*)                         # Linux MIPS, either endian.
1961         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"
1962         extra_options="${extra_options} linux-android.opt"
1963         if test x$enable_targets = xall; then
1964                 tm_file="${tm_file} mips/gnu-user64.h mips/linux64.h"
1965                 tmake_file="${tmake_file} mips/t-linux64"
1966         fi
1967         tm_file="${tm_file} mips/linux-common.h"
1968         case ${target} in
1969         mipsisa32r2*)
1970                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
1971                 ;;
1972         mipsisa32*)
1973                 tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
1974         esac
1975         ;;
1976 mips*-mti-elf*)
1977         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
1978         tmake_file="mips/t-mti-elf"
1979         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
1980         ;;
1981 mips*-sde-elf*)
1982         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h"
1983         tmake_file="mips/t-sde"
1984         extra_options="${extra_options} mips/sde.opt"
1985         case "${with_newlib}" in
1986           yes)
1987             # newlib / libgloss.
1988             ;;
1989           *)
1990             # MIPS toolkit libraries.
1991             tm_file="$tm_file mips/sdemtk.h"
1992             tmake_file="$tmake_file mips/t-sdemtk"
1993             case ${enable_threads} in
1994               "" | yes | mipssde)
1995                 thread_file='mipssde'
1996                 ;;
1997             esac
1998             ;;
1999         esac
2000         case ${target} in
2001           mipsisa32r2*)
2002             tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32"
2003             ;;
2004           mipsisa32*)
2005             tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_32"
2006             ;;
2007           mipsisa64r2*)
2008             tm_defines="MIPS_ISA_DEFAULT=65 MIPS_ABI_DEFAULT=ABI_N32"
2009             ;;
2010           mipsisa64*)
2011             tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_N32"
2012             ;;
2013         esac
2014         ;;
2015 mipsisa32-*-elf* | mipsisa32el-*-elf* | \
2016 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf* | \
2017 mipsisa64-*-elf* | mipsisa64el-*-elf* | \
2018 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
2019         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2020         tmake_file="mips/t-isa3264"
2021         case ${target} in
2022           mipsisa32r2*)
2023             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
2024             ;;
2025           mipsisa32*)
2026             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
2027             ;;
2028           mipsisa64r2*)
2029             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65"
2030             ;;
2031           mipsisa64*)
2032             tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64"
2033             ;;
2034         esac
2035         case ${target} in
2036           mipsisa32*-*-elfoabi*)
2037             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_32"
2038             tm_file="${tm_file} mips/elfoabi.h"
2039             ;;
2040           mipsisa64*-*-elfoabi*)
2041             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_O64"
2042             tm_file="${tm_file} mips/elfoabi.h"
2043             ;;
2044           *-*-elf*)
2045             tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2046             ;;
2047         esac
2048         ;;
2049 mipsisa64sr71k-*-elf*)
2050         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2051         tmake_file=mips/t-sr71k
2052         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
2053         ;;
2054 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
2055         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2056         tmake_file="mips/t-elf mips/t-sb1"
2057         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
2058         ;;
2059 mips-*-elf* | mipsel-*-elf* | mipsr5900-*-elf* | mipsr5900el-*-elf*)
2060         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2061         tmake_file="mips/t-elf"
2062         ;;
2063 mips64r5900-*-elf* | mips64r5900el-*-elf*)
2064         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h"
2065         tmake_file="mips/t-elf"
2066         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
2067         ;;
2068 mips64-*-elf* | mips64el-*-elf*)
2069         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h"
2070         tmake_file="mips/t-elf"
2071         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2072         ;;
2073 mips64vr-*-elf* | mips64vrel-*-elf*)
2074         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/vr.h mips/elf.h"
2075         tmake_file=mips/t-vr
2076         tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_EABI"
2077         ;;
2078 mips64orion-*-elf* | mips64orionel-*-elf*)
2079         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elforion.h mips/elf.h"
2080         tmake_file="mips/t-elf"
2081         tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
2082         ;;
2083 mips*-*-rtems*)
2084         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/rtems.h rtems.h"
2085         tmake_file="${tmake_file} mips/t-elf mips/t-rtems"
2086         ;;
2087 mips-wrs-vxworks)
2088         tm_file="elfos.h ${tm_file} mips/elf.h vx-common.h vxworks.h mips/vxworks.h"
2089         tmake_file="${tmake_file} mips/t-vxworks"
2090         ;;
2091 mipstx39-*-elf* | mipstx39el-*-elf*)
2092         tm_file="elfos.h newlib-stdint.h ${tm_file} mips/r3900.h mips/elf.h"
2093         tmake_file="mips/t-r3900"
2094         ;;
2095 mmix-knuth-mmixware)
2096         tm_file="${tm_file} newlib-stdint.h"
2097         need_64bit_hwint=yes
2098         use_gcc_stdint=wrap
2099         ;;
2100 mn10300-*-*)
2101         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2102         if test x$stabs = xyes
2103         then
2104                 tm_file="${tm_file} dbx.h"
2105         fi
2106         use_collect2=no
2107         use_gcc_stdint=wrap
2108         ;;
2109 msp430*-*-*)
2110         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2111         c_target_objs="msp430-c.o"
2112         cxx_target_objs="msp430-c.o"
2113         tmake_file="${tmake_file} msp430/t-msp430"
2114         ;;
2115 nds32le-*-*)
2116         target_cpu_default="0"
2117         tm_defines="${tm_defines}"
2118         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2119         tmake_file="nds32/t-mlibs"
2120         ;;
2121 nds32be-*-*)
2122         target_cpu_default="0|MASK_BIG_ENDIAN"
2123         tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2124         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2125         tmake_file="nds32/t-mlibs"
2126         ;;
2127 nios2-*-*)
2128         tm_file="elfos.h ${tm_file}"
2129         tmake_file="${tmake_file} nios2/t-nios2"
2130         case ${target} in
2131         nios2-*-linux*)
2132                 tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h nios2/linux.h "
2133                 ;;
2134         nios2-*-elf*)
2135                 tm_file="${tm_file} newlib-stdint.h nios2/elf.h"
2136                 extra_options="${extra_options} nios2/elf.opt"
2137                 ;;
2138         esac
2139         ;;
2140 pdp11-*-*)
2141         tm_file="${tm_file} newlib-stdint.h"
2142         use_gcc_stdint=wrap
2143         ;;
2144 picochip-*)
2145         tm_file="${tm_file} newlib-stdint.h"
2146         use_gcc_stdint=wrap
2147         tmake_file="picochip/t-picochip t-pnt16-warn"
2148         ;;
2149 # port not yet contributed
2150 #powerpc-*-openbsd*)
2151 #       tmake_file="${tmake_file} rs6000/t-fprules"
2152 #       extra_headers=
2153 #       ;;
2154 powerpc-*-darwin*)
2155         extra_options="${extra_options} rs6000/darwin.opt"
2156         case ${target} in
2157           *-darwin1[0-9]* | *-darwin[8-9]*)
2158             tmake_file="${tmake_file} rs6000/t-darwin8"
2159             tm_file="${tm_file} rs6000/darwin8.h"
2160             ;;
2161           *-darwin7*)
2162             tm_file="${tm_file} rs6000/darwin7.h"
2163             ;;
2164           *-darwin[0-6]*)
2165             ;;
2166         esac
2167         tmake_file="${tmake_file} t-slibgcc"
2168         extra_headers=altivec.h
2169         ;;
2170 powerpc64-*-darwin*)
2171         extra_options="${extra_options} ${cpu_type}/darwin.opt"
2172         tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc"
2173         tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
2174         extra_headers=altivec.h
2175         ;;
2176 powerpc*-*-freebsd*)
2177         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h"
2178         extra_options="${extra_options} rs6000/sysv4.opt"
2179         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2180         case ${target} in
2181              powerpc64*)
2182                 tm_file="${tm_file} rs6000/default64.h rs6000/freebsd64.h"
2183                 tmake_file="${tmake_file} rs6000/t-freebsd64"
2184                 extra_options="${extra_options} rs6000/linux64.opt"
2185                 ;;
2186              *)
2187                 tm_file="${tm_file} rs6000/freebsd.h"
2188                 ;;
2189         esac
2190         ;;
2191 powerpc-*-netbsd*)
2192         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
2193         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2194         tmake_file="${tmake_file} rs6000/t-netbsd"
2195         extra_options="${extra_options} rs6000/sysv4.opt"
2196         ;;
2197 powerpc-*-eabispe*)
2198         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"
2199         extra_options="${extra_options} rs6000/sysv4.opt"
2200         tmake_file="rs6000/t-spe rs6000/t-ppccomm"
2201         use_gcc_stdint=wrap
2202         ;;
2203 powerpc-*-eabisimaltivec*)
2204         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"
2205         extra_options="${extra_options} rs6000/sysv4.opt"
2206         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2207         use_gcc_stdint=wrap
2208         ;;
2209 powerpc-*-eabisim*)
2210         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"
2211         extra_options="${extra_options} rs6000/sysv4.opt"
2212         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2213         use_gcc_stdint=wrap
2214         ;;
2215 powerpc-*-elf*)
2216         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
2217         extra_options="${extra_options} rs6000/sysv4.opt"
2218         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2219         ;;
2220 powerpc-*-eabialtivec*)
2221         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"
2222         extra_options="${extra_options} rs6000/sysv4.opt"
2223         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
2224         use_gcc_stdint=wrap
2225         ;;
2226 powerpc-xilinx-eabi*)
2227         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"
2228         extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
2229         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
2230         use_gcc_stdint=wrap
2231         ;;
2232 powerpc-*-eabi*)
2233         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"
2234         extra_options="${extra_options} rs6000/sysv4.opt"
2235         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2236         use_gcc_stdint=wrap
2237         ;;
2238 powerpc-*-rtems*)
2239         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"
2240         extra_options="${extra_options} rs6000/sysv4.opt"
2241         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
2242         ;;
2243 powerpc*-*-linux*)
2244         tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
2245         extra_options="${extra_options} rs6000/sysv4.opt"
2246         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
2247         extra_objs="$extra_objs rs6000-linux.o"
2248         case ${target} in
2249             powerpc*le-*-*)
2250                 tm_file="${tm_file} rs6000/sysv4le.h" ;;
2251         esac
2252         maybe_biarch=yes
2253         case ${target} in
2254             powerpc64*-*-linux*spe* | powerpc64*-*-linux*paired*)
2255                 echo "*** Configuration ${target} not supported" 1>&2
2256                 exit 1
2257                 ;;
2258             powerpc*-*-linux*spe* | powerpc*-*-linux*paired*)
2259                 maybe_biarch=
2260                 ;;
2261             powerpc64*-*-linux*)
2262                 test x$with_cpu != x || cpu_is_64bit=yes
2263                 maybe_biarch=always
2264                 ;;
2265         esac
2266         case ${maybe_biarch}:${enable_targets}:${cpu_is_64bit} in
2267             always:* | yes:*powerpc64* | yes:all:* | yes:*:yes)
2268                 if test x$cpu_is_64bit = xyes; then
2269                     tm_file="${tm_file} rs6000/default64.h"
2270                 fi
2271                 tm_file="rs6000/biarch64.h ${tm_file} rs6000/linux64.h glibc-stdint.h"
2272                 tmake_file="$tmake_file rs6000/t-linux64"
2273                 case ${target} in
2274                     powerpc*le-*-*)
2275                         tmake_file="$tmake_file rs6000/t-linux64le"
2276                         case ${enable_targets} in
2277                             all | *powerpc64-* | *powerpc-*)
2278                                 tmake_file="$tmake_file rs6000/t-linux64lebe" ;;
2279                         esac ;;
2280                     *)
2281                         case ${enable_targets} in
2282                             all | *powerpc64le-* | *powerpcle-*)
2283                                 tmake_file="$tmake_file rs6000/t-linux64bele" ;;
2284                         esac ;;
2285                 esac
2286                 extra_options="${extra_options} rs6000/linux64.opt"
2287                 ;;
2288             *)
2289                 tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
2290                 tmake_file="$tmake_file rs6000/t-linux"
2291                 ;;
2292         esac
2293         case ${target} in
2294             powerpc*-*-linux*ppc476*)
2295                 tm_file="${tm_file} rs6000/476.h"
2296                 extra_options="${extra_options} rs6000/476.opt" ;;
2297             powerpc*-*-linux*altivec*)
2298                 tm_file="${tm_file} rs6000/linuxaltivec.h" ;;
2299             powerpc*-*-linux*spe*)
2300                 tm_file="${tm_file} rs6000/linuxspe.h rs6000/e500.h" ;;
2301             powerpc*-*-linux*paired*)
2302                 tm_file="${tm_file} rs6000/750cl.h" ;;
2303         esac
2304         if test x${enable_secureplt} = xyes; then
2305                 tm_file="rs6000/secureplt.h ${tm_file}"
2306         fi
2307         ;;
2308 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
2309         tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
2310         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
2311         extra_options="${extra_options} rs6000/sysv4.opt"
2312         extra_headers=ppc-asm.h
2313         case ${target} in
2314           *-vxworksae*)
2315             tm_file="${tm_file} vx-common.h vxworksae.h rs6000/vxworks.h rs6000/e500.h"
2316             tmake_file="${tmake_file} rs6000/t-vxworksae"
2317             ;;
2318           *-vxworks*)
2319             tm_file="${tm_file} vx-common.h vxworks.h rs6000/vxworks.h rs6000/e500.h"
2320             ;;
2321         esac
2322         ;;
2323 powerpc-*-lynxos*)
2324         xm_defines=POSIX
2325         tm_file="${tm_file} dbxelf.h elfos.h rs6000/sysv4.h rs6000/lynx.h lynx.h"
2326         tmake_file="t-lynx rs6000/t-lynx"
2327         extra_options="${extra_options} rs6000/sysv4.opt lynx.opt"
2328         thread_file=lynx
2329         gnu_ld=yes
2330         gas=yes
2331         ;;
2332 powerpcle-*-elf*)
2333         tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
2334         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2335         extra_options="${extra_options} rs6000/sysv4.opt"
2336         ;;
2337 powerpcle-*-eabisim*)
2338         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"
2339         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2340         extra_options="${extra_options} rs6000/sysv4.opt"
2341         use_gcc_stdint=wrap
2342         ;;
2343 powerpcle-*-eabi*)
2344         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"
2345         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
2346         extra_options="${extra_options} rs6000/sysv4.opt"
2347         use_gcc_stdint=wrap
2348         ;;
2349 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
2350         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h rs6000/aix-stdint.h"
2351         tmake_file="rs6000/t-aix43 t-slibgcc"
2352         extra_options="${extra_options} rs6000/aix64.opt"
2353         use_collect2=yes
2354         thread_file='aix'
2355         use_gcc_stdint=provide
2356         extra_headers=
2357         ;;
2358 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
2359         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h rs6000/aix-stdint.h"
2360         extra_options="${extra_options} rs6000/aix64.opt"
2361         tmake_file="rs6000/t-aix43 t-slibgcc"
2362         use_collect2=yes
2363         thread_file='aix'
2364         use_gcc_stdint=wrap
2365         extra_headers=
2366         ;;
2367 rs6000-ibm-aix5.2.* | powerpc-ibm-aix5.2.*)
2368         tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h rs6000/aix-stdint.h"
2369         tmake_file="rs6000/t-aix52 t-slibgcc"
2370         extra_options="${extra_options} rs6000/aix64.opt"
2371         use_collect2=yes
2372         thread_file='aix'
2373         use_gcc_stdint=wrap
2374         extra_headers=
2375         ;;
2376 rs6000-ibm-aix5.3.* | powerpc-ibm-aix5.3.*)
2377         tm_file="${tm_file} rs6000/aix.h rs6000/aix53.h rs6000/xcoff.h rs6000/aix-stdint.h"
2378         tmake_file="rs6000/t-aix52 t-slibgcc"
2379         extra_options="${extra_options} rs6000/aix64.opt"
2380         use_collect2=yes
2381         thread_file='aix'
2382         use_gcc_stdint=wrap
2383         extra_headers=altivec.h
2384         ;;
2385 rs6000-ibm-aix[6789].* | powerpc-ibm-aix[6789].*)
2386         tm_file="${tm_file} rs6000/aix.h rs6000/aix61.h rs6000/xcoff.h rs6000/aix-stdint.h"
2387         tmake_file="rs6000/t-aix52 t-slibgcc"
2388         extra_options="${extra_options} rs6000/aix64.opt"
2389         use_collect2=yes
2390         thread_file='aix'
2391         use_gcc_stdint=wrap
2392         extra_headers=altivec.h
2393         ;;
2394 rl78-*-elf*)
2395         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2396         target_has_targetm_common=no
2397         c_target_objs="rl78-c.o"
2398         cxx_target_objs="rl78-c.o"
2399         tmake_file="${tmake_file} rl78/t-rl78"
2400         ;;
2401 rx-*-elf*)
2402         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2403         tmake_file="${tmake_file} rx/t-rx"
2404         ;;
2405 s390-*-linux*)
2406         default_gnu_indirect_function=yes
2407         tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2408         if test x$enable_targets = xall; then
2409                 tmake_file="${tmake_file} s390/t-linux64"
2410         fi
2411         ;;
2412 s390x-*-linux*)
2413         default_gnu_indirect_function=yes
2414         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
2415         tm_p_file="linux-protos.h s390/s390-protos.h"
2416         md_file=s390/s390.md
2417         extra_modes=s390/s390-modes.def
2418         out_file=s390/s390.c
2419         tmake_file="${tmake_file} s390/t-linux64"
2420         ;;
2421 s390x-ibm-tpf*)
2422         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
2423         tm_p_file=s390/s390-protos.h
2424         md_file=s390/s390.md
2425         extra_modes=s390/s390-modes.def
2426         out_file=s390/s390.c
2427         thread_file='tpf'
2428         extra_options="${extra_options} s390/tpf.opt"
2429         ;;
2430 score-*-elf)
2431         gas=yes
2432         gnu_ld=yes
2433         tm_file="dbxelf.h elfos.h score/elf.h score/score.h newlib-stdint.h"
2434         ;;
2435 sh-*-elf* | sh[12346l]*-*-elf* | \
2436   sh-*-linux* | sh[2346lbe]*-*-linux* | \
2437   sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
2438   sh64-*-netbsd* | sh64l*-*-netbsd*)
2439         tmake_file="${tmake_file} sh/t-sh sh/t-elf"
2440         if test x${with_endian} = x; then
2441                 case ${target} in
2442                 sh[1234]*be-*-* | sh[1234]*eb-*-*) with_endian=big ;;
2443                 shbe-*-* | sheb-*-*)               with_endian=big,little ;;
2444                 sh[1234]l* | sh[34]*-*-linux*)     with_endian=little ;;
2445                 shl* | sh64l* | sh*-*-linux* | \
2446                   sh5l* | sh-superh-elf)           with_endian=little,big ;;
2447                 sh[1234]*-*-*)                     with_endian=big ;;
2448                 *)                                 with_endian=big,little ;;
2449                 esac
2450         fi
2451         # TM_ENDIAN_CONFIG is used by t-sh to determine multilibs.
2452         #  First word : the default endian.
2453         #  Second word: the secondary endian (optional).
2454         case ${with_endian} in
2455         big)            TM_ENDIAN_CONFIG=mb ;;
2456         little)         TM_ENDIAN_CONFIG=ml ;;
2457         big,little)     TM_ENDIAN_CONFIG="mb ml" ;;
2458         little,big)     TM_ENDIAN_CONFIG="ml mb" ;;
2459         *)      echo "with_endian=${with_endian} not supported."; exit 1 ;;
2460         esac
2461         case ${with_endian} in
2462         little*)        tm_file="sh/little.h ${tm_file}" ;;
2463         esac
2464         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h"
2465         case ${target} in
2466         sh*-*-linux*)   tmake_file="${tmake_file} sh/t-linux"
2467                         tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;;
2468         sh*-*-netbsd*)
2469                         tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h"
2470                         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2472                         ;;
2473         sh*-superh-elf) if test x$with_libgloss != xno; then
2474                                 with_libgloss=yes
2475                                 tm_file="${tm_file} sh/newlib.h"
2476                         fi
2477                         tm_file="${tm_file} sh/embed-elf.h"
2478                         tm_file="${tm_file} sh/superh.h"
2479                         extra_options="${extra_options} sh/superh.opt" ;;
2480         *)              if test x$with_newlib = xyes \
2481                            && test x$with_libgloss = xyes; then
2482                                 tm_file="${tm_file} sh/newlib.h"
2483                         fi
2484                         tm_file="${tm_file} sh/embed-elf.h" ;;
2485         esac
2486         case ${target} in
2487         sh5*-*-netbsd*)
2488                 # SHmedia, 32-bit ABI
2489                 tmake_file="${tmake_file} sh/t-sh64"
2490                 ;;
2491         sh64*-netbsd*)
2492                 # SHmedia, 64-bit ABI
2493                 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5-64"
2494                 ;;
2495         *-*-netbsd)
2496                 ;;
2497         sh64*-*-linux*)
2498                 tmake_file="${tmake_file} sh/t-sh64"
2499                 tm_file="${tm_file} sh/sh64.h"
2500                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2501                 ;;
2502         sh64*)
2503                 tmake_file="${tmake_file} sh/t-sh64"
2504                 tm_file="${tm_file} sh/sh64.h"
2505                 if test x$with_newlib = xyes; then
2506                         tm_file="${tm_file} newlib-stdint.h"
2507                 fi
2508                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
2509                 ;;
2510         *-*-elf*)
2511                 tm_file="${tm_file} newlib-stdint.h"
2512                 ;;
2513         esac
2514         # sed el/eb endian suffixes away to avoid confusion with sh[23]e
2515         case `echo ${target} | sed 's/e[lb]-/-/'` in
2516         sh64*-*-netbsd*)        sh_cpu_target=sh5-64media ;;
2517         sh64* | sh5*-*-netbsd*) sh_cpu_target=sh5-32media ;;
2518         sh4a_single_only*)      sh_cpu_target=sh4a-single-only ;;
2519         sh4a_single*)           sh_cpu_target=sh4a-single ;;
2520         sh4a_nofpu*)            sh_cpu_target=sh4a-nofpu ;;
2521         sh4al)                  sh_cpu_target=sh4al ;;
2522         sh4a*)                  sh_cpu_target=sh4a ;;
2523         sh4_single_only*)       sh_cpu_target=sh4-single-only ;;
2524         sh4_single*)            sh_cpu_target=sh4-single ;;
2525         sh4_nofpu*)             sh_cpu_target=sh4-nofpu ;;
2526         sh4* | sh-superh-*)     sh_cpu_target=sh4 ;;
2527         sh3e*)                  sh_cpu_target=sh3e ;;
2528         sh*-*-netbsd* | sh3*)   sh_cpu_target=sh3 ;;
2529         sh2a_single_only*)      sh_cpu_target=sh2a-single-only ;;
2530         sh2a_single*)           sh_cpu_target=sh2a-single ;;
2531         sh2a_nofpu*)            sh_cpu_target=sh2a-nofpu ;;
2532         sh2a*)                  sh_cpu_target=sh2a ;;
2533         sh2e*)                  sh_cpu_target=sh2e ;;
2534         sh2*)                   sh_cpu_target=sh2 ;;
2535         *)                      sh_cpu_target=sh1 ;;
2536         esac
2537         # did the user say --without-fp ?
2538         if test x$with_fp = xno; then
2539                 case ${sh_cpu_target} in
2540                 sh5-*media)     sh_cpu_target=${sh_cpu_target}-nofpu ;;
2541                 sh4al | sh1)    ;;
2542                 sh4a* )         sh_cpu_target=sh4a-nofpu ;;
2543                 sh4*)           sh_cpu_target=sh4-nofpu ;;
2544                 sh3*)           sh_cpu_target=sh3 ;;
2545                 sh2a*)          sh_cpu_target=sh2a-nofpu ;;
2546                 sh2*)           sh_cpu_target=sh2 ;;
2547                 *)      echo --without-fp not available for $target: ignored
2548                 esac
2549                 tm_defines="$tm_defines STRICT_NOFPU=1"
2550         fi
2551         sh_cpu_default="`echo $with_cpu|sed s/^m/sh/|tr A-Z_ a-z-`"
2552         case $sh_cpu_default in
2553         sh5-64media-nofpu | sh5-64media | \
2554           sh5-32media-nofpu | sh5-32media | sh5-compact-nofpu | sh5-compact | \
2555           sh2a-single-only | sh2a-single | sh2a-nofpu | sh2a | \
2556           sh4a-single-only | sh4a-single | sh4a-nofpu | sh4a | sh4al | \
2557           sh4-single-only | sh4-single | sh4-nofpu | sh4 | sh4-300 | \
2558           sh3e | sh3 | sh2e | sh2 | sh1) ;;
2559         "")     sh_cpu_default=${sh_cpu_target} ;;
2560         *)      echo "with_cpu=$with_cpu not supported"; exit 1 ;;
2561         esac
2562         sh_multilibs=${with_multilib_list}
2563         if test "$sh_multilibs" = "default" ; then
2564                 case ${target} in
2565                 sh64-superh-linux* | \
2566                 sh[1234]*)      sh_multilibs=${sh_cpu_target} ;;
2567                 sh64* | sh5*)   sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
2568                 sh-superh-*)    sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
2569                 sh*-*-linux*)   sh_multilibs=m1,m2,m2a,m3e,m4 ;;
2570                 sh*-*-netbsd*)  sh_multilibs=m3,m3e,m4 ;;
2571                 *) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
2572                 esac
2573                 if test x$with_fp = xno; then
2574                         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`"
2575                 fi
2576         fi
2577         target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
2578         tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"'
2579         tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2580         sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
2581         for sh_multilib in ${sh_multilibs}; do
2582                 case ${sh_multilib} in
2583                 m1 | m2 | m2e | m3 | m3e | \
2584                 m4 | m4-single | m4-single-only | m4-nofpu | m4-300 |\
2585                 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al | \
2586                 m2a | m2a-single | m2a-single-only | m2a-nofpu | \
2587                 m5-64media | m5-64media-nofpu | \
2588                 m5-32media | m5-32media-nofpu | \
2589                 m5-compact | m5-compact-nofpu)
2590                         # TM_MULTILIB_CONFIG is used by t-sh for the non-endian multilib definition
2591                         # It is passed to MULTIILIB_OPTIONS verbatim.
2592                         TM_MULTILIB_CONFIG="${TM_MULTILIB_CONFIG}/${sh_multilib}"
2593                         tm_defines="$tm_defines SUPPORT_`echo $sh_multilib | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1"
2594                         ;;
2595                 \!*)    # TM_MULTILIB_EXCEPTIONS_CONFIG is used by t-sh
2596                         # It is passed the MULTILIB_EXCEPTIONS verbatim.
2597                         TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;
2598                 *)
2599                         echo "with_multilib_list=${sh_multilib} not supported."
2600                         exit 1
2601                         ;;
2602                 esac
2603         done
2604         TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`
2605         if test x${enable_incomplete_targets} = xyes ; then
2606                 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"
2607         fi
2608         tm_file="$tm_file ./sysroot-suffix.h"
2609         tmake_file="$tmake_file t-sysroot-suffix"
2610         ;;
2611 sh-*-rtems*)
2612         tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
2613         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h newlib-stdint.h"
2614         ;;
2615 sh-wrs-vxworks)
2616         tmake_file="$tmake_file sh/t-sh sh/t-vxworks"
2617         tm_file="${tm_file} elfos.h sh/elf.h sh/embed-elf.h vx-common.h vxworks.h sh/vxworks.h"
2618         ;;
2619 sparc-*-elf*)
2620         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp-elf.h"
2621         case ${target} in
2622             *-leon-*)
2623                 tmake_file="sparc/t-sparc sparc/t-leon"
2624                 ;;
2625             *-leon[3-9]*)
2626                 tmake_file="sparc/t-sparc sparc/t-leon3"
2627                 ;;
2628             *)
2629                 tmake_file="sparc/t-sparc sparc/t-elf"
2630                 ;;
2631         esac
2632         ;;
2633 sparc-*-rtems*)
2634         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
2635         tmake_file="${tmake_file} sparc/t-sparc sparc/t-elf sparc/t-rtems"
2636         ;;
2637 sparc-*-linux*)
2638         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
2639         extra_options="${extra_options} sparc/long-double-switch.opt"
2640         case ${target} in
2641             *-leon-*)
2642                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon"
2643                 ;;
2644             *-leon[3-9]*)
2645                 tmake_file="${tmake_file} sparc/t-sparc sparc/t-leon3"
2646                 ;;
2647             *)
2648                 tmake_file="${tmake_file} sparc/t-sparc"
2649                 ;;
2650         esac
2651         if test x$enable_targets = xall; then
2652                 tm_file="sparc/biarch64.h ${tm_file} sparc/linux64.h"
2653                 tmake_file="${tmake_file} sparc/t-linux64"
2654         else
2655                 tm_file="${tm_file} sparc/linux.h"
2656                 tmake_file="${tmake_file} sparc/t-linux"
2657         fi
2658         ;;
2659 sparc-*-netbsdelf*)
2660         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2661         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2662         extra_options="${extra_options} sparc/long-double-switch.opt"
2663         tmake_file="${tmake_file} sparc/t-sparc"
2664         ;;
2665 sparc*-*-solaris2*)
2666         tm_file="sparc/biarch64.h ${tm_file} ${sol2_tm_file} sparc/tso.h"
2667         case ${target} in
2668             sparc64-*-* | sparcv9-*-*)
2669                 tm_file="sparc/default-64.h ${tm_file}"
2670                 ;;
2671             *)
2672                 test x$with_cpu != x || with_cpu=v9
2673                 ;;
2674         esac
2675         tmake_file="${tmake_file} sparc/t-sparc sparc/t-sol2"
2676         ;;
2677 sparc-wrs-vxworks)
2678         tm_file="${tm_file} elfos.h sparc/sysv4.h vx-common.h vxworks.h sparc/vxworks.h"
2679         tmake_file="${tmake_file} sparc/t-sparc sparc/t-vxworks"
2680         ;;
2681 sparc64-*-elf*)
2682         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h"
2683         extra_options="${extra_options}"
2684         tmake_file="${tmake_file} sparc/t-sparc"
2685         ;;
2686 sparc64-*-rtems*)
2687         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h"
2688         extra_options="${extra_options}"
2689         tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
2690         ;;
2691 sparc64-*-linux*)
2692         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"
2693         extra_options="${extra_options} sparc/long-double-switch.opt"
2694         tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
2695         ;;
2696 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2697         tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2698         extra_options="${extra_options} sparc/long-double-switch.opt"
2699         case "x$with_cpu" in
2700                 xultrasparc) ;;
2701                 x) with_cpu=ultrasparc ;;
2702                 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2703         esac
2704         tmake_file="${tmake_file} sparc/t-sparc"
2705         ;;
2706 sparc64-*-netbsd*)
2707         tm_file="sparc/biarch64.h ${tm_file}"
2708         tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2709         extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
2710         extra_options="${extra_options} sparc/long-double-switch.opt"
2711         tmake_file="${tmake_file} sparc/t-sparc sparc/t-netbsd64"
2712         ;;
2713 sparc64-*-openbsd*)
2714         tm_file="sparc/openbsd1-64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h"
2715         tm_file="${tm_file} openbsd.h openbsd-stdint.h openbsd-libpthread.h sparc/openbsd64.h"
2716         extra_options="${extra_options} openbsd.opt"
2717         extra_options="${extra_options}"
2718         gas=yes gnu_ld=yes
2719         with_cpu=ultrasparc
2720         tmake_file="${tmake_file} sparc/t-sparc"
2721         ;;
2722 spu-*-elf*)
2723         tm_file="dbxelf.h elfos.h spu/spu-elf.h spu/spu.h newlib-stdint.h"
2724         tmake_file="spu/t-spu-elf"
2725         native_system_header_dir=/include
2726         extra_headers="spu_intrinsics.h spu_internals.h vmx2spu.h spu_mfcio.h vec_types.h spu_cache.h"
2727         extra_modes=spu/spu-modes.def
2728         c_target_objs="${c_target_objs} spu-c.o"
2729         cxx_target_objs="${cxx_target_objs} spu-c.o"
2730         ;;
2731 tic6x-*-elf)
2732         tm_file="elfos.h ${tm_file} c6x/elf-common.h c6x/elf.h"
2733         tm_file="${tm_file} dbxelf.h tm-dwarf2.h newlib-stdint.h"
2734         tmake_file="c6x/t-c6x c6x/t-c6x-elf"
2735         use_collect2=no
2736         ;;
2737 tic6x-*-uclinux)
2738         tm_file="elfos.h ${tm_file} gnu-user.h linux.h c6x/elf-common.h c6x/uclinux-elf.h"
2739         tm_file="${tm_file} dbxelf.h tm-dwarf2.h glibc-stdint.h"
2740         tm_file="${tm_file} ./sysroot-suffix.h"
2741         tmake_file="t-sysroot-suffix t-slibgcc"
2742         tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux"
2743         use_collect2=no
2744         ;;
2745 tilegx*-*-linux*)
2746         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}"
2747         tmake_file="${tmake_file} tilegx/t-tilegx"
2748         extra_objs="${extra_objs} mul-tables.o"
2749         c_target_objs="${c_target_objs} tilegx-c.o"
2750         cxx_target_objs="${cxx_target_objs} tilegx-c.o"
2751         extra_headers="feedback.h"
2752         case $target in
2753         tilegxbe-*)
2754                 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
2755                 ;;
2756         esac
2757         ;;
2758 tilepro*-*-linux*)
2759         tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}"
2760         tmake_file="${tmake_file} tilepro/t-tilepro"
2761         extra_objs="${extra_objs} mul-tables.o"
2762         c_target_objs="${c_target_objs} tilepro-c.o"
2763         cxx_target_objs="${cxx_target_objs} tilepro-c.o"
2764         extra_headers="feedback.h"
2765         ;;
2766 v850-*-rtems*)
2767         target_cpu_default="TARGET_CPU_generic"
2768         tm_file="dbxelf.h elfos.h v850/v850.h"
2769         tm_file="${tm_file} rtems.h v850/rtems.h newlib-stdint.h"
2770         tmake_file="${tmake_file} v850/t-v850"
2771         tmake_file="${tmake_file} v850/t-rtems"
2772         use_collect2=no
2773         c_target_objs="v850-c.o"
2774         cxx_target_objs="v850-c.o"
2775         ;;
2776 v850*-*-*)
2777         case ${target} in
2778         v850e3v5-*-*)
2779                 target_cpu_default="TARGET_CPU_v850e3v5"
2780                 ;;
2781         v850e2v3-*-*)
2782                 target_cpu_default="TARGET_CPU_v850e2v3"
2783                 ;;
2784         v850e2-*-*)
2785                 target_cpu_default="TARGET_CPU_v850e2"
2786                 ;;
2787         v850e1-*-* | v850es-*-*)
2788                 target_cpu_default="TARGET_CPU_v850e1"
2789                 ;;
2790         v850e-*-*)
2791                 target_cpu_default="TARGET_CPU_v850e"
2792                 ;;
2793         v850-*-*)
2794                 target_cpu_default="TARGET_CPU_generic"
2795                 ;;
2796         esac
2797         tm_file="dbxelf.h elfos.h newlib-stdint.h v850/v850.h"
2798         if test x$stabs = xyes
2799         then
2800                 tm_file="${tm_file} dbx.h"
2801         fi
2802         use_collect2=no
2803         c_target_objs="v850-c.o"
2804         cxx_target_objs="v850-c.o"
2805         use_gcc_stdint=wrap
2806         ;;
2807 vax-*-linux*)
2808         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h"
2809         extra_options="${extra_options} vax/elf.opt"
2810         ;;
2811 vax-*-netbsdelf*)
2812         tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2813         extra_options="${extra_options} netbsd.opt netbsd-elf.opt vax/elf.opt"
2814         ;;
2815 vax-*-openbsd*)
2816         tm_file="vax/vax.h vax/openbsd1.h openbsd.h openbsd-stdint.h openbsd-pthread.h vax/openbsd.h"
2817         extra_options="${extra_options} openbsd.opt"
2818         use_collect2=yes
2819         ;;
2820 xstormy16-*-elf)
2821         # For historical reasons, the target files omit the 'x'.
2822         tm_file="dbxelf.h elfos.h newlib-stdint.h stormy16/stormy16.h"
2823         tm_p_file=stormy16/stormy16-protos.h
2824         md_file=stormy16/stormy16.md
2825         out_file=stormy16/stormy16.c
2826         extra_options=stormy16/stormy16.opt
2827         tmake_file="stormy16/t-stormy16"
2828         ;;
2829 xtensa*-*-elf*)
2830         tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h xtensa/elf.h"
2831         extra_options="${extra_options} xtensa/elf.opt"
2832         ;;
2833 xtensa*-*-linux*)
2834         tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h"
2835         tmake_file="${tmake_file} xtensa/t-xtensa"
2836         ;;
2837 am33_2.0-*-linux*)
2838         tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
2839         gas=yes gnu_ld=yes
2840         use_collect2=no
2841         ;;
2842 m32c-*-rtems*)
2843         tm_file="dbxelf.h elfos.h ${tm_file} m32c/rtems.h rtems.h newlib-stdint.h"
2844         c_target_objs="m32c-pragma.o"
2845         cxx_target_objs="m32c-pragma.o"
2846         ;;
2847 m32c-*-elf*)
2848         tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
2849         c_target_objs="m32c-pragma.o"
2850         cxx_target_objs="m32c-pragma.o"
2851         ;;
2853         echo "*** Configuration ${target} not supported" 1>&2
2854         exit 1
2855         ;;
2856 esac
2858 case ${target} in
2859 i[34567]86-*-linux* | x86_64-*-linux*)
2860         tmake_file="${tmake_file} i386/t-pmm_malloc i386/t-i386"
2861         ;;
2862 i[34567]86-*-* | x86_64-*-*)
2863         tmake_file="${tmake_file} i386/t-gmm_malloc i386/t-i386"
2864         ;;
2865 powerpc*-*-* | rs6000-*-*)
2866         tm_file="${tm_file} rs6000/option-defaults.h"
2867 esac
2869 if [ "$target_has_targetcm" = "no" ]; then
2870   c_target_objs="$c_target_objs default-c.o"
2871   cxx_target_objs="$cxx_target_objs default-c.o"
2874 if [ "$common_out_file" = "" ]; then
2875   if [ "$target_has_targetm_common" = "yes" ]; then
2876     common_out_file="$cpu_type/$cpu_type-common.c"
2877   else
2878     common_out_file="default-common.c"
2879   fi
2882 # Support for --with-cpu and related options (and a few unrelated options,
2883 # too).
2884 case ${with_cpu} in
2885   yes | no)
2886     echo "--with-cpu must be passed a value" 1>&2
2887     exit 1
2888     ;;
2889 esac
2891 # Set arch and cpu from ${target} and ${target_noncanonical}.  Set cpu
2892 # to generic if there is no processor scheduler model for the target.
2893 arch=
2894 cpu=
2895 arch_without_sse2=no
2896 arch_without_64bit=no
2897 case ${target} in
2898   i386-*-freebsd*)
2899     if test $fbsd_major -ge 6; then
2900       arch=i486
2901     else
2902       arch=i386
2903     fi
2904     cpu=generic
2905     arch_without_sse2=yes
2906     arch_without_64bit=yes
2907     ;;
2908   i386-*-*)
2909     arch=i386
2910     cpu=i386
2911     arch_without_sse2=yes
2912     arch_without_64bit=yes
2913     ;;
2914   i486-*-*)
2915     arch=i486
2916     cpu=i486
2917     arch_without_sse2=yes
2918     arch_without_64bit=yes
2919     ;;
2920   i586-*-*)
2921     arch_without_sse2=yes
2922     arch_without_64bit=yes
2923     case ${target_noncanonical} in
2924       k6_2-*)
2925         arch=k6-2
2926         cpu=k6-2
2927         ;;
2928       k6_3-*)
2929         arch=k6-3
2930         cpu=k6-3
2931         ;;
2932       k6-*)
2933         arch=k6
2934         cpu=k6
2935         ;;
2936       pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2937         arch=pentium-mmx
2938         cpu=pentium-mmx
2939         ;;
2940       *)
2941         arch=pentium
2942         cpu=pentium
2943         ;;
2944     esac
2945     ;;
2946   i686-*-* | i786-*-*)
2947     case ${target_noncanonical} in
2948       bdver4-*)
2949         arch=bdver4
2950         cpu=bdver4
2951         ;;
2952       bdver3-*)
2953         arch=bdver3
2954         cpu=bdver3
2955         ;;
2956       bdver2-*)
2957         arch=bdver2
2958         cpu=bdver2
2959         ;;
2960       bdver1-*)
2961         arch=bdver1
2962         cpu=bdver1
2963         ;;
2964       btver1-*)
2965         arch=btver1
2966         cpu=btver1
2967         ;;
2968       btver2-*)
2969         arch=btver2
2970         cpu=btver2
2971         ;;
2972       amdfam10-*|barcelona-*)
2973         arch=amdfam10
2974         cpu=amdfam10
2975         ;;
2976       k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
2977         arch=k8-sse3
2978         cpu=k8-sse3
2979         ;;
2980       k8-*|opteron-*|athlon64-*|athlon_fx-*)
2981         arch=k8
2982         cpu=k8
2983         ;;
2984       athlon_xp-*|athlon_mp-*|athlon_4-*)
2985         arch=athlon-4
2986         cpu=athlon-4
2987         arch_without_sse2=yes
2988         arch_without_64bit=yes
2989         ;;
2990       athlon_tbird-*|athlon-*)
2991         arch=athlon
2992         cpu=athlon
2993         arch_without_sse2=yes
2994         ;;
2995       geode-*)
2996         arch=geode
2997         cpu=geode
2998         arch_without_sse2=yes
2999         ;;
3000       pentium2-*)
3001         arch=pentium2
3002         cpu=pentium2
3003         arch_without_sse2=yes
3004         ;;
3005       pentium3-*|pentium3m-*)
3006         arch=pentium3
3007         cpu=pentium3
3008         arch_without_sse2=yes
3009         ;;
3010       pentium4-*|pentium4m-*)
3011         arch=pentium4
3012         cpu=pentium4
3013         ;;
3014       prescott-*)
3015         arch=prescott
3016         cpu=prescott
3017         ;;
3018       nocona-*)
3019         arch=nocona
3020         cpu=nocona
3021         ;;
3022       atom-*)
3023         arch=atom
3024         cpu=atom
3025         ;;
3026       slm-*)
3027         arch=slm
3028         cpu=slm
3029         ;;
3030       core2-*)
3031         arch=core2
3032         cpu=core2
3033         ;;
3034       corei7-*)
3035         arch=corei7
3036         cpu=corei7
3037         ;;
3038       corei7_avx-*)
3039         arch=corei7-avx
3040         cpu=corei7-avx
3041         ;;
3042       pentium_m-*)
3043         arch=pentium-m
3044         cpu=pentium-m
3045         ;;
3046       pentiumpro-*)
3047         arch=pentiumpro
3048         cpu=pentiumpro
3049         arch_without_sse2=yes
3050         ;;
3051       *)
3052         arch=pentiumpro
3053         cpu=generic
3054         arch_without_sse2=yes
3055         arch_without_64bit=yes
3056         ;;
3057     esac
3058     ;;
3059   x86_64-*-*)
3060     case ${target_noncanonical} in
3061       bdver4-*)
3062         arch=bdver4
3063         cpu=bdver4
3064         ;;
3065       bdver3-*)
3066         arch=bdver3
3067         cpu=bdver3
3068         ;;
3069       bdver2-*)
3070         arch=bdver2
3071         cpu=bdver2
3072         ;;
3073       bdver1-*)
3074         arch=bdver1
3075         cpu=bdver1
3076         ;;
3077       btver1-*)
3078         arch=btver1
3079         cpu=btver1
3080         ;;
3081       btver2-*)
3082         arch=btver2
3083         cpu=btver2
3084         ;;
3085       amdfam10-*|barcelona-*)
3086         arch=amdfam10
3087         cpu=amdfam10
3088         ;;
3089       k8_sse3-*|opteron_sse3-*|athlon64_sse3-*)
3090         arch=k8-sse3
3091         cpu=k8-sse3
3092         ;;
3093       k8-*|opteron-*|athlon_64-*)
3094         arch=k8
3095         cpu=k8
3096         ;;
3097       nocona-*)
3098         arch=nocona
3099         cpu=nocona
3100         ;;
3101       atom-*)
3102         arch=atom
3103         cpu=atom
3104         ;;
3105       slm-*)
3106         arch=slm
3107         cpu=slm
3108         ;;
3109       core2-*)
3110         arch=core2
3111         cpu=core2
3112         ;;
3113       corei7-*)
3114         arch=corei7
3115         cpu=corei7
3116         ;;
3117       *)
3118         arch=x86-64
3119         cpu=generic
3120         ;;
3121     esac
3122     ;;
3123 esac
3125 # If there is no $with_cpu option, try to infer one from ${target}.
3126 # This block sets nothing except for with_cpu.
3127 if test x$with_cpu = x ; then
3128   case ${target} in
3129     i[34567]86-*-*|x86_64-*-*)
3130       with_cpu=$cpu
3131       ;;
3132     alphaev6[78]*-*-*)
3133       with_cpu=ev67
3134       ;;
3135     alphaev6*-*-*)
3136       with_cpu=ev6
3137       ;;
3138     alphapca56*-*-*)
3139       with_cpu=pca56
3140       ;;
3141     alphaev56*-*-*)
3142       with_cpu=ev56
3143       ;;
3144     alphaev5*-*-*)
3145       with_cpu=ev5
3146       ;;
3147     frv-*-*linux* | frv400-*-*linux*)
3148       with_cpu=fr400
3149       ;;
3150     frv550-*-*linux*)
3151       with_cpu=fr550
3152       ;;
3153     m68k*-*-*)
3154       case "$with_arch" in
3155         "cf")
3156           with_cpu=${default_cf_cpu}
3157           ;;
3158         "" | "m68k")
3159           with_cpu=m${default_m68k_cpu}
3160           ;;
3161       esac
3162       ;;
3163     powerpc*-*-*spe*)
3164       if test x$enable_e500_double = xyes; then
3165          with_cpu=8548
3166       else
3167          with_cpu=8540
3168       fi       
3169       ;;
3170     sparc*-*-*)
3171       case ${target} in
3172         *-leon-*)
3173           with_cpu=leon
3174           ;;
3175         *-leon[3-9]*)
3176           with_cpu=leon3
3177           ;;
3178         *)
3179           with_cpu="`echo ${target} | sed 's/-.*$//'`"
3180           ;;
3181       esac
3182       ;;
3183   esac
3185   # Avoid overriding --with-cpu-32 and --with-cpu-64 values.
3186   case ${target} in
3187     i[34567]86-*-*|x86_64-*-*)
3188       if test x$with_cpu_32 != x || test x$with_cpu_64 != x; then
3189         if test x$with_cpu_32 = x; then
3190           with_cpu_32=$with_cpu
3191         fi
3192         if test x$with_cpu_64 = x; then
3193           with_cpu_64=$with_cpu
3194         fi
3195         with_cpu=
3196       fi
3197       ;;
3198   esac
3201 # Support for --with-arch and related options (and a few unrelated options,
3202 # too).
3203 case ${with_arch} in
3204   yes | no)
3205     echo "--with-arch must be passed a value" 1>&2
3206     exit 1
3207     ;;
3208 esac
3210 # If there is no $with_arch option, try to infer one from ${target}.
3211 # This block sets nothing except for with_arch.
3212 if test x$with_arch = x ; then
3213   case ${target} in
3214     i[34567]86-*-darwin*|x86_64-*-darwin*)
3215       # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3216       # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3217       ;;
3218     i[34567]86-*-*)
3219       # --with-fpmath sets the default ISA to SSE2, which is the same
3220       # ISA supported by Pentium 4.
3221       if test x$with_fpmath = x || test $arch_without_sse2 = no; then
3222         with_arch=$arch
3223       else
3224         with_arch=pentium4
3225       fi
3226       ;;
3227     x86_64-*-*)
3228       with_arch=$arch
3229       ;;
3230     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3231       with_arch=r5900
3232       ;;
3233     mips*-*-vxworks)
3234       with_arch=mips2
3235       ;;
3236   esac
3238   # Avoid overriding --with-arch-32 and --with-arch-64 values.
3239   case ${target} in
3240     i[34567]86-*-darwin*|x86_64-*-darwin*)
3241       # Default arch is set via TARGET_SUBTARGET32_ISA_DEFAULT
3242       # and TARGET_SUBTARGET64_ISA_DEFAULT in config/i386/darwin.h.
3243       ;;
3244     i[34567]86-*-*|x86_64-*-*)
3245       if test x$with_arch_32 != x || test x$with_arch_64 != x; then
3246         if test x$with_arch_32 = x; then
3247           with_arch_32=$with_arch
3248         fi
3249         if test x$with_arch_64 = x; then
3250           if test $arch_without_64bit = yes; then
3251             # Set the default 64bit arch to x86-64 if the default arch
3252             # doesn't support 64bit.
3253             with_arch_64=x86-64
3254           else
3255             with_arch_64=$with_arch
3256           fi
3257         fi
3258         with_arch=
3259       elif test $arch_without_64bit$need_64bit_isa = yesyes; then
3260         # Set the default 64bit arch to x86-64 if the default arch
3261         # doesn't support 64bit and we need 64bit ISA.
3262         with_arch_32=$with_arch
3263         with_arch_64=x86-64
3264         with_arch=
3265       fi
3266       ;;
3267   esac
3270 # Infer a default setting for --with-float.
3271 if test x$with_float = x; then
3272   case ${target} in
3273     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3274       # The R5900 doesn't support 64-bit float.  32-bit float doesn't
3275       # comply with IEEE 754.
3276       with_float=soft
3277       ;;
3278   esac
3281 # Infer a default setting for --with-fpu.
3282 if test x$with_fpu = x; then
3283   case ${target} in
3284     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3285       # The R5900 FPU only supports single precision.
3286       with_fpu=single
3287       ;;
3288   esac
3291 # Support --with-fpmath.
3292 if test x$with_fpmath != x; then
3293   case ${target} in
3294     i[34567]86-*-* | x86_64-*-*)
3295       case ${with_fpmath} in
3296       avx)
3297         tm_file="${tm_file} i386/avxmath.h"
3298         ;;
3299       sse)
3300         tm_file="${tm_file} i386/ssemath.h"
3301         ;;
3302       *)
3303         echo "Invalid --with-fpmath=$with_fpmath" 1>&2
3304         exit 1
3305         ;;
3306       esac
3307       ;;
3308     *)
3309       echo "--with-fpmath isn't supported for $target." 1>&2
3310       exit 1
3311       ;;
3312   esac
3315 # Similarly for --with-schedule.
3316 if test x$with_schedule = x; then
3317         case ${target} in
3318         hppa1*)
3319                 # Override default PA8000 scheduling model.
3320                 with_schedule=7100LC
3321                 ;;
3322         esac
3325 # Infer a default setting for --with-llsc.
3326 if test x$with_llsc = x; then
3327   case ${target} in
3328     mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
3329       # The R5900 doesn't support LL(D) and SC(D).
3330       with_llsc=no
3331       ;;
3332     mips*-*-linux*)
3333       # The kernel emulates LL and SC where necessary.
3334       with_llsc=yes
3335       ;;
3336   esac
3339 # Validate and mark as valid any --with options supported
3340 # by this target.  In order to use a particular --with option
3341 # you must list it in supported_defaults; validating the value
3342 # is optional.  This case statement should set nothing besides
3343 # supported_defaults.
3345 supported_defaults=
3346 case "${target}" in
3347         aarch64*-*-*)
3348                 supported_defaults="abi cpu arch"
3349                 for which in cpu arch; do
3351                         eval "val=\$with_$which"
3352                         base_val=`echo $val | sed -e 's/\+.*//'`
3353                         ext_val=`echo $val | sed -e 's/[a-z0-9\-]\+//'`
3355                         if [ $which = arch ]; then
3356                           def=aarch64-arches.def
3357                           pattern=AARCH64_ARCH
3358                         else
3359                           def=aarch64-cores.def
3360                           pattern=AARCH64_CORE
3361                         fi
3363                         ext_mask=AARCH64_CPU_DEFAULT_FLAGS
3365                         # Find the base CPU or ARCH id in aarch64-cores.def or
3366                         # aarch64-arches.def
3367                         if [ x"$base_val" = x ] \
3368                             || grep "^$pattern(\"$base_val\"," \
3369                                     ${srcdir}/config/aarch64/$def \
3370                                     > /dev/null; then
3372                           if [ $which = arch ]; then
3373                                 base_id=`grep "^$pattern(\"$base_val\"," \
3374                                   ${srcdir}/config/aarch64/$def | \
3375                                   sed -e 's/^[^,]*,[    ]*//' | \
3376                                   sed -e 's/,.*$//'`
3377                                 # Extract the architecture flags from aarch64-arches.def
3378                                 ext_mask=`grep "^$pattern(\"$base_val\"," \
3379                                    ${srcdir}/config/aarch64/$def | \
3380                                    sed -e 's/)$//' | \
3381                                    sed -e 's/^.*,//'`
3382                           else
3383                                 base_id=`grep "^$pattern(\"$base_val\"," \
3384                                   ${srcdir}/config/aarch64/$def | \
3385                                   sed -e 's/^[^,]*,[    ]*//' | \
3386                                   sed -e 's/,.*$//'`
3387                           fi
3389                           while [ x"$ext_val" != x ]
3390                           do
3391                                 ext_val=`echo $ext_val | sed -e 's/\+//'`
3392                                 ext=`echo $ext_val | sed -e 's/\+.*//'`
3393                                 base_ext=`echo $ext | sed -e 's/^no//'`
3395                                 if [ x"$base_ext" = x ] \
3396                                     || grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3397                                     ${srcdir}/config/aarch64/aarch64-option-extensions.def \
3398                                     > /dev/null; then
3400                                   ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3401                                         ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3402                                         sed -e 's/^[^,]*,[      ]*//' | \
3403                                         sed -e 's/,.*$//'`
3404                                   ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
3405                                         ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
3406                                         sed -e 's/^[^,]*,[      ]*[^,]*,[       ]*//' | \
3407                                         sed -e 's/,.*$//' | \
3408                                         sed -e 's/).*$//'`
3410                                   if [ $ext = $base_ext ]; then
3411                                         # Adding extension
3412                                         ext_mask="("$ext_mask") | ("$ext_on")"
3413                                   else
3414                                         # Removing extension
3415                                         ext_mask="("$ext_mask") & ~("$ext_off")"
3416                                   fi
3418                                   true
3419                                 else
3420                                   echo "Unknown extension used in --with-$which=$val" 1>&2
3421                                   exit 1
3422                                 fi
3423                                 ext_val=`echo $ext_val | sed -e 's/[a-z0-9]\+//'`
3424                           done
3426                           ext_mask="(("$ext_mask") << 6)"
3427                           if [ x"$base_id" != x ]; then
3428                                 target_cpu_cname="TARGET_CPU_$base_id | $ext_mask"
3429                           fi
3430                           true
3431                         else
3432                           echo "Unknown $which used in --with-$which=$val" 1>&2
3433                           exit 1
3434                         fi
3435                 done
3436                 ;;
3438         alpha*-*-*)
3439                 supported_defaults="cpu tune"
3440                 for which in cpu tune; do
3441                         eval "val=\$with_$which"
3442                         case "$val" in
3443                         "" \
3444                         | ev4 | ev45 | 21064 | ev5 | 21164 | ev56 | 21164a \
3445                         | pca56 | 21164PC | 21164pc | ev6 | 21264 | ev67 \
3446                         | 21264a)
3447                                 ;;
3448                         *)
3449                                 echo "Unknown CPU used in --with-$which=$val" 1>&2
3450                                 exit 1
3451                                 ;;
3452                         esac
3453                 done
3454                 ;;
3456         arc*-*-*) # was:        arc*-*-linux-uclibc)
3457                 supported_defaults="cpu"
3458                 case $with_cpu in
3459                   arc600|arc601|arc700)
3460                         ;;
3461                   *) echo "Unknown cpu type"
3462                         exit 1
3463                         ;;
3464                 esac
3465                 ;;
3467         arm*-*-*)
3468                 supported_defaults="arch cpu float tune fpu abi mode tls"
3469                 for which in cpu tune; do
3470                         # See if it matches any of the entries in arm-cores.def
3471                         eval "val=\$with_$which"
3472                         if [ x"$val" = x ] \
3473                             || grep "^ARM_CORE(\"$val\"," \
3474                                     ${srcdir}/config/arm/arm-cores.def \
3475                                     > /dev/null; then
3476                           # Ok
3477                           new_val=`grep "^ARM_CORE(\"$val\"," \
3478                                 ${srcdir}/config/arm/arm-cores.def | \
3479                                 sed -e 's/^[^,]*,[      ]*//' | \
3480                                 sed -e 's/,.*$//'`
3481                           eval "target_${which}_cname=$new_val"
3482                         echo "For $val real value is $new_val"
3483                           true
3484                         else
3485                           echo "Unknown CPU used in --with-$which=$val" 1>&2
3486                           exit 1
3487                         fi
3488                 done
3490                 # See if it matches any of the entries in arm-arches.def
3491                 if [ x"$with_arch" = x ] \
3492                     || grep "^ARM_ARCH(\"$with_arch\"," \
3493                             ${srcdir}/config/arm/arm-arches.def \
3494                             > /dev/null; then
3495                   # OK
3496                   true
3497                 else
3498                   echo "Unknown arch used in --with-arch=$with_arch" 1>&2
3499                   exit 1
3500                 fi
3502                 case "$with_float" in
3503                 "" \
3504                 | soft | hard | softfp)
3505                         # OK
3506                         ;;
3507                 *)
3508                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3509                         exit 1
3510                         ;;
3511                 esac
3513                 case "$with_fpu" in
3514                 "" \
3515                 | vfp | vfp3 | vfpv3 \
3516                 | vfpv3-fp16 | vfpv3-d16 | vfpv3-d16-fp16 | vfpv3xd \
3517                 | vfpv3xd-fp16 | neon | neon-fp16 | vfpv4 | vfpv4-d16 \
3518                 | fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \
3519                 | crypto-neon-fp-armv8)
3520                         # OK
3521                         ;;
3522                 *)
3523                         echo "Unknown fpu used in --with-fpu=$with_fpu" 2>&1
3524                         exit 1
3525                         ;;
3526                 esac
3528                 case "$with_abi" in
3529                 "" \
3530                 | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux )
3531                         #OK
3532                         ;;
3533                 *)
3534                         echo "Unknown ABI used in --with-abi=$with_abi"
3535                         exit 1
3536                         ;;
3537                 esac
3539                 case "$with_mode" in
3540                 "" \
3541                 | arm | thumb )
3542                         #OK
3543                         ;;
3544                 *)
3545                         echo "Unknown mode used in --with-mode=$with_mode"
3546                         exit 1
3547                         ;;
3548                 esac
3550                 case "$with_tls" in
3551                 "" \
3552                 | gnu | gnu2)
3553                         # OK
3554                         ;;
3555                 *)
3556                         echo "Unknown TLS method used in --with-tls=$with_tls" 1>&2
3557                         exit 1
3558                         ;;
3559                 esac
3561                 if test "x$with_arch" != x && test "x$with_cpu" != x; then
3562                         echo "Warning: --with-arch overrides --with-cpu=$with_cpu" 1>&2
3563                 fi
3565                 # Add extra multilibs
3566                 if test "x$with_multilib_list" != x; then
3567                         arm_multilibs=`echo $with_multilib_list | sed -e 's/,/ /g'`
3568                         for arm_multilib in ${arm_multilibs}; do
3569                                 case ${arm_multilib} in
3570                                 aprofile)
3571                                 # Note that arm/t-aprofile is a
3572                                 # stand-alone make file fragment to be
3573                                 # used only with itself.  We do not
3574                                 # specifically use the
3575                                 # TM_MULTILIB_OPTION framework because
3576                                 # this shorthand is more
3577                                 # pragmatic. Additionally it is only
3578                                 # designed to work without any
3579                                 # with-cpu, with-arch with-mode
3580                                 # with-fpu or with-float options.
3581                                         if test "x$with_arch" != x \
3582                                             || test "x$with_cpu" != x \
3583                                             || test "x$with_float" != x \
3584                                             || test "x$with_fpu" != x \
3585                                             || test "x$with_mode" != x ; then
3586                                             echo "Error: You cannot use any of --with-arch/cpu/fpu/float/mode with --with-multilib-list=aprofile" 1>&2
3587                                             exit 1
3588                                         fi
3589                                         tmake_file="${tmake_file} arm/t-aprofile"
3590                                         break
3591                                         ;;
3592                                 default)
3593                                         ;;
3594                                 *)
3595                                         echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2
3596                                         exit 1
3597                                         ;;
3598                                 esac
3599                         done
3600                 fi
3601                 ;;
3603         fr*-*-*linux*)
3604                 supported_defaults=cpu
3605                 case "$with_cpu" in
3606                 fr400) ;;
3607                 fr550) ;;
3608                 *)
3609                         echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
3610                         exit 1
3611                         ;;
3612                 esac
3613                 ;;
3615         fido-*-* | m68k*-*-*)
3616                 supported_defaults="arch cpu"
3617                 case "$with_arch" in
3618                 "" | "m68k"| "cf")
3619                         m68k_arch_family="$with_arch"
3620                         ;;
3621                 *)
3622                         echo "Invalid --with-arch=$with_arch" 1>&2
3623                         exit 1
3624                         ;;
3625                 esac
3627                 # We always have a $with_cpu setting here.
3628                 case "$with_cpu" in
3629                 "m68000" | "m68010" | "m68020" | "m68030" | "m68040" | "m68060")
3630                         m68k_cpu_ident=$with_cpu
3631                         ;;
3632                 "m68020-40")
3633                         m68k_cpu_ident=m68020
3634                         tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_40"
3635                         ;;
3636                 "m68020-60")
3637                         m68k_cpu_ident=m68020
3638                         tm_defines="$tm_defines M68K_DEFAULT_TUNE=u68020_60"
3639                         ;;
3640                 *)
3641                         # We need the C identifier rather than the string.
3642                         m68k_cpu_ident=`awk -v arg="\"$with_cpu\"" \
3643                            'BEGIN { FS="[ \t]*[,()][ \t]*" }; \
3644                             $1 == "M68K_DEVICE" && $2 == arg { print $3 }' \
3645                                  ${srcdir}/config/m68k/m68k-devices.def`
3646                         if [ x"$m68k_cpu_ident" = x ] ; then
3647                                 echo "Unknown CPU used in --with-cpu=$with_cpu" 1>&2
3648                                 exit 1
3649                         fi
3650                         with_cpu="mcpu=$with_cpu"
3651                         ;;
3652                 esac
3653                 ;;
3655         hppa*-*-*)
3656                 supported_defaults="arch schedule"
3658                 case "$with_arch" in
3659                 "" | 1.0 | 1.1 | 2.0)
3660                         # OK
3661                         ;;
3662                 *)
3663                         echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
3664                         exit 1
3665                         ;;
3666                 esac
3668                 case "$with_schedule" in
3669                 "" | 700 | 7100 | 7100LC | 7200 | 7300 | 8000)
3670                         # OK
3671                         ;;
3672                 *)
3673                         echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
3674                         exit 1
3675                         ;;
3676                 esac
3677                 ;;
3679         i[34567]86-*-* | x86_64-*-*)
3680                 supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
3681                 for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3682                         eval "val=\$with_$which"
3683                         case " $x86_archs " in
3684                         *" ${val} "*)
3685                                 case "${target}" in
3686                                   x86_64-*-*)
3687                                       case "x$which" in
3688                                         *_32)
3689                                                 ;;
3690                                         *)
3691                                                 echo "CPU given in --with-$which=$val doesn't support 64bit mode." 1>&2
3692                                                 exit 1
3693                                                 ;;
3694                                       esac
3695                                       ;;
3696                                 esac
3697                                 # OK
3698                                 ;;
3699                         *)
3700                                 if test x${val} != x; then
3701                                         case " $x86_64_archs " in
3702                                         *" ${val} "*)
3703                                                 # OK
3704                                                 ;;
3705                                         *)
3706                                                 # Allow $x86_cpus --with-cpu=/--with-tune=
3707                                                 case "x$which" in
3708                                                 xcpu*|xtune*)
3709                                                         case " $x86_cpus " in
3710                                                         *" ${val} "*)
3711                                                                 # OK
3712                                                                 ;;
3713                                                         *)
3714                                                                 echo "Unknown CPU given in --with-$which=$val." 1>&2
3715                                                                 exit 1
3716                                                                 ;;
3717                                                         esac
3718                                                         ;;
3719                                                 *)
3720                                                         echo "Unknown CPU given in --with-$which=$val." 1>&2
3721                                                         exit 1
3722                                                         ;;
3723                                                 esac
3724                                         ;;
3725                                         esac
3726                                 fi
3727                                 ;;
3728                         esac
3729                 done
3730                 ;;
3732         mips*-*-*)
3733                 supported_defaults="abi arch arch_32 arch_64 float fpu nan tune tune_32 tune_64 divide llsc mips-plt synci"
3735                 case ${with_float} in
3736                 "" | soft | hard)
3737                         # OK
3738                         ;;
3739                 *)
3740                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3741                         exit 1
3742                         ;;
3743                 esac
3745                 case ${with_fpu} in
3746                 "" | single | double)
3747                         # OK
3748                         ;;
3749                 *)
3750                         echo "Unknown fpu type used in --with-fpu=$with_fpu" 1>&2
3751                         exit 1
3752                         ;;
3753                 esac
3755                 case ${with_nan} in
3756                 "" | 2008 | legacy)
3757                         # OK
3758                         ;;
3759                 *)
3760                         echo "Unknown NaN encoding used in --with-nan=$with_nan" 1>&2
3761                         exit 1
3762                         ;;
3763                 esac
3765                 case ${with_abi} in
3766                 "" | 32 | o64 | n32 | 64 | eabi)
3767                         # OK
3768                         ;;
3769                 *)
3770                         echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
3771                         exit 1
3772                         ;;
3773                 esac
3775                 case ${with_divide} in
3776                 "" | breaks | traps)
3777                         # OK
3778                         ;;
3779                 *)
3780                         echo "Unknown division check type use in --with-divide=$with_divide" 1>&2
3781                         exit 1
3782                         ;;
3783                 esac
3785                 case ${with_llsc} in
3786                 yes)
3787                         with_llsc=llsc
3788                         ;;
3789                 no)
3790                         with_llsc="no-llsc"
3791                         ;;
3792                 "")
3793                         # OK
3794                         ;;
3795                 *)
3796                         echo "Unknown llsc type used in --with-llsc" 1>&2
3797                         exit 1
3798                         ;;
3799                 esac
3801                 case ${with_mips_plt} in
3802                 yes)
3803                         with_mips_plt=plt
3804                         ;;
3805                 no)
3806                         with_mips_plt=no-plt
3807                         ;;
3808                 "")
3809                         ;;
3810                 *)
3811                         echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2
3812                         exit 1
3813                         ;;
3814                 esac
3816                 case ${with_synci} in
3817                 yes)
3818                         with_synci=synci
3819                         ;;
3820                 no)
3821                         with_synci=no-synci
3822                         ;;
3823                 "")
3824                         ;;
3825                 *)
3826                         echo "Unknown synci type used in --with-synci" 1>&2
3827                         exit 1
3828                         ;;
3829                 esac
3830                 ;;
3832         nds32*-*-*)
3833                 supported_defaults="arch nds32_lib"
3835                 # process --with-arch
3836                 case "${with_arch}" in
3837                 "" | v2 | v3 | v3m)
3838                         # OK
3839                         ;;
3840                 *)
3841                         echo "Cannot accept --with-arch=$with_arch, available values are: v2 v3 v3m" 1>&2
3842                         exit 1
3843                         ;;
3844                 esac
3846                 # process --with-nds32-lib
3847                 case "${with_nds32_lib}" in
3848                 "")
3849                         # the default library is newlib
3850                         with_nds32_lib=newlib
3851                         ;;
3852                 newlib)
3853                         # OK
3854                         ;;
3855                 mculib)
3856                         # OK
3857                         ;;
3858                 *)
3859                         echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib" 1>&2
3860                         exit 1
3861                         ;;
3862                 esac
3863                 ;;
3865         powerpc*-*-* | rs6000-*-*)
3866                 supported_defaults="abi cpu cpu_32 cpu_64 float tune tune_32 tune_64"
3868                 for which in cpu cpu_32 cpu_64 tune tune_32 tune_64; do
3869                         eval "val=\$with_$which"
3870                         case ${val} in
3871                         default32 | default64)
3872                                 case $which in
3873                                 cpu | tune)
3874                                         ;;
3875                                 *)
3876                                         echo "$val only valid for --with-cpu and --with-tune." 1>&2
3877                                         exit 1
3878                                         ;;
3879                                 esac
3880                                 with_which="with_$which"
3881                                 eval $with_which=
3882                                 ;;
3883                         405cr)
3884                                 tm_defines="${tm_defines} CONFIG_PPC405CR"
3885                                 eval "with_$which=405"
3886                                 ;;
3887                         "" | common | native \
3888                         | power | power[2345678] | power6x | powerpc | powerpc64 \
3889                         | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
3890                         | 401 | 403 | 405 | 405fp | 440 | 440fp | 464 | 464fp \
3891                         | 476 | 476fp | 505 | 601 | 602 | 603 | 603e | ec603e \
3892                         | 604 | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
3893                         | a2 | e300c[23] | 854[08] | e500mc | e500mc64 | e5500 | e6500 \
3894                         | titan | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5 | cell)
3895                                 # OK
3896                                 ;;
3897                         *)
3898                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
3899                                 exit 1
3900                                 ;;
3901                         esac
3902                 done
3904                 case "$with_abi" in
3905                 "" | elfv1 | elfv2 )
3906                         #OK
3907                         ;;
3908                 *)
3909                         echo "Unknown ABI used in --with-abi=$with_abi"
3910                         exit 1
3911                         ;;
3912                 esac
3913                 ;;
3915         s390*-*-*)
3916                 supported_defaults="arch mode tune"
3918                 for which in arch tune; do
3919                         eval "val=\$with_$which"
3920                         case ${val} in
3921                         "" | g5 | g6 | z900 | z990 | z9-109 | z9-ec | z10 | z196 | zEC12)
3922                                 # OK
3923                                 ;;
3924                         *)
3925                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
3926                                 exit 1
3927                                 ;;
3928                         esac
3929                 done
3931                 case ${with_mode} in
3932                 "" | esa | zarch)
3933                         # OK
3934                         ;;
3935                 *)
3936                         echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
3937                         exit 1
3938                         ;;
3939                 esac
3940                 ;;
3942         sh[123456ble]-*-* | sh-*-*)
3943                 supported_defaults="cpu"
3944                 case "`echo $with_cpu | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz- | sed s/sh/m/`" in
3945                 "" | m1 | m2 | m2e | m3 | m3e | m4 | m4-single | m4-single-only | m4-nofpu )
3946                         # OK
3947                         ;;
3948                 m2a | m2a-single | m2a-single-only | m2a-nofpu)
3949                         ;;
3950                 m4a | m4a-single | m4a-single-only | m4a-nofpu | m4al)
3951                         ;;
3952                 *)
3953                         echo "Unknown CPU used in --with-cpu=$with_cpu, known values:"  1>&2
3954                         echo "m1 m2 m2e m3 m3e m4 m4-single m4-single-only m4-nofpu" 1>&2
3955                         echo "m4a m4a-single m4a-single-only m4a-nofpu m4al" 1>&2
3956                         echo "m2a m2a-single m2a-single-only m2a-nofpu" 1>&2
3957                         exit 1
3958                         ;;
3959                 esac
3960                 ;;
3961         sparc*-*-*)
3962                 supported_defaults="cpu float tune"
3964                 for which in cpu tune; do
3965                         eval "val=\$with_$which"
3966                         case ${val} in
3967                         "" | sparc | sparcv9 | sparc64 \
3968                         | v7 | cypress \
3969                         | v8 | supersparc | hypersparc | leon | leon3 \
3970                         | sparclite | f930 | f934 | sparclite86x \
3971                         | sparclet | tsc701 \
3972                         | v9 | ultrasparc | ultrasparc3 | niagara | niagara2 \
3973                         | niagara3 | niagara4)
3974                                 # OK
3975                                 ;;
3976                         *)
3977                                 echo "Unknown cpu used in --with-$which=$val" 1>&2
3978                                 exit 1
3979                                 ;;
3980                         esac
3981                 done
3983                 case ${with_float} in
3984                 "" | soft | hard)
3985                         # OK
3986                         ;;
3987                 *)
3988                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
3989                         exit 1
3990                         ;;
3991                 esac
3992                 ;;
3994         spu-*-*)
3995                 supported_defaults="arch tune"
3997                 for which in arch tune; do
3998                         eval "val=\$with_$which"
3999                         case ${val} in
4000                         "" | cell | celledp)
4001                                 # OK
4002                                 ;;
4003                         *)
4004                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
4005                                 exit 1
4006                                 ;;
4007                         esac
4008                 done
4009                 ;;
4011         tic6x-*-*)
4012                 supported_defaults="arch"
4014                 case ${with_arch} in
4015                 "" | c62x | c64x | c64x+ | c67x | c67x+ | c674x)
4016                         # OK
4017                         ;;
4018                 *)
4019                         echo "Unknown arch used in --with-arch=$with_arch." 1>&2
4020                         exit 1
4021                         ;;
4022                 esac
4023                 ;;
4025         v850*-*-*)
4026                 supported_defaults=cpu
4027                 case ${with_cpu} in
4028                 "" | v850e | v850e1 | v850e2 | v850es | v850e2v3 | v850e3v5)
4029                         # OK
4030                         ;;
4031                 *)
4032                         echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
4033                         exit 1
4034                         ;;
4035                 esac
4036                 ;;
4037 esac
4039 # Set some miscellaneous flags for particular targets.
4040 target_cpu_default2=
4041 case ${target} in
4042         aarch64*-*-*)
4043                 if test x"$target_cpu_cname" != x
4044                 then
4045                         target_cpu_default2=$target_cpu_cname
4046                 fi
4047                 ;;
4049         arm*-*-*)
4050                 if test x$target_cpu_cname = x
4051                 then
4052                         target_cpu_default2=TARGET_CPU_generic
4053                 else
4054                         target_cpu_default2=TARGET_CPU_$target_cpu_cname
4055                 fi
4056                 ;;
4058         hppa*-*-*)
4059                 if test x$gas = xyes
4060                 then
4061                         target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
4062                 fi
4063                 ;;
4065         fido*-*-* | m68k*-*-*)
4066                 target_cpu_default2=$m68k_cpu_ident
4067                 tmake_file="m68k/t-opts $tmake_file"
4068                 if [ x"$m68k_arch_family" != x ]; then
4069                         tmake_file="m68k/t-$m68k_arch_family $tmake_file"
4070                 fi
4071                 ;;
4073         i[34567]86-*-darwin* | x86_64-*-darwin*)
4074                 ;;
4075         i[34567]86-*-linux* | x86_64-*-linux*)
4076                 tmake_file="$tmake_file i386/t-linux"
4077                 ;;
4078         i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
4079                 tmake_file="$tmake_file i386/t-kfreebsd"
4080                 ;;
4081         i[34567]86-*-gnu*)
4082                 tmake_file="$tmake_file i386/t-gnu"
4083                 ;;
4084         i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
4085                 ;;
4086         i[34567]86-*-cygwin* | x86_64-*-cygwin*)
4087                 ;;
4088         i[34567]86-*-mingw* | x86_64-*-mingw*)
4089                 ;;
4090         i[34567]86-*-freebsd* | x86_64-*-freebsd*)
4091                 ;;
4092         ia64*-*-linux*)
4093                 ;;
4095         mips*-*-*)
4096                 if test x$gnu_ld = xyes
4097                 then
4098                         target_cpu_default2="MASK_SPLIT_ADDRESSES"
4099                 fi
4100                 case ${target} in
4101                         mips*el-*-*)
4102                                 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
4103                                 ;;
4104                 esac
4105                 tmake_file="mips/t-mips $tmake_file"
4106                 ;;
4108         powerpc*-*-* | rs6000-*-*)
4109                 # FIXME: The PowerPC port uses the value set at compile time,
4110                 # although it's only cosmetic.
4111                 if test "x$with_cpu" != x
4112                 then
4113                         target_cpu_default2="\\\"$with_cpu\\\""
4114                 fi
4115                 out_file=rs6000/rs6000.c
4116                 c_target_objs="${c_target_objs} rs6000-c.o"
4117                 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
4118                 tmake_file="rs6000/t-rs6000 ${tmake_file}"
4119                 ;;
4121         sh[123456ble]*-*-* | sh-*-*)
4122                 c_target_objs="${c_target_objs} sh-c.o"
4123                 cxx_target_objs="${cxx_target_objs} sh-c.o"
4124                 ;;
4126         sparc*-*-*)
4127                 # Some standard aliases.
4128                 case x$with_cpu in
4129                 xsparc)
4130                         with_cpu=v7
4131                         ;;
4132                 xsparcv9 | xsparc64)
4133                         with_cpu=v9
4134                         ;;
4135                 esac
4137                 if test x$with_tune = x ; then
4138                       case ${target} in
4139                       *-leon-*)
4140                           with_tune=leon
4141                           ;;
4142                       *-leon[3-9]*)
4143                           with_tune=leon3
4144                           ;;
4145                       esac
4146                 fi
4148                 # The SPARC port checks this value at compile-time.
4149                 target_cpu_default2="TARGET_CPU_$with_cpu"
4150                 ;;
4152         v850*-*-*)
4153                 case "x$with_cpu" in
4154                 x)
4155                         ;;
4156                 xv850e | xv850e1 | xv850e2 | xv850e2v3 | xv850e3v5)
4157                         target_cpu_default2="TARGET_CPU_$with_cpu"
4158                         ;;
4159                 xv850es)
4160                         target_cpu_default2="TARGET_CPU_v850e1"
4161                         ;;
4162                 esac
4163                 ;;
4164 esac
4167 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"
4168 for option in $all_defaults
4170         eval "val=\$with_"`echo $option | sed s/-/_/g`
4171         if test -n "$val"; then
4172                 case " $supported_defaults " in
4173                 *" $option "*)
4174                         ;;
4175                 *)
4176                         echo "This target does not support --with-$option." 2>&1
4177                         echo "Valid --with options are: $supported_defaults" 2>&1
4178                         exit 1
4179                         ;;
4180                 esac
4182                 if test "x$t" = x
4183                 then
4184                         t="{ \"$option\", \"$val\" }"
4185                 else
4186                         t="${t}, { \"$option\", \"$val\" }"
4187                 fi
4188         fi
4189 done
4191 if test "x$t" = x
4192 then
4193         configure_default_options="{ { NULL, NULL} }"
4194 else
4195         configure_default_options="{ ${t} }"
4198 if test "$target_cpu_default2" != ""
4199 then
4200         if test "$target_cpu_default" != ""
4201         then
4202                 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
4203         else
4204                 target_cpu_default=$target_cpu_default2
4205         fi