OSDN Git Service

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