]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/configure.in
* aclocal.m4 (gcc_AC_CHECK_PROG_VER): New macro.
[thirdparty/gcc.git] / gcc / configure.in
CommitLineData
01dc27ef 1# configure.in for GNU CC
2# Process this file with autoconf to generate a configuration script.
3
8ac78b1a 4# Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
01dc27ef 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
11e01324 24AC_PREREQ(2.13)
01dc27ef 25AC_INIT(tree.c)
764fc592 26AC_CONFIG_HEADER(auto-host.h:config.in)
805483cf 27
01dc27ef 28remove=rm
29hard_link=ln
30symbolic_link='ln -s'
31copy=cp
32
279894f2 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
edf2430c 56*** building gcc. Please change the environment variable
279894f2 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
edf2430c 82*** building gcc. Please change the environment variable
279894f2 83*** and run configure again.])
84fi
85
01dc27ef 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.],
c4f70bb2 91gnu_ld_flag="$with_gnu_ld",
92gnu_ld_flag=no)
01dc27ef 93
f07251bc 94# With pre-defined ld
95AC_ARG_WITH(ld,
96[ --with-ld arrange to use the specified ld (full pathname).],
f8b7dbdb 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])
16e09e89 101 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
f07251bc 102 gnu_ld_flag=yes
103 fi
42f1312d 104 AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$DEFAULT_LINKER",
105 [Define to enable the use of a default linker.])
f07251bc 106fi
107
01dc27ef 108# With GNU as
109AC_ARG_WITH(gnu-as,
2684981e 110[ --with-gnu-as arrange to work with GNU as.],
c4f70bb2 111gas_flag="$with_gnu_as",
112gas_flag=no)
01dc27ef 113
f07251bc 114AC_ARG_WITH(as,
115[ --with-as arrange to use the specified as (full pathname).],
f8b7dbdb 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])
16e09e89 120 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
f07251bc 121 gas_flag=yes
122 fi
42f1312d 123 AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER",
124 [Define to enable the use of a default assembler.])
f8b7dbdb 125fi
f07251bc 126
01dc27ef 127# With stabs
128AC_ARG_WITH(stabs,
129[ --with-stabs arrange to use stabs instead of host debug format.],
08dafb06 130stabs="$with_stabs",
01dc27ef 131stabs=no)
132
133# With ELF
134AC_ARG_WITH(elf,
135[ --with-elf arrange to use ELF instead of host debug format.],
08dafb06 136elf="$with_elf",
01dc27ef 137elf=no)
138
2684981e 139# Specify the local prefix
6e014aa3 140local_prefix=
2684981e 141AC_ARG_WITH(local-prefix,
142[ --with-local-prefix=DIR specifies directory to put local include.],
6e014aa3 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])
2684981e 148
149# Default local prefix if it is empty
bf3637a9 150if test x$local_prefix = x; then
2684981e 151 local_prefix=/usr/local
152fi
153
8ffadb5b 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=
658de1c4 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.],
6e014aa3 162[case "${withval}" in
163yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
164no) ;;
8ffadb5b 165*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
6e014aa3 166esac])
167
8ffadb5b 168if test x${gcc_gxx_include_dir} = x; then
6e014aa3 169 if test x${enable_version_specific_runtime_libs} = xyes; then
8ffadb5b 170 gcc_gxx_include_dir='${libsubdir}/include/g++'
6e014aa3 171 else
c51c4792 172 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
f0f48a6d 173changequote(<<, >>)dnl
8ffadb5b 174 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
f0f48a6d 175changequote([, ])dnl
6e014aa3 176 fi
177fi
01dc27ef 178
485205d1 179# Enable expensive internal checks
180AC_ARG_ENABLE(checking,
0c4e40c5 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],
42f1312d 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 ;;
6e014aa3 193no) ;;
f60b6b24 194*) IFS="${IFS= }"; ac_save_IFS="$IFS" IFS="$IFS,"
0c4e40c5 195 set fnord $enableval; shift
196 IFS="$ac_save_IFS"
91d3c746 197 for check
198 do
0c4e40c5 199 case $check in
42f1312d 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 ;;
0c4e40c5 205 *) AC_MSG_ERROR(unknown check category $check) ;;
206 esac
207 done
208 ;;
42f1312d 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])
485205d1 239
f7b90398 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
f025850a 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"
f025850a 263dnl fi)
a78b4820 264
7014838c 265# Enable Multibyte Characters for C/C++
266AC_ARG_ENABLE(c-mbchar,
267[ --enable-c-mbchar Enable multibyte characters for C and C++.],
7a28a1b6 268if test x$enable_c_mbchar != xno; then
a19bbd81 269 extra_c_flags="${extra_c_flags} -DMULTIBYTE_CHARS=1"
7014838c 270fi)
271
3e637c99 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.],
bf3637a9 278if test x$enable_threads = xno; then
3e637c99 279 enable_threads=''
280fi,
281enable_threads='')
282
2faa5090 283enable_threads_flag=$enable_threads
3e637c99 284# Check if a valid thread package
2faa5090 285case x${enable_threads_flag} in
3e637c99 286 x | xno)
287 # No threads
040921ae 288 target_thread_file='single'
3e637c99 289 ;;
290 xyes)
291 # default
040921ae 292 target_thread_file=''
3e637c99 293 ;;
294 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
26fbb0d3 295 xsolaris | xwin32 | xdce | xvxworks)
2faa5090 296 target_thread_file=$enable_threads_flag
3e637c99 297 ;;
298 *)
299 echo "$enable_threads is an unknown thread package" 1>&2
300 exit 1
301 ;;
302esac
303
5c872430 304AC_ARG_ENABLE(objc-gc,
305[ --enable-objc-gc enable the use of Boehm's garbage collector with
306 the GNU Objective-C runtime.],
7a28a1b6 307if test x$enable_objc_gc = xno; then
5c872430 308 objc_boehm_gc=''
309else
310 objc_boehm_gc=1
311fi,
312objc_boehm_gc='')
313
27b15aee 314AC_ARG_WITH(dwarf2,
b65d2e3c 315[ --with-dwarf2 force the default debug format to be DWARF2.],
27b15aee 316dwarf2="$with_dwarf2",
317dwarf2=no)
318
01dc27ef 319# Determine the host, build, and target systems
320AC_CANONICAL_SYSTEM
321
0dbd1c74 322# Find the native compiler
323AC_PROG_CC
f9708620 324gcc_AC_C_LONG_DOUBLE
6f63674e 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
0dbd1c74 336AC_PROG_MAKE_SET
337
f07251bc 338AC_MSG_CHECKING([whether a default assembler was specified])
f8b7dbdb 339if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
16e09e89 340 if test x"$gas_flag" = x"no"; then
f8b7dbdb 341 AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)])
f07251bc 342 else
f8b7dbdb 343 AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)])
f07251bc 344 fi
345else
346 AC_MSG_RESULT(no)
347fi
348
349AC_MSG_CHECKING([whether a default linker was specified])
f8b7dbdb 350if test x"${DEFAULT_LINKER+set}" = x"set"; then
16e09e89 351 if test x"$gnu_ld_flag" = x"no"; then
f8b7dbdb 352 AC_MSG_RESULT([yes ($DEFAULT_LINKER)])
f07251bc 353 else
f8b7dbdb 354 AC_MSG_RESULT([yes ($DEFAULT_LINKER - GNU ld)])
f07251bc 355 fi
356else
357 AC_MSG_RESULT(no)
358fi
359
01dc27ef 360# Find some useful tools
361AC_PROG_AWK
362AC_PROG_LEX
f9708620 363gcc_AC_PROG_LN
364gcc_AC_PROG_LN_S
365gcc_AC_C_VOLATILE
01dc27ef 366AC_PROG_RANLIB
367AC_PROG_YACC
f9708620 368gcc_AC_PROG_INSTALL
01dc27ef 369
ad87de1e 370AC_HEADER_STDC
371AC_HEADER_TIME
f9708620 372gcc_AC_HEADER_STRING
5a3ee0b1 373AC_HEADER_SYS_WAIT
a876e5f8 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)
a3477a0e 378
58febf9e 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
9237dd8b 383# See if GNAT has been installed
384AC_CHECK_PROG(gnat, gnatbind, yes, no)
385
049ccec1 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
11e01324 410# See if the stage1 system preprocessor understands the ANSI C
411# preprocessor stringification operator.
412AC_C_STRINGIZE
8c5c997d 413
a3477a0e 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;],
fd80090d 422 [gcc_cv_header_inttypes_h=yes],
a3477a0e 423 gcc_cv_header_inttypes_h=no)])
424AC_MSG_RESULT($gcc_cv_header_inttypes_h)
fd80090d 425if test $gcc_cv_header_inttypes_h = yes; then
42f1312d 426 AC_DEFINE(HAVE_INTTYPES_H, 1,
427 [Define if you have a working <inttypes.h> header file.])
fd80090d 428fi
805483cf 429
488c4206 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)])
488c4206 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
58113712 450AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \
b3819e2e 451 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
1bcf5ab8 452 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
71661611 453 fputs_unlocked getrusage valloc)
4211624c 454
33a62e3f 455# Make sure wchar_t is available
456#AC_CHECK_TYPE(wchar_t, unsigned int)
457
f9708620 458gcc_AC_FUNC_VFPRINTF_DOPRNT
459gcc_AC_FUNC_PRINTF_PTR
f1959ea2 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
020ecb1b 469AC_FUNC_VFORK
8ee6d486 470AC_FUNC_MMAP_ANYWHERE
39af12e5 471AC_FUNC_MMAP_FILE
0a0a425e 472
3c014a93 473# We will need to find libiberty.h and ansidecl.h
474saved_CFLAGS="$CFLAGS"
475CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
f9708620 476gcc_AC_NEED_DECLARATIONS(bcopy bzero bcmp \
58113712 477 index rindex getenv atol sbrk abort atof getcwd getwd \
3c014a93 478 strsignal putc_unlocked fputs_unlocked strstr environ \
479 malloc realloc calloc free, [
480#include "gansidecl.h"
481#include "system.h"])
7014838c 482
f9708620 483gcc_AC_NEED_DECLARATIONS(getrlimit setrlimit getrusage, [
3c014a93 484#include "gansidecl.h"
485#include "system.h"
436f5383 486#ifdef HAVE_SYS_RESOURCE_H
487#include <sys/resource.h>
488#endif
489])
490
3c014a93 491# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
492CFLAGS="$saved_CFLAGS"
493
a729d1c3 494# mkdir takes a single argument on some systems.
f9708620 495gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
a729d1c3 496
01dc27ef 497# File extensions
498manext='.1'
499objext='.o'
01dc27ef 500AC_SUBST(manext)
501AC_SUBST(objext)
01dc27ef 502
503build_xm_file=
9c1d888a 504build_xm_defines=
01dc27ef 505build_install_headers_dir=install-headers-tar
506build_exeext=
507host_xm_file=
9c1d888a 508host_xm_defines=
01dc27ef 509host_xmake_file=
510host_truncate_target=
2aa3e87b 511host_exeext=
01dc27ef 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=
9c1d888a 529 xm_defines=
01dc27ef 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=
01dc27ef 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=
01dc27ef 544 # Set this if the build machine requires executables to have a
545 # file name suffix.
546 exeext=
040921ae 547 # Set this to control which thread package will be used.
548 thread_file=
c4f70bb2 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"
2faa5090 553 enable_threads=$enable_threads_flag
01dc27ef 554
7953c610 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=
01dc27ef 558 cpu_type=`echo $machine | sed 's/-.*$//'`
559 case $machine in
6e0e6130 560 alpha*-*-*)
561 cpu_type=alpha
562 ;;
01dc27ef 563 arm*-*-*)
564 cpu_type=arm
565 ;;
566 c*-convex-*)
567 cpu_type=convex
568 ;;
bf3637a9 569changequote(,)dnl
570 i[34567]86-*-*)
571changequote([,])dnl
01dc27ef 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 ;;
67c3c754 583 pj*-*-*)
584 cpu_type=pj
585 ;;
01dc27ef 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
7953c610 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
293be640 603 # On a.out targets, we need to use collect2.
604 case $machine in
605 *-*-*aout*)
606 use_collect2=yes
607 ;;
608 esac
609
3394a88b 610 # Common parts for linux-gnu and openbsd systems
9c1d888a 611 case $machine in
612 *-*-linux-gnu*)
f4607638 613 xm_defines="HAVE_ATEXIT POSIX BSTRING"
9c1d888a 614 ;;
3394a88b 615 *-*-openbsd*)
616 tm_file=${cpu_type}/openbsd.h
3394a88b 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
0104279f 620 # don't depend on processor x-fragments as well
621 xmake_file=none
3394a88b 622 if test x$enable_threads = xyes; then
623 thread_file='posix'
624 tmake_file="${tmake_file} t-openbsd-thread"
625 fi
626 ;;
9c1d888a 627 esac
628
01dc27ef 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
bf3637a9 636 if test -f $srcdir/config/${cpu_type}/x-$rest; \
01dc27ef 637 then xmake_file=${cpu_type}/x-$rest; \
638 else true; \
639 fi
bf3637a9 640 if test -f $srcdir/config/${cpu_type}/t-$rest; \
01dc27ef 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"
9c1d888a 649 xm_defines=USG
01dc27ef 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 ;;
26fbb0d3 657 a29k-wrs-vxworks*)
01dc27ef 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"
26fbb0d3 661 thread_file='vxworks'
01dc27ef 662 ;;
663 a29k-*-*) # Default a29k environment.
664 use_collect2=yes
665 ;;
519e7188 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);
4a9173a5 670 #target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
519e7188 671
4a9173a5 672 # GAS + IEEE_CONFORMANT
673 target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
519e7188 674
675 xm_file="alpha/xm-alpha-interix.h xm-interix.h"
676 xmake_file="x-interix alpha/t-pe"
d1138980 677 tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
519e7188 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 ;;
6e0e6130 687 alpha*-*-linux-gnuecoff*)
10c2bede 688 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
9c1d888a 689 target_cpu_default="MASK_GAS"
d1138980 690 tmake_file="alpha/t-alpha alpha/t-ieee"
f0b8ad1b 691 gas=no
01dc27ef 692 xmake_file=none
01dc27ef 693 gas=yes gnu_ld=yes
694 ;;
b111783f 695 alpha*-*-linux-gnulibc1*)
60ac811a 696 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
9c1d888a 697 target_cpu_default="MASK_GAS"
d022c9c6 698 tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-crtbe alpha/t-ieee"
6942e4d1 699 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
b111783f 700 xmake_file=none
b111783f 701 gas=yes gnu_ld=yes
bf3637a9 702 if test x$enable_threads = xyes; then
b111783f 703 thread_file='posix'
704 fi
705 ;;
6e0e6130 706 alpha*-*-linux-gnu*)
60ac811a 707 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
9c1d888a 708 target_cpu_default="MASK_GAS"
d022c9c6 709 tmake_file="t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
6942e4d1 710 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
01dc27ef 711 xmake_file=none
01dc27ef 712 gas=yes gnu_ld=yes
bf3637a9 713 if test x$enable_threads = xyes; then
87c3790c 714 thread_file='posix'
715 fi
01dc27ef 716 ;;
60ac811a 717 alpha*-*-netbsd*)
4089d03f 718 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
60ac811a 719 target_cpu_default="MASK_GAS"
d1138980 720 tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
6942e4d1 721 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
60ac811a 722 xmake_file=none
60ac811a 723 gas=yes gnu_ld=yes
724 ;;
3394a88b 725
726 alpha*-*-openbsd*)
727 # default x-alpha is only appropriate for dec-osf.
728 target_cpu_default="MASK_GAS"
d1138980 729 tmake_file="alpha/t-alpha alpha/t-ieee"
3394a88b 730 ;;
60ac811a 731
0dbd1c74 732 alpha*-dec-osf*)
bf3637a9 733 if test x$stabs = xyes
1e7c52a6 734 then
735 tm_file="${tm_file} dbx.h"
736 fi
bf3637a9 737 if test x$gas != xyes
1e7c52a6 738 then
739 extra_passes="mips-tfile mips-tdump"
740 fi
1e7c52a6 741 use_collect2=yes
d1138980 742 tmake_file="alpha/t-alpha alpha/t-ieee"
1e7c52a6 743 case $machine in
0bdfa546 744 *-*-osf1*)
3024b95b 745 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
0dbd1c74 746 ;;
bf3637a9 747changequote(,)dnl
748 *-*-osf[23]*)
749changequote([,])dnl
3024b95b 750 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
0dbd1c74 751 ;;
752 *-*-osf4*)
3024b95b 753 tm_file="${tm_file} alpha/osf.h"
0dbd1c74 754 # Some versions of OSF4 (specifically X4.0-9 296.7) have
755 # a broken tar, so we use cpio instead.
1e7c52a6 756 install_headers_dir=install-headers-cpio
757 ;;
746b8cc2 758 *-*-osf5*)
915c336f 759 tm_file="${tm_file} alpha/osf.h alpha/osf5.h"
746b8cc2 760 ;;
1e7c52a6 761 esac
0dbd1c74 762 case $machine in
bf3637a9 763changequote(,)dnl
27e19e34 764 *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5*)
bf3637a9 765changequote([,])dnl
0dbd1c74 766 target_cpu_default=MASK_SUPPORT_ARCH
767 ;;
768 esac
01dc27ef 769 ;;
9e042f31 770 alpha*-*-vxworks*)
771 tm_file="${tm_file} dbx.h alpha/vxworks.h"
d1138980 772 tmake_file="alpha/t-alpha alpha/t-ieee"
9e042f31 773 if [ x$gas != xyes ]
774 then
775 extra_passes="mips-tfile mips-tdump"
776 fi
777 use_collect2=yes
2740f581 778 thread_file='vxworks'
9e042f31 779 ;;
3024b95b 780 alpha*-*-winnt*)
519e7188 781 tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
01dc27ef 782 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
d1138980 783 tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
01dc27ef 784 xmake_file=winnt/x-winnt
785 extra_host_objs=oldnames.o
786 extra_gcc_objs="spawnv.o oldnames.o"
bf3637a9 787 if test x$gnu_ld != xyes
01dc27ef 788 then
789 extra_programs=ld.exe
790 fi
bf3637a9 791 if test x$enable_threads = xyes; then
3e637c99 792 thread_file='win32'
793 fi
01dc27ef 794 ;;
6e0e6130 795 alpha*-dec-vms*)
01dc27ef 796 tm_file=alpha/vms.h
797 xm_file="${xm_file} alpha/xm-vms.h"
d1138980 798 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
01dc27ef 799 ;;
6dac5483 800 arc-*-elf*)
801 extra_parts="crtinit.o crtfini.o"
802 ;;
01dc27ef 803 arm-*-coff* | armel-*-coff*)
804 tm_file=arm/coff.h
cffb2a26 805 tmake_file=arm/t-arm-coff
01dc27ef 806 ;;
3830210b 807 arm-*-vxworks*)
a1832729 808 tm_file=arm/vxarm.h
cffb2a26 809 tmake_file=arm/t-arm-coff
2740f581 810 thread_file='vxworks'
3830210b 811 ;;
bf3637a9 812changequote(,)dnl
813 arm-*-riscix1.[01]*) # Acorn RISC machine (early versions)
814changequote([,])dnl
01dc27ef 815 tm_file=arm/riscix1-1.h
816 use_collect2=yes
817 ;;
818 arm-*-riscix*) # Acorn RISC machine
bf3637a9 819 if test x$gas = xyes
01dc27ef 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
01dc27ef 832 ;;
833 arm-semi-aof | armel-semi-aof)
834 tm_file=arm/semiaof.h
835 tmake_file=arm/t-semiaof
01dc27ef 836 ;;
f2c5c1a5 837 arm*-*-netbsd*)
dfb5871b 838 tm_file=arm/netbsd.h
0dbd1c74 839 tmake_file="t-netbsd arm/t-netbsd"
56863dd8 840 use_collect2=yes
dfb5871b 841 ;;
6cd47762 842 arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
54821fac 843 cpu_type=arm
54821fac 844 xmake_file=x-linux
6cd47762 845 tm_file=arm/linux-aout.h
54821fac 846 tmake_file=arm/t-linux
54821fac 847 gnu_ld=yes
848 ;;
6b8f81d2 849 arm*-*-linux-gnuoldld*) # ARM GNU/Linux with old ELF linker
6cd47762 850 xm_file=arm/xm-linux.h
851 xmake_file=x-linux
6b8f81d2 852 tm_file="arm/linux-oldld.h arm/linux-elf.h"
6cd47762 853 case $machine in
854 armv2*-*-*)
6b8f81d2 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'
6cd47762 864 ;;
6b8f81d2 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"
6cd47762 874 ;;
875 esac
876 tmake_file="t-linux arm/t-linux"
877 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
6cd47762 878 gnu_ld=yes
8e158ba2 879 case x${enable_threads} in
880 x | xyes | xpthreads | xposix)
881 thread_file='posix'
882 ;;
883 esac
6cd47762 884 ;;
117756eb 885 arm*-*-uclinux*) # ARM ucLinux
886 tm_file=arm/uclinux-elf.h
887 tmake_file=arm/t-arm-elf
888 ;;
6cd47762 889 arm*-*-aout)
44b1d06d 890 tm_file=arm/aout.h
cffb2a26 891 tmake_file=arm/t-arm-aout
01dc27ef 892 ;;
a8e7237a 893 arm*-*-ecos-elf)
894 tm_file=arm/ecos-elf.h
cffb2a26 895 tmake_file=arm/t-arm-elf
a8e7237a 896 ;;
6cd47762 897 arm*-*-elf)
898 tm_file=arm/unknown-elf.h
899 tmake_file=arm/t-arm-elf
63af13bc 900 ;;
901 arm*-*-conix*)
902 tm_file=arm/conix-elf.h
903 tmake_file=arm/t-arm-elf
6cd47762 904 ;;
8a109f58 905 arm*-*-oabi)
906 tm_file=arm/unknown-elf-oabi.h
907 tmake_file=arm/t-arm-elf
908 ;;
7097d470 909 arm-*-pe*)
910 tm_file=arm/pe.h
911 tmake_file=arm/t-pe
cffb2a26 912 extra_objs="pe.o"
7097d470 913 ;;
56863dd8 914 avr-*-*)
915 ;;
01dc27ef 916 c1-convex-*) # Convex C1
917 target_cpu_default=1
918 use_collect2=yes
01dc27ef 919 ;;
920 c2-convex-*) # Convex C2
921 target_cpu_default=2
922 use_collect2=yes
01dc27ef 923 ;;
924 c32-convex-*)
925 target_cpu_default=4
926 use_collect2=yes
01dc27ef 927 ;;
928 c34-convex-*)
929 target_cpu_default=8
930 use_collect2=yes
01dc27ef 931 ;;
932 c38-convex-*)
933 target_cpu_default=16
934 use_collect2=yes
01dc27ef 935 ;;
8b07f0eb 936 c4x-*)
937 cpu_type=c4x
938 tmake_file=c4x/t-c4x
939 ;;
01dc27ef 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
01dc27ef 947 ;;
6d56d9f0 948 d30v-*)
949 float_format=i64
950 ;;
01dc27ef 951 dsp16xx-*)
952 ;;
953 elxsi-elxsi-*)
954 use_collect2=yes
955 ;;
4b15dc3c 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 ;;
01dc27ef 961# This hasn't been upgraded to GCC 2.
962# fx80-alliant-*) # Alliant FX/80
963# ;;
964 h8300-*-*)
965 float_format=i32
966 ;;
17f81a25 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 ;;
3394a88b 978 hppa*-*-openbsd*)
d4102c12 979 target_cpu_default="MASK_PA_11"
8ffadb5b 980 tmake_file=pa/t-openbsd
3394a88b 981 ;;
01dc27ef 982 hppa1.1-*-pro*)
cd23503e 983 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
bac38c40 984 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
01dc27ef 985 xm_file=pa/xm-papro.h
986 tmake_file=pa/t-pro
987 ;;
988 hppa1.1-*-osf*)
d4102c12 989 target_cpu_default="MASK_PA_11"
bac38c40 990 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
01dc27ef 991 use_collect2=yes
01dc27ef 992 ;;
1e7c52a6 993 hppa1.1-*-rtems*)
cd23503e 994 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
bac38c40 995 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
1e7c52a6 996 xm_file=pa/xm-papro.h
997 tmake_file=pa/t-pro
998 ;;
01dc27ef 999 hppa1.0-*-osf*)
bac38c40 1000 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
01dc27ef 1001 use_collect2=yes
01dc27ef 1002 ;;
1003 hppa1.1-*-bsd*)
bac38c40 1004 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
d4102c12 1005 target_cpu_default="MASK_PA_11"
01dc27ef 1006 use_collect2=yes
01dc27ef 1007 ;;
1008 hppa1.0-*-bsd*)
bac38c40 1009 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
01dc27ef 1010 use_collect2=yes
01dc27ef 1011 ;;
1012 hppa1.0-*-hpux7*)
bac38c40 1013 tm_file="pa/pa-oldas.h ${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux7.h"
01dc27ef 1014 xm_file=pa/xm-pahpux.h
1015 xmake_file=pa/x-pa-hpux
bf3637a9 1016 if test x$gas = xyes
01dc27ef 1017 then
1018 tm_file="${tm_file} pa/gas.h"
1019 fi
01dc27ef 1020 install_headers_dir=install-headers-cpio
1021 use_collect2=yes
1022 ;;
bf3637a9 1023changequote(,)dnl
1024 hppa1.0-*-hpux8.0[0-2]*)
1025changequote([,])dnl
bac38c40 1026 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
01dc27ef 1027 xm_file=pa/xm-pahpux.h
1028 xmake_file=pa/x-pa-hpux
bf3637a9 1029 if test x$gas = xyes
01dc27ef 1030 then
1031 tm_file="${tm_file} pa/pa-gas.h"
1032 else
1033 tm_file="pa/pa-oldas.h ${tm_file}"
1034 fi
01dc27ef 1035 install_headers_dir=install-headers-cpio
1036 use_collect2=yes
1037 ;;
bf3637a9 1038changequote(,)dnl
1039 hppa1.1-*-hpux8.0[0-2]*)
1040changequote([,])dnl
d4102c12 1041 target_cpu_default="MASK_PA_11"
bac38c40 1042 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
01dc27ef 1043 xm_file=pa/xm-pahpux.h
1044 xmake_file=pa/x-pa-hpux
bf3637a9 1045 if test x$gas = xyes
01dc27ef 1046 then
1047 tm_file="${tm_file} pa/pa-gas.h"
1048 else
1049 tm_file="pa/pa-oldas.h ${tm_file}"
1050 fi
01dc27ef 1051 install_headers_dir=install-headers-cpio
1052 use_collect2=yes
1053 ;;
1054 hppa1.1-*-hpux8*)
d4102c12 1055 target_cpu_default="MASK_PA_11"
bac38c40 1056 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
01dc27ef 1057 xm_file=pa/xm-pahpux.h
1058 xmake_file=pa/x-pa-hpux
bf3637a9 1059 if test x$gas = xyes
01dc27ef 1060 then
1061 tm_file="${tm_file} pa/pa-gas.h"
1062 fi
01dc27ef 1063 install_headers_dir=install-headers-cpio
1064 use_collect2=yes
1065 ;;
1066 hppa1.0-*-hpux8*)
bac38c40 1067 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
01dc27ef 1068 xm_file=pa/xm-pahpux.h
1069 xmake_file=pa/x-pa-hpux
bf3637a9 1070 if test x$gas = xyes
01dc27ef 1071 then
1072 tm_file="${tm_file} pa/pa-gas.h"
1073 fi
01dc27ef 1074 install_headers_dir=install-headers-cpio
1075 use_collect2=yes
1076 ;;
501a6a1f 1077 hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
d4102c12 1078 target_cpu_default="MASK_PA_11"
bac38c40 1079 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
645f3669 1080 float_format=i128
01dc27ef 1081 xm_file=pa/xm-pahpux.h
1082 xmake_file=pa/x-pa-hpux
58febf9e 1083 tmake_file=pa/t-pa
bf3637a9 1084 if test x$gas = xyes
01dc27ef 1085 then
1086 tm_file="${tm_file} pa/pa-gas.h"
1087 fi
bf3637a9 1088 if test x$enable_threads = x; then
58febf9e 1089 enable_threads=$have_pthread_h
1090 fi
bf3637a9 1091 if test x$enable_threads = xyes; then
58febf9e 1092 thread_file='dce'
1093 tmake_file="${tmake_file} pa/t-dce-thr"
1094 fi
01dc27ef 1095 install_headers_dir=install-headers-cpio
1096 use_collect2=yes
1097 ;;
1098 hppa1.0-*-hpux10*)
bac38c40 1099 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
645f3669 1100 float_format=i128
01dc27ef 1101 xm_file=pa/xm-pahpux.h
1102 xmake_file=pa/x-pa-hpux
c23a13df 1103 tmake_file=pa/t-pa
bf3637a9 1104 if test x$gas = xyes
01dc27ef 1105 then
1106 tm_file="${tm_file} pa/pa-gas.h"
1107 fi
bf3637a9 1108 if test x$enable_threads = x; then
b86bf1e1 1109 enable_threads=$have_pthread_h
1110 fi
bf3637a9 1111 if test x$enable_threads = xyes; then
b86bf1e1 1112 thread_file='dce'
1113 tmake_file="${tmake_file} pa/t-dce-thr"
1114 fi
01dc27ef 1115 install_headers_dir=install-headers-cpio
1116 use_collect2=yes
1117 ;;
8ca4d6fa 1118 hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
17f81a25 1119 target_cpu_default="MASK_PA_11"
bac38c40 1120 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
645f3669 1121 float_format=i128
8ca4d6fa 1122 xm_file=pa/xm-pahpux.h
1123 xmake_file=pa/x-pa-hpux
1124 tmake_file=pa/t-pa
7a28a1b6 1125 if test x$gas = xyes
8ca4d6fa 1126 then
1127 tm_file="${tm_file} pa/pa-gas.h"
1128 fi
7a28a1b6 1129# if test x$enable_threads = x; then
8ca4d6fa 1130# enable_threads=$have_pthread_h
1131# fi
7a28a1b6 1132# if test x$enable_threads = xyes; then
8ca4d6fa 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*)
bac38c40 1140 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
645f3669 1141 float_format=i128
8ca4d6fa 1142 xm_file=pa/xm-pahpux.h
1143 xmake_file=pa/x-pa-hpux
7a28a1b6 1144 if test x$gas = xyes
8ca4d6fa 1145 then
1146 tm_file="${tm_file} pa/pa-gas.h"
1147 fi
7a28a1b6 1148# if test x$enable_threads = x; then
8ca4d6fa 1149# enable_threads=$have_pthread_h
1150# fi
7a28a1b6 1151# if test x$enable_threads = xyes; then
8ca4d6fa 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 ;;
501a6a1f 1158 hppa1.1-*-hpux* | hppa2*-*-hpux*)
d4102c12 1159 target_cpu_default="MASK_PA_11"
bac38c40 1160 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
01dc27ef 1161 xm_file=pa/xm-pahpux.h
1162 xmake_file=pa/x-pa-hpux
bf3637a9 1163 if test x$gas = xyes
01dc27ef 1164 then
1165 tm_file="${tm_file} pa/pa-gas.h"
1166 fi
01dc27ef 1167 install_headers_dir=install-headers-cpio
1168 use_collect2=yes
1169 ;;
1170 hppa1.0-*-hpux*)
bac38c40 1171 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
01dc27ef 1172 xm_file=pa/xm-pahpux.h
1173 xmake_file=pa/x-pa-hpux
bf3637a9 1174 if test x$gas = xyes
01dc27ef 1175 then
1176 tm_file="${tm_file} pa/pa-gas.h"
1177 fi
01dc27ef 1178 install_headers_dir=install-headers-cpio
1179 use_collect2=yes
1180 ;;
501a6a1f 1181 hppa1.1-*-hiux* | hppa2*-*-hiux*)
d4102c12 1182 target_cpu_default="MASK_PA_11"
bac38c40 1183 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
01dc27ef 1184 xm_file=pa/xm-pahpux.h
1185 xmake_file=pa/x-pa-hpux
bf3637a9 1186 if test x$gas = xyes
01dc27ef 1187 then
1188 tm_file="${tm_file} pa/pa-gas.h"
1189 fi
01dc27ef 1190 install_headers_dir=install-headers-cpio
1191 use_collect2=yes
1192 ;;
1193 hppa1.0-*-hiux*)
bac38c40 1194 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
01dc27ef 1195 xm_file=pa/xm-pahpux.h
1196 xmake_file=pa/x-pa-hpux
bf3637a9 1197 if test x$gas = xyes
01dc27ef 1198 then
1199 tm_file="${tm_file} pa/pa-gas.h"
1200 fi
01dc27ef 1201 install_headers_dir=install-headers-cpio
1202 use_collect2=yes
1203 ;;
1204 hppa*-*-lites*)
bac38c40 1205 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h"
d4102c12 1206 target_cpu_default="MASK_PA_11"
01dc27ef 1207 use_collect2=yes
01dc27ef 1208 ;;
a61839d5 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
a61839d5 1215 use_collect2=yes
1216 ;;
39e7c74f 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
39e7c74f 1222 ;;
01dc27ef 1223 i370-*-mvs*)
39e7c74f 1224 xm_file=i370/xm-mvs.h
1225 tm_file=i370/mvs.h
1226 tmake_file=i370/t-mvs
39e7c74f 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"
39e7c74f 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
7a28a1b6 1239 if test x$enable_threads = xyes; then
39e7c74f 1240 thread_file='posix'
1241 fi
01dc27ef 1242 ;;
4837bf61 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 ;;
bf3637a9 1251changequote(,)dnl
1252 i[34567]86-ibm-aix*) # IBM PS/2 running AIX
1253changequote([,])dnl
1254 if test x$gas = xyes
01dc27ef 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
9c1d888a 1263 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
1264 xm_defines=USG
01dc27ef 1265 xmake_file=i386/x-aix
01dc27ef 1266 ;;
bf3637a9 1267changequote(,)dnl
1268 i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
1269changequote([,])dnl
831ac869 1270 xm_file="xm-alloca.h ${xm_file}"
9c1d888a 1271 xm_defines="USG POSIX SMALL_ARG_MAX"
01dc27ef 1272 xmake_file=i386/x-ncr3000
bf3637a9 1273 if test x$stabs = xyes -a x$gas = xyes
01dc27ef 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 ;;
bf3637a9 1282changequote(,)dnl
1283 i[34567]86-next-*)
1284changequote([,])dnl
01dc27ef 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
5c61dffd 1290 extra_parts="crtbegin.o crtend.o"
bf3637a9 1291 if test x$enable_threads = xyes; then
3e637c99 1292 thread_file='mach'
1293 fi
01dc27ef 1294 ;;
bf3637a9 1295changequote(,)dnl
1296 i[34567]86-sequent-bsd*) # 80386 from Sequent
1297changequote([,])dnl
01dc27ef 1298 use_collect2=yes
bf3637a9 1299 if test x$gas = xyes
01dc27ef 1300 then
1301 tm_file=i386/seq-gas.h
1302 else
1303 tm_file=i386/sequent.h
1304 fi
1305 ;;
bf3637a9 1306changequote(,)dnl
1307 i[34567]86-sequent-ptx1*)
1308changequote([,])dnl
9c1d888a 1309 xm_defines="USG SVR3"
01dc27ef 1310 xmake_file=i386/x-sysv3
1311 tm_file=i386/seq-sysv3.h
1312 tmake_file=i386/t-crtstuff
01dc27ef 1313 extra_parts="crtbegin.o crtend.o"
1314 install_headers_dir=install-headers-cpio
01dc27ef 1315 ;;
bf3637a9 1316changequote(,)dnl
1317 i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
1318changequote([,])dnl
9c1d888a 1319 xm_defines="USG SVR3"
01dc27ef 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"
01dc27ef 1324 install_headers_dir=install-headers-cpio
01dc27ef 1325 ;;
bf3637a9 1326changequote(,)dnl
1327 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
1328changequote([,])dnl
831ac869 1329 xm_file="xm-alloca.h ${xm_file}"
9c1d888a 1330 xm_defines="USG POSIX SMALL_ARG_MAX"
01dc27ef 1331 xmake_file=x-svr4
1332 tm_file=i386/ptx4-i.h
1333 tmake_file=t-svr4
1334 extra_parts="crtbegin.o crtend.o"
01dc27ef 1335 install_headers_dir=install-headers-cpio
01dc27ef 1336 ;;
1337 i386-sun-sunos*) # Sun i386 roadrunner
9c1d888a 1338 xm_defines=USG
01dc27ef 1339 tm_file=i386/sun.h
1340 use_collect2=yes
1341 ;;
bf3637a9 1342changequote(,)dnl
1343 i[34567]86-wrs-vxworks*)
1344changequote([,])dnl
aee6eb43 1345 tm_file=i386/vxi386.h
1346 tmake_file=i386/t-i386bare
2740f581 1347 thread_file='vxworks'
aee6eb43 1348 ;;
bf3637a9 1349changequote(,)dnl
1350 i[34567]86-*-aout*)
1351changequote([,])dnl
01dc27ef 1352 tm_file=i386/i386-aout.h
1353 tmake_file=i386/t-i386bare
1354 ;;
397f1574 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'
397f1574 1374 ;;
bf3637a9 1375changequote(,)dnl
1376 i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
1377changequote([,])dnl
01dc27ef 1378 tm_file=i386/bsd386.h
01dc27ef 1379# tmake_file=t-libc-ok
1380 ;;
bf3637a9 1381changequote(,)dnl
1382 i[34567]86-*-bsd*)
1383changequote([,])dnl
01dc27ef 1384 tm_file=i386/386bsd.h
01dc27ef 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 ;;
bf3637a9 1389changequote(,)dnl
1390 i[34567]86-*-freebsdelf*)
1391changequote([,])dnl
d8e70214 1392 tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd-elf.h i386/perform.h"
259cb57d 1393 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
d4eb5ef4 1394 tmake_file=t-freebsd
01dc27ef 1395 gas=yes
1396 gnu_ld=yes
1397 stabs=yes
750bd420 1398 case x${enable_threads} in
1399 xyes | xpthreads | xposix)
1400 thread_file='posix'
6ee3067a 1401 tmake_file="${tmake_file} t-freebsd-thread"
750bd420 1402 ;;
1403 esac
01dc27ef 1404 ;;
bf3637a9 1405changequote(,)dnl
1406 i[34567]86-*-freebsd*)
1407changequote([,])dnl
d8e70214 1408 tm_file="i386/freebsd.h i386/perform.h"
d4eb5ef4 1409 tmake_file=t-freebsd
01dc27ef 1410 ;;
bf3637a9 1411changequote(,)dnl
3394a88b 1412 i[34567]86-*-netbsd*)
bf3637a9 1413changequote([,])dnl
01dc27ef 1414 tm_file=i386/netbsd.h
249c8489 1415 tmake_file=t-netbsd
56863dd8 1416 use_collect2=yes
01dc27ef 1417 ;;
3394a88b 1418changequote(,)dnl
1419 i[34567]86-*-openbsd*)
1420changequote([,])dnl
3394a88b 1421 # we need collect2 until our bug is fixed...
1422 use_collect2=yes
1423 ;;
bf3637a9 1424changequote(,)dnl
1425 i[34567]86-*-coff*)
1426changequote([,])dnl
01dc27ef 1427 tm_file=i386/i386-coff.h
1428 tmake_file=i386/t-i386bare
1429 ;;
bf3637a9 1430changequote(,)dnl
1431 i[34567]86-*-isc*) # 80386 running ISC system
1432changequote([,])dnl
9c1d888a 1433 xm_file="${xm_file} i386/xm-isc.h"
1434 xm_defines="USG SVR3"
01dc27ef 1435 case $machine in
bf3637a9 1436changequote(,)dnl
1437 i[34567]86-*-isc[34]*)
1438changequote([,])dnl
01dc27ef 1439 xmake_file=i386/x-isc3
1440 ;;
1441 *)
1442 xmake_file=i386/x-isc
1443 ;;
1444 esac
bf3637a9 1445 if test x$gas = xyes -a x$stabs = xyes
01dc27ef 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
01dc27ef 1456 ;;
bf3637a9 1457changequote(,)dnl
1458 i[34567]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
1459changequote([,])dnl # with a.out format using
9c1d888a 1460 # pre BFD linkers
01dc27ef 1461 xmake_file=x-linux-aout
1462 tmake_file="t-linux-aout i386/t-crtstuff"
1463 tm_file=i386/linux-oldld.h
01dc27ef 1464 gnu_ld=yes
5919710f 1465 float_format=i386
01dc27ef 1466 ;;
bf3637a9 1467changequote(,)dnl
1468 i[34567]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
1469changequote([,])dnl # with a.out format
01dc27ef 1470 xmake_file=x-linux-aout
1471 tmake_file="t-linux-aout i386/t-crtstuff"
1472 tm_file=i386/linux-aout.h
01dc27ef 1473 gnu_ld=yes
5919710f 1474 float_format=i386
01dc27ef 1475 ;;
bf3637a9 1476changequote(,)dnl
1477 i[34567]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
1478changequote([,])dnl # with ELF format using the
9c1d888a 1479 # GNU/Linux C library 5
1480 xmake_file=x-linux
1481 tm_file=i386/linux.h
b603e43f 1482 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
1483 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
b603e43f 1484 gnu_ld=yes
5919710f 1485 float_format=i386
bf3637a9 1486 if test x$enable_threads = xyes; then
b603e43f 1487 thread_file='single'
1488 fi
1489 ;;
bf3637a9 1490changequote(,)dnl
1491 i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
1492changequote([,])dnl # with ELF format using glibc 2
9c1d888a 1493 # aka GNU/Linux C library 6
1494 xmake_file=x-linux
01dc27ef 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"
01dc27ef 1498 gnu_ld=yes
5919710f 1499 float_format=i386
bf3637a9 1500 if test x$enable_threads = xyes; then
b603e43f 1501 thread_file='posix'
1502 fi
01dc27ef 1503 ;;
bf3637a9 1504changequote(,)dnl
1505 i[34567]86-*-gnu*)
5f3760f6 1506 float_format=i386
bf3637a9 1507changequote([,])dnl
9c1d888a 1508 ;;
bf3637a9 1509changequote(,)dnl
1510 i[34567]86-go32-msdos | i[34567]86-*-go32*)
1511changequote([,])dnl
bb5796b1 1512 echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead."
c4d002b9 1513 exit 1
01dc27ef 1514 ;;
bf3637a9 1515changequote(,)dnl
1516 i[34567]86-pc-msdosdjgpp*)
1517changequote([,])dnl
bb5796b1 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
9c1d888a 1522 gnu_ld=yes
1523 gas=yes
384dce53 1524 exeext=.exe
bb5796b1 1525 case $host in *pc-msdosdjgpp*)
384dce53 1526 target_alias=djgpp
1527 ;;
1528 esac
01dc27ef 1529 ;;
bf3637a9 1530changequote(,)dnl
1531 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1532changequote([,])dnl
01dc27ef 1533 tm_file=i386/moss.h
1534 tmake_file=t-libc-ok
01dc27ef 1535 gnu_ld=yes
1536 gas=yes
1537 ;;
bf3637a9 1538changequote(,)dnl
1539 i[34567]86-*-lynxos*)
1540changequote([,])dnl
1541 if test x$gas = xyes
01dc27ef 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 ;;
bf3637a9 1551changequote(,)dnl
1552 i[34567]86-*-mach*)
1553changequote([,])dnl
01dc27ef 1554 tm_file=i386/mach.h
1555# tmake_file=t-libc-ok
1556 use_collect2=yes
1557 ;;
bf3637a9 1558changequote(,)dnl
1559 i[34567]86-*-osfrose*) # 386 using OSF/rose
1560changequote([,])dnl
1561 if test x$elf = xyes
01dc27ef 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
9c1d888a 1569 xm_file="i386/xm-osf.h ${xm_file}"
01dc27ef 1570 xmake_file=i386/x-osfrose
1571 tmake_file=i386/t-osf
1572 extra_objs=halfpic.o
1573 ;;
bf3637a9 1574changequote(,)dnl
1575 i[34567]86-go32-rtems*)
1576changequote([,])dnl
01dc27ef 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 ;;
bf3637a9 1582changequote(,)dnl
2eba8a5a 1583 i[34567]86-*-rtemscoff*)
bf3637a9 1584changequote([,])dnl
c5aa1e92 1585 cpu_type=i386
2eba8a5a 1586 tm_file=i386/rtems.h
1587 tmake_file="i386/t-i386bare t-rtems"
c5aa1e92 1588 ;;
bf3637a9 1589changequote(,)dnl
2eba8a5a 1590 i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
bf3637a9 1591changequote([,])dnl
01dc27ef 1592 cpu_type=i386
2eba8a5a 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"
01dc27ef 1596 ;;
bf3637a9 1597changequote(,)dnl
1598 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1599changequote([,])dnl
831ac869 1600 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
9c1d888a 1601 xm_defines="USG SVR3"
01dc27ef 1602 xmake_file=i386/x-sco5
b8c567a1 1603 install_headers_dir=install-headers-cpio
01dc27ef 1604 tm_file=i386/sco5.h
bf3637a9 1605 if test x$gas = xyes
a9928858 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
2b47ded2 1612 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
01dc27ef 1613 ;;
bf3637a9 1614changequote(,)dnl
1615 i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
1616changequote([,])dnl
9c1d888a 1617 xm_file="${xm_file} i386/xm-sco.h"
831ac869 1618 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
01dc27ef 1619 xmake_file=i386/x-sco4
01dc27ef 1620 install_headers_dir=install-headers-cpio
bf3637a9 1621 if test x$stabs = xyes
01dc27ef 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
a5ab2840 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
01dc27ef 1635 ;;
bf3637a9 1636changequote(,)dnl
1637 i[34567]86-*-sco*) # 80386 running SCO system
1638changequote([,])dnl
01dc27ef 1639 xm_file=i386/xm-sco.h
1640 xmake_file=i386/x-sco
01dc27ef 1641 install_headers_dir=install-headers-cpio
bf3637a9 1642 if test x$stabs = xyes
01dc27ef 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 ;;
bf3637a9 1654changequote(,)dnl
1655 i[34567]86-*-solaris2*)
1656changequote([,])dnl
831ac869 1657 xm_file="xm-alloca.h ${xm_file}"
9c1d888a 1658 xm_defines="USG POSIX SMALL_ARG_MAX"
976c315c 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}"
01dc27ef 1663 fi
1664 tmake_file=i386/t-sol2
9c1d888a 1665 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
01dc27ef 1666 xmake_file=x-svr4
006523dc 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
3e637c99 1677 thread_file='solaris'
006523dc 1678 fi
3e637c99 1679 fi
01dc27ef 1680 ;;
bf3637a9 1681changequote(,)dnl
1682 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
1683changequote([,])dnl
831ac869 1684 xm_file="xm-alloca.h ${xm_file}"
9e3a498a 1685 xm_defines="USG POSIX"
01e3f716 1686 tm_file=i386/sysv5.h
bf3637a9 1687 if test x$stabs = xyes
53202fac 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"
72d99199 1694 if test x$enable_threads = xyes; then
1695 thread_file='posix'
1696 fi
53202fac 1697 ;;
bf3637a9 1698changequote(,)dnl
1699 i[34567]86-*-sysv4*) # Intel 80386's running system V.4
1700changequote([,])dnl
831ac869 1701 xm_file="xm-alloca.h ${xm_file}"
9c1d888a 1702 xm_defines="USG POSIX SMALL_ARG_MAX"
01dc27ef 1703 tm_file=i386/sysv4.h
bf3637a9 1704 if test x$stabs = xyes
01dc27ef 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 ;;
c323ddc4 1712changequote(,)dnl
1713 i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
1714changequote([,])dnl
831ac869 1715 xm_file="xm-alloca.h ${xm_file}"
c323ddc4 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"
c7ebe2fd 1721 install_headers_dir=install-headers-cpio
c323ddc4 1722 ;;
bf3637a9 1723changequote(,)dnl
1724 i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1725changequote([,])dnl
c5aa1e92 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"
bf3637a9 1729 if test x$stabs = xyes
c5aa1e92 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 ;;
bf3637a9 1739changequote(,)dnl
1740 i[34567]86-*-sysv*) # Intel 80386's running system V
1741changequote([,])dnl
9c1d888a 1742 xm_defines="USG SVR3"
01dc27ef 1743 xmake_file=i386/x-sysv3
bf3637a9 1744 if test x$gas = xyes
01dc27ef 1745 then
bf3637a9 1746 if test x$stabs = xyes
01dc27ef 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
c5aa1e92 1763 xm_file="${xm_file} i386/xm-vsta.h"
01dc27ef 1764 tm_file=i386/vsta.h
1765 tmake_file=i386/t-vsta
1766 xmake_file=i386/x-vsta
1767 ;;
bf3637a9 1768changequote(,)dnl
1769 i[34567]86-*-win32)
1770changequote([,])dnl
e678484c 1771 xm_file="${xm_file} i386/xm-cygwin.h"
1772 tmake_file=i386/t-cygwin
e82d40e3 1773 tm_file=i386/win32.h
e678484c 1774 xmake_file=i386/x-cygwin
e82d40e3 1775 extra_objs=winnt.o
bf3637a9 1776 if test x$enable_threads = xyes; then
e82d40e3 1777 thread_file='win32'
1778 fi
1779 exeext=.exe
1780 ;;
bf3637a9 1781changequote(,)dnl
e678484c 1782 i[34567]86-*-pe | i[34567]86-*-cygwin*)
bf3637a9 1783changequote([,])dnl
e678484c 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
01dc27ef 1788 extra_objs=winnt.o
bf3637a9 1789 if test x$enable_threads = xyes; then
3e637c99 1790 thread_file='win32'
1791 fi
01dc27ef 1792 exeext=.exe
1793 ;;
bf3637a9 1794changequote(,)dnl
1795 i[34567]86-*-mingw32*)
1796changequote([,])dnl
82e28b53 1797 tm_file=i386/mingw32.h
1798 xm_file="${xm_file} i386/xm-mingw32.h"
e678484c 1799 tmake_file="i386/t-cygwin i386/t-mingw32"
82e28b53 1800 extra_objs=winnt.o
e678484c 1801 xmake_file=i386/x-cygwin
bf3637a9 1802 if test x$enable_threads = xyes; then
3e637c99 1803 thread_file='win32'
1804 fi
82e28b53 1805 exeext=.exe
9c1d888a 1806 case $machine in
1807 *mingw32msv*)
1808 ;;
1809 *minwg32crt* | *mingw32*)
1810 tm_file="${tm_file} i386/crtdll.h"
1811 ;;
1812 esac
82e28b53 1813 ;;
f1959ea2 1814changequote(,)dnl
1815 i[34567]86-*-uwin*)
1816changequote([,])dnl
1817 tm_file=i386/uwin.h
1818 xm_file="${xm_file} i386/xm-uwin.h"
831ac869 1819 xm_defines="USG NO_STAB_H"
f1959ea2 1820 tmake_file="i386/t-cygwin i386/t-uwin"
1821 extra_objs=winnt.o
1822 xmake_file=i386/x-cygwin
f1959ea2 1823 if test x$enable_threads = xyes; then
1824 thread_file='win32'
1825 fi
1826 exeext=.exe
1827 ;;
8361f1af 1828changequote(,)dnl
1829 i[34567]86-*-interix*)
1830changequote([,])dnl
519e7188 1831 tm_file="i386/i386-interix.h interix.h"
9f6c9157 1832 xm_file="i386/xm-i386-interix.h xm-interix.h"
831ac869 1833 xm_defines="USG"
8361f1af 1834 tmake_file="i386/t-interix"
1835 extra_objs=interix.o
1836 xmake_file=x-interix
519e7188 1837 if test x$enable_threads = xyes ; then
8361f1af 1838 thread_file='posix'
1839 fi
519e7188 1840 if test x$stabs = xyes ; then
8361f1af 1841 tm_file="${tm_file} dbxcoff.h"
1842 fi
1843 ;;
bf3637a9 1844changequote(,)dnl
1845 i[34567]86-*-winnt3*)
1846changequote([,])dnl
01dc27ef 1847 tm_file=i386/win-nt.h
1848 out_file=i386/i386.c
9c1d888a 1849 xm_file="xm-winnt.h ${xm_file}"
01dc27ef 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"
bf3637a9 1854 if test x$gnu_ld != xyes
01dc27ef 1855 then
1856 extra_programs=ld.exe
1857 fi
bf3637a9 1858 if test x$enable_threads = xyes; then
3e637c99 1859 thread_file='win32'
1860 fi
01dc27ef 1861 ;;
bf3637a9 1862changequote(,)dnl
1863 i[34567]86-dg-dgux*)
1864changequote([,])dnl
831ac869 1865 xm_file="xm-alloca.h ${xm_file}"
9c1d888a 1866 xm_defines="USG POSIX"
01dc27ef 1867 out_file=i386/dgux.c
1868 tm_file=i386/dgux.h
1869 tmake_file=i386/t-dgux
1870 xmake_file=i386/x-dgux
01dc27ef 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"
ad87de1e 1875 xm_file="${xm_file}"
01dc27ef 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"
bf3637a9 1882 if test x$gas = xyes
01dc27ef 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"
9c1d888a 1894 xm_defines="USG SVR3"
01dc27ef 1895 tmake_file=t-osf
01dc27ef 1896 ;;
1897 i860-*-sysv3*)
1898 tm_file="${tm_file} svr3.h i860/sysv3.h"
9c1d888a 1899 xm_defines="USG SVR3"
01dc27ef 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"
9c1d888a 1905 xm_defines="USG SVR3"
01dc27ef 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
26fbb0d3 1914 thread_file='vxworks'
01dc27ef 1915 ;;
8fe3f4f2 1916 i960-wrs-vxworks5* | i960-wrs-vxworks)
01dc27ef 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
26fbb0d3 1920 thread_file='vxworks'
01dc27ef 1921 ;;
1922 i960-wrs-vxworks*)
1923 tm_file="${tm_file} i960/vx960.h"
1924 tmake_file=i960/t-vxworks960
1925 use_collect2=yes
26fbb0d3 1926 thread_file='vxworks'
01dc27ef 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 ;;
ac445222 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 ;;
1e7c52a6 1962 m32r-*-elf*)
1963 extra_parts="crtinit.o crtfini.o"
1964 ;;
01dc27ef 1965 m68000-convergent-sysv*)
1966 tm_file=m68k/ctix.h
9c1d888a 1967 xm_file="m68k/xm-3b1.h ${xm_file}"
1968 xm_defines=USG
01dc27ef 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
c7165608 1979 xm_file="xm-alloca.h ${xm_file}"
831ac869 1980 xm_defines="USG"
bf3637a9 1981 if test x$gas = xyes
01dc27ef 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
01dc27ef 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*)
9c1d888a 2004 xm_file="m68k/xm-3b1.h ${xm_file}"
2005 xm_defines=USG
bf3637a9 2006 if test x$gas = xyes
01dc27ef 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
9c1d888a 2016 xm_defines="USG AUX"
01dc27ef 2017 tmake_file=m68k/t-aux
01dc27ef 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=
bf3637a9 2022 if test "$gnu_ld" = yes
01dc27ef 2023 then
2024 tm_file="${tm_file} m68k/auxgld.h"
2025 else
2026 tm_file="${tm_file} m68k/auxld.h"
2027 fi
bf3637a9 2028 if test "$gas" = yes
01dc27ef 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"
a2a874ea 2035 float_format=m68k
01dc27ef 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
a2a874ea 2042 float_format=m68k
01dc27ef 2043 ;;
2044 m68k-altos-sysv*) # Altos 3068
bf3637a9 2045 if test x$gas = xyes
01dc27ef 2046 then
2047 tm_file=m68k/altos3068.h
9c1d888a 2048 xm_defines=USG
01dc27ef 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
bf3637a9 2056 if test x$gas = xyes
01dc27ef 2057 then
bf3637a9 2058 if test x$stabs = xyes
01dc27ef 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
9c1d888a 2067 xm_file="xm-alloca.h ${xm_file}"
2068 xm_defines=USG
01dc27ef 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
9c1d888a 2075 xm_file="xm-alloca.h ${xm_file}"
2076 xm_defines="USG FULL_PROTOTYPES"
01dc27ef 2077 tmake_file=t-svr4
2078 extra_parts="crtbegin.o crtend.o"
2079 extra_headers=math-68881.h
a2a874ea 2080 float_format=m68k
01dc27ef 2081 ;;
2082 m68k-motorola-sysv*)
2083 tm_file=m68k/mot3300.h
9c1d888a 2084 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
bf3637a9 2085 if test x$gas = xyes
01dc27ef 2086 then
2087 xmake_file=m68k/x-mot3300-gas
bf3637a9 2088 if test x$gnu_ld = xyes
01dc27ef 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
bf3637a9 2097 if test x$gnu_ld = xyes
01dc27ef 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
a2a874ea 2108 float_format=m68k
01dc27ef 2109 ;;
2110 m68k-ncr-sysv*) # NCR Tower 32 SVR3
2111 tm_file=m68k/tower-as.h
9c1d888a 2112 xm_defines="USG SVR3"
01dc27ef 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
9c1d888a 2119 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
2120 xm_defines=USG
01dc27ef 2121 use_collect2=yes
2122 extra_headers=math-68881.h
2123 ;;
2124 m68k-tti-*)
2125 tm_file=m68k/pbb.h
9c1d888a 2126 xm_file="xm-alloca.h ${xm_file}"
2127 xm_defines=USG
01dc27ef 2128 extra_headers=math-68881.h
2129 ;;
2130 m68k-crds-unos*)
9c1d888a 2131 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
2132 xm_defines="USG unos"
01dc27ef 2133 xmake_file=m68k/x-crds
2134 tm_file=m68k/crds.h
01dc27ef 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
9c1d888a 2140 xm_file="xm-alloca.h ${xm_file}"
2141 xm_defines="USG FULL_PROTOTYPES"
01dc27ef 2142 xmake_file=m68k/x-amix
2143 tmake_file=t-svr4
2144 extra_parts="crtbegin.o crtend.o"
2145 extra_headers=math-68881.h
a2a874ea 2146 float_format=m68k
01dc27ef 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
a2a874ea 2153 float_format=m68k
01dc27ef 2154 ;;
2155 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
2156 tm_file=m68k/hp3bsd44.h
b4958679 2157 xmake_file=m68k/x-hp3bsd44
01dc27ef 2158 use_collect2=yes
2159 extra_headers=math-68881.h
a2a874ea 2160 float_format=m68k
01dc27ef 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
a2a874ea 2166 float_format=m68k
01dc27ef 2167 ;;
2168 m68k-isi-bsd*)
bf3637a9 2169 if test x$with_fp = xno
01dc27ef 2170 then
2171 tm_file=m68k/isi-nfp.h
2172 else
2173 tm_file=m68k/isi.h
a2a874ea 2174 float_format=m68k
01dc27ef 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.
c7165608 2180 xm_file="xm-alloca.h ${xm_file}"
831ac869 2181 xm_defines="USG"
bf3637a9 2182 if test x$gas = xyes
01dc27ef 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
01dc27ef 2190 install_headers_dir=install-headers-cpio
2191 use_collect2=yes
2192 extra_headers=math-68881.h
a2a874ea 2193 float_format=m68k
01dc27ef 2194 ;;
2195 m68k-hp-hpux*) # HP 9000 series 300
c7165608 2196 xm_file="xm-alloca.h ${xm_file}"
831ac869 2197 xm_defines="USG"
bf3637a9 2198 if test x$gas = xyes
01dc27ef 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
01dc27ef 2206 install_headers_dir=install-headers-cpio
2207 use_collect2=yes
2208 extra_headers=math-68881.h
a2a874ea 2209 float_format=m68k
01dc27ef 2210 ;;
2211 m68k-sun-mach*)
2212 tm_file=m68k/sun3mach.h
2213 use_collect2=yes
2214 extra_headers=math-68881.h
a2a874ea 2215 float_format=m68k
01dc27ef 2216 ;;
2217 m68k-sony-newsos3*)
bf3637a9 2218 if test x$gas = xyes
01dc27ef 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
a2a874ea 2226 float_format=m68k
01dc27ef 2227 ;;
2228 m68k-sony-bsd* | m68k-sony-newsos*)
bf3637a9 2229 if test x$gas = xyes
01dc27ef 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
a2a874ea 2237 float_format=m68k
01dc27ef 2238 ;;
2239 m68k-next-nextstep2*)
2240 tm_file=m68k/next21.h
9c1d888a 2241 xm_file="m68k/xm-next.h ${xm_file}"
01dc27ef 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
a2a874ea 2247 float_format=m68k
01dc27ef 2248 ;;
2d08016c 2249changequote(,)dnl
2250 m68k-next-nextstep[34]*)
2251changequote([,])dnl
01dc27ef 2252 tm_file=m68k/next.h
9c1d888a 2253 xm_file="m68k/xm-next.h ${xm_file}"
01dc27ef 2254 tmake_file=m68k/t-next
2255 xmake_file=m68k/x-next
2256 extra_objs=nextstep.o
5c61dffd 2257 extra_parts="crtbegin.o crtend.o"
01dc27ef 2258 extra_headers=math-68881.h
a2a874ea 2259 float_format=m68k
bf3637a9 2260 if test x$enable_threads = xyes; then
3e637c99 2261 thread_file='mach'
2262 fi
01dc27ef 2263 ;;
2264 m68k-sun-sunos3*)
bf3637a9 2265 if test x$with_fp = xno
01dc27ef 2266 then
2267 tm_file=m68k/sun3n3.h
2268 else
2269 tm_file=m68k/sun3o3.h
a2a874ea 2270 float_format=m68k
01dc27ef 2271 fi
2272 use_collect2=yes
2273 extra_headers=math-68881.h
2274 ;;
2275 m68k-sun-sunos*) # For SunOS 4 (the default).
bf3637a9 2276 if test x$with_fp = xno
01dc27ef 2277 then
2278 tm_file=m68k/sun3n.h
2279 else
2280 tm_file=m68k/sun3.h
a2a874ea 2281 float_format=m68k
01dc27ef 2282 fi
01dc27ef 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
26fbb0d3 2290 thread_file='vxworks'
a2a874ea 2291 float_format=m68k
01dc27ef 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
a2a874ea 2297 float_format=m68k
01dc27ef 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
a2a874ea 2303 float_format=m68k
01dc27ef 2304 ;;
2927db06 2305 m68020-*-elf* | m68k-*-elf*)
293be640 2306 tm_file="m68k/m68020-elf.h"
2927db06 2307 xm_file=m68k/xm-m68kv.h
2308 tmake_file=m68k/t-m68kelf
2309 header_files=math-68881.h
2310 ;;
01dc27ef 2311 m68k-*-lynxos*)
bf3637a9 2312 if test x$gas = xyes
01dc27ef 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
a2a874ea 2322 float_format=m68k
01dc27ef 2323 ;;
f2c5c1a5 2324 m68k*-*-netbsd*)
01dc27ef 2325 tm_file=m68k/netbsd.h
249c8489 2326 tmake_file=t-netbsd
a2a874ea 2327 float_format=m68k
56863dd8 2328 use_collect2=yes
01dc27ef 2329 ;;
3394a88b 2330 m68k*-*-openbsd*)
2331 float_format=m68k
2332 # we need collect2 until our bug is fixed...
2333 use_collect2=yes
2334 ;;
01dc27ef 2335 m68k-*-sysv3*) # Motorola m68k's running system V.3
9c1d888a 2336 xm_file="xm-alloca.h ${xm_file}"
2337 xm_defines=USG
01dc27ef 2338 xmake_file=m68k/x-m68kv
2339 extra_parts="crtbegin.o crtend.o"
2340 extra_headers=math-68881.h
a2a874ea 2341 float_format=m68k
01dc27ef 2342 ;;
2343 m68k-*-sysv4*) # Motorola m68k's running system V.4
2344 tm_file=m68k/m68kv4.h
9c1d888a 2345 xm_file="xm-alloca.h ${xm_file}"
2346 xm_defines=USG
01dc27ef 2347 tmake_file=t-svr4
2348 extra_parts="crtbegin.o crtend.o"
2349 extra_headers=math-68881.h
a2a874ea 2350 float_format=m68k
01dc27ef 2351 ;;
ad87de1e 2352 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
9c1d888a 2353 # with a.out format
01dc27ef 2354 xmake_file=x-linux
2355 tm_file=m68k/linux-aout.h
2356 tmake_file="t-linux-aout m68k/t-linux-aout"
01dc27ef 2357 extra_headers=math-68881.h
a2a874ea 2358 float_format=m68k
01dc27ef 2359 gnu_ld=yes
01dc27ef 2360 ;;
ad87de1e 2361 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
9c1d888a 2362 # with ELF format using the
2363 # GNU/Linux C library 5
2364 xmake_file=x-linux
ee4e3e9e 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"
ee4e3e9e 2368 extra_headers=math-68881.h
a2a874ea 2369 float_format=m68k
ee4e3e9e 2370 gnu_ld=yes
2371 ;;
ad87de1e 2372 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
9c1d888a 2373 # with ELF format using glibc 2
2374 # aka the GNU/Linux C library 6.
2375 xmake_file=x-linux
01dc27ef 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"
01dc27ef 2379 extra_headers=math-68881.h
a2a874ea 2380 float_format=m68k
01dc27ef 2381 gnu_ld=yes
bf3637a9 2382 if test x$enable_threads = xyes; then
ee4e3e9e 2383 thread_file='posix'
2384 fi
01dc27ef 2385 ;;
2386 m68k-*-psos*)
2387 tmake_file=m68k/t-m68kbare
2388 tm_file=m68k/m68k-psos.h
2389 extra_headers=math-68881.h
a2a874ea 2390 float_format=m68k
01dc27ef 2391 ;;
85abd4b7 2392 m68k-*-rtemscoff*)
01dc27ef 2393 tmake_file="m68k/t-m68kbare t-rtems"
2394 tm_file=m68k/rtems.h
2395 extra_headers=math-68881.h
a2a874ea 2396 float_format=m68k
01dc27ef 2397 ;;
85abd4b7 2398 m68k-*-rtemself*|m68k-*-rtems*)
b08afc9b 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 ;;
01dc27ef 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"
01dc27ef 2416 xmake_file=m88k/x-dgux
bf3637a9 2417 if test x$gas = xyes
01dc27ef 2418 then
2419 tmake_file=m88k/t-dgux-gas
2420 fi
01dc27ef 2421 ;;
2422 m88k-dolphin-sysv3*)
2423 tm_file=m88k/dolph.h
2424 extra_parts="crtbegin.o crtend.o"
9c1d888a 2425 xm_file="m88k/xm-sysv3.h ${xm_file}"
01dc27ef 2426 xmake_file=m88k/x-dolph
bf3637a9 2427 if test x$gas = xyes
01dc27ef 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"
9c1d888a 2435 xm_file="m88k/xm-sysv3.h ${xm_file}"
01dc27ef 2436 xmake_file=m88k/x-tekXD88
bf3637a9 2437 if test x$gas = xyes
01dc27ef 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"
bf3637a9 2452 if test x$gas = xyes
01dc27ef 2453 then
2454 tmake_file=m88k/t-luna-gas
2455 else
2456 tmake_file=m88k/t-luna
2457 fi
2458 ;;
3394a88b 2459 m88k-*-openbsd*)
2460 tmake_file="${tmake_file} m88k/t-luna-gas"
2461 ;;
01dc27ef 2462 m88k-*-sysv3*)
2463 tm_file=m88k/sysv3.h
2464 extra_parts="crtbegin.o crtend.o"
9c1d888a 2465 xm_file="m88k/xm-sysv3.h ${xm_file}"
01dc27ef 2466 xmake_file=m88k/x-sysv3
bf3637a9 2467 if test x$gas = xyes
01dc27ef 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 ;;
68fec005 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 ;;
01dc27ef 2486 mips-sgi-irix6*) # SGI System V.4., IRIX 6
090cf5ce 2487 if test "x$gnu_ld" = xyes
2488 then
2489 tm_file="mips/iris6.h mips/iris6gld.h"
090cf5ce 2490 else
2491 tm_file=mips/iris6.h
090cf5ce 2492 fi
fb3d2a07 2493 tmake_file=mips/t-iris6
01dc27ef 2494 xm_file=mips/xm-iris6.h
01dc27ef 2495 xmake_file=mips/x-iris6
4cad90e6 2496# if test x$enable_threads = xyes; then
f7ae7e3e 2497# thread_file='irix'
4cad90e6 2498# fi
01dc27ef 2499 ;;
d9b282d9 2500 mips-wrs-vxworks)
293be640 2501 tm_file="mips/elf.h mips/vxworks.h"
d9b282d9 2502 tmake_file=mips/t-ecoff
2503 gas=yes
2504 gnu_ld=yes
2505 extra_parts="crtbegin.o crtend.o"
631a509c 2506 thread_file='vxworks'
d9b282d9 2507 ;;
01dc27ef 2508 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
9c1d888a 2509 tm_file="mips/iris6.h mips/cross64.h"
84db23dc 2510 xm_defines=USG
2511 xm_file="mips/xm-iris5.h"
01dc27ef 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
4cad90e6 2516# if test x$enable_threads = xyes; then
f7ae7e3e 2517# thread_file='irix'
4cad90e6 2518# fi
01dc27ef 2519 ;;
2520 mips-sni-sysv4)
bf3637a9 2521 if test x$gas = xyes
01dc27ef 2522 then
bf3637a9 2523 if test x$stabs = xyes
01dc27ef 2524 then
2525 tm_file=mips/iris5gdb.h
2526 else
9c1d888a 2527 tm_file="mips/sni-svr4.h mips/sni-gas.h"
01dc27ef 2528 fi
2529 else
2530 tm_file=mips/sni-svr4.h
2531 fi
9c1d888a 2532 xm_defines=USG
01dc27ef 2533 xmake_file=mips/x-sni-svr4
2534 tmake_file=mips/t-mips-gas
bf3637a9 2535 if test x$gnu_ld != xyes
01dc27ef 2536 then
2537 use_collect2=yes
2538 fi
01dc27ef 2539 ;;
2540 mips-sgi-irix5*) # SGI System V.4., IRIX 5
bf3637a9 2541 if test x$gas = xyes
01dc27ef 2542 then
9c1d888a 2543 tm_file="mips/iris5.h mips/iris5gas.h"
bf3637a9 2544 if test x$stabs = xyes
01dc27ef 2545 then
2546 tm_file="${tm_file} dbx.h"
2547 fi
2548 else
2549 tm_file=mips/iris5.h
2550 fi
84db23dc 2551 xm_defines=USG
2552 xm_file="mips/xm-iris5.h"
01dc27ef 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
4cad90e6 2558# if test x$enable_threads = xyes; then
f7ae7e3e 2559# thread_file='irix'
4cad90e6 2560# fi
01dc27ef 2561 ;;
2562 mips-sgi-irix4loser*) # Mostly like a MIPS.
9c1d888a 2563 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
bf3637a9 2564 if test x$stabs = xyes; then
01dc27ef 2565 tm_file="${tm_file} dbx.h"
2566 fi
9c1d888a 2567 xm_defines=USG
01dc27ef 2568 xmake_file=mips/x-iris
bf3637a9 2569 if test x$gas = xyes
01dc27ef 2570 then
2571 tmake_file=mips/t-mips-gas
2572 else
2573 extra_passes="mips-tfile mips-tdump"
2574 fi
bf3637a9 2575 if test x$gnu_ld != xyes
01dc27ef 2576 then
2577 use_collect2=yes
2578 fi
4cad90e6 2579# if test x$enable_threads = xyes; then
f7ae7e3e 2580# thread_file='irix'
4cad90e6 2581# fi
01dc27ef 2582 ;;
2583 mips-sgi-irix4*) # Mostly like a MIPS.
9c1d888a 2584 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
bf3637a9 2585 if test x$stabs = xyes; then
01dc27ef 2586 tm_file="${tm_file} dbx.h"
2587 fi
9c1d888a 2588 xm_defines=USG
01dc27ef 2589 xmake_file=mips/x-iris
bf3637a9 2590 if test x$gas = xyes
01dc27ef 2591 then
2592 tmake_file=mips/t-mips-gas
2593 else
2594 extra_passes="mips-tfile mips-tdump"
2595 fi
bf3637a9 2596 if test x$gnu_ld != xyes
01dc27ef 2597 then
2598 use_collect2=yes
2599 fi
4cad90e6 2600# if test x$enable_threads = xyes; then
f7ae7e3e 2601# thread_file='irix'
4cad90e6 2602# fi
01dc27ef 2603 ;;
2604 mips-sgi-*) # Mostly like a MIPS.
9c1d888a 2605 tm_file="mips/iris3.h ${tm_file}"
bf3637a9 2606 if test x$stabs = xyes; then
01dc27ef 2607 tm_file="${tm_file} dbx.h"
2608 fi
9c1d888a 2609 xm_defines=USG
01dc27ef 2610 xmake_file=mips/x-iris3
bf3637a9 2611 if test x$gas = xyes
01dc27ef 2612 then
2613 tmake_file=mips/t-mips-gas
2614 else
2615 extra_passes="mips-tfile mips-tdump"
2616 fi
bf3637a9 2617 if test x$gnu_ld != xyes
01dc27ef 2618 then
2619 use_collect2=yes
2620 fi
2621 ;;
2622 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
9c1d888a 2623 tm_file="mips/osfrose.h ${tm_file}"
01dc27ef 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
bf3637a9 2631 if test x$stabs = xyes; then
01dc27ef 2632 tm_file="${tm_file} dbx.h"
2633 fi
2634 xmake_file=mips/x-dec-osf1
bf3637a9 2635 if test x$gas = xyes
01dc27ef 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
bf3637a9 2642 if test x$gnu_ld != xyes
01dc27ef 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
bf3637a9 2649 if test x$gas = xyes
01dc27ef 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
bf3637a9 2656 if test x$gnu_ld != xyes
01dc27ef 2657 then
2658 use_collect2=yes
2659 fi
2660 ;;
f2c5c1a5 2661 mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
01dc27ef 2662 tm_file=mips/netbsd.h
ea09f6f0 2663 # On NetBSD, the headers are already okay, except for math.h.
249c8489 2664 tmake_file=t-netbsd
01dc27ef 2665 ;;
5f17a536 2666 mips*-*-linux*) # Linux MIPS, either endian.
501a6a1f 2667 xmake_file=x-linux
5f17a536 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
008a392d 2672 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
501a6a1f 2673 gnu_ld=yes
2674 gas=yes
008a392d 2675 if test x$enable_threads = xyes; then
2676 thread_file='posix'
2677 fi
501a6a1f 2678 ;;
3394a88b 2679 mips*el-*-openbsd*) # mips little endian
2680 target_cpu_default="MASK_GAS|MASK_ABICALLS"
3394a88b 2681 ;;
2682 mips*-*-openbsd*) # mips big endian
2683 target_cpu_default="MASK_GAS|MASK_ABICALLS"
8d1a057e 2684 tm_file="mips/openbsd-be.h ${tm_file}"
3394a88b 2685 ;;
01dc27ef 2686 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
9c1d888a 2687 tm_file="mips/news4.h ${tm_file}"
bf3637a9 2688 if test x$stabs = xyes; then
01dc27ef 2689 tm_file="${tm_file} dbx.h"
2690 fi
bf3637a9 2691 if test x$gas = xyes
01dc27ef 2692 then
2693 tmake_file=mips/t-mips-gas
2694 else
2695 extra_passes="mips-tfile mips-tdump"
2696 fi
bf3637a9 2697 if test x$gnu_ld != xyes
01dc27ef 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.
9c1d888a 2706 tm_file="mips/news5.h ${tm_file}"
bf3637a9 2707 if test x$stabs = xyes; then
01dc27ef 2708 tm_file="${tm_file} dbx.h"
2709 fi
9c1d888a 2710 xm_defines=USG
bf3637a9 2711 if test x$gas = xyes
01dc27ef 2712 then
2713 tmake_file=mips/t-mips-gas
2714 else
2715 extra_passes="mips-tfile mips-tdump"
2716 fi
bf3637a9 2717 if test x$gnu_ld != xyes
01dc27ef 2718 then
2719 use_collect2=yes
2720 fi
2721 ;;
2722 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
9c1d888a 2723 tm_file="mips/svr4-5.h mips/svr4-t.h"
bf3637a9 2724 if test x$stabs = xyes; then
01dc27ef 2725 tm_file="${tm_file} dbx.h"
2726 fi
9c1d888a 2727 xm_defines=USG
01dc27ef 2728 xmake_file=mips/x-sysv
bf3637a9 2729 if test x$gas = xyes
01dc27ef 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
bf3637a9 2737 if test x$gnu_ld != xyes
01dc27ef 2738 then
2739 use_collect2=yes
2740 fi
01dc27ef 2741 ;;
2742 mips-*-ultrix* | mips-dec-mach3) # Decstation.
9c1d888a 2743 tm_file="mips/ultrix.h ${tm_file}"
bf3637a9 2744 if test x$stabs = xyes; then
01dc27ef 2745 tm_file="${tm_file} dbx.h"
2746 fi
2747 xmake_file=mips/x-ultrix
bf3637a9 2748 if test x$gas = xyes
01dc27ef 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
bf3637a9 2755 if test x$gnu_ld != xyes
01dc27ef 2756 then
2757 use_collect2=yes
2758 fi
2759 ;;
bf3637a9 2760changequote(,)dnl
2761 mips-*-riscos[56789]bsd*)
2762changequote([,])dnl
01dc27ef 2763 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
bf3637a9 2764 if test x$stabs = xyes; then
01dc27ef 2765 tm_file="${tm_file} dbx.h"
2766 fi
bf3637a9 2767 if test x$gas = xyes
01dc27ef 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
bf3637a9 2774 if test x$gnu_ld != xyes
01dc27ef 2775 then
2776 use_collect2=yes
2777 fi
01dc27ef 2778 ;;
bf3637a9 2779changequote(,)dnl
2780 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
2781changequote([,])dnl
9c1d888a 2782 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
bf3637a9 2783 if test x$stabs = xyes; then
01dc27ef 2784 tm_file="${tm_file} dbx.h"
2785 fi
bf3637a9 2786 if test x$gas = xyes
01dc27ef 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
bf3637a9 2793 if test x$gnu_ld != xyes
01dc27ef 2794 then
2795 use_collect2=yes
2796 fi
01dc27ef 2797 ;;
bf3637a9 2798changequote(,)dnl
2799 mips-*-riscos[56789]sysv4*)
2800changequote([,])dnl
01dc27ef 2801 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
bf3637a9 2802 if test x$stabs = xyes; then
01dc27ef 2803 tm_file="${tm_file} dbx.h"
2804 fi
01dc27ef 2805 xmake_file=mips/x-sysv
bf3637a9 2806 if test x$gas = xyes
01dc27ef 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
bf3637a9 2813 if test x$gnu_ld != xyes
01dc27ef 2814 then
2815 use_collect2=yes
2816 fi
01dc27ef 2817 ;;
bf3637a9 2818changequote(,)dnl
2819 mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
2820changequote([,])dnl
9c1d888a 2821 tm_file="mips/svr4-4.h ${tm_file}"
bf3637a9 2822 if test x$stabs = xyes; then
01dc27ef 2823 tm_file="${tm_file} dbx.h"
2824 fi
9c1d888a 2825 xm_defines=USG
01dc27ef 2826 xmake_file=mips/x-sysv
bf3637a9 2827 if test x$gas = xyes
01dc27ef 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
bf3637a9 2834 if test x$gnu_ld != xyes
01dc27ef 2835 then
2836 use_collect2=yes
2837 fi
01dc27ef 2838 ;;
bf3637a9 2839changequote(,)dnl
2840 mips-*-riscos[56789]sysv*)
2841changequote([,])dnl
01dc27ef 2842 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
bf3637a9 2843 if test x$stabs = xyes; then
01dc27ef 2844 tm_file="${tm_file} dbx.h"
2845 fi
9c1d888a 2846 xm_defines=USG
01dc27ef 2847 xmake_file=mips/x-sysv
bf3637a9 2848 if test x$gas = xyes
01dc27ef 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
bf3637a9 2855 if test x$gnu_ld != xyes
01dc27ef 2856 then
2857 use_collect2=yes
2858 fi
01dc27ef 2859 ;;
2860 mips-*-sysv* | mips-*-riscos*sysv*)
9c1d888a 2861 tm_file="mips/svr3-4.h ${tm_file}"
bf3637a9 2862 if test x$stabs = xyes; then
01dc27ef 2863 tm_file="${tm_file} dbx.h"
2864 fi
9c1d888a 2865 xm_defines=USG
01dc27ef 2866 xmake_file=mips/x-sysv
bf3637a9 2867 if test x$gas = xyes
01dc27ef 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
bf3637a9 2874 if test x$gnu_ld != xyes
01dc27ef 2875 then
2876 use_collect2=yes
2877 fi
01dc27ef 2878 ;;
bf3637a9 2879changequote(,)dnl
2880 mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0.
2881changequote([,])dnl
01dc27ef 2882 tm_file=mips/mips-5.h
bf3637a9 2883 if test x$stabs = xyes; then
01dc27ef 2884 tm_file="${tm_file} dbx.h"
2885 fi
bf3637a9 2886 if test x$gas = xyes
01dc27ef 2887 then
2888 tmake_file=mips/t-mips-gas
2889 else
2890 extra_passes="mips-tfile mips-tdump"
2891 fi
bf3637a9 2892 if test x$gnu_ld != xyes
01dc27ef 2893 then
2894 use_collect2=yes
2895 fi
01dc27ef 2896 ;;
2897 mips-*-gnu*)
2898 ;;
2899 mipsel-*-ecoff*)
2900 tm_file=mips/ecoffl.h
bf3637a9 2901 if test x$stabs = xyes; then
01dc27ef 2902 tm_file="${tm_file} dbx.h"
2903 fi
2904 tmake_file=mips/t-ecoff
2905 ;;
2906 mips-*-ecoff*)
cba0c052 2907 tm_file="gofast.h mips/ecoff.h"
bf3637a9 2908 if test x$stabs = xyes; then
01dc27ef 2909 tm_file="${tm_file} dbx.h"
2910 fi
2911 tmake_file=mips/t-ecoff
01dc27ef 2912 ;;
2913 mipsel-*-elf*)
293be640 2914 tm_file="mips/elfl.h"
10e7b2a2 2915 tmake_file=mips/t-elf
01dc27ef 2916 ;;
2917 mips-*-elf*)
10e7b2a2 2918 tm_file="mips/elf.h"
2919 tmake_file=mips/t-elf
01dc27ef 2920 ;;
2921 mips64el-*-elf*)
10e7b2a2 2922 tm_file="mips/elfl64.h"
2923 tmake_file=mips/t-elf
01dc27ef 2924 ;;
2925 mips64orionel-*-elf*)
293be640 2926 tm_file="mips/elforion.h mips/elfl64.h"
10e7b2a2 2927 tmake_file=mips/t-elf
01dc27ef 2928 ;;
2929 mips64-*-elf*)
10e7b2a2 2930 tm_file="mips/elf64.h"
2931 tmake_file=mips/t-elf
01dc27ef 2932 ;;
2933 mips64orion-*-elf*)
293be640 2934 tm_file="mips/elforion.h mips/elf64.h"
10e7b2a2 2935 tmake_file=mips/t-elf
01dc27ef 2936 ;;
2937 mips64orion-*-rtems*)
c0fc8b1d 2938 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
b08afc9b 2939 tmake_file="mips/t-elf t-rtems"
01dc27ef 2940 ;;
0dbd1c74 2941 mipstx39el-*-elf*)
10e7b2a2 2942 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
cef0b7b2 2943 tmake_file=mips/t-r3900
0dbd1c74 2944 ;;
2945 mipstx39-*-elf*)
10e7b2a2 2946 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
cef0b7b2 2947 tmake_file=mips/t-r3900
0dbd1c74 2948 ;;
01dc27ef 2949 mips-*-*) # Default MIPS RISC-OS 4.0.
bf3637a9 2950 if test x$stabs = xyes; then
01dc27ef 2951 tm_file="${tm_file} dbx.h"
2952 fi
bf3637a9 2953 if test x$gas = xyes
01dc27ef 2954 then
2955 tmake_file=mips/t-mips-gas
2956 else
2957 extra_passes="mips-tfile mips-tdump"
2958 fi
bf3637a9 2959 if test x$gnu_ld != xyes
01dc27ef 2960 then
2961 use_collect2=yes
2962 fi
2963 ;;
7a067ce0 2964 mn10200-*-*)
79742b71 2965 float_format=i32
7a067ce0 2966 cpu_type=mn10200
2967 tm_file="mn10200/mn10200.h"
bf3637a9 2968 if test x$stabs = xyes
7a067ce0 2969 then
2970 tm_file="${tm_file} dbx.h"
2971 fi
2972 use_collect2=no
2973 ;;
01dc27ef 2974 mn10300-*-*)
2975 cpu_type=mn10300
2976 tm_file="mn10300/mn10300.h"
bf3637a9 2977 if test x$stabs = xyes
01dc27ef 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
01dc27ef 2993 use_collect2=yes
2994 ;;
2995 ns32k-tek6200-bsd*)
2996 tm_file=ns32k/tek6200.h
01dc27ef 2997 use_collect2=yes
2998 ;;
2999# This has not been updated to GCC 2.
3000# ns32k-ns-genix*)
9c1d888a 3001# xm_defines=USG
01dc27ef 3002# xmake_file=ns32k/x-genix
3003# tm_file=ns32k/genix.h
01dc27ef 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
9c1d888a 3016 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
3017 xm_defines=USG
01dc27ef 3018 use_collect2=yes
3019 ;;
f2c5c1a5 3020 ns32k-*-netbsd*)
01dc27ef 3021 tm_file=ns32k/netbsd.h
9c37f946 3022 xm_file="ns32k/xm-netbsd.h ${xm_file}"
ea09f6f0 3023 # On NetBSD, the headers are already okay, except for math.h.
249c8489 3024 tmake_file=t-netbsd
56863dd8 3025 use_collect2=yes
01dc27ef 3026 ;;
3027 pdp11-*-bsd)
3028 tm_file="${tm_file} pdp11/2bsd.h"
3029 ;;
3030 pdp11-*-*)
3031 ;;
420df4a5 3032 avr-*-*)
3033 ;;
3394a88b 3034 ns32k-*-openbsd*)
3035 # Nothing special
3036 ;;
276cdece 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# ;;
67c3c754 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
01dc27ef 3053 romp-*-aos*)
3054 use_collect2=yes
3055 ;;
3056 romp-*-mach*)
3057 xmake_file=romp/x-mach
3058 use_collect2=yes
3059 ;;
3394a88b 3060 romp-*-openbsd*)
3061 # Nothing special
3062 ;;
3063 powerpc-*-openbsd*)
3064 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
3394a88b 3065 ;;
79013643 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 ;;
0567ecbd 3073 powerpc-*-sysv*)
01dc27ef 3074 tm_file=rs6000/sysv4.h
831ac869 3075 xm_file="rs6000/xm-sysv4.h"
9c1d888a 3076 xm_defines="USG POSIX"
01dc27ef 3077 extra_headers=ppc-asm.h
0567ecbd 3078 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
01dc27ef 3079 xmake_file=rs6000/x-sysv4
3080 ;;
3081 powerpc-*-eabiaix*)
0567ecbd 3082 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
01dc27ef 3083 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
01dc27ef 3084 extra_headers=ppc-asm.h
3085 ;;
3086 powerpc-*-eabisim*)
0567ecbd 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"
01dc27ef 3093 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
01dc27ef 3094 extra_headers=ppc-asm.h
3095 ;;
3096 powerpc-*-eabi*)
0567ecbd 3097 tm_file="rs6000/sysv4.h rs6000/eabi.h"
3098 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
01dc27ef 3099 extra_headers=ppc-asm.h
3100 ;;
1e7c52a6 3101 powerpc-*-rtems*)
0567ecbd 3102 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
3103 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
01dc27ef 3104 extra_headers=ppc-asm.h
3105 ;;
0198c84e 3106 powerpc-*-linux-gnulibc1)
0567ecbd 3107 tm_file="rs6000/sysv4.h rs6000/linux.h"
0198c84e 3108 xm_file=rs6000/xm-sysv4.h
3109 out_file=rs6000/rs6000.c
0567ecbd 3110 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
0198c84e 3111 xmake_file=x-linux
0198c84e 3112 extra_headers=ppc-asm.h
bf3637a9 3113 if test x$enable_threads = xyes; then
0198c84e 3114 thread_file='posix'
3115 fi
3116 ;;
adf6ea7b 3117 powerpc-*-linux-gnu*)
0567ecbd 3118 tm_file="rs6000/sysv4.h rs6000/linux.h"
831ac869 3119 xm_file="rs6000/xm-sysv4.h"
9c1d888a 3120 xm_defines="USG ${xm_defines}"
1e7c52a6 3121 out_file=rs6000/rs6000.c
0567ecbd 3122 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
fcdd39f0 3123 xmake_file=x-linux
01dc27ef 3124 extra_headers=ppc-asm.h
bf3637a9 3125 if test x$enable_threads = xyes; then
fcdd39f0 3126 thread_file='posix'
3127 fi
01dc27ef 3128 ;;
26fbb0d3 3129 powerpc-wrs-vxworks*)
01dc27ef 3130 cpu_type=rs6000
831ac869 3131 xm_file="rs6000/xm-sysv4.h"
9c1d888a 3132 xm_defines="USG POSIX"
0567ecbd 3133 tm_file="rs6000/sysv4.h rs6000/vxppc.h"
01dc27ef 3134 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3135 extra_headers=ppc-asm.h
26fbb0d3 3136 thread_file='vxworks'
01dc27ef 3137 ;;
bbd21807 3138 powerpcle-wrs-vxworks*)
3139 cpu_type=rs6000
3140 xm_file="rs6000/xm-sysv4.h"
3141 xm_defines="USG POSIX"
0567ecbd 3142 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
bbd21807 3143 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3144 extra_headers=ppc-asm.h
3145 thread_file='vxworks'
3146 ;;
0567ecbd 3147 powerpcle-*-sysv*)
3148 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
831ac869 3149 xm_file="rs6000/xm-sysv4.h"
9c1d888a 3150 xm_defines="USG POSIX"
0567ecbd 3151 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
01dc27ef 3152 xmake_file=rs6000/x-sysv4
3153 extra_headers=ppc-asm.h
3154 ;;
0567ecbd 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 ;;
01dc27ef 3160 powerpcle-*-eabisim*)
0567ecbd 3161 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
01dc27ef 3162 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
01dc27ef 3163 extra_headers=ppc-asm.h
3164 ;;
3165 powerpcle-*-eabi*)
0567ecbd 3166 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
3167 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
01dc27ef 3168 extra_headers=ppc-asm.h
3169 ;;
01dc27ef 3170 powerpcle-*-solaris2*)
0567ecbd 3171 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
831ac869 3172 xm_file="rs6000/xm-sysv4.h"
9c1d888a 3173 xm_defines="USG POSIX"
0567ecbd 3174 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
01dc27ef 3175 xmake_file=rs6000/x-sysv4
01dc27ef 3176 extra_headers=ppc-asm.h
3177 ;;
bf3637a9 3178changequote(,)dnl
3179 rs6000-ibm-aix3.[01]*)
3180changequote([,])dnl
01dc27ef 3181 tm_file=rs6000/aix31.h
3182 xmake_file=rs6000/x-aix31
d1574fcc 3183 float_format=none
01dc27ef 3184 use_collect2=yes
3185 ;;
bf3637a9 3186changequote(,)dnl
3187 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
3188changequote([,])dnl
01dc27ef 3189 tm_file=rs6000/aix3newas.h
bf3637a9 3190 if test x$host != x$target
01dc27ef 3191 then
3192 tmake_file=rs6000/t-xnewas
3193 else
3194 tmake_file=rs6000/t-newas
3195 fi
d1574fcc 3196 float_format=none
01dc27ef 3197 use_collect2=yes
3198 ;;
bf3637a9 3199changequote(,)dnl
780210d4 3200 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
bf3637a9 3201changequote([,])dnl
e051ca41 3202 tm_file=rs6000/aix41.h
bf3637a9 3203 if test x$host != x$target
01dc27ef 3204 then
3205 tmake_file=rs6000/t-xnewas
cffb2a26 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
01dc27ef 3212 else
feec2169 3213 tmake_file="rs6000/t-newas rs6000/t-aix41"
01dc27ef 3214 fi
bbd21807 3215 xmake_file=rs6000/x-aix41
d1574fcc 3216 float_format=none
8cda90b9 3217 use_collect2=yes
3218 ;;
bf3637a9 3219changequote(,)dnl
54248b5c 3220 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
bf3637a9 3221changequote([,])dnl
8cda90b9 3222 tm_file=rs6000/aix43.h
bbd21807 3223 tmake_file=rs6000/t-aix43
3224 xmake_file=rs6000/x-aix41
d1574fcc 3225 float_format=none
8cda90b9 3226 use_collect2=yes
3227 ;;
bf3637a9 3228changequote(,)dnl
3229 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
3230changequote([,])dnl
8cda90b9 3231 tm_file=rs6000/aix43.h
bbd21807 3232 tmake_file=rs6000/t-aix43
3233 xmake_file=rs6000/x-aix41
d1574fcc 3234 float_format=none
01dc27ef 3235 use_collect2=yes
3236 ;;
3237 rs6000-ibm-aix*)
d1574fcc 3238 float_format=none
01dc27ef 3239 use_collect2=yes
3240 ;;
3241 rs6000-bull-bosx)
d1574fcc 3242 float_format=none
01dc27ef 3243 use_collect2=yes
3244 ;;
3245 rs6000-*-mach*)
3246 tm_file=rs6000/mach.h
9c1d888a 3247 xm_file="${xm_file} rs6000/xm-mach.h"
01dc27ef 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 ;;
cff00465 3262 sh-*-rtemself*)
3263 tmake_file="sh/t-sh t-rtems"
3264 tm_file=sh/rtemself.h
3265 float_format=sh
3266 ;;
6c8e3918 3267 sh-*-rtems*)
3268 tmake_file="sh/t-sh t-rtems"
3269 tm_file=sh/rtems.h
3270 float_format=sh
3271 ;;
01dc27ef 3272 sh-*-*)
3273 float_format=sh
3274 ;;
3275 sparc-tti-*)
3276 tm_file=sparc/pbd.h
9c1d888a 3277 xm_file="xm-alloca.h ${xm_file}"
3278 xm_defines=USG
01dc27ef 3279 ;;
3280 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
3281 tm_file=sparc/vxsparc.h
3282 tmake_file=sparc/t-vxsparc
3283 use_collect2=yes
26fbb0d3 3284 thread_file='vxworks'
01dc27ef 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
249c8489 3292 tmake_file=t-netbsd
56863dd8 3293 use_collect2=yes
01dc27ef 3294 ;;
3394a88b 3295 sparc-*-openbsd*)
3296 # we need collect2 until our bug is fixed...
3297 use_collect2=yes
3298 ;;
01dc27ef 3299 sparc-*-bsd*)
3300 tm_file=sparc/bsd.h
3301 ;;
32ccfba4 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 ;;
ad87de1e 3309 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
9c1d888a 3310 xm_file="${xm_file} sparc/xm-linux.h"
01dc27ef 3311 tm_file=sparc/linux-aout.h
3312 xmake_file=x-linux
01dc27ef 3313 gnu_ld=yes
01dc27ef 3314 ;;
ad87de1e 3315 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
9c1d888a 3316 xm_file="${xm_file} sparc/xm-linux.h"
cf684932 3317 xmake_file=x-linux
01dc27ef 3318 tm_file=sparc/linux.h
974dc5c6 3319 tmake_file="t-linux t-linux-gnulibc1"
5703af27 3320 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
5703af27 3321 gnu_ld=yes
bab3c142 3322 float_format=sparc
5703af27 3323 ;;
ad87de1e 3324 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
9c1d888a 3325 xm_file="${xm_file} sparc/xm-linux.h"
cf684932 3326 xmake_file=x-linux
5703af27 3327 tm_file=sparc/linux.h
974dc5c6 3328 tmake_file="t-linux"
5703af27 3329 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
01dc27ef 3330 gnu_ld=yes
bf3637a9 3331 if test x$enable_threads = xyes; then
5703af27 3332 thread_file='posix'
3333 fi
bab3c142 3334 float_format=sparc
01dc27ef 3335 ;;
3336 sparc-*-lynxos*)
bf3637a9 3337 if test x$gas = xyes
01dc27ef 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 ;;
85abd4b7 3347 sparc-*-rtemsaout*)
3348 tmake_file="sparc/t-sparcbare t-rtems"
3349 tm_file=sparc/rtems.h
d6b83c5e 3350 ;;
b08afc9b 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 ;;
5c5060a1 3358 sparcv9-*-solaris2*)
86a7232c 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
5c5060a1 3365 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
3366 xm_defines="USG POSIX"
447b4bf2 3367 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
5c5060a1 3368 xmake_file=sparc/x-sysv4
3369 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
19c49761 3370 float_format=none
0a2a3792 3371 if test x${enable_threads} = x ; then
5c5060a1 3372 enable_threads=$have_pthread_h
0a2a3792 3373 if test x${enable_threads} = x ; then
5c5060a1 3374 enable_threads=$have_thread_h
3375 fi
3376 fi
0a2a3792 3377 if test x${enable_threads} = xyes ; then
3378 if test x${have_pthread_h} = xyes ; then
5c5060a1 3379 thread_file='posix'
3380 else
3381 thread_file='solaris'
3382 fi
3383 fi
3384 ;;
be2828ce 3385 sparc-hal-solaris2*)
831ac869 3386 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
66bd71c2 3387 xm_defines="USG POSIX"
be2828ce 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"
66bd71c2 3392 case $machine in
fd6645b2 3393changequote(,)dnl
66bd71c2 3394 *-*-solaris2.[0-4])
fd6645b2 3395changequote([,])dnl
66bd71c2 3396 float_format=i128
3397 ;;
3398 *)
3399 float_format=none
3400 ;;
3401 esac
3402 thread_file='solaris'
be2828ce 3403 ;;
01dc27ef 3404 sparc-*-solaris2*)
bf3637a9 3405 if test x$gnu_ld = xyes
8526b981 3406 then
3407 tm_file=sparc/sol2.h
3408 else
3409 tm_file=sparc/sol2-sld.h
3410 fi
831ac869 3411 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
40cc7245 3412 xm_defines="USG POSIX"
01dc27ef 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"
9c1d888a 3416 case $machine in
8f8d6e89 3417changequote(,)dnl
0569c094 3418 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
8f8d6e89 3419changequote([,])dnl
3420 *-*-solaris2*)
86a7232c 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
8f8d6e89 3427 tmake_file="$tmake_file sparc/t-sol2-64"
3428 ;;
3429 esac
3430 case $machine in
bf3637a9 3431changequote(,)dnl
3432 *-*-solaris2.[0-4])
3433changequote([,])dnl
19c49761 3434 float_format=i128
3435 ;;
9c1d888a 3436 *)
19c49761 3437 float_format=none
3438 ;;
9c1d888a 3439 esac
bf3637a9 3440 if test x${enable_threads} = x; then
58febf9e 3441 enable_threads=$have_pthread_h
bf3637a9 3442 if test x${enable_threads} = x; then
58febf9e 3443 enable_threads=$have_thread_h
3444 fi
3445 fi
bf3637a9 3446 if test x${enable_threads} = xyes; then
3447 if test x${have_pthread_h} = xyes; then
58febf9e 3448 thread_file='posix'
3449 else
3e637c99 3450 thread_file='solaris'
58febf9e 3451 fi
3e637c99 3452 fi
01dc27ef 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
bf3637a9 3463 if test x$gas = xyes; then
447a9eb9 3464 tm_file="${tm_file} sparc/sun4gas.h"
3465 fi
01dc27ef 3466 ;;
3467 sparc-*-sunos3*)
3468 tm_file=sparc/sun4o3.h
3469 use_collect2=yes
3470 ;;
3471 sparc-*-sysv4*)
3472 tm_file=sparc/sysv4.h
831ac869 3473 xm_file="sparc/xm-sysv4.h"
9c1d888a 3474 xm_defines="USG POSIX"
01dc27ef 3475 tmake_file=t-svr4
3476 xmake_file=sparc/x-sysv4
3477 extra_parts="crtbegin.o crtend.o"
3478 ;;
3479 sparc-*-vxsim*)
831ac869 3480 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
c5aa1e92 3481 xm_defines="USG POSIX"
01dc27ef 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 ;;
c6042686 3498 sparclite-*-elf*)
eab7265d 3499 tm_file="sparc/liteelf.h"
c6042686 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*)
eab7265d 3508 tm_file="sparc/sp86x-elf.h"
c6042686 3509 tmake_file=sparc/t-sp86x
3510 extra_parts="crtbegin.o crtend.o"
3511 ;;
01dc27ef 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 ;;
ad87de1e 3521 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
447b4bf2 3522 tmake_file="t-linux sparc/t-linux64"
cf684932 3523 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
3524 tm_file=sparc/linux64.h
3525 xmake_file=x-linux
447b4bf2 3526 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
cf684932 3527 gnu_ld=yes
91d64b48 3528 if test x$enable_threads = xyes; then
3529 thread_file='posix'
3530 fi
bab3c142 3531 float_format=sparc
cf684932 3532 ;;
01dc27ef 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# ;;
cffb2a26 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.])
7097d470 3545 ;;
01dc27ef 3546# This hasn't been upgraded to GCC 2.
3547# tron-*-*)
3548# cpu_type=gmicro
3549# use_collect2=yes
3550# ;;
f7c4c35f 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 ;;
148549fa 3562 v850-*-*)
2b33b157 3563 target_cpu_default="TARGET_CPU_generic"
148549fa 3564 cpu_type=v850
3565 tm_file="v850/v850.h"
3566 xm_file="v850/xm-v850.h"
a2bdec1e 3567 tmake_file=v850/t-v850
bf3637a9 3568 if test x$stabs = xyes
148549fa 3569 then
3570 tm_file="${tm_file} dbx.h"
3571 fi
3572 use_collect2=no
3573 ;;
01dc27ef 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"
9c1d888a 3580 xm_defines=USG
01dc27ef 3581 float_format=vax
3582 ;;
3583 vax-*-netbsd*)
3584 tm_file="${tm_file} netbsd.h vax/netbsd.h"
249c8489 3585 tmake_file=t-netbsd
01dc27ef 3586 float_format=vax
56863dd8 3587 use_collect2=yes
01dc27ef 3588 ;;
3394a88b 3589 vax-*-openbsd*)
0104279f 3590 tmake_file="${tmake_file} vax/t-openbsd"
3394a88b 3591 ;;
01dc27ef 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*)
9c1d888a 3617 ;; # Existing GNU/Linux systems do not use the GNU setup.
01dc27ef 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.
9c1d888a 3622 xm_file="xm-gnu.h ${xm_file}"
01dc27ef 3623 tm_file=${cpu_type}/gnu.h
100ce253 3624 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
01dc27ef 3625 # GNU always uses ELF.
3626 elf=yes
3627 # GNU tools are the only tools.
3628 gnu_ld=yes
3629 gas=yes
01dc27ef 3630 xmake_file=x-linux # These details are the same as Linux.
3631 tmake_file=t-gnu # These are not.
3632 ;;
3633 *-*-sysv4*)
01dc27ef 3634 xmake_try_sysv=x-sysv
01dc27ef 3635 install_headers_dir=install-headers-cpio
3636 ;;
3637 *-*-sysv*)
01dc27ef 3638 install_headers_dir=install-headers-cpio
3639 ;;
3640 esac
3641
9c1d888a 3642 # Distinguish i[34567]86
01dc27ef 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-*-*)
fafd71e7 3651 case $target_alias in
3652 k6-*)
3653 target_cpu_default2=4
3654 ;;
3655 *)
3656 target_cpu_default2=2
3657 ;;
3658 esac
01dc27ef 3659 ;;
9c1d888a 3660 i686-*-* | i786-*-*)
01dc27ef 3661 target_cpu_default2=3
3662 ;;
6e0e6130 3663 alpha*-*-*)
3664 case $machine in
7a28a1b6 3665changequote(,)dnl
c216deca 3666 alphaev6[78]*)
7a28a1b6 3667changequote([,])dnl
c216deca 3668 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
3669 ;;
0dbd1c74 3670 alphaev6*)
cbd8ec27 3671 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
0dbd1c74 3672 ;;
3673 alphapca56*)
6a47246b 3674 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
0dbd1c74 3675 ;;
6e0e6130 3676 alphaev56*)
0dbd1c74 3677 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
6e0e6130 3678 ;;
3679 alphaev5*)
3680 target_cpu_default2="MASK_CPU_EV5"
3681 ;;
3682 esac
3683
bf3637a9 3684 if test x$gas = xyes
01dc27ef 3685 then
bf3637a9 3686 if test "$target_cpu_default2" = ""
6e0e6130 3687 then
f0b8ad1b 3688 target_cpu_default2="MASK_GAS"
6e0e6130 3689 else
f0b8ad1b 3690 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
6e0e6130 3691 fi
01dc27ef 3692 fi
3693 ;;
ad87de1e 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
3843b057 3703changequote(,)dnl
ad87de1e 3704 xarm[23678] | xarm250 | xarm[67][01]0 \
3705 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
3706 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
8ffadb5b 3707 | xstrongarm | xstrongarm110 | xstrongarm1100)
3843b057 3708changequote([,])dnl
ad87de1e 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 *)
bf3637a9 3718 if test x$pass2done = xyes
ad87de1e 3719 then
3720 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3721 exit 1
3722 fi
3723 ;;
3724 esac
3725 ;;
3726
01dc27ef 3727 mips*-*-ecoff* | mips*-*-elf*)
bf3637a9 3728 if test x$gas = xyes
01dc27ef 3729 then
bf3637a9 3730 if test x$gnu_ld = xyes
01dc27ef 3731 then
fd6645b2 3732 target_cpu_default2="MASK_GAS|MASK_SPLIT_ADDR"
01dc27ef 3733 else
fd6645b2 3734 target_cpu_default2="MASK_GAS"
01dc27ef 3735 fi
3736 fi
3737 ;;
3738 mips*-*-*)
bf3637a9 3739 if test x$gas = xyes
01dc27ef 3740 then
fd6645b2 3741 target_cpu_default2="MASK_GAS"
01dc27ef 3742 fi
3743 ;;
3744 powerpc*-*-* | rs6000-*-*)
3745 case "x$with_cpu" in
3746 x)
3747 ;;
3748
3749 xcommon | xpower | xpower2 | xpowerpc | xrios \
b673462b 3750 | xrios1 | xrios2 | xrsc | xrsc1 \
3751 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
c5b0e23e 3752 | xec603e | x740 | x750 | x401 \
b673462b 3753 | x403 | x505 | x801 | x821 | x823 | x860)
cb84fe36 3754 target_cpu_default2="\"$with_cpu\""
01dc27ef 3755 ;;
3756
3757 xyes | xno)
3758 echo "--with-cpu must be passed a value" 1>&2
3759 exit 1
3760 ;;
3761
3762 *)
bf3637a9 3763 if test x$pass2done = xyes
ad87de1e 3764 then
3765 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3766 exit 1
3767 fi
01dc27ef 3768 ;;
3769 esac
3770 ;;
3771 sparc*-*-*)
3772 case ".$with_cpu" in
3773 .)
3774 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
3775 ;;
32933b3c 3776 .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
01dc27ef 3777 target_cpu_default2="TARGET_CPU_$with_cpu"
3778 ;;
3779 *)
bf3637a9 3780 if test x$pass2done = xyes
ad87de1e 3781 then
3782 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3783 exit 1
3784 fi
01dc27ef 3785 ;;
3786 esac
3787 ;;
3788 esac
3789
bf3637a9 3790 if test "$target_cpu_default2" != ""
01dc27ef 3791 then
bf3637a9 3792 if test "$target_cpu_default" != ""
01dc27ef 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.
fb6d4b71 3801 # Actually, there is now; GNU ld doesn't handle the EH info or
3802 # collecting for shared libraries.
b6c9bc9a 3803 #case x$gnu_ld in
3804 #xyes)
3805 # use_collect2=
3806 # ;;
3807 #esac
01dc27ef 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.
bf3637a9 3811 if test x$pass1done = x
01dc27ef 3812 then
bf3637a9 3813 if test x"$xm_file" = x
01dc27ef 3814 then build_xm_file=$cpu_type/xm-$cpu_type.h
3815 else build_xm_file=$xm_file
3816 fi
9c1d888a 3817 build_xm_defines=$xm_defines
01dc27ef 3818 build_install_headers_dir=$install_headers_dir
3819 build_exeext=$exeext
3820 pass1done=yes
3821 else
bf3637a9 3822 if test x$pass2done = x
01dc27ef 3823 then
bf3637a9 3824 if test x"$xm_file" = x
01dc27ef 3825 then host_xm_file=$cpu_type/xm-$cpu_type.h
3826 else host_xm_file=$xm_file
3827 fi
9c1d888a 3828 host_xm_defines=$xm_defines
bf3637a9 3829 if test x"$xmake_file" = x
01dc27ef 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
2aa3e87b 3836 host_exeext=$exeext
01dc27ef 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.
bf3637a9 3845if test x"$tm_file" = x
01dc27ef 3846then tm_file=$cpu_type/$cpu_type.h; fi
3847
bf3637a9 3848if test x$extra_headers = x
01dc27ef 3849then extra_headers=; fi
3850
bf3637a9 3851if test x"$xm_file" = x
01dc27ef 3852then xm_file=$cpu_type/xm-$cpu_type.h; fi
3853
bf3637a9 3854if test x$md_file = x
0579e60e 3855then md_file=$cpu_type/$cpu_type.md; fi
01dc27ef 3856
bf3637a9 3857if test x$out_file = x
01dc27ef 3858then out_file=$cpu_type/$cpu_type.c; fi
3859
bf3637a9 3860if test x"$tmake_file" = x
01dc27ef 3861then tmake_file=$cpu_type/t-$cpu_type
3862fi
3863
27b15aee 3864if test x"$dwarf2" = xyes
b65d2e3c 3865then tm_file="$tm_file tm-dwarf2.h"
27b15aee 3866fi
3867
bf3637a9 3868if test x$float_format = x
01dc27ef 3869then float_format=i64
3870fi
3871
19c49761 3872if test $float_format = none
3873then float_h_file=Makefile.in
3874else float_h_file=float-$float_format.h
3875fi
3876
012fc37f 3877# Handle cpp installation.
f7b90398 3878if test x$enable_cpp != xno
012fc37f 3879then
3880 tmake_file="$tmake_file t-install-cpp"
3881fi
3882
01dc27ef 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
bf3637a9 3891if test $count = ax; then
01dc27ef 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
bf3637a9 3904if test $count = ax; then
01dc27ef 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
bf3637a9 3913if test "$host_xm_file" != "$build_xm_file"; then
01dc27ef 3914 count=a
3915 for f in $build_xm_file; do
3916 count=${count}x
3917 done
bf3637a9 3918 if test $count = ax; then
01dc27ef 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
bf3637a9 3928if test x$thread_file = x; then
3929 if test x$target_thread_file != x; then
040921ae 3930 thread_file=$target_thread_file
3931 else
3932 thread_file='single'
3933 fi
01dc27ef 3934fi
01dc27ef 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.
764fc592 3939# auto-host.h is the file containing items generated by autoconf and is
0dbd1c74 3940# the first file included by config.h.
9c1d888a 3941null_defines=
de5102fe 3942host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
58b16c1a 3943
764fc592 3944# If host=build, it is correct to have hconfig include auto-host.h
58b16c1a 3945# as well. If host!=build, we are in error and need to do more
3946# work to find out the build config parameters.
bf3637a9 3947if test x$host = x$build
58b16c1a 3948then
de5102fe 3949 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
764fc592 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
c1aa7038 3963 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
764fc592 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
de5102fe 3971 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
58b16c1a 3972fi
3973
4a7d7a8b 3974xm_file="gansidecl.h ${xm_file}"
3975tm_file="gansidecl.h ${tm_file}"
3976
7953c610 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"
01dc27ef 3980
3981rm -f config.bak
bf3637a9 3982if test -f config.status; then mv -f config.status config.bak; fi
01dc27ef 3983
3984# Make the links.
bf3637a9 3985while test -n "$vars"
01dc27ef 3986do
01dc27ef 3987 set $vars; var=$1; shift; vars=$*
3988 set $links; link=$1; shift; links=$*
9c1d888a 3989 set $defines; define=$1; shift; defines=$*
01dc27ef 3990
3991 rm -f $link
7953c610 3992 # Make sure the file is created, even if it is empty.
3993 echo >$link
01dc27ef 3994
3995 # Define TARGET_CPU_DEFAULT if the system wants one.
3996 # This substitutes for lots of *.h files.
bf3637a9 3997 if test "$target_cpu_default" != "" -a $link = tm.h
01dc27ef 3998 then
bba1c400 3999 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
01dc27ef 4000 fi
4001
4002 for file in `eval echo '$'$var`; do
be2828ce 4003 case $file in
4004 auto-config.h)
4005 ;;
4006 *)
4007 echo '#ifdef IN_GCC' >>$link
4008 ;;
4009 esac
01dc27ef 4010 echo "#include \"$file\"" >>$link
be2828ce 4011 case $file in
4012 auto-config.h)
4013 ;;
4014 *)
4015 echo '#endif' >>$link
4016 ;;
4017 esac
01dc27ef 4018 done
9c1d888a 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
01dc27ef 4025done
4026
4027# Truncate the target if necessary
bf3637a9 4028if test x$host_truncate_target != x; then
01dc27ef 4029 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4030fi
4031
7955e3d2 4032# Get the version trigger filename from the toplevel
bf3637a9 4033if test "${with_gcc_version_trigger+set}" = set; then
7955e3d2 4034 gcc_version_trigger=$with_gcc_version_trigger
4035else
4036 gcc_version_trigger=${srcdir}/version.c
4037fi
bf3637a9 4038changequote(,)dnl
4f5e65d7 4039gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
bf3637a9 4040changequote([,])dnl
01dc27ef 4041
be2828ce 4042# Internationalization
4043PACKAGE=gcc
4044VERSION="$gcc_version"
42f1312d 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.])
be2828ce 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
778a2833 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
42f1312d 4074 AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
4075[Define to 1 if installation paths should be looked up in Windows32
c9b4be0a 4076 Registry. Ignored on non windows32 hosts.])
778a2833 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)
42f1312d 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.])
778a2833 4102 AC_MSG_RESULT($gcc_cv_win32_registry_key)
4103fi
4104
cab2aaca 4105# Get an absolute path to the GCC top-level source directory
4106holddir=`pwd`
4107cd $srcdir
4108topdir=`pwd`
4109cd $holddir
4110
0045e563 4111# Conditionalize the makefile for this host machine.
5a92ba2a 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
0045e563 4115dep_host_xmake_file=
5a92ba2a 4116for f in .. ${host_xmake_file}
4117do
bf3637a9 4118 if test -f ${srcdir}/config/$f
5a92ba2a 4119 then
4120 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
4121 fi
4122done
01dc27ef 4123
0045e563 4124# Conditionalize the makefile for this target machine.
5a92ba2a 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
0045e563 4128dep_tmake_file=
5a92ba2a 4129for f in .. ${tmake_file}
4130do
bf3637a9 4131 if test -f ${srcdir}/config/$f
5a92ba2a 4132 then
4133 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
4134 fi
4135done
4fc83d8e 4136
0045e563 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
9c1d888a 4141if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
0045e563 4142then
4143 cc_set_by_configure="\$(CC)"
b441f25a 4144 quoted_cc_set_by_configure="\$(CC)"
0045e563 4145 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
4146else
9c1d888a 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
0045e563 4154 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
b441f25a 4155 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
0045e563 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
4fc83d8e 4159
0045e563 4160out_object_file=`basename $out_file .c`.o
4fc83d8e 4161
0045e563 4162tm_file_list=
4163for f in $tm_file; do
de5102fe 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
0045e563 4169done
01dc27ef 4170
0045e563 4171host_xm_file_list=
4172for f in $host_xm_file; do
de5102fe 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
0045e563 4178done
4179
4180build_xm_file_list=
4181for f in $build_xm_file; do
de5102fe 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
0045e563 4187done
01dc27ef 4188
0045e563 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.
a4ac0141 4193cross_overrides="/dev/null"
bf3637a9 4194if test x$host != x$target
0045e563 4195then
4196 cross_defines="CROSS=-DCROSS_COMPILE"
4197 cross_overrides="${topdir}/cross-make"
4198fi
01dc27ef 4199
0045e563 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.
a4ac0141 4203build_overrides="/dev/null"
bf3637a9 4204if test x$build != x$host
0045e563 4205then
4206 build_overrides="${topdir}/build-make"
4207fi
01dc27ef 4208
33fd845b 4209# Expand extra_headers to include complete path.
4210# This substitutes for lots of t-* files.
4211extra_headers_list=
bf3637a9 4212if test "x$extra_headers" = x
33fd845b 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
bf3637a9 4222if test x$use_collect2 = xno; then
9bc65db1 4223 use_collect2=
4224fi
4225
0045e563 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.
bf3637a9 4229if test x$use_collect2 = x
0045e563 4230then
4231 will_use_collect2=
4232 maybe_use_collect2=
4233else
0c787992 4234 will_use_collect2="collect2"
0045e563 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=
bf3637a9 4245if test "x$md_cppflags" = x
0045e563 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.
bf3637a9 4253if test -f ../gas/Makefile; then
2aa3e87b 4254 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
0045e563 4255fi
4256
5783e52b 4257# If we have nm in the build tree, make a link to it.
bf3637a9 4258if test -f ../binutils/Makefile; then
5783e52b 4259 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
4260fi
4261
0045e563 4262# If we have ld in the build tree, make a link to it.
bf3637a9 4263if test -f ../ld/Makefile; then
4264# if test x$use_collect2 = x; then
2aa3e87b 4265# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
94ca3aab 4266# else
2aa3e87b 4267 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
94ca3aab 4268# fi
0045e563 4269fi
4270
3245cd4f 4271# Figure out what assembler alignment features are present.
4272AC_MSG_CHECKING(assembler alignment features)
4273gcc_cv_as=
4274gcc_cv_as_alignment_features=
0a4f4d70 4275gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
f8b7dbdb 4276if test -x "$DEFAULT_ASSEMBLER"; then
4277 gcc_cv_as="$DEFAULT_ASSEMBLER"
4278elif test -x "$AS"; then
4279 gcc_cv_as="$AS"
f07251bc 4280elif test -x as$host_exeext; then
3245cd4f 4281 # Build using assembler in the current directory.
4282 gcc_cv_as=./as$host_exeext
6c1f66c0 4283elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
3245cd4f 4284 # Single tree build which includes gas.
8f102a1e 4285 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
3245cd4f 4286 do
bf3637a9 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
3245cd4f 4291 break
4292 fi
4293 done
bf3637a9 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
dc85fb20 4299 # Gas version 2.6 and later support for .balign and .p2align.
4300 # bytes to skip when using .p2align.
bf3637a9 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
dc85fb20 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.
bf3637a9 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
dc85fb20 4308 gcc_cv_as_alignment_features=".p2align including maximum skip"
4309 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4310 fi
3245cd4f 4311 fi
bf3637a9 4312elif test x$host = x$target; then
3245cd4f 4313 # Native build.
07d1fecc 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
3245cd4f 4363fi
bf3637a9 4364if test x$gcc_cv_as != x; then
f9423f54 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
3245cd4f 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
b6d28b19 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
fd3b5ace 4407 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
4408 :
4409 else
b6d28b19 4410 gcc_cv_as_subsections="working .subsection -1"
42f1312d 4411 AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING, 1,
4412[Define if your assembler supports .subsection and .subsection -1 starts
c9b4be0a 4413 emitting at the beginning of your section.])
b6d28b19 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
1a8c3b27 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
42f1312d 4428 AC_DEFINE(HAVE_GAS_WEAK, 1,
4429 [Define if your assembler supports .weak.])
1a8c3b27 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
5be729c9 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
42f1312d 4443 AC_DEFINE(HAVE_GAS_HIDDEN, 1,
4444 [Define if your assembler supports .hidden.])
5be729c9 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
d300bd48 4451case "$target" in
4452 sparc*-*-*)
0569c094 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
d300bd48 4460 gcc_cv_as_register_pseudo_op=yes
0569c094 4461 else
4462 gcc_cv_as_register_pseudo_op=no
4463 fi
4464 rm -f conftest.s conftest.o
d300bd48 4465 fi
0569c094 4466 ])
4467 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
42f1312d 4468 AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1,
4469 [Define if your assembler supports .register.])
d300bd48 4470 fi
d300bd48 4471
0569c094 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
2b0154e4 4479 for flag in "-xarch=v9" "-64 -Av9"; do
0569c094 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
d300bd48 4493 fi
0569c094 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
42f1312d 4501 AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64",
4502 [Define if the assembler supports 64bit sparc.])
d300bd48 4503 fi
0569c094 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
d300bd48 4528 fi
0569c094 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
42f1312d 4533 AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
4534 [Define if your assembler supports offsetable %lo().])
d300bd48 4535 fi
d300bd48 4536 fi
d300bd48 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
d6723bcd 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
d300bd48 4556 fi
4557 AC_MSG_RESULT($gcc_cv_as_instructions)
4558 ;;
4559esac
d6723bcd 4560
a4ac0141 4561# Figure out what language subdirectories are present.
76103b2c 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
a4ac0141 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.
bf3637a9 4579changequote(,)dnl
4580 ${srcdir}/[*]/config-lang.in) ;;
76103b2c 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 ;;
bf3637a9 4613changequote([,])dnl
a4ac0141 4614 esac
4615done
4616
58febf9e 4617# Make gthr-default.h if we have a thread file.
4618gthread_flags=
bf3637a9 4619if test $thread_file != single; then
58febf9e 4620 rm -f gthr-default.h
f877a6f9 4621 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
58febf9e 4622 gthread_flags=-DHAVE_GTHR_DEFAULT
4623fi
4624AC_SUBST(gthread_flags)
4625
772580ce 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],
8ee6d486 4638[if test $ac_cv_func_mmap_anywhere = yes \
4639 || test $ac_cv_func_valloc = yes; then
71661611 4640 GGC=ggc-page
772580ce 4641else
4642 GGC=ggc-simple
4643fi])
4644AC_SUBST(GGC)
4645echo "Using $GGC for garbage collection."
4646
2828fac4 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.],
42f1312d 4653[AC_DEFINE(ENABLE_NEW_GXX_ABI, 1,
4654 [Define if you want to always select the new-abi for g++.])
2828fac4 4655GXX_ABI_FLAG='-fnew-abi'
4656echo "Building a new-abi g++ compiler."
4657])
4658AC_SUBST(GXX_ABI_FLAG)
4659
95e835c6 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)
42f1312d 4669 ac_esn=1
95e835c6 4670else
4671 AC_MSG_RESULT(v2)
42f1312d 4672 ac_esn=0
95e835c6 4673fi
42f1312d 4674AC_DEFINE_UNQUOTED(ENABLE_STD_NAMESPACE, $ac_esn,
4675 [Define to 1 if you want to enable namespaces (-fhonor-std) by default.])
95e835c6 4676
a4ac0141 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=
c3cc26e1 4682lang_tree_files=
4683rm -f specs.h options.h gencheck.h
4684touch specs.h options.h gencheck.h
a4ac0141 4685for subdir in . $subdirs
4686do
bf3637a9 4687 if test -f $srcdir/$subdir/lang-specs.h; then
a4ac0141 4688 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
4689 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
4690 fi
bf3637a9 4691 if test -f $srcdir/$subdir/lang-options.h; then
a4ac0141 4692 echo "#include \"$subdir/lang-options.h\"" >>options.h
4693 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
4694 fi
c3cc26e1 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
a4ac0141 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=
86220f45 4708all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug'
a4ac0141 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"
e14c212c 4723oldstyle_subdirs=
a4ac0141 4724
4725for s in .. $subdirs
4726do
bf3637a9 4727 if test $s != ".."
a4ac0141 4728 then
4729 language=
4730 boot_language=
4731 compilers=
4732 stagestuff=
4733 diff_excludes=
4734 headers=
e14c212c 4735 outputs=
a4ac0141 4736 lib2funcs=
4737 . ${srcdir}/$s/config-lang.in
bf3637a9 4738 if test "x$language" = x
a4ac0141 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"
bf3637a9 4745 if test "x$boot_language" = xyes
a4ac0141 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"
e14c212c 4753 all_outputs="$all_outputs $outputs"
bf3637a9 4754 if test x$outputs = x
e14c212c 4755 then
4756 oldstyle_subdirs="$oldstyle_subdirs $s"
4757 fi
a4ac0141 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=
be2828ce 4776 for lang in .. $all_languages
a4ac0141 4777 do
be2828ce 4778 if test $lang != ".."; then
4779 x="$x $lang.$t"
a4ac0141 4780 fi
4781 done
4782 echo "lang.$t: $x" >> Make-hooks
4783done
4784
80a1cc00 4785# If we're not building in srcdir, create .gdbinit.
4786
bf3637a9 4787if test ! -f Makefile.in; then
80a1cc00 4788 echo "dir ." > .gdbinit
4789 echo "dir ${srcdir}" >> .gdbinit
bf3637a9 4790 if test x$gdb_needs_out_file_path = xyes
80a1cc00 4791 then
4792 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
4793 fi
bf3637a9 4794 if test "x$subdirs" != x; then
80a1cc00 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
11d80b02 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=
bf3637a9 4808if test "${host}" != "${target}" ; then
11d80b02 4809 target_subdir=${target}/
4810fi
4811AC_SUBST(build_canonical)
4812AC_SUBST(host_canonical)
4813AC_SUBST(target_subdir)
4814
533a0af2 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=
bf3637a9 4820if test x$with_newlib = xyes; then
533a0af2 4821 inhibit_libc=-Dinhibit_libc
4822fi
4823AC_SUBST(inhibit_libc)
4824
8ffadb5b 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.
e29a95ef 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.
7df8690a 4832if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
f22b529a 4833 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
4834else
8ffadb5b 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#
066520ea 4857 dollar='$$'
4858 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
8ffadb5b 4859changequote([, ])dnl
f22b529a 4860fi
4861AC_SUBST(gcc_tooldir)
066520ea 4862AC_SUBST(dollar)
f22b529a 4863
fbc57885 4864# Nothing to do for FLOAT_H, float_format already handled.
4865objdir=`pwd`
4866AC_SUBST(objdir)
4867
5a92ba2a 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"
c962448d 4870
01dc27ef 4871# Substitute configuration variables
4872AC_SUBST(subdirs)
01dc27ef 4873AC_SUBST(all_boot_languages)
4874AC_SUBST(all_compilers)
01dc27ef 4875AC_SUBST(all_diff_excludes)
01dc27ef 4876AC_SUBST(all_headers)
434bb88d 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)
b441f25a 4885AC_SUBST(quoted_cc_set_by_configure)
434bb88d 4886AC_SUBST(cpp_install_dir)
434bb88d 4887AC_SUBST(dep_host_xmake_file)
4888AC_SUBST(dep_tmake_file)
4889AC_SUBST(extra_c_flags)
312f727d 4890AC_SUBST(extra_c_objs)
33a62e3f 4891AC_SUBST(extra_cpp_objs)
434bb88d 4892AC_SUBST(extra_cxx_objs)
4893AC_SUBST(extra_headers_list)
01dc27ef 4894AC_SUBST(extra_objs)
434bb88d 4895AC_SUBST(extra_parts)
4896AC_SUBST(extra_passes)
4897AC_SUBST(extra_programs)
434bb88d 4898AC_SUBST(float_h_file)
4899AC_SUBST(gcc_gxx_include_dir)
4900AC_SUBST(gcc_version)
4901AC_SUBST(gcc_version_trigger)
4902AC_SUBST(host_exeext)
01dc27ef 4903AC_SUBST(host_extra_gcc_objs)
01dc27ef 4904AC_SUBST(host_xm_file_list)
434bb88d 4905AC_SUBST(install)
01dc27ef 4906AC_SUBST(lang_options_files)
434bb88d 4907AC_SUBST(lang_specs_files)
c3cc26e1 4908AC_SUBST(lang_tree_files)
01dc27ef 4909AC_SUBST(local_prefix)
01dc27ef 4910AC_SUBST(maybe_use_collect2)
434bb88d 4911AC_SUBST(md_file)
4912AC_SUBST(objc_boehm_gc)
4913AC_SUBST(out_file)
4914AC_SUBST(out_object_file)
01dc27ef 4915AC_SUBST(stage_prefix_set_by_configure)
0dbd1c74 4916AC_SUBST(symbolic_link)
434bb88d 4917AC_SUBST(thread_file)
4918AC_SUBST(tm_file_list)
4919AC_SUBST(will_use_collect2)
012fc37f 4920
01dc27ef 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
bf3637a9 4931if test x$host = x$target
01dc27ef 4932then
4933 str1="native "
4934else
4935 str1="cross-"
4936 str2=" from $host"
4937fi
4938
bf3637a9 4939if test x$host != x$build
01dc27ef 4940then
4941 str3=" on a $build system"
4942fi
4943
bf3637a9 4944if test "x$str2" != x || test "x$str3" != x
01dc27ef 4945then
4946 str4=
4947fi
4948
4949echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
4950
bf3637a9 4951if test "x$str2" != x || test "x$str3" != x
01dc27ef 4952then
4953 echo " ${str2}${str3}." 1>&2
4954fi
4955
9c1d888a 4956# Truncate the target if necessary
bf3637a9 4957if test x$host_truncate_target != x; then
9c1d888a 4958 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4959fi
4960
01dc27ef 4961# Configure the subdirectories
4962# AC_CONFIG_SUBDIRS($subdirs)
4963
4964# Create the Makefile
4fc83d8e 4965# and configure language subdirectories
e14c212c 4966AC_OUTPUT($all_outputs,
805483cf 4967[
4968. $srcdir/configure.lang
4969case x$CONFIG_HEADERS in
764fc592 4970xauto-host.h:config.in)
ad588311 4971echo > cstamp-h ;;
805483cf 4972esac
55b0dbe2 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.
bf3637a9 4979if test "$symbolic_link" = "ln -s"; then
55b0dbe2 4980 for d in .. ${subdirs} ; do
bf3637a9 4981 if test $d != ..; then
0ba40214 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
55b0dbe2 4990 fi
4991 done
4992else true ; fi
be2828ce 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
805483cf 4998],
4999[
4fc83d8e 5000host='${host}'
5001build='${build}'
5002target='${target}'
490f673a 5003target_alias='${target_alias}'
4fc83d8e 5004srcdir='${srcdir}'
5005subdirs='${subdirs}'
80a1cc00 5006oldstyle_subdirs='${oldstyle_subdirs}'
4fc83d8e 5007symbolic_link='${symbolic_link}'
5008program_transform_set='${program_transform_set}'
5009program_transform_name='${program_transform_name}'
4fc83d8e 5010dep_host_xmake_file='${dep_host_xmake_file}'
5011host_xmake_file='${host_xmake_file}'
5012dep_tmake_file='${dep_tmake_file}'
5013tmake_file='${tmake_file}'
3e637c99 5014thread_file='${thread_file}'
7955e3d2 5015gcc_version='${gcc_version}'
5016gcc_version_trigger='${gcc_version_trigger}'
4fc83d8e 5017local_prefix='${local_prefix}'
4fc83d8e 5018build_install_headers_dir='${build_install_headers_dir}'
bc5c38ca 5019build_exeext='${build_exeext}'
2aa3e87b 5020host_exeext='${host_exeext}'
767603d4 5021out_file='${out_file}'
4fc83d8e 5022gdb_needs_out_file_path='${gdb_needs_out_file_path}'
5023SET_MAKE='${SET_MAKE}'
4fc83d8e 5024target_list='${target_list}'
4fc83d8e 5025target_overrides='${target_overrides}'
5026host_overrides='${host_overrides}'
5027cross_defines='${cross_defines}'
5028cross_overrides='${cross_overrides}'
5029build_overrides='${build_overrides}'
012fc37f 5030cpp_install_dir='${cpp_install_dir}'
805483cf 5031])