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