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