OSDN Git Service

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