OSDN Git Service

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