]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure.in
getopt.h (getopt): Also check HAVE_DECL_* when prototyping.
[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"
f31e826b 482gcc_AC_CHECK_DECLS(bcopy bzero bcmp \
f95e46b9 483 index rindex getenv atol sbrk abort atof getcwd getwd \
86cf1cbd 484 strsignal putc_unlocked fputs_unlocked strstr environ \
f31e826b 485 malloc realloc calloc free basename getopt, , ,[
86cf1cbd
KG
486#include "gansidecl.h"
487#include "system.h"])
c5c76735 488
f31e826b 489gcc_AC_CHECK_DECLS(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
2838397c 1556 float_format=none
77d787fa 1557 case $host in *pc-msdosdjgpp*)
dedcc399
ME
1558 target_alias=djgpp
1559 ;;
1560 esac
46f18e7b 1561 ;;
75bffa71
ILT
1562changequote(,)dnl
1563 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1564changequote([,])dnl
46f18e7b
RK
1565 tm_file=i386/moss.h
1566 tmake_file=t-libc-ok
46f18e7b
RK
1567 gnu_ld=yes
1568 gas=yes
1569 ;;
75bffa71
ILT
1570changequote(,)dnl
1571 i[34567]86-*-lynxos*)
1572changequote([,])dnl
1573 if test x$gas = xyes
46f18e7b
RK
1574 then
1575 tm_file=i386/lynx.h
1576 else
1577 tm_file=i386/lynx-ng.h
1578 fi
1579 xm_file=i386/xm-lynx.h
1580 tmake_file=i386/t-i386bare
1581 xmake_file=x-lynx
1582 ;;
75bffa71
ILT
1583changequote(,)dnl
1584 i[34567]86-*-mach*)
1585changequote([,])dnl
46f18e7b
RK
1586 tm_file=i386/mach.h
1587# tmake_file=t-libc-ok
1588 use_collect2=yes
1589 ;;
75bffa71
ILT
1590changequote(,)dnl
1591 i[34567]86-*-osfrose*) # 386 using OSF/rose
1592changequote([,])dnl
1593 if test x$elf = xyes
46f18e7b
RK
1594 then
1595 tm_file=i386/osfelf.h
1596 use_collect2=
1597 else
1598 tm_file=i386/osfrose.h
1599 use_collect2=yes
1600 fi
61536478 1601 xm_file="i386/xm-osf.h ${xm_file}"
46f18e7b
RK
1602 xmake_file=i386/x-osfrose
1603 tmake_file=i386/t-osf
1604 extra_objs=halfpic.o
1605 ;;
75bffa71
ILT
1606changequote(,)dnl
1607 i[34567]86-go32-rtems*)
1608changequote([,])dnl
46f18e7b
RK
1609 cpu_type=i386
1610 xm_file=i386/xm-go32.h
1611 tm_file=i386/go32-rtems.h
1612 tmake_file="i386/t-go32 t-rtems"
1613 ;;
75bffa71 1614changequote(,)dnl
0d4ef09c 1615 i[34567]86-*-rtemscoff*)
75bffa71 1616changequote([,])dnl
f5963e61 1617 cpu_type=i386
0d4ef09c
JS
1618 tm_file=i386/rtems.h
1619 tmake_file="i386/t-i386bare t-rtems"
f5963e61 1620 ;;
75bffa71 1621changequote(,)dnl
0d4ef09c 1622 i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
75bffa71 1623changequote([,])dnl
46f18e7b 1624 cpu_type=i386
0d4ef09c
JS
1625 tm_file=i386/rtemself.h
1626 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1627 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
46f18e7b 1628 ;;
75bffa71
ILT
1629changequote(,)dnl
1630 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1631changequote([,])dnl
2d092ffa 1632 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
61536478 1633 xm_defines="USG SVR3"
46f18e7b 1634 xmake_file=i386/x-sco5
f6857708 1635 install_headers_dir=install-headers-cpio
46f18e7b 1636 tm_file=i386/sco5.h
75bffa71 1637 if test x$gas = xyes
f7c9c2bb
RL
1638 then
1639 tm_file="i386/sco5gas.h ${tm_file}"
1640 tmake_file=i386/t-sco5gas
1641 else
1642 tmake_file=i386/t-sco5
1643 fi
a5598a06 1644 tmake_file="$tmake_file i386/t-i386bare"
42902a72 1645 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
46f18e7b 1646 ;;
75bffa71
ILT
1647changequote(,)dnl
1648 i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
1649changequote([,])dnl
61536478 1650 xm_file="${xm_file} i386/xm-sco.h"
2d092ffa 1651 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
46f18e7b 1652 xmake_file=i386/x-sco4
46f18e7b 1653 install_headers_dir=install-headers-cpio
75bffa71 1654 if test x$stabs = xyes
46f18e7b
RK
1655 then
1656 tm_file=i386/sco4dbx.h
1657 tmake_file=i386/t-svr3dbx
1658 extra_parts="svr3.ifile svr3z.rfile"
1659 else
1660 tm_file=i386/sco4.h
1661 tmake_file=i386/t-crtstuff
1662 extra_parts="crtbegin.o crtend.o"
1663 fi
a5598a06 1664 tmake_file="$tmake_file i386/t-i386bare"
090164c0
WB
1665 # The default EAFS filesystem supports long file names.
1666 # Truncating the target makes $host != $target which
1667 # makes gcc think it is doing a cross-compile.
1668 # truncate_target=yes
46f18e7b 1669 ;;
75bffa71
ILT
1670changequote(,)dnl
1671 i[34567]86-*-sco*) # 80386 running SCO system
1672changequote([,])dnl
46f18e7b
RK
1673 xm_file=i386/xm-sco.h
1674 xmake_file=i386/x-sco
46f18e7b 1675 install_headers_dir=install-headers-cpio
75bffa71 1676 if test x$stabs = xyes
46f18e7b
RK
1677 then
1678 tm_file=i386/scodbx.h
1679 tmake_file=i386/t-svr3dbx
1680 extra_parts="svr3.ifile svr3z.rfile"
1681 else
1682 tm_file=i386/sco.h
1683 extra_parts="crtbegin.o crtend.o"
1684 tmake_file=i386/t-crtstuff
1685 fi
a5598a06 1686 tmake_file="$tmake_file i386/t-i386bare"
46f18e7b
RK
1687 truncate_target=yes
1688 ;;
75bffa71
ILT
1689changequote(,)dnl
1690 i[34567]86-*-solaris2*)
1691changequote([,])dnl
2d092ffa 1692 xm_file="xm-alloca.h ${xm_file}"
61536478 1693 xm_defines="USG POSIX SMALL_ARG_MAX"
0c723ada
AO
1694 tm_file=i386/sol2.h
1695 if test x$gas = xyes; then
1696 # Only needed if gas does not support -s
1697 tm_file="i386/sol2gas.h ${tm_file}"
46f18e7b 1698 fi
a5598a06 1699 tmake_file="i386/t-i386bare i386/t-sol2"
61536478 1700 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
46f18e7b 1701 xmake_file=x-svr4
4a8021dc
AO
1702 if test x${enable_threads} = x; then
1703 enable_threads=$have_pthread_h
1704 if test x${enable_threads} = x; then
1705 enable_threads=$have_thread_h
1706 fi
1707 fi
1708 if test x${enable_threads} = xyes; then
1709 if test x${have_pthread_h} = xyes; then
1710 thread_file='posix'
1711 else
0bbb1697 1712 thread_file='solaris'
4a8021dc 1713 fi
0bbb1697 1714 fi
46f18e7b 1715 ;;
75bffa71
ILT
1716changequote(,)dnl
1717 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
1718changequote([,])dnl
2d092ffa 1719 xm_file="xm-alloca.h ${xm_file}"
a4cbe801 1720 xm_defines="USG POSIX"
87e11b70 1721 tm_file=i386/sysv5.h
75bffa71 1722 if test x$stabs = xyes
fe07d4c1
RL
1723 then
1724 tm_file="${tm_file} dbx.h"
1725 fi
a5598a06 1726 tmake_file="i386/t-i386bare i386/t-crtpic"
fe07d4c1
RL
1727 xmake_file=x-svr4
1728 extra_parts="crtbegin.o crtend.o"
01e39005
RL
1729 if test x$enable_threads = xyes; then
1730 thread_file='posix'
1731 fi
fe07d4c1 1732 ;;
75bffa71
ILT
1733changequote(,)dnl
1734 i[34567]86-*-sysv4*) # Intel 80386's running system V.4
1735changequote([,])dnl
2d092ffa 1736 xm_file="xm-alloca.h ${xm_file}"
61536478 1737 xm_defines="USG POSIX SMALL_ARG_MAX"
46f18e7b 1738 tm_file=i386/sysv4.h
75bffa71 1739 if test x$stabs = xyes
46f18e7b
RK
1740 then
1741 tm_file="${tm_file} dbx.h"
1742 fi
a5598a06 1743 tmake_file="i386/t-i386bare i386/t-crtpic"
46f18e7b
RK
1744 xmake_file=x-svr4
1745 extra_parts="crtbegin.o crtend.o"
1746 ;;
5aaf0123
RL
1747changequote(,)dnl
1748 i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
1749changequote([,])dnl
2d092ffa 1750 xm_file="xm-alloca.h ${xm_file}"
5aaf0123
RL
1751 xm_defines="USG POSIX"
1752 tm_file=i386/udk.h
a5598a06 1753 tmake_file="i386/t-i386bare i386/t-crtpic i386/t-udk"
5aaf0123
RL
1754 xmake_file=x-svr4
1755 extra_parts="crtbegin.o crtend.o"
fd9c643f 1756 install_headers_dir=install-headers-cpio
5aaf0123 1757 ;;
75bffa71
ILT
1758changequote(,)dnl
1759 i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1760changequote([,])dnl
f5963e61
JL
1761 cpu_type=i386
1762 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1763 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
75bffa71 1764 if test x$stabs = xyes
f5963e61
JL
1765 then
1766 tm_file=i386/osf1elfgdb.h
1767 else
1768 tm_file=i386/osf1elf.h
1769 fi
1770 tmake_file=i386/t-osf1elf
1771 xmake_file=i386/x-osf1elf
1772 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1773 ;;
75bffa71
ILT
1774changequote(,)dnl
1775 i[34567]86-*-sysv*) # Intel 80386's running system V
1776changequote([,])dnl
61536478 1777 xm_defines="USG SVR3"
46f18e7b 1778 xmake_file=i386/x-sysv3
75bffa71 1779 if test x$gas = xyes
46f18e7b 1780 then
75bffa71 1781 if test x$stabs = xyes
46f18e7b
RK
1782 then
1783 tm_file=i386/svr3dbx.h
1784 tmake_file=i386/t-svr3dbx
1785 extra_parts="svr3.ifile svr3z.rfile"
1786 else
1787 tm_file=i386/svr3gas.h
1788 extra_parts="crtbegin.o crtend.o"
1789 tmake_file=i386/t-crtstuff
1790 fi
1791 else
1792 tm_file=i386/sysv3.h
1793 extra_parts="crtbegin.o crtend.o"
1794 tmake_file=i386/t-crtstuff
1795 fi
a5598a06 1796 tmake_file="$tmake_file i386/t-crtpic"
46f18e7b
RK
1797 ;;
1798 i386-*-vsta) # Intel 80386's running VSTa kernel
f5963e61 1799 xm_file="${xm_file} i386/xm-vsta.h"
46f18e7b
RK
1800 tm_file=i386/vsta.h
1801 tmake_file=i386/t-vsta
1802 xmake_file=i386/x-vsta
1803 ;;
75bffa71
ILT
1804changequote(,)dnl
1805 i[34567]86-*-win32)
1806changequote([,])dnl
cae21ae8
GN
1807 xm_file="${xm_file} i386/xm-cygwin.h"
1808 tmake_file=i386/t-cygwin
84530511 1809 tm_file=i386/win32.h
cae21ae8 1810 xmake_file=i386/x-cygwin
84530511 1811 extra_objs=winnt.o
75bffa71 1812 if test x$enable_threads = xyes; then
84530511
SC
1813 thread_file='win32'
1814 fi
1815 exeext=.exe
1816 ;;
75bffa71 1817changequote(,)dnl
cae21ae8 1818 i[34567]86-*-pe | i[34567]86-*-cygwin*)
75bffa71 1819changequote([,])dnl
cae21ae8
GN
1820 xm_file="${xm_file} i386/xm-cygwin.h"
1821 tmake_file=i386/t-cygwin
1822 tm_file=i386/cygwin.h
1823 xmake_file=i386/x-cygwin
46f18e7b 1824 extra_objs=winnt.o
75bffa71 1825 if test x$enable_threads = xyes; then
0bbb1697
RK
1826 thread_file='win32'
1827 fi
46f18e7b
RK
1828 exeext=.exe
1829 ;;
75bffa71
ILT
1830changequote(,)dnl
1831 i[34567]86-*-mingw32*)
1832changequote([,])dnl
5dfe8508
RK
1833 tm_file=i386/mingw32.h
1834 xm_file="${xm_file} i386/xm-mingw32.h"
cae21ae8 1835 tmake_file="i386/t-cygwin i386/t-mingw32"
5dfe8508 1836 extra_objs=winnt.o
cae21ae8 1837 xmake_file=i386/x-cygwin
75bffa71 1838 if test x$enable_threads = xyes; then
0bbb1697
RK
1839 thread_file='win32'
1840 fi
5dfe8508 1841 exeext=.exe
61536478
JL
1842 case $machine in
1843 *mingw32msv*)
1844 ;;
1845 *minwg32crt* | *mingw32*)
1846 tm_file="${tm_file} i386/crtdll.h"
1847 ;;
1848 esac
5dfe8508 1849 ;;
b27d2bd5
MK
1850changequote(,)dnl
1851 i[34567]86-*-uwin*)
1852changequote([,])dnl
1853 tm_file=i386/uwin.h
1854 xm_file="${xm_file} i386/xm-uwin.h"
2d092ffa 1855 xm_defines="USG NO_STAB_H"
b27d2bd5
MK
1856 tmake_file="i386/t-cygwin i386/t-uwin"
1857 extra_objs=winnt.o
1858 xmake_file=i386/x-cygwin
b27d2bd5
MK
1859 if test x$enable_threads = xyes; then
1860 thread_file='win32'
1861 fi
1862 exeext=.exe
1863 ;;
052dbd9e
MK
1864changequote(,)dnl
1865 i[34567]86-*-interix*)
1866changequote([,])dnl
615c8231 1867 tm_file="i386/i386-interix.h interix.h"
97ad1d43 1868 xm_file="i386/xm-i386-interix.h xm-interix.h"
2d092ffa 1869 xm_defines="USG"
052dbd9e
MK
1870 tmake_file="i386/t-interix"
1871 extra_objs=interix.o
1872 xmake_file=x-interix
615c8231 1873 if test x$enable_threads = xyes ; then
052dbd9e
MK
1874 thread_file='posix'
1875 fi
615c8231 1876 if test x$stabs = xyes ; then
052dbd9e
MK
1877 tm_file="${tm_file} dbxcoff.h"
1878 fi
1879 ;;
75bffa71
ILT
1880changequote(,)dnl
1881 i[34567]86-*-winnt3*)
1882changequote([,])dnl
46f18e7b
RK
1883 tm_file=i386/win-nt.h
1884 out_file=i386/i386.c
61536478 1885 xm_file="xm-winnt.h ${xm_file}"
46f18e7b
RK
1886 xmake_file=winnt/x-winnt
1887 tmake_file=i386/t-winnt
1888 extra_host_objs="winnt.o oldnames.o"
1889 extra_gcc_objs="spawnv.o oldnames.o"
75bffa71 1890 if test x$gnu_ld != xyes
46f18e7b
RK
1891 then
1892 extra_programs=ld.exe
1893 fi
75bffa71 1894 if test x$enable_threads = xyes; then
0bbb1697
RK
1895 thread_file='win32'
1896 fi
46f18e7b 1897 ;;
75bffa71
ILT
1898changequote(,)dnl
1899 i[34567]86-dg-dgux*)
1900changequote([,])dnl
2d092ffa 1901 xm_file="xm-alloca.h ${xm_file}"
61536478 1902 xm_defines="USG POSIX"
46f18e7b
RK
1903 out_file=i386/dgux.c
1904 tm_file=i386/dgux.h
1905 tmake_file=i386/t-dgux
1906 xmake_file=i386/x-dgux
46f18e7b
RK
1907 install_headers_dir=install-headers-cpio
1908 ;;
1909 i860-alliant-*) # Alliant FX/2800
1910 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
956d6950 1911 xm_file="${xm_file}"
46f18e7b
RK
1912 xmake_file=i860/x-fx2800
1913 tmake_file=i860/t-fx2800
1914 extra_parts="crtbegin.o crtend.o"
1915 ;;
1916 i860-*-bsd*)
1917 tm_file="${tm_file} i860/bsd.h"
75bffa71 1918 if test x$gas = xyes
46f18e7b
RK
1919 then
1920 tm_file="${tm_file} i860/bsd-gas.h"
1921 fi
1922 use_collect2=yes
1923 ;;
1924 i860-*-mach*)
1925 tm_file="${tm_file} i860/mach.h"
1926 tmake_file=t-libc-ok
1927 ;;
1928 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1929 tm_file="${tm_file} svr3.h i860/paragon.h"
61536478 1930 xm_defines="USG SVR3"
46f18e7b 1931 tmake_file=t-osf
46f18e7b
RK
1932 ;;
1933 i860-*-sysv3*)
1934 tm_file="${tm_file} svr3.h i860/sysv3.h"
61536478 1935 xm_defines="USG SVR3"
46f18e7b
RK
1936 xmake_file=i860/x-sysv3
1937 extra_parts="crtbegin.o crtend.o"
1938 ;;
1939 i860-*-sysv4*)
1940 tm_file="${tm_file} svr4.h i860/sysv4.h"
61536478 1941 xm_defines="USG SVR3"
46f18e7b
RK
1942 xmake_file=i860/x-sysv4
1943 tmake_file=t-svr4
1944 extra_parts="crtbegin.o crtend.o"
1945 ;;
1946 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1947 tm_file="${tm_file} i960/vx960.h"
1948 tmake_file=i960/t-vxworks960
1949 use_collect2=yes
7cc34889 1950 thread_file='vxworks'
46f18e7b 1951 ;;
a0372c94 1952 i960-wrs-vxworks5* | i960-wrs-vxworks)
46f18e7b
RK
1953 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1954 tmake_file=i960/t-vxworks960
1955 use_collect2=yes
7cc34889 1956 thread_file='vxworks'
46f18e7b
RK
1957 ;;
1958 i960-wrs-vxworks*)
1959 tm_file="${tm_file} i960/vx960.h"
1960 tmake_file=i960/t-vxworks960
1961 use_collect2=yes
7cc34889 1962 thread_file='vxworks'
46f18e7b
RK
1963 ;;
1964 i960-*-coff*)
1965 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1966 tmake_file=i960/t-960bare
1967 use_collect2=yes
1968 ;;
1969 i960-*-rtems)
1970 tmake_file="i960/t-960bare t-rtems"
1971 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1972 use_collect2=yes
1973 ;;
1974 i960-*-*) # Default i960 environment.
1975 use_collect2=yes
1976 ;;
c65ebc55
JW
1977 ia64*-*-elf*)
1978 tm_file=ia64/elf.h
1979 tmake_file="ia64/t-ia64"
1980 target_cpu_default="0"
1981 if test x$gas = xyes
1982 then
1983 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1984 fi
1985 if test x$gnu_ld = xyes
1986 then
1987 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1988 fi
1989 ;;
1990 ia64*-*-linux*)
1991 tm_file=ia64/linux.h
1992 tmake_file="t-linux ia64/t-ia64"
1993 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1994 if test x$enable_threads = xyes; then
1995 thread_file='posix'
1996 fi
1997 ;;
dec3e070
JW
1998 m32r-*-elf*)
1999 extra_parts="crtinit.o crtfini.o"
2000 ;;
46f18e7b
RK
2001 m68000-convergent-sysv*)
2002 tm_file=m68k/ctix.h
61536478
JL
2003 xm_file="m68k/xm-3b1.h ${xm_file}"
2004 xm_defines=USG
46f18e7b
RK
2005 use_collect2=yes
2006 extra_headers=math-68881.h
2007 ;;
2008 m68000-hp-bsd*) # HP 9000/200 running BSD
2009 tm_file=m68k/hp2bsd.h
2010 xmake_file=m68k/x-hp2bsd
2011 use_collect2=yes
2012 extra_headers=math-68881.h
2013 ;;
2014 m68000-hp-hpux*) # HP 9000 series 300
1a87de8d 2015 xm_file="xm-alloca.h ${xm_file}"
2d092ffa 2016 xm_defines="USG"
75bffa71 2017 if test x$gas = xyes
46f18e7b
RK
2018 then
2019 xmake_file=m68k/x-hp320g
2020 tm_file=m68k/hp310g.h
2021 else
2022 xmake_file=m68k/x-hp320
2023 tm_file=m68k/hp310.h
2024 fi
46f18e7b
RK
2025 install_headers_dir=install-headers-cpio
2026 use_collect2=yes
2027 extra_headers=math-68881.h
2028 ;;
2029 m68000-sun-sunos3*)
2030 tm_file=m68k/sun2.h
2031 use_collect2=yes
2032 extra_headers=math-68881.h
2033 ;;
2034 m68000-sun-sunos4*)
2035 tm_file=m68k/sun2o4.h
2036 use_collect2=yes
2037 extra_headers=math-68881.h
2038 ;;
2039 m68000-att-sysv*)
61536478
JL
2040 xm_file="m68k/xm-3b1.h ${xm_file}"
2041 xm_defines=USG
75bffa71 2042 if test x$gas = xyes
46f18e7b
RK
2043 then
2044 tm_file=m68k/3b1g.h
2045 else
2046 tm_file=m68k/3b1.h
2047 fi
2048 use_collect2=yes
2049 extra_headers=math-68881.h
2050 ;;
2051 m68k-apple-aux*) # Apple Macintosh running A/UX
61536478 2052 xm_defines="USG AUX"
46f18e7b 2053 tmake_file=m68k/t-aux
46f18e7b
RK
2054 install_headers_dir=install-headers-cpio
2055 extra_headers=math-68881.h
2056 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
2057 tm_file=
75bffa71 2058 if test "$gnu_ld" = yes
46f18e7b
RK
2059 then
2060 tm_file="${tm_file} m68k/auxgld.h"
2061 else
2062 tm_file="${tm_file} m68k/auxld.h"
2063 fi
75bffa71 2064 if test "$gas" = yes
46f18e7b
RK
2065 then
2066 tm_file="${tm_file} m68k/auxgas.h"
2067 else
2068 tm_file="${tm_file} m68k/auxas.h"
2069 fi
2070 tm_file="${tm_file} m68k/a-ux.h"
c8db55b0 2071 float_format=m68k
46f18e7b
RK
2072 ;;
2073 m68k-apollo-*)
2074 tm_file=m68k/apollo68.h
2075 xmake_file=m68k/x-apollo68
2076 use_collect2=yes
2077 extra_headers=math-68881.h
c8db55b0 2078 float_format=m68k
46f18e7b
RK
2079 ;;
2080 m68k-altos-sysv*) # Altos 3068
75bffa71 2081 if test x$gas = xyes
46f18e7b
RK
2082 then
2083 tm_file=m68k/altos3068.h
61536478 2084 xm_defines=USG
46f18e7b
RK
2085 else
2086 echo "The Altos is supported only with the GNU assembler" 1>&2
2087 exit 1
2088 fi
2089 extra_headers=math-68881.h
2090 ;;
2091 m68k-bull-sysv*) # Bull DPX/2
75bffa71 2092 if test x$gas = xyes
46f18e7b 2093 then
75bffa71 2094 if test x$stabs = xyes
46f18e7b
RK
2095 then
2096 tm_file=m68k/dpx2cdbx.h
2097 else
2098 tm_file=m68k/dpx2g.h
2099 fi
2100 else
2101 tm_file=m68k/dpx2.h
2102 fi
61536478
JL
2103 xm_file="xm-alloca.h ${xm_file}"
2104 xm_defines=USG
46f18e7b
RK
2105 xmake_file=m68k/x-dpx2
2106 use_collect2=yes
2107 extra_headers=math-68881.h
2108 ;;
2109 m68k-atari-sysv4*) # Atari variant of V.4.
2110 tm_file=m68k/atari.h
61536478
JL
2111 xm_file="xm-alloca.h ${xm_file}"
2112 xm_defines="USG FULL_PROTOTYPES"
46f18e7b
RK
2113 tmake_file=t-svr4
2114 extra_parts="crtbegin.o crtend.o"
2115 extra_headers=math-68881.h
c8db55b0 2116 float_format=m68k
46f18e7b
RK
2117 ;;
2118 m68k-motorola-sysv*)
2119 tm_file=m68k/mot3300.h
61536478 2120 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
75bffa71 2121 if test x$gas = xyes
46f18e7b
RK
2122 then
2123 xmake_file=m68k/x-mot3300-gas
75bffa71 2124 if test x$gnu_ld = xyes
46f18e7b
RK
2125 then
2126 tmake_file=m68k/t-mot3300-gald
2127 else
2128 tmake_file=m68k/t-mot3300-gas
2129 use_collect2=yes
2130 fi
2131 else
2132 xmake_file=m68k/x-mot3300
75bffa71 2133 if test x$gnu_ld = xyes
46f18e7b
RK
2134 then
2135 tmake_file=m68k/t-mot3300-gld
2136 else
2137 tmake_file=m68k/t-mot3300
2138 use_collect2=yes
2139 fi
2140 fi
2141 gdb_needs_out_file_path=yes
2142 extra_parts="crt0.o mcrt0.o"
2143 extra_headers=math-68881.h
c8db55b0 2144 float_format=m68k
46f18e7b
RK
2145 ;;
2146 m68k-ncr-sysv*) # NCR Tower 32 SVR3
2147 tm_file=m68k/tower-as.h
61536478 2148 xm_defines="USG SVR3"
46f18e7b
RK
2149 xmake_file=m68k/x-tower
2150 extra_parts="crtbegin.o crtend.o"
2151 extra_headers=math-68881.h
2152 ;;
2153 m68k-plexus-sysv*)
2154 tm_file=m68k/plexus.h
61536478
JL
2155 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
2156 xm_defines=USG
46f18e7b
RK
2157 use_collect2=yes
2158 extra_headers=math-68881.h
2159 ;;
2160 m68k-tti-*)
2161 tm_file=m68k/pbb.h
61536478
JL
2162 xm_file="xm-alloca.h ${xm_file}"
2163 xm_defines=USG
46f18e7b
RK
2164 extra_headers=math-68881.h
2165 ;;
2166 m68k-crds-unos*)
61536478
JL
2167 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
2168 xm_defines="USG unos"
46f18e7b
RK
2169 xmake_file=m68k/x-crds
2170 tm_file=m68k/crds.h
46f18e7b
RK
2171 use_collect2=yes
2172 extra_headers=math-68881.h
2173 ;;
2174 m68k-cbm-sysv4*) # Commodore variant of V.4.
2175 tm_file=m68k/amix.h
61536478
JL
2176 xm_file="xm-alloca.h ${xm_file}"
2177 xm_defines="USG FULL_PROTOTYPES"
46f18e7b
RK
2178 xmake_file=m68k/x-amix
2179 tmake_file=t-svr4
2180 extra_parts="crtbegin.o crtend.o"
2181 extra_headers=math-68881.h
c8db55b0 2182 float_format=m68k
46f18e7b
RK
2183 ;;
2184 m68k-ccur-rtu)
2185 tm_file=m68k/ccur-GAS.h
2186 xmake_file=m68k/x-ccur
2187 extra_headers=math-68881.h
2188 use_collect2=yes
c8db55b0 2189 float_format=m68k
46f18e7b
RK
2190 ;;
2191 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
2192 tm_file=m68k/hp3bsd44.h
c83fe036 2193 xmake_file=m68k/x-hp3bsd44
46f18e7b
RK
2194 use_collect2=yes
2195 extra_headers=math-68881.h
c8db55b0 2196 float_format=m68k
46f18e7b
RK
2197 ;;
2198 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
2199 tm_file=m68k/hp3bsd.h
2200 use_collect2=yes
2201 extra_headers=math-68881.h
c8db55b0 2202 float_format=m68k
46f18e7b
RK
2203 ;;
2204 m68k-isi-bsd*)
75bffa71 2205 if test x$with_fp = xno
46f18e7b
RK
2206 then
2207 tm_file=m68k/isi-nfp.h
2208 else
2209 tm_file=m68k/isi.h
c8db55b0 2210 float_format=m68k
46f18e7b
RK
2211 fi
2212 use_collect2=yes
2213 extra_headers=math-68881.h
2214 ;;
2215 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1a87de8d 2216 xm_file="xm-alloca.h ${xm_file}"
2d092ffa 2217 xm_defines="USG"
75bffa71 2218 if test x$gas = xyes
46f18e7b
RK
2219 then
2220 xmake_file=m68k/x-hp320g
2221 tm_file=m68k/hp320g.h
2222 else
2223 xmake_file=m68k/x-hp320
2224 tm_file=m68k/hpux7.h
2225 fi
46f18e7b
RK
2226 install_headers_dir=install-headers-cpio
2227 use_collect2=yes
2228 extra_headers=math-68881.h
c8db55b0 2229 float_format=m68k
46f18e7b
RK
2230 ;;
2231 m68k-hp-hpux*) # HP 9000 series 300
1a87de8d 2232 xm_file="xm-alloca.h ${xm_file}"
2d092ffa 2233 xm_defines="USG"
75bffa71 2234 if test x$gas = xyes
46f18e7b
RK
2235 then
2236 xmake_file=m68k/x-hp320g
2237 tm_file=m68k/hp320g.h
2238 else
2239 xmake_file=m68k/x-hp320
2240 tm_file=m68k/hp320.h
2241 fi
46f18e7b
RK
2242 install_headers_dir=install-headers-cpio
2243 use_collect2=yes
2244 extra_headers=math-68881.h
c8db55b0 2245 float_format=m68k
46f18e7b
RK
2246 ;;
2247 m68k-sun-mach*)
2248 tm_file=m68k/sun3mach.h
2249 use_collect2=yes
2250 extra_headers=math-68881.h
c8db55b0 2251 float_format=m68k
46f18e7b
RK
2252 ;;
2253 m68k-sony-newsos3*)
75bffa71 2254 if test x$gas = xyes
46f18e7b
RK
2255 then
2256 tm_file=m68k/news3gas.h
2257 else
2258 tm_file=m68k/news3.h
2259 fi
2260 use_collect2=yes
2261 extra_headers=math-68881.h
c8db55b0 2262 float_format=m68k
46f18e7b
RK
2263 ;;
2264 m68k-sony-bsd* | m68k-sony-newsos*)
75bffa71 2265 if test x$gas = xyes
46f18e7b
RK
2266 then
2267 tm_file=m68k/newsgas.h
2268 else
2269 tm_file=m68k/news.h
2270 fi
2271 use_collect2=yes
2272 extra_headers=math-68881.h
c8db55b0 2273 float_format=m68k
46f18e7b
RK
2274 ;;
2275 m68k-next-nextstep2*)
2276 tm_file=m68k/next21.h
61536478 2277 xm_file="m68k/xm-next.h ${xm_file}"
46f18e7b
RK
2278 tmake_file=m68k/t-next
2279 xmake_file=m68k/x-next
2280 extra_objs=nextstep.o
2281 extra_headers=math-68881.h
2282 use_collect2=yes
c8db55b0 2283 float_format=m68k
46f18e7b 2284 ;;
016cebc3
JL
2285changequote(,)dnl
2286 m68k-next-nextstep[34]*)
2287changequote([,])dnl
46f18e7b 2288 tm_file=m68k/next.h
61536478 2289 xm_file="m68k/xm-next.h ${xm_file}"
46f18e7b
RK
2290 tmake_file=m68k/t-next
2291 xmake_file=m68k/x-next
2292 extra_objs=nextstep.o
750930c1 2293 extra_parts="crtbegin.o crtend.o"
46f18e7b 2294 extra_headers=math-68881.h
c8db55b0 2295 float_format=m68k
75bffa71 2296 if test x$enable_threads = xyes; then
0bbb1697
RK
2297 thread_file='mach'
2298 fi
46f18e7b
RK
2299 ;;
2300 m68k-sun-sunos3*)
75bffa71 2301 if test x$with_fp = xno
46f18e7b
RK
2302 then
2303 tm_file=m68k/sun3n3.h
2304 else
2305 tm_file=m68k/sun3o3.h
c8db55b0 2306 float_format=m68k
46f18e7b
RK
2307 fi
2308 use_collect2=yes
2309 extra_headers=math-68881.h
2310 ;;
2311 m68k-sun-sunos*) # For SunOS 4 (the default).
75bffa71 2312 if test x$with_fp = xno
46f18e7b
RK
2313 then
2314 tm_file=m68k/sun3n.h
2315 else
2316 tm_file=m68k/sun3.h
c8db55b0 2317 float_format=m68k
46f18e7b 2318 fi
46f18e7b
RK
2319 use_collect2=yes
2320 extra_headers=math-68881.h
2321 ;;
2322 m68k-wrs-vxworks*)
2323 tm_file=m68k/vxm68k.h
2324 tmake_file=m68k/t-vxworks68
2325 extra_headers=math-68881.h
7cc34889 2326 thread_file='vxworks'
c8db55b0 2327 float_format=m68k
46f18e7b
RK
2328 ;;
2329 m68k-*-aout*)
2330 tmake_file=m68k/t-m68kbare
2331 tm_file="m68k/m68k-aout.h libgloss.h"
2332 extra_headers=math-68881.h
c8db55b0 2333 float_format=m68k
46f18e7b
RK
2334 ;;
2335 m68k-*-coff*)
2336 tmake_file=m68k/t-m68kbare
2337 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
2338 extra_headers=math-68881.h
c8db55b0 2339 float_format=m68k
46f18e7b 2340 ;;
d1be3be3 2341 m68020-*-elf* | m68k-*-elf*)
7aae67a2 2342 tm_file="m68k/m68020-elf.h"
d1be3be3
JW
2343 xm_file=m68k/xm-m68kv.h
2344 tmake_file=m68k/t-m68kelf
2345 header_files=math-68881.h
2346 ;;
46f18e7b 2347 m68k-*-lynxos*)
75bffa71 2348 if test x$gas = xyes
46f18e7b
RK
2349 then
2350 tm_file=m68k/lynx.h
2351 else
2352 tm_file=m68k/lynx-ng.h
2353 fi
2354 xm_file=m68k/xm-lynx.h
2355 xmake_file=x-lynx
2356 tmake_file=m68k/t-lynx
2357 extra_headers=math-68881.h
c8db55b0 2358 float_format=m68k
46f18e7b 2359 ;;
58600d24 2360 m68k*-*-netbsd*)
46f18e7b 2361 tm_file=m68k/netbsd.h
e47f44f4 2362 tmake_file=t-netbsd
c8db55b0 2363 float_format=m68k
ed4acb3b 2364 use_collect2=yes
46f18e7b 2365 ;;
1b4a979b
ME
2366 m68k*-*-openbsd*)
2367 float_format=m68k
2368 # we need collect2 until our bug is fixed...
2369 use_collect2=yes
2370 ;;
46f18e7b 2371 m68k-*-sysv3*) # Motorola m68k's running system V.3
61536478
JL
2372 xm_file="xm-alloca.h ${xm_file}"
2373 xm_defines=USG
46f18e7b
RK
2374 xmake_file=m68k/x-m68kv
2375 extra_parts="crtbegin.o crtend.o"
2376 extra_headers=math-68881.h
c8db55b0 2377 float_format=m68k
46f18e7b
RK
2378 ;;
2379 m68k-*-sysv4*) # Motorola m68k's running system V.4
2380 tm_file=m68k/m68kv4.h
61536478
JL
2381 xm_file="xm-alloca.h ${xm_file}"
2382 xm_defines=USG
46f18e7b
RK
2383 tmake_file=t-svr4
2384 extra_parts="crtbegin.o crtend.o"
2385 extra_headers=math-68881.h
c8db55b0 2386 float_format=m68k
46f18e7b 2387 ;;
956d6950 2388 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
61536478 2389 # with a.out format
46f18e7b
RK
2390 xmake_file=x-linux
2391 tm_file=m68k/linux-aout.h
2392 tmake_file="t-linux-aout m68k/t-linux-aout"
46f18e7b 2393 extra_headers=math-68881.h
c8db55b0 2394 float_format=m68k
46f18e7b 2395 gnu_ld=yes
46f18e7b 2396 ;;
956d6950 2397 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
61536478
JL
2398 # with ELF format using the
2399 # GNU/Linux C library 5
2400 xmake_file=x-linux
95fd3981
RK
2401 tm_file=m68k/linux.h
2402 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
2403 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
95fd3981 2404 extra_headers=math-68881.h
c8db55b0 2405 float_format=m68k
95fd3981
RK
2406 gnu_ld=yes
2407 ;;
956d6950 2408 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
61536478
JL
2409 # with ELF format using glibc 2
2410 # aka the GNU/Linux C library 6.
2411 xmake_file=x-linux
46f18e7b
RK
2412 tm_file=m68k/linux.h
2413 tmake_file="t-linux m68k/t-linux"
2414 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
46f18e7b 2415 extra_headers=math-68881.h
c8db55b0 2416 float_format=m68k
46f18e7b 2417 gnu_ld=yes
75bffa71 2418 if test x$enable_threads = xyes; then
95fd3981
RK
2419 thread_file='posix'
2420 fi
46f18e7b
RK
2421 ;;
2422 m68k-*-psos*)
2423 tmake_file=m68k/t-m68kbare
2424 tm_file=m68k/m68k-psos.h
2425 extra_headers=math-68881.h
c8db55b0 2426 float_format=m68k
46f18e7b 2427 ;;
6e5138f0 2428 m68k-*-rtemscoff*)
46f18e7b
RK
2429 tmake_file="m68k/t-m68kbare t-rtems"
2430 tm_file=m68k/rtems.h
2431 extra_headers=math-68881.h
c8db55b0 2432 float_format=m68k
46f18e7b 2433 ;;
6e5138f0 2434 m68k-*-rtemself*|m68k-*-rtems*)
d1476635
JS
2435 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
2436 tm_file=m68k/rtemself.h
2437 extra_headers=math-68881.h
2438 float_format=m68k
2439 ;;
46f18e7b
RK
2440 m88k-dg-dgux*)
2441 case $machine in
2442 m88k-dg-dguxbcs*)
2443 tm_file=m88k/dguxbcs.h
2444 tmake_file=m88k/t-dguxbcs
2445 ;;
2446 *)
2447 tm_file=m88k/dgux.h
2448 tmake_file=m88k/t-dgux
2449 ;;
2450 esac
2451 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
46f18e7b 2452 xmake_file=m88k/x-dgux
75bffa71 2453 if test x$gas = xyes
46f18e7b
RK
2454 then
2455 tmake_file=m88k/t-dgux-gas
2456 fi
46f18e7b
RK
2457 ;;
2458 m88k-dolphin-sysv3*)
2459 tm_file=m88k/dolph.h
2460 extra_parts="crtbegin.o crtend.o"
61536478 2461 xm_file="m88k/xm-sysv3.h ${xm_file}"
46f18e7b 2462 xmake_file=m88k/x-dolph
75bffa71 2463 if test x$gas = xyes
46f18e7b
RK
2464 then
2465 tmake_file=m88k/t-m88k-gas
2466 fi
2467 ;;
2468 m88k-tektronix-sysv3)
2469 tm_file=m88k/tekXD88.h
2470 extra_parts="crtbegin.o crtend.o"
61536478 2471 xm_file="m88k/xm-sysv3.h ${xm_file}"
46f18e7b 2472 xmake_file=m88k/x-tekXD88
75bffa71 2473 if test x$gas = xyes
46f18e7b
RK
2474 then
2475 tmake_file=m88k/t-m88k-gas
2476 fi
2477 ;;
2478 m88k-*-aout*)
2479 tm_file=m88k/m88k-aout.h
2480 ;;
2481 m88k-*-coff*)
2482 tm_file=m88k/m88k-coff.h
2483 tmake_file=m88k/t-bug
2484 ;;
2485 m88k-*-luna*)
2486 tm_file=m88k/luna.h
2487 extra_parts="crtbegin.o crtend.o"
75bffa71 2488 if test x$gas = xyes
46f18e7b
RK
2489 then
2490 tmake_file=m88k/t-luna-gas
2491 else
2492 tmake_file=m88k/t-luna
2493 fi
2494 ;;
1b4a979b
ME
2495 m88k-*-openbsd*)
2496 tmake_file="${tmake_file} m88k/t-luna-gas"
2497 ;;
46f18e7b
RK
2498 m88k-*-sysv3*)
2499 tm_file=m88k/sysv3.h
2500 extra_parts="crtbegin.o crtend.o"
61536478 2501 xm_file="m88k/xm-sysv3.h ${xm_file}"
46f18e7b 2502 xmake_file=m88k/x-sysv3
75bffa71 2503 if test x$gas = xyes
46f18e7b
RK
2504 then
2505 tmake_file=m88k/t-m88k-gas
2506 fi
2507 ;;
2508 m88k-*-sysv4*)
2509 tm_file=m88k/sysv4.h
2510 extra_parts="crtbegin.o crtend.o"
2511 xmake_file=m88k/x-sysv4
2512 tmake_file=m88k/t-sysv4
2513 ;;
789a3090
NC
2514 mcore-*-elf)
2515 tm_file=mcore/mcore-elf.h
2516 tmake_file=mcore/t-mcore
2517 ;;
2518 mcore-*-pe*)
2519 tm_file=mcore/mcore-pe.h
2520 tmake_file=mcore/t-mcore-pe
2521 ;;
46f18e7b 2522 mips-sgi-irix6*) # SGI System V.4., IRIX 6
05476613
MM
2523 if test "x$gnu_ld" = xyes
2524 then
2525 tm_file="mips/iris6.h mips/iris6gld.h"
05476613
MM
2526 else
2527 tm_file=mips/iris6.h
05476613 2528 fi
e3f5cc86 2529 tmake_file=mips/t-iris6
46f18e7b 2530 xm_file=mips/xm-iris6.h
46f18e7b 2531 xmake_file=mips/x-iris6
04069e5c 2532# if test x$enable_threads = xyes; then
6e148807 2533# thread_file='irix'
04069e5c 2534# fi
46f18e7b 2535 ;;
98bd9f0f 2536 mips-wrs-vxworks)
7aae67a2 2537 tm_file="mips/elf.h mips/vxworks.h"
98bd9f0f
DB
2538 tmake_file=mips/t-ecoff
2539 gas=yes
2540 gnu_ld=yes
2541 extra_parts="crtbegin.o crtend.o"
e9c0315e 2542 thread_file='vxworks'
98bd9f0f 2543 ;;
46f18e7b 2544 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
61536478 2545 tm_file="mips/iris6.h mips/cross64.h"
74c55ab0
JW
2546 xm_defines=USG
2547 xm_file="mips/xm-iris5.h"
46f18e7b
RK
2548 xmake_file=mips/x-iris
2549 tmake_file=mips/t-cross64
2550 # See comment in mips/iris[56].h files.
2551 use_collect2=yes
04069e5c 2552# if test x$enable_threads = xyes; then
6e148807 2553# thread_file='irix'
04069e5c 2554# fi
46f18e7b
RK
2555 ;;
2556 mips-sni-sysv4)
75bffa71 2557 if test x$gas = xyes
46f18e7b 2558 then
75bffa71 2559 if test x$stabs = xyes
46f18e7b
RK
2560 then
2561 tm_file=mips/iris5gdb.h
2562 else
61536478 2563 tm_file="mips/sni-svr4.h mips/sni-gas.h"
46f18e7b
RK
2564 fi
2565 else
2566 tm_file=mips/sni-svr4.h
2567 fi
61536478 2568 xm_defines=USG
46f18e7b
RK
2569 xmake_file=mips/x-sni-svr4
2570 tmake_file=mips/t-mips-gas
75bffa71 2571 if test x$gnu_ld != xyes
46f18e7b
RK
2572 then
2573 use_collect2=yes
2574 fi
46f18e7b
RK
2575 ;;
2576 mips-sgi-irix5*) # SGI System V.4., IRIX 5
75bffa71 2577 if test x$gas = xyes
46f18e7b 2578 then
61536478 2579 tm_file="mips/iris5.h mips/iris5gas.h"
75bffa71 2580 if test x$stabs = xyes
46f18e7b
RK
2581 then
2582 tm_file="${tm_file} dbx.h"
2583 fi
2584 else
2585 tm_file=mips/iris5.h
2586 fi
74c55ab0
JW
2587 xm_defines=USG
2588 xm_file="mips/xm-iris5.h"
46f18e7b
RK
2589 xmake_file=mips/x-iris
2590 # mips-tfile doesn't work yet
2591 tmake_file=mips/t-mips-gas
2592 # See comment in mips/iris5.h file.
2593 use_collect2=yes
04069e5c 2594# if test x$enable_threads = xyes; then
6e148807 2595# thread_file='irix'
04069e5c 2596# fi
46f18e7b
RK
2597 ;;
2598 mips-sgi-irix4loser*) # Mostly like a MIPS.
61536478 2599 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
75bffa71 2600 if test x$stabs = xyes; then
46f18e7b
RK
2601 tm_file="${tm_file} dbx.h"
2602 fi
61536478 2603 xm_defines=USG
46f18e7b 2604 xmake_file=mips/x-iris
75bffa71 2605 if test x$gas = xyes
46f18e7b
RK
2606 then
2607 tmake_file=mips/t-mips-gas
2608 else
2609 extra_passes="mips-tfile mips-tdump"
2610 fi
75bffa71 2611 if test x$gnu_ld != xyes
46f18e7b
RK
2612 then
2613 use_collect2=yes
2614 fi
04069e5c 2615# if test x$enable_threads = xyes; then
6e148807 2616# thread_file='irix'
04069e5c 2617# fi
46f18e7b
RK
2618 ;;
2619 mips-sgi-irix4*) # Mostly like a MIPS.
61536478 2620 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
75bffa71 2621 if test x$stabs = xyes; then
46f18e7b
RK
2622 tm_file="${tm_file} dbx.h"
2623 fi
61536478 2624 xm_defines=USG
46f18e7b 2625 xmake_file=mips/x-iris
75bffa71 2626 if test x$gas = xyes
46f18e7b
RK
2627 then
2628 tmake_file=mips/t-mips-gas
2629 else
2630 extra_passes="mips-tfile mips-tdump"
2631 fi
75bffa71 2632 if test x$gnu_ld != xyes
46f18e7b
RK
2633 then
2634 use_collect2=yes
2635 fi
04069e5c 2636# if test x$enable_threads = xyes; then
6e148807 2637# thread_file='irix'
04069e5c 2638# fi
46f18e7b
RK
2639 ;;
2640 mips-sgi-*) # Mostly like a MIPS.
61536478 2641 tm_file="mips/iris3.h ${tm_file}"
75bffa71 2642 if test x$stabs = xyes; then
46f18e7b
RK
2643 tm_file="${tm_file} dbx.h"
2644 fi
61536478 2645 xm_defines=USG
46f18e7b 2646 xmake_file=mips/x-iris3
75bffa71 2647 if test x$gas = xyes
46f18e7b
RK
2648 then
2649 tmake_file=mips/t-mips-gas
2650 else
2651 extra_passes="mips-tfile mips-tdump"
2652 fi
75bffa71 2653 if test x$gnu_ld != xyes
46f18e7b
RK
2654 then
2655 use_collect2=yes
2656 fi
2657 ;;
2658 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
61536478 2659 tm_file="mips/osfrose.h ${tm_file}"
46f18e7b
RK
2660 xmake_file=mips/x-osfrose
2661 tmake_file=mips/t-osfrose
2662 extra_objs=halfpic.o
2663 use_collect2=yes
2664 ;;
2665 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
2666 tm_file=mips/dec-osf1.h
75bffa71 2667 if test x$stabs = xyes; then
46f18e7b
RK
2668 tm_file="${tm_file} dbx.h"
2669 fi
2670 xmake_file=mips/x-dec-osf1
75bffa71 2671 if test x$gas = xyes
46f18e7b
RK
2672 then
2673 tmake_file=mips/t-mips-gas
2674 else
2675 tmake_file=mips/t-ultrix
2676 extra_passes="mips-tfile mips-tdump"
2677 fi
75bffa71 2678 if test x$gnu_ld != xyes
46f18e7b
RK
2679 then
2680 use_collect2=yes
2681 fi
2682 ;;
2683 mips-dec-bsd*) # Decstation running 4.4 BSD
2684 tm_file=mips/dec-bsd.h
75bffa71 2685 if test x$gas = xyes
46f18e7b
RK
2686 then
2687 tmake_file=mips/t-mips-gas
2688 else
2689 tmake_file=mips/t-ultrix
2690 extra_passes="mips-tfile mips-tdump"
2691 fi
75bffa71 2692 if test x$gnu_ld != xyes
46f18e7b
RK
2693 then
2694 use_collect2=yes
2695 fi
2696 ;;
58600d24 2697 mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
46f18e7b 2698 tm_file=mips/netbsd.h
be1ed94f 2699 # On NetBSD, the headers are already okay, except for math.h.
e47f44f4 2700 tmake_file=t-netbsd
46f18e7b 2701 ;;
11fa8909 2702 mips*-*-linux*) # Linux MIPS, either endian.
18cae839 2703 xmake_file=x-linux
11fa8909
RL
2704 case $machine in
2705 mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;;
2706 *) tm_file="mips/elf.h mips/linux.h" ;;
2707 esac
e86e6730 2708 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
18cae839
RL
2709 gnu_ld=yes
2710 gas=yes
e86e6730
AJ
2711 if test x$enable_threads = xyes; then
2712 thread_file='posix'
2713 fi
18cae839 2714 ;;
1b4a979b
ME
2715 mips*el-*-openbsd*) # mips little endian
2716 target_cpu_default="MASK_GAS|MASK_ABICALLS"
1b4a979b
ME
2717 ;;
2718 mips*-*-openbsd*) # mips big endian
2719 target_cpu_default="MASK_GAS|MASK_ABICALLS"
9e28024a 2720 tm_file="mips/openbsd-be.h ${tm_file}"
1b4a979b 2721 ;;
46f18e7b 2722 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
61536478 2723 tm_file="mips/news4.h ${tm_file}"
75bffa71 2724 if test x$stabs = xyes; then
46f18e7b
RK
2725 tm_file="${tm_file} dbx.h"
2726 fi
75bffa71 2727 if test x$gas = xyes
46f18e7b
RK
2728 then
2729 tmake_file=mips/t-mips-gas
2730 else
2731 extra_passes="mips-tfile mips-tdump"
2732 fi
75bffa71 2733 if test x$gnu_ld != xyes
46f18e7b
RK
2734 then
2735 use_collect2=yes
2736 fi
2737 xmake_file=mips/x-sony
2738 ;;
2739 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
2740 # That is based on svr4.
2741 # t-svr4 is not right because this system doesn't use ELF.
61536478 2742 tm_file="mips/news5.h ${tm_file}"
75bffa71 2743 if test x$stabs = xyes; then
46f18e7b
RK
2744 tm_file="${tm_file} dbx.h"
2745 fi
61536478 2746 xm_defines=USG
75bffa71 2747 if test x$gas = xyes
46f18e7b
RK
2748 then
2749 tmake_file=mips/t-mips-gas
2750 else
2751 extra_passes="mips-tfile mips-tdump"
2752 fi
75bffa71 2753 if test x$gnu_ld != xyes
46f18e7b
RK
2754 then
2755 use_collect2=yes
2756 fi
2757 ;;
2758 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
61536478 2759 tm_file="mips/svr4-5.h mips/svr4-t.h"
75bffa71 2760 if test x$stabs = xyes; then
46f18e7b
RK
2761 tm_file="${tm_file} dbx.h"
2762 fi
61536478 2763 xm_defines=USG
46f18e7b 2764 xmake_file=mips/x-sysv
75bffa71 2765 if test x$gas = xyes
46f18e7b
RK
2766 then
2767 tmake_file=mips/t-mips-gas
2768 extra_parts="crtbegin.o crtend.o"
2769 else
2770 tmake_file=mips/t-mips
2771 extra_passes="mips-tfile mips-tdump"
2772 fi
75bffa71 2773 if test x$gnu_ld != xyes
46f18e7b
RK
2774 then
2775 use_collect2=yes
2776 fi
46f18e7b
RK
2777 ;;
2778 mips-*-ultrix* | mips-dec-mach3) # Decstation.
61536478 2779 tm_file="mips/ultrix.h ${tm_file}"
75bffa71 2780 if test x$stabs = xyes; then
46f18e7b
RK
2781 tm_file="${tm_file} dbx.h"
2782 fi
2783 xmake_file=mips/x-ultrix
75bffa71 2784 if test x$gas = xyes
46f18e7b
RK
2785 then
2786 tmake_file=mips/t-mips-gas
2787 else
2788 tmake_file=mips/t-ultrix
2789 extra_passes="mips-tfile mips-tdump"
2790 fi
75bffa71 2791 if test x$gnu_ld != xyes
46f18e7b
RK
2792 then
2793 use_collect2=yes
2794 fi
2795 ;;
75bffa71
ILT
2796changequote(,)dnl
2797 mips-*-riscos[56789]bsd*)
2798changequote([,])dnl
46f18e7b 2799 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
75bffa71 2800 if test x$stabs = xyes; then
46f18e7b
RK
2801 tm_file="${tm_file} dbx.h"
2802 fi
75bffa71 2803 if test x$gas = xyes
46f18e7b
RK
2804 then
2805 tmake_file=mips/t-bsd-gas
2806 else
2807 tmake_file=mips/t-bsd
2808 extra_passes="mips-tfile mips-tdump"
2809 fi
75bffa71 2810 if test x$gnu_ld != xyes
46f18e7b
RK
2811 then
2812 use_collect2=yes
2813 fi
46f18e7b 2814 ;;
75bffa71
ILT
2815changequote(,)dnl
2816 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
2817changequote([,])dnl
61536478 2818 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
75bffa71 2819 if test x$stabs = xyes; then
46f18e7b
RK
2820 tm_file="${tm_file} dbx.h"
2821 fi
75bffa71 2822 if test x$gas = xyes
46f18e7b
RK
2823 then
2824 tmake_file=mips/t-bsd-gas
2825 else
2826 tmake_file=mips/t-bsd
2827 extra_passes="mips-tfile mips-tdump"
2828 fi
75bffa71 2829 if test x$gnu_ld != xyes
46f18e7b
RK
2830 then
2831 use_collect2=yes
2832 fi
46f18e7b 2833 ;;
75bffa71
ILT
2834changequote(,)dnl
2835 mips-*-riscos[56789]sysv4*)
2836changequote([,])dnl
46f18e7b 2837 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
75bffa71 2838 if test x$stabs = xyes; then
46f18e7b
RK
2839 tm_file="${tm_file} dbx.h"
2840 fi
46f18e7b 2841 xmake_file=mips/x-sysv
75bffa71 2842 if test x$gas = xyes
46f18e7b
RK
2843 then
2844 tmake_file=mips/t-svr4-gas
2845 else
2846 tmake_file=mips/t-svr4
2847 extra_passes="mips-tfile mips-tdump"
2848 fi
75bffa71 2849 if test x$gnu_ld != xyes
46f18e7b
RK
2850 then
2851 use_collect2=yes
2852 fi
46f18e7b 2853 ;;
75bffa71
ILT
2854changequote(,)dnl
2855 mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
2856changequote([,])dnl
61536478 2857 tm_file="mips/svr4-4.h ${tm_file}"
75bffa71 2858 if test x$stabs = xyes; then
46f18e7b
RK
2859 tm_file="${tm_file} dbx.h"
2860 fi
61536478 2861 xm_defines=USG
46f18e7b 2862 xmake_file=mips/x-sysv
75bffa71 2863 if test x$gas = xyes
46f18e7b
RK
2864 then
2865 tmake_file=mips/t-svr4-gas
2866 else
2867 tmake_file=mips/t-svr4
2868 extra_passes="mips-tfile mips-tdump"
2869 fi
75bffa71 2870 if test x$gnu_ld != xyes
46f18e7b
RK
2871 then
2872 use_collect2=yes
2873 fi
46f18e7b 2874 ;;
75bffa71
ILT
2875changequote(,)dnl
2876 mips-*-riscos[56789]sysv*)
2877changequote([,])dnl
46f18e7b 2878 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
75bffa71 2879 if test x$stabs = xyes; then
46f18e7b
RK
2880 tm_file="${tm_file} dbx.h"
2881 fi
61536478 2882 xm_defines=USG
46f18e7b 2883 xmake_file=mips/x-sysv
75bffa71 2884 if test x$gas = xyes
46f18e7b
RK
2885 then
2886 tmake_file=mips/t-svr3-gas
2887 else
2888 tmake_file=mips/t-svr3
2889 extra_passes="mips-tfile mips-tdump"
2890 fi
75bffa71 2891 if test x$gnu_ld != xyes
46f18e7b
RK
2892 then
2893 use_collect2=yes
2894 fi
46f18e7b
RK
2895 ;;
2896 mips-*-sysv* | mips-*-riscos*sysv*)
61536478 2897 tm_file="mips/svr3-4.h ${tm_file}"
75bffa71 2898 if test x$stabs = xyes; then
46f18e7b
RK
2899 tm_file="${tm_file} dbx.h"
2900 fi
61536478 2901 xm_defines=USG
46f18e7b 2902 xmake_file=mips/x-sysv
75bffa71 2903 if test x$gas = xyes
46f18e7b
RK
2904 then
2905 tmake_file=mips/t-svr3-gas
2906 else
2907 tmake_file=mips/t-svr3
2908 extra_passes="mips-tfile mips-tdump"
2909 fi
75bffa71 2910 if test x$gnu_ld != xyes
46f18e7b
RK
2911 then
2912 use_collect2=yes
2913 fi
46f18e7b 2914 ;;
75bffa71
ILT
2915changequote(,)dnl
2916 mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0.
2917changequote([,])dnl
46f18e7b 2918 tm_file=mips/mips-5.h
75bffa71 2919 if test x$stabs = xyes; then
46f18e7b
RK
2920 tm_file="${tm_file} dbx.h"
2921 fi
75bffa71 2922 if test x$gas = xyes
46f18e7b
RK
2923 then
2924 tmake_file=mips/t-mips-gas
2925 else
2926 extra_passes="mips-tfile mips-tdump"
2927 fi
75bffa71 2928 if test x$gnu_ld != xyes
46f18e7b
RK
2929 then
2930 use_collect2=yes
2931 fi
46f18e7b
RK
2932 ;;
2933 mips-*-gnu*)
2934 ;;
2935 mipsel-*-ecoff*)
2936 tm_file=mips/ecoffl.h
75bffa71 2937 if test x$stabs = xyes; then
46f18e7b
RK
2938 tm_file="${tm_file} dbx.h"
2939 fi
2940 tmake_file=mips/t-ecoff
2941 ;;
2942 mips-*-ecoff*)
1be12a4a 2943 tm_file="gofast.h mips/ecoff.h"
75bffa71 2944 if test x$stabs = xyes; then
46f18e7b
RK
2945 tm_file="${tm_file} dbx.h"
2946 fi
2947 tmake_file=mips/t-ecoff
46f18e7b
RK
2948 ;;
2949 mipsel-*-elf*)
7aae67a2 2950 tm_file="mips/elfl.h"
d8265d29 2951 tmake_file=mips/t-elf
46f18e7b
RK
2952 ;;
2953 mips-*-elf*)
d8265d29
CM
2954 tm_file="mips/elf.h"
2955 tmake_file=mips/t-elf
46f18e7b
RK
2956 ;;
2957 mips64el-*-elf*)
d8265d29
CM
2958 tm_file="mips/elfl64.h"
2959 tmake_file=mips/t-elf
46f18e7b
RK
2960 ;;
2961 mips64orionel-*-elf*)
7aae67a2 2962 tm_file="mips/elforion.h mips/elfl64.h"
d8265d29 2963 tmake_file=mips/t-elf
46f18e7b
RK
2964 ;;
2965 mips64-*-elf*)
d8265d29
CM
2966 tm_file="mips/elf64.h"
2967 tmake_file=mips/t-elf
46f18e7b
RK
2968 ;;
2969 mips64orion-*-elf*)
7aae67a2 2970 tm_file="mips/elforion.h mips/elf64.h"
d8265d29 2971 tmake_file=mips/t-elf
46f18e7b
RK
2972 ;;
2973 mips64orion-*-rtems*)
6e9856ba 2974 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
d1476635 2975 tmake_file="mips/t-elf t-rtems"
46f18e7b 2976 ;;
e9a25f70 2977 mipstx39el-*-elf*)
d8265d29 2978 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
09e4daf5 2979 tmake_file=mips/t-r3900
e9a25f70
JL
2980 ;;
2981 mipstx39-*-elf*)
d8265d29 2982 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
09e4daf5 2983 tmake_file=mips/t-r3900
e9a25f70 2984 ;;
46f18e7b 2985 mips-*-*) # Default MIPS RISC-OS 4.0.
75bffa71 2986 if test x$stabs = xyes; then
46f18e7b
RK
2987 tm_file="${tm_file} dbx.h"
2988 fi
75bffa71 2989 if test x$gas = xyes
46f18e7b
RK
2990 then
2991 tmake_file=mips/t-mips-gas
2992 else
2993 extra_passes="mips-tfile mips-tdump"
2994 fi
75bffa71 2995 if test x$gnu_ld != xyes
46f18e7b
RK
2996 then
2997 use_collect2=yes
2998 fi
2999 ;;
cef64ec4 3000 mn10200-*-*)
5e3c02a8 3001 float_format=i32
cef64ec4
RK
3002 cpu_type=mn10200
3003 tm_file="mn10200/mn10200.h"
75bffa71 3004 if test x$stabs = xyes
cef64ec4
RK
3005 then
3006 tm_file="${tm_file} dbx.h"
3007 fi
3008 use_collect2=no
3009 ;;
46f18e7b
RK
3010 mn10300-*-*)
3011 cpu_type=mn10300
3012 tm_file="mn10300/mn10300.h"
75bffa71 3013 if test x$stabs = xyes
46f18e7b
RK
3014 then
3015 tm_file="${tm_file} dbx.h"
3016 fi
3017 use_collect2=no
3018 ;;
3019 ns32k-encore-bsd*)
3020 tm_file=ns32k/encore.h
3021 use_collect2=yes
3022 ;;
3023 ns32k-sequent-bsd*)
3024 tm_file=ns32k/sequent.h
3025 use_collect2=yes
3026 ;;
3027 ns32k-tek6100-bsd*)
3028 tm_file=ns32k/tek6100.h
46f18e7b
RK
3029 use_collect2=yes
3030 ;;
3031 ns32k-tek6200-bsd*)
3032 tm_file=ns32k/tek6200.h
46f18e7b
RK
3033 use_collect2=yes
3034 ;;
3035# This has not been updated to GCC 2.
3036# ns32k-ns-genix*)
61536478 3037# xm_defines=USG
46f18e7b
RK
3038# xmake_file=ns32k/x-genix
3039# tm_file=ns32k/genix.h
46f18e7b
RK
3040# use_collect2=yes
3041# ;;
3042 ns32k-merlin-*)
3043 tm_file=ns32k/merlin.h
3044 use_collect2=yes
3045 ;;
3046 ns32k-pc532-mach*)
3047 tm_file=ns32k/pc532-mach.h
3048 use_collect2=yes
3049 ;;
3050 ns32k-pc532-minix*)
3051 tm_file=ns32k/pc532-min.h
61536478
JL
3052 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
3053 xm_defines=USG
46f18e7b
RK
3054 use_collect2=yes
3055 ;;
58600d24 3056 ns32k-*-netbsd*)
46f18e7b 3057 tm_file=ns32k/netbsd.h
641d4216 3058 xm_file="ns32k/xm-netbsd.h ${xm_file}"
be1ed94f 3059 # On NetBSD, the headers are already okay, except for math.h.
e47f44f4 3060 tmake_file=t-netbsd
ed4acb3b 3061 use_collect2=yes
46f18e7b
RK
3062 ;;
3063 pdp11-*-bsd)
3064 tm_file="${tm_file} pdp11/2bsd.h"
3065 ;;
3066 pdp11-*-*)
3067 ;;
d48120fe
DC
3068 avr-*-*)
3069 ;;
1b4a979b
ME
3070 ns32k-*-openbsd*)
3071 # Nothing special
3072 ;;
7a3842b3
RH
3073# This has not been updated to GCC 2.
3074# pyramid-*-*)
3075# cpu_type=pyr
3076# xmake_file=pyr/x-pyr
3077# use_collect2=yes
3078# ;;
1b992148
SC
3079
3080 pj*-linux*)
3081 tm_file="svr4.h pj/linux.h ${tm_file}"
3082 ;;
3083 pj-*)
3084 ;;
3085 pjl-*)
3086 tm_file="svr4.h pj/pjl.h ${tm_file}"
3087 ;;
3088
46f18e7b
RK
3089 romp-*-aos*)
3090 use_collect2=yes
3091 ;;
3092 romp-*-mach*)
3093 xmake_file=romp/x-mach
3094 use_collect2=yes
3095 ;;
1b4a979b
ME
3096 romp-*-openbsd*)
3097 # Nothing special
3098 ;;
3099 powerpc-*-openbsd*)
3100 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
1b4a979b 3101 ;;
c55dcc7d
FF
3102 powerpc-*-beos*)
3103 cpu_type=rs6000
3104 tm_file=rs6000/beos.h
3105 xm_file=rs6000/xm-beos.h
3106 tmake_file=rs6000/t-beos
3107 xmake_file=rs6000/x-beos
3108 ;;
b26e3a82 3109 powerpc-*-sysv*)
46f18e7b 3110 tm_file=rs6000/sysv4.h
2d092ffa 3111 xm_file="rs6000/xm-sysv4.h"
61536478 3112 xm_defines="USG POSIX"
46f18e7b 3113 extra_headers=ppc-asm.h
b26e3a82 3114 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
46f18e7b
RK
3115 xmake_file=rs6000/x-sysv4
3116 ;;
3117 powerpc-*-eabiaix*)
b26e3a82 3118 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
46f18e7b 3119 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
46f18e7b
RK
3120 extra_headers=ppc-asm.h
3121 ;;
3122 powerpc-*-eabisim*)
b26e3a82
GK
3123 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
3124 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3125 extra_headers=ppc-asm.h
3126 ;;
3127 powerpc-*-elf*)
3128 tm_file="rs6000/sysv4.h"
46f18e7b 3129 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
46f18e7b
RK
3130 extra_headers=ppc-asm.h
3131 ;;
3132 powerpc-*-eabi*)
b26e3a82
GK
3133 tm_file="rs6000/sysv4.h rs6000/eabi.h"
3134 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
46f18e7b
RK
3135 extra_headers=ppc-asm.h
3136 ;;
dec3e070 3137 powerpc-*-rtems*)
b26e3a82
GK
3138 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
3139 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
46f18e7b
RK
3140 extra_headers=ppc-asm.h
3141 ;;
ce514f57 3142 powerpc-*-linux-gnulibc1)
b26e3a82 3143 tm_file="rs6000/sysv4.h rs6000/linux.h"
ce514f57
FS
3144 xm_file=rs6000/xm-sysv4.h
3145 out_file=rs6000/rs6000.c
b26e3a82 3146 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
ce514f57 3147 xmake_file=x-linux
ce514f57 3148 extra_headers=ppc-asm.h
75bffa71 3149 if test x$enable_threads = xyes; then
ce514f57
FS
3150 thread_file='posix'
3151 fi
3152 ;;
844dadc7 3153 powerpc-*-linux-gnu*)
b26e3a82 3154 tm_file="rs6000/sysv4.h rs6000/linux.h"
2d092ffa 3155 xm_file="rs6000/xm-sysv4.h"
61536478 3156 xm_defines="USG ${xm_defines}"
dec3e070 3157 out_file=rs6000/rs6000.c
b26e3a82 3158 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
d7308c0c 3159 xmake_file=x-linux
46f18e7b 3160 extra_headers=ppc-asm.h
75bffa71 3161 if test x$enable_threads = xyes; then
d7308c0c
RK
3162 thread_file='posix'
3163 fi
46f18e7b 3164 ;;
7cc34889 3165 powerpc-wrs-vxworks*)
46f18e7b 3166 cpu_type=rs6000
2d092ffa 3167 xm_file="rs6000/xm-sysv4.h"
61536478 3168 xm_defines="USG POSIX"
b26e3a82 3169 tm_file="rs6000/sysv4.h rs6000/vxppc.h"
46f18e7b
RK
3170 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3171 extra_headers=ppc-asm.h
7cc34889 3172 thread_file='vxworks'
46f18e7b 3173 ;;
9ebbca7d
GK
3174 powerpcle-wrs-vxworks*)
3175 cpu_type=rs6000
3176 xm_file="rs6000/xm-sysv4.h"
3177 xm_defines="USG POSIX"
b26e3a82 3178 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
9ebbca7d
GK
3179 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3180 extra_headers=ppc-asm.h
3181 thread_file='vxworks'
3182 ;;
b26e3a82
GK
3183 powerpcle-*-sysv*)
3184 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
2d092ffa 3185 xm_file="rs6000/xm-sysv4.h"
61536478 3186 xm_defines="USG POSIX"
b26e3a82 3187 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
46f18e7b
RK
3188 xmake_file=rs6000/x-sysv4
3189 extra_headers=ppc-asm.h
3190 ;;
b26e3a82
GK
3191 powerpcle-*-elf*)
3192 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3193 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3194 extra_headers=ppc-asm.h
3195 ;;
46f18e7b 3196 powerpcle-*-eabisim*)
b26e3a82 3197 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
46f18e7b 3198 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
46f18e7b
RK
3199 extra_headers=ppc-asm.h
3200 ;;
3201 powerpcle-*-eabi*)
b26e3a82
GK
3202 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
3203 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
46f18e7b
RK
3204 extra_headers=ppc-asm.h
3205 ;;
46f18e7b 3206 powerpcle-*-solaris2*)
b26e3a82 3207 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
2d092ffa 3208 xm_file="rs6000/xm-sysv4.h"
61536478 3209 xm_defines="USG POSIX"
b26e3a82 3210 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
46f18e7b 3211 xmake_file=rs6000/x-sysv4
46f18e7b
RK
3212 extra_headers=ppc-asm.h
3213 ;;
75bffa71
ILT
3214changequote(,)dnl
3215 rs6000-ibm-aix3.[01]*)
3216changequote([,])dnl
46f18e7b
RK
3217 tm_file=rs6000/aix31.h
3218 xmake_file=rs6000/x-aix31
45e24d08 3219 float_format=none
46f18e7b
RK
3220 use_collect2=yes
3221 ;;
75bffa71
ILT
3222changequote(,)dnl
3223 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
3224changequote([,])dnl
46f18e7b 3225 tm_file=rs6000/aix3newas.h
75bffa71 3226 if test x$host != x$target
46f18e7b
RK
3227 then
3228 tmake_file=rs6000/t-xnewas
3229 else
3230 tmake_file=rs6000/t-newas
3231 fi
45e24d08 3232 float_format=none
46f18e7b
RK
3233 use_collect2=yes
3234 ;;
75bffa71 3235changequote(,)dnl
05cea40f 3236 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
75bffa71 3237changequote([,])dnl
590e30e7 3238 tm_file=rs6000/aix41.h
75bffa71 3239 if test x$host != x$target
46f18e7b
RK
3240 then
3241 tmake_file=rs6000/t-xnewas
d5b7b3ae
RE
3242 else
3243 tmake_file=rs6000/t-newas
3244 fi
3245 if test "$gnu_ld" = yes
3246 then
3247 xmake_file=rs6000/x-aix41-gld
46f18e7b 3248 else
e680248e 3249 tmake_file="rs6000/t-newas rs6000/t-aix41"
46f18e7b 3250 fi
9ebbca7d 3251 xmake_file=rs6000/x-aix41
45e24d08 3252 float_format=none
a260abc9
DE
3253 use_collect2=yes
3254 ;;
75bffa71 3255changequote(,)dnl
7747ddb3 3256 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
75bffa71 3257changequote([,])dnl
a260abc9 3258 tm_file=rs6000/aix43.h
9ebbca7d
GK
3259 tmake_file=rs6000/t-aix43
3260 xmake_file=rs6000/x-aix41
45e24d08 3261 float_format=none
a260abc9
DE
3262 use_collect2=yes
3263 ;;
75bffa71
ILT
3264changequote(,)dnl
3265 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
3266changequote([,])dnl
a260abc9 3267 tm_file=rs6000/aix43.h
9ebbca7d
GK
3268 tmake_file=rs6000/t-aix43
3269 xmake_file=rs6000/x-aix41
45e24d08 3270 float_format=none
46f18e7b
RK
3271 use_collect2=yes
3272 ;;
3273 rs6000-ibm-aix*)
45e24d08 3274 float_format=none
46f18e7b
RK
3275 use_collect2=yes
3276 ;;
3277 rs6000-bull-bosx)
45e24d08 3278 float_format=none
46f18e7b
RK
3279 use_collect2=yes
3280 ;;
3281 rs6000-*-mach*)
3282 tm_file=rs6000/mach.h
61536478 3283 xm_file="${xm_file} rs6000/xm-mach.h"
46f18e7b
RK
3284 xmake_file=rs6000/x-mach
3285 use_collect2=yes
3286 ;;
3287 rs6000-*-lynxos*)
3288 tm_file=rs6000/lynx.h
3289 xm_file=rs6000/xm-lynx.h
3290 tmake_file=rs6000/t-rs6000
3291 xmake_file=rs6000/x-lynx
3292 use_collect2=yes
3293 ;;
3294 sh-*-elf*)
3295 tm_file=sh/elf.h
3296 float_format=sh
3297 ;;
b098f56d
JS
3298 sh-*-rtemself*)
3299 tmake_file="sh/t-sh t-rtems"
3300 tm_file=sh/rtemself.h
3301 float_format=sh
3302 ;;
5d84b57e
JS
3303 sh-*-rtems*)
3304 tmake_file="sh/t-sh t-rtems"
3305 tm_file=sh/rtems.h
3306 float_format=sh
3307 ;;
46f18e7b
RK
3308 sh-*-*)
3309 float_format=sh
3310 ;;
3311 sparc-tti-*)
3312 tm_file=sparc/pbd.h
61536478
JL
3313 xm_file="xm-alloca.h ${xm_file}"
3314 xm_defines=USG
46f18e7b
RK
3315 ;;
3316 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
3317 tm_file=sparc/vxsparc.h
3318 tmake_file=sparc/t-vxsparc
3319 use_collect2=yes
7cc34889 3320 thread_file='vxworks'
46f18e7b
RK
3321 ;;
3322 sparc-*-aout*)
3323 tmake_file=sparc/t-sparcbare
3324 tm_file="sparc/aout.h libgloss.h"
3325 ;;
3326 sparc-*-netbsd*)
3327 tm_file=sparc/netbsd.h
e47f44f4 3328 tmake_file=t-netbsd
ed4acb3b 3329 use_collect2=yes
46f18e7b 3330 ;;
1b4a979b
ME
3331 sparc-*-openbsd*)
3332 # we need collect2 until our bug is fixed...
3333 use_collect2=yes
3334 ;;
46f18e7b
RK
3335 sparc-*-bsd*)
3336 tm_file=sparc/bsd.h
3337 ;;
ac52b80b
DE
3338 sparc-*-elf*)
3339 tm_file=sparc/elf.h
3340 tmake_file=sparc/t-elf
3341 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3342 #float_format=i128
3343 float_format=i64
3344 ;;
956d6950 3345 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
61536478 3346 xm_file="${xm_file} sparc/xm-linux.h"
46f18e7b
RK
3347 tm_file=sparc/linux-aout.h
3348 xmake_file=x-linux
46f18e7b 3349 gnu_ld=yes
46f18e7b 3350 ;;
956d6950 3351 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
61536478 3352 xm_file="${xm_file} sparc/xm-linux.h"
2334126e 3353 xmake_file=x-linux
46f18e7b 3354 tm_file=sparc/linux.h
9d1ebd25 3355 tmake_file="t-linux t-linux-gnulibc1"
9ad03bc1 3356 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
9ad03bc1 3357 gnu_ld=yes
39c440fc 3358 float_format=sparc
9ad03bc1 3359 ;;
956d6950 3360 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
61536478 3361 xm_file="${xm_file} sparc/xm-linux.h"
2334126e 3362 xmake_file=x-linux
9ad03bc1 3363 tm_file=sparc/linux.h
9d1ebd25 3364 tmake_file="t-linux"
9ad03bc1 3365 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
46f18e7b 3366 gnu_ld=yes
75bffa71 3367 if test x$enable_threads = xyes; then
9ad03bc1
RK
3368 thread_file='posix'
3369 fi
39c440fc 3370 float_format=sparc
46f18e7b
RK
3371 ;;
3372 sparc-*-lynxos*)
75bffa71 3373 if test x$gas = xyes
46f18e7b
RK
3374 then
3375 tm_file=sparc/lynx.h
3376 else
3377 tm_file=sparc/lynx-ng.h
3378 fi
3379 xm_file=sparc/xm-lynx.h
3380 tmake_file=sparc/t-sunos41
3381 xmake_file=x-lynx
3382 ;;
6e5138f0
JS
3383 sparc-*-rtemsaout*)
3384 tmake_file="sparc/t-sparcbare t-rtems"
3385 tm_file=sparc/rtems.h
dae3a2d3 3386 ;;
d1476635
JS
3387 sparc-*-rtems*|sparc-*-rtemself*)
3388 tm_file="sparc/rtemself.h"
3389 tmake_file="sparc/t-elf t-rtems"
3390 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3391 #float_format=i128
3392 float_format=i64
3393 ;;
d559a4db 3394 sparcv9-*-solaris2*)
3b1c302f
AO
3395 if test x$gnu_ld = xyes
3396 then
3397 tm_file=sparc/sol2-64.h
3398 else
3399 tm_file=sparc/sol2-sld-64.h
3400 fi
d559a4db
DM
3401 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
3402 xm_defines="USG POSIX"
345a6161 3403 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
d559a4db
DM
3404 xmake_file=sparc/x-sysv4
3405 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
027ea2a7 3406 float_format=none
d7496fbb 3407 if test x${enable_threads} = x ; then
d559a4db 3408 enable_threads=$have_pthread_h
d7496fbb 3409 if test x${enable_threads} = x ; then
d559a4db
DM
3410 enable_threads=$have_thread_h
3411 fi
3412 fi
d7496fbb
DM
3413 if test x${enable_threads} = xyes ; then
3414 if test x${have_pthread_h} = xyes ; then
d559a4db
DM
3415 thread_file='posix'
3416 else
3417 thread_file='solaris'
3418 fi
3419 fi
3420 ;;
ab87f8c8 3421 sparc-hal-solaris2*)
2d092ffa 3422 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
a5037588 3423 xm_defines="USG POSIX"
ab87f8c8
JL
3424 tm_file="sparc/sol2.h sparc/hal.h"
3425 tmake_file="sparc/t-halos sparc/t-sol2"
3426 xmake_file=sparc/x-sysv4
3427 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
a5037588 3428 case $machine in
e7651ec5 3429changequote(,)dnl
a5037588 3430 *-*-solaris2.[0-4])
e7651ec5 3431changequote([,])dnl
a5037588
CL
3432 float_format=i128
3433 ;;
3434 *)
3435 float_format=none
3436 ;;
3437 esac
3438 thread_file='solaris'
ab87f8c8 3439 ;;
46f18e7b 3440 sparc-*-solaris2*)
75bffa71 3441 if test x$gnu_ld = xyes
0a9bdce3
PE
3442 then
3443 tm_file=sparc/sol2.h
3444 else
3445 tm_file=sparc/sol2-sld.h
3446 fi
2d092ffa 3447 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
22ec3928 3448 xm_defines="USG POSIX"
46f18e7b
RK
3449 tmake_file=sparc/t-sol2
3450 xmake_file=sparc/x-sysv4
3451 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
61536478 3452 case $machine in
a242e6f5 3453changequote(,)dnl
5b68c389 3454 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
a242e6f5
RO
3455changequote([,])dnl
3456 *-*-solaris2*)
3b1c302f
AO
3457 if test x$gnu_ld = xyes
3458 then
3459 tm_file=sparc/sol2-64.h
3460 else
3461 tm_file=sparc/sol2-sld-64.h
3462 fi
a242e6f5
RO
3463 tmake_file="$tmake_file sparc/t-sol2-64"
3464 ;;
3465 esac
3466 case $machine in
75bffa71
ILT
3467changequote(,)dnl
3468 *-*-solaris2.[0-4])
3469changequote([,])dnl
027ea2a7
JW
3470 float_format=i128
3471 ;;
61536478 3472 *)
027ea2a7
JW
3473 float_format=none
3474 ;;
61536478 3475 esac
75bffa71 3476 if test x${enable_threads} = x; then
f24af81b 3477 enable_threads=$have_pthread_h
75bffa71 3478 if test x${enable_threads} = x; then
f24af81b
TT
3479 enable_threads=$have_thread_h
3480 fi
3481 fi
75bffa71
ILT
3482 if test x${enable_threads} = xyes; then
3483 if test x${have_pthread_h} = xyes; then
f24af81b
TT
3484 thread_file='posix'
3485 else
0bbb1697 3486 thread_file='solaris'
f24af81b 3487 fi
0bbb1697 3488 fi
46f18e7b
RK
3489 ;;
3490 sparc-*-sunos4.0*)
3491 tm_file=sparc/sunos4.h
3492 tmake_file=sparc/t-sunos40
3493 use_collect2=yes
3494 ;;
3495 sparc-*-sunos4*)
3496 tm_file=sparc/sunos4.h
3497 tmake_file=sparc/t-sunos41
3498 use_collect2=yes
75bffa71 3499 if test x$gas = xyes; then
ca55abae
JM
3500 tm_file="${tm_file} sparc/sun4gas.h"
3501 fi
46f18e7b
RK
3502 ;;
3503 sparc-*-sunos3*)
3504 tm_file=sparc/sun4o3.h
3505 use_collect2=yes
3506 ;;
3507 sparc-*-sysv4*)
3508 tm_file=sparc/sysv4.h
2d092ffa 3509 xm_file="sparc/xm-sysv4.h"
61536478 3510 xm_defines="USG POSIX"
46f18e7b
RK
3511 tmake_file=t-svr4
3512 xmake_file=sparc/x-sysv4
3513 extra_parts="crtbegin.o crtend.o"
3514 ;;
3515 sparc-*-vxsim*)
2d092ffa 3516 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
f5963e61 3517 xm_defines="USG POSIX"
46f18e7b
RK
3518 tm_file=sparc/vxsim.h
3519 tmake_file=sparc/t-vxsparc
3520 xmake_file=sparc/x-sysv4
3521 ;;
3522 sparclet-*-aout*)
3523 tm_file="sparc/splet.h libgloss.h"
3524 tmake_file=sparc/t-splet
3525 ;;
3526 sparclite-*-coff*)
3527 tm_file="sparc/litecoff.h libgloss.h"
3528 tmake_file=sparc/t-sparclite
3529 ;;
3530 sparclite-*-aout*)
3531 tm_file="sparc/lite.h aoutos.h libgloss.h"
3532 tmake_file=sparc/t-sparclite
3533 ;;
28df4168 3534 sparclite-*-elf*)
6eccdc81 3535 tm_file="sparc/liteelf.h"
28df4168
JL
3536 tmake_file=sparc/t-sparclite
3537 extra_parts="crtbegin.o crtend.o"
3538 ;;
3539 sparc86x-*-aout*)
3540 tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
3541 tmake_file=sparc/t-sp86x
3542 ;;
3543 sparc86x-*-elf*)
6eccdc81 3544 tm_file="sparc/sp86x-elf.h"
28df4168
JL
3545 tmake_file=sparc/t-sp86x
3546 extra_parts="crtbegin.o crtend.o"
3547 ;;
46f18e7b
RK
3548 sparc64-*-aout*)
3549 tmake_file=sparc/t-sp64
3550 tm_file=sparc/sp64-aout.h
3551 ;;
3552 sparc64-*-elf*)
3553 tmake_file=sparc/t-sp64
3554 tm_file=sparc/sp64-elf.h
3555 extra_parts="crtbegin.o crtend.o"
3556 ;;
956d6950 3557 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
345a6161 3558 tmake_file="t-linux sparc/t-linux64"
2334126e
DE
3559 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
3560 tm_file=sparc/linux64.h
3561 xmake_file=x-linux
345a6161 3562 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2334126e 3563 gnu_ld=yes
9ce13279
JJ
3564 if test x$enable_threads = xyes; then
3565 thread_file='posix'
3566 fi
39c440fc 3567 float_format=sparc
2334126e 3568 ;;
46f18e7b
RK
3569# This hasn't been upgraded to GCC 2.
3570# tahoe-harris-*) # Harris tahoe, using COFF.
3571# tm_file=tahoe/harris.h
3572# ;;
3573# tahoe-*-bsd*) # tahoe running BSD
3574# ;;
d5b7b3ae
RE
3575
3576 thumb*-*-*)
3577 AC_MSG_ERROR([
3578*** The Thumb targets have been depreciated. The equivalent
3579*** ARM based toolchain can now generated Thumb instructions
3580*** when the -mthumb switch is given to the compiler.])
cb805c2d 3581 ;;
46f18e7b
RK
3582# This hasn't been upgraded to GCC 2.
3583# tron-*-*)
3584# cpu_type=gmicro
3585# use_collect2=yes
3586# ;;
966f8bfd
JS
3587 v850-*-rtems*)
3588 cpu_type=v850
3589 tm_file="v850/rtems.h"
3590 xm_file="v850/xm-v850.h"
3591 tmake_file="v850/t-v850 t-rtems"
3592 if test x$stabs = xyes
3593 then
3594 tm_file="${tm_file} dbx.h"
3595 fi
3596 use_collect2=no
3597 ;;
f84271d9 3598 v850-*-*)
7a846a6c 3599 target_cpu_default="TARGET_CPU_generic"
f84271d9
JL
3600 cpu_type=v850
3601 tm_file="v850/v850.h"
3602 xm_file="v850/xm-v850.h"
62db76ee 3603 tmake_file=v850/t-v850
75bffa71 3604 if test x$stabs = xyes
f84271d9
JL
3605 then
3606 tm_file="${tm_file} dbx.h"
3607 fi
3608 use_collect2=no
3609 ;;
46f18e7b
RK
3610 vax-*-bsd*) # vaxen running BSD
3611 use_collect2=yes
3612 float_format=vax
3613 ;;
3614 vax-*-sysv*) # vaxen running system V
3615 tm_file="${tm_file} vax/vaxv.h"
61536478 3616 xm_defines=USG
46f18e7b
RK
3617 float_format=vax
3618 ;;
3619 vax-*-netbsd*)
3620 tm_file="${tm_file} netbsd.h vax/netbsd.h"
e47f44f4 3621 tmake_file=t-netbsd
46f18e7b 3622 float_format=vax
ed4acb3b 3623 use_collect2=yes
46f18e7b 3624 ;;
1b4a979b 3625 vax-*-openbsd*)
766518a0 3626 tmake_file="${tmake_file} vax/t-openbsd"
1b4a979b 3627 ;;
46f18e7b
RK
3628 vax-*-ultrix*) # vaxen running ultrix
3629 tm_file="${tm_file} vax/ultrix.h"
3630 use_collect2=yes
3631 float_format=vax
3632 ;;
3633 vax-*-vms*) # vaxen running VMS
3634 xm_file=vax/xm-vms.h
3635 tm_file=vax/vms.h
3636 float_format=vax
3637 ;;
3638 vax-*-*) # vax default entry
3639 float_format=vax
3640 ;;
3641 we32k-att-sysv*)
3642 xm_file="${xm_file} xm-svr3"
3643 use_collect2=yes
3644 ;;
3645 *)
3646 echo "Configuration $machine not supported" 1>&2
3647 exit 1
3648 ;;
3649 esac
3650
3651 case $machine in
3652 *-*-linux-gnu*)
61536478 3653 ;; # Existing GNU/Linux systems do not use the GNU setup.
46f18e7b
RK
3654 *-*-gnu*)
3655 # On the GNU system, the setup is just about the same on
3656 # each different CPU. The specific machines that GNU
3657 # supports are matched above and just set $cpu_type.
61536478 3658 xm_file="xm-gnu.h ${xm_file}"
46f18e7b 3659 tm_file=${cpu_type}/gnu.h
6b403743 3660 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
46f18e7b
RK
3661 # GNU always uses ELF.
3662 elf=yes
3663 # GNU tools are the only tools.
3664 gnu_ld=yes
3665 gas=yes
46f18e7b
RK
3666 xmake_file=x-linux # These details are the same as Linux.
3667 tmake_file=t-gnu # These are not.
3668 ;;
3669 *-*-sysv4*)
46f18e7b 3670 xmake_try_sysv=x-sysv
46f18e7b
RK
3671 install_headers_dir=install-headers-cpio
3672 ;;
3673 *-*-sysv*)
46f18e7b
RK
3674 install_headers_dir=install-headers-cpio
3675 ;;
3676 esac
3677
61536478 3678 # Distinguish i[34567]86
46f18e7b
RK
3679 # Also, do not run mips-tfile on MIPS if using gas.
3680 # Process --with-cpu= for PowerPC/rs6000
3681 target_cpu_default2=
3682 case $machine in
3683 i486-*-*)
3684 target_cpu_default2=1
3685 ;;
3686 i586-*-*)
83f4345f
PT
3687 case $target_alias in
3688 k6-*)
3689 target_cpu_default2=4
3690 ;;
3691 *)
3692 target_cpu_default2=2
3693 ;;
3694 esac
46f18e7b 3695 ;;
61536478 3696 i686-*-* | i786-*-*)
46f18e7b
RK
3697 target_cpu_default2=3
3698 ;;
08fc0184
RK
3699 alpha*-*-*)
3700 case $machine in
2618c083 3701changequote(,)dnl
d8ee3e20 3702 alphaev6[78]*)
2618c083 3703changequote([,])dnl
d8ee3e20
RH
3704 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
3705 ;;
e9a25f70 3706 alphaev6*)
de4abb91 3707 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
e9a25f70
JL
3708 ;;
3709 alphapca56*)
fbb5ed67 3710 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
e9a25f70 3711 ;;
08fc0184 3712 alphaev56*)
e9a25f70 3713 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
08fc0184
RK
3714 ;;
3715 alphaev5*)
3716 target_cpu_default2="MASK_CPU_EV5"
3717 ;;
3718 esac
3719
75bffa71 3720 if test x$gas = xyes
46f18e7b 3721 then
75bffa71 3722 if test "$target_cpu_default2" = ""
08fc0184 3723 then
e71c3bb0 3724 target_cpu_default2="MASK_GAS"
08fc0184 3725 else
e71c3bb0 3726 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
08fc0184 3727 fi
46f18e7b
RK
3728 fi
3729 ;;
956d6950
JL
3730 arm*-*-*)
3731 case "x$with_cpu" in
3732 x)
3733 # The most generic
3734 target_cpu_default2="TARGET_CPU_generic"
3735 ;;
3736
3737 # Distinguish cores, and major variants
3738 # arm7m doesn't exist, but D & I don't affect code
7805bde9 3739changequote(,)dnl
956d6950
JL
3740 xarm[23678] | xarm250 | xarm[67][01]0 \
3741 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
3742 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
8f8d3278 3743 | xstrongarm | xstrongarm110 | xstrongarm1100)
7805bde9 3744changequote([,])dnl
956d6950
JL
3745 target_cpu_default2="TARGET_CPU_$with_cpu"
3746 ;;
3747
3748 xyes | xno)
3749 echo "--with-cpu must be passed a value" 1>&2
3750 exit 1
3751 ;;
3752
3753 *)
75bffa71 3754 if test x$pass2done = xyes
956d6950
JL
3755 then
3756 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3757 exit 1
3758 fi
3759 ;;
3760 esac
3761 ;;
3762
46f18e7b 3763 mips*-*-ecoff* | mips*-*-elf*)
75bffa71 3764 if test x$gas = xyes
46f18e7b 3765 then
75bffa71 3766 if test x$gnu_ld = xyes
46f18e7b 3767 then
e7651ec5 3768 target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
46f18e7b 3769 else
e7651ec5 3770 target_cpu_default2="MASK_GAS"
46f18e7b
RK
3771 fi
3772 fi
3773 ;;
3774 mips*-*-*)
75bffa71 3775 if test x$gas = xyes
46f18e7b 3776 then
e7651ec5 3777 target_cpu_default2="MASK_GAS"
46f18e7b
RK
3778 fi
3779 ;;
3780 powerpc*-*-* | rs6000-*-*)
3781 case "x$with_cpu" in
3782 x)
3783 ;;
3784
3785 xcommon | xpower | xpower2 | xpowerpc | xrios \
52cddadb
MM
3786 | xrios1 | xrios2 | xrsc | xrsc1 \
3787 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
507ba956 3788 | xec603e | x740 | x750 | x401 \
52cddadb 3789 | x403 | x505 | x801 | x821 | x823 | x860)
f24b370a 3790 target_cpu_default2="\"$with_cpu\""
46f18e7b
RK
3791 ;;
3792
3793 xyes | xno)
3794 echo "--with-cpu must be passed a value" 1>&2
3795 exit 1
3796 ;;
3797
3798 *)
75bffa71 3799 if test x$pass2done = xyes
956d6950
JL
3800 then
3801 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3802 exit 1
3803 fi
46f18e7b
RK
3804 ;;
3805 esac
3806 ;;
3807 sparc*-*-*)
3808 case ".$with_cpu" in
3809 .)
3810 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
3811 ;;
8947065c 3812 .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
46f18e7b
RK
3813 target_cpu_default2="TARGET_CPU_$with_cpu"
3814 ;;
3815 *)
75bffa71 3816 if test x$pass2done = xyes
956d6950
JL
3817 then
3818 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3819 exit 1
3820 fi
46f18e7b
RK
3821 ;;
3822 esac
3823 ;;
3824 esac
3825
75bffa71 3826 if test "$target_cpu_default2" != ""
46f18e7b 3827 then
75bffa71 3828 if test "$target_cpu_default" != ""
46f18e7b
RK
3829 then
3830 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3831 else
3832 target_cpu_default=$target_cpu_default2
3833 fi
3834 fi
3835
3836 # No need for collect2 if we have the GNU linker.
d460fb3c
JM
3837 # Actually, there is now; GNU ld doesn't handle the EH info or
3838 # collecting for shared libraries.
ca8c3b37
JM
3839 #case x$gnu_ld in
3840 #xyes)
3841 # use_collect2=
3842 # ;;
3843 #esac
46f18e7b
RK
3844
3845# Save data on machine being used to compile GCC in build_xm_file.
3846# Save data on host machine in vars host_xm_file and host_xmake_file.
75bffa71 3847 if test x$pass1done = x
46f18e7b 3848 then
75bffa71 3849 if test x"$xm_file" = x
46f18e7b
RK
3850 then build_xm_file=$cpu_type/xm-$cpu_type.h
3851 else build_xm_file=$xm_file
3852 fi
61536478 3853 build_xm_defines=$xm_defines
46f18e7b
RK
3854 build_install_headers_dir=$install_headers_dir
3855 build_exeext=$exeext
3856 pass1done=yes
3857 else
75bffa71 3858 if test x$pass2done = x
46f18e7b 3859 then
75bffa71 3860 if test x"$xm_file" = x
46f18e7b
RK
3861 then host_xm_file=$cpu_type/xm-$cpu_type.h
3862 else host_xm_file=$xm_file
3863 fi
61536478 3864 host_xm_defines=$xm_defines
75bffa71 3865 if test x"$xmake_file" = x
46f18e7b
RK
3866 then xmake_file=$cpu_type/x-$cpu_type
3867 fi
3868 host_xmake_file="$xmake_file"
3869 host_truncate_target=$truncate_target
3870 host_extra_gcc_objs=$extra_gcc_objs
3871 host_extra_objs=$extra_host_objs
6e26218f 3872 host_exeext=$exeext
46f18e7b
RK
3873 pass2done=yes
3874 fi
3875 fi
3876done
3877
3878extra_objs="${host_extra_objs} ${extra_objs}"
3879
3880# Default the target-machine variables that were not explicitly set.
75bffa71 3881if test x"$tm_file" = x
46f18e7b
RK
3882then tm_file=$cpu_type/$cpu_type.h; fi
3883
75bffa71 3884if test x$extra_headers = x
46f18e7b
RK
3885then extra_headers=; fi
3886
75bffa71 3887if test x"$xm_file" = x
46f18e7b
RK
3888then xm_file=$cpu_type/xm-$cpu_type.h; fi
3889
75bffa71 3890if test x$md_file = x
e98e406f 3891then md_file=$cpu_type/$cpu_type.md; fi
46f18e7b 3892
75bffa71 3893if test x$out_file = x
46f18e7b
RK
3894then out_file=$cpu_type/$cpu_type.c; fi
3895
75bffa71 3896if test x"$tmake_file" = x
46f18e7b
RK
3897then tmake_file=$cpu_type/t-$cpu_type
3898fi
3899
90e6a802 3900if test x"$dwarf2" = xyes
756ee602 3901then tm_file="$tm_file tm-dwarf2.h"
90e6a802
RL
3902fi
3903
75bffa71 3904if test x$float_format = x
46f18e7b
RK
3905then float_format=i64
3906fi
3907
027ea2a7
JW
3908if test $float_format = none
3909then float_h_file=Makefile.in
3910else float_h_file=float-$float_format.h
3911fi
3912
9fc9b82a 3913# Handle cpp installation.
3ecc3258 3914if test x$enable_cpp != xno
9fc9b82a
L
3915then
3916 tmake_file="$tmake_file t-install-cpp"
3917fi
3918
46f18e7b
RK
3919# Say what files are being used for the output code and MD file.
3920echo "Using \`$srcdir/config/$out_file' to output insns."
3921echo "Using \`$srcdir/config/$md_file' as machine description file."
3922
3923count=a
3924for f in $tm_file; do
3925 count=${count}x
3926done
75bffa71 3927if test $count = ax; then
46f18e7b
RK
3928 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3929else
3930 echo "Using the following target machine macro files:"
3931 for f in $tm_file; do
3932 echo " $srcdir/config/$f"
3933 done
3934fi
3935
3936count=a
3937for f in $host_xm_file; do
3938 count=${count}x
3939done
75bffa71 3940if test $count = ax; then
46f18e7b
RK
3941 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3942else
3943 echo "Using the following host machine macro files:"
3944 for f in $host_xm_file; do
3945 echo " $srcdir/config/$f"
3946 done
3947fi
3948
75bffa71 3949if test "$host_xm_file" != "$build_xm_file"; then
46f18e7b
RK
3950 count=a
3951 for f in $build_xm_file; do
3952 count=${count}x
3953 done
75bffa71 3954 if test $count = ax; then
46f18e7b
RK
3955 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3956 else
3957 echo "Using the following build machine macro files:"
3958 for f in $build_xm_file; do
3959 echo " $srcdir/config/$f"
3960 done
3961 fi
3962fi
3963
75bffa71
ILT
3964if test x$thread_file = x; then
3965 if test x$target_thread_file != x; then
a851212a
JW
3966 thread_file=$target_thread_file
3967 else
3968 thread_file='single'
3969 fi
46f18e7b 3970fi
46f18e7b
RK
3971
3972# Set up the header files.
3973# $links is the list of header files to create.
3974# $vars is the list of shell variables with file names to include.
b7cb92ad 3975# auto-host.h is the file containing items generated by autoconf and is
e9a25f70 3976# the first file included by config.h.
61536478 3977null_defines=
64ccbc99 3978host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
db81d74a 3979
b7cb92ad 3980# If host=build, it is correct to have hconfig include auto-host.h
db81d74a
RH
3981# as well. If host!=build, we are in error and need to do more
3982# work to find out the build config parameters.
75bffa71 3983if test x$host = x$build
db81d74a 3984then
64ccbc99 3985 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
b7cb92ad
JL
3986else
3987 # We create a subdir, then run autoconf in the subdir.
3988 # To prevent recursion we set host and build for the new
3989 # invocation of configure to the build for this invocation
3990 # of configure.
3991 tempdir=build.$$
3992 rm -rf $tempdir
3993 mkdir $tempdir
3994 cd $tempdir
3995 case ${srcdir} in
3996 /*) realsrcdir=${srcdir};;
3997 *) realsrcdir=../${srcdir};;
3998 esac
fe81dd69 3999 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
b7cb92ad
JL
4000 --target=$target --host=$build --build=$build
4001
4002 # We just finished tests for the build machine, so rename
4003 # the file auto-build.h in the gcc directory.
4004 mv auto-host.h ../auto-build.h
4005 cd ..
4006 rm -rf $tempdir
64ccbc99 4007 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
db81d74a
RH
4008fi
4009
0056a9b5
KG
4010xm_file="gansidecl.h ${xm_file}"
4011tm_file="gansidecl.h ${tm_file}"
4012
6baf1cc8
BS
4013vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
4014links="config.h tm.h tm_p.h tconfig.h hconfig.h"
4015defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
46f18e7b
RK
4016
4017rm -f config.bak
75bffa71 4018if test -f config.status; then mv -f config.status config.bak; fi
46f18e7b
RK
4019
4020# Make the links.
75bffa71 4021while test -n "$vars"
46f18e7b 4022do
46f18e7b
RK
4023 set $vars; var=$1; shift; vars=$*
4024 set $links; link=$1; shift; links=$*
61536478 4025 set $defines; define=$1; shift; defines=$*
46f18e7b
RK
4026
4027 rm -f $link
6baf1cc8
BS
4028 # Make sure the file is created, even if it is empty.
4029 echo >$link
46f18e7b
RK
4030
4031 # Define TARGET_CPU_DEFAULT if the system wants one.
4032 # This substitutes for lots of *.h files.
75bffa71 4033 if test "$target_cpu_default" != "" -a $link = tm.h
46f18e7b 4034 then
8fbf199e 4035 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
46f18e7b
RK
4036 fi
4037
4038 for file in `eval echo '$'$var`; do
ab87f8c8
JL
4039 case $file in
4040 auto-config.h)
4041 ;;
4042 *)
4043 echo '#ifdef IN_GCC' >>$link
4044 ;;
4045 esac
46f18e7b 4046 echo "#include \"$file\"" >>$link
ab87f8c8
JL
4047 case $file in
4048 auto-config.h)
4049 ;;
4050 *)
4051 echo '#endif' >>$link
4052 ;;
4053 esac
46f18e7b 4054 done
61536478
JL
4055
4056 for def in `eval echo '$'$define`; do
4057 echo "#ifndef $def" >>$link
4058 echo "#define $def" >>$link
4059 echo "#endif" >>$link
4060 done
46f18e7b
RK
4061done
4062
4063# Truncate the target if necessary
75bffa71 4064if test x$host_truncate_target != x; then
46f18e7b
RK
4065 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4066fi
4067
f1943b77 4068# Get the version trigger filename from the toplevel
75bffa71 4069if test "${with_gcc_version_trigger+set}" = set; then
f1943b77
MH
4070 gcc_version_trigger=$with_gcc_version_trigger
4071else
4072 gcc_version_trigger=${srcdir}/version.c
4073fi
75bffa71 4074changequote(,)dnl
4746ee26 4075gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
75bffa71 4076changequote([,])dnl
46f18e7b 4077
ab87f8c8
JL
4078# Internationalization
4079PACKAGE=gcc
4080VERSION="$gcc_version"
119d24d1
KG
4081AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
4082 [Define to the name of the distribution.])
4083AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
4084 [Define to the version of the distribution.])
ab87f8c8
JL
4085AC_SUBST(PACKAGE)
4086AC_SUBST(VERSION)
4087
4088ALL_LINGUAS="en_UK"
4089
4090# NLS support is still experimental, so disable it by default for now.
4091AC_ARG_ENABLE(nls,
4092 [ --enable-nls use Native Language Support (disabled by default)],
4093 , enable_nls=no)
4094
4095AM_GNU_GETTEXT
4096XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
4097
f4ab28e3
MK
4098# Windows32 Registry support for specifying GCC installation paths.
4099AC_ARG_ENABLE(win32-registry,
4100[ --disable-win32-registry
4101 Disable lookup of installation paths in the
4102 Registry on Windows hosts.
4103 --enable-win32-registry Enable registry lookup (default).
4104 --enable-win32-registry=KEY
4105 Use KEY instead of GCC version as the last portion
4106 of the registry key.],,)
4107
4108AC_MSG_CHECKING(whether windows registry support is requested)
4109if test x$enable_win32_registry != xno; then
119d24d1
KG
4110 AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
4111[Define to 1 if installation paths should be looked up in Windows32
91029a29 4112 Registry. Ignored on non windows32 hosts.])
f4ab28e3
MK
4113 AC_MSG_RESULT(yes)
4114else
4115 AC_MSG_RESULT(no)
4116fi
4117
4118# Check if user specified a different registry key.
4119case x${enable_win32_registry} in
4120x | xyes)
4121 # default.
4122 gcc_cv_win32_registry_key="$VERSION"
4123 ;;
4124xno)
4125 # no registry lookup.
4126 gcc_cv_win32_registry_key=''
4127 ;;
4128*)
4129 # user-specified key.
4130 gcc_cv_win32_registry_key="$enable_win32_registry"
4131 ;;
4132esac
4133
4134if test x$enable_win32_registry != xno; then
4135 AC_MSG_CHECKING(registry key on windows hosts)
119d24d1
KG
4136 AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key",
4137 [Define to be the last portion of registry key on windows hosts.])
f4ab28e3
MK
4138 AC_MSG_RESULT($gcc_cv_win32_registry_key)
4139fi
4140
7fa10b25
RK
4141# Get an absolute path to the GCC top-level source directory
4142holddir=`pwd`
4143cd $srcdir
4144topdir=`pwd`
4145cd $holddir
4146
af5e4ada 4147# Conditionalize the makefile for this host machine.
94f42018
DE
4148# Make-host contains the concatenation of all host makefile fragments
4149# [there can be more than one]. This file is built by configure.frag.
4150host_overrides=Make-host
af5e4ada 4151dep_host_xmake_file=
94f42018
DE
4152for f in .. ${host_xmake_file}
4153do
75bffa71 4154 if test -f ${srcdir}/config/$f
94f42018
DE
4155 then
4156 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
4157 fi
4158done
46f18e7b 4159
af5e4ada 4160# Conditionalize the makefile for this target machine.
94f42018
DE
4161# Make-target contains the concatenation of all host makefile fragments
4162# [there can be more than one]. This file is built by configure.frag.
4163target_overrides=Make-target
af5e4ada 4164dep_tmake_file=
94f42018
DE
4165for f in .. ${tmake_file}
4166do
75bffa71 4167 if test -f ${srcdir}/config/$f
94f42018
DE
4168 then
4169 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
4170 fi
4171done
5891b37d 4172
af5e4ada
DE
4173# If the host doesn't support symlinks, modify CC in
4174# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
4175# Otherwise, we can use "CC=$(CC)".
4176rm -f symtest.tem
61536478 4177if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
af5e4ada
DE
4178then
4179 cc_set_by_configure="\$(CC)"
5aa82ace 4180 quoted_cc_set_by_configure="\$(CC)"
af5e4ada
DE
4181 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
4182else
61536478
JL
4183 rm -f symtest.tem
4184 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
4185 then
4186 symbolic_link="cp -p"
4187 else
4188 symbolic_link="cp"
4189 fi
af5e4ada 4190 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
5aa82ace 4191 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
af5e4ada
DE
4192 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
4193fi
4194rm -f symtest.tem
5891b37d 4195
af5e4ada 4196out_object_file=`basename $out_file .c`.o
5891b37d 4197
af5e4ada
DE
4198tm_file_list=
4199for f in $tm_file; do
64ccbc99
KG
4200 case $f in
4201 gansidecl.h )
4202 tm_file_list="${tm_file_list} $f" ;;
4203 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
4204 esac
af5e4ada 4205done
46f18e7b 4206
af5e4ada
DE
4207host_xm_file_list=
4208for f in $host_xm_file; do
64ccbc99
KG
4209 case $f in
4210 auto-host.h | gansidecl.h | hwint.h )
4211 host_xm_file_list="${host_xm_file_list} $f" ;;
4212 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
4213 esac
af5e4ada
DE
4214done
4215
4216build_xm_file_list=
4217for f in $build_xm_file; do
64ccbc99
KG
4218 case $f in
4219 auto-build.h | auto-host.h | gansidecl.h | hwint.h )
4220 build_xm_file_list="${build_xm_file_list} $f" ;;
4221 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
4222 esac
af5e4ada 4223done
46f18e7b 4224
af5e4ada
DE
4225# Define macro CROSS_COMPILE in compilation
4226# if this is a cross-compiler.
4227# Also use all.cross instead of all.internal
4228# and add cross-make to Makefile.
571a8de5 4229cross_overrides="/dev/null"
75bffa71 4230if test x$host != x$target
af5e4ada
DE
4231then
4232 cross_defines="CROSS=-DCROSS_COMPILE"
4233 cross_overrides="${topdir}/cross-make"
4234fi
46f18e7b 4235
af5e4ada
DE
4236# When building gcc with a cross-compiler, we need to fix a few things.
4237# This must come after cross-make as we want all.build to override
4238# all.cross.
571a8de5 4239build_overrides="/dev/null"
75bffa71 4240if test x$build != x$host
af5e4ada
DE
4241then
4242 build_overrides="${topdir}/build-make"
4243fi
46f18e7b 4244
ae3a15bb
DE
4245# Expand extra_headers to include complete path.
4246# This substitutes for lots of t-* files.
4247extra_headers_list=
75bffa71 4248if test "x$extra_headers" = x
ae3a15bb
DE
4249then true
4250else
4251 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
4252 for file in $extra_headers;
4253 do
4254 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
4255 done
4256fi
4257
75bffa71 4258if test x$use_collect2 = xno; then
2ce3c6c6
JM
4259 use_collect2=
4260fi
4261
af5e4ada
DE
4262# Add a definition of USE_COLLECT2 if system wants one.
4263# Also tell toplev.c what to do.
4264# This substitutes for lots of t-* files.
75bffa71 4265if test x$use_collect2 = x
af5e4ada
DE
4266then
4267 will_use_collect2=
4268 maybe_use_collect2=
4269else
10da1131 4270 will_use_collect2="collect2"
af5e4ada
DE
4271 maybe_use_collect2="-DUSE_COLLECT2"
4272fi
4273
4274# NEED TO CONVERT
4275# Set MD_DEPS if the real md file is in md.pre-cpp.
4276# Set MD_CPP to the cpp to pass the md file through. Md files use ';'
4277# for line oriented comments, so we must always use a GNU cpp. If
4278# building gcc with a cross compiler, use the cross compiler just
4279# built. Otherwise, we can use the cpp just built.
4280md_file_sub=
75bffa71 4281if test "x$md_cppflags" = x
af5e4ada
DE
4282then
4283 md_file_sub=$srcdir/config/$md_file
4284else
4285 md_file=md
4286fi
4287
4288# If we have gas in the build tree, make a link to it.
75bffa71 4289if test -f ../gas/Makefile; then
6e26218f 4290 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
af5e4ada
DE
4291fi
4292
4b95eb49 4293# If we have nm in the build tree, make a link to it.
75bffa71 4294if test -f ../binutils/Makefile; then
4b95eb49
JL
4295 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
4296fi
4297
af5e4ada 4298# If we have ld in the build tree, make a link to it.
75bffa71
ILT
4299if test -f ../ld/Makefile; then
4300# if test x$use_collect2 = x; then
6e26218f 4301# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
aa32d841 4302# else
6e26218f 4303 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
aa32d841 4304# fi
af5e4ada
DE
4305fi
4306
9e423e6d
JW
4307# Figure out what assembler alignment features are present.
4308AC_MSG_CHECKING(assembler alignment features)
4309gcc_cv_as=
4310gcc_cv_as_alignment_features=
a2f319ea 4311gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
3ccc3a56
AO
4312if test -x "$DEFAULT_ASSEMBLER"; then
4313 gcc_cv_as="$DEFAULT_ASSEMBLER"
4314elif test -x "$AS"; then
4315 gcc_cv_as="$AS"
ab339d62 4316elif test -x as$host_exeext; then
9e423e6d
JW
4317 # Build using assembler in the current directory.
4318 gcc_cv_as=./as$host_exeext
5585c1bc 4319elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
9e423e6d 4320 # Single tree build which includes gas.
a2c9d57c 4321 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
9e423e6d 4322 do
75bffa71
ILT
4323changequote(,)dnl
4324 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
4325changequote([,])dnl
4326 if test x$gcc_cv_gas_version != x; then
9e423e6d
JW
4327 break
4328 fi
4329 done
75bffa71
ILT
4330changequote(,)dnl
4331 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
4332 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
4333changequote([,])dnl
4334 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
0b9d02c6
JL
4335 # Gas version 2.6 and later support for .balign and .p2align.
4336 # bytes to skip when using .p2align.
75bffa71 4337 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
4338 gcc_cv_as_alignment_features=".balign and .p2align"
4339 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4340 fi
4341 # Gas version 2.8 and later support specifying the maximum
4342 # bytes to skip when using .p2align.
75bffa71 4343 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
4344 gcc_cv_as_alignment_features=".p2align including maximum skip"
4345 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4346 fi
9e423e6d 4347 fi
75bffa71 4348elif test x$host = x$target; then
9e423e6d 4349 # Native build.
779243f7
JL
4350 # Search the same directories that the installed compiler will
4351 # search. Else we may find the wrong assembler and lose. If we
4352 # do not find a suitable assembler binary, then try the user's
4353 # path.
4354 #
4355 # Also note we have to check MD_EXEC_PREFIX before checking the
4356 # user's path. Unfortunately, there is no good way to get at the
4357 # value of MD_EXEC_PREFIX here. So we do a brute force search
4358 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
4359 # to be fixed as part of the make/configure rewrite too.
4360
4361 if test "x$exec_prefix" = xNONE; then
4362 if test "x$prefix" = xNONE; then
4363 test_prefix=/usr/local
4364 else
4365 test_prefix=$prefix
4366 fi
4367 else
4368 test_prefix=$exec_prefix
4369 fi
4370
4371 # If the loop below does not find an assembler, then use whatever
4372 # one we can find in the users's path.
4373 # user's path.
4374 as=as$host_exeext
4375
4376 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
4377 $test_prefix/lib/gcc-lib/$target \
4378 /usr/lib/gcc/$target/$gcc_version \
4379 /usr/lib/gcc/$target \
4380 $test_prefix/$target/bin/$target/$gcc_version \
4381 $test_prefix/$target/bin \
4382 /usr/libexec \
4383 /usr/ccs/gcc \
4384 /usr/ccs/bin \
4385 /udk/usr/ccs/bin \
4386 /bsd43/usr/lib/cmplrs/cc \
4387 /usr/cross64/usr/bin \
4388 /usr/lib/cmplrs/cc \
4389 /sysv/usr/lib/cmplrs/cc \
4390 /svr4/usr/lib/cmplrs/cc \
4391 /usr/bin"
4392
4393 for dir in $test_dirs; do
4394 if test -f $dir/as$host_exeext; then
4395 gcc_cv_as=$dir/as$host_exeext
4396 break;
4397 fi
4398 done
9e423e6d 4399fi
75bffa71 4400if test x$gcc_cv_as != x; then
00ccc16d
JL
4401 # Check if we have .balign and .p2align
4402 echo ".balign 4" > conftest.s
4403 echo ".p2align 2" >> conftest.s
4404 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4405 gcc_cv_as_alignment_features=".balign and .p2align"
4406 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4407 fi
4408 rm -f conftest.s conftest.o
9e423e6d
JW
4409 # Check if specifying the maximum bytes to skip when
4410 # using .p2align is supported.
4411 echo ".p2align 4,,7" > conftest.s
4412 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4413 gcc_cv_as_alignment_features=".p2align including maximum skip"
4414 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4415 fi
4416 rm -f conftest.s conftest.o
4417fi
4418AC_MSG_RESULT($gcc_cv_as_alignment_features)
4419
d1accaa3
JJ
4420AC_MSG_CHECKING(assembler subsection support)
4421gcc_cv_as_subsections=
4422if test x$gcc_cv_as != x; then
4423 # Check if we have .subsection
4424 echo ".subsection 1" > conftest.s
4425 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4426 gcc_cv_as_subsections=".subsection"
4427 if test -x nm$host_exeext; then
4428 gcc_cv_nm=./nm$host_exeext
4429 elif test x$host = x$target; then
4430 # Native build.
4431 gcc_cv_nm=nm$host_exeext
4432 fi
4433 if test x$gcc_cv_nm != x; then
4434 cat > conftest.s <<EOF
4435conftest_label1: .word 0
4436.subsection -1
4437conftest_label2: .word 0
4438.previous
4439EOF
4440 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4441 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
4442 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
1b015bec
AO
4443 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
4444 :
4445 else
d1accaa3 4446 gcc_cv_as_subsections="working .subsection -1"
119d24d1
KG
4447 AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1,
4448[Define if your assembler supports .subsection and .subsection -1 starts
91029a29 4449 emitting at the beginning of your section.])
d1accaa3
JJ
4450 fi
4451 fi
4452 fi
4453 fi
4454 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4455fi
4456AC_MSG_RESULT($gcc_cv_as_subsections)
4457
12822146
JL
4458AC_MSG_CHECKING(assembler weak support)
4459gcc_cv_as_weak=
4460if test x$gcc_cv_as != x; then
4461 # Check if we have .weak
4462 echo " .weak foobar" > conftest.s
4463 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
119d24d1
KG
4464 AC_DEFINE(HAVE_GAS_WEAK, 1,
4465 [Define if your assembler supports .weak.])
12822146
JL
4466 gcc_cv_as_weak="yes"
4467 fi
4468 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4469fi
4470AC_MSG_RESULT($gcc_cv_as_weak)
4471
6a9c5260
UD
4472AC_MSG_CHECKING(assembler hidden support)
4473gcc_cv_as_hidden=
4474if test x$gcc_cv_as != x; then
4475 # Check if we have .hidden
4476 echo " .hidden foobar" > conftest.s
4477 echo "foobar:" >> conftest.s
4478 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
119d24d1
KG
4479 AC_DEFINE(HAVE_GAS_HIDDEN, 1,
4480 [Define if your assembler supports .hidden.])
6a9c5260
UD
4481 gcc_cv_as_hidden="yes"
4482 fi
4483 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4484fi
4485AC_MSG_RESULT($gcc_cv_as_hidden)
4486
1cb36a98
RH
4487case "$target" in
4488 sparc*-*-*)
5b68c389
AO
4489 AC_CACHE_CHECK([assembler .register pseudo-op support],
4490 gcc_cv_as_register_pseudo_op, [
4491 gcc_cv_as_register_pseudo_op=unknown
4492 if test x$gcc_cv_as != x; then
4493 # Check if we have .register
4494 echo ".register %g2, #scratch" > conftest.s
4495 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
1cb36a98 4496 gcc_cv_as_register_pseudo_op=yes
5b68c389
AO
4497 else
4498 gcc_cv_as_register_pseudo_op=no
4499 fi
4500 rm -f conftest.s conftest.o
1cb36a98 4501 fi
5b68c389
AO
4502 ])
4503 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
119d24d1
KG
4504 AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
4505 [Define if your assembler supports .register.])
1cb36a98 4506 fi
1cb36a98 4507
5b68c389
AO
4508 case "$tm_file" in
4509 *64*)
4510 AC_CACHE_CHECK([for 64 bit support in assembler ($gcc_cv_as)],
4511 gcc_cv_as_flags64, [
4512 if test -n "$gcc_cv_as"; then
4513 echo ".xword foo" > conftest.s
4514 gcc_cv_as_flags64=no
8a90b95d 4515 for flag in "-xarch=v9" "-64 -Av9"; do
5b68c389
AO
4516 if $gcc_cv_as $flag -o conftest.o conftest.s \
4517 > /dev/null 2>&1; then
4518 gcc_cv_as_flags64=$flag
4519 break
4520 fi
4521 done
4522 rm -f conftest.s conftest.o
4523 else
4524 if test "$gas" = yes; then
4525 gcc_cv_as_flags64="-64 -Av9"
4526 else
4527 gcc_cv_as_flags64="-xarch=v9"
4528 fi
1cb36a98 4529 fi
5b68c389
AO
4530 ])
4531 if test "x$gcc_cv_as_flags64" = xno; then
4532changequote(, )
4533 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4534 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4535changequote([, ])
4536 else
119d24d1
KG
4537 AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64",
4538 [Define if the assembler supports 64bit sparc.])
1cb36a98 4539 fi
5b68c389
AO
4540 ;;
4541 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
4542 ;;
4543 esac
4544
4545 if test "x$gcc_cv_as_flags64" != xno; then
4546 AC_CACHE_CHECK([for assembler offsetable %lo() support],
4547 gcc_cv_as_offsetable_lo10, [
4548 gcc_cv_as_offsetable_lo10=unknown
4549 if test "x$gcc_cv_as" != x; then
4550 # Check if assembler has offsetable %lo()
4551 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
4552 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
4553 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
4554 > /dev/null 2>&1 &&
4555 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
4556 > /dev/null 2>&1; then
4557 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
4558 gcc_cv_as_offsetable_lo10=no
4559 else
4560 gcc_cv_as_offsetable_lo10=yes
4561 fi
4562 else
4563 gcc_cv_as_offsetable_lo10=no
1cb36a98 4564 fi
5b68c389
AO
4565 rm -f conftest.s conftest.o conftest1.s conftest1.o
4566 fi
4567 ])
4568 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
119d24d1
KG
4569 AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
4570 [Define if your assembler supports offsetable %lo().])
1cb36a98 4571 fi
1cb36a98 4572 fi
1cb36a98
RH
4573 ;;
4574
4575changequote(,)dnl
4576 i[34567]86-*-*)
4577changequote([,])dnl
4578 AC_MSG_CHECKING(assembler instructions)
4579 gcc_cv_as_instructions=
4580 if test x$gcc_cv_as != x; then
53b5ce19
JW
4581 set "filds fists" "filds mem; fists mem"
4582 while test $# -gt 0
4583 do
4584 echo "$2" > conftest.s
4585 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4586 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
4587 AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$1" | tr '[a-z ]' '[A-Z_]'`)
4588 fi
4589 shift 2
4590 done
4591 rm -f conftest.s conftest.o
1cb36a98
RH
4592 fi
4593 AC_MSG_RESULT($gcc_cv_as_instructions)
4594 ;;
4595esac
53b5ce19 4596
571a8de5 4597# Figure out what language subdirectories are present.
71205e0b
MH
4598# Look if the user specified --enable-languages="..."; if not, use
4599# the environment variable $LANGUAGES if defined. $LANGUAGES might
4600# go away some day.
4601if test x"${enable_languages+set}" != xset; then
4602 if test x"${LANGUAGES+set}" = xset; then
4603 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
4604 else
4605 enable_languages=all
4606 fi
4607fi
571a8de5
DE
4608subdirs=
4609for lang in ${srcdir}/*/config-lang.in ..
4610do
4611 case $lang in
4612 ..) ;;
4613 # The odd quoting in the next line works around
4614 # an apparent bug in bash 1.12 on linux.
75bffa71
ILT
4615changequote(,)dnl
4616 ${srcdir}/[*]/config-lang.in) ;;
71205e0b
MH
4617 *)
4618 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
4619 if test "x$lang_alias" = x
4620 then
4621 echo "$lang doesn't set \$language." 1>&2
4622 exit 1
4623 fi
4624 if test x"${enable_languages}" = xall; then
4625 add_this_lang=yes
4626 else
4627 case "${enable_languages}" in
4628 ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
4629 add_this_lang=yes
4630 ;;
4631 * )
4632 add_this_lang=no
4633 ;;
4634 esac
4635 fi
4636 if test x"${add_this_lang}" = xyes; then
4637 case $lang in
4638 ${srcdir}/ada/config-lang.in)
4639 if test x$gnat = xyes ; then
4640 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4641 fi
4642 ;;
4643 *)
4644 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4645 ;;
4646 esac
4647 fi
4648 ;;
75bffa71 4649changequote([,])dnl
571a8de5
DE
4650 esac
4651done
4652
f24af81b
TT
4653# Make gthr-default.h if we have a thread file.
4654gthread_flags=
75bffa71 4655if test $thread_file != single; then
f24af81b 4656 rm -f gthr-default.h
db0d1ed9 4657 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
f24af81b
TT
4658 gthread_flags=-DHAVE_GTHR_DEFAULT
4659fi
4660AC_SUBST(gthread_flags)
4661
81bf3d9e
RH
4662# Find out what GC implementation we want, or may, use.
4663AC_ARG_WITH(gc,
4664[ --with-gc={simple,page} Choose the garbage collection mechanism to use
4665 with the compiler.],
4666[case "$withval" in
4667 simple | page)
4668 GGC=ggc-$withval
4669 ;;
4670 *)
4671 AC_MSG_ERROR([$withval is an invalid option to --with-gc])
4672 ;;
4673esac],
4acab94b
AO
4674[if test $ac_cv_func_mmap_anywhere = yes \
4675 || test $ac_cv_func_valloc = yes; then
005537df 4676 GGC=ggc-page
81bf3d9e
RH
4677else
4678 GGC=ggc-simple
4679fi])
4680AC_SUBST(GGC)
4681echo "Using $GGC for garbage collection."
4682
7441a352
NS
4683# Build a new-abi (c++) system
4684AC_ARG_ENABLE(new-gxx-abi,
4685[ --enable-new-gxx-abi
4686 select the new abi for g++. You must select an ABI
4687 at configuration time, so that the correct runtime
4688 support is built. You cannot mix ABIs.],
119d24d1
KG
4689[AC_DEFINE(ENABLE_NEW_GXX_ABI, 1,
4690 [Define if you want to always select the new-abi for g++.])
7441a352
NS
4691GXX_ABI_FLAG='-fnew-abi'
4692echo "Building a new-abi g++ compiler."
4693])
4694AC_SUBST(GXX_ABI_FLAG)
4695
7822500a
BK
4696# Build a new-libstdc++ system (ie libstdc++-v3)
4697AC_MSG_CHECKING([for libstdc++ to install])
4698AC_ARG_ENABLE(libstdcxx-v3,
4699[ --enable-libstdcxx-v3
4700 enable libstdc++-v3 for building and installation],
4701 [enable_libstdcxx_v3=yes], [enable_libstdcxx_v3=no])
4702
4703if test x$enable_libstdcxx_v3 = xyes; then
4704 AC_MSG_RESULT(v3)
119d24d1 4705 ac_esn=1
7822500a
BK
4706else
4707 AC_MSG_RESULT(v2)
119d24d1 4708 ac_esn=0
7822500a 4709fi
119d24d1
KG
4710AC_DEFINE_UNQUOTED(ENABLE_STD_NAMESPACE, $ac_esn,
4711 [Define to 1 if you want to enable namespaces (-fhonor-std) by default.])
7822500a 4712
571a8de5
DE
4713# Make empty files to contain the specs and options for each language.
4714# Then add #include lines to for a compiler that has specs and/or options.
4715
4716lang_specs_files=
4717lang_options_files=
3103b7db
ML
4718lang_tree_files=
4719rm -f specs.h options.h gencheck.h
4720touch specs.h options.h gencheck.h
571a8de5
DE
4721for subdir in . $subdirs
4722do
75bffa71 4723 if test -f $srcdir/$subdir/lang-specs.h; then
571a8de5
DE
4724 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
4725 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
4726 fi
75bffa71 4727 if test -f $srcdir/$subdir/lang-options.h; then
571a8de5
DE
4728 echo "#include \"$subdir/lang-options.h\"" >>options.h
4729 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
4730 fi
3103b7db
ML
4731 if test -f $srcdir/$subdir/$subdir-tree.def; then
4732 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
4733 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
4734 fi
571a8de5
DE
4735done
4736
4737# These (without "all_") are set in each config-lang.in.
4738# `language' must be a single word so is spelled singularly.
4739all_languages=
4740all_boot_languages=
4741all_compilers=
4742all_stagestuff=
4743all_diff_excludes=
3ec83fc2 4744all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
571a8de5
DE
4745# List of language makefile fragments.
4746all_lang_makefiles=
4747all_headers=
4748all_lib2funcs=
4749
4750# Add the language fragments.
4751# Languages are added via two mechanisms. Some information must be
4752# recorded in makefile variables, these are defined in config-lang.in.
4753# We accumulate them and plug them into the main Makefile.
4754# The other mechanism is a set of hooks for each of the main targets
4755# like `clean', `install', etc.
4756
4757language_fragments="Make-lang"
4758language_hooks="Make-hooks"
0280cf84 4759oldstyle_subdirs=
571a8de5
DE
4760
4761for s in .. $subdirs
4762do
75bffa71 4763 if test $s != ".."
571a8de5
DE
4764 then
4765 language=
4766 boot_language=
4767 compilers=
4768 stagestuff=
4769 diff_excludes=
4770 headers=
0280cf84 4771 outputs=
571a8de5
DE
4772 lib2funcs=
4773 . ${srcdir}/$s/config-lang.in
75bffa71 4774 if test "x$language" = x
571a8de5
DE
4775 then
4776 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
4777 exit 1
4778 fi
4779 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
4780 all_languages="$all_languages $language"
75bffa71 4781 if test "x$boot_language" = xyes
571a8de5
DE
4782 then
4783 all_boot_languages="$all_boot_languages $language"
4784 fi
4785 all_compilers="$all_compilers $compilers"
4786 all_stagestuff="$all_stagestuff $stagestuff"
4787 all_diff_excludes="$all_diff_excludes $diff_excludes"
4788 all_headers="$all_headers $headers"
0280cf84 4789 all_outputs="$all_outputs $outputs"
75bffa71 4790 if test x$outputs = x
0280cf84
PB
4791 then
4792 oldstyle_subdirs="$oldstyle_subdirs $s"
4793 fi
571a8de5
DE
4794 all_lib2funcs="$all_lib2funcs $lib2funcs"
4795 fi
4796done
4797
4798# Since we can't use `::' targets, we link each language in
4799# with a set of hooks, reached indirectly via lang.${target}.
4800
4801rm -f Make-hooks
4802touch Make-hooks
4803target_list="all.build all.cross start.encap rest.encap \
4804 info dvi \
4805 install-normal install-common install-info install-man \
4806 uninstall distdir \
4807 mostlyclean clean distclean extraclean maintainer-clean \
4808 stage1 stage2 stage3 stage4"
4809for t in $target_list
4810do
4811 x=
ab87f8c8 4812 for lang in .. $all_languages
571a8de5 4813 do
ab87f8c8
JL
4814 if test $lang != ".."; then
4815 x="$x $lang.$t"
571a8de5
DE
4816 fi
4817 done
4818 echo "lang.$t: $x" >> Make-hooks
4819done
4820
296e46bd
DE
4821# If we're not building in srcdir, create .gdbinit.
4822
75bffa71 4823if test ! -f Makefile.in; then
296e46bd
DE
4824 echo "dir ." > .gdbinit
4825 echo "dir ${srcdir}" >> .gdbinit
75bffa71 4826 if test x$gdb_needs_out_file_path = xyes
296e46bd
DE
4827 then
4828 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
4829 fi
75bffa71 4830 if test "x$subdirs" != x; then
296e46bd
DE
4831 for s in $subdirs
4832 do
4833 echo "dir ${srcdir}/$s" >> .gdbinit
4834 done
4835 fi
4836 echo "source ${srcdir}/.gdbinit" >> .gdbinit
4837fi
4838
88111b26
JL
4839# Define variables host_canonical and build_canonical
4840# because some Cygnus local changes in the Makefile depend on them.
4841build_canonical=${build}
4842host_canonical=${host}
4843target_subdir=
75bffa71 4844if test "${host}" != "${target}" ; then
88111b26
JL
4845 target_subdir=${target}/
4846fi
4847AC_SUBST(build_canonical)
4848AC_SUBST(host_canonical)
4849AC_SUBST(target_subdir)
4850
dec88383
DE
4851# If this is using newlib, then define inhibit_libc in
4852# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
4853# libgcc.a, but that's OK because newib should have its own version of
4854# assert.h.
4855inhibit_libc=
75bffa71 4856if test x$with_newlib = xyes; then
dec88383
DE
4857 inhibit_libc=-Dinhibit_libc
4858fi
4859AC_SUBST(inhibit_libc)
4860
8f8d3278
NC
4861# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
4862# absolute path for gcc_tooldir based on inserting the number of up-directory
4863# movements required to get from $(exec_prefix) to $(prefix) into the basic
4864# $(libsubdir)/@(unlibsubdir) based path.
82cbf8f7
JL
4865# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
4866# make and thus we'd get different behavior depending on where we built the
4867# sources.
5949a9fc 4868if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
d062c304
JL
4869 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
4870else
8f8d3278
NC
4871changequote(<<, >>)dnl
4872# An explanation of the sed strings:
4873# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
4874# -e 's|/$||' match a trailing forward slash and eliminates it
4875# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
4876# -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
4877#
4878# (*) Note this pattern overwrites the first character of the string
4879# with a forward slash if one is not already present. This is not a
4880# problem because the exact names of the sub-directories concerned is
4881# unimportant, just the number of them matters.
4882#
4883# The practical upshot of these patterns is like this:
4884#
4885# prefix exec_prefix result
4886# ------ ----------- ------
4887# /foo /foo/bar ../
4888# /foo/ /foo/bar ../
4889# /foo /foo/bar/ ../
4890# /foo/ /foo/bar/ ../
4891# /foo /foo/bar/ugg ../../
4892#
4c112cda
NC
4893 dollar='$$'
4894 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8f8d3278 4895changequote([, ])dnl
d062c304
JL
4896fi
4897AC_SUBST(gcc_tooldir)
4c112cda 4898AC_SUBST(dollar)
d062c304 4899
7e717196
JL
4900# Nothing to do for FLOAT_H, float_format already handled.
4901objdir=`pwd`
4902AC_SUBST(objdir)
4903
94f42018
DE
4904# Process the language and host/target makefile fragments.
4905${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
47866ac0 4906
46f18e7b
RK
4907# Substitute configuration variables
4908AC_SUBST(subdirs)
46f18e7b
RK
4909AC_SUBST(all_boot_languages)
4910AC_SUBST(all_compilers)
46f18e7b 4911AC_SUBST(all_diff_excludes)
46f18e7b 4912AC_SUBST(all_headers)
9f3d1bc2
BK
4913AC_SUBST(all_lang_makefiles)
4914AC_SUBST(all_languages)
4915AC_SUBST(all_lib2funcs)
4916AC_SUBST(all_stagestuff)
4917AC_SUBST(build_exeext)
4918AC_SUBST(build_install_headers_dir)
4919AC_SUBST(build_xm_file_list)
4920AC_SUBST(cc_set_by_configure)
5aa82ace 4921AC_SUBST(quoted_cc_set_by_configure)
9f3d1bc2 4922AC_SUBST(cpp_install_dir)
9f3d1bc2
BK
4923AC_SUBST(dep_host_xmake_file)
4924AC_SUBST(dep_tmake_file)
4925AC_SUBST(extra_c_flags)
b4294351 4926AC_SUBST(extra_c_objs)
56f48ce9 4927AC_SUBST(extra_cpp_objs)
9f3d1bc2
BK
4928AC_SUBST(extra_cxx_objs)
4929AC_SUBST(extra_headers_list)
46f18e7b 4930AC_SUBST(extra_objs)
9f3d1bc2
BK
4931AC_SUBST(extra_parts)
4932AC_SUBST(extra_passes)
4933AC_SUBST(extra_programs)
9f3d1bc2
BK
4934AC_SUBST(float_h_file)
4935AC_SUBST(gcc_gxx_include_dir)
4936AC_SUBST(gcc_version)
4937AC_SUBST(gcc_version_trigger)
4938AC_SUBST(host_exeext)
46f18e7b 4939AC_SUBST(host_extra_gcc_objs)
46f18e7b 4940AC_SUBST(host_xm_file_list)
9f3d1bc2 4941AC_SUBST(install)
46f18e7b 4942AC_SUBST(lang_options_files)
9f3d1bc2 4943AC_SUBST(lang_specs_files)
3103b7db 4944AC_SUBST(lang_tree_files)
46f18e7b 4945AC_SUBST(local_prefix)
46f18e7b 4946AC_SUBST(maybe_use_collect2)
9f3d1bc2
BK
4947AC_SUBST(md_file)
4948AC_SUBST(objc_boehm_gc)
4949AC_SUBST(out_file)
4950AC_SUBST(out_object_file)
46f18e7b 4951AC_SUBST(stage_prefix_set_by_configure)
e9a25f70 4952AC_SUBST(symbolic_link)
9f3d1bc2
BK
4953AC_SUBST(thread_file)
4954AC_SUBST(tm_file_list)
4955AC_SUBST(will_use_collect2)
9fc9b82a 4956
46f18e7b
RK
4957
4958AC_SUBST_FILE(target_overrides)
4959AC_SUBST_FILE(host_overrides)
4960AC_SUBST(cross_defines)
4961AC_SUBST_FILE(cross_overrides)
4962AC_SUBST_FILE(build_overrides)
4963AC_SUBST_FILE(language_fragments)
4964AC_SUBST_FILE(language_hooks)
4965
4966# Echo that links are built
75bffa71 4967if test x$host = x$target
46f18e7b
RK
4968then
4969 str1="native "
4970else
4971 str1="cross-"
4972 str2=" from $host"
4973fi
4974
75bffa71 4975if test x$host != x$build
46f18e7b
RK
4976then
4977 str3=" on a $build system"
4978fi
4979
75bffa71 4980if test "x$str2" != x || test "x$str3" != x
46f18e7b
RK
4981then
4982 str4=
4983fi
4984
4985echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
4986
75bffa71 4987if test "x$str2" != x || test "x$str3" != x
46f18e7b
RK
4988then
4989 echo " ${str2}${str3}." 1>&2
4990fi
4991
61536478 4992# Truncate the target if necessary
75bffa71 4993if test x$host_truncate_target != x; then
61536478
JL
4994 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4995fi
4996
46f18e7b
RK
4997# Configure the subdirectories
4998# AC_CONFIG_SUBDIRS($subdirs)
4999
5000# Create the Makefile
5891b37d 5001# and configure language subdirectories
0280cf84 5002AC_OUTPUT($all_outputs,
cdcc6a01
DE
5003[
5004. $srcdir/configure.lang
5005case x$CONFIG_HEADERS in
b7cb92ad 5006xauto-host.h:config.in)
818b66cc 5007echo > cstamp-h ;;
cdcc6a01 5008esac
93cf819d
BK
5009# If the host supports symlinks, point stage[1234] at ../stage[1234] so
5010# bootstrapping and the installation procedure can still use
5011# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
5012# FLAGS_TO_PASS has been modified to solve the problem there.
5013# This is virtually a duplicate of what happens in configure.lang; we do
5014# an extra check to make sure this only happens if ln -s can be used.
75bffa71 5015if test "$symbolic_link" = "ln -s"; then
93cf819d 5016 for d in .. ${subdirs} ; do
75bffa71 5017 if test $d != ..; then
4e8a434e
BK
5018 STARTDIR=`pwd`
5019 cd $d
5020 for t in stage1 stage2 stage3 stage4 include
5021 do
5022 rm -f $t
5023 $symbolic_link ../$t $t 2>/dev/null
5024 done
5025 cd $STARTDIR
93cf819d
BK
5026 fi
5027 done
5028else true ; fi
ab87f8c8
JL
5029# Avoid having to add intl to our include paths.
5030if test -f intl/libintl.h; then
5031 echo creating libintl.h
5032 echo '#include "intl/libintl.h"' >libintl.h
5033fi
cdcc6a01
DE
5034],
5035[
5891b37d
RK
5036host='${host}'
5037build='${build}'
5038target='${target}'
52060267 5039target_alias='${target_alias}'
5891b37d
RK
5040srcdir='${srcdir}'
5041subdirs='${subdirs}'
296e46bd 5042oldstyle_subdirs='${oldstyle_subdirs}'
5891b37d
RK
5043symbolic_link='${symbolic_link}'
5044program_transform_set='${program_transform_set}'
5045program_transform_name='${program_transform_name}'
5891b37d
RK
5046dep_host_xmake_file='${dep_host_xmake_file}'
5047host_xmake_file='${host_xmake_file}'
5048dep_tmake_file='${dep_tmake_file}'
5049tmake_file='${tmake_file}'
0bbb1697 5050thread_file='${thread_file}'
f1943b77
MH
5051gcc_version='${gcc_version}'
5052gcc_version_trigger='${gcc_version_trigger}'
5891b37d 5053local_prefix='${local_prefix}'
5891b37d 5054build_install_headers_dir='${build_install_headers_dir}'
a204adc6 5055build_exeext='${build_exeext}'
6e26218f 5056host_exeext='${host_exeext}'
7ed46111 5057out_file='${out_file}'
5891b37d
RK
5058gdb_needs_out_file_path='${gdb_needs_out_file_path}'
5059SET_MAKE='${SET_MAKE}'
5891b37d 5060target_list='${target_list}'
5891b37d
RK
5061target_overrides='${target_overrides}'
5062host_overrides='${host_overrides}'
5063cross_defines='${cross_defines}'
5064cross_overrides='${cross_overrides}'
5065build_overrides='${build_overrides}'
9fc9b82a 5066cpp_install_dir='${cpp_install_dir}'
cdcc6a01 5067])