OSDN Git Service

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