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