OSDN Git Service

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