OSDN Git Service

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