OSDN Git Service

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