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