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