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