OSDN Git Service

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