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