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