OSDN Git Service

003-08-02 Andreas Tobler <a.tobler@schweiz.ch>
[pf3gnuchains/gcc-fork.git] / gcc / config.gcc
1 # GCC build-, host- and target-specific configuration file.
2 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
3 # 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 2, 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 COPYING.  If not, write to the Free
19 #Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 #02111-1307, USA.
21
22 # This is the GCC build-, host- and target-specific configuration file
23 # where a configuration type, as recognized and generated by config.bfd,
24 # is mapped to different system-specific definitions and files.  This is
25 # invoked by the autoconf-generated configure script, called for build,
26 # host and target in that order, setting ${machine} to each.  Putting it
27 # in a separate shell file lets us skip running autoconf when modifying
28 # build-, host- and target-specific information.
29
30 # This file switches on the shell variable ${machine}, and also uses the
31 # following shell variables:
32 #
33 #  with_*               Various variables as set by configure.
34 #
35 #  enable_threads_flag  Either the name, yes or no depending on whether
36 #                       threads support was requested.
37 #
38 #  default_use_cxa_atexit
39 #                       "no" by default, can be set to "yes" if a target
40 #                       wishes to use __cxa_atexit() by default if the
41 #                       $enable___cxa_atexit variable is not set.
42 #
43 #  gas_flag             Either yes or no depending on whether GNU as was
44 #                       requested.
45 #
46 #  gnu_ld_flag          Either yes or no depending on whether GNU ld was
47 #                       requested.
48
49 # This file sets the following shell variables for use by the
50 # autoconf-generated configure script:
51 #
52 #  cpu_type             The name of the cpu, if different from machine.
53 #
54 #  tm_defines           List of target macros to define for all compilations.
55 #
56 #  tm_file              A list of target macro files, if different from
57 #                       "$cpu_type/$cpu_type.h". Usually it's constructed
58 #                       per target in a way like this:
59 #                       tm_file="${tm_file} dbxelf.h elfos.h svr4.h ${cpu_type.h}/elf.h"
60 #                       Note that the preferred order is:
61 #                       - specific target header "${cpu_type}/${cpu_type.h}"
62 #                       - generic headers like dbxelf.h elfos.h, netware.h, etc.
63 #                       - specializing target headers like ${cpu_type.h}/elf.h
64 #                       This helps to keep OS specific stuff out of the CPU
65 #                       defining header ${cpu_type}/${cpu_type.h}.
66 #
67 #  tm_p_file            Location of file with declarations for functions
68 #                       in $out_file.
69 #
70 #  out_file             The name of the machine description C support
71 #                       file, if different from "$cpu_type/$cpu_type.c".
72 #
73 #  md_file              The name of the machine-description file, if
74 #                       different from "$cpu_type/$cpu_type.md".
75 #
76 #  tmake_file           A list of machine-description-specific
77 #                       makefile-fragments, if different from
78 #                       "$cpu_type/t-$cpu_type".
79 #
80 #  extra_modes          The name of the file containing a list of extra
81 #                       machine modes, if necessary and different from
82 #                       "$cpu_type/$cpu_type-modes.def".
83 #
84 #  extra_objs           List of extra objects that should be linked into
85 #                       the compiler proper (cc1, cc1obj, cc1plus)
86 #                       depending on target.
87 #
88 #  extra_headers        List of used header files from the directory
89 #                       config/${cpu_type}.
90 #
91 #  host_xmake_file      List of host-specific makefile-fragments.
92 #
93 #  extra_passes         List of extra executables compiled for this target
94 #                       machine, used for compiling from source to object.
95 #
96 #  extra_parts          List of extra object files that should be compiled
97 #                       for this target machine.
98 #
99 #  extra_programs       Like extra_passes, but these are used when linking.
100 #
101 #  host_extra_objs      List of extra host-dependent objects that should
102 #                       be linked into the compiler proper.
103 #
104 #  host_extra_gcc_objs  List of extra host-dependent objects that should
105 #                       be linked into the gcc driver.
106 #
107 #  out_host_hook_obj    An object file that provides the host hooks.
108 #
109 #  c_target_objs        List of extra target-dependent objects that be
110 #                       linked into the C compiler only.
111 #
112 #  cxx_target_objs      List of extra target-dependent objects that be
113 #                       linked into the C++ compiler only.
114 #
115 #  target_gtfiles       List of extra source files with type information.
116 #
117 #  build_xm_defines     List of macros to define when compiling for the
118 #                       build machine.
119 #
120 #  build_xm_file        List of files to include when compiling for the
121 #                       build machine.
122 #
123 #  host_xm_defines      List of macros to define when compiling for the
124 #                       host machine.
125 #
126 #  host_xm_file         List of files to include when compiling for the
127 #                       host machine.
128 #
129 #  xm_defines           List of macros to define when compiling for the
130 #                       target machine.
131 #
132 #  xm_file              List of files to include when compiling for the
133 #                       target machine.
134 #
135 #  use_collect2         Set to yes or no, depending on whether collect2
136 #                       will be used.
137 #
138 #  target_cpu_default   Set to override the default target model.
139 #
140 #  build_install_headers_dir
141 #                       Target to use when installing header files.
142 #
143 #  gdb_needs_out_file_path
144 #                       Set to yes if gdb needs a dir command with
145 #                       `dirname $out_file`.
146 #
147 #  build_exeext         Set to the suffix, if the build machine requires
148 #                       executables to have a file name suffix.
149 #
150 #  host_exeext          Set to the suffix, if the host machine requires
151 #                       executables to have a file name suffix.
152 #
153 #  thread_file          Set to control which thread package to use.
154 #
155 #  gas                  Set to yes or no depending on whether the target
156 #                       system normally uses GNU as.
157 #
158 #  need_64bit_hwint     Set to yes if HOST_WIDE_INT must be 64 bits wide
159 #                       for this target.  This is true iff
160 #                       MAX_LONG_TYPE_SIZE is 64.  (The code which
161 #                       determines the underlying integral type for
162 #                       HOST_WIDE_INT cannot see the definition of
163 #                       MAX_LONG_TYPE_SIZE.)
164 #
165 #  configure_default_options
166 #                       Set to an initializer for configure_default_options
167 #                       in configargs.h, based on --with-cpu et cetera.
168
169 # The following variables are used in each case-construct to build up the
170 # outgoing variables:
171 #
172 #  xmake_file           Makefile-fragment when this system is as a host,
173 #                       for host_xmake_file.
174 #
175 #  extra_host_objs      List of extra objects that should be linked into
176 #                       the compiler proper when this system is a host,
177 #                       for host_extra_objs.
178 #
179 #  host_hook_obj        An object file that provides the host hooks.
180 #
181 #  install_headers_dir  Makefile-target for how the header file directory
182 #                       is installed, when this system is a build system,
183 #                       for build_install_headers_dir.
184 #
185 #  exeext               The suffix for executables on this system.
186 #
187 #  gnu_ld               Set to yes or no depending on whether the target
188 #                       system normally uses GNU ld.
189
190 out_file=
191 xmake_file=
192 tmake_file=
193 extra_headers=
194 extra_passes=
195 extra_parts=
196 extra_programs=
197 extra_objs=
198 extra_host_objs=
199 extra_gcc_objs=
200 c_target_objs=
201 cxx_target_objs=
202 host_hook_obj=host-default.o
203 tm_defines=
204 xm_defines=
205 # Set this to force installation and use of collect2.
206 use_collect2=
207 # Set this to override the default target model.
208 target_cpu_default=
209 # Set this to control how the header file directory is installed.
210 install_headers_dir=install-headers-tar
211 # Set this if gdb needs a dir command with `dirname $out_file`
212 gdb_needs_out_file_path=
213 # Set this if the build machine requires executables to have a
214 # file name suffix.
215 exeext=
216 # Set this to control which thread package will be used.
217 thread_file=
218 # Reinitialize these from the flag values every loop pass, since some
219 # configure entries modify them.
220 gas="$gas_flag"
221 gnu_ld="$gnu_ld_flag"
222 enable_threads=$enable_threads_flag
223 default_use_cxa_atexit=no
224 target_gtfiles=
225 need_64bit_hwint=
226
227 # Don't carry these over build->host->target.  Please.
228 xm_file=
229 md_file=
230
231 # Obsolete configurations.
232 case $machine in
233  dummy)
234     if test "x$enable_obsolete" != xyes; then
235       echo "*** Configuration $machine is obsolete." >&2
236       echo "*** Specify --enable-obsolete to build it anyway." >&2
237       echo "*** Support will be REMOVED in the next major release of GCC," >&2
238       echo "*** unless a maintainer comes forward." >&2
239       exit 1
240     fi;;
241 esac
242
243 # Unsupported targets list.  Do not put an entry in this list unless
244 # it would otherwise be caught by a more permissive pattern.  The list
245 # should be in alphabetical order.
246 case $machine in
247    alpha*-*-linux*libc1*                \
248  | i[34567]86-sequent-sysv*             \
249  | i[34567]86-go32-*                    \
250  | i[34567]86-*-go32*                   \
251  | m68k-*-linux*aout*                   \
252  | m68k-*-linux*libc1*                  \
253  | mips64orion*-*-rtems*                \
254  | powerpc-*-linux*libc1*               \
255  | sparc-*-linux*aout*                  \
256  | sparc-*-linux*libc1*                 \
257  | sparc-hal-solaris2*                  \
258  | thumb-*-*                            \
259  | *-*-linux*coff*                      \
260  | *-*-linux*oldld*                     \
261  | *-*-rtemsaout*                       \
262  | *-*-rtemscoff*                       \
263  )
264         echo "*** Configuration $machine not supported" 1>&2
265         exit 1
266         ;;
267 esac
268
269 # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
270 # updated in each machine entry.  Also set default extra_headers for some
271 # machines.
272 tm_p_file=
273 cpu_type=`echo $machine | sed 's/-.*$//'`
274 case $machine in
275 alpha*-*-*)
276         cpu_type=alpha
277         need_64bit_hwint=yes
278         ;;
279 am33_2.0-*-linux*)
280         cpu_type=mn10300
281         ;;
282 strongarm*-*-*)
283         cpu_type=arm
284         ;;
285 arm*-*-*)
286         cpu_type=arm
287         extra_headers="mmintrin.h"
288         ;;
289 ep9312*-*-*)
290         cpu_type=arm
291         ;;
292 xscale-*-*)
293         cpu_type=arm
294         extra_headers="mmintrin.h"
295         ;;
296 i[34567]86-*-*)
297         cpu_type=i386
298         extra_headers="mmintrin.h xmmintrin.h emmintrin.h pmmintrin.h"
299         ;;
300 x86_64-*-*)
301         cpu_type=i386
302         extra_headers="mmintrin.h xmmintrin.h emmintrin.h pmmintrin.h"
303         need_64bit_hwint=yes
304         ;;
305 ia64-*-*)
306         extra_headers=ia64intrin.h
307         need_64bit_hwint=yes
308         ;;
309 hppa*-*-* | parisc*-*-*)
310         cpu_type=pa
311         ;;
312 m680[012]0-*-*)
313         cpu_type=m68k
314         extra_headers=math-68881.h
315         ;;
316 m68k-*-*)
317         extra_headers=math-68881.h
318         ;;
319 mips*-*-*)
320         cpu_type=mips
321         need_64bit_hwint=yes
322         ;;
323 powerpc*-*-*)
324         cpu_type=rs6000
325         extra_headers="ppc-asm.h altivec.h spe.h"
326         need_64bit_hwint=yes
327         ;;
328 rs6000*-*-*)
329         need_64bit_hwint=yes
330         ;;
331 sparc64*-*-*)
332         cpu_type=sparc
333         need_64bit_hwint=yes
334         ;;
335 sparc*-*-*)
336         cpu_type=sparc
337         ;;
338 s390*-*-*)
339         need_64bit_hwint=yes
340         ;;
341 # Note the 'l'; we need to be able to match e.g. "shle" or "shl".
342 sh[123456789l]*-*-*)
343         cpu_type=sh
344         need_64bit_hwint=yes
345         ;;
346 tic4x-*-*)
347         cpu_type=c4x
348         ;;
349 esac
350
351 tm_file=${cpu_type}/${cpu_type}.h
352 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h
353 then
354         tm_p_file=${cpu_type}/${cpu_type}-protos.h
355 fi
356 extra_modes=
357 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-modes.def
358 then
359         extra_modes=${cpu_type}/${cpu_type}-modes.def
360 fi
361
362 case $machine in
363 x86_64-*-*)
364         tm_file="i386/biarch64.h ${tm_file}"
365         ;;
366 esac
367
368 # On a.out targets, we need to use collect2.
369 case $machine in
370 *-*-*aout*)
371         use_collect2=yes
372         ;;
373 esac
374
375 # Common parts for widely ported systems.
376 case $machine in
377 *-*-linux*)
378         case $machine in
379          *-*-linux*libc1* | *-*-linux*aout*)
380                 ;;
381         *)
382                 extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
383                 gas=yes gnu_ld=yes
384                 case x${enable_threads} in
385                         x | xyes | xposix) thread_file='posix'
386                         ;;
387                 esac
388                 ;;
389         esac
390         ;;
391 *-*-gnu*)
392         # On the Hurd, the setup is just about the same on
393         # each different CPU.  The specific machines that we
394         # support are matched above and just set $cpu_type.
395         tm_file="${cpu_type}/gnu.h"
396         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
397         # GNU always uses ELF.
398         elf=yes
399         # GNU tools are the only tools.
400         gnu_ld=yes
401         gas=yes
402         # These details are the same as for Linux.
403         # But here we need a little extra magic.
404         tmake_file="t-slibgcc-elf-ver t-linux t-gnu"
405         case $machine in
406         alpha*)
407                 tm_file="${cpu_type}/${cpu_type}.h alpha/elf.h alpha/linux.h alpha/linux-elf.h gnu.h ${tm_file}"
408                 ;;
409         i[34567]86-*-*)
410                 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}"
411                 ;;
412         esac
413         ;;
414 *-*-openbsd*)
415         tm_file=${cpu_type}/openbsd.h
416         tmake_file="t-libc-ok t-openbsd t-libgcc-pic"
417         if test x$enable_threads = xyes; then
418                 thread_file='posix'
419                 tmake_file="${tmake_file} t-openbsd-thread"
420         fi
421         ;;
422 *-*-netbsd*)
423         tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
424         gas=yes
425         gnu_ld=yes
426
427         # NetBSD 2.0 and later get POSIX threads enabled by default.
428         # Allow them to be explicitly enabled on any other version.
429         case x${enable_threads} in
430         x)
431                 case $machine in
432                 *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
433                         thread_file='posix'
434                         tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
435                         ;;
436                 esac
437                 ;;
438         xyes | xposix)
439                 thread_file='posix'
440                 tm_defines="${tm_defines} NETBSD_ENABLE_PTHREADS"
441                 ;;
442         esac
443
444         # NetBSD 1.7 and later are set up to use GCC's crtstuff for
445         # ELF configurations.  We will clear extra_parts in the
446         # a.out configurations.
447         case $machine in
448         *-*-netbsd*1.[7-9]* | *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
449                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
450                 ;;
451         esac
452
453         # NetBSD 2.0 and later provide __cxa_atexit(), which we use by
454         # default (unless overridden by --disable-__cxa_atexit).
455         case $machine in
456         *-*-netbsd[2-9]* | *-*-netbsdelf[2-9]*)
457                 default_use_cxa_atexit=yes
458                 ;;
459         esac
460         ;;
461 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
462         # This is the place-holder for the generic a.out configuration
463         # of FreeBSD.  No actual configuration resides here since
464         # there was only ever a bare-bones ix86 configuration for
465         # a.out and it exists solely in the machine-specific section.
466         # This place-holder must exist to avoid dropping into
467         # the generic ELF configuration of FreeBSD (i.e. it must be
468         # ordered before that section).
469         ;;
470 *-*-freebsd*)
471         # This is the generic ELF configuration of FreeBSD.  Later
472         # machine-specific sections may refine and add to this
473         # configuration.
474         #
475         # Due to tm_file entry ordering issues that vary between cpu
476         # architectures, we only define fbsd_tm_file to allow the
477         # machine-specific section to dictate the final order of all
478         # entries of tm_file with the minor exception that components
479         # of the tm_file set here will always be of the form:
480         #
481         # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd-spec.h freebsd.h
482         #
483         # The machine-specific section should not tamper with this
484         # ordering but may order all other entries of tm_file as it
485         # pleases around the provided core setting.
486         gas=yes
487         gnu_ld=yes
488         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
489         case $machine in
490         *-*-freebsd3 | *-*-freebsd[3].*) fbsd_tm_file="freebsd3.h";;
491         *-*-freebsd4 | *-*-freebsd[4].*) fbsd_tm_file="freebsd4.h";;
492         *-*-freebsd5 | *-*-freebsd[5].*) fbsd_tm_file="freebsd5.h";;
493         *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";;
494         *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
495         esac
496         tmake_file="t-slibgcc-elf-ver t-freebsd"
497         xmake_file=none
498         case x${enable_threads} in
499         xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";;
500         x | xyes | xpthreads | xposix)
501                 thread_file='posix'
502                 tmake_file="${tmake_file} t-freebsd-thread"
503                 # Before 5.0, FreeBSD can't bind shared libraries to -lc
504                 # when "optionally" threaded via weak pthread_* checks.
505                 case $machine in
506                 *-*-freebsd[34] | *-*-freebsd[34].*)
507                         tmake_file="${tmake_file} t-slibgcc-nolc-override";;
508                 esac
509                 ;;
510         *) echo 'Unknown thread configuration for FreeBSD'; exit 1;;
511         esac
512         fbsd_tm_file="${fbsd_tm_file} freebsd-spec.h freebsd.h"
513         ;;
514 *-*-darwin*)
515         tm_file="${tm_file} darwin.h"
516         tm_p_file="${tm_p_file} darwin-protos.h"
517         tmake_file="t-darwin"
518         target_gtfiles="\$(srcdir)/config/darwin.c"
519         c_target_objs="darwin-c.o"
520         cxx_target_objs="darwin-c.o"
521         extra_parts="crt2.o"
522         extra_objs="darwin.o"
523         case x${enable_threads} in
524              x | xyes | xposix) thread_file='posix'
525              ;;
526         esac
527         ;;      
528 *-*-vxworks*)
529         tmake_file=t-vxworks
530         tm_file="${tm_file} elfos.h svr4.h vxworks.h"
531         thread_file='vxworks'
532         use_collect2=yes
533         ;;
534 esac
535
536 case $machine in
537 # Support site-specific machine types.
538 *local*)
539         rest=`echo $machine | sed -e "s/$cpu_type-//"`
540         tm_file=${cpu_type}/$rest.h
541         if test -f $srcdir/config/${cpu_type}/xm-$rest.h
542         then xm_file=${cpu_type}/xm-$rest.h
543         fi
544         if test -f $srcdir/config/${cpu_type}/x-$rest
545         then xmake_file=${cpu_type}/x-$rest
546         fi
547         if test -f $srcdir/config/${cpu_type}/t-$rest
548         then tmake_file=${cpu_type}/t-$rest
549         fi
550         ;;
551 alpha*-*-unicosmk*)
552         use_collect2=yes
553         tm_file="${tm_file} alpha/unicosmk.h"
554
555         # Don't include t-ieee for now because we don't support that yet
556         # tmake_file="alpha/t-ieee"
557         tmake_file="alpha/t-unicosmk"
558         ;;
559 alpha*-*-linux*)
560         tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
561         target_cpu_default="MASK_GAS"
562         tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
563         ;;
564 alpha*-*-gnu*)
565         target_cpu_default="MASK_GAS"
566         tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
567         ;;
568 alpha*-*-freebsd*)
569         tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
570         target_cpu_default="MASK_GAS"
571         tmake_file="${tmake_file} alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
572         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
573         ;;
574 alpha*-*-netbsd*)
575         tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
576         target_cpu_default="MASK_GAS"
577         tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
578         ;;
579
580 alpha*-*-openbsd*)
581         tm_file="${cpu_type}/${cpu_type}.h ${tm_file}"
582         # default x-alpha is only appropriate for dec-osf.
583         target_cpu_default="MASK_GAS"
584         tmake_file="alpha/t-alpha alpha/t-ieee"
585         ;;
586
587 alpha*-dec-osf[45]*)
588         if test x$stabs = xyes
589         then
590                 tm_file="${tm_file} dbx.h"
591         fi
592         if test x$gas != xyes
593         then
594                 extra_passes="mips-tfile mips-tdump"
595         fi
596         use_collect2=yes
597         tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf4"
598         tm_file="${tm_file} alpha/osf.h"
599         extra_headers=va_list.h
600         case $machine in
601           *-*-osf4*)
602             # Some versions of OSF4 (specifically X4.0-9 296.7) have
603             # a broken tar, so we use cpio instead.
604             install_headers_dir=install-headers-cpio
605             # Set target_cpu_default except on 4.0a.
606             case $machine in
607                 *-*-osf4.0a) ;;
608                 *) target_cpu_default=MASK_SUPPORT_ARCH
609             esac
610             ;;
611           *-*-osf5*)
612             tm_file="${tm_file} alpha/osf5.h"
613             target_cpu_default=MASK_SUPPORT_ARCH
614             ;;
615         esac
616         case x${enable_threads} in
617         x | xyes | xpthreads | xposix)
618             thread_file='posix'
619             tmake_file="${tmake_file} alpha/t-osf-pthread"
620             ;;
621         esac
622         ;;
623 alpha64-dec-*vms*)
624         tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
625         xm_file="alpha/xm-vms.h"
626         tmake_file="alpha/t-alpha alpha/t-vms alpha/t-vms64 alpha/t-ieee"
627         xmake_file=alpha/x-vms
628         exeext=.exe
629         # This removes the cpu type and manufacturer components and
630         #  replaces "." with "_" in the operating system version.
631         case $host in *-*-*vms*)
632                 target_alias=`echo $host \
633                   | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
634                 ;;
635         esac
636         install_headers_dir=install-headers-cp
637         prefix=/gnu
638         local_prefix=/gnu
639         ;;
640 alpha*-dec-*vms*)
641         tm_file="${tm_file} alpha/vms.h"
642         xm_file=alpha/xm-vms.h
643         tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
644         xmake_file=alpha/x-vms
645         exeext=.exe
646         # This removes the cpu type and manufacturer components and
647         #  replaces "." with "_" in the operating system version.
648         case $host in *-*-*vms*)
649                 target_alias=`echo $host \
650                   | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
651                 ;;
652         esac
653         install_headers_dir=install-headers-cp
654         prefix=/gnu
655         local_prefix=/gnu
656         ;;
657 arc-*-elf*)
658         tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
659         extra_parts="crtinit.o crtfini.o"
660         ;;
661 arm-*-coff* | armel-*-coff*)
662         tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h"
663         tmake_file=arm/t-arm-coff
664         ;;
665 arm-semi-aof | armel-semi-aof)
666         tm_file="arm/semiaof.h arm/aof.h arm/arm.h"
667         tmake_file=arm/t-semi
668         ;;
669 arm*-*-freebsd*|strongarm*-*-freebsd*)
670         tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
671         tmake_file="${tmake_file} arm/t-strongarm-elf"
672         ;;
673 arm*-*-netbsdelf*)
674         tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h"
675         tmake_file="${tmake_file} arm/t-netbsd"
676         ;;
677 arm*-*-netbsd*)
678         tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h"
679         tmake_file="t-netbsd arm/t-netbsd"
680         extra_parts=""
681         use_collect2=yes
682         ;;
683 arm*-*-linux*)                  # ARM GNU/Linux with ELF
684         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
685         tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
686         extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
687         gnu_ld=yes
688         case x${enable_threads} in
689         x | xyes | xpthreads | xposix)
690                 thread_file='posix'
691                 ;;
692         esac
693         ;;
694 arm*-*-uclinux*)                # ARM ucLinux
695         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h arm/uclinux-elf.h"
696         tmake_file=arm/t-arm-elf
697         ;;
698 arm*-*-ecos-elf)
699         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
700         tmake_file=arm/t-arm-elf
701         ;;
702 arm*-*-rtems*)
703         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"
704         tmake_file="arm/t-arm-elf t-rtems"
705         if test x$enable_threads = xyes; then
706           thread_file='rtems'
707         fi
708         ;;
709 arm*-*-elf | ep9312-*-elf)
710         tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
711         tmake_file=arm/t-arm-elf
712         ;;
713 arm*-wince-pe*)
714         tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h arm/pe.h arm/wince-pe.h"
715         tmake_file=arm/t-wince-pe
716         extra_objs="pe.o"
717         ;;
718 arm-*-pe*)
719         tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h arm/pe.h"
720         tmake_file=arm/t-pe
721         extra_objs="pe.o"
722         ;;
723 arm*-*-kaos*)
724         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"
725         tmake_file=arm/t-arm-elf
726         ;;
727 avr-*-*)
728         ;;
729 c4x-*-rtems* | tic4x-*-rtems*)
730         tmake_file="c4x/t-c4x t-rtems"
731         tm_file="c4x/c4x.h c4x/rtems.h rtems.h"
732         if test x$enable_threads = xyes; then
733           thread_file='rtems'
734         fi
735         c_target_objs="c4x-c.o"
736         cxx_target_objs="c4x-c.o"
737         ;;
738 c4x-* | tic4x-*)
739         tmake_file=c4x/t-c4x
740         c_target_objs="c4x-c.o"
741         cxx_target_objs="c4x-c.o"
742         ;;
743 cris-*-aout)
744         tm_file="dbxelf.h ${tm_file} cris/aout.h"
745         gas=yes
746         tmake_file="cris/t-cris cris/t-aout"
747         ;;
748 cris-*-elf | cris-*-none)
749         tm_file="dbxelf.h elfos.h ${tm_file}"
750         tmake_file="cris/t-cris cris/t-elfmulti"
751         gas=yes
752         ;;
753 cris-*-linux*)
754         tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h cris/linux.h"
755         tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux"
756         ;;
757 d30v-*)
758         tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
759         ;;
760 dsp16xx-*)
761         ;;
762 fr30-*-elf)
763         tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
764         tmake_file=fr30/t-fr30
765         extra_parts="crti.o crtn.o crtbegin.o crtend.o"
766         ;;
767 frv-*-elf)
768         tm_file="dbxelf.h elfos.h svr4.h ${tm_file} frv/frv-abi.h"
769         tmake_file=frv/t-frv
770         ;;
771 h8300-*-rtems*)
772         tmake_file="h8300/t-h8300 t-rtems"
773         tm_file="h8300/h8300.h h8300/rtems.h rtems.h"
774         if test x$enable_threads = xyes; then
775           thread_file='rtems'
776         fi
777         ;;
778 h8300-*-elf*)
779         tmake_file="h8300/t-h8300 h8300/t-elf"
780         tm_file="h8300/h8300.h h8300/elf.h"
781         ;;
782 h8300-*-*)
783         ;;
784 hppa*64*-*-linux* | parisc*64*-*-linux*)
785         target_cpu_default="(MASK_PA_11 | MASK_PA_20)"
786         tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h svr4.h linux.h \
787                  pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h pa/pa64-linux.h"
788         tmake_file=pa/t-linux64
789         gas=yes gnu_ld=yes
790         need_64bit_hwint=yes
791         ;;
792 hppa*-*-linux* | parisc*-*-linux*)
793         target_cpu_default="MASK_PA_11 | MASK_NO_SPACE_REGS"
794         tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h pa/pa-linux.h \
795                  pa/pa32-regs.h pa/pa32-linux.h"
796         tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
797         ;;
798 hppa*-*-openbsd*)
799         target_cpu_default="MASK_PA_11"
800         tmake_file=pa/t-bsd
801         ;;
802 hppa1.1-*-pro*)
803         target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
804         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
805         tmake_file="pa/t-bsd pa/t-pro"
806         xmake_file="pa/x-ada"
807         ;;
808 hppa1.1-*-osf*)
809         target_cpu_default="MASK_PA_11"
810         tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
811         tmake_file="pa/t-bsd pa/t-pa"
812         xmake_file="pa/x-ada"
813         use_collect2=yes
814         ;;
815 hppa1.1-*-rtems*)
816         target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
817         tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h rtems.h"
818         tmake_file="pa/t-bsd pa/t-pro t-rtems"
819         xmake_file="pa/x-ada"
820         if test x$enable_threads = xyes; then
821           thread_file='rtems'
822         fi
823         ;;
824 hppa1.1-*-bsd*)
825         tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
826         target_cpu_default="MASK_PA_11"
827         tmake_file="pa/t-bsd pa/t-pa"
828         xmake_file="pa/x-ada"
829         use_collect2=yes
830         ;;
831 hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
832         target_cpu_default="MASK_PA_11"
833         tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
834         tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
835         xmake_file="pa/x-ada"
836         if test x$enable_threads = x; then
837             enable_threads=$have_pthread_h
838         fi
839         case x${enable_threads} in
840         xyes | xdce)
841                 tmake_file="${tmake_file} pa/t-dce-thr"
842                 ;;
843         esac
844         install_headers_dir=install-headers-cpio
845         use_collect2=yes
846         ;;
847 hppa1.0-*-hpux10*)
848         tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
849         tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
850         xmake_file="pa/x-ada"
851         if test x$enable_threads = x; then
852             enable_threads=$have_pthread_h
853         fi
854         case x${enable_threads} in
855         xyes | xdce)
856                 tmake_file="${tmake_file} pa/t-dce-thr"
857                 ;;
858         esac
859         install_headers_dir=install-headers-cpio
860         use_collect2=yes
861         ;;
862 hppa*64*-*-hpux11*)
863         if test x$gas = xyes
864         then
865                 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h  \
866                          pa/pa64-regs.h pa/long_double.h pa/pa-hpux.h \
867                          pa/pa-hpux11.h pa/pa-64.h pa/pa64-hpux.h"
868         else
869                 tm_file="pa/pa64-start.h ${tm_file} dbxelf.h pa/elf.h \
870                          pa/pa64-regs.h pa/long_double.h pa/pa-hpux.h \
871                          pa/pa-hpux11.h pa/pa-64.h pa/pa64-hpux.h"
872         fi
873         need_64bit_hwint=yes
874         tmake_file="pa/t-pa64 pa/t-pa-hpux"
875         xmake_file="pa/x-ada"
876         target_cpu_default="(MASK_PA_11|MASK_PA_20|MASK_GAS)"
877         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
878         if test x$gnu_ld = xyes
879         then
880                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
881         fi
882 #       if [ x$enable_threads = x ]; then
883 #           enable_threads=$have_pthread_h
884 #       fi
885 #       if [ x$enable_threads = xyes ]; then
886 #               thread_file='dce'
887 #               tmake_file="${tmake_file} pa/t-dce-thr"
888 #       fi
889         install_headers_dir=install-headers-cpio
890         ;;
891 hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
892         target_cpu_default="MASK_PA_11"
893         tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
894         tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
895         xmake_file="pa/x-ada"
896 #       if test x$enable_threads = x; then
897 #           enable_threads=$have_pthread_h
898 #       fi
899 #       if test x$enable_threads = xyes; then
900 #               thread_file='dce'
901 #               tmake_file="${tmake_file} pa/t-dce-thr"
902 #       fi
903         install_headers_dir=install-headers-cpio
904         use_collect2=yes
905         ;;
906 hppa1.0-*-hpux11*)
907         tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
908         tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
909         xmake_file="pa/x-ada"
910 #       if test x$enable_threads = x; then
911 #           enable_threads=$have_pthread_h
912 #       fi
913 #       if test x$enable_threads = xyes; then
914 #               thread_file='dce'
915 #               tmake_file="${tmake_file} pa/t-dce-thr"
916 #       fi
917         install_headers_dir=install-headers-cpio
918         use_collect2=yes
919         ;;
920 i370-*-opened*)                  # IBM 360/370/390 Architecture
921         xm_defines='FATAL_EXIT_CODE=12'
922         tm_file=i370/oe.h
923         tmake_file="i370/t-oe i370/t-i370"
924         c_target_objs="i370-c.o"
925         cxx_target_objs="i370-c.o"
926         ;;
927 i370-*-mvs*)
928         xm_defines='FATAL_EXIT_CODE=12'
929         tm_file=i370/mvs.h
930         tmake_file="i370/t-i370"
931         c_target_objs="i370-c.o"
932         cxx_target_objs="i370-c.o"
933         ;;
934 i370-*-linux*)
935         tm_file="dbxelf.h elfos.h svr4.h linux.h i370/linux.h ${tm_file}"
936         tmake_file="t-slibgcc-elf-ver t-linux"
937         # broken_install=yes
938         elf=yes
939         ;;
940 i[34567]86-*-darwin*)
941         tm_file="${tm_file} i386/darwin.h"
942         ;;
943 i[34567]86-*-elf*)
944         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h"
945         tmake_file="i386/t-i386elf t-svr4"
946         ;;
947 i[34567]86-ncr-sysv4*)          # NCR 3000 - ix86 running system V.4
948         xm_defines="SMALL_ARG_MAX"
949         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h"
950         extra_parts="crtbegin.o crtend.o"
951         tmake_file=i386/t-crtpic
952         ;;
953 i[34567]86-*-netware)           # Intel 80386's running netware
954         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h netware.h i386/netware.h"
955         tmake_file=i386/t-netware
956         ;;
957 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
958         if test x$gas = xyes
959         then
960                 tm_file="${tm_file} usegas.h"
961         fi
962         xm_defines="SMALL_ARG_MAX"
963         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ptx4.h i386/ptx4-i.h"
964         tmake_file=t-svr4
965         extra_parts="crtbegin.o crtend.o"
966         install_headers_dir=install-headers-cpio
967         ;;
968 i[34567]86-*-aout*)
969         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/i386-aout.h"
970         ;;
971 i[34567]86-*-beoself* | i[34567]86-*-beos*)
972         tmake_file='i386/t-beos i386/t-crtpic'
973         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/beos-elf.h"
974         extra_parts='crtbegin.o crtend.o'
975         ;;
976 i[34567]86-*-freebsd2 | i[34567]86-*-freebsd2.* | i[34567]86-*-freebsd*aout*)
977         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/freebsd-aout.h"
978         tmake_file=t-freebsd
979         ;;
980 i[34567]86-*-freebsd*)
981         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
982         ;;
983 x86_64-*-freebsd*)
984         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"
985         ;;
986 i[34567]86-*-netbsdelf*)
987         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
988         ;;
989 i[34567]86-*-netbsd*)
990         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h"
991         tmake_file=t-netbsd
992         extra_parts=""
993         use_collect2=yes
994         ;;
995 x86_64-*-netbsd*)
996         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"
997         ;;
998 i[34567]86-*-openbsd*)
999         tm_file="${cpu_type}/${cpu_type}.h i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h openbsd-oldgas.h openbsd.h ${tm_file}"
1000         # needed to unconfuse gdb
1001         tmake_file="t-libc-ok t-openbsd i386/t-openbsd"
1002         # we need collect2 until our bug is fixed...
1003         use_collect2=yes
1004         ;;
1005 i[34567]86-*-coff*)
1006         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/i386-coff.h"
1007         ;;
1008 i[34567]86-*-linux*aout*)       # Intel 80386's running GNU/Linux
1009                                 # with a.out format
1010         tmake_file="t-linux-aout i386/t-crtstuff"
1011         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h linux-aout.h i386/linux-aout.h"
1012         gnu_ld=yes
1013         ;;
1014 i[34567]86-*-linux*libc1)       # Intel 80386's running GNU/Linux
1015                                 # with ELF format using the
1016                                 # GNU/Linux C library 5
1017         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
1018         tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1 i386/t-crtstuff"
1019         extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1020         gnu_ld=yes
1021         if test x$enable_threads = xyes; then
1022                 thread_file='single'
1023         fi
1024         ;;
1025 i[34567]86-*-linux*)    # Intel 80386's running GNU/Linux
1026                         # with ELF format using glibc 2
1027                         # aka GNU/Linux C library 6
1028         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h"
1029         tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
1030         ;;
1031 x86_64-*-linux*)
1032         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \
1033                  i386/x86-64.h i386/linux64.h"
1034         tmake_file="t-slibgcc-elf-ver t-linux i386/t-linux64"
1035         ;;
1036 i[34567]86-*-gnu*)
1037         ;;
1038 i[34567]86-pc-msdosdjgpp*)
1039         xm_file=i386/xm-djgpp.h
1040         tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h"
1041         tmake_file=i386/t-djgpp
1042         gnu_ld=yes
1043         gas=yes
1044         exeext=.exe
1045         case $host in *pc-msdosdjgpp*)
1046                 target_alias=djgpp
1047                 ;;
1048         esac
1049         ;;
1050 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1051         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h i386/linux.h i386/moss.h"
1052         tmake_file=t-libc-ok
1053         gnu_ld=yes
1054         gas=yes
1055         ;;
1056 i[34567]86-*-lynxos*)
1057         if test x$gas = xyes
1058         then
1059                 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx.h i386/lynx.h"
1060         else
1061                 tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h lynx-ng.h i386/lynx-ng.h"
1062         fi
1063         ;;
1064 i[34567]86-*-mach*)
1065         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h i386/mach.h"
1066 #       tmake_file=t-libc-ok
1067         use_collect2=yes
1068         ;;
1069 i[34567]86-*-rtems*)
1070         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h"
1071         extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1072         tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1073         if test x$enable_threads = xyes; then
1074           thread_file='rtems'
1075         fi
1076         ;;
1077 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1078         install_headers_dir=install-headers-cpio
1079         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sco5.h"
1080         if test x$gas = xyes
1081         then
1082                 tm_file="usegas.h ${tm_file}"
1083         fi
1084         tmake_file=i386/t-sco5
1085         extra_parts="crtbegin.o crtend.o"
1086         ;;
1087 i[34567]86-*-solaris2*)
1088         xm_defines="SMALL_ARG_MAX"
1089         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h i386/sol2.h"
1090         tmake_file="i386/t-sol2 t-svr4"
1091         if test x$gnu_ld = xyes; then
1092                 tmake_file="$tmake_file t-slibgcc-elf-ver"
1093         else
1094                 tmake_file="$tmake_file t-slibgcc-sld"
1095         fi
1096         extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1097         if test x${enable_threads} = x; then
1098             enable_threads=$have_pthread_h
1099             if test x${enable_threads} = x; then
1100                 enable_threads=$have_thread_h
1101             fi
1102         fi
1103         if test x${enable_threads} = xyes; then
1104             if test x${have_pthread_h} = xyes; then
1105                 thread_file='posix'
1106             else
1107                 thread_file='solaris'
1108             fi
1109         fi
1110         ;;
1111 i[34567]86-*-sysv5*)           # Intel x86 on System V Release 5
1112        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h"
1113        if test x$stabs = xyes
1114        then
1115                tm_file="${tm_file} dbx.h"
1116        fi
1117        tmake_file="i386/t-crtpic t-svr4"
1118        extra_parts="crtbegin.o crtend.o"
1119        if test x$enable_threads = xyes; then
1120                thread_file='posix'
1121        fi
1122        ;;
1123 i[34567]86-*-sysv4*)            # Intel 80386's running system V.4
1124         xm_defines="SMALL_ARG_MAX"
1125         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv4-cpp.h"
1126         if test x$stabs = xyes
1127         then
1128                 tm_file="${tm_file} dbx.h"
1129         fi
1130         tmake_file="i386/t-crtpic t-svr4"
1131         extra_parts="crtbegin.o crtend.o"
1132         ;;
1133 i[34567]86-*-udk*)      # Intel x86 on SCO UW/OSR5 Dev Kit
1134         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h i386/sysv5.h i386/udk.h"
1135         tmake_file="i386/t-crtpic i386/t-udk t-svr4"
1136         extra_parts="crtbegin.o crtend.o"
1137         install_headers_dir=install-headers-cpio
1138         ;;
1139 i[34567]86-*-sysv*)             # Intel 80386's running system V
1140         if test x$gas = xyes
1141         then
1142                 if test x$stabs = xyes
1143                 then
1144                         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/svr3gas.h i386/svr3dbx.h"
1145                         tmake_file=i386/t-svr3dbx
1146                         extra_parts="svr3.ifile svr3z.ifile"
1147                 else
1148                         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/svr3gas.h"
1149                         extra_parts="crtbegin.o crtend.o"
1150                         tmake_file=i386/t-crtstuff
1151                 fi
1152         else
1153                 tm_file="${tm_file} svr3.h i386/unix.h i386/att.h i386/sysv3.h"
1154                 extra_parts="crtbegin.o crtend.o"
1155                 tmake_file=i386/t-crtstuff
1156         fi
1157         tmake_file="$tmake_file i386/t-crtpic"
1158         ;;
1159 i386-*-vsta)                    # Intel 80386's running VSTa kernel
1160         xm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/xm-vsta.h"
1161         tm_file="${tm_file} i386/vsta.h"
1162         ;;
1163 i[34567]86-*-pe | i[34567]86-*-cygwin*)
1164         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h"
1165         xm_file=i386/xm-cygwin.h
1166         tmake_file="i386/t-cygming i386/t-cygwin"
1167         extra_objs=winnt.o
1168         c_target_objs=cygwin2.o
1169         cxx_target_objs=cygwin2.o
1170         if test x$enable_threads = xyes; then
1171                 thread_file='posix'
1172         fi
1173         exeext=.exe
1174         ;;
1175 i[34567]86-*-mingw32*)
1176         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h"
1177         xm_file=i386/xm-mingw32.h
1178         tmake_file="i386/t-cygming i386/t-mingw32"
1179         xmake_file=i386/x-mingw32
1180         extra_objs=winnt.o
1181         if test x$enable_threads = xyes; then
1182                 thread_file='win32'
1183         fi
1184         exeext=.exe
1185         case $machine in
1186                 *mingw32crt*)
1187                         tm_file="${tm_file} i386/crtdll.h"
1188                         ;;
1189                 *mingw32msv* | *mingw32*)
1190                         ;;
1191         esac
1192         ;;
1193 i[34567]86-*-uwin*)
1194         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygwin.h i386/uwin.h"
1195         tmake_file="i386/t-cygwin i386/t-uwin"
1196         extra_objs=winnt.o
1197         if test x$enable_threads = xyes; then
1198                 thread_file='win32'
1199         fi
1200         exeext=.exe
1201         ;;
1202 i[34567]86-*-interix3*)
1203         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"
1204         tmake_file="t-interix i386/t-interix"
1205         extra_objs=winnt.o
1206         xmake_file="x-interix"
1207         if test x$enable_threads = xyes ; then
1208                 thread_file='posix'
1209         fi
1210         if test x$stabs = xyes ; then
1211                 tm_file="${tm_file} dbxcoff.h"
1212         fi
1213         ;;
1214 i[34567]86-*-interix*)
1215         tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/i386-interix.h interix.h"
1216         tmake_file="t-interix i386/t-interix"
1217         extra_objs=winnt.o
1218         if test x$enable_threads = xyes ; then
1219                 thread_file='posix'
1220         fi
1221         if test x$stabs = xyes ; then
1222                 tm_file="${tm_file} dbxcoff.h"
1223         fi
1224         ;;
1225 i[34567]86-*-kaos*)
1226         tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h kaos.h i386/kaos-i386.h"
1227         tmake_file="i386/t-i386elf t-svr4"
1228         ;;
1229 i960-*-coff*)
1230         tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1231         tmake_file=i960/t-960bare
1232         c_target_objs="i960-c.o"
1233         cxx_target_objs="i960-c.o"
1234         ;;
1235 i960-*-rtems)
1236         tmake_file="i960/t-960bare t-rtems"
1237         tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/rtems.h rtems.h"
1238         if test x$enable_threads = xyes; then
1239           thread_file='rtems'
1240         fi
1241         c_target_objs="i960-c.o"
1242         cxx_target_objs="i960-c.o"
1243         ;;
1244 i960-*-*)                       # Default i960 environment.
1245         use_collect2=yes
1246         tmake_file=i960/t-960bare
1247         c_target_objs="i960-c.o"
1248         cxx_target_objs="i960-c.o"
1249         ;;
1250 ia64*-*-elf*)
1251         tm_file="${tm_file} dbxelf.h elfos.h ia64/sysv4.h ia64/elf.h"
1252         tmake_file="ia64/t-ia64"
1253         target_cpu_default="0"
1254         if test x$gas = xyes
1255         then
1256                 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1257         fi
1258         if test x$gnu_ld = xyes
1259         then
1260                 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1261         fi
1262         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1263         ;;
1264 ia64*-*-freebsd*)
1265         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} ia64/sysv4.h ia64/freebsd.h"
1266         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1267         tmake_file="${tmake_file} ia64/t-ia64"
1268         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1269         ;;
1270 ia64*-*-linux*)
1271         tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
1272         tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc"
1273         target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1274         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"
1275         if test x"$use_libunwind_exceptions" = xyes; then
1276           tmake_file="$tmake_file t-libunwind"
1277         fi
1278         ;;
1279 ia64*-*-hpux*)
1280         tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h ia64/hpux_longdouble.h"
1281         tmake_file="ia64/t-ia64 ia64/t-hpux"
1282         target_cpu_default="MASK_GNU_AS"
1283         if test x$enable_threads = xyes; then
1284                 thread_file='posix'
1285         fi
1286         use_collect2=no
1287         c_target_objs="ia64-c.o"
1288         cxx_target_objs="ia64-c.o"
1289         ;;
1290 ip2k-*-elf)
1291         tm_file="elfos.h ${tm_file}"
1292         ;;
1293 m32r-*-elf*)
1294         tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
1295         extra_parts="crtinit.o crtfini.o"
1296         ;;
1297 # m68hc11 and m68hc12 share the same machine description.
1298 m68hc11-*-*|m6811-*-*)
1299         tm_file="dbxelf.h elfos.h m68hc11/m68hc11.h"
1300         tm_p_file="m68hc11/m68hc11-protos.h"
1301         md_file="m68hc11/m68hc11.md"
1302         out_file="m68hc11/m68hc11.c"
1303         tmake_file="m68hc11/t-m68hc11-gas"
1304         ;;
1305 m68hc12-*-*|m6812-*-*)
1306         tm_file="m68hc11/m68hc12.h dbxelf.h elfos.h m68hc11/m68hc11.h"
1307         tm_p_file="m68hc11/m68hc11-protos.h"
1308         md_file="m68hc11/m68hc11.md"
1309         out_file="m68hc11/m68hc11.c"
1310         tmake_file="m68hc11/t-m68hc11-gas"
1311         ;;
1312 m68000-hp-hpux*)                # HP 9000 series 300
1313         if test x$gas = xyes
1314         then
1315                 tm_file=m68k/hp310g.h
1316         else
1317                 tm_file=m68k/hp310.h
1318         fi
1319         tmake_file=m68k/t-hp320
1320         install_headers_dir=install-headers-cpio
1321         use_collect2=yes
1322         ;;
1323 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1324         if test x$gas = xyes
1325         then
1326                 tm_file=m68k/hp320g.h
1327         else
1328                 tm_file=m68k/hpux7.h
1329         fi
1330         install_headers_dir=install-headers-cpio
1331         use_collect2=yes
1332         ;;
1333 m68k-hp-hpux*)  # HP 9000 series 300
1334         if test x$gas = xyes
1335         then
1336                 tm_file=m68k/hp320g.h
1337         else
1338                 tm_file=m68k/hp320.h
1339         fi
1340         install_headers_dir=install-headers-cpio
1341         use_collect2=yes
1342         ;;
1343 m68k-*-aout*)
1344         tmake_file=m68k/t-m68kbare
1345         tm_file="m68k/m68k-aout.h libgloss.h"
1346         ;;
1347 m68k-*-coff*)
1348         tmake_file=m68k/t-m68kbare
1349         tm_file="m68k/m68k-coff.h dbx.h"
1350         ;;
1351 m68020-*-elf* | m68k-*-elf*)
1352         tm_file="m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h"
1353         tmake_file=m68k/t-m68kelf
1354         extra_parts="crtbegin.o crtend.o"
1355         ;;
1356 m68010-*-netbsdelf* | m68k*-*-netbsdelf*)
1357         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h"
1358         case $machine in
1359         m68010*)
1360                 target_cpu_default="0"
1361                 ;;
1362         *)
1363                 target_cpu_default="MASK_68020|MASK_68881|MASK_BITFIELD"
1364                 ;;
1365         esac
1366         ;;
1367 m68k*-*-netbsd*)
1368         tm_file=m68k/netbsd.h
1369         tmake_file=t-netbsd
1370         extra_parts=""
1371         use_collect2=yes
1372         ;;
1373 m68k*-*-openbsd*)
1374         # needed to unconfuse gdb
1375         tmake_file="t-libc-ok t-openbsd m68k/t-openbsd"
1376         # we need collect2 until our bug is fixed...
1377         use_collect2=yes
1378         ;;
1379 m68k-*-sysv4*)                  # Motorola m68k's running system V.4
1380         tm_file=m68k/m68kv4.h
1381         tmake_file=t-svr4
1382         extra_parts="crtbegin.o crtend.o"
1383         ;;
1384 m68k-*-linux*)          # Motorola m68k's running GNU/Linux
1385                                 # with ELF format using glibc 2
1386                                 # aka the GNU/Linux C library 6.
1387         tm_file=m68k/linux.h
1388         tmake_file="t-slibgcc-elf-ver t-linux"
1389         ;;
1390 m68k-*-rtems*)
1391         tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
1392         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"
1393         extra_parts="crtbegin.o crtend.o"
1394         if test x$enable_threads = xyes; then
1395           thread_file='rtems'
1396         fi
1397         ;;
1398 mcore-*-elf)
1399         tm_file="dbxelf.h elfos.h svr4.h ${tm_file} mcore/mcore-elf.h"
1400         tmake_file=mcore/t-mcore
1401         ;;
1402 mcore-*-pe*)
1403         tm_file=mcore/mcore-pe.h
1404         tmake_file=mcore/t-mcore-pe
1405         ;;
1406 mips-sgi-irix6*o32)             # SGI System V.4., IRIX 6, O32 ABI
1407         tm_file="${tm_file} mips/iris5.h"
1408         if test x$gas = xyes
1409         then
1410                 tm_file="${tm_file} mips/sdb.h mips/iris5gas.h mips/iris6-o32-gas.h"
1411                 if test x$stabs = xyes
1412                 then
1413                         tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
1414                 fi
1415                 tmake_file=mips/t-iris5-gas
1416         else
1417                 tm_file="${tm_file} mips/iris6-o32-as.h"
1418                 tmake_file=mips/t-iris5-as
1419         fi
1420         tm_file="${tm_file} mips/iris6-o32.h"
1421         tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6"
1422         xm_file=mips/xm-iris5.h
1423         target_cpu_default="MASK_ABICALLS"
1424         # mips-tfile doesn't work yet
1425         # See comment in mips/iris5.h file.
1426         use_collect2=yes
1427 #       if test x$enable_threads = xyes; then
1428 #               thread_file='irix'
1429 #       fi
1430         ;;
1431 mips-sgi-irix6*)                # SGI System V.4., IRIX 6
1432         tm_file="${tm_file} mips/iris5.h mips/iris6.h"
1433         if test "x$gnu_ld" = xyes
1434         then
1435                 tm_file="${tm_file} mips/iris6gld.h"
1436         fi
1437         tmake_file="mips/t-iris mips/t-iris5-6 mips/t-iris6"
1438         target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT"
1439         tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
1440 #       if test x$enable_threads = xyes; then
1441 #               thread_file='irix'
1442 #       fi
1443         ;;
1444 mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
1445         tm_file="${tm_file} mips/iris5.h mips/iris6.h mips/cross64.h"
1446         xm_file=mips/xm-iris5.h
1447         tmake_file="mips/t-iris mips/t-cross64"
1448         target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT"
1449         tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32"
1450         # See comment in mips/iris[56].h files.
1451         use_collect2=yes
1452 #       if test x$enable_threads = xyes; then
1453 #               thread_file='irix'
1454 #       fi
1455         ;;
1456 mips-sgi-irix5*)                # SGI System V.4., IRIX 5
1457         tm_file="${tm_file} mips/iris5.h"
1458         if test x$gas = xyes
1459         then
1460                 tm_file="${tm_file} mips/sdb.h mips/iris5gas.h"
1461                 if test x$stabs = xyes
1462                 then
1463                         tm_file="${tm_file} dbx.h mips/dbxmdebug.h"
1464                 fi
1465                 tmake_file=mips/t-iris5-gas
1466         else
1467                 tmake_file=mips/t-iris5-as
1468         fi
1469         tmake_file="${tmake_file} mips/t-iris mips/t-iris5-6"
1470         xm_file=mips/xm-iris5.h
1471         target_cpu_default="MASK_ABICALLS"
1472         # mips-tfile doesn't work yet
1473         # See comment in mips/iris5.h file.
1474         use_collect2=yes
1475 #       if test x$enable_threads = xyes; then
1476 #               thread_file='irix'
1477 #       fi
1478         ;;
1479 mips*-*-netbsd*)                        # NetBSD/mips, either endian.
1480         target_cpu_default="MASK_GAS|MASK_ABICALLS"
1481         tm_file="elfos.h ${tm_file} mips/netbsd.h"
1482         tmake_file="${tmake_file}"
1483         ;;
1484 mips64*-*-linux*)
1485         tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h mips/linux64.h"
1486         tmake_file="t-slibgcc-elf-ver t-linux mips/t-linux64"
1487
1488         # This default ABI is a partial lie: t-linux64 overrides the
1489         # DRIVER_SELF_SPEC that sets the default abi, in the spec file
1490         # that is installed.  What GCC thinks of as the default must
1491         # remain as ABI_32 such that the SONAMEs of the libgcc shared
1492         # libraries remain compatible with those of mips-linux-gnu.
1493         tm_defines="MIPS_ISA_DEFAULT=1 MIPS_ABI_DEFAULT=ABI_32"
1494         target_cpu_default="MASK_ABICALLS|MASK_FLOAT64|MASK_64BIT"
1495         extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
1496         gnu_ld=yes
1497         gas=yes
1498         if test x$enable_threads = xyes; then
1499                 thread_file='posix'
1500         fi
1501         ;;
1502 mips*-*-linux*)                         # Linux MIPS, either endian.
1503         tm_file="dbxelf.h elfos.h svr4.h linux.h ${tm_file} mips/linux.h"
1504         case $machine in
1505         mipsisa32*-*)
1506                 target_cpu_default="MASK_SOFT_FLOAT"
1507                 tm_defines="MIPS_ISA_DEFAULT=32"
1508                 ;;
1509         esac
1510         tmake_file="t-slibgcc-elf-ver t-linux"
1511         ;;
1512 mips*el-*-openbsd*)     # mips little endian
1513         target_cpu_default="MASK_GAS|MASK_ABICALLS"
1514         tm_file="${tm_file} mips/sdb.h"
1515         ;;
1516 mips*-*-openbsd*)               # mips big endian
1517         target_cpu_default="MASK_GAS|MASK_ABICALLS"
1518         tm_file="mips/openbsd-be.h ${tm_file} mips/sdb.h"
1519         ;;
1520 mipsisa32-*-elf* | mipsisa32el-*-elf*)
1521         tm_file="${tm_file} mips/elf.h"
1522         tmake_file=mips/t-isa3264
1523         tm_defines="MIPS_ISA_DEFAULT=32 MIPS_ABI_DEFAULT=ABI_EABI"
1524         ;;
1525 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
1526         tm_file="${tm_file} mips/elf.h"
1527         tmake_file=mips/t-isa3264
1528         tm_defines="MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_EABI"
1529         ;;
1530 mipsisa64-*-elf* | mipsisa64el-*-elf*)
1531         tm_file="${tm_file} mips/elf.h"
1532         tmake_file=mips/t-isa3264
1533         target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1534         tm_defines="MIPS_ISA_DEFAULT=64 MIPS_ABI_DEFAULT=ABI_EABI"
1535         ;;
1536 mipsisa64sr71k-*-elf*)
1537         tm_file="${tm_file} mips/elf.h"
1538         tmake_file=mips/t-sr71k
1539         target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1540         tm_defines="MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sr71000\\\" MIPS_ABI_DEFAULT=ABI_EABI"
1541         ;;
1542 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
1543         tm_file="${tm_file} mips/elf.h"
1544         tmake_file=mips/t-elf
1545         target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1546         tm_defines="MIPS_ISA_DEFAULT=64 MIPS_CPU_STRING_DEFAULT=\\\"sb1\\\" MIPS_ABI_DEFAULT=ABI_O64"
1547         ;;
1548 mips-*-elf* | mipsel-*-elf*)
1549         tm_file="${tm_file} mips/elf.h"
1550         tmake_file=mips/t-elf
1551         ;;
1552 mips64-*-elf* | mips64el-*-elf*)
1553         tm_file="${tm_file} mips/elf64.h"
1554         tmake_file=mips/t-elf
1555         target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1556         tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1557         ;;
1558 mips64vr-*-elf* | mips64vrel-*-elf*)
1559         tm_file="mips/vr.h ${tm_file} mips/elf64.h"
1560         tm_defines="MIPS_ABI_DEFAULT=ABI_O64 MIPS_MARCH_CONTROLS_SOFT_FLOAT=1"
1561         tmake_file=mips/t-vr
1562         ;;
1563 mips64orion-*-elf* | mips64orionel-*-elf*)
1564         tm_file="${tm_file} mips/elforion.h mips/elf64.h"
1565         tmake_file=mips/t-elf
1566         tmake_file=mips/t-elf
1567         target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
1568         tm_defines="MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_O64"
1569         ;;
1570 mips*-*-rtems*)
1571         tm_file="${tm_file} mips/elf.h mips/rtems.h rtems.h"
1572         tmake_file="mips/t-elf t-rtems"
1573         if test x$enable_threads = xyes; then
1574           thread_file='rtems'
1575         fi
1576         ;;
1577 mipstx39-*-elf* | mipstx39el-*-elf*)
1578         tm_file="${tm_file} mips/r3900.h mips/elf.h"
1579         tmake_file=mips/t-r3900
1580         ;;
1581 mmix-knuth-mmixware)
1582         need_64bit_hwint=yes
1583         ;;
1584 mn10300-*-*)
1585         tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
1586         if test x$stabs = xyes
1587         then
1588                 tm_file="${tm_file} dbx.h"
1589         fi
1590         use_collect2=no
1591         ;;
1592 ns32k-*-netbsdelf*)
1593         echo "GCC does not yet support the ${machine} target"; exit 1
1594         ;;
1595 ns32k-*-netbsd*)
1596         tm_file="${tm_file} netbsd.h netbsd-aout.h ns32k/netbsd.h"
1597         # On NetBSD, the headers are already okay, except for math.h.
1598         tmake_file="t-netbsd ns32k/t-ns32k"
1599         extra_parts=""
1600         use_collect2=yes
1601         ;;
1602 pdp11-*-bsd)
1603         tm_file="${tm_file} pdp11/2bsd.h"
1604         ;;
1605 pdp11-*-*)
1606         ;;
1607 avr-*-*)
1608         ;;
1609 powerpc-*-openbsd*)
1610         tmake_file="${tmake_file} rs6000/t-fprules "
1611         extra_headers=
1612         ;;
1613 powerpc64-*-linux*)
1614         tm_file="rs6000/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1615         case x$with_cpu in
1616         x|xpowerpc64|xdefault64) tm_file="${tm_file} rs6000/default64.h";;
1617         esac
1618         tm_file="${tm_file} rs6000/linux64.h"
1619         tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-linux rs6000/t-ppccomm rs6000/t-linux64"
1620         ;;
1621 powerpc64-*-gnu*)
1622         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"
1623         tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-gnu rs6000/t-linux64"
1624         ;;
1625 powerpc-*-beos*)
1626         tm_file="${tm_file} rs6000/aix.h rs6000/beos.h rs6000/xcoff.h"
1627         tmake_file="rs6000/t-fprules rs6000/t-beos"
1628         extra_headers=
1629         ;;
1630 powerpc-*-darwin*)
1631         tm_file="${tm_file} rs6000/darwin.h"
1632         tmake_file="rs6000/t-fprules t-darwin rs6000/t-darwin"
1633         extra_headers=altivec.h
1634         # override ppc default
1635         need_64bit_hwint=
1636         # powerpc-darwin host support.
1637         host_hook_obj=host-darwin.o
1638         xmake_file=rs6000/x-darwin
1639         ;;
1640 powerpc*-*-freebsd*)
1641         tm_file="${tm_file} dbxelf.h elfos.h ${fbsd_tm_file} rs6000/sysv4.h rs6000/freebsd.h"
1642         tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
1643         ;;
1644 powerpc-*-netbsd*)
1645         tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h"
1646         tmake_file="${tmake_file} rs6000/t-netbsd"
1647         ;;
1648 powerpc-*-chorusos*)
1649         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h chorus.h"
1650         tmake_file="rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm"
1651         case x${enable_threads} in
1652           xyes | xpthreads | xposix)
1653                 thread_file='posix'
1654                 ;;
1655         esac
1656         ;;
1657 powerpc-*-eabispe*)
1658         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabispe.h"
1659         tmake_file="rs6000/t-spe rs6000/t-ppccomm"
1660         ;;
1661 powerpc-*-eabisimaltivec*)
1662         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h rs6000/eabialtivec.h"
1663         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
1664         ;;
1665 powerpc-*-eabisim*)
1666         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
1667         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1668         ;;
1669 powerpc-*-elf*)
1670         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1671         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1672         ;;
1673 powerpc-*-eabialtivec*)
1674         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/eabialtivec.h"
1675         tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
1676         ;;
1677 powerpc-*-eabi*)
1678         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h"
1679         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1680         ;;
1681 powerpc-*-rtems*)
1682         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
1683         tmake_file="rs6000/t-fprules t-rtems rs6000/t-ppccomm"
1684         if test x$enable_threads = xyes; then
1685           thread_file='rtems'
1686         fi
1687         ;;
1688 powerpc-*-linux*altivec*)
1689         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h"
1690         tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
1691         ;;
1692 powerpc-*-linux*spe*)
1693         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h"
1694         tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
1695         ;;
1696 powerpc-*-linux*)
1697         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
1698         tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
1699         ;;
1700 powerpc-*-gnu-gnualtivec*)
1701         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"
1702         tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
1703         if test x$enable_threads = xyes; then
1704                 thread_file='posix'
1705         fi
1706         ;;
1707 powerpc-*-gnu*)
1708         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"
1709         tmake_file="rs6000/t-fprules rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm"
1710         if test x$enable_threads = xyes; then
1711                 thread_file='posix'
1712         fi
1713         ;;
1714 powerpc-wrs-vxworks*)
1715         # We want vxworks.h after rs6000/sysv4.h, which unfortunately
1716         # means we have to redo the tm_file list from scratch.
1717         tm_file="rs6000/rs6000.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h"
1718         tm_file="${tm_file} vxworks.h rs6000/vxworks.h"
1719         tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
1720         extra_headers=ppc-asm.h
1721         ;;
1722 powerpc-wrs-windiss*)
1723         tm_file="${tm_file} elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/windiss.h"
1724         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1725         thread_file=""
1726         ;;
1727 powerpcle-*-sysv*)
1728         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
1729         tmake_file="rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm"
1730         ;;
1731 powerpcle-*-elf*)
1732         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h"
1733         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1734         ;;
1735 powerpcle-*-eabisim*)
1736         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
1737         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1738         ;;
1739 powerpcle-*-eabi*)
1740         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
1741         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1742         ;;
1743 powerpc-*-kaos*)
1744         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h kaos.h rs6000/kaos-ppc.h"
1745         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1746         ;;
1747 powerpcle-*-kaos*)
1748         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"
1749         tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
1750         ;;
1751 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
1752         tm_file="${tm_file} rs6000/aix.h rs6000/aix41.h rs6000/xcoff.h"
1753         tmake_file="rs6000/t-fprules rs6000/t-newas"
1754         use_collect2=yes
1755         extra_headers=
1756         ;;
1757 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
1758         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix43.h rs6000/xcoff.h"
1759         tmake_file=rs6000/t-aix43
1760         use_collect2=yes
1761         thread_file='aix'
1762         extra_headers=
1763         ;;
1764 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
1765         tm_file="rs6000/biarch64.h ${tm_file} rs6000/aix.h rs6000/aix51.h rs6000/xcoff.h"
1766         tmake_file=rs6000/t-aix43
1767         use_collect2=yes
1768         thread_file='aix'
1769         extra_headers=
1770         ;;
1771 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
1772         tm_file="${tm_file} rs6000/aix.h rs6000/aix52.h rs6000/xcoff.h"
1773         tmake_file=rs6000/t-aix52
1774         use_collect2=yes
1775         thread_file='aix'
1776         extra_headers=
1777         ;;
1778 rs6000-*-lynxos*)
1779         tm_file="lynx.h rs6000/lynx.h"
1780         tmake_file=rs6000/t-fprules
1781         use_collect2=yes
1782         ;;
1783 s390-*-linux*)
1784         tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
1785         tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff"
1786         ;;
1787 s390x-*-linux*)
1788         tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
1789         tm_p_file=s390/s390-protos.h
1790         md_file=s390/s390.md
1791         extra_modes=s390/s390-modes.def
1792         out_file=s390/s390.c
1793         tmake_file="t-slibgcc-elf-ver t-linux s390/t-crtstuff s390/t-linux64"
1794         ;;
1795 sh-*-elf* | sh[2346l]*-*-elf* | sh*-*-kaos*)
1796         tmake_file="sh/t-sh sh/t-elf"
1797         case $machine in
1798         shl* | sh64l*)
1799                 tm_file="sh/little.h ${tm_file}"
1800                 tmake_file="${tmake_file} sh/t-le"
1801                 ;;
1802         esac
1803         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h"
1804         case $machine in
1805         sh64*)
1806                 tmake_file="${tmake_file} sh/t-sh64"
1807                 tm_file="${tm_file} sh/sh64.h"
1808                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
1809                 ;;
1810         sh4_single*)  target_cpu_default="SELECT_SH4_SINGLE" ;;
1811         sh4*)  target_cpu_default="SELECT_SH4" ;;
1812         sh3e*) target_cpu_default="SELECT_SH3E" ;;
1813         sh3*)  target_cpu_default="SELECT_SH3" ;;
1814         sh2e*) target_cpu_default="SELECT_SH2E" ;;
1815         sh2*)  target_cpu_default="SELECT_SH2" ;;
1816         esac
1817         case $machine in
1818         sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;;
1819         esac
1820         case $machine in
1821         sh*-*-kaos*) tm_file="${tm_file} kaos.h sh/kaos-sh.h" ;;
1822         esac
1823         ;;
1824 sh-*-rtemself*)
1825         tmake_file="sh/t-sh sh/t-elf t-rtems"
1826         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/rtemself.h rtems.h"
1827         if test x$enable_threads = xyes; then
1828           thread_file='rtems'
1829         fi
1830         ;;
1831 sh-*-rtems*)
1832         tmake_file="sh/t-sh t-rtems"
1833         tm_file="${tm_file} dbxcoff.h sh/coff.h sh/rtems.h rtems.h"
1834         if test x$enable_threads = xyes; then
1835           thread_file='rtems'
1836         fi
1837         ;;
1838 sh-*-linux* | sh[2346lbe]*-*-linux*)
1839         tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux"
1840         case $machine in
1841         sh*be-*-* | sh*eb-*-*) ;;
1842         *)
1843                 tm_file="sh/little.h ${tm_file}"
1844                 tmake_file="${tmake_file} sh/t-le"
1845                 ;;
1846         esac
1847         tmake_file="${tmake_file} sh/t-linux"
1848         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
1849         case $machine in
1850         sh64*)
1851                 tmake_file="${tmake_file} sh/t-sh64"
1852                 tm_file="${tm_file} sh/sh64.h"
1853                 extra_headers="shmedia.h ushmedia.h sshmedia.h"
1854                 ;;
1855         sh4_single*) target_cpu_default="SELECT_SH4_SINGLE" ;;
1856         sh4*) target_cpu_default="SELECT_SH4" ;;
1857         sh3e[lb]e*) target_cpu_default="SELECT_SH3E" ;;
1858         sh3e[lb]*) target_cpu_default="SELECT_SH3" ;;
1859         sh3e*) target_cpu_default="SELECT_SH3E" ;;
1860         sh3*) target_cpu_default="SELECT_SH3" ;;
1861         sh2e[lb]e*) target_cpu_default="SELECT_SH2E" ;;
1862         sh2e[lb]*) target_cpu_default="SELECT_SH2" ;;
1863         sh2e*) target_cpu_default="SELECT_SH2E" ;;
1864         sh2*) target_cpu_default="SELECT_SH2" ;;
1865         esac
1866         case $machine in
1867         sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;;
1868         esac
1869         ;;
1870 sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
1871   sh64-*-netbsd* | sh64l*-*-netbsd*)
1872         tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h netbsd.h netbsd-elf.h sh/netbsd-elf.h"
1873         tmake_file="${tmake_file} sh/t-sh sh/t-elf"
1874         case $machine in
1875         sh*l*-*)
1876                 tm_file="sh/little.h ${tm_file}"
1877                 tmake_file="${tmake_file} sh/t-le"
1878                 ;;
1879         *)
1880                 tmake_file="${tmake_file} sh/t-be"
1881                 ;;
1882         esac
1883         case $machine in
1884         sh5*-*)
1885                 # SHmedia, 32-bit ABI
1886                 target_cpu_default="SH5_BIT|SH4_BIT|SH3_BIT|SH_E_BIT"
1887                 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5"
1888                 ;;
1889         sh64*-*)
1890                 # SHmedia, 64-bit ABI
1891                 target_cpu_default="SH5_BIT|SH4_BIT"
1892                 tmake_file="${tmake_file} sh/t-sh64 sh/t-netbsd-sh5 sh/t-netbsd-sh5-64"
1893                 ;;
1894         *)
1895                 # SH3, software floating point
1896                 target_cpu_default="SH1_BIT|SH2_BIT|SH3_BIT"
1897                 tmake_file="${tmake_file} sh/t-netbsd"
1898                 ;;
1899         esac
1900         ;;
1901 sh-*-*)
1902         tm_file="${tm_file} dbxcoff.h sh/coff.h"
1903         ;;
1904 sparc-tti-*)
1905         tm_file="${tm_file} sparc/pbd.h"
1906         ;;
1907 sparc-*-netbsdelf*)
1908         tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
1909         ;;
1910 sparc-*-openbsd*)
1911         tm_file="sparc/sparc.h ${tm_file}"
1912         # needed to unconfuse gdb
1913         tmake_file="t-libc-ok t-openbsd sparc/t-openbsd"
1914         # we need collect2 until our bug is fixed...
1915         use_collect2=yes
1916         ;;
1917 sparc64-*-openbsd*)
1918         tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
1919         gas=yes gnu_ld=yes
1920         with_cpu=ultrasparc
1921         ;;
1922 sparc-*-elf*)
1923         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h"
1924         tmake_file="sparc/t-elf sparc/t-crtfm"
1925         extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1926         ;;
1927 sparc-*-linux*)         # SPARC's running GNU/Linux, libc6
1928         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
1929         tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm"
1930         ;;
1931 sparc-*-rtems*)
1932         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
1933         tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
1934         extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1935         if test x$enable_threads = xyes; then
1936           thread_file='rtems'
1937         fi
1938         ;;
1939 sparc64-*-solaris2* | sparcv9-*-solaris2*)
1940         tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h"
1941         if test x$gnu_ld = xyes; then
1942                 tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h"
1943         fi
1944         if test x$gas = xyes; then
1945                 tm_file="${tm_file} sparc/sol2-gas-bi.h"
1946         fi
1947         tmake_file="sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtfm"
1948         if test x$gnu_ld = xyes; then
1949                 tmake_file="$tmake_file t-slibgcc-elf-ver"
1950         else
1951                 tmake_file="$tmake_file t-slibgcc-sld"
1952         fi
1953         extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
1954         if test x${enable_threads} = x ; then
1955             enable_threads=$have_pthread_h
1956             if test x${enable_threads} = x ; then
1957                 enable_threads=$have_thread_h
1958             fi
1959         fi
1960         if test x${enable_threads} = xyes ; then
1961             if test x${have_pthread_h} = xyes ; then
1962                 thread_file='posix'
1963             else
1964                 thread_file='solaris'
1965             fi
1966         fi
1967         need_64bit_hwint=yes
1968         ;;
1969 sparc-*-solaris2*)
1970         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h"
1971         if test x$gnu_ld = xyes; then
1972                 tm_file="${tm_file} sparc/sol2-gld.h"
1973         fi
1974         tmake_file="sparc/t-sol2 sparc/t-crtfm"
1975         if test x$gnu_ld = xyes; then
1976                 tmake_file="$tmake_file t-slibgcc-elf-ver"
1977         else
1978                 tmake_file="$tmake_file t-slibgcc-sld"
1979         fi
1980         case $machine in
1981         *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*)
1982                 if test x$gnu_ld = xno; then
1983                         tm_file="${tm_file} sparc/sol26-sld.h"
1984                 fi
1985                 ;;
1986         *-*-solaris2.[789])
1987                 tm_file="sparc/biarch64.h ${tm_file} sparc/sol2-bi.h"
1988                 if test x$gnu_ld = xyes; then
1989                         tm_file="${tm_file} sparc/sol2-gld-bi.h"
1990                 fi
1991                 if test x$gas = xyes; then
1992                         tm_file="${tm_file} sparc/sol2-gas-bi.h"
1993                 fi
1994                 tmake_file="$tmake_file sparc/t-sol2-64"
1995                 need_64bit_hwint=yes
1996                 ;;
1997         esac
1998         extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1999         if test x${enable_threads} = x; then
2000             enable_threads=$have_pthread_h
2001             if test x${enable_threads} = x; then
2002                 enable_threads=$have_thread_h
2003             fi
2004         fi
2005         if test x${enable_threads} = xyes; then
2006             if test x${have_pthread_h} = xyes; then
2007                 thread_file='posix'
2008             else
2009                 thread_file='solaris'
2010             fi
2011         fi
2012         ;;
2013 sparc-*-sysv4*)
2014         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sysv4-only.h"
2015         tmake_file=t-svr4
2016         extra_parts="crtbegin.o crtend.o"
2017         ;;
2018 sparclite-*-coff*)
2019         tm_file="${tm_file} gofast.h sparc/lite.h svr3.h sparc/litecoff.h dbxcoff.h libgloss.h"
2020         tmake_file=sparc/t-sparclite
2021         ;;
2022 sparclite-*-elf*)
2023         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h"
2024         tmake_file="sparc/t-sparclite sparc/t-crtfm"
2025         extra_parts="crtbegin.o crtend.o"
2026         ;;
2027 sparc86x-*-elf*)
2028         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h"
2029         tmake_file="sparc/t-sp86x sparc/t-crtfm"
2030         extra_parts="crtbegin.o crtend.o"
2031         ;;
2032 sparc64-*-aout*)
2033         tm_file="sparc/sparc.h sparc/aout.h sparc/sp64-aout.h"
2034         ;;
2035 sparc64-*-elf*)
2036         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h"
2037         tmake_file="${tmake_file} sparc/t-crtfm"
2038         extra_parts="crtbegin.o crtend.o"
2039         ;;
2040 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
2041         tm_file="${tm_file} ${fbsd_tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/freebsd.h"
2042         tmake_file="${tmake_file} sparc/t-crtfm"
2043         xmake_file=none
2044         case "x$with_cpu" in
2045                 xultrasparc) ;;
2046                 x) with_cpu=ultrasparc ;;
2047                 *) echo "$with_cpu not supported for freebsd target"; exit 1 ;;
2048         esac
2049         need_64bit_hwint=yes
2050         ;;
2051 sparc64-*-linux*)               # 64-bit SPARC's running GNU/Linux
2052         tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux64 sparc/t-crtfm"
2053         tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
2054         ;;
2055 sparc64-*-netbsd*)
2056         tmake_file="${tmake_file} sparc/t-netbsd64"
2057         tm_file="sparc/biarch64.h ${tm_file}"
2058         tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h"
2059         ;;
2060 strongarm-*-elf*)
2061         tm_file="arm/strongarm-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
2062         tmake_file=arm/t-strongarm-elf
2063         out_file=arm/arm.c
2064         md_file=arm/arm.md
2065         extra_modes=arm/arm-modes.def
2066         ;;
2067 strongarm-*-pe)
2068         tm_file="arm/semi.h arm/aout.h arm/coff.h arm/strongarm-coff.h arm/arm.h arm/pe.h arm/strongarm-pe.h"
2069         tmake_file=arm/t-strongarm-pe
2070         out_file=arm/arm.c
2071         md_file=arm/arm.md
2072         extra_modes=arm/arm-modes.def
2073         extra_objs=pe.o
2074         ;;
2075 strongarm-*-kaos*)
2076         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"
2077         tmake_file=arm/t-strongarm-elf
2078         out_file=arm/arm.c
2079         md_file=arm/arm.md
2080         extra_modes=arm/arm-modes.def
2081         ;;
2082 v850e-*-*)
2083         target_cpu_default="TARGET_CPU_v850e"
2084         tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
2085         tm_p_file=v850/v850-protos.h
2086         tmake_file=v850/t-v850
2087         md_file=v850/v850.md
2088         out_file=v850/v850.c
2089         if test x$stabs = xyes
2090         then
2091                 tm_file="${tm_file} dbx.h"
2092         fi
2093         use_collect2=no
2094         c_target_objs="v850-c.o"
2095         cxx_target_objs="v850-c.o"
2096         ;;
2097 v850-*-*)
2098         target_cpu_default="TARGET_CPU_generic"
2099         tm_file="dbxelf.h elfos.h svr4.h ${tm_file}"
2100         tmake_file=v850/t-v850
2101         if test x$stabs = xyes
2102         then
2103                 tm_file="${tm_file} dbx.h"
2104         fi
2105         use_collect2=no
2106         c_target_objs="v850-c.o"
2107         cxx_target_objs="v850-c.o"
2108         ;;
2109 vax-*-bsd*)                     # VAXen running BSD
2110         tm_file="${tm_file} vax/bsd.h"
2111         use_collect2=yes
2112         ;;
2113 vax-*-sysv*)                    # VAXen running system V
2114         tm_file="${tm_file} vax/vaxv.h"
2115         ;;
2116 vax-*-netbsdelf*)
2117         tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h"
2118         ;;
2119 vax-*-netbsd*)
2120         tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h"
2121         tmake_file=t-netbsd
2122         extra_parts=""
2123         use_collect2=yes
2124         ;;
2125 vax-*-openbsd*)
2126         tm_file="vax/vax.h vax/openbsd1.h openbsd.h ${tm_file}"
2127         use_collect2=yes
2128         ;;
2129 vax-*-ultrix*)                  # VAXen running ultrix
2130         tm_file="${tm_file} vax/ultrix.h"
2131         ;;
2132 vax-*-vms*)                     # VAXen running VMS
2133         echo "Configuration $machine no longer supported" 1>&2
2134         exit 1
2135         ;;
2136 vax-*-*)                        # VAX default entry
2137         ;;
2138 xscale-*-elf)
2139         tm_file="arm/xscale-elf.h dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
2140         tmake_file=arm/t-xscale-elf
2141         out_file=arm/arm.c
2142         md_file=arm/arm.md
2143         extra_modes=arm/arm-modes.def
2144         ;;
2145 xscale-*-coff)
2146         tm_file="arm/semi.h arm/aout.h arm/coff.h arm/xscale-coff.h arm/arm.h"
2147         tmake_file=arm/t-xscale-coff
2148         out_file=arm/arm.c
2149         md_file=arm/arm.md
2150         extra_modes=arm/arm-modes.def
2151         ;;
2152 xstormy16-*-elf)
2153         # For historical reasons, the target files omit the 'x'.
2154         tm_file="dbxelf.h elfos.h svr4.h stormy16/stormy16.h"
2155         tm_p_file=stormy16/stormy16-protos.h
2156         md_file=stormy16/stormy16.md
2157         out_file=stormy16/stormy16.c
2158         tmake_file="stormy16/t-stormy16"
2159         extra_parts="crtbegin.o crtend.o"
2160         ;;
2161 xtensa-*-elf*)
2162         tm_file="${tm_file} dbxelf.h elfos.h svr4.h xtensa/elf.h"
2163         tmake_file="xtensa/t-xtensa xtensa/t-elf"
2164         ;;
2165 xtensa-*-linux*)
2166         tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h"
2167         tmake_file="t-slibgcc-elf-ver t-linux xtensa/t-xtensa xtensa/t-linux"
2168         ;;
2169 am33_2.0-*-linux*)
2170         tm_file="mn10300/mn10300.h dbxelf.h elfos.h linux.h mn10300/linux.h"
2171         tmake_file="t-linux mn10300/t-linux"
2172         gas=yes gnu_ld=yes
2173         if test x$enable_threads = xyes; then
2174                 thread_file='posix'
2175         fi
2176         extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2177         use_collect2=no
2178         ;;
2179 *)
2180         echo "*** Configuration $machine not supported" 1>&2
2181         exit 1
2182         ;;
2183 esac
2184
2185 case $machine in
2186 *-*-sysv*)
2187         install_headers_dir=install-headers-cpio
2188         ;;
2189 esac
2190
2191 # Support for --with-cpu and related options (and a few unrelated options,
2192 # too).  Only do this if $machine is the target, or we'll try to validate
2193 # the CPU argument against the wrong machine type.
2194
2195 if test "x$pass2done" = xyes
2196 then
2197         case "x$with_cpu" in
2198         xyes | xno)
2199                 echo "--with-cpu must be passed a value" 1>&2
2200                 exit 1
2201                 ;;
2202         esac
2203
2204         # If there is no $with_cpu option, try to infer one from ${machine}.
2205         # This block sets nothing except for with_cpu.
2206         if test x$with_cpu = x
2207         then
2208                 case $machine in
2209                 ep9312-*-*)
2210                         # A Cirrus ARM variant.
2211                         with_cpu="ep9312"
2212                         ;;
2213                 i486-*-*)
2214                         with_cpu=i486
2215                         ;;
2216                 i586-*-*)
2217                         case $target_alias in
2218                         k6_2-*)
2219                                 with_cpu=k6-2
2220                                 ;;
2221                         k6_3-*)
2222                                 with_cpu=k6-3
2223                                 ;;
2224                         k6-*)
2225                                 with_cpu=k6
2226                                 ;;
2227                         pentium_mmx-*|winchip_c6-*|winchip2-*|c3-*)
2228                                 with_cpu=pentium-mmx
2229                                 ;;
2230                         *)
2231                                 with_cpu=pentium
2232                                 ;;
2233                         esac
2234                         ;;
2235                 i686-*-* | i786-*-*)
2236                         case $target_alias in
2237                         k8-*)
2238                                 with_cpu=k8
2239                                 ;;
2240                         athlon_xp-*|athlon_mp-*|athlon_4-*)
2241                                 with_cpu=athlon-4
2242                                 ;;
2243                         athlon_tbird-*|athlon-*)
2244                                 with_cpu=athlon
2245                                 ;;
2246                         pentium2-*)
2247                                 with_cpu=pentium2
2248                                 ;;
2249                         pentium3-*)
2250                                 with_cpu=pentium3
2251                                 ;;
2252                         pentium4-*)
2253                                 with_cpu=pentium4
2254                                 ;;
2255                         *)
2256                                 with_cpu=pentiumpro
2257                                 ;;
2258                         esac
2259                         ;;
2260                 x86_64-*-*)
2261                         with_cpu=k8
2262                         ;;
2263                 alpha*-*-*)
2264                         case $machine in
2265                         alphaev6[78]*)
2266                                 with_cpu=ev67
2267                                 ;;
2268                         alphaev6*)
2269                                 with_cpu=ev6
2270                                 ;;
2271                         alphapca56*)
2272                                 with_cpu=pca56
2273                                 ;;
2274                         alphaev56*)
2275                                 with_cpu=ev56
2276                                 ;;
2277                         alphaev5*)
2278                                 with_cpu=ev5
2279                                 ;;
2280                         esac
2281                         ;;
2282                 sparc*-*-*)
2283                         with_cpu="`echo $machine | sed 's/-.*$//'`"
2284                         if [ x$with_cpu = xsparc64 ]; then
2285                                 with_cpu=v9
2286                         fi
2287                         ;;
2288                 esac
2289         fi
2290
2291         # Similarly for --with-schedule.
2292         if test x$with_schedule = x; then
2293                 case $machine in
2294                 hppa1* | parisc1*)
2295                         # Override default PA8000 scheduling model.
2296                         with_schedule=7100LC
2297                         ;;
2298                 esac
2299         fi
2300
2301         # Validate and mark as valid any --with options supported
2302         # by this target.  In order to use a particular --with option
2303         # you must list it in supported_defaults; validating the value
2304         # is optional.  This case statement should set nothing besides
2305         # supported_defaults.
2306
2307         supported_defaults=
2308         case "$machine" in
2309         alpha*-*-*)
2310                 supported_defaults="cpu tune"
2311                 for which in cpu tune; do
2312                         eval "val=\$with_$which"
2313                         case "x$val" in
2314                         x \
2315                         | xev4 | xev45 | x21064 | xev5 | x21164 | xev56 | x21164a \
2316                         | xpca56 | x21164PC | x21164pc | xev6 | x21264 | xev67 \
2317                         | x21264a)
2318                                 ;;
2319                         *)
2320                                 echo "Unknown CPU used in --with-$which=$val" 1>&2
2321                                 exit 1
2322                                 ;;
2323                         esac
2324                 done
2325                 ;;
2326
2327         arm*-*-*)
2328                 supported_defaults="arch cpu float tune"
2329                 for which in cpu tune; do
2330                         eval "val=\$with_$which"
2331                         case "x$val" in
2332                         x \
2333                         | xarm[236789] | xarm250 | xarm[67][01]0 \
2334                         | xarm60 | xarm620 | xarm7d | xarm7di \
2335                         | xarm7m | xarm7dm | xarm7dmi | xarm[79]tdmi \
2336                         | xarm70 | xarm700i | xarm710t | xarm720 \
2337                         | xarm720t | xarm740t | xarm710c | xarm920 \
2338                         | xarm920t | xarm940t | xarm9e | xarm10tdmi \
2339                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2340                         | xarm1020t \
2341                         | xxscale | xiwmmxt \
2342                         | xep9312 \
2343                         | xstrongarm | xstrongarm110 | xstrongarm11[01]0)
2344                                 # OK
2345                                 ;;
2346                         *)
2347                                 echo "Unknown CPU used in --with-$which=$val" 1>&2
2348                                 exit 1
2349                                 ;;
2350                         esac
2351                 done
2352
2353                 case "x$with_arch" in
2354                 x \
2355                 | xarmv[2345] | xarmv2a | xarmv3m | xarmv4t | xarmv5t \
2356                 | xarmv5te | ep9312)
2357                         # OK
2358                         ;;
2359                 *)
2360                         echo "Unknown arch used in --with-arch=$with_arch" 1>&2
2361                         exit 1
2362                         ;;
2363                 esac
2364
2365                 case "x$with_float" in
2366                 x \
2367                 | xsoft | xhard)
2368                         # OK
2369                         ;;
2370                 *)
2371                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
2372                         exit 1
2373                         ;;
2374                 esac
2375
2376                 if test "x$with_arch" != x && test "x$with_cpu" != x; then
2377                         echo "Warning: --with-arch overrides --with-cpu" 1>&2
2378                 fi
2379                 ;;
2380
2381         hppa*-*-* | parisc*-*-*)
2382                 supported_defaults="arch schedule"
2383
2384                 case "x$with_arch" in
2385                 x | x1.0 | x1.1 | x2.0)
2386                         # OK
2387                         ;;
2388                 *)
2389                         echo "Unknown architecture used in --with-arch=$with_arch" 1>&2
2390                         exit 1
2391                         ;;
2392                 esac
2393
2394                 case "x$with_schedule" in
2395                 x | x700 | x7100 | x7100LC | x7200 | x7300 | x8000)
2396                         # OK
2397                         ;;
2398                 *)
2399                         echo "Unknown processor used in --with-schedule=$with_schedule." 1>&2
2400                         exit 1
2401                         ;;
2402                 esac
2403                 ;;
2404
2405         i[34567]86-*-* | x86_64-*-*)
2406                 supported_defaults="arch cpu tune"
2407                 for which in arch cpu tune; do
2408                         eval "val=\$with_$which"
2409                         case "x$val" in
2410                         x \
2411                         | xi386 | xi486 \
2412                         | xi586 | xpentium | xpentium-mmx | xwinchip-c6 | xwinchip2 \
2413                         | xc3 | xc3-2 | xi686 | xpentiumpro | xpentium2 | xpentium3 \
2414                         | xpentium4 | xk6 | xk6-2 | xk6-3 | xathlon | xathlon-tbird \
2415                         | xathlon-4 | xathlon-xp | xathlon-mp | xk8)
2416                                 # OK
2417                                 ;;
2418                         *)
2419                                 echo "Unknown CPU given in --with-$which=$val." 1>&2
2420                                 exit 1
2421                                 ;;
2422                         esac
2423                 done
2424                 ;;
2425
2426         mips*-*-*)
2427                 supported_defaults="abi arch float tune"
2428
2429                 case "x$with_float" in
2430                 x \
2431                 | xsoft | xhard)
2432                         # OK
2433                         ;;
2434                 *)
2435                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
2436                         exit 1
2437                         ;;
2438                 esac
2439
2440                 case "x$with_abi" in
2441                 x \
2442                 | x32 | xo64 | xn32 | x64 | xeabi)
2443                         # OK
2444                         ;;
2445                 *)
2446                         echo "Unknown ABI used in --with-abi=$with_abi" 1>&2
2447                         exit 1
2448                         ;;
2449                 esac
2450                 ;;
2451
2452         powerpc*-*-* | rs6000-*-*)
2453                 supported_defaults="cpu float tune"
2454
2455                 for which in cpu tune; do
2456                         eval "val=\$with_$which"
2457                         case "x$val" in
2458                         x \
2459                         | xdefault32 | xdefault64 \
2460                         | xcommon \
2461                         | xpower | xpower2 | xpower3 | xpower4 \
2462                         | xpowerpc | xpowerpc64 \
2463                         | xrios | xrios1 | xrios2 | xrsc | xrsc1 | xrs64a \
2464                         | x401 | x403 | x405 | x405fp | x440 | x440fp | x505 \
2465                         | x601 | x602 | x603 | x603e | xec603e | x604 \
2466                         | x604e | x620 | x630 | x740 | x750 | x7400 | x7450 \
2467                         | x8540 | x801 | x821 | x823 | x860 | x970)
2468                                 # OK
2469                                 ;;
2470                         *)
2471                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
2472                                 exit 1
2473                                 ;;
2474                         esac
2475                 done
2476                 ;;
2477
2478         s390*-*-*)
2479                 supported_defaults="arch mode tune"
2480
2481                 for which in arch tune; do
2482                         eval "val=\$with_$which"
2483                         case x$val in
2484                         x \
2485                         | xg5 | xg6 | xz900 | xz990)
2486                                 # OK
2487                                 ;;
2488                         *)
2489                                 echo "Unknown cpu used in --with-$which=$val." 1>&2
2490                                 exit 1
2491                                 ;;
2492                         esac
2493                 done
2494
2495                 case "x$with_mode" in
2496                 x \
2497                 | xesa | xzarch)
2498                         # OK
2499                         ;;
2500                 *)
2501                         echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
2502                         exit 1
2503                         ;;
2504                 esac
2505                 ;;
2506
2507         sparc*-*-*)
2508                 supported_defaults="cpu float tune"
2509
2510                 for which in cpu tune; do
2511                         eval "val=\$with_$which"
2512                         case x$val in
2513                         x \
2514                         | xsparc | xsparcv9 | xsparc64 | xsparc86x \
2515                         | xv7 | xcypress | xv8 | xsupersparc | xsparclite | xf930 \
2516                         | xf934 | xhypersparc | xsparclite86x | xsparclet | tsc701 \
2517                         | xv9 | xultrasparc | xultrasparc3)
2518                                 # OK
2519                                 ;;
2520                         *)
2521                                 echo "Unknown cpu used in --with-$which=$val" 1>&2
2522                                 exit 1
2523                                 ;;
2524                         esac
2525                 done
2526
2527                 case "x$with_float" in
2528                 x \
2529                 | xsoft | xhard)
2530                         # OK
2531                         ;;
2532                 *)
2533                         echo "Unknown floating point type used in --with-float=$with_float" 1>&2
2534                         exit 1
2535                         ;;
2536                 esac
2537                 ;;
2538
2539         v850*-*-*)
2540                 supported_defaults=cpu
2541                 case "x$with_cpu" in
2542                 x | xv850e)
2543                         # OK
2544                         ;;
2545                 *)
2546                         echo "Unknown cpu used in --with-cpu=$with_cpu" 1>&2
2547                         exit 1
2548                         ;;
2549                 esac
2550                 ;;
2551         esac
2552
2553         # Set some miscellaneous flags for particular targets.
2554         target_cpu_default2=
2555         case $machine in
2556         alpha*-*-*)
2557                 if test x$gas = xyes
2558                 then
2559                         target_cpu_default2="MASK_GAS"
2560                 fi
2561                 ;;
2562
2563         arm*-*-*)
2564                 case "x$with_cpu" in
2565                 x)
2566                         # The most generic
2567                         target_cpu_default2="TARGET_CPU_generic"
2568                         ;;
2569
2570                 *)
2571                         target_cpu_default2="TARGET_CPU_$with_cpu"
2572                         ;;
2573                 esac
2574                 ;;
2575
2576         hppa*-*-* | parisc*-*-*)
2577                 if test x$gas = xyes
2578                 then
2579                         target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
2580                 fi
2581                 ;;
2582
2583         mips*-*-*)
2584                 case $machine in
2585                 mips*-*-ecoff* | mips*-*-elf*)
2586                         if test x$gas = xyes
2587                         then
2588                                 if test x$gnu_ld = xyes
2589                                 then
2590                                         target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
2591                                 else
2592                                         target_cpu_default2="MASK_GAS"
2593                                 fi
2594                         fi
2595                         ;;
2596                 mips*-*-*)
2597                         if test x$gas = xyes
2598                         then
2599                                 target_cpu_default2="MASK_GAS"
2600                         fi
2601                         ;;
2602                 esac
2603                 case $machine in
2604                         mips*el-*-*)
2605                                 tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines"
2606                                 ;;
2607                 esac
2608                 case $tm_file in
2609                         *mips/elf.h* | *mips/elf64.h*)
2610                                 tm_defines="OBJECT_FORMAT_ELF $tm_defines"
2611                                 ;;
2612                 esac
2613                 if test "x$enable_gofast" = xyes
2614                 then
2615                         tm_defines="INIT_SUBTARGET_OPTABS=INIT_GOFAST_OPTABS $tm_defines"
2616                         tm_file="gofast.h $tm_file"
2617                         tmake_file="mips/t-gofast $tmake_file"
2618                 else
2619                         tmake_file="mips/t-mips $tmake_file"
2620                 fi
2621                 ;;
2622
2623         powerpc*-*-* | rs6000-*-*)
2624                 if test x$enable_altivec = xyes
2625                 then
2626                         tm_file="$tm_file rs6000/altivec-defs.h"
2627                 fi
2628                 # FIXME: The PowerPC port uses the value set at compile time,
2629                 # although it's only cosmetic.
2630                 if test "x$with_cpu" != x
2631                 then
2632                         target_cpu_default2="\\\"$with_cpu\\\""
2633                 fi
2634                 out_file=rs6000/rs6000.c
2635                 c_target_objs="${c_target_objs} rs6000-c.o"
2636                 cxx_target_objs="${cxx_target_objs} rs6000-c.o"
2637                 tmake_file="rs6000/t-rs6000 ${tmake_file}"
2638                 ;;
2639
2640         sparc*-*-*)
2641                 # Some standard aliases.
2642                 case x$with_cpu in
2643                 xsparc)
2644                         with_cpu=v7
2645                         ;;
2646                 xsparc86x)
2647                         with_cpu=sparclite86x
2648                         ;;
2649                 xsparcv9 | xsparc64)
2650                         with_cpu=v9
2651                         ;;
2652                 esac
2653
2654                 # The Sparc port checks this value at compile-time.
2655                 target_cpu_default2="TARGET_CPU_$with_cpu"
2656                 ;;
2657         v850*-*-*)
2658                 # FIXME: The v850 is "special" in that it does not support
2659                 # runtime CPU selection, only --with-cpu.
2660                 case "x$with_cpu" in
2661                 x)
2662                         ;;
2663                 xv850e)
2664                         target_cpu_default2="TARGET_CPU_$with_cpu"
2665                         ;;
2666                 esac
2667                 ;;
2668         esac
2669
2670         t=
2671         all_defaults="abi cpu arch tune schedule float mode"
2672         for option in $all_defaults
2673         do
2674                 eval "val=\$with_$option"
2675                 if test -n "$val"; then
2676                         case " $supported_defaults " in
2677                         *" $option "*)
2678                                 ;;
2679                         *)
2680                                 echo "This target does not support --with-$option." 2>&1
2681                                 exit 1
2682                                 ;;
2683                         esac
2684
2685                         if test "x$t" = x
2686                         then
2687                                 t="{ \"$option\", \"$val\" }"
2688                         else
2689                                 t="${t}, { \"$option\", \"$val\" }"
2690                         fi
2691                 fi
2692         done
2693         if test "x$t" = x
2694         then
2695                 configure_default_options="{ { NULL, NULL} }"
2696         else
2697                 configure_default_options="{ ${t} }"
2698         fi
2699
2700         if test "$target_cpu_default2" != ""
2701         then
2702                 if test "$target_cpu_default" != ""
2703                 then
2704                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2705                 else
2706                         target_cpu_default=$target_cpu_default2
2707                 fi
2708         fi
2709 fi
2710
2711 # Save data on machine being used to compile GCC in build_xm_file.
2712 # Save data on host machine in vars host_xm_file and host_xmake_file.
2713 if test x$pass1done = x
2714 then
2715         if test x$xm_file != x
2716         then build_xm_file=$xm_file
2717         fi
2718         build_xm_defines=$xm_defines
2719         build_install_headers_dir=$install_headers_dir
2720         build_exeext=$exeext
2721         pass1done=yes
2722 else
2723         if test x$pass2done = x
2724         then
2725                 if test x$xm_file != x
2726                 then host_xm_file=$xm_file
2727                 fi
2728                 host_xm_defines=$xm_defines
2729                 host_xmake_file="$xmake_file"
2730                 host_extra_gcc_objs=$extra_gcc_objs
2731                 host_extra_objs=$extra_host_objs
2732                 host_exeext=$exeext
2733                 out_host_hook_obj=$host_hook_obj
2734                 pass2done=yes
2735         fi
2736 fi