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