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