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