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