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