OSDN Git Service

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