OSDN Git Service

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