OSDN Git Service

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