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