OSDN Git Service

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