OSDN Git Service

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