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