OSDN Git Service

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