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