OSDN Git Service

Fix mips64vr4100-elf build failure.
[pf3gnuchains/gcc-fork.git] / gcc / configure.in
1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
3
4 # Copyright (C) 1997, 1998 Free Software Foundation, Inc.
5
6 #This file is part of GNU CC.
7
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
11 #any later version.
12
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #GNU General Public License for more details.
17
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING.  If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
22
23 # Initialization and defaults
24 AC_INIT(tree.c)
25 AC_CONFIG_HEADER(auto-host.h:config.in)
26
27 remove=rm
28 hard_link=ln
29 symbolic_link='ln -s'
30 copy=cp
31
32 # Check for additional parameters
33
34 # With GNU ld
35 AC_ARG_WITH(gnu-ld,
36 [  --with-gnu-ld           arrange to work with GNU ld.],
37 gnu_ld_flag="$with_gnu_ld",
38 gnu_ld_flag=no)
39
40 # With GNU as
41 AC_ARG_WITH(gnu-as,
42 [  --with-gnu-as           arrange to work with GNU as.],
43 gas_flag="$with_gnu_as",
44 gas_flag=no)
45
46 # With stabs
47 AC_ARG_WITH(stabs,
48 [  --with-stabs            arrange to use stabs instead of host debug format.],
49 stabs="$with_stabs",
50 stabs=no)
51
52 # With ELF
53 AC_ARG_WITH(elf,
54 [  --with-elf              arrange to use ELF instead of host debug format.],
55 elf="$with_elf",
56 elf=no)
57
58 # Specify the local prefix
59 AC_ARG_WITH(local-prefix,
60 [  --with-local-prefix=DIR specifies directory to put local include.],
61 local_prefix=$with_local_prefix,
62 local_prefix=/usr/local)
63
64 # Default local prefix if it is empty
65 if [[ x$local_prefix = x ]]; then
66         local_prefix=/usr/local
67 fi
68
69 # Specify the g++ header file directory
70 AC_ARG_WITH(gxx-include-dir,
71 [  --with-gxx-include-dir=DIR
72                           specifies directory to put g++ header files.],
73 gxx_include_dir=$with_gxx_include_dir,
74 gxx_include_dir='${prefix}/include/g++')
75
76 # Default g++ header file directory if it is empty
77 if [[ x$gxx_include_dir = x ]]; then
78         gxx_include_dir='${prefix}/include/g++'
79 fi
80
81 # Enable expensive internal checks
82 AC_ARG_ENABLE(checking,
83 [  --enable-checking       enable expensive run-time checks.],
84 AC_DEFINE(ENABLE_CHECKING)  
85 )
86
87 # Enable use of cpplib for C.
88 AC_ARG_ENABLE(c-cpplib,
89 [  --enable-c-cpplib       Use cpplib for C.],
90 if [[[ x$enable_c_cpplib != xno ]]]; then
91   extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
92   extra_c_objs="${extra_c_objs} prefix.o"
93   extra_cxx_objs="${extra_cxx_objs} ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o ../prefix.o"
94   extra_c_flags=-DUSE_CPPLIB=1
95 fi)
96   
97 # Enable Haifa scheduler.
98 AC_ARG_ENABLE(haifa,
99 [  --enable-haifa          Use the experimental scheduler.
100   --disable-haifa         Don't use the experimental scheduler for the
101                           targets which normally enable it.])
102 # Fast fixincludes
103 #
104 # This is a work in progress...
105 AC_ARG_WITH(fast-fixincludes,
106 [  --with-fast-fixincludes    Use a faster fixinclude program.  Experimental],
107 fast_fixinc="$with_fast_fixincludes",
108 fast_fixinc=no)
109
110 # Enable threads
111 # Pass with no value to take the default
112 # Pass with a value to specify a thread package
113 AC_ARG_ENABLE(threads,
114 [  --enable-threads        enable thread usage for target GCC.
115   --enable-threads=LIB    use LIB thread package for target GCC.],
116 if [[[ x$enable_threads = xno ]]]; then
117         enable_threads=''
118 fi,
119 enable_threads='')
120
121 enable_threads_flag=$enable_threads
122 # Check if a valid thread package
123 case x${enable_threads_flag} in
124         x | xno)
125                 # No threads
126                 target_thread_file='single'
127                 ;;
128         xyes)
129                 # default
130                 target_thread_file=''
131                 ;;
132         xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
133         xsolaris | xwin32 | xdce | xvxworks)
134                 target_thread_file=$enable_threads_flag
135                 ;;
136         *)
137                 echo "$enable_threads is an unknown thread package" 1>&2
138                 exit 1
139                 ;;
140 esac
141
142 # Determine the host, build, and target systems
143 AC_CANONICAL_SYSTEM
144
145 # Find the native compiler
146 AC_PROG_CC
147 AC_PROG_MAKE_SET
148
149 # Find some useful tools
150 AC_PROG_AWK
151 AC_PROG_LEX
152 GCC_PROG_LN
153 GCC_PROG_LN_S
154 GCC_C_VOLATILE
155 AC_PROG_RANLIB
156 AC_PROG_YACC
157 EGCS_PROG_INSTALL
158
159 AC_HEADER_STDC
160 AC_HEADER_TIME
161 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h)
162
163 # Check for thread headers.
164 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
165 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
166
167 # See if the system preprocessor understands the ANSI C preprocessor
168 # stringification operator.
169 AC_MSG_CHECKING(whether cpp understands the stringify operator)
170 AC_CACHE_VAL(gcc_cv_c_have_stringify,
171 [AC_TRY_COMPILE(,
172 [#define S(x)   #x
173 char *test = S(foo);],
174 gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
175 AC_MSG_RESULT($gcc_cv_c_have_stringify)
176 if test $gcc_cv_c_have_stringify = yes; then
177   AC_DEFINE(HAVE_CPP_STRINGIFY)
178 fi
179
180 # Use <inttypes.h> only if it exists,
181 # doesn't clash with <sys/types.h>, and declares intmax_t.
182 AC_MSG_CHECKING(for inttypes.h)
183 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
184 [AC_TRY_COMPILE(
185   [#include <sys/types.h>
186 #include <inttypes.h>],
187   [intmax_t i = -1;],
188   [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
189    gcc_cv_header_inttypes_h=yes],
190   gcc_cv_header_inttypes_h=no)])
191 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
192
193 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
194         index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
195         sysconf isascii)
196
197 GCC_FUNC_VFPRINTF_DOPRNT
198 GCC_FUNC_PRINTF_PTR
199
200 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
201         index rindex getenv atol sbrk abort atof)
202
203 AC_DECL_SYS_SIGLIST
204
205 # File extensions
206 manext='.1'
207 objext='.o'
208 AC_SUBST(manext)
209 AC_SUBST(objext)
210
211 build_xm_file=
212 build_xm_defines=
213 build_install_headers_dir=install-headers-tar
214 build_exeext=
215 host_xm_file=
216 host_xm_defines=
217 host_xmake_file=
218 host_truncate_target=
219 host_exeext=
220
221 # Decode the host machine, then the target machine.
222 # For the host machine, we save the xm_file variable as host_xm_file;
223 # then we decode the target machine and forget everything else
224 # that came from the host machine.
225 for machine in $build $host $target; do
226
227         out_file=
228         xmake_file=
229         tmake_file=
230         extra_headers=
231         extra_passes=
232         extra_parts=
233         extra_programs=
234         extra_objs=
235         extra_host_objs=
236         extra_gcc_objs=
237         xm_defines=
238         float_format=
239         # Set this to force installation and use of collect2.
240         use_collect2=
241         # Set this to override the default target model.
242         target_cpu_default=
243         # Set this to control which fixincludes program to use.
244         if [[ x$fast_fixinc != xyes ]] ; then
245                 fixincludes=fixincludes
246         else fixincludes=fixinc.sh ; fi
247         # Set this to control how the header file directory is installed.
248         install_headers_dir=install-headers-tar
249         # Set this to a non-empty list of args to pass to cpp if the target
250         # wants its .md file passed through cpp.
251         md_cppflags=
252         # Set this if directory names should be truncated to 14 characters.
253         truncate_target=
254         # Set this if gdb needs a dir command with `dirname $out_file`
255         gdb_needs_out_file_path=
256         # Set this if the build machine requires executables to have a
257         # file name suffix.
258         exeext=
259         # Set this to control which thread package will be used.
260         thread_file=
261         # Reinitialize these from the flag values every loop pass, since some
262         # configure entries modify them.
263         gas="$gas_flag"
264         gnu_ld="$gnu_ld_flag"
265         enable_threads=$enable_threads_flag
266
267         # Set default cpu_type, tm_file and xm_file so it can be updated in
268         # each machine entry.
269         cpu_type=`echo $machine | sed 's/-.*$//'`
270         case $machine in
271         alpha*-*-*)
272                 cpu_type=alpha
273                 ;;
274         arm*-*-*)
275                 cpu_type=arm
276                 ;;
277         c*-convex-*)
278                 cpu_type=convex
279                 ;;
280         i[[34567]]86-*-*)
281                 cpu_type=i386
282                 ;;
283         hppa*-*-*)
284                 cpu_type=pa
285                 ;;
286         m68000-*-*)
287                 cpu_type=m68k
288                 ;;
289         mips*-*-*)
290                 cpu_type=mips
291                 ;;
292         powerpc*-*-*)
293                 cpu_type=rs6000
294                 ;;
295         pyramid-*-*)
296                 cpu_type=pyr
297                 ;;
298         sparc*-*-*)
299                 cpu_type=sparc
300                 ;;
301         esac
302
303         tm_file=${cpu_type}/${cpu_type}.h
304         xm_file=${cpu_type}/xm-${cpu_type}.h
305         
306         # Set the default macros to define for GNU/Linux systems.
307         case $machine in
308         *-*-linux-gnu*)
309                 xm_defines="HAVE_ATEXIT POSIX BSTRING"
310                 ;;
311         esac
312
313         case $machine in
314         # Support site-specific machine types.
315         *local*)
316                 cpu_type=`echo $machine | sed -e 's/-.*//'`
317                 rest=`echo $machine | sed -e "s/$cpu_type-//"`
318                 xm_file=${cpu_type}/xm-$rest.h
319                 tm_file=${cpu_type}/$rest.h
320                 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
321                 then xmake_file=${cpu_type}/x-$rest; \
322                 else true; \
323                 fi
324                 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
325                 then tmake_file=${cpu_type}/t-$rest; \
326                 else true; \
327                 fi
328                 ;;
329         1750a-*-*)
330                 ;;
331         a29k-*-bsd* | a29k-*-sym1*)
332                 tm_file="${tm_file} a29k/unix.h"
333                 xm_defines=USG
334                 xmake_file=a29k/x-unix
335                 use_collect2=yes
336                 ;;
337         a29k-*-udi | a29k-*-coff)
338                 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
339                 tmake_file=a29k/t-a29kbare
340                 ;;
341         a29k-wrs-vxworks*)
342                 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
343                 tmake_file=a29k/t-vx29k
344                 extra_parts="crtbegin.o crtend.o"
345                 thread_file='vxworks'
346                 ;;
347         a29k-*-*)                       # Default a29k environment.
348                 use_collect2=yes
349                 ;;
350         alpha*-*-linux-gnuecoff*)
351                 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
352                 target_cpu_default="MASK_GAS"
353                 gas=no
354                 xmake_file=none
355                 gas=yes gnu_ld=yes
356                 ;;
357         alpha*-*-linux-gnulibc1*)
358                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
359                 target_cpu_default="MASK_GAS"
360                 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
361                 extra_parts="crtbegin.o crtend.o"
362                 fixincludes=fixinc.wrap
363                 xmake_file=none
364                 gas=yes gnu_ld=yes
365                 if [[ x$enable_threads = xyes ]]; then
366                         thread_file='posix'
367                 fi
368                 ;;
369         alpha*-*-linux-gnu*)
370                 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
371                 target_cpu_default="MASK_GAS"
372                 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
373                 extra_parts="crtbegin.o crtend.o"
374                 xmake_file=none
375                 fixincludes=Makefile.in
376                 gas=yes gnu_ld=yes
377                 if [[ x$enable_threads = xyes ]]; then
378                         thread_file='posix'
379                 fi
380                 ;;
381         alpha*-*-netbsd*)
382                 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
383                 target_cpu_default="MASK_GAS"
384                 tmake_file="alpha/t-crtbe"
385                 extra_parts="crtbegin.o crtend.o"
386                 xmake_file=none
387                 fixincludes=fixinc.wrap
388                 gas=yes gnu_ld=yes
389                 ;;
390                 
391         alpha*-dec-osf*)
392                 if [[ x$stabs = xyes ]]
393                 then
394                         tm_file="${tm_file} dbx.h"
395                 fi
396                 if [[ x$gas != xyes ]]
397                 then
398                         extra_passes="mips-tfile mips-tdump"
399                 fi
400                 use_collect2=yes
401                 case $machine in
402                   *-*-osf1*)
403                     tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
404                     ;;
405                   *-*-osf[[23]]*)
406                     tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
407                     ;;
408                   *-*-osf4*)
409                     tm_file="${tm_file} alpha/osf.h"
410                     # Some versions of OSF4 (specifically X4.0-9 296.7) have
411                     # a broken tar, so we use cpio instead.
412                     install_headers_dir=install-headers-cpio
413                     ;;
414                 esac
415                 case $machine in
416                   *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
417                     target_cpu_default=MASK_SUPPORT_ARCH
418                     ;;
419                 esac
420                 ;;
421         alpha*-*-winnt*)
422                 tm_file="${tm_file} alpha/win-nt.h"
423                 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
424                 tmake_file=t-libc-ok
425                 xmake_file=winnt/x-winnt
426                 extra_host_objs=oldnames.o
427                 extra_gcc_objs="spawnv.o oldnames.o"
428                 fixincludes=fixinc.winnt
429                 if [[ x$gnu_ld != xyes ]]
430                 then
431                         extra_programs=ld.exe
432                 fi
433                 if [[ x$enable_threads = xyes ]]; then
434                         thread_file='win32'
435                 fi
436                 ;;
437         alpha*-dec-vms*)
438                 tm_file=alpha/vms.h
439                 xm_file="${xm_file} alpha/xm-vms.h"
440                 tmake_file=alpha/t-vms
441                 fixincludes=Makefile.in
442                 ;;
443         arc-*-elf*)
444                 extra_parts="crtinit.o crtfini.o"
445                 ;;
446         arm-*-coff* | armel-*-coff*)
447                 tm_file=arm/coff.h
448                 tmake_file=arm/t-bare
449                 ;;
450         arm-*-riscix1.[[01]]*)          # Acorn RISC machine (early versions)
451                 tm_file=arm/riscix1-1.h
452                 use_collect2=yes
453                 ;;
454         arm-*-riscix*)                  # Acorn RISC machine
455                 if [[ x$gas = xyes ]]
456                 then
457                     tm_file=arm/rix-gas.h
458                 else
459                     tm_file=arm/riscix.h
460                 fi
461                 xmake_file=arm/x-riscix
462                 tmake_file=arm/t-riscix
463                 use_collect2=yes
464                 ;;
465         arm-semi-aout | armel-semi-aout)
466                 tm_file=arm/semi.h
467                 tmake_file=arm/t-semi
468                 fixincludes=Makefile.in # There is nothing to fix
469                 ;;
470         arm-semi-aof | armel-semi-aof)
471                 tm_file=arm/semiaof.h
472                 tmake_file=arm/t-semiaof
473                 fixincludes=Makefile.in # There is nothing to fix
474                 ;;
475         arm-*-netbsd*)
476                 tm_file=arm/netbsd.h
477                 xm_file="xm-siglist.h ${xm_file}"
478                 tmake_file="t-netbsd arm/t-netbsd"
479                 # On NetBSD, the headers are already okay, except for math.h.
480                 fixincludes=fixinc.wrap
481                 ;;
482         arm-*-linux-gnuaout*)           # ARM GNU/Linux
483                 cpu_type=arm
484                 xmake_file=x-linux
485                 tm_file=arm/linux-gas.h
486                 tmake_file=arm/t-linux
487                 fixincludes=Makefile.in
488                 gnu_ld=yes
489                 ;;
490         arm-*-aout)
491                 tm_file=arm/aout.h
492                 tmake_file=arm/t-bare
493                 ;;
494         c1-convex-*)                    # Convex C1
495                 target_cpu_default=1
496                 use_collect2=yes
497                 fixincludes=Makefile.in
498                 ;;
499         c2-convex-*)                    # Convex C2
500                 target_cpu_default=2
501                 use_collect2=yes
502                 fixincludes=Makefile.in
503                 ;;
504         c32-convex-*)
505                 target_cpu_default=4
506                 use_collect2=yes
507                 fixincludes=Makefile.in
508                 ;;
509         c34-convex-*)
510                 target_cpu_default=8
511                 use_collect2=yes
512                 fixincludes=Makefile.in
513                 ;;
514         c38-convex-*)
515                 target_cpu_default=16           
516                 use_collect2=yes
517                 fixincludes=Makefile.in
518                 ;;
519         clipper-intergraph-clix*)
520                 tm_file="${tm_file} svr3.h clipper/clix.h"
521                 xm_file=clipper/xm-clix.h
522                 xmake_file=clipper/x-clix
523                 extra_headers=va-clipper.h
524                 extra_parts="crtbegin.o crtend.o"
525                 install_headers_dir=install-headers-cpio
526                 ;;
527         dsp16xx-*)
528                 ;;
529         elxsi-elxsi-*)
530                 use_collect2=yes
531                 ;;
532 # This hasn't been upgraded to GCC 2.
533 #       fx80-alliant-*)                 # Alliant FX/80
534 #               ;;
535         h8300-*-*)
536                 float_format=i32
537                 ;;
538         hppa1.1-*-pro*)
539                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
540                 xm_file=pa/xm-papro.h
541                 tmake_file=pa/t-pro
542                 ;;
543         hppa1.1-*-osf*)
544                 target_cpu_default=1
545                 tm_file="${tm_file} pa/pa-osf.h"
546                 use_collect2=yes
547                 fixincludes=Makefile.in
548                 ;;
549         hppa1.1-*-rtems*)
550                 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
551                 xm_file=pa/xm-papro.h
552                 tmake_file=pa/t-pro
553                 ;;
554         hppa1.0-*-osf*)
555                 tm_file="${tm_file} pa/pa-osf.h"
556                 use_collect2=yes
557                 fixincludes=Makefile.in
558                 ;;
559         hppa1.1-*-bsd*)
560                 target_cpu_default=1
561                 use_collect2=yes
562                 fixincludes=Makefile.in
563                 ;;
564         hppa1.0-*-bsd*)
565                 use_collect2=yes
566                 fixincludes=Makefile.in
567                 ;;
568         hppa1.0-*-hpux7*)
569                 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
570                 xm_file=pa/xm-pahpux.h
571                 xmake_file=pa/x-pa-hpux
572                 if [[ x$gas = xyes ]]
573                 then
574                         tm_file="${tm_file} pa/gas.h"
575                 fi
576                 install_headers_dir=install-headers-cpio
577                 use_collect2=yes
578                 ;;
579         hppa1.0-*-hpux8.0[[0-2]]*)
580                 tm_file="${tm_file} pa/pa-hpux.h"
581                 xm_file=pa/xm-pahpux.h
582                 xmake_file=pa/x-pa-hpux
583                 if [[ x$gas = xyes ]]
584                 then
585                         tm_file="${tm_file} pa/pa-gas.h"
586                 else
587                         tm_file="pa/pa-oldas.h ${tm_file}"
588                 fi
589                 install_headers_dir=install-headers-cpio
590                 use_collect2=yes
591                 ;;
592         hppa1.1-*-hpux8.0[[0-2]]*)
593                 target_cpu_default=1
594                 tm_file="${tm_file} pa/pa-hpux.h"
595                 xm_file=pa/xm-pahpux.h
596                 xmake_file=pa/x-pa-hpux
597                 if [[ x$gas = xyes ]]
598                 then
599                         tm_file="${tm_file} pa/pa-gas.h"
600                 else
601                         tm_file="pa/pa-oldas.h ${tm_file}"
602                 fi
603                 install_headers_dir=install-headers-cpio
604                 use_collect2=yes
605                 ;;
606         hppa1.1-*-hpux8*)
607                 target_cpu_default=1
608                 tm_file="${tm_file} pa/pa-hpux.h"
609                 xm_file=pa/xm-pahpux.h
610                 xmake_file=pa/x-pa-hpux
611                 if [[ x$gas = xyes ]]
612                 then
613                         tm_file="${tm_file} pa/pa-gas.h"
614                 fi
615                 install_headers_dir=install-headers-cpio
616                 use_collect2=yes
617                 ;;
618         hppa1.0-*-hpux8*)
619                 tm_file="${tm_file} pa/pa-hpux.h"
620                 xm_file=pa/xm-pahpux.h
621                 xmake_file=pa/x-pa-hpux
622                 if [[ x$gas = xyes ]]
623                 then
624                         tm_file="${tm_file} pa/pa-gas.h"
625                 fi
626                 install_headers_dir=install-headers-cpio
627                 use_collect2=yes
628                 ;;
629         hppa1.1-*-hpux10*)
630                 target_cpu_default=1
631                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
632                 xm_file=pa/xm-pahpux.h
633                 xmake_file=pa/x-pa-hpux
634                 tmake_file=pa/t-pa
635                 if [[ x$gas = xyes ]]
636                 then
637                         tm_file="${tm_file} pa/pa-gas.h"
638                 fi
639                 if [[ x$enable_threads = x ]]; then
640                     enable_threads=$have_pthread_h
641                 fi
642                 if [[ x$enable_threads = xyes ]]; then
643                         thread_file='dce'
644                         tmake_file="${tmake_file} pa/t-dce-thr"
645                 fi
646                 install_headers_dir=install-headers-cpio
647                 use_collect2=yes
648                 ;;
649         hppa1.0-*-hpux10*)
650                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
651                 xm_file=pa/xm-pahpux.h
652                 xmake_file=pa/x-pa-hpux
653                 if [[ x$gas = xyes ]]
654                 then
655                         tm_file="${tm_file} pa/pa-gas.h"
656                 fi
657                 if [[ x$enable_threads = x ]]; then
658                     enable_threads=$have_pthread_h
659                 fi
660                 if [[ x$enable_threads = xyes ]]; then
661                         thread_file='dce'
662                         tmake_file="${tmake_file} pa/t-dce-thr"
663                 fi
664                 install_headers_dir=install-headers-cpio
665                 use_collect2=yes
666                 ;;
667         hppa1.1-*-hpux*)
668                 target_cpu_default=1
669                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
670                 xm_file=pa/xm-pahpux.h
671                 xmake_file=pa/x-pa-hpux
672                 if [[ x$gas = xyes ]]
673                 then
674                         tm_file="${tm_file} pa/pa-gas.h"
675                 fi
676                 install_headers_dir=install-headers-cpio
677                 use_collect2=yes
678                 ;;
679         hppa1.0-*-hpux*)
680                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
681                 xm_file=pa/xm-pahpux.h
682                 xmake_file=pa/x-pa-hpux
683                 if [[ x$gas = xyes ]]
684                 then
685                         tm_file="${tm_file} pa/pa-gas.h"
686                 fi
687                 install_headers_dir=install-headers-cpio
688                 use_collect2=yes
689                 ;;
690         hppa1.1-*-hiux*)
691                 target_cpu_default=1
692                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
693                 xm_file=pa/xm-pahpux.h
694                 xmake_file=pa/x-pa-hpux
695                 if [[ x$gas = xyes ]]
696                 then
697                         tm_file="${tm_file} pa/pa-gas.h"
698                 fi
699                 install_headers_dir=install-headers-cpio
700                 use_collect2=yes
701                 ;;
702         hppa1.0-*-hiux*)
703                 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
704                 xm_file=pa/xm-pahpux.h
705                 xmake_file=pa/x-pa-hpux
706                 if [[ x$gas = xyes ]]
707                 then
708                         tm_file="${tm_file} pa/pa-gas.h"
709                 fi
710                 install_headers_dir=install-headers-cpio
711                 use_collect2=yes
712                 ;;
713         hppa*-*-lites*)
714                 target_cpu_default=1
715                 use_collect2=yes
716                 fixincludes=Makefile.in
717                 ;;
718         i370-*-mvs*)
719                 ;;
720         i[[34567]]86-ibm-aix*)          # IBM PS/2 running AIX
721                 if [[ x$gas = xyes ]]
722                 then
723                         tm_file=i386/aix386.h
724                         extra_parts="crtbegin.o crtend.o"
725                         tmake_file=i386/t-crtstuff
726                 else
727                         tm_file=i386/aix386ng.h
728                         use_collect2=yes
729                 fi
730                 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
731                 xm_defines=USG
732                 xmake_file=i386/x-aix
733                 ;;
734         i[[34567]]86-ncr-sysv4*)        # NCR 3000 - ix86 running system V.4
735                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
736                 xm_defines="USG POSIX SMALL_ARG_MAX"
737                 xmake_file=i386/x-ncr3000
738                 if [[ x$stabs = xyes -a x$gas = xyes ]]
739                 then
740                         tm_file=i386/sysv4gdb.h
741                 else
742                         tm_file=i386/sysv4.h
743                 fi
744                 extra_parts="crtbegin.o crtend.o"
745                 tmake_file=i386/t-crtpic
746                 ;;
747         i[[34567]]86-next-*)
748                 tm_file=i386/next.h
749                 xm_file=i386/xm-next.h
750                 tmake_file=i386/t-next
751                 xmake_file=i386/x-next
752                 extra_objs=nextstep.o
753                 if [[ x$enable_threads = xyes ]]; then
754                         thread_file='mach'
755                 fi
756                 ;;
757         i[[34567]]86-sequent-bsd*)              # 80386 from Sequent
758                 use_collect2=yes
759                 if [[ x$gas = xyes ]]
760                 then
761                         tm_file=i386/seq-gas.h
762                 else
763                         tm_file=i386/sequent.h
764                 fi
765                 ;;
766         i[[34567]]86-sequent-ptx1*)
767                 xm_defines="USG SVR3"
768                 xmake_file=i386/x-sysv3
769                 tm_file=i386/seq-sysv3.h
770                 tmake_file=i386/t-crtstuff
771                 fixincludes=fixinc.ptx
772                 extra_parts="crtbegin.o crtend.o"
773                 install_headers_dir=install-headers-cpio
774                 ;;
775         i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
776                 xm_defines="USG SVR3"
777                 xmake_file=i386/x-sysv3
778                 tm_file=i386/seq2-sysv3.h
779                 tmake_file=i386/t-crtstuff
780                 extra_parts="crtbegin.o crtend.o"
781                 fixincludes=fixinc.ptx
782                 install_headers_dir=install-headers-cpio
783                 ;;
784         i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
785                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
786                 xm_defines="USG POSIX SMALL_ARG_MAX"
787                 xmake_file=x-svr4
788                 tm_file=i386/ptx4-i.h
789                 tmake_file=t-svr4
790                 extra_parts="crtbegin.o crtend.o"
791                 fixincludes=fixinc.ptx
792                 install_headers_dir=install-headers-cpio
793                 ;;
794         i386-sun-sunos*)                # Sun i386 roadrunner
795                 xm_defines=USG
796                 tm_file=i386/sun.h
797                 use_collect2=yes
798                 ;;
799         i[[34567]]86-wrs-vxworks*)
800                 tm_file=i386/vxi386.h
801                 tmake_file=i386/t-i386bare
802                 ;;
803         i[[34567]]86-*-aout*)
804                 tm_file=i386/i386-aout.h
805                 tmake_file=i386/t-i386bare
806                 ;;
807         i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
808                 tm_file=i386/bsd386.h
809 #               tmake_file=t-libc-ok
810                 ;;
811         i[[34567]]86-*-bsd*)
812                 tm_file=i386/386bsd.h
813 #               tmake_file=t-libc-ok
814 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
815 #               use_collect2=yes
816                 ;;
817         i[[34567]]86-*-freebsdelf*)
818                 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
819                 # On FreeBSD, the headers are already ok, except for math.h.
820                 fixincludes=fixinc.wrap
821                 tmake_file=i386/t-freebsd
822                 gas=yes
823                 gnu_ld=yes
824                 stabs=yes
825                 ;;
826         i[[34567]]86-*-freebsd*)
827                 tm_file=i386/freebsd.h
828                 # On FreeBSD, the headers are already ok, except for math.h.
829                 fixincludes=fixinc.wrap
830                 tmake_file=i386/t-freebsd
831                 ;;
832         i[[34567]]86-*-netbsd*)
833                 tm_file=i386/netbsd.h
834                 # On NetBSD, the headers are already okay, except for math.h.
835                 fixincludes=fixinc.wrap
836                 tmake_file=t-netbsd
837                 ;;
838         i[[34567]]86-*-coff*)
839                 tm_file=i386/i386-coff.h
840                 tmake_file=i386/t-i386bare
841                 ;;
842         i[[34567]]86-*-isc*)            # 80386 running ISC system
843                 xm_file="${xm_file} i386/xm-isc.h"
844                 xm_defines="USG SVR3"
845                 case $machine in
846                   i[[34567]]86-*-isc[[34]]*)
847                     xmake_file=i386/x-isc3
848                     ;;
849                   *)
850                     xmake_file=i386/x-isc
851                     ;;
852                 esac
853                 if [[ x$gas = xyes -a x$stabs = xyes ]]
854                 then
855                         tm_file=i386/iscdbx.h
856                         tmake_file=i386/t-svr3dbx
857                         extra_parts="svr3.ifile svr3z.ifile"
858                 else
859                         tm_file=i386/isccoff.h
860                         tmake_file=i386/t-crtstuff
861                         extra_parts="crtbegin.o crtend.o"
862                 fi
863                 install_headers_dir=install-headers-cpio
864                 ;;
865         i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
866                                         # with a.out format using
867                                         # pre BFD linkers
868                 xmake_file=x-linux-aout
869                 tmake_file="t-linux-aout i386/t-crtstuff"
870                 tm_file=i386/linux-oldld.h
871                 fixincludes=Makefile.in #On Linux, the headers are ok already.
872                 gnu_ld=yes
873                 ;;
874         i[[34567]]86-*-linux-gnuaout*)  # Intel 80386's running GNU/Linux
875                                         # with a.out format
876                 xmake_file=x-linux-aout
877                 tmake_file="t-linux-aout i386/t-crtstuff"
878                 tm_file=i386/linux-aout.h
879                 fixincludes=Makefile.in #On Linux, the headers are ok already.
880                 gnu_ld=yes
881                 ;;
882         i[[34567]]86-*-linux-gnulibc1)  # Intel 80386's running GNU/Linux
883                                         # with ELF format using the
884                                         # GNU/Linux C library 5
885                 xmake_file=x-linux      
886                 tm_file=i386/linux.h    
887                 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
888                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
889                 fixincludes=Makefile.in #On Linux, the headers are ok already.
890                 gnu_ld=yes
891                 if [[ x$enable_threads = xyes ]]; then
892                         thread_file='single'
893                 fi
894                 ;;
895         i[[34567]]86-*-linux-gnu*)      # Intel 80386's running GNU/Linux
896                                         # with ELF format using glibc 2
897                                         # aka GNU/Linux C library 6
898                 xmake_file=x-linux
899                 tm_file=i386/linux.h
900                 tmake_file="t-linux i386/t-crtstuff"
901                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
902                 fixincludes=Makefile.in #On Linux, the headers are ok already.
903                 gnu_ld=yes
904                 if [[ x$enable_threads = xyes ]]; then
905                         thread_file='posix'
906                 fi
907                 ;;
908         i[[34567]]86-*-gnu*)
909                 ;;
910         i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
911                 xm_file=i386/xm-go32.h
912                 tm_file=i386/go32.h
913                 tmake_file=i386/t-go32
914                 ;;
915         i[[34567]]86-pc-msdosdjgpp*)
916                 xm_file=i386/xm-go32.h
917                 tm_file=i386/go32.h
918                 tmake_file=i386/t-go32
919                 gnu_ld=yes
920                 gas=yes
921                 ;;
922         i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
923                 tm_file=i386/moss.h
924                 tmake_file=t-libc-ok
925                 fixincludes=Makefile.in
926                 gnu_ld=yes
927                 gas=yes
928                 ;;
929         i[[34567]]86-*-lynxos*)
930                 if [[ x$gas = xyes ]]
931                 then
932                         tm_file=i386/lynx.h
933                 else
934                         tm_file=i386/lynx-ng.h
935                 fi
936                 xm_file=i386/xm-lynx.h
937                 tmake_file=i386/t-i386bare
938                 xmake_file=x-lynx
939                 ;;
940         i[[34567]]86-*-mach*)
941                 tm_file=i386/mach.h
942 #               tmake_file=t-libc-ok
943                 use_collect2=yes
944                 ;;
945         i[[34567]]86-*-osfrose*)                # 386 using OSF/rose
946                 if [[ x$elf = xyes ]]
947                 then
948                         tm_file=i386/osfelf.h
949                         use_collect2=
950                 else
951                         tm_file=i386/osfrose.h
952                         use_collect2=yes
953                 fi
954                 xm_file="i386/xm-osf.h ${xm_file}"
955                 xmake_file=i386/x-osfrose
956                 tmake_file=i386/t-osf
957                 extra_objs=halfpic.o
958                 ;;
959         i[[34567]]86-go32-rtems*)
960                 cpu_type=i386
961                 xm_file=i386/xm-go32.h
962                 tm_file=i386/go32-rtems.h
963                 tmake_file="i386/t-go32 t-rtems"
964                 ;;
965         i[[34567]]86-*-rtemself*)
966                 cpu_type=i386
967                 tm_file=i386/rtemself.h
968                 tmake_file="i386/t-i386bare t-rtems"
969                 ;;
970         i[[34567]]86-*-rtems*)
971                 cpu_type=i386
972                 tm_file=i386/rtems.h
973                 tmake_file="i386/t-i386bare t-rtems"
974                 ;;
975         i[[34567]]86-*-sco3.2v5*)       # 80386 running SCO Open Server 5
976                 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
977                 xm_defines="USG SVR3"
978                 xmake_file=i386/x-sco5
979                 fixincludes=fixinc.sco
980                 install_headers_dir=install-headers-cpio
981                 tm_file=i386/sco5.h
982                 tmake_file=i386/t-sco5
983                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
984                 ;;
985         i[[34567]]86-*-sco3.2v4*)       # 80386 running SCO 3.2v4 system
986                 xm_file="${xm_file} i386/xm-sco.h"
987                 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
988                 xmake_file=i386/x-sco4
989                 fixincludes=fixinc.sco
990                 install_headers_dir=install-headers-cpio
991                 if [[ x$stabs = xyes ]]
992                 then
993                         tm_file=i386/sco4dbx.h
994                         tmake_file=i386/t-svr3dbx
995                         extra_parts="svr3.ifile svr3z.rfile"
996                 else
997                         tm_file=i386/sco4.h
998                         tmake_file=i386/t-crtstuff
999                         extra_parts="crtbegin.o crtend.o"
1000                 fi
1001                 truncate_target=yes
1002                 ;;
1003         i[[34567]]86-*-sco*)            # 80386 running SCO system
1004                 xm_file=i386/xm-sco.h
1005                 xmake_file=i386/x-sco
1006                 install_headers_dir=install-headers-cpio
1007                 if [[ x$stabs = xyes ]]
1008                 then
1009                         tm_file=i386/scodbx.h
1010                         tmake_file=i386/t-svr3dbx
1011                         extra_parts="svr3.ifile svr3z.rfile"
1012                 else
1013                         tm_file=i386/sco.h
1014                         extra_parts="crtbegin.o crtend.o"
1015                         tmake_file=i386/t-crtstuff
1016                 fi
1017                 truncate_target=yes
1018                 ;;
1019         i[[34567]]86-*-solaris2*)
1020                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1021                 xm_defines="USG POSIX SMALL_ARG_MAX"
1022                 if [[ x$stabs = xyes ]]
1023                 then
1024                         tm_file=i386/sol2dbg.h
1025                 else
1026                         tm_file=i386/sol2.h
1027                 fi
1028                 tmake_file=i386/t-sol2
1029                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1030                 xmake_file=x-svr4
1031                 case $machine in
1032                 *-*-solaris2.[[0-4]])
1033                         fixincludes=fixinc.svr4;;
1034                 *)
1035                         fixincludes=fixinc.wrap;;
1036                 esac
1037                 if [[ x$enable_threads = xyes ]]; then
1038                         thread_file='solaris'
1039                 fi
1040                 ;;
1041        i[[34567]]86-*-sysv5*)           # Intel x86 on System V Release 5
1042                xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1043                xm_defines="USG POSIX"
1044                tm_file=i386/sysv4.h
1045                if [[ x$stabs = xyes ]]
1046                then
1047                        tm_file="${tm_file} dbx.h"
1048                fi
1049                tmake_file=i386/t-crtpic
1050                xmake_file=x-svr4
1051                extra_parts="crtbegin.o crtend.o"
1052                fixincludes=Makefile.in # The headers are just fine, thank you.
1053                ;;
1054         i[[34567]]86-*-sysv4*)          # Intel 80386's running system V.4
1055                 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1056                 xm_defines="USG POSIX SMALL_ARG_MAX"
1057                 tm_file=i386/sysv4.h
1058                 if [[ x$stabs = xyes ]]
1059                 then
1060                         tm_file="${tm_file} dbx.h"
1061                 fi
1062                 tmake_file=i386/t-crtpic
1063                 xmake_file=x-svr4
1064                 extra_parts="crtbegin.o crtend.o"
1065                 ;;
1066         i[[34567]]86-*-osf1*)           # Intel 80386's running OSF/1 1.3+
1067                 cpu_type=i386
1068                 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1069                 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1070                 fixincludes=Makefile.in #Don't do it on OSF/1
1071                 if [[ x$stabs = xyes ]]
1072                 then
1073                         tm_file=i386/osf1elfgdb.h
1074                 else
1075                         tm_file=i386/osf1elf.h
1076                 fi
1077                 tmake_file=i386/t-osf1elf
1078                 xmake_file=i386/x-osf1elf
1079                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1080                 ;;
1081         i[[34567]]86-*-sysv*)           # Intel 80386's running system V
1082                 xm_defines="USG SVR3"
1083                 xmake_file=i386/x-sysv3
1084                 if [[ x$gas = xyes ]]
1085                 then
1086                         if [[ x$stabs = xyes ]]
1087                         then
1088                                 tm_file=i386/svr3dbx.h
1089                                 tmake_file=i386/t-svr3dbx
1090                                 extra_parts="svr3.ifile svr3z.rfile"
1091                         else
1092                                 tm_file=i386/svr3gas.h
1093                                 extra_parts="crtbegin.o crtend.o"
1094                                 tmake_file=i386/t-crtstuff
1095                         fi
1096                 else
1097                         tm_file=i386/sysv3.h
1098                         extra_parts="crtbegin.o crtend.o"
1099                         tmake_file=i386/t-crtstuff
1100                 fi
1101                 ;;
1102         i386-*-vsta)                    # Intel 80386's running VSTa kernel
1103                 xm_file="${xm_file} i386/xm-vsta.h"
1104                 tm_file=i386/vsta.h
1105                 tmake_file=i386/t-vsta
1106                 xmake_file=i386/x-vsta
1107                 ;;
1108         i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
1109                 xm_file="${xm_file} i386/xm-cygwin32.h"
1110                 tmake_file=i386/t-cygwin32
1111                 tm_file=i386/cygwin32.h
1112                 xmake_file=i386/x-cygwin32
1113                 extra_objs=winnt.o
1114                 fixincludes=Makefile.in
1115                 if [[ x$enable_threads = xyes ]]; then
1116                         thread_file='win32'
1117                 fi
1118                 exeext=.exe
1119                 ;;
1120         i[[34567]]86-*-mingw32*)
1121                 tm_file=i386/mingw32.h
1122                 xm_file="${xm_file} i386/xm-mingw32.h"
1123                 tmake_file="i386/t-cygwin32 i386/t-mingw32"
1124                 extra_objs=winnt.o
1125                 xmake_file=i386/x-cygwin32
1126                 fixincludes=Makefile.in
1127                 if [[ x$enable_threads = xyes ]]; then
1128                         thread_file='win32'
1129                 fi
1130                 exeext=.exe
1131                 case $machine in
1132                         *mingw32msv*)
1133                                 ;;
1134                         *minwg32crt* | *mingw32*)
1135                                 tm_file="${tm_file} i386/crtdll.h"
1136                                 ;;
1137                 esac
1138                 ;;
1139         i[[34567]]86-*-winnt3*)
1140                 tm_file=i386/win-nt.h
1141                 out_file=i386/i386.c
1142                 xm_file="xm-winnt.h ${xm_file}"
1143                 xmake_file=winnt/x-winnt
1144                 tmake_file=i386/t-winnt
1145                 extra_host_objs="winnt.o oldnames.o"
1146                 extra_gcc_objs="spawnv.o oldnames.o"
1147                 fixincludes=fixinc.winnt
1148                 if [[ x$gnu_ld != xyes ]]
1149                 then
1150                         extra_programs=ld.exe
1151                 fi
1152                 if [[ x$enable_threads = xyes ]]; then
1153                         thread_file='win32'
1154                 fi
1155                 ;;
1156         i[[34567]]86-dg-dgux*)
1157                 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1158                 xm_defines="USG POSIX"
1159                 out_file=i386/dgux.c
1160                 tm_file=i386/dgux.h
1161                 tmake_file=i386/t-dgux
1162                 xmake_file=i386/x-dgux
1163                 fixincludes=fixinc.dgux
1164                 install_headers_dir=install-headers-cpio
1165               ;;
1166         i860-alliant-*)         # Alliant FX/2800
1167                 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1168                 xm_file="${xm_file}"
1169                 xmake_file=i860/x-fx2800
1170                 tmake_file=i860/t-fx2800
1171                 extra_parts="crtbegin.o crtend.o"
1172                 ;;
1173         i860-*-bsd*)
1174                 tm_file="${tm_file} i860/bsd.h"
1175                 if [[ x$gas = xyes ]]
1176                 then
1177                         tm_file="${tm_file} i860/bsd-gas.h"
1178                 fi
1179                 use_collect2=yes
1180                 ;;
1181         i860-*-mach*)
1182                 tm_file="${tm_file} i860/mach.h"
1183                 tmake_file=t-libc-ok
1184                 ;;
1185         i860-*-osf*)                    # Intel Paragon XP/S, OSF/1AD
1186                 tm_file="${tm_file} svr3.h i860/paragon.h"
1187                 xm_defines="USG SVR3"
1188                 tmake_file=t-osf
1189                 ;;
1190         i860-*-sysv3*)
1191                 tm_file="${tm_file} svr3.h i860/sysv3.h"
1192                 xm_defines="USG SVR3"
1193                 xmake_file=i860/x-sysv3
1194                 extra_parts="crtbegin.o crtend.o"
1195                 ;;
1196         i860-*-sysv4*)
1197                 tm_file="${tm_file} svr4.h i860/sysv4.h"
1198                 xm_defines="USG SVR3"
1199                 xmake_file=i860/x-sysv4
1200                 tmake_file=t-svr4
1201                 extra_parts="crtbegin.o crtend.o"
1202                 ;;
1203         i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1204                 tm_file="${tm_file} i960/vx960.h"
1205                 tmake_file=i960/t-vxworks960
1206                 use_collect2=yes
1207                 thread_file='vxworks'
1208                 ;;
1209         i960-wrs-vxworks5* | i960-wrs-vxworks)
1210                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1211                 tmake_file=i960/t-vxworks960
1212                 use_collect2=yes
1213                 thread_file='vxworks'
1214                 ;;
1215         i960-wrs-vxworks*)
1216                 tm_file="${tm_file} i960/vx960.h"
1217                 tmake_file=i960/t-vxworks960
1218                 use_collect2=yes
1219                 thread_file='vxworks'
1220                 ;;
1221         i960-*-coff*)
1222                 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1223                 tmake_file=i960/t-960bare
1224                 use_collect2=yes
1225                 ;;
1226         i960-*-rtems)
1227                 tmake_file="i960/t-960bare t-rtems"
1228                 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1229                 use_collect2=yes
1230                 ;;
1231         i960-*-*)                       # Default i960 environment.
1232                 use_collect2=yes
1233                 ;;
1234         m32r-*-elf*)
1235                 extra_parts="crtinit.o crtfini.o"
1236                 ;;
1237         m68000-convergent-sysv*)
1238                 tm_file=m68k/ctix.h
1239                 xm_file="m68k/xm-3b1.h ${xm_file}"
1240                 xm_defines=USG
1241                 use_collect2=yes
1242                 extra_headers=math-68881.h
1243                 ;;
1244         m68000-hp-bsd*)                 # HP 9000/200 running BSD
1245                 tm_file=m68k/hp2bsd.h
1246                 xmake_file=m68k/x-hp2bsd
1247                 use_collect2=yes
1248                 extra_headers=math-68881.h
1249                 ;;
1250         m68000-hp-hpux*)                # HP 9000 series 300
1251                 xm_file="xm_alloca.h ${xm_file}"
1252                 xm_defines="USG NO_SYS_SIGLIST"
1253                 if [[ x$gas = xyes ]]
1254                 then
1255                         xmake_file=m68k/x-hp320g
1256                         tm_file=m68k/hp310g.h
1257                 else
1258                         xmake_file=m68k/x-hp320
1259                         tm_file=m68k/hp310.h
1260                 fi
1261                 install_headers_dir=install-headers-cpio
1262                 use_collect2=yes
1263                 extra_headers=math-68881.h
1264                 ;;
1265         m68000-sun-sunos3*)
1266                 tm_file=m68k/sun2.h
1267                 use_collect2=yes
1268                 extra_headers=math-68881.h
1269                 ;;
1270         m68000-sun-sunos4*)
1271                 tm_file=m68k/sun2o4.h
1272                 use_collect2=yes
1273                 extra_headers=math-68881.h
1274                 ;;
1275         m68000-att-sysv*)
1276                 xm_file="m68k/xm-3b1.h ${xm_file}"
1277                 xm_defines=USG
1278                 if [[ x$gas = xyes ]]
1279                 then
1280                         tm_file=m68k/3b1g.h
1281                 else
1282                         tm_file=m68k/3b1.h
1283                 fi
1284                 use_collect2=yes
1285                 extra_headers=math-68881.h
1286                 ;;
1287         m68k-apple-aux*)                # Apple Macintosh running A/UX
1288                 xm_defines="USG AUX"
1289                 tmake_file=m68k/t-aux
1290                 install_headers_dir=install-headers-cpio
1291                 extra_headers=math-68881.h
1292                 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1293                 tm_file=
1294                 if [[ "$gnu_ld" = yes ]]
1295                 then
1296                         tm_file="${tm_file} m68k/auxgld.h"
1297                 else
1298                         tm_file="${tm_file} m68k/auxld.h"
1299                 fi
1300                 if [[ "$gas" = yes ]]
1301                 then
1302                         tm_file="${tm_file} m68k/auxgas.h"
1303                 else
1304                         tm_file="${tm_file} m68k/auxas.h"
1305                 fi
1306                 tm_file="${tm_file} m68k/a-ux.h"
1307                 float_format=m68k
1308                 ;;
1309         m68k-apollo-*)
1310                 tm_file=m68k/apollo68.h
1311                 xmake_file=m68k/x-apollo68
1312                 use_collect2=yes
1313                 extra_headers=math-68881.h
1314                 float_format=m68k
1315                 ;;
1316         m68k-altos-sysv*)                  # Altos 3068
1317                 if [[ x$gas = xyes ]]
1318                 then
1319                         tm_file=m68k/altos3068.h
1320                         xm_defines=USG
1321                 else
1322                         echo "The Altos is supported only with the GNU assembler" 1>&2
1323                         exit 1
1324                 fi
1325                 extra_headers=math-68881.h
1326                 ;;
1327         m68k-bull-sysv*)                # Bull DPX/2
1328                 if [[ x$gas = xyes ]]
1329                 then
1330                         if [[ x$stabs = xyes ]]
1331                         then
1332                                 tm_file=m68k/dpx2cdbx.h
1333                         else
1334                                 tm_file=m68k/dpx2g.h
1335                         fi
1336                 else
1337                         tm_file=m68k/dpx2.h
1338                 fi
1339                 xm_file="xm-alloca.h ${xm_file}"
1340                 xm_defines=USG
1341                 xmake_file=m68k/x-dpx2
1342                 use_collect2=yes
1343                 extra_headers=math-68881.h
1344                 ;;
1345         m68k-atari-sysv4*)              # Atari variant of V.4.
1346                 tm_file=m68k/atari.h
1347                 xm_file="xm-alloca.h ${xm_file}"
1348                 xm_defines="USG FULL_PROTOTYPES"
1349                 tmake_file=t-svr4
1350                 extra_parts="crtbegin.o crtend.o"
1351                 extra_headers=math-68881.h
1352                 float_format=m68k
1353                 ;;
1354         m68k-motorola-sysv*)
1355                 tm_file=m68k/mot3300.h
1356                 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
1357                 xm_defines=NO_SYS_SIGLIST
1358                 if [[ x$gas = xyes ]]
1359                 then
1360                         xmake_file=m68k/x-mot3300-gas
1361                         if [[ x$gnu_ld = xyes ]]
1362                         then
1363                                 tmake_file=m68k/t-mot3300-gald
1364                         else
1365                                 tmake_file=m68k/t-mot3300-gas
1366                                 use_collect2=yes
1367                         fi
1368                 else
1369                         xmake_file=m68k/x-mot3300
1370                         if [[ x$gnu_ld = xyes ]]
1371                         then
1372                                 tmake_file=m68k/t-mot3300-gld
1373                         else
1374                                 tmake_file=m68k/t-mot3300
1375                                 use_collect2=yes
1376                         fi
1377                 fi
1378                 gdb_needs_out_file_path=yes
1379                 extra_parts="crt0.o mcrt0.o"
1380                 extra_headers=math-68881.h
1381                 float_format=m68k
1382                 ;;
1383         m68k-ncr-sysv*)                 # NCR Tower 32 SVR3
1384                 tm_file=m68k/tower-as.h
1385                 xm_defines="USG SVR3"
1386                 xmake_file=m68k/x-tower
1387                 extra_parts="crtbegin.o crtend.o"
1388                 extra_headers=math-68881.h
1389                 ;;
1390         m68k-plexus-sysv*)
1391                 tm_file=m68k/plexus.h
1392                 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
1393                 xm_defines=USG
1394                 use_collect2=yes
1395                 extra_headers=math-68881.h
1396                 ;;
1397         m68k-tti-*)
1398                 tm_file=m68k/pbb.h
1399                 xm_file="xm-alloca.h ${xm_file}"
1400                 xm_defines=USG
1401                 extra_headers=math-68881.h
1402                 ;;
1403         m68k-crds-unos*)
1404                 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
1405                 xm_defines="USG unos"
1406                 xmake_file=m68k/x-crds
1407                 tm_file=m68k/crds.h
1408                 use_collect2=yes
1409                 extra_headers=math-68881.h
1410                 ;;
1411         m68k-cbm-sysv4*)                # Commodore variant of V.4.
1412                 tm_file=m68k/amix.h
1413                 xm_file="xm-alloca.h ${xm_file}"
1414                 xm_defines="USG FULL_PROTOTYPES"
1415                 xmake_file=m68k/x-amix
1416                 tmake_file=t-svr4
1417                 extra_parts="crtbegin.o crtend.o"
1418                 extra_headers=math-68881.h
1419                 float_format=m68k
1420                 ;;
1421         m68k-ccur-rtu)
1422                 tm_file=m68k/ccur-GAS.h
1423                 xmake_file=m68k/x-ccur
1424                 extra_headers=math-68881.h
1425                 use_collect2=yes
1426                 float_format=m68k
1427                 ;;
1428         m68k-hp-bsd4.4*)                # HP 9000/3xx running 4.4bsd
1429                 tm_file=m68k/hp3bsd44.h
1430                 xmake_file=m68k/x-hp3bsd44
1431                 use_collect2=yes
1432                 extra_headers=math-68881.h
1433                 float_format=m68k
1434                 ;;
1435         m68k-hp-bsd*)                   # HP 9000/3xx running Berkeley Unix
1436                 tm_file=m68k/hp3bsd.h
1437                 use_collect2=yes
1438                 extra_headers=math-68881.h
1439                 float_format=m68k
1440                 ;;
1441         m68k-isi-bsd*)
1442                 if [[ x$with_fp = xno ]]
1443                 then
1444                         tm_file=m68k/isi-nfp.h
1445                 else
1446                         tm_file=m68k/isi.h
1447                         float_format=m68k
1448                 fi
1449                 use_collect2=yes
1450                 extra_headers=math-68881.h
1451                 ;;
1452         m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1453                 xm_file="xm_alloca.h ${xm_file}"
1454                 xm_defines="USG NO_SYS_SIGLIST"
1455                 if [[ x$gas = xyes ]]
1456                 then
1457                         xmake_file=m68k/x-hp320g
1458                         tm_file=m68k/hp320g.h
1459                 else
1460                         xmake_file=m68k/x-hp320
1461                         tm_file=m68k/hpux7.h
1462                 fi
1463                 install_headers_dir=install-headers-cpio
1464                 use_collect2=yes
1465                 extra_headers=math-68881.h
1466                 float_format=m68k
1467                 ;;
1468         m68k-hp-hpux*)  # HP 9000 series 300
1469                 xm_file="xm_alloca.h ${xm_file}"
1470                 xm_defines="USG NO_SYS_SIGLIST"
1471                 if [[ x$gas = xyes ]]
1472                 then
1473                         xmake_file=m68k/x-hp320g
1474                         tm_file=m68k/hp320g.h
1475                 else
1476                         xmake_file=m68k/x-hp320
1477                         tm_file=m68k/hp320.h
1478                 fi
1479                 install_headers_dir=install-headers-cpio
1480                 use_collect2=yes
1481                 extra_headers=math-68881.h
1482                 float_format=m68k
1483                 ;;
1484         m68k-sun-mach*)
1485                 tm_file=m68k/sun3mach.h
1486                 use_collect2=yes
1487                 extra_headers=math-68881.h
1488                 float_format=m68k
1489                 ;;
1490         m68k-sony-newsos3*)
1491                 if [[ x$gas = xyes ]]
1492                 then
1493                         tm_file=m68k/news3gas.h
1494                 else
1495                         tm_file=m68k/news3.h
1496                 fi
1497                 use_collect2=yes
1498                 extra_headers=math-68881.h
1499                 float_format=m68k
1500                 ;;
1501         m68k-sony-bsd* | m68k-sony-newsos*)
1502                 if [[ x$gas = xyes ]]
1503                 then
1504                         tm_file=m68k/newsgas.h
1505                 else
1506                         tm_file=m68k/news.h
1507                 fi
1508                 use_collect2=yes
1509                 extra_headers=math-68881.h
1510                 float_format=m68k
1511                 ;;
1512         m68k-next-nextstep2*)
1513                 tm_file=m68k/next21.h
1514                 xm_file="m68k/xm-next.h ${xm_file}"
1515                 tmake_file=m68k/t-next
1516                 xmake_file=m68k/x-next
1517                 extra_objs=nextstep.o
1518                 extra_headers=math-68881.h
1519                 use_collect2=yes
1520                 float_format=m68k
1521                 ;;
1522         m68k-next-nextstep3*)
1523                 tm_file=m68k/next.h
1524                 xm_file="m68k/xm-next.h ${xm_file}"
1525                 tmake_file=m68k/t-next
1526                 xmake_file=m68k/x-next
1527                 extra_objs=nextstep.o
1528                 extra_headers=math-68881.h
1529                 float_format=m68k
1530                 if [[ x$enable_threads = xyes ]]; then
1531                         thread_file='mach'
1532                 fi
1533                 ;;
1534         m68k-sun-sunos3*)
1535                 if [[ x$with_fp = xno ]]
1536                 then
1537                         tm_file=m68k/sun3n3.h
1538                 else
1539                         tm_file=m68k/sun3o3.h
1540                         float_format=m68k
1541                 fi
1542                 use_collect2=yes
1543                 extra_headers=math-68881.h
1544                 ;;
1545         m68k-sun-sunos*)                        # For SunOS 4 (the default).
1546                 if [[ x$with_fp = xno ]]
1547                 then
1548                         tm_file=m68k/sun3n.h
1549                 else
1550                         tm_file=m68k/sun3.h
1551                         float_format=m68k
1552                 fi
1553                 use_collect2=yes
1554                 extra_headers=math-68881.h
1555                 ;;
1556         m68k-wrs-vxworks*)
1557                 tm_file=m68k/vxm68k.h
1558                 tmake_file=m68k/t-vxworks68
1559                 extra_headers=math-68881.h
1560                 thread_file='vxworks'
1561                 float_format=m68k
1562                 ;;
1563         m68k-*-aout*)
1564                 tmake_file=m68k/t-m68kbare
1565                 tm_file="m68k/m68k-aout.h libgloss.h"
1566                 extra_headers=math-68881.h
1567                 float_format=m68k
1568                 ;;
1569         m68k-*-coff*)
1570                 tmake_file=m68k/t-m68kbare
1571                 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1572                 extra_headers=math-68881.h
1573                 float_format=m68k
1574                 ;;
1575         m68k-*-lynxos*)
1576                 if [[ x$gas = xyes ]]
1577                 then
1578                         tm_file=m68k/lynx.h
1579                 else
1580                         tm_file=m68k/lynx-ng.h
1581                 fi
1582                 xm_file=m68k/xm-lynx.h
1583                 xmake_file=x-lynx
1584                 tmake_file=m68k/t-lynx
1585                 extra_headers=math-68881.h
1586                 float_format=m68k
1587                 ;;
1588         m68k-*-netbsd*)
1589                 tm_file=m68k/netbsd.h
1590                 # On NetBSD, the headers are already okay, except for math.h.
1591                 fixincludes=fixinc.wrap
1592                 tmake_file=t-netbsd
1593                 float_format=m68k
1594                 ;;
1595         m68k-*-sysv3*)                  # Motorola m68k's running system V.3
1596                 xm_file="xm-alloca.h ${xm_file}"
1597                 xm_defines=USG
1598                 xmake_file=m68k/x-m68kv
1599                 extra_parts="crtbegin.o crtend.o"
1600                 extra_headers=math-68881.h
1601                 float_format=m68k
1602                 ;;
1603         m68k-*-sysv4*)                  # Motorola m68k's running system V.4
1604                 tm_file=m68k/m68kv4.h
1605                 xm_file="xm-alloca.h ${xm_file}"
1606                 xm_defines=USG
1607                 tmake_file=t-svr4
1608                 extra_parts="crtbegin.o crtend.o"
1609                 extra_headers=math-68881.h
1610                 float_format=m68k
1611                 ;;
1612         m68k-*-linux-gnuaout*)          # Motorola m68k's running GNU/Linux
1613                                         # with a.out format
1614                 xmake_file=x-linux
1615                 tm_file=m68k/linux-aout.h
1616                 tmake_file="t-linux-aout m68k/t-linux-aout"
1617                 fixincludes=Makefile.in # The headers are ok already.
1618                 extra_headers=math-68881.h
1619                 float_format=m68k
1620                 gnu_ld=yes
1621                 ;;
1622         m68k-*-linux-gnulibc1)          # Motorola m68k's running GNU/Linux
1623                                         # with ELF format using the
1624                                         # GNU/Linux C library 5
1625                 xmake_file=x-linux
1626                 tm_file=m68k/linux.h
1627                 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1628                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1629                 fixincludes=Makefile.in # The headers are ok already.
1630                 extra_headers=math-68881.h
1631                 float_format=m68k
1632                 gnu_ld=yes
1633                 ;;
1634         m68k-*-linux-gnu*)              # Motorola m68k's running GNU/Linux
1635                                         # with ELF format using glibc 2
1636                                         # aka the GNU/Linux C library 6.
1637                 xmake_file=x-linux
1638                 tm_file=m68k/linux.h
1639                 tmake_file="t-linux m68k/t-linux"
1640                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1641                 fixincludes=Makefile.in # The headers are ok already.
1642                 extra_headers=math-68881.h
1643                 float_format=m68k
1644                 gnu_ld=yes
1645                 if [[ x$enable_threads = xyes ]]; then
1646                         thread_file='posix'
1647                 fi
1648                 ;;
1649         m68k-*-psos*)
1650                 tmake_file=m68k/t-m68kbare
1651                 tm_file=m68k/m68k-psos.h
1652                 extra_headers=math-68881.h
1653                 float_format=m68k
1654                 ;;
1655         m68k-*-rtems*)
1656                 tmake_file="m68k/t-m68kbare t-rtems"
1657                 tm_file=m68k/rtems.h
1658                 extra_headers=math-68881.h
1659                 float_format=m68k
1660                 ;;
1661
1662         m88k-dg-dgux*)
1663                 case $machine in
1664                   m88k-dg-dguxbcs*)
1665                     tm_file=m88k/dguxbcs.h
1666                     tmake_file=m88k/t-dguxbcs
1667                     ;;
1668                   *)
1669                     tm_file=m88k/dgux.h
1670                     tmake_file=m88k/t-dgux
1671                     ;;
1672                 esac
1673                 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1674                 xmake_file=m88k/x-dgux
1675                 if [[ x$gas = xyes ]]
1676                 then
1677                         tmake_file=m88k/t-dgux-gas
1678                 fi
1679                 fixincludes=fixinc.dgux
1680                 ;;
1681         m88k-dolphin-sysv3*)
1682                 tm_file=m88k/dolph.h
1683                 extra_parts="crtbegin.o crtend.o"
1684                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1685                 xmake_file=m88k/x-dolph
1686                 if [[ x$gas = xyes ]]
1687                 then
1688                         tmake_file=m88k/t-m88k-gas
1689                 fi
1690                 ;;
1691         m88k-tektronix-sysv3)
1692                 tm_file=m88k/tekXD88.h
1693                 extra_parts="crtbegin.o crtend.o"
1694                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1695                 xmake_file=m88k/x-tekXD88
1696                 if [[ x$gas = xyes ]]
1697                 then
1698                         tmake_file=m88k/t-m88k-gas
1699                 fi
1700                 ;;
1701         m88k-*-aout*)
1702                 tm_file=m88k/m88k-aout.h
1703                 ;;
1704         m88k-*-coff*)
1705                 tm_file=m88k/m88k-coff.h
1706                 tmake_file=m88k/t-bug
1707                 ;;
1708         m88k-*-luna*)
1709                 tm_file=m88k/luna.h
1710                 extra_parts="crtbegin.o crtend.o"
1711                 if [[ x$gas = xyes ]]
1712                 then
1713                         tmake_file=m88k/t-luna-gas
1714                 else
1715                         tmake_file=m88k/t-luna
1716                 fi
1717                 ;;
1718         m88k-*-sysv3*)
1719                 tm_file=m88k/sysv3.h
1720                 extra_parts="crtbegin.o crtend.o"
1721                 xm_file="m88k/xm-sysv3.h ${xm_file}"
1722                 xmake_file=m88k/x-sysv3
1723                 if [[ x$gas = xyes ]]
1724                 then
1725                         tmake_file=m88k/t-m88k-gas
1726                 fi
1727                 ;;
1728         m88k-*-sysv4*)
1729                 tm_file=m88k/sysv4.h
1730                 extra_parts="crtbegin.o crtend.o"
1731                 xmake_file=m88k/x-sysv4
1732                 tmake_file=m88k/t-sysv4
1733                 ;;
1734         mips-sgi-irix6*)                # SGI System V.4., IRIX 6
1735                 tm_file=mips/iris6.h
1736                 xm_file=mips/xm-iris6.h
1737                 fixincludes=fixinc.irix
1738                 xmake_file=mips/x-iris6
1739                 tmake_file=mips/t-iris6
1740                 if [[ x$enable_threads = xyes ]]; then
1741                         thread_file='irix'
1742                 fi
1743                 ;;
1744         mips-wrs-vxworks)
1745                 tm_file="mips/elf.h libgloss.h"
1746                 tmake_file=mips/t-ecoff
1747                 gas=yes
1748                 gnu_ld=yes
1749                 extra_parts="crtbegin.o crtend.o"
1750 #               thread_file='vxworks'
1751                 ;;
1752         mips-sgi-irix5cross64)          # Irix5 host, Irix 6 target, cross64
1753                 tm_file="mips/iris6.h mips/cross64.h"
1754                 xm_defines="USG HAVE_INTTYPES_H"
1755                 fixincludes=Makefile.in
1756                 xmake_file=mips/x-iris
1757                 tmake_file=mips/t-cross64
1758                 # See comment in mips/iris[56].h files.
1759                 use_collect2=yes
1760                 if [[ x$enable_threads = xyes ]]; then
1761                         thread_file='irix'
1762                 fi
1763                 ;;
1764         mips-sni-sysv4)
1765                 if [[ x$gas = xyes ]]
1766                 then
1767                         if [[ x$stabs = xyes ]]
1768                         then
1769                                 tm_file=mips/iris5gdb.h
1770                         else
1771                                 tm_file="mips/sni-svr4.h mips/sni-gas.h"
1772                         fi
1773                 else
1774                         tm_file=mips/sni-svr4.h
1775                 fi
1776                 xm_defines=USG
1777                 xmake_file=mips/x-sni-svr4
1778                 tmake_file=mips/t-mips-gas
1779                 if [[ x$gnu_ld != xyes ]]
1780                 then
1781                         use_collect2=yes
1782                 fi
1783                 ;;
1784         mips-sgi-irix5*)                # SGI System V.4., IRIX 5
1785                 if [[ x$gas = xyes ]]
1786                 then
1787                         tm_file="mips/iris5.h mips/iris5gas.h"
1788                         if [[ x$stabs = xyes ]]
1789                         then
1790                                 tm_file="${tm_file} dbx.h"
1791                         fi
1792                 else
1793                         tm_file=mips/iris5.h
1794                 fi
1795                 xm_defines="USG HAVE_INTTYPES_H"
1796                 fixincludes=fixinc.irix
1797                 xmake_file=mips/x-iris
1798                 # mips-tfile doesn't work yet
1799                 tmake_file=mips/t-mips-gas
1800                 # See comment in mips/iris5.h file.
1801                 use_collect2=yes
1802                 if [[ x$enable_threads = xyes ]]; then
1803                         thread_file='irix'
1804                 fi
1805                 ;;
1806         mips-sgi-irix4loser*)           # Mostly like a MIPS.
1807                 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
1808                 if [[ x$stabs = xyes ]]; then
1809                         tm_file="${tm_file} dbx.h"
1810                 fi
1811                 xm_defines=USG
1812                 xmake_file=mips/x-iris
1813                 if [[ x$gas = xyes ]]
1814                 then
1815                         tmake_file=mips/t-mips-gas
1816                 else
1817                         extra_passes="mips-tfile mips-tdump"
1818                 fi
1819                 if [[ x$gnu_ld != xyes ]]
1820                 then
1821                         use_collect2=yes
1822                 fi
1823                 if [[ x$enable_threads = xyes ]]; then
1824                         thread_file='irix'
1825                 fi
1826                 ;;
1827         mips-sgi-irix4*)                # Mostly like a MIPS.
1828                 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
1829                 if [[ x$stabs = xyes ]]; then
1830                         tm_file="${tm_file} dbx.h"
1831                 fi
1832                 xm_defines=USG
1833                 xmake_file=mips/x-iris
1834                 if [[ x$gas = xyes ]]
1835                 then
1836                         tmake_file=mips/t-mips-gas
1837                 else
1838                         extra_passes="mips-tfile mips-tdump"
1839                 fi
1840                 if [[ x$gnu_ld != xyes ]]
1841                 then
1842                         use_collect2=yes
1843                 fi
1844                 if [[ x$enable_threads = xyes ]]; then
1845                         thread_file='irix'
1846                 fi
1847                 ;;
1848         mips-sgi-*)                     # Mostly like a MIPS.
1849                 tm_file="mips/iris3.h ${tm_file}"
1850                 if [[ x$stabs = xyes ]]; then
1851                         tm_file="${tm_file} dbx.h"
1852                 fi
1853                 xm_defines=USG
1854                 xmake_file=mips/x-iris3
1855                 if [[ x$gas = xyes ]]
1856                 then
1857                         tmake_file=mips/t-mips-gas
1858                 else
1859                         extra_passes="mips-tfile mips-tdump"
1860                 fi
1861                 if [[ x$gnu_ld != xyes ]]
1862                 then
1863                         use_collect2=yes
1864                 fi
1865                 ;;
1866         mips-dec-osfrose*)              # Decstation running OSF/1 reference port with OSF/rose.
1867                 tm_file="mips/osfrose.h ${tm_file}"
1868                 xmake_file=mips/x-osfrose
1869                 tmake_file=mips/t-osfrose
1870                 extra_objs=halfpic.o
1871                 use_collect2=yes
1872                 ;;
1873         mips-dec-osf*)                  # Decstation running OSF/1 as shipped by DIGITAL
1874                 tm_file=mips/dec-osf1.h
1875                 if [[ x$stabs = xyes ]]; then
1876                         tm_file="${tm_file} dbx.h"
1877                 fi
1878                 xmake_file=mips/x-dec-osf1
1879                 if [[ x$gas = xyes ]]
1880                 then
1881                         tmake_file=mips/t-mips-gas
1882                 else
1883                         tmake_file=mips/t-ultrix
1884                         extra_passes="mips-tfile mips-tdump"
1885                 fi
1886                 if [[ x$gnu_ld != xyes ]]
1887                 then
1888                         use_collect2=yes
1889                 fi
1890                 ;;
1891         mips-dec-bsd*)                  # Decstation running 4.4 BSD
1892               tm_file=mips/dec-bsd.h
1893               fixincludes=
1894               if [[ x$gas = xyes ]]
1895               then
1896                         tmake_file=mips/t-mips-gas
1897               else
1898                         tmake_file=mips/t-ultrix
1899                         extra_passes="mips-tfile mips-tdump"
1900               fi
1901               if [[ x$gnu_ld != xyes ]]
1902               then
1903                         use_collect2=yes
1904               fi
1905               ;;
1906         mips-dec-netbsd*)                  # Decstation running NetBSD
1907                 tm_file=mips/netbsd.h
1908                 # On NetBSD, the headers are already okay, except for math.h.
1909                 fixincludes=fixinc.wrap
1910                 tmake_file=t-netbsd
1911                 ;;
1912         mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
1913                 tm_file="mips/news4.h ${tm_file}"
1914                 if [[ x$stabs = xyes ]]; then
1915                         tm_file="${tm_file} dbx.h"
1916                 fi
1917                 if [[ x$gas = xyes ]]
1918                 then
1919                         tmake_file=mips/t-mips-gas
1920                 else
1921                         extra_passes="mips-tfile mips-tdump"
1922                 fi
1923                 if [[ x$gnu_ld != xyes ]]
1924                 then
1925                         use_collect2=yes
1926                 fi
1927                 xmake_file=mips/x-sony
1928                 ;;
1929         mips-sony-sysv*)                # Sony NEWS 3800 with NEWSOS5.0.
1930                                         # That is based on svr4.
1931                 # t-svr4 is not right because this system doesn't use ELF.
1932                 tm_file="mips/news5.h ${tm_file}"
1933                 if [[ x$stabs = xyes ]]; then
1934                         tm_file="${tm_file} dbx.h"
1935                 fi
1936                 xm_file="xm-siglist.h ${xm_file}"
1937                 xm_defines=USG
1938                 if [[ x$gas = xyes ]]
1939                 then
1940                         tmake_file=mips/t-mips-gas
1941                 else
1942                         extra_passes="mips-tfile mips-tdump"
1943                 fi
1944                 if [[ x$gnu_ld != xyes ]]
1945                 then
1946                         use_collect2=yes
1947                 fi
1948                 ;;
1949         mips-tandem-sysv4*)             # Tandem S2 running NonStop UX
1950                 tm_file="mips/svr4-5.h mips/svr4-t.h"
1951                 if [[ x$stabs = xyes ]]; then
1952                         tm_file="${tm_file} dbx.h"
1953                 fi
1954                 xm_file="xm-siglist.h ${xm_file}"
1955                 xm_defines=USG
1956                 xmake_file=mips/x-sysv
1957                 if [[ x$gas = xyes ]]
1958                 then
1959                         tmake_file=mips/t-mips-gas
1960                         extra_parts="crtbegin.o crtend.o"
1961                 else
1962                         tmake_file=mips/t-mips
1963                         extra_passes="mips-tfile mips-tdump"
1964                 fi
1965                 if [[ x$gnu_ld != xyes ]]
1966                 then
1967                         use_collect2=yes
1968                 fi
1969                 ;;
1970         mips-*-ultrix* | mips-dec-mach3)        # Decstation.
1971                 tm_file="mips/ultrix.h ${tm_file}"
1972                 if [[ x$stabs = xyes ]]; then
1973                         tm_file="${tm_file} dbx.h"
1974                 fi
1975                 xmake_file=mips/x-ultrix
1976                 if [[ x$gas = xyes ]]
1977                 then
1978                         tmake_file=mips/t-mips-gas
1979                 else
1980                         tmake_file=mips/t-ultrix
1981                         extra_passes="mips-tfile mips-tdump"
1982                 fi
1983                 if [[ x$gnu_ld != xyes ]]
1984                 then
1985                         use_collect2=yes
1986                 fi
1987                 ;;
1988         mips-*-riscos[[56789]]bsd*)
1989                 tm_file=mips/bsd-5.h    # MIPS BSD 4.3, RISC-OS 5.0
1990                 if [[ x$stabs = xyes ]]; then
1991                         tm_file="${tm_file} dbx.h"
1992                 fi
1993                 if [[ x$gas = xyes ]]
1994                 then
1995                         tmake_file=mips/t-bsd-gas
1996                 else
1997                         tmake_file=mips/t-bsd
1998                         extra_passes="mips-tfile mips-tdump"
1999                 fi
2000                 if [[ x$gnu_ld != xyes ]]
2001                 then
2002                         use_collect2=yes
2003                 fi
2004                 ;;
2005         mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
2006                 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2007                 if [[ x$stabs = xyes ]]; then
2008                         tm_file="${tm_file} dbx.h"
2009                 fi
2010                 if [[ x$gas = xyes ]]
2011                 then
2012                         tmake_file=mips/t-bsd-gas
2013                 else
2014                         tmake_file=mips/t-bsd
2015                         extra_passes="mips-tfile mips-tdump"
2016                 fi
2017                 if [[ x$gnu_ld != xyes ]]
2018                 then
2019                         use_collect2=yes
2020                 fi
2021                 ;;
2022         mips-*-riscos[[56789]]sysv4*)
2023                 tm_file=mips/svr4-5.h   # MIPS System V.4., RISC-OS 5.0
2024                 if [[ x$stabs = xyes ]]; then
2025                         tm_file="${tm_file} dbx.h"
2026                 fi
2027                 xm_file="xm-siglist.h ${xm_file}"
2028                 xmake_file=mips/x-sysv
2029                 if [[ x$gas = xyes ]]
2030                 then
2031                         tmake_file=mips/t-svr4-gas
2032                 else
2033                         tmake_file=mips/t-svr4
2034                         extra_passes="mips-tfile mips-tdump"
2035                 fi
2036                 if [[ x$gnu_ld != xyes ]]
2037                 then
2038                         use_collect2=yes
2039                 fi
2040                 ;;
2041         mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
2042                 tm_file="mips/svr4-4.h ${tm_file}"
2043                 if [[ x$stabs = xyes ]]; then
2044                         tm_file="${tm_file} dbx.h"
2045                 fi
2046                 xm_defines=USG
2047                 xmake_file=mips/x-sysv
2048                 if [[ x$gas = xyes ]]
2049                 then
2050                         tmake_file=mips/t-svr4-gas
2051                 else
2052                         tmake_file=mips/t-svr4
2053                         extra_passes="mips-tfile mips-tdump"
2054                 fi
2055                 if [[ x$gnu_ld != xyes ]]
2056                 then
2057                         use_collect2=yes
2058                 fi
2059                 ;;
2060         mips-*-riscos[[56789]]sysv*)
2061                 tm_file=mips/svr3-5.h   # MIPS System V.3, RISC-OS 5.0
2062                 if [[ x$stabs = xyes ]]; then
2063                         tm_file="${tm_file} dbx.h"
2064                 fi
2065                 xm_defines=USG
2066                 xmake_file=mips/x-sysv
2067                 if [[ x$gas = xyes ]]
2068                 then
2069                         tmake_file=mips/t-svr3-gas
2070                 else
2071                         tmake_file=mips/t-svr3
2072                         extra_passes="mips-tfile mips-tdump"
2073                 fi
2074                 if [[ x$gnu_ld != xyes ]]
2075                 then
2076                         use_collect2=yes
2077                 fi
2078                 ;;
2079         mips-*-sysv* | mips-*-riscos*sysv*)
2080                 tm_file="mips/svr3-4.h ${tm_file}"
2081                 if [[ x$stabs = xyes ]]; then
2082                         tm_file="${tm_file} dbx.h"
2083                 fi
2084                 xm_defines=USG
2085                 xmake_file=mips/x-sysv
2086                 if [[ x$gas = xyes ]]
2087                 then
2088                         tmake_file=mips/t-svr3-gas
2089                 else
2090                         tmake_file=mips/t-svr3
2091                         extra_passes="mips-tfile mips-tdump"
2092                 fi
2093                 if [[ x$gnu_ld != xyes ]]
2094                 then
2095                         use_collect2=yes
2096                 fi
2097                 ;;
2098         mips-*-riscos[[56789]]*)                # Default MIPS RISC-OS 5.0.
2099                 tm_file=mips/mips-5.h
2100                 if [[ x$stabs = xyes ]]; then
2101                         tm_file="${tm_file} dbx.h"
2102                 fi
2103                 if [[ x$gas = xyes ]]
2104                 then
2105                         tmake_file=mips/t-mips-gas
2106                 else
2107                         extra_passes="mips-tfile mips-tdump"
2108                 fi
2109                 if [[ x$gnu_ld != xyes ]]
2110                 then
2111                         use_collect2=yes
2112                 fi
2113                 ;;
2114         mips-*-gnu*)
2115                 ;;
2116         mipsel-*-ecoff*)
2117                 tm_file=mips/ecoffl.h
2118                 if [[ x$stabs = xyes ]]; then
2119                         tm_file="${tm_file} dbx.h"
2120                 fi
2121                 tmake_file=mips/t-ecoff
2122                 ;;
2123         mips-*-ecoff*)
2124                 tm_file="gofast.h mips/ecoff.h"
2125                 if [[ x$stabs = xyes ]]; then
2126                         tm_file="${tm_file} dbx.h"
2127                 fi
2128                 tmake_file=mips/t-ecoff
2129                 ;;
2130         mipsel-*-elf*)
2131                 tm_file="mips/elfl.h libgloss.h"
2132                 tmake_file=mips/t-ecoff
2133                 ;;
2134         mips-*-elf*)
2135                 tm_file="mips/elf.h libgloss.h"
2136                 tmake_file=mips/t-ecoff
2137                 ;;
2138         mips64el-*-elf*)
2139                 tm_file="mips/elfl64.h libgloss.h"
2140                 tmake_file=mips/t-ecoff
2141                 ;;
2142         mips64orionel-*-elf*)
2143                 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
2144                 tmake_file=mips/t-ecoff
2145                 ;;
2146         mips64-*-elf*)
2147                 tm_file="mips/elf64.h libgloss.h"
2148                 tmake_file=mips/t-ecoff
2149                 ;;
2150         mips64orion-*-elf*)
2151                 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
2152                 tmake_file=mips/t-ecoff
2153                 ;;
2154         mips64orion-*-rtems*)
2155                 tm_file="mips/elforion.h mips/elfl64.h mips/rtems64.h"
2156                 tmake_file="mips/t-ecoff t-rtems"
2157                 ;;
2158         mipstx39el-*-elf*)
2159                 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2160                 tmake_file=mips/t-r3900
2161                 ;;
2162         mipstx39-*-elf*)
2163                 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2164                 tmake_file=mips/t-r3900
2165                 ;;
2166         mips-*-*)                               # Default MIPS RISC-OS 4.0.
2167                 if [[ x$stabs = xyes ]]; then
2168                         tm_file="${tm_file} dbx.h"
2169                 fi
2170                 if [[ x$gas = xyes ]]
2171                 then
2172                         tmake_file=mips/t-mips-gas
2173                 else
2174                         extra_passes="mips-tfile mips-tdump"
2175                 fi
2176                 if [[ x$gnu_ld != xyes ]]
2177                 then
2178                         use_collect2=yes
2179                 fi
2180                 ;;
2181         mn10200-*-*)
2182                 cpu_type=mn10200
2183                 tm_file="mn10200/mn10200.h"
2184                 if [[ x$stabs = xyes ]]
2185                 then
2186                         tm_file="${tm_file} dbx.h"
2187                 fi
2188                 use_collect2=no
2189                 ;;
2190         mn10300-*-*)
2191                 cpu_type=mn10300
2192                 tm_file="mn10300/mn10300.h"
2193                 if [[ x$stabs = xyes ]]
2194                 then
2195                         tm_file="${tm_file} dbx.h"
2196                 fi
2197                 use_collect2=no
2198                 ;;
2199         ns32k-encore-bsd*)
2200                 tm_file=ns32k/encore.h
2201                 use_collect2=yes
2202                 ;;
2203         ns32k-sequent-bsd*)
2204                 tm_file=ns32k/sequent.h
2205                 use_collect2=yes
2206                 ;;
2207         ns32k-tek6100-bsd*)
2208                 tm_file=ns32k/tek6100.h
2209                 use_collect2=yes
2210                 ;;
2211         ns32k-tek6200-bsd*)
2212                 tm_file=ns32k/tek6200.h
2213                 use_collect2=yes
2214                 ;;
2215 # This has not been updated to GCC 2.
2216 #       ns32k-ns-genix*)
2217 #               xm_defines=USG
2218 #               xmake_file=ns32k/x-genix
2219 #               tm_file=ns32k/genix.h
2220 #               use_collect2=yes
2221 #               ;;
2222         ns32k-merlin-*)
2223                 tm_file=ns32k/merlin.h
2224                 use_collect2=yes
2225                 ;;
2226         ns32k-pc532-mach*)
2227                 tm_file=ns32k/pc532-mach.h
2228                 use_collect2=yes
2229                 ;;
2230         ns32k-pc532-minix*)
2231                 tm_file=ns32k/pc532-min.h
2232                 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
2233                 xm_defines=USG
2234                 use_collect2=yes
2235                 ;;
2236         ns32k-pc532-netbsd*)
2237                 tm_file=ns32k/netbsd.h
2238                 # On NetBSD, the headers are already okay, except for math.h.
2239                 fixincludes=fixinc.wrap
2240                 tmake_file=t-netbsd
2241                 ;;
2242         pdp11-*-bsd)
2243                 tm_file="${tm_file} pdp11/2bsd.h"
2244                 ;;
2245         pdp11-*-*)
2246                 ;;
2247         pyramid-*-*)
2248                 cpu_type=pyr
2249                 xmake_file=pyr/x-pyr
2250                 use_collect2=yes
2251                 ;;
2252         romp-*-aos*)
2253                 use_collect2=yes
2254                 ;;
2255         romp-*-mach*)
2256                 xmake_file=romp/x-mach
2257                 use_collect2=yes
2258                 ;;
2259         powerpc-*-beos*)
2260                 cpu_type=rs6000
2261                 tm_file=rs6000/beos.h
2262                 xm_file=rs6000/xm-beos.h
2263                 tmake_file=rs6000/t-beos
2264                 xmake_file=rs6000/x-beos
2265                 ;;
2266         powerpc-*-sysv* | powerpc-*-elf*)
2267                 tm_file=rs6000/sysv4.h
2268                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2269                 xm_defines="USG POSIX"
2270                 extra_headers=ppc-asm.h
2271                 if [[ x$gas = xyes ]]
2272                 then
2273                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2274                 else
2275                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2276                 fi
2277                 xmake_file=rs6000/x-sysv4
2278                 ;;
2279         powerpc-*-eabiaix*)
2280                 tm_file=rs6000/eabiaix.h
2281                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2282                 fixincludes=Makefile.in
2283                 extra_headers=ppc-asm.h
2284                 ;;
2285         powerpc-*-eabisim*)
2286                 tm_file=rs6000/eabisim.h
2287                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2288                 fixincludes=Makefile.in
2289                 extra_headers=ppc-asm.h
2290                 ;;
2291         powerpc-*-eabi*)
2292                 tm_file=rs6000/eabi.h
2293                 if [[ x$gas = xyes ]]
2294                 then
2295                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2296                 else
2297                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2298                 fi
2299                 fixincludes=Makefile.in
2300                 extra_headers=ppc-asm.h
2301                 ;;
2302         powerpc-*-rtems*)
2303                 tm_file=rs6000/rtems.h
2304                 if [[ x$gas = xyes ]]
2305                 then
2306                      tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2307                 else
2308                      tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2309                 fi
2310                 fixincludes=Makefile.in
2311                 extra_headers=ppc-asm.h
2312                 ;;
2313         powerpc-*-linux-gnulibc1)
2314                 tm_file=rs6000/linux.h
2315                 xm_file=rs6000/xm-sysv4.h
2316                 out_file=rs6000/rs6000.c
2317                 if [[ x$gas = xyes ]]
2318                 then
2319                         tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2320                 else
2321                         tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2322                 fi
2323                 xmake_file=x-linux
2324                 fixincludes=Makefile.in
2325                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2326                 extra_headers=ppc-asm.h
2327                 if [[ x$enable_threads = xyes ]]; then
2328                         thread_file='posix'
2329                 fi
2330                 ;;
2331         powerpc-*-linux-gnu*)
2332                 tm_file=rs6000/linux.h
2333                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2334                 xm_defines="USG ${xm_defines}"
2335                 out_file=rs6000/rs6000.c
2336                 if [[ x$gas = xyes ]]
2337                 then
2338                         tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2339                 else
2340                         tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2341                 fi
2342                 xmake_file=x-linux
2343                 fixincludes=Makefile.in
2344                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2345                 extra_headers=ppc-asm.h
2346                 if [[ x$enable_threads = xyes ]]; then
2347                         thread_file='posix'
2348                 fi
2349                 ;;
2350         powerpc-wrs-vxworks*)
2351                 cpu_type=rs6000
2352                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2353                 xm_defines="USG POSIX"
2354                 tm_file=rs6000/vxppc.h
2355                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2356                 extra_headers=ppc-asm.h
2357                 thread_file='vxworks'
2358                 ;;
2359         powerpcle-*-sysv* | powerpcle-*-elf*)
2360                 tm_file=rs6000/sysv4le.h
2361                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2362                 xm_defines="USG POSIX"
2363                 if [[ x$gas = xyes ]]
2364                 then
2365                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2366                 else
2367                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2368                 fi
2369                 xmake_file=rs6000/x-sysv4
2370                 extra_headers=ppc-asm.h
2371                 ;;
2372         powerpcle-*-eabisim*)
2373                 tm_file=rs6000/eabilesim.h
2374                 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2375                 fixincludes=Makefile.in
2376                 extra_headers=ppc-asm.h
2377                 ;;
2378         powerpcle-*-eabi*)
2379                 tm_file=rs6000/eabile.h
2380                 if [[ x$gas = xyes ]]
2381                 then
2382                         tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2383                 else
2384                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2385                 fi
2386                 fixincludes=Makefile.in
2387                 extra_headers=ppc-asm.h
2388                 ;;
2389         powerpcle-*-winnt* )
2390                 tm_file=rs6000/win-nt.h
2391                 tmake_file=rs6000/t-winnt
2392 #               extra_objs=pe.o
2393                 fixincludes=Makefile.in
2394                 if [[ x$enable_threads = xyes ]]; then
2395                         thread_file='win32'
2396                 fi
2397                 extra_headers=ppc-asm.h
2398                 ;;
2399         powerpcle-*-pe | powerpcle-*-cygwin32)
2400                 tm_file=rs6000/cygwin32.h
2401                 xm_file="rs6000/xm-cygwin32.h ${xm_file}"
2402                 tmake_file=rs6000/t-winnt
2403                 xmake_file=rs6000/x-cygwin32
2404 #               extra_objs=pe.o
2405                 fixincludes=Makefile.in
2406                 if [[ x$enable_threads = xyes ]]; then
2407                         thread_file='win32'
2408                 fi
2409                 exeext=.exe
2410                 extra_headers=ppc-asm.h
2411                 ;;
2412         powerpcle-*-solaris2*)
2413                 tm_file=rs6000/sol2.h
2414                 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2415                 xm_defines="USG POSIX"
2416                 if [[ x$gas = xyes ]]
2417                 then
2418                         tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2419                 else
2420                         tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2421                 fi
2422                 xmake_file=rs6000/x-sysv4
2423                 case $machine in
2424                 *-*-solaris2.[[0-4]])
2425                         fixincludes=fixinc.svr4;;
2426                 *)
2427                         fixincludes=fixinc.wrap;;
2428                 esac
2429                 extra_headers=ppc-asm.h
2430                 ;;
2431         rs6000-ibm-aix3.[[01]]*)
2432                 tm_file=rs6000/aix31.h
2433                 xmake_file=rs6000/x-aix31
2434                 use_collect2=yes
2435                 ;;
2436         rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2437                 tm_file=rs6000/aix3newas.h
2438                 if [[ x$host != x$target ]]
2439                 then
2440                         tmake_file=rs6000/t-xnewas
2441                 else
2442                         tmake_file=rs6000/t-newas
2443                 fi
2444                 use_collect2=yes
2445                 ;;
2446         rs6000-ibm-aix4.[[12]].* | powerpc-ibm-aix4.[[12]].*)
2447                 tm_file=rs6000/aix41.h
2448                 if [[ x$host != x$target ]]
2449                 then
2450                         tmake_file=rs6000/t-xnewas
2451                 else
2452                         tmake_file=rs6000/t-newas
2453                 fi
2454                 xmake_file=rs6000/x-aix41
2455                 use_collect2=yes
2456                 ;;
2457         rs6000-ibm-aix4.[[3456789]].* | powerpc-ibm-aix4.[[3456789]].*)
2458                 tm_file=rs6000/aix43.h
2459                 if [[ x$host != x$target ]]
2460                 then
2461                         tmake_file=rs6000/t-xaix43
2462                 else
2463                         tmake_file=rs6000/t-aix43
2464                 fi
2465                 xmake_file=rs6000/x-aix43
2466                 use_collect2=yes
2467                 ;;
2468         rs6000-ibm-aix[[56789]].* | powerpc-ibm-aix[[56789]].*)
2469                 tm_file=rs6000/aix43.h
2470                 if [[ x$host != x$target ]]
2471                 then
2472                         tmake_file=rs6000/t-xaix43
2473                 else
2474                         tmake_file=rs6000/t-aix43
2475                 fi
2476                 xmake_file=rs6000/x-aix43
2477                 use_collect2=yes
2478                 ;;
2479         rs6000-ibm-aix*)
2480                 use_collect2=yes
2481                 ;;
2482         rs6000-bull-bosx)
2483                 use_collect2=yes
2484                 ;;
2485         rs6000-*-mach*)
2486                 tm_file=rs6000/mach.h
2487                 xm_file="${xm_file} rs6000/xm-mach.h"
2488                 xmake_file=rs6000/x-mach
2489                 use_collect2=yes
2490                 ;;
2491         rs6000-*-lynxos*)
2492                 tm_file=rs6000/lynx.h
2493                 xm_file=rs6000/xm-lynx.h
2494                 tmake_file=rs6000/t-rs6000
2495                 xmake_file=rs6000/x-lynx
2496                 use_collect2=yes
2497                 ;;
2498         sh-*-elf*)
2499                 tm_file=sh/elf.h
2500                 float_format=sh
2501                 ;;
2502         sh-*-rtems*)
2503                 tmake_file="sh/t-sh t-rtems"
2504                 tm_file=sh/rtems.h
2505                 float_format=sh
2506                 ;;
2507         sh-*-*)
2508                 float_format=sh
2509                 ;;
2510         sparc-tti-*)
2511                 tm_file=sparc/pbd.h
2512                 xm_file="xm-alloca.h ${xm_file}"
2513                 xm_defines=USG
2514                 ;;
2515         sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2516                 tm_file=sparc/vxsparc.h
2517                 tmake_file=sparc/t-vxsparc
2518                 use_collect2=yes
2519                 thread_file='vxworks'
2520                 ;;
2521         sparc-*-aout*)
2522                 tmake_file=sparc/t-sparcbare
2523                 tm_file="sparc/aout.h libgloss.h"
2524                 ;;
2525         sparc-*-netbsd*)
2526                 tm_file=sparc/netbsd.h
2527                 # On NetBSD, the headers are already okay, except for math.h.
2528                 fixincludes=fixinc.wrap
2529                 tmake_file=t-netbsd
2530                 ;;
2531         sparc-*-bsd*)
2532                 tm_file=sparc/bsd.h
2533                 ;;
2534         sparc-*-elf*)
2535                 tm_file=sparc/elf.h
2536                 tmake_file=sparc/t-elf
2537                 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2538                 #float_format=i128
2539                 float_format=i64
2540                 ;;
2541         sparc-*-linux-gnuaout*)         # Sparc's running GNU/Linux, a.out
2542                 xm_file="${xm_file} sparc/xm-linux.h"
2543                 tm_file=sparc/linux-aout.h
2544                 xmake_file=x-linux
2545                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2546                 gnu_ld=yes
2547                 ;;
2548         sparc-*-linux-gnulibc1*)        # Sparc's running GNU/Linux, libc5
2549                 xm_file="${xm_file} sparc/xm-linux.h"
2550                 xmake_file=x-linux
2551                 tm_file=sparc/linux.h
2552                 tmake_file="t-linux t-linux-gnulibc1"
2553                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2554                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2555                 gnu_ld=yes
2556                 ;;
2557         sparc-*-linux-gnu*)             # Sparc's running GNU/Linux, libc6
2558                 xm_file="${xm_file} sparc/xm-linux.h"
2559                 xmake_file=x-linux
2560                 tm_file=sparc/linux.h
2561                 tmake_file="t-linux"
2562                 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2563                 fixincludes=Makefile.in #On Linux, the headers are ok already.
2564                 gnu_ld=yes
2565                 if [[ x$enable_threads = xyes ]]; then
2566                         thread_file='posix'
2567                 fi
2568                 ;;
2569         sparc-*-lynxos*)
2570                 if [[ x$gas = xyes ]]
2571                 then
2572                         tm_file=sparc/lynx.h
2573                 else
2574                         tm_file=sparc/lynx-ng.h
2575                 fi
2576                 xm_file=sparc/xm-lynx.h
2577                 tmake_file=sparc/t-sunos41
2578                 xmake_file=x-lynx
2579                 ;;
2580         sparc-*-rtems*)
2581                 tmake_file="sparc/t-sparcbare t-rtems"
2582                 tm_file=sparc/rtems.h
2583                 ;;
2584         sparc-*-solaris2*)
2585                 if [[ x$gnu_ld = xyes ]]
2586                 then
2587                         tm_file=sparc/sol2.h
2588                 else
2589                         tm_file=sparc/sol2-sld.h
2590                 fi
2591                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2592                 xm_defines="USG POSIX"
2593                 tmake_file=sparc/t-sol2
2594                 xmake_file=sparc/x-sysv4
2595                 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2596                 case $machine in
2597                 *-*-solaris2.[[0-4]])
2598                         fixincludes=fixinc.svr4;;
2599                 *)
2600                         fixincludes=fixinc.wrap;;
2601                 esac
2602                 float_format=i128
2603                 if [[ x${enable_threads} = x ]]; then
2604                     enable_threads=$have_pthread_h
2605                     if [[ x${enable_threads} = x ]]; then
2606                         enable_threads=$have_thread_h
2607                     fi
2608                 fi
2609                 if [[ x${enable_threads} = xyes ]]; then
2610                     if [[ x${have_pthread_h} = xyes ]]; then
2611                         thread_file='posix'
2612                     else
2613                         thread_file='solaris'
2614                     fi
2615                 fi
2616                 ;;
2617         sparc-*-sunos4.0*)
2618                 tm_file=sparc/sunos4.h
2619                 tmake_file=sparc/t-sunos40
2620                 use_collect2=yes
2621                 ;;
2622         sparc-*-sunos4*)
2623                 tm_file=sparc/sunos4.h
2624                 tmake_file=sparc/t-sunos41
2625                 use_collect2=yes
2626                 if [[ x$gas = xyes ]]; then
2627                         tm_file="${tm_file} sparc/sun4gas.h"
2628                 fi
2629                 ;;
2630         sparc-*-sunos3*)
2631                 tm_file=sparc/sun4o3.h
2632                 use_collect2=yes
2633                 ;;
2634         sparc-*-sysv4*)
2635                 tm_file=sparc/sysv4.h
2636                 xm_file="xm-siglist.h sparc/xm-sysv4.h"
2637                 xm_defines="USG POSIX"
2638                 tmake_file=t-svr4
2639                 xmake_file=sparc/x-sysv4
2640                 extra_parts="crtbegin.o crtend.o"
2641                 ;;
2642         sparc-*-vxsim*)
2643                 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2644                 xm_defines="USG POSIX"
2645                 tm_file=sparc/vxsim.h
2646                 tmake_file=sparc/t-vxsparc
2647                 xmake_file=sparc/x-sysv4
2648                 ;;
2649         sparclet-*-aout*)
2650                 tm_file="sparc/splet.h libgloss.h"
2651                 tmake_file=sparc/t-splet
2652                 ;;
2653         sparclite-*-coff*)
2654                 tm_file="sparc/litecoff.h libgloss.h"
2655                 tmake_file=sparc/t-sparclite
2656                 ;;
2657         sparclite-*-aout*)
2658                 tm_file="sparc/lite.h aoutos.h libgloss.h"
2659                 tmake_file=sparc/t-sparclite
2660                 ;;
2661         sparc64-*-aout*)
2662                 tmake_file=sparc/t-sp64
2663                 tm_file=sparc/sp64-aout.h
2664                 ;;
2665         sparc64-*-elf*)
2666                 tmake_file=sparc/t-sp64
2667                 tm_file=sparc/sp64-elf.h
2668                 extra_parts="crtbegin.o crtend.o"
2669                 ;;
2670         sparc64-*-linux*)               # 64-bit Sparc's running GNU/Linux
2671                 tmake_file=sparc/t-sp64
2672                 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2673                 tm_file=sparc/linux64.h
2674                 xmake_file=x-linux
2675                 fixincludes=Makefile.in # The headers are ok already.
2676                 gnu_ld=yes
2677                 ;;
2678 # This hasn't been upgraded to GCC 2.
2679 #       tahoe-harris-*)                 # Harris tahoe, using COFF.
2680 #               tm_file=tahoe/harris.h
2681 #               ;;
2682 #       tahoe-*-bsd*)                   # tahoe running BSD
2683 #               ;;
2684         thumb-*-coff* | thumbel-*-coff*)
2685                 tm_file=arm/tcoff.h
2686                 out_file=arm/thumb.c
2687                 xm_file=arm/xm-thumb.h
2688                 md_file=arm/thumb.md
2689                 tmake_file=arm/t-thumb
2690                 ;;
2691 # This hasn't been upgraded to GCC 2.
2692 #       tron-*-*)
2693 #               cpu_type=gmicro
2694 #               use_collect2=yes
2695 #               ;;
2696         v850-*-*)
2697                 cpu_type=v850
2698                 tm_file="v850/v850.h"
2699                 xm_file="v850/xm-v850.h"
2700                 tmake_file=v850/t-v850
2701                 if [[ x$stabs = xyes ]]
2702                 then
2703                         tm_file="${tm_file} dbx.h"
2704                 fi
2705                 use_collect2=no
2706                 ;;
2707         vax-*-bsd*)                     # vaxen running BSD
2708                 use_collect2=yes
2709                 float_format=vax
2710                 ;;
2711         vax-*-sysv*)                    # vaxen running system V
2712                 tm_file="${tm_file} vax/vaxv.h"
2713                 xm_defines=USG
2714                 float_format=vax
2715                 ;;
2716         vax-*-netbsd*)
2717                 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2718                 # On NetBSD, the headers are already okay, except for math.h.
2719                 fixincludes=fixinc.wrap
2720                 tmake_file=t-netbsd
2721                 float_format=vax
2722                 ;;
2723         vax-*-ultrix*)                  # vaxen running ultrix
2724                 tm_file="${tm_file} vax/ultrix.h"
2725                 use_collect2=yes
2726                 float_format=vax
2727                 ;;
2728         vax-*-vms*)                     # vaxen running VMS
2729                 xm_file=vax/xm-vms.h
2730                 tm_file=vax/vms.h
2731                 float_format=vax
2732                 ;;
2733         vax-*-*)                        # vax default entry
2734                 float_format=vax
2735                 ;;
2736         we32k-att-sysv*)
2737                 xm_file="${xm_file} xm-svr3"
2738                 use_collect2=yes
2739                 ;;
2740         *)
2741                 echo "Configuration $machine not supported" 1>&2
2742                 exit 1
2743                 ;;
2744         esac
2745
2746         case $machine in
2747         *-*-linux-gnu*)
2748                 ;; # Existing GNU/Linux systems do not use the GNU setup.
2749         *-*-gnu*)
2750                 # On the GNU system, the setup is just about the same on
2751                 # each different CPU.  The specific machines that GNU
2752                 # supports are matched above and just set $cpu_type.
2753                 xm_file="xm-gnu.h ${xm_file}"
2754                 tm_file=${cpu_type}/gnu.h
2755                 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2756                 # GNU always uses ELF.
2757                 elf=yes
2758                 # GNU tools are the only tools.
2759                 gnu_ld=yes
2760                 gas=yes
2761                 # On GNU, the headers are already okay.
2762                 fixincludes=Makefile.in
2763                 xmake_file=x-linux      # These details are the same as Linux.
2764                 tmake_file=t-gnu        # These are not.
2765                 ;;
2766         *-*-sysv4*)
2767                 fixincludes=fixinc.svr4
2768                 xmake_try_sysv=x-sysv
2769                 install_headers_dir=install-headers-cpio
2770                 ;;
2771         *-*-sysv*)
2772                 install_headers_dir=install-headers-cpio
2773                 ;;
2774         esac
2775
2776         # Distinguish i[34567]86
2777         # Also, do not run mips-tfile on MIPS if using gas.
2778         # Process --with-cpu= for PowerPC/rs6000
2779         target_cpu_default2=
2780         case $machine in
2781         i486-*-*)
2782                 target_cpu_default2=1
2783                 ;;
2784         i586-*-*)
2785                 target_cpu_default2=2
2786                 ;;
2787         i686-*-* | i786-*-*)
2788                 target_cpu_default2=3
2789                 ;;
2790         alpha*-*-*)
2791                 case $machine in
2792                         alphaev6*)
2793                                 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2794                                 ;;
2795                         alphapca56*)
2796                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
2797                                 ;;
2798                         alphaev56*)
2799                                 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2800                                 ;;
2801                         alphaev5*)
2802                                 target_cpu_default2="MASK_CPU_EV5"
2803                                 ;;
2804                 esac
2805                                 
2806                 if [[ x$gas = xyes ]]
2807                 then
2808                         if [[ "$target_cpu_default2" = "" ]]
2809                         then
2810                                 target_cpu_default2="MASK_GAS"
2811                         else
2812                                 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2813                         fi
2814                 fi
2815                 ;;
2816         arm*-*-*)
2817                 case "x$with_cpu" in
2818                         x)
2819                                 # The most generic
2820                                 target_cpu_default2="TARGET_CPU_generic"
2821                                 ;;
2822
2823                         # Distinguish cores, and major variants
2824                         # arm7m doesn't exist, but D & I don't affect code
2825                         xarm[23678] | xarm250 | xarm[67][01]0 \
2826                         | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2827                         | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2828                         | xstrongarm | xstrongarm110)
2829                                 target_cpu_default2="TARGET_CPU_$with_cpu"
2830                                 ;;
2831
2832                         xyes | xno)
2833                                 echo "--with-cpu must be passed a value" 1>&2
2834                                 exit 1
2835                                 ;;
2836
2837                         *)
2838                                 if [[ x$pass2done = xyes ]]
2839                                 then
2840                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2841                                         exit 1
2842                                 fi
2843                                 ;;
2844                 esac
2845                 ;;
2846
2847         mips*-*-ecoff* | mips*-*-elf*)
2848                 if [[ x$gas = xyes ]]
2849                 then
2850                         if [[ x$gnu_ld = xyes ]]
2851                         then
2852                                 target_cpu_default2=20
2853                         else
2854                                 target_cpu_default2=16
2855                         fi
2856                 fi
2857                 ;;
2858         mips*-*-*)
2859                 if [[ x$gas = xyes ]]
2860                 then
2861                         target_cpu_default2=16
2862                 fi
2863                 ;;
2864         powerpc*-*-* | rs6000-*-*)
2865                 case "x$with_cpu" in
2866                         x)
2867                                 ;;
2868
2869                         xcommon | xpower | xpower2 | xpowerpc | xrios \
2870                           | xrios1 | xrios2 | xrsc | xrsc1 \
2871                           | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2872                           | x403 | x505 | x801 | x821 | x823 | x860)
2873                                 target_cpu_default2="\"$with_cpu\""
2874                                 ;;
2875
2876                         xyes | xno)
2877                                 echo "--with-cpu must be passed a value" 1>&2
2878                                 exit 1
2879                                 ;;
2880
2881                         *)
2882                                 if [[ x$pass2done = xyes ]]
2883                                 then
2884                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2885                                         exit 1
2886                                 fi
2887                                 ;;
2888                 esac
2889                 ;;
2890         sparc*-*-*)
2891                 case ".$with_cpu" in
2892                         .)
2893                                 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2894                                 ;;
2895                         .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2896                                 target_cpu_default2="TARGET_CPU_$with_cpu"
2897                                 ;;
2898                         *)
2899                                 if [[ x$pass2done = xyes ]]
2900                                 then
2901                                         echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2902                                         exit 1
2903                                 fi
2904                                 ;;
2905                 esac
2906                 ;;
2907         esac
2908
2909         if [[ "$target_cpu_default2" != "" ]]
2910         then
2911                 if [[ "$target_cpu_default" != "" ]]
2912                 then
2913                         target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2914                 else
2915                         target_cpu_default=$target_cpu_default2
2916                 fi
2917         fi
2918
2919         # No need for collect2 if we have the GNU linker.
2920         case x$gnu_ld in
2921         xyes)
2922                 use_collect2=
2923                 ;;
2924         esac
2925
2926 # Save data on machine being used to compile GCC in build_xm_file.
2927 # Save data on host machine in vars host_xm_file and host_xmake_file.
2928         if [[ x$pass1done = x ]]
2929         then
2930                 if [[ x"$xm_file" = x ]]
2931                 then build_xm_file=$cpu_type/xm-$cpu_type.h
2932                 else build_xm_file=$xm_file
2933                 fi
2934                 build_xm_defines=$xm_defines
2935                 build_install_headers_dir=$install_headers_dir
2936                 build_exeext=$exeext
2937                 pass1done=yes
2938         else
2939                 if [[ x$pass2done = x ]]
2940                 then
2941                         if [[ x"$xm_file" = x ]]
2942                         then host_xm_file=$cpu_type/xm-$cpu_type.h
2943                         else host_xm_file=$xm_file
2944                         fi
2945                         host_xm_defines=$xm_defines
2946                         if [[ x"$xmake_file" = x ]]
2947                         then xmake_file=$cpu_type/x-$cpu_type
2948                         fi
2949                         host_xmake_file="$xmake_file"
2950                         host_truncate_target=$truncate_target
2951                         host_extra_gcc_objs=$extra_gcc_objs
2952                         host_extra_objs=$extra_host_objs
2953                         host_exeext=$exeext
2954                         pass2done=yes
2955                 fi
2956         fi
2957 done
2958
2959 extra_objs="${host_extra_objs} ${extra_objs}"
2960
2961 # Default the target-machine variables that were not explicitly set.
2962 if [[ x"$tm_file" = x ]]
2963 then tm_file=$cpu_type/$cpu_type.h; fi
2964
2965 if [[ x$extra_headers = x ]]
2966 then extra_headers=; fi
2967
2968 if [[ x"$xm_file" = x ]]
2969 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2970
2971 if [[ x$md_file = x ]]
2972 then md_file=$cpu_type/$cpu_type.md; fi
2973
2974 if [[ x$out_file = x ]]
2975 then out_file=$cpu_type/$cpu_type.c; fi
2976
2977 if [[ x"$tmake_file" = x ]]
2978 then tmake_file=$cpu_type/t-$cpu_type
2979 fi
2980
2981 if [[ x$float_format = x ]]
2982 then float_format=i64
2983 fi
2984
2985 if [[ x$enable_haifa = x ]]
2986 then
2987   case $target in
2988     alpha*-* | hppa1.?-* | powerpc*-* | rs6000-* | *sparc-* | m32r*-*)
2989       enable_haifa=yes;;
2990   esac
2991 fi
2992
2993 # Say what files are being used for the output code and MD file.
2994 echo "Using \`$srcdir/config/$out_file' to output insns."
2995 echo "Using \`$srcdir/config/$md_file' as machine description file."
2996
2997 count=a
2998 for f in $tm_file; do
2999         count=${count}x
3000 done
3001 if [[ $count = ax ]]; then
3002         echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3003 else
3004         echo "Using the following target machine macro files:"
3005         for f in $tm_file; do
3006                 echo "  $srcdir/config/$f"
3007         done
3008 fi
3009
3010 count=a
3011 for f in $host_xm_file; do
3012         count=${count}x
3013 done
3014 if [[ $count = ax ]]; then
3015         echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3016 else
3017         echo "Using the following host machine macro files:"
3018         for f in $host_xm_file; do
3019                 echo "  $srcdir/config/$f"
3020         done
3021 fi
3022
3023 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
3024         count=a
3025         for f in $build_xm_file; do
3026                 count=${count}x
3027         done
3028         if [[ $count = ax ]]; then
3029                 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3030         else
3031                 echo "Using the following build machine macro files:"
3032                 for f in $build_xm_file; do
3033                         echo "  $srcdir/config/$f"
3034                 done
3035         fi
3036 fi
3037
3038 if [[ x$thread_file = x ]]; then
3039         if [[ x$target_thread_file != x ]]; then
3040                 thread_file=$target_thread_file
3041         else
3042                 thread_file='single'
3043         fi
3044 fi
3045
3046 # Set up the header files.
3047 # $links is the list of header files to create.
3048 # $vars is the list of shell variables with file names to include.
3049 # auto-host.h is the file containing items generated by autoconf and is
3050 # the first file included by config.h.
3051 null_defines=
3052 host_xm_file="auto-host.h ${host_xm_file}"
3053
3054 # If host=build, it is correct to have hconfig include auto-host.h
3055 # as well.  If host!=build, we are in error and need to do more 
3056 # work to find out the build config parameters.
3057 if [[ x$host = x$build ]]
3058 then
3059         build_xm_file="auto-host.h ${build_xm_file}"
3060 else
3061         # We create a subdir, then run autoconf in the subdir.
3062         # To prevent recursion we set host and build for the new
3063         # invocation of configure to the build for this invocation
3064         # of configure. 
3065         tempdir=build.$$
3066         rm -rf $tempdir
3067         mkdir $tempdir
3068         cd $tempdir
3069         case ${srcdir} in
3070         /*) realsrcdir=${srcdir};;
3071         *) realsrcdir=../${srcdir};;
3072         esac
3073         CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
3074                 --target=$target --host=$build --build=$build
3075
3076         # We just finished tests for the build machine, so rename
3077         # the file auto-build.h in the gcc directory.
3078         mv auto-host.h ../auto-build.h
3079         cd ..
3080         rm -rf $tempdir
3081         build_xm_file="auto-build.h ${build_xm_file}"
3082 fi
3083
3084 vars="host_xm_file tm_file xm_file build_xm_file"
3085 links="config.h tm.h tconfig.h hconfig.h"
3086 defines="host_xm_defines null_defines xm_defines build_xm_defines"
3087
3088 rm -f config.bak
3089 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
3090
3091 # Make the links.
3092 while [[ -n "$vars" ]]
3093 do
3094         set $vars; var=$1; shift; vars=$*
3095         set $links; link=$1; shift; links=$*
3096         set $defines; define=$1; shift; defines=$*
3097
3098         rm -f $link
3099
3100         # Define TARGET_CPU_DEFAULT if the system wants one.
3101         # This substitutes for lots of *.h files.
3102         if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
3103         then
3104                 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
3105         fi
3106
3107         for file in `eval echo '$'$var`; do
3108                 echo "#include \"$file\"" >>$link
3109         done
3110
3111         for def in `eval echo '$'$define`; do
3112                 echo "#ifndef $def" >>$link
3113                 echo "#define $def" >>$link
3114                 echo "#endif" >>$link
3115         done
3116 done
3117
3118 # Truncate the target if necessary
3119 if [[ x$host_truncate_target != x ]]; then
3120         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3121 fi
3122
3123 # Get the version number from the toplevel
3124 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
3125
3126 # Get an absolute path to the GCC top-level source directory
3127 holddir=`pwd`
3128 cd $srcdir
3129 topdir=`pwd`
3130 cd $holddir
3131
3132 # Conditionalize the makefile for this host machine.
3133 # Make-host contains the concatenation of all host makefile fragments
3134 # [there can be more than one].  This file is built by configure.frag.
3135 host_overrides=Make-host
3136 dep_host_xmake_file=
3137 for f in .. ${host_xmake_file}
3138 do
3139         if [[ -f ${srcdir}/config/$f ]]
3140         then
3141                 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
3142         fi
3143 done
3144
3145 # Conditionalize the makefile for this target machine.
3146 # Make-target contains the concatenation of all host makefile fragments
3147 # [there can be more than one].  This file is built by configure.frag.
3148 target_overrides=Make-target
3149 dep_tmake_file=
3150 for f in .. ${tmake_file}
3151 do
3152         if [[ -f ${srcdir}/config/$f ]]
3153         then
3154                 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
3155         fi
3156 done
3157
3158 # If the host doesn't support symlinks, modify CC in
3159 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
3160 # Otherwise, we can use "CC=$(CC)".
3161 rm -f symtest.tem
3162 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
3163 then
3164         cc_set_by_configure="\$(CC)"
3165         stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
3166 else
3167         rm -f symtest.tem
3168         if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
3169         then
3170                 symbolic_link="cp -p"
3171         else
3172                 symbolic_link="cp"
3173         fi
3174         cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
3175         stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
3176 fi
3177 rm -f symtest.tem
3178
3179 out_object_file=`basename $out_file .c`.o
3180
3181 tm_file_list=
3182 for f in $tm_file; do
3183         tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
3184 done
3185
3186 host_xm_file_list=
3187 for f in $host_xm_file; do
3188         if test $f != "auto-host.h"; then
3189                 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
3190         else
3191                 host_xm_file_list="${host_xm_file_list} auto-host.h"
3192         fi
3193 done
3194
3195 build_xm_file_list=
3196 for f in $build_xm_file; do
3197         if test $f != "auto-build.h"; then
3198                 if test $f != "auto-host.h"; then
3199                         build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
3200                 else
3201                         build_xm_file_list="${build_xm_file_list} auto-host.h"
3202                 fi
3203         else
3204                 build_xm_file_list="${build_xm_file_list} auto-build.h"
3205         fi
3206 done
3207
3208 # Define macro CROSS_COMPILE in compilation
3209 # if this is a cross-compiler.
3210 # Also use all.cross instead of all.internal
3211 # and add cross-make to Makefile.
3212 cross_overrides="/dev/null"
3213 if [[ x$host != x$target ]]
3214 then
3215         cross_defines="CROSS=-DCROSS_COMPILE"
3216         cross_overrides="${topdir}/cross-make"
3217 fi
3218
3219 # When building gcc with a cross-compiler, we need to fix a few things.
3220 # This must come after cross-make as we want all.build to override
3221 # all.cross.
3222 build_overrides="/dev/null"
3223 if [[ x$build != x$host ]]
3224 then
3225         build_overrides="${topdir}/build-make"
3226 fi
3227
3228 # Expand extra_headers to include complete path.
3229 # This substitutes for lots of t-* files.
3230 extra_headers_list=
3231 if [[ "x$extra_headers" = x ]]
3232 then true
3233 else
3234         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
3235         for file in $extra_headers;
3236         do
3237                 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
3238         done
3239 fi
3240
3241 # Add a definition of USE_COLLECT2 if system wants one.
3242 # Also tell toplev.c what to do.
3243 # This substitutes for lots of t-* files.
3244 if [[ x$use_collect2 = x ]]
3245 then
3246         will_use_collect2=
3247         maybe_use_collect2=
3248 else
3249         will_use_collect2="collect2"
3250         maybe_use_collect2="-DUSE_COLLECT2"
3251 fi
3252
3253 # NEED TO CONVERT
3254 # Set MD_DEPS if the real md file is in md.pre-cpp.
3255 # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
3256 # for line oriented comments, so we must always use a GNU cpp.  If
3257 # building gcc with a cross compiler, use the cross compiler just
3258 # built.  Otherwise, we can use the cpp just built.
3259 md_file_sub=
3260 if [[ "x$md_cppflags" = x ]]
3261 then
3262         md_file_sub=$srcdir/config/$md_file
3263 else
3264         md_file=md
3265 fi
3266
3267 # If we have gas in the build tree, make a link to it.
3268 if [[ -f ../gas/Makefile ]]; then
3269         rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3270 fi
3271
3272 # If we have ld in the build tree, make a link to it.
3273 if [[ -f ../ld/Makefile ]]; then
3274 #       if [[ x$use_collect2 = x ]]; then
3275 #               rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3276 #       else
3277                 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3278 #       fi
3279 fi
3280
3281 # Figure out what assembler alignment features are present.
3282 AC_MSG_CHECKING(assembler alignment features)
3283 gcc_cv_as=
3284 gcc_cv_as_alignment_features=
3285 if [[ -x as$host_exeext ]]; then
3286         # Build using assembler in the current directory.
3287         gcc_cv_as=./as$host_exeext
3288 elif [[ -f $srcdir/../gas/configure.in ]]; then
3289         # Single tree build which includes gas.
3290         for f in $srcdir/../gas/configure.in $srcdir/../gas/Makefile.in
3291         do
3292                 gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
3293                 if [[ x$gcc_cv_gas_version != x ]]; then
3294                         break
3295                 fi
3296         done
3297         gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
3298         gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
3299         # Gas version 2.8 and later support specifying the maximum
3300         # bytes to skip when using .p2align.
3301         if [[ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2 ]]; then
3302                 gcc_cv_as_alignment_features=".p2align including maximum skip"
3303                 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3304         fi
3305 elif [[ x$host = x$target ]]; then
3306         # Native build.
3307         gcc_cv_as=as$host_exeext
3308 fi
3309 if [[ x$gcc_cv_as != x ]]; then
3310         # Check if specifying the maximum bytes to skip when
3311         # using .p2align is supported.
3312         echo ".p2align 4,,7" > conftest.s
3313         if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
3314                 gcc_cv_as_alignment_features=".p2align including maximum skip"
3315                 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3316         fi
3317         rm -f conftest.s conftest.o
3318 fi
3319 AC_MSG_RESULT($gcc_cv_as_alignment_features)
3320
3321 # Figure out what language subdirectories are present.
3322 subdirs=
3323 for lang in ${srcdir}/*/config-lang.in ..
3324 do
3325         case $lang in
3326         ..) ;;
3327         # The odd quoting in the next line works around
3328         # an apparent bug in bash 1.12 on linux.
3329         ${srcdir}/[[*]]/config-lang.in) ;;
3330         *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3331         esac
3332 done
3333
3334 # Make gthr-default.h if we have a thread file.
3335 gthread_flags=
3336 if [[ $thread_file != single ]]; then
3337     rm -f gthr-default.h
3338     echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3339     gthread_flags=-DHAVE_GTHR_DEFAULT
3340 fi
3341 AC_SUBST(gthread_flags)
3342
3343 # Make empty files to contain the specs and options for each language.
3344 # Then add #include lines to for a compiler that has specs and/or options.
3345
3346 lang_specs_files=
3347 lang_options_files=
3348 rm -f specs.h options.h
3349 touch specs.h options.h
3350 for subdir in . $subdirs
3351 do
3352         if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3353                 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3354                 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3355         fi
3356         if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3357                 echo "#include \"$subdir/lang-options.h\"" >>options.h
3358                 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3359         fi
3360 done
3361
3362 # These (without "all_") are set in each config-lang.in.
3363 # `language' must be a single word so is spelled singularly.
3364 all_languages=
3365 all_boot_languages=
3366 all_compilers=
3367 all_stagestuff=
3368 all_diff_excludes=
3369 all_outputs=Makefile
3370 # List of language makefile fragments.
3371 all_lang_makefiles=
3372 all_headers=
3373 all_lib2funcs=
3374
3375 # Add the language fragments.
3376 # Languages are added via two mechanisms.  Some information must be
3377 # recorded in makefile variables, these are defined in config-lang.in.
3378 # We accumulate them and plug them into the main Makefile.
3379 # The other mechanism is a set of hooks for each of the main targets
3380 # like `clean', `install', etc.
3381
3382 language_fragments="Make-lang"
3383 language_hooks="Make-hooks"
3384 oldstyle_subdirs=
3385
3386 for s in .. $subdirs
3387 do
3388         if [[ $s != ".." ]]
3389         then
3390                 language=
3391                 boot_language=
3392                 compilers=
3393                 stagestuff=
3394                 diff_excludes=
3395                 headers=
3396                 outputs=
3397                 lib2funcs=
3398                 . ${srcdir}/$s/config-lang.in
3399                 if [[ "x$language" = x ]]
3400                 then
3401                         echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3402                         exit 1
3403                 fi
3404                 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3405                 all_languages="$all_languages $language"
3406                 if [[ "x$boot_language" = xyes ]]
3407                 then
3408                         all_boot_languages="$all_boot_languages $language"
3409                 fi
3410                 all_compilers="$all_compilers $compilers"
3411                 all_stagestuff="$all_stagestuff $stagestuff"
3412                 all_diff_excludes="$all_diff_excludes $diff_excludes"
3413                 all_headers="$all_headers $headers"
3414                 all_outputs="$all_outputs $outputs"
3415                 if [[ x$outputs = x ]]
3416                 then
3417                         oldstyle_subdirs="$oldstyle_subdirs $s"
3418                 fi
3419                 all_lib2funcs="$all_lib2funcs $lib2funcs"
3420         fi
3421 done
3422
3423 # Since we can't use `::' targets, we link each language in
3424 # with a set of hooks, reached indirectly via lang.${target}.
3425
3426 rm -f Make-hooks
3427 touch Make-hooks
3428 target_list="all.build all.cross start.encap rest.encap \
3429         info dvi \
3430         install-normal install-common install-info install-man \
3431         uninstall distdir \
3432         mostlyclean clean distclean extraclean maintainer-clean \
3433         stage1 stage2 stage3 stage4"
3434 for t in $target_list
3435 do
3436         x=
3437         for l in .. $all_languages
3438         do
3439                 if [[ $l != ".." ]]; then
3440                         x="$x $l.$t"
3441                 fi
3442         done
3443         echo "lang.$t: $x" >> Make-hooks
3444 done
3445
3446 # If we're not building in srcdir, create .gdbinit.
3447
3448 if [[ ! -f Makefile.in ]]; then
3449         echo "dir ." > .gdbinit
3450         echo "dir ${srcdir}" >> .gdbinit
3451         if [[ x$gdb_needs_out_file_path = xyes ]]
3452         then
3453                 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3454         fi
3455         if [[ "x$subdirs" != x ]]; then
3456                 for s in $subdirs
3457                 do
3458                         echo "dir ${srcdir}/$s" >> .gdbinit
3459                 done
3460         fi
3461         echo "source ${srcdir}/.gdbinit" >> .gdbinit
3462 fi
3463
3464 # Define variables host_canonical and build_canonical
3465 # because some Cygnus local changes in the Makefile depend on them.
3466 build_canonical=${build}
3467 host_canonical=${host}
3468 target_subdir=
3469 if [[ "${host}" != "${target}" ]] ; then
3470     target_subdir=${target}/
3471 fi
3472 AC_SUBST(build_canonical)
3473 AC_SUBST(host_canonical)
3474 AC_SUBST(target_subdir)
3475         
3476 # If this is using newlib, then define inhibit_libc in
3477 # LIBGCC2_CFLAGS.  This will cause __eprintf to be left out of
3478 # libgcc.a, but that's OK because newib should have its own version of
3479 # assert.h.
3480 inhibit_libc=
3481 if [[ x$with_newlib = xyes ]]; then
3482         inhibit_libc=-Dinhibit_libc
3483 fi
3484 AC_SUBST(inhibit_libc)
3485
3486 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3487 sched_prefix=
3488 sched_cflags=
3489 if [[ x$enable_haifa = xyes ]]; then
3490     echo "Using the Haifa scheduler."
3491     sched_prefix=haifa-
3492     sched_cflags=-DHAIFA
3493 fi
3494 AC_SUBST(sched_prefix)
3495 AC_SUBST(sched_cflags)
3496 if [[ x$enable_haifa != x ]]; then
3497     # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3498     for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3499         if [[ -f $x ]]; then
3500             echo "Removing $x"
3501             rm -f $x
3502         fi
3503     done
3504 fi
3505
3506 # Nothing to do for FLOAT_H, float_format already handled.
3507 objdir=`pwd`
3508 AC_SUBST(objdir)
3509
3510 # Process the language and host/target makefile fragments.
3511 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3512
3513 # Substitute configuration variables
3514 AC_SUBST(subdirs)
3515 AC_SUBST(all_languages)
3516 AC_SUBST(all_boot_languages)
3517 AC_SUBST(all_compilers)
3518 AC_SUBST(all_lang_makefiles)
3519 AC_SUBST(all_stagestuff)
3520 AC_SUBST(all_diff_excludes)
3521 AC_SUBST(all_lib2funcs)
3522 AC_SUBST(all_headers)
3523 AC_SUBST(extra_passes)
3524 AC_SUBST(extra_programs)
3525 AC_SUBST(extra_parts)
3526 AC_SUBST(extra_c_objs)
3527 AC_SUBST(extra_cxx_objs)
3528 AC_SUBST(extra_c_flags)
3529 AC_SUBST(extra_objs)
3530 AC_SUBST(host_extra_gcc_objs)
3531 AC_SUBST(extra_headers_list)
3532 AC_SUBST(dep_host_xmake_file)
3533 AC_SUBST(dep_tmake_file)
3534 AC_SUBST(out_file)
3535 AC_SUBST(out_object_file)
3536 AC_SUBST(md_file)
3537 AC_SUBST(tm_file_list)
3538 AC_SUBST(build_xm_file_list)
3539 AC_SUBST(host_xm_file_list)
3540 AC_SUBST(lang_specs_files)
3541 AC_SUBST(lang_options_files)
3542 AC_SUBST(thread_file)
3543 AC_SUBST(version)
3544 AC_SUBST(local_prefix)
3545 AC_SUBST(gxx_include_dir)
3546 AC_SUBST(fixincludes)
3547 AC_SUBST(build_install_headers_dir)
3548 AC_SUBST(build_exeext)
3549 AC_SUBST(host_exeext)
3550 AC_SUBST(float_format)
3551 AC_SUBST(will_use_collect2)
3552 AC_SUBST(maybe_use_collect2)
3553 AC_SUBST(cc_set_by_configure)
3554 AC_SUBST(stage_prefix_set_by_configure)
3555 AC_SUBST(install)
3556 AC_SUBST(symbolic_link)
3557
3558 AC_SUBST_FILE(target_overrides)
3559 AC_SUBST_FILE(host_overrides)
3560 AC_SUBST(cross_defines)
3561 AC_SUBST_FILE(cross_overrides)
3562 AC_SUBST_FILE(build_overrides)
3563 AC_SUBST_FILE(language_fragments)
3564 AC_SUBST_FILE(language_hooks)
3565
3566 # Echo that links are built
3567 if [[ x$host = x$target ]]
3568 then
3569         str1="native "
3570 else
3571         str1="cross-"
3572         str2=" from $host"
3573 fi
3574
3575 if [[ x$host != x$build ]]
3576 then
3577         str3=" on a $build system"
3578 fi
3579
3580 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3581 then
3582         str4=
3583 fi
3584
3585 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3586
3587 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3588 then
3589         echo " ${str2}${str3}." 1>&2
3590 fi
3591
3592 # Truncate the target if necessary
3593 if [[ x$host_truncate_target != x ]]; then
3594         target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3595 fi
3596
3597 # Configure the subdirectories
3598 # AC_CONFIG_SUBDIRS($subdirs)
3599
3600 # Create the Makefile
3601 # and configure language subdirectories
3602 AC_OUTPUT($all_outputs,
3603 [
3604 . $srcdir/configure.lang
3605 case x$CONFIG_HEADERS in
3606 xauto-host.h:config.in)
3607 echo > cstamp-h ;;
3608 esac
3609 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3610 # bootstrapping and the installation procedure can still use
3611 # CC="stage1/xgcc -Bstage1/".  If the host doesn't support symlinks,
3612 # FLAGS_TO_PASS has been modified to solve the problem there.
3613 # This is virtually a duplicate of what happens in configure.lang; we do
3614 # an extra check to make sure this only happens if ln -s can be used.
3615 if [[ "$symbolic_link" = "ln -s" ]]; then
3616  for d in .. ${subdirs} ; do
3617    if [[ $d != .. ]]; then
3618         STARTDIR=`pwd`
3619         cd $d
3620         for t in stage1 stage2 stage3 stage4 include
3621         do
3622                 rm -f $t
3623                 $symbolic_link ../$t $t 2>/dev/null
3624         done
3625         cd $STARTDIR
3626    fi
3627  done
3628 else true ; fi
3629 ],
3630 [
3631 host='${host}'
3632 build='${build}'
3633 target='${target}'
3634 target_alias='${target_alias}'
3635 srcdir='${srcdir}'
3636 subdirs='${subdirs}'
3637 oldstyle_subdirs='${oldstyle_subdirs}'
3638 symbolic_link='${symbolic_link}'
3639 program_transform_set='${program_transform_set}'
3640 program_transform_name='${program_transform_name}'
3641 dep_host_xmake_file='${dep_host_xmake_file}'
3642 host_xmake_file='${host_xmake_file}'
3643 dep_tmake_file='${dep_tmake_file}'
3644 tmake_file='${tmake_file}'
3645 thread_file='${thread_file}'
3646 version='${version}'
3647 local_prefix='${local_prefix}'
3648 build_install_headers_dir='${build_install_headers_dir}'
3649 build_exeext='${build_exeext}'
3650 host_exeext='${host_exeext}'
3651 out_file='${out_file}'
3652 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3653 SET_MAKE='${SET_MAKE}'
3654 target_list='${target_list}'
3655 target_overrides='${target_overrides}'
3656 host_overrides='${host_overrides}'
3657 cross_defines='${cross_defines}'
3658 cross_overrides='${cross_overrides}'
3659 build_overrides='${build_overrides}'
3660 ])