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