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