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