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