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