OSDN Git Service

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