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