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