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