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