OSDN Git Service

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