OSDN Git Service

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