]> git.ipfire.org Git - thirdparty/gcc.git/blame_incremental - gcc/configure.in
Fix debugging of CHARACTER*(*), etc., which requires emitting debug info on types...
[thirdparty/gcc.git] / gcc / configure.in
... / ...
CommitLineData
1# configure.in for GNU CC
2# Process this file with autoconf to generate a configuration script.
3
4# Copyright (C) 1997, 1998 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
24AC_INIT(tree.c)
25AC_CONFIG_HEADER(auto-host.h:config.in)
26
27remove=rm
28hard_link=ln
29symbolic_link='ln -s'
30copy=cp
31
32# Check for additional parameters
33
34# With GNU ld
35AC_ARG_WITH(gnu-ld,
36[ --with-gnu-ld arrange to work with GNU ld.],
37gnu_ld_flag="$with_gnu_ld",
38gnu_ld_flag=no)
39
40# With GNU as
41AC_ARG_WITH(gnu-as,
42[ --with-gnu-as arrange to work with GNU as.],
43gas_flag="$with_gnu_as",
44gas_flag=no)
45
46# With stabs
47AC_ARG_WITH(stabs,
48[ --with-stabs arrange to use stabs instead of host debug format.],
49stabs="$with_stabs",
50stabs=no)
51
52# With ELF
53AC_ARG_WITH(elf,
54[ --with-elf arrange to use ELF instead of host debug format.],
55elf="$with_elf",
56elf=no)
57
58# Specify the local prefix
59AC_ARG_WITH(local-prefix,
60[ --with-local-prefix=DIR specifies directory to put local include.],
61local_prefix=$with_local_prefix,
62local_prefix=/usr/local)
63
64# Default local prefix if it is empty
65if [[ x$local_prefix = x ]]; then
66 local_prefix=/usr/local
67fi
68
69# Specify the g++ header file directory
70AC_ARG_WITH(gxx-include-dir,
71[ --with-gxx-include-dir=DIR
72 specifies directory to put g++ header files.],
73gxx_include_dir=$with_gxx_include_dir,
74if test x${enable_version_specific_runtime_libs} = xyes; then
75gxx_include_dir='${libsubdir}/include/g++'
76else gxx_include_dir='${prefix}/include/g++'; fi)
77
78# Enable expensive internal checks
79AC_ARG_ENABLE(checking,
80[ --enable-checking enable expensive run-time checks.],
81AC_DEFINE(ENABLE_CHECKING)
82)
83
84# Enable use of cpplib for C.
85cpp_main=cccp
86AC_ARG_ENABLE(c-cpplib,
87[ --enable-c-cpplib Use cpplib for C.],
88if [[[ x$enable_c_cpplib != xno ]]]; then
89 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
90 extra_c_objs="${extra_c_objs} prefix.o"
91 extra_cxx_objs="${extra_cxx_objs} ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o ../prefix.o"
92 extra_c_flags=-DUSE_CPPLIB=1
93 cpp_main=cppmain
94fi)
95
96# Enable Haifa scheduler.
97AC_ARG_ENABLE(haifa,
98[ --enable-haifa Use the experimental scheduler.
99 --disable-haifa Don't use the experimental scheduler for the
100 targets which normally enable it.])
101# Fast fixincludes
102#
103# This is a work in progress...
104AC_ARG_WITH(fast-fixincludes,
105[ --with-fast-fixincludes Use a faster fixinclude program. Experimental],
106fast_fixinc="$with_fast_fixincludes",
107fast_fixinc=no)
108
109# Enable threads
110# Pass with no value to take the default
111# Pass with a value to specify a thread package
112AC_ARG_ENABLE(threads,
113[ --enable-threads enable thread usage for target GCC.
114 --enable-threads=LIB use LIB thread package for target GCC.],
115if [[[ x$enable_threads = xno ]]]; then
116 enable_threads=''
117fi,
118enable_threads='')
119
120enable_threads_flag=$enable_threads
121# Check if a valid thread package
122case x${enable_threads_flag} in
123 x | xno)
124 # No threads
125 target_thread_file='single'
126 ;;
127 xyes)
128 # default
129 target_thread_file=''
130 ;;
131 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
132 xsolaris | xwin32 | xdce | xvxworks)
133 target_thread_file=$enable_threads_flag
134 ;;
135 *)
136 echo "$enable_threads is an unknown thread package" 1>&2
137 exit 1
138 ;;
139esac
140
141# Determine the host, build, and target systems
142AC_CANONICAL_SYSTEM
143
144# Find the native compiler
145AC_PROG_CC
146AC_PROG_MAKE_SET
147
148# Find some useful tools
149AC_PROG_AWK
150AC_PROG_LEX
151GCC_PROG_LN
152GCC_PROG_LN_S
153GCC_C_VOLATILE
154AC_PROG_RANLIB
155AC_PROG_YACC
156EGCS_PROG_INSTALL
157
158AC_HEADER_STDC
159AC_HEADER_TIME
160AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h)
161
162# Check for thread headers.
163AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
164AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
165
166# See if the system preprocessor understands the ANSI C preprocessor
167# stringification operator.
168AC_MSG_CHECKING(whether cpp understands the stringify operator)
169AC_CACHE_VAL(gcc_cv_c_have_stringify,
170[AC_TRY_COMPILE(,
171[#define S(x) #x
172char *test = S(foo);],
173gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
174AC_MSG_RESULT($gcc_cv_c_have_stringify)
175if test $gcc_cv_c_have_stringify = yes; then
176 AC_DEFINE(HAVE_CPP_STRINGIFY)
177fi
178
179# Use <inttypes.h> only if it exists,
180# doesn't clash with <sys/types.h>, and declares intmax_t.
181AC_MSG_CHECKING(for inttypes.h)
182AC_CACHE_VAL(gcc_cv_header_inttypes_h,
183[AC_TRY_COMPILE(
184 [#include <sys/types.h>
185#include <inttypes.h>],
186 [intmax_t i = -1;],
187 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
188 gcc_cv_header_inttypes_h=yes],
189 gcc_cv_header_inttypes_h=no)])
190AC_MSG_RESULT($gcc_cv_header_inttypes_h)
191
192AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
193 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
194 sysconf isascii gettimeofday)
195
196GCC_FUNC_VFPRINTF_DOPRNT
197GCC_FUNC_PRINTF_PTR
198
199GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
200 index rindex getenv atol sbrk abort atof strerror getcwd getwd)
201
202GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
203#include <sys/types.h>
204#ifdef HAVE_SYS_RESOURCE_H
205#include <sys/resource.h>
206#endif
207])
208
209AC_DECL_SYS_SIGLIST
210
211# File extensions
212manext='.1'
213objext='.o'
214AC_SUBST(manext)
215AC_SUBST(objext)
216
217build_xm_file=
218build_xm_defines=
219build_install_headers_dir=install-headers-tar
220build_exeext=
221host_xm_file=
222host_xm_defines=
223host_xmake_file=
224host_truncate_target=
225host_exeext=
226
227# Decode the host machine, then the target machine.
228# For the host machine, we save the xm_file variable as host_xm_file;
229# then we decode the target machine and forget everything else
230# that came from the host machine.
231for machine in $build $host $target; do
232
233 out_file=
234 xmake_file=
235 tmake_file=
236 extra_headers=
237 extra_passes=
238 extra_parts=
239 extra_programs=
240 extra_objs=
241 extra_host_objs=
242 extra_gcc_objs=
243 xm_defines=
244 float_format=
245 # Set this to force installation and use of collect2.
246 use_collect2=
247 # Set this to override the default target model.
248 target_cpu_default=
249 # Set this to control which fixincludes program to use.
250 if [[ x$fast_fixinc != xyes ]] ; then
251 fixincludes=fixincludes
252 else fixincludes=fixinc.sh ; fi
253 # Set this to control how the header file directory is installed.
254 install_headers_dir=install-headers-tar
255 # Set this to a non-empty list of args to pass to cpp if the target
256 # wants its .md file passed through cpp.
257 md_cppflags=
258 # Set this if directory names should be truncated to 14 characters.
259 truncate_target=
260 # Set this if gdb needs a dir command with `dirname $out_file`
261 gdb_needs_out_file_path=
262 # Set this if the build machine requires executables to have a
263 # file name suffix.
264 exeext=
265 # Set this to control which thread package will be used.
266 thread_file=
267 # Reinitialize these from the flag values every loop pass, since some
268 # configure entries modify them.
269 gas="$gas_flag"
270 gnu_ld="$gnu_ld_flag"
271 enable_threads=$enable_threads_flag
272
273 # Set default cpu_type, tm_file and xm_file so it can be updated in
274 # each machine entry.
275 cpu_type=`echo $machine | sed 's/-.*$//'`
276 case $machine in
277 alpha*-*-*)
278 cpu_type=alpha
279 ;;
280 arm*-*-*)
281 cpu_type=arm
282 ;;
283 c*-convex-*)
284 cpu_type=convex
285 ;;
286 i[[34567]]86-*-*)
287 cpu_type=i386
288 ;;
289 hppa*-*-*)
290 cpu_type=pa
291 ;;
292 m68000-*-*)
293 cpu_type=m68k
294 ;;
295 mips*-*-*)
296 cpu_type=mips
297 ;;
298 powerpc*-*-*)
299 cpu_type=rs6000
300 ;;
301 pyramid-*-*)
302 cpu_type=pyr
303 ;;
304 sparc*-*-*)
305 cpu_type=sparc
306 ;;
307 esac
308
309 tm_file=${cpu_type}/${cpu_type}.h
310 xm_file=${cpu_type}/xm-${cpu_type}.h
311
312 # Set the default macros to define for GNU/Linux systems.
313 case $machine in
314 *-*-linux-gnu*)
315 xm_defines="HAVE_ATEXIT POSIX BSTRING"
316 ;;
317 esac
318
319 case $machine in
320 # Support site-specific machine types.
321 *local*)
322 cpu_type=`echo $machine | sed -e 's/-.*//'`
323 rest=`echo $machine | sed -e "s/$cpu_type-//"`
324 xm_file=${cpu_type}/xm-$rest.h
325 tm_file=${cpu_type}/$rest.h
326 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
327 then xmake_file=${cpu_type}/x-$rest; \
328 else true; \
329 fi
330 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
331 then tmake_file=${cpu_type}/t-$rest; \
332 else true; \
333 fi
334 ;;
335 1750a-*-*)
336 ;;
337 a29k-*-bsd* | a29k-*-sym1*)
338 tm_file="${tm_file} a29k/unix.h"
339 xm_defines=USG
340 xmake_file=a29k/x-unix
341 use_collect2=yes
342 ;;
343 a29k-*-udi | a29k-*-coff)
344 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
345 tmake_file=a29k/t-a29kbare
346 ;;
347 a29k-wrs-vxworks*)
348 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
349 tmake_file=a29k/t-vx29k
350 extra_parts="crtbegin.o crtend.o"
351 thread_file='vxworks'
352 ;;
353 a29k-*-*) # Default a29k environment.
354 use_collect2=yes
355 ;;
356 alpha*-*-linux-gnuecoff*)
357 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
358 target_cpu_default="MASK_GAS"
359 gas=no
360 xmake_file=none
361 gas=yes gnu_ld=yes
362 ;;
363 alpha*-*-linux-gnulibc1*)
364 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
365 target_cpu_default="MASK_GAS"
366 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
367 extra_parts="crtbegin.o crtend.o"
368 fixincludes=fixinc.wrap
369 xmake_file=none
370 gas=yes gnu_ld=yes
371 if [[ x$enable_threads = xyes ]]; then
372 thread_file='posix'
373 fi
374 ;;
375 alpha*-*-linux-gnu*)
376 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
377 target_cpu_default="MASK_GAS"
378 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
379 extra_parts="crtbegin.o crtend.o"
380 xmake_file=none
381 fixincludes=Makefile.in
382 gas=yes gnu_ld=yes
383 if [[ x$enable_threads = xyes ]]; then
384 thread_file='posix'
385 fi
386 ;;
387 alpha*-*-netbsd*)
388 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
389 target_cpu_default="MASK_GAS"
390 tmake_file="alpha/t-crtbe"
391 extra_parts="crtbegin.o crtend.o"
392 xmake_file=none
393 fixincludes=fixinc.wrap
394 gas=yes gnu_ld=yes
395 ;;
396
397 alpha*-dec-osf*)
398 if [[ x$stabs = xyes ]]
399 then
400 tm_file="${tm_file} dbx.h"
401 fi
402 if [[ x$gas != xyes ]]
403 then
404 extra_passes="mips-tfile mips-tdump"
405 fi
406 use_collect2=yes
407 case $machine in
408 *-*-osf1*)
409 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
410 ;;
411 *-*-osf[[23]]*)
412 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
413 ;;
414 *-*-osf4*)
415 tm_file="${tm_file} alpha/osf.h"
416 # Some versions of OSF4 (specifically X4.0-9 296.7) have
417 # a broken tar, so we use cpio instead.
418 install_headers_dir=install-headers-cpio
419 ;;
420 esac
421 case $machine in
422 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
423 target_cpu_default=MASK_SUPPORT_ARCH
424 ;;
425 esac
426 ;;
427 alpha*-*-vxworks*)
428 tm_file="${tm_file} dbx.h alpha/vxworks.h"
429 if [ x$gas != xyes ]
430 then
431 extra_passes="mips-tfile mips-tdump"
432 fi
433 use_collect2=yes
434 ;;
435 alpha*-*-winnt*)
436 tm_file="${tm_file} alpha/win-nt.h"
437 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
438 tmake_file=t-libc-ok
439 xmake_file=winnt/x-winnt
440 extra_host_objs=oldnames.o
441 extra_gcc_objs="spawnv.o oldnames.o"
442 fixincludes=fixinc.winnt
443 if [[ x$gnu_ld != xyes ]]
444 then
445 extra_programs=ld.exe
446 fi
447 if [[ x$enable_threads = xyes ]]; then
448 thread_file='win32'
449 fi
450 ;;
451 alpha*-dec-vms*)
452 tm_file=alpha/vms.h
453 xm_file="${xm_file} alpha/xm-vms.h"
454 tmake_file=alpha/t-vms
455 fixincludes=Makefile.in
456 ;;
457 arc-*-elf*)
458 extra_parts="crtinit.o crtfini.o"
459 ;;
460 arm-*-coff* | armel-*-coff*)
461 tm_file=arm/coff.h
462 tmake_file=arm/t-bare
463 ;;
464 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
465 tm_file=arm/riscix1-1.h
466 use_collect2=yes
467 ;;
468 arm-*-riscix*) # Acorn RISC machine
469 if [[ x$gas = xyes ]]
470 then
471 tm_file=arm/rix-gas.h
472 else
473 tm_file=arm/riscix.h
474 fi
475 xmake_file=arm/x-riscix
476 tmake_file=arm/t-riscix
477 use_collect2=yes
478 ;;
479 arm-semi-aout | armel-semi-aout)
480 tm_file=arm/semi.h
481 tmake_file=arm/t-semi
482 fixincludes=Makefile.in # There is nothing to fix
483 ;;
484 arm-semi-aof | armel-semi-aof)
485 tm_file=arm/semiaof.h
486 tmake_file=arm/t-semiaof
487 fixincludes=Makefile.in # There is nothing to fix
488 ;;
489 arm-*-netbsd*)
490 tm_file=arm/netbsd.h
491 xm_file="xm-siglist.h ${xm_file}"
492 tmake_file="t-netbsd arm/t-netbsd"
493 # On NetBSD, the headers are already okay, except for math.h.
494 fixincludes=fixinc.wrap
495 ;;
496 arm-*-linux-gnuaout*) # ARM GNU/Linux
497 cpu_type=arm
498 xmake_file=x-linux
499 tm_file=arm/linux-gas.h
500 tmake_file=arm/t-linux
501 fixincludes=Makefile.in
502 gnu_ld=yes
503 ;;
504 arm-*-aout)
505 tm_file=arm/aout.h
506 tmake_file=arm/t-bare
507 ;;
508 c1-convex-*) # Convex C1
509 target_cpu_default=1
510 use_collect2=yes
511 fixincludes=Makefile.in
512 ;;
513 c2-convex-*) # Convex C2
514 target_cpu_default=2
515 use_collect2=yes
516 fixincludes=Makefile.in
517 ;;
518 c32-convex-*)
519 target_cpu_default=4
520 use_collect2=yes
521 fixincludes=Makefile.in
522 ;;
523 c34-convex-*)
524 target_cpu_default=8
525 use_collect2=yes
526 fixincludes=Makefile.in
527 ;;
528 c38-convex-*)
529 target_cpu_default=16
530 use_collect2=yes
531 fixincludes=Makefile.in
532 ;;
533 clipper-intergraph-clix*)
534 tm_file="${tm_file} svr3.h clipper/clix.h"
535 xm_file=clipper/xm-clix.h
536 xmake_file=clipper/x-clix
537 extra_headers=va-clipper.h
538 extra_parts="crtbegin.o crtend.o"
539 install_headers_dir=install-headers-cpio
540 ;;
541 dsp16xx-*)
542 ;;
543 elxsi-elxsi-*)
544 use_collect2=yes
545 ;;
546# This hasn't been upgraded to GCC 2.
547# fx80-alliant-*) # Alliant FX/80
548# ;;
549 h8300-*-*)
550 float_format=i32
551 ;;
552 hppa1.1-*-pro*)
553 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
554 xm_file=pa/xm-papro.h
555 tmake_file=pa/t-pro
556 ;;
557 hppa1.1-*-osf*)
558 target_cpu_default=1
559 tm_file="${tm_file} pa/pa-osf.h"
560 use_collect2=yes
561 fixincludes=Makefile.in
562 ;;
563 hppa1.1-*-rtems*)
564 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
565 xm_file=pa/xm-papro.h
566 tmake_file=pa/t-pro
567 ;;
568 hppa1.0-*-osf*)
569 tm_file="${tm_file} pa/pa-osf.h"
570 use_collect2=yes
571 fixincludes=Makefile.in
572 ;;
573 hppa1.1-*-bsd*)
574 target_cpu_default=1
575 use_collect2=yes
576 fixincludes=Makefile.in
577 ;;
578 hppa1.0-*-bsd*)
579 use_collect2=yes
580 fixincludes=Makefile.in
581 ;;
582 hppa1.0-*-hpux7*)
583 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
584 xm_file=pa/xm-pahpux.h
585 xmake_file=pa/x-pa-hpux
586 if [[ x$gas = xyes ]]
587 then
588 tm_file="${tm_file} pa/gas.h"
589 fi
590 install_headers_dir=install-headers-cpio
591 use_collect2=yes
592 ;;
593 hppa1.0-*-hpux8.0[[0-2]]*)
594 tm_file="${tm_file} pa/pa-hpux.h"
595 xm_file=pa/xm-pahpux.h
596 xmake_file=pa/x-pa-hpux
597 if [[ x$gas = xyes ]]
598 then
599 tm_file="${tm_file} pa/pa-gas.h"
600 else
601 tm_file="pa/pa-oldas.h ${tm_file}"
602 fi
603 install_headers_dir=install-headers-cpio
604 use_collect2=yes
605 ;;
606 hppa1.1-*-hpux8.0[[0-2]]*)
607 target_cpu_default=1
608 tm_file="${tm_file} pa/pa-hpux.h"
609 xm_file=pa/xm-pahpux.h
610 xmake_file=pa/x-pa-hpux
611 if [[ x$gas = xyes ]]
612 then
613 tm_file="${tm_file} pa/pa-gas.h"
614 else
615 tm_file="pa/pa-oldas.h ${tm_file}"
616 fi
617 install_headers_dir=install-headers-cpio
618 use_collect2=yes
619 ;;
620 hppa1.1-*-hpux8*)
621 target_cpu_default=1
622 tm_file="${tm_file} pa/pa-hpux.h"
623 xm_file=pa/xm-pahpux.h
624 xmake_file=pa/x-pa-hpux
625 if [[ x$gas = xyes ]]
626 then
627 tm_file="${tm_file} pa/pa-gas.h"
628 fi
629 install_headers_dir=install-headers-cpio
630 use_collect2=yes
631 ;;
632 hppa1.0-*-hpux8*)
633 tm_file="${tm_file} pa/pa-hpux.h"
634 xm_file=pa/xm-pahpux.h
635 xmake_file=pa/x-pa-hpux
636 if [[ x$gas = xyes ]]
637 then
638 tm_file="${tm_file} pa/pa-gas.h"
639 fi
640 install_headers_dir=install-headers-cpio
641 use_collect2=yes
642 ;;
643 hppa1.1-*-hpux10*)
644 target_cpu_default=1
645 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
646 xm_file=pa/xm-pahpux.h
647 xmake_file=pa/x-pa-hpux
648 tmake_file=pa/t-pa
649 if [[ x$gas = xyes ]]
650 then
651 tm_file="${tm_file} pa/pa-gas.h"
652 fi
653 if [[ x$enable_threads = x ]]; then
654 enable_threads=$have_pthread_h
655 fi
656 if [[ x$enable_threads = xyes ]]; then
657 thread_file='dce'
658 tmake_file="${tmake_file} pa/t-dce-thr"
659 fi
660 install_headers_dir=install-headers-cpio
661 use_collect2=yes
662 ;;
663 hppa1.0-*-hpux10*)
664 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
665 xm_file=pa/xm-pahpux.h
666 xmake_file=pa/x-pa-hpux
667 if [[ x$gas = xyes ]]
668 then
669 tm_file="${tm_file} pa/pa-gas.h"
670 fi
671 if [[ x$enable_threads = x ]]; then
672 enable_threads=$have_pthread_h
673 fi
674 if [[ x$enable_threads = xyes ]]; then
675 thread_file='dce'
676 tmake_file="${tmake_file} pa/t-dce-thr"
677 fi
678 install_headers_dir=install-headers-cpio
679 use_collect2=yes
680 ;;
681 hppa1.1-*-hpux*)
682 target_cpu_default=1
683 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
684 xm_file=pa/xm-pahpux.h
685 xmake_file=pa/x-pa-hpux
686 if [[ x$gas = xyes ]]
687 then
688 tm_file="${tm_file} pa/pa-gas.h"
689 fi
690 install_headers_dir=install-headers-cpio
691 use_collect2=yes
692 ;;
693 hppa1.0-*-hpux*)
694 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
695 xm_file=pa/xm-pahpux.h
696 xmake_file=pa/x-pa-hpux
697 if [[ x$gas = xyes ]]
698 then
699 tm_file="${tm_file} pa/pa-gas.h"
700 fi
701 install_headers_dir=install-headers-cpio
702 use_collect2=yes
703 ;;
704 hppa1.1-*-hiux*)
705 target_cpu_default=1
706 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
707 xm_file=pa/xm-pahpux.h
708 xmake_file=pa/x-pa-hpux
709 if [[ x$gas = xyes ]]
710 then
711 tm_file="${tm_file} pa/pa-gas.h"
712 fi
713 install_headers_dir=install-headers-cpio
714 use_collect2=yes
715 ;;
716 hppa1.0-*-hiux*)
717 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
718 xm_file=pa/xm-pahpux.h
719 xmake_file=pa/x-pa-hpux
720 if [[ x$gas = xyes ]]
721 then
722 tm_file="${tm_file} pa/pa-gas.h"
723 fi
724 install_headers_dir=install-headers-cpio
725 use_collect2=yes
726 ;;
727 hppa*-*-lites*)
728 target_cpu_default=1
729 use_collect2=yes
730 fixincludes=Makefile.in
731 ;;
732 i370-*-mvs*)
733 ;;
734 i[[34567]]86-ibm-aix*) # IBM PS/2 running AIX
735 if [[ x$gas = xyes ]]
736 then
737 tm_file=i386/aix386.h
738 extra_parts="crtbegin.o crtend.o"
739 tmake_file=i386/t-crtstuff
740 else
741 tm_file=i386/aix386ng.h
742 use_collect2=yes
743 fi
744 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
745 xm_defines=USG
746 xmake_file=i386/x-aix
747 ;;
748 i[[34567]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
749 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
750 xm_defines="USG POSIX SMALL_ARG_MAX"
751 xmake_file=i386/x-ncr3000
752 if [[ x$stabs = xyes -a x$gas = xyes ]]
753 then
754 tm_file=i386/sysv4gdb.h
755 else
756 tm_file=i386/sysv4.h
757 fi
758 extra_parts="crtbegin.o crtend.o"
759 tmake_file=i386/t-crtpic
760 ;;
761 i[[34567]]86-next-*)
762 tm_file=i386/next.h
763 xm_file=i386/xm-next.h
764 tmake_file=i386/t-next
765 xmake_file=i386/x-next
766 extra_objs=nextstep.o
767 if [[ x$enable_threads = xyes ]]; then
768 thread_file='mach'
769 fi
770 ;;
771 i[[34567]]86-sequent-bsd*) # 80386 from Sequent
772 use_collect2=yes
773 if [[ x$gas = xyes ]]
774 then
775 tm_file=i386/seq-gas.h
776 else
777 tm_file=i386/sequent.h
778 fi
779 ;;
780 i[[34567]]86-sequent-ptx1*)
781 xm_defines="USG SVR3"
782 xmake_file=i386/x-sysv3
783 tm_file=i386/seq-sysv3.h
784 tmake_file=i386/t-crtstuff
785 fixincludes=fixinc.ptx
786 extra_parts="crtbegin.o crtend.o"
787 install_headers_dir=install-headers-cpio
788 ;;
789 i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
790 xm_defines="USG SVR3"
791 xmake_file=i386/x-sysv3
792 tm_file=i386/seq2-sysv3.h
793 tmake_file=i386/t-crtstuff
794 extra_parts="crtbegin.o crtend.o"
795 fixincludes=fixinc.ptx
796 install_headers_dir=install-headers-cpio
797 ;;
798 i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
799 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
800 xm_defines="USG POSIX SMALL_ARG_MAX"
801 xmake_file=x-svr4
802 tm_file=i386/ptx4-i.h
803 tmake_file=t-svr4
804 extra_parts="crtbegin.o crtend.o"
805 fixincludes=fixinc.ptx
806 install_headers_dir=install-headers-cpio
807 ;;
808 i386-sun-sunos*) # Sun i386 roadrunner
809 xm_defines=USG
810 tm_file=i386/sun.h
811 use_collect2=yes
812 ;;
813 i[[34567]]86-wrs-vxworks*)
814 tm_file=i386/vxi386.h
815 tmake_file=i386/t-i386bare
816 ;;
817 i[[34567]]86-*-aout*)
818 tm_file=i386/i386-aout.h
819 tmake_file=i386/t-i386bare
820 ;;
821 i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
822 tm_file=i386/bsd386.h
823# tmake_file=t-libc-ok
824 ;;
825 i[[34567]]86-*-bsd*)
826 tm_file=i386/386bsd.h
827# tmake_file=t-libc-ok
828# Next line turned off because both 386BSD and BSD/386 use GNU ld.
829# use_collect2=yes
830 ;;
831 i[[34567]]86-*-freebsdelf*)
832 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
833 # On FreeBSD, the headers are already ok, except for math.h.
834 fixincludes=fixinc.wrap
835 tmake_file=i386/t-freebsd
836 gas=yes
837 gnu_ld=yes
838 stabs=yes
839 ;;
840 i[[34567]]86-*-freebsd*)
841 tm_file=i386/freebsd.h
842 # On FreeBSD, the headers are already ok, except for math.h.
843 fixincludes=fixinc.wrap
844 tmake_file=i386/t-freebsd
845 ;;
846 i[[34567]]86-*-netbsd*)
847 tm_file=i386/netbsd.h
848 # On NetBSD, the headers are already okay, except for math.h.
849 fixincludes=fixinc.wrap
850 tmake_file=t-netbsd
851 ;;
852 i[[34567]]86-*-coff*)
853 tm_file=i386/i386-coff.h
854 tmake_file=i386/t-i386bare
855 ;;
856 i[[34567]]86-*-isc*) # 80386 running ISC system
857 xm_file="${xm_file} i386/xm-isc.h"
858 xm_defines="USG SVR3"
859 case $machine in
860 i[[34567]]86-*-isc[[34]]*)
861 xmake_file=i386/x-isc3
862 ;;
863 *)
864 xmake_file=i386/x-isc
865 ;;
866 esac
867 if [[ x$gas = xyes -a x$stabs = xyes ]]
868 then
869 tm_file=i386/iscdbx.h
870 tmake_file=i386/t-svr3dbx
871 extra_parts="svr3.ifile svr3z.ifile"
872 else
873 tm_file=i386/isccoff.h
874 tmake_file=i386/t-crtstuff
875 extra_parts="crtbegin.o crtend.o"
876 fi
877 install_headers_dir=install-headers-cpio
878 ;;
879 i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
880 # with a.out format using
881 # pre BFD linkers
882 xmake_file=x-linux-aout
883 tmake_file="t-linux-aout i386/t-crtstuff"
884 tm_file=i386/linux-oldld.h
885 fixincludes=Makefile.in #On Linux, the headers are ok already.
886 gnu_ld=yes
887 float_format=i386
888 ;;
889 i[[34567]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
890 # with a.out format
891 xmake_file=x-linux-aout
892 tmake_file="t-linux-aout i386/t-crtstuff"
893 tm_file=i386/linux-aout.h
894 fixincludes=Makefile.in #On Linux, the headers are ok already.
895 gnu_ld=yes
896 float_format=i386
897 ;;
898 i[[34567]]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
899 # with ELF format using the
900 # GNU/Linux C library 5
901 xmake_file=x-linux
902 tm_file=i386/linux.h
903 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
904 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
905 fixincludes=Makefile.in #On Linux, the headers are ok already.
906 gnu_ld=yes
907 float_format=i386
908 if [[ x$enable_threads = xyes ]]; then
909 thread_file='single'
910 fi
911 ;;
912 i[[34567]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
913 # with ELF format using glibc 2
914 # aka GNU/Linux C library 6
915 xmake_file=x-linux
916 tm_file=i386/linux.h
917 tmake_file="t-linux i386/t-crtstuff"
918 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
919 fixincludes=Makefile.in #On Linux, the headers are ok already.
920 gnu_ld=yes
921 float_format=i386
922 if [[ x$enable_threads = xyes ]]; then
923 thread_file='posix'
924 fi
925 ;;
926 i[[34567]]86-*-gnu*)
927 ;;
928 i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
929 xm_file=i386/xm-go32.h
930 tm_file=i386/go32.h
931 tmake_file=i386/t-go32
932 ;;
933 i[[34567]]86-pc-msdosdjgpp*)
934 xm_file=i386/xm-go32.h
935 tm_file=i386/go32.h
936 tmake_file=i386/t-go32
937 gnu_ld=yes
938 gas=yes
939 ;;
940 i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
941 tm_file=i386/moss.h
942 tmake_file=t-libc-ok
943 fixincludes=Makefile.in
944 gnu_ld=yes
945 gas=yes
946 ;;
947 i[[34567]]86-*-lynxos*)
948 if [[ x$gas = xyes ]]
949 then
950 tm_file=i386/lynx.h
951 else
952 tm_file=i386/lynx-ng.h
953 fi
954 xm_file=i386/xm-lynx.h
955 tmake_file=i386/t-i386bare
956 xmake_file=x-lynx
957 ;;
958 i[[34567]]86-*-mach*)
959 tm_file=i386/mach.h
960# tmake_file=t-libc-ok
961 use_collect2=yes
962 ;;
963 i[[34567]]86-*-osfrose*) # 386 using OSF/rose
964 if [[ x$elf = xyes ]]
965 then
966 tm_file=i386/osfelf.h
967 use_collect2=
968 else
969 tm_file=i386/osfrose.h
970 use_collect2=yes
971 fi
972 xm_file="i386/xm-osf.h ${xm_file}"
973 xmake_file=i386/x-osfrose
974 tmake_file=i386/t-osf
975 extra_objs=halfpic.o
976 ;;
977 i[[34567]]86-go32-rtems*)
978 cpu_type=i386
979 xm_file=i386/xm-go32.h
980 tm_file=i386/go32-rtems.h
981 tmake_file="i386/t-go32 t-rtems"
982 ;;
983 i[[34567]]86-*-rtemself*)
984 cpu_type=i386
985 tm_file=i386/rtemself.h
986 tmake_file="i386/t-i386bare t-rtems"
987 ;;
988 i[[34567]]86-*-rtems*)
989 cpu_type=i386
990 tm_file=i386/rtems.h
991 tmake_file="i386/t-i386bare t-rtems"
992 ;;
993 i[[34567]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
994 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
995 xm_defines="USG SVR3"
996 xmake_file=i386/x-sco5
997 fixincludes=fixinc.sco
998 install_headers_dir=install-headers-cpio
999 tm_file=i386/sco5.h
1000 if [[ x$gas = xyes ]]
1001 then
1002 tm_file="i386/sco5gas.h ${tm_file}"
1003 tmake_file=i386/t-sco5gas
1004 else
1005 tmake_file=i386/t-sco5
1006 fi
1007 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
1008 ;;
1009 i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
1010 xm_file="${xm_file} i386/xm-sco.h"
1011 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
1012 xmake_file=i386/x-sco4
1013 fixincludes=fixinc.sco
1014 install_headers_dir=install-headers-cpio
1015 if [[ x$stabs = xyes ]]
1016 then
1017 tm_file=i386/sco4dbx.h
1018 tmake_file=i386/t-svr3dbx
1019 extra_parts="svr3.ifile svr3z.rfile"
1020 else
1021 tm_file=i386/sco4.h
1022 tmake_file=i386/t-crtstuff
1023 extra_parts="crtbegin.o crtend.o"
1024 fi
1025 truncate_target=yes
1026 ;;
1027 i[[34567]]86-*-sco*) # 80386 running SCO system
1028 xm_file=i386/xm-sco.h
1029 xmake_file=i386/x-sco
1030 install_headers_dir=install-headers-cpio
1031 if [[ x$stabs = xyes ]]
1032 then
1033 tm_file=i386/scodbx.h
1034 tmake_file=i386/t-svr3dbx
1035 extra_parts="svr3.ifile svr3z.rfile"
1036 else
1037 tm_file=i386/sco.h
1038 extra_parts="crtbegin.o crtend.o"
1039 tmake_file=i386/t-crtstuff
1040 fi
1041 truncate_target=yes
1042 ;;
1043 i[[34567]]86-*-solaris2*)
1044 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1045 xm_defines="USG POSIX SMALL_ARG_MAX"
1046 if [[ x$stabs = xyes ]]
1047 then
1048 tm_file=i386/sol2dbg.h
1049 else
1050 tm_file=i386/sol2.h
1051 fi
1052 tmake_file=i386/t-sol2
1053 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1054 xmake_file=x-svr4
1055 case $machine in
1056 *-*-solaris2.[[0-4]])
1057 fixincludes=fixinc.svr4;;
1058 *)
1059 fixincludes=fixinc.wrap;;
1060 esac
1061 if [[ x$enable_threads = xyes ]]; then
1062 thread_file='solaris'
1063 fi
1064 ;;
1065 i[[34567]]86-*-sysv5*) # Intel x86 on System V Release 5
1066 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1067 xm_defines="USG POSIX"
1068 tm_file=i386/sysv4.h
1069 if [[ x$stabs = xyes ]]
1070 then
1071 tm_file="${tm_file} dbx.h"
1072 fi
1073 tmake_file=i386/t-crtpic
1074 xmake_file=x-svr4
1075 extra_parts="crtbegin.o crtend.o"
1076 fixincludes=Makefile.in # The headers are just fine, thank you.
1077 ;;
1078 i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
1079 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1080 xm_defines="USG POSIX SMALL_ARG_MAX"
1081 tm_file=i386/sysv4.h
1082 if [[ x$stabs = xyes ]]
1083 then
1084 tm_file="${tm_file} dbx.h"
1085 fi
1086 tmake_file=i386/t-crtpic
1087 xmake_file=x-svr4
1088 extra_parts="crtbegin.o crtend.o"
1089 ;;
1090 i[[34567]]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1091 cpu_type=i386
1092 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1093 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1094 fixincludes=Makefile.in #Don't do it on OSF/1
1095 if [[ x$stabs = xyes ]]
1096 then
1097 tm_file=i386/osf1elfgdb.h
1098 else
1099 tm_file=i386/osf1elf.h
1100 fi
1101 tmake_file=i386/t-osf1elf
1102 xmake_file=i386/x-osf1elf
1103 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1104 ;;
1105 i[[34567]]86-*-sysv*) # Intel 80386's running system V
1106 xm_defines="USG SVR3"
1107 xmake_file=i386/x-sysv3
1108 if [[ x$gas = xyes ]]
1109 then
1110 if [[ x$stabs = xyes ]]
1111 then
1112 tm_file=i386/svr3dbx.h
1113 tmake_file=i386/t-svr3dbx
1114 extra_parts="svr3.ifile svr3z.rfile"
1115 else
1116 tm_file=i386/svr3gas.h
1117 extra_parts="crtbegin.o crtend.o"
1118 tmake_file=i386/t-crtstuff
1119 fi
1120 else
1121 tm_file=i386/sysv3.h
1122 extra_parts="crtbegin.o crtend.o"
1123 tmake_file=i386/t-crtstuff
1124 fi
1125 ;;
1126 i386-*-vsta) # Intel 80386's running VSTa kernel
1127 xm_file="${xm_file} i386/xm-vsta.h"
1128 tm_file=i386/vsta.h
1129 tmake_file=i386/t-vsta
1130 xmake_file=i386/x-vsta
1131 ;;
1132 i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
1133 xm_file="${xm_file} i386/xm-cygwin32.h"
1134 tmake_file=i386/t-cygwin32
1135 tm_file=i386/cygwin32.h
1136 xmake_file=i386/x-cygwin32
1137 extra_objs=winnt.o
1138 fixincludes=Makefile.in
1139 if [[ x$enable_threads = xyes ]]; then
1140 thread_file='win32'
1141 fi
1142 exeext=.exe
1143 ;;
1144 i[[34567]]86-*-mingw32*)
1145 tm_file=i386/mingw32.h
1146 xm_file="${xm_file} i386/xm-mingw32.h"
1147 tmake_file="i386/t-cygwin32 i386/t-mingw32"
1148 extra_objs=winnt.o
1149 xmake_file=i386/x-cygwin32
1150 fixincludes=Makefile.in
1151 if [[ x$enable_threads = xyes ]]; then
1152 thread_file='win32'
1153 fi
1154 exeext=.exe
1155 case $machine in
1156 *mingw32msv*)
1157 ;;
1158 *minwg32crt* | *mingw32*)
1159 tm_file="${tm_file} i386/crtdll.h"
1160 ;;
1161 esac
1162 ;;
1163 i[[34567]]86-*-winnt3*)
1164 tm_file=i386/win-nt.h
1165 out_file=i386/i386.c
1166 xm_file="xm-winnt.h ${xm_file}"
1167 xmake_file=winnt/x-winnt
1168 tmake_file=i386/t-winnt
1169 extra_host_objs="winnt.o oldnames.o"
1170 extra_gcc_objs="spawnv.o oldnames.o"
1171 fixincludes=fixinc.winnt
1172 if [[ x$gnu_ld != xyes ]]
1173 then
1174 extra_programs=ld.exe
1175 fi
1176 if [[ x$enable_threads = xyes ]]; then
1177 thread_file='win32'
1178 fi
1179 ;;
1180 i[[34567]]86-dg-dgux*)
1181 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1182 xm_defines="USG POSIX"
1183 out_file=i386/dgux.c
1184 tm_file=i386/dgux.h
1185 tmake_file=i386/t-dgux
1186 xmake_file=i386/x-dgux
1187 fixincludes=fixinc.dgux
1188 install_headers_dir=install-headers-cpio
1189 ;;
1190 i860-alliant-*) # Alliant FX/2800
1191 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1192 xm_file="${xm_file}"
1193 xmake_file=i860/x-fx2800
1194 tmake_file=i860/t-fx2800
1195 extra_parts="crtbegin.o crtend.o"
1196 ;;
1197 i860-*-bsd*)
1198 tm_file="${tm_file} i860/bsd.h"
1199 if [[ x$gas = xyes ]]
1200 then
1201 tm_file="${tm_file} i860/bsd-gas.h"
1202 fi
1203 use_collect2=yes
1204 ;;
1205 i860-*-mach*)
1206 tm_file="${tm_file} i860/mach.h"
1207 tmake_file=t-libc-ok
1208 ;;
1209 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1210 tm_file="${tm_file} svr3.h i860/paragon.h"
1211 xm_defines="USG SVR3"
1212 tmake_file=t-osf
1213 ;;
1214 i860-*-sysv3*)
1215 tm_file="${tm_file} svr3.h i860/sysv3.h"
1216 xm_defines="USG SVR3"
1217 xmake_file=i860/x-sysv3
1218 extra_parts="crtbegin.o crtend.o"
1219 ;;
1220 i860-*-sysv4*)
1221 tm_file="${tm_file} svr4.h i860/sysv4.h"
1222 xm_defines="USG SVR3"
1223 xmake_file=i860/x-sysv4
1224 tmake_file=t-svr4
1225 extra_parts="crtbegin.o crtend.o"
1226 ;;
1227 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1228 tm_file="${tm_file} i960/vx960.h"
1229 tmake_file=i960/t-vxworks960
1230 use_collect2=yes
1231 thread_file='vxworks'
1232 ;;
1233 i960-wrs-vxworks5* | i960-wrs-vxworks)
1234 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1235 tmake_file=i960/t-vxworks960
1236 use_collect2=yes
1237 thread_file='vxworks'
1238 ;;
1239 i960-wrs-vxworks*)
1240 tm_file="${tm_file} i960/vx960.h"
1241 tmake_file=i960/t-vxworks960
1242 use_collect2=yes
1243 thread_file='vxworks'
1244 ;;
1245 i960-*-coff*)
1246 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1247 tmake_file=i960/t-960bare
1248 use_collect2=yes
1249 ;;
1250 i960-*-rtems)
1251 tmake_file="i960/t-960bare t-rtems"
1252 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1253 use_collect2=yes
1254 ;;
1255 i960-*-*) # Default i960 environment.
1256 use_collect2=yes
1257 ;;
1258 m32r-*-elf*)
1259 extra_parts="crtinit.o crtfini.o"
1260 ;;
1261 m68000-convergent-sysv*)
1262 tm_file=m68k/ctix.h
1263 xm_file="m68k/xm-3b1.h ${xm_file}"
1264 xm_defines=USG
1265 use_collect2=yes
1266 extra_headers=math-68881.h
1267 ;;
1268 m68000-hp-bsd*) # HP 9000/200 running BSD
1269 tm_file=m68k/hp2bsd.h
1270 xmake_file=m68k/x-hp2bsd
1271 use_collect2=yes
1272 extra_headers=math-68881.h
1273 ;;
1274 m68000-hp-hpux*) # HP 9000 series 300
1275 xm_file="xm_alloca.h ${xm_file}"
1276 xm_defines="USG NO_SYS_SIGLIST"
1277 if [[ x$gas = xyes ]]
1278 then
1279 xmake_file=m68k/x-hp320g
1280 tm_file=m68k/hp310g.h
1281 else
1282 xmake_file=m68k/x-hp320
1283 tm_file=m68k/hp310.h
1284 fi
1285 install_headers_dir=install-headers-cpio
1286 use_collect2=yes
1287 extra_headers=math-68881.h
1288 ;;
1289 m68000-sun-sunos3*)
1290 tm_file=m68k/sun2.h
1291 use_collect2=yes
1292 extra_headers=math-68881.h
1293 ;;
1294 m68000-sun-sunos4*)
1295 tm_file=m68k/sun2o4.h
1296 use_collect2=yes
1297 extra_headers=math-68881.h
1298 ;;
1299 m68000-att-sysv*)
1300 xm_file="m68k/xm-3b1.h ${xm_file}"
1301 xm_defines=USG
1302 if [[ x$gas = xyes ]]
1303 then
1304 tm_file=m68k/3b1g.h
1305 else
1306 tm_file=m68k/3b1.h
1307 fi
1308 use_collect2=yes
1309 extra_headers=math-68881.h
1310 ;;
1311 m68k-apple-aux*) # Apple Macintosh running A/UX
1312 xm_defines="USG AUX"
1313 tmake_file=m68k/t-aux
1314 install_headers_dir=install-headers-cpio
1315 extra_headers=math-68881.h
1316 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1317 tm_file=
1318 if [[ "$gnu_ld" = yes ]]
1319 then
1320 tm_file="${tm_file} m68k/auxgld.h"
1321 else
1322 tm_file="${tm_file} m68k/auxld.h"
1323 fi
1324 if [[ "$gas" = yes ]]
1325 then
1326 tm_file="${tm_file} m68k/auxgas.h"
1327 else
1328 tm_file="${tm_file} m68k/auxas.h"
1329 fi
1330 tm_file="${tm_file} m68k/a-ux.h"
1331 float_format=m68k
1332 ;;
1333 m68k-apollo-*)
1334 tm_file=m68k/apollo68.h
1335 xmake_file=m68k/x-apollo68
1336 use_collect2=yes
1337 extra_headers=math-68881.h
1338 float_format=m68k
1339 ;;
1340 m68k-altos-sysv*) # Altos 3068
1341 if [[ x$gas = xyes ]]
1342 then
1343 tm_file=m68k/altos3068.h
1344 xm_defines=USG
1345 else
1346 echo "The Altos is supported only with the GNU assembler" 1>&2
1347 exit 1
1348 fi
1349 extra_headers=math-68881.h
1350 ;;
1351 m68k-bull-sysv*) # Bull DPX/2
1352 if [[ x$gas = xyes ]]
1353 then
1354 if [[ x$stabs = xyes ]]
1355 then
1356 tm_file=m68k/dpx2cdbx.h
1357 else
1358 tm_file=m68k/dpx2g.h
1359 fi
1360 else
1361 tm_file=m68k/dpx2.h
1362 fi
1363 xm_file="xm-alloca.h ${xm_file}"
1364 xm_defines=USG
1365 xmake_file=m68k/x-dpx2
1366 use_collect2=yes
1367 extra_headers=math-68881.h
1368 ;;
1369 m68k-atari-sysv4*) # Atari variant of V.4.
1370 tm_file=m68k/atari.h
1371 xm_file="xm-alloca.h ${xm_file}"
1372 xm_defines="USG FULL_PROTOTYPES"
1373 tmake_file=t-svr4
1374 extra_parts="crtbegin.o crtend.o"
1375 extra_headers=math-68881.h
1376 float_format=m68k
1377 ;;
1378 m68k-motorola-sysv*)
1379 tm_file=m68k/mot3300.h
1380 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
1381 xm_defines=NO_SYS_SIGLIST
1382 if [[ x$gas = xyes ]]
1383 then
1384 xmake_file=m68k/x-mot3300-gas
1385 if [[ x$gnu_ld = xyes ]]
1386 then
1387 tmake_file=m68k/t-mot3300-gald
1388 else
1389 tmake_file=m68k/t-mot3300-gas
1390 use_collect2=yes
1391 fi
1392 else
1393 xmake_file=m68k/x-mot3300
1394 if [[ x$gnu_ld = xyes ]]
1395 then
1396 tmake_file=m68k/t-mot3300-gld
1397 else
1398 tmake_file=m68k/t-mot3300
1399 use_collect2=yes
1400 fi
1401 fi
1402 gdb_needs_out_file_path=yes
1403 extra_parts="crt0.o mcrt0.o"
1404 extra_headers=math-68881.h
1405 float_format=m68k
1406 ;;
1407 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1408 tm_file=m68k/tower-as.h
1409 xm_defines="USG SVR3"
1410 xmake_file=m68k/x-tower
1411 extra_parts="crtbegin.o crtend.o"
1412 extra_headers=math-68881.h
1413 ;;
1414 m68k-plexus-sysv*)
1415 tm_file=m68k/plexus.h
1416 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
1417 xm_defines=USG
1418 use_collect2=yes
1419 extra_headers=math-68881.h
1420 ;;
1421 m68k-tti-*)
1422 tm_file=m68k/pbb.h
1423 xm_file="xm-alloca.h ${xm_file}"
1424 xm_defines=USG
1425 extra_headers=math-68881.h
1426 ;;
1427 m68k-crds-unos*)
1428 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
1429 xm_defines="USG unos"
1430 xmake_file=m68k/x-crds
1431 tm_file=m68k/crds.h
1432 use_collect2=yes
1433 extra_headers=math-68881.h
1434 ;;
1435 m68k-cbm-sysv4*) # Commodore variant of V.4.
1436 tm_file=m68k/amix.h
1437 xm_file="xm-alloca.h ${xm_file}"
1438 xm_defines="USG FULL_PROTOTYPES"
1439 xmake_file=m68k/x-amix
1440 tmake_file=t-svr4
1441 extra_parts="crtbegin.o crtend.o"
1442 extra_headers=math-68881.h
1443 float_format=m68k
1444 ;;
1445 m68k-ccur-rtu)
1446 tm_file=m68k/ccur-GAS.h
1447 xmake_file=m68k/x-ccur
1448 extra_headers=math-68881.h
1449 use_collect2=yes
1450 float_format=m68k
1451 ;;
1452 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1453 tm_file=m68k/hp3bsd44.h
1454 xmake_file=m68k/x-hp3bsd44
1455 use_collect2=yes
1456 extra_headers=math-68881.h
1457 float_format=m68k
1458 ;;
1459 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1460 tm_file=m68k/hp3bsd.h
1461 use_collect2=yes
1462 extra_headers=math-68881.h
1463 float_format=m68k
1464 ;;
1465 m68k-isi-bsd*)
1466 if [[ x$with_fp = xno ]]
1467 then
1468 tm_file=m68k/isi-nfp.h
1469 else
1470 tm_file=m68k/isi.h
1471 float_format=m68k
1472 fi
1473 use_collect2=yes
1474 extra_headers=math-68881.h
1475 ;;
1476 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1477 xm_file="xm_alloca.h ${xm_file}"
1478 xm_defines="USG NO_SYS_SIGLIST"
1479 if [[ x$gas = xyes ]]
1480 then
1481 xmake_file=m68k/x-hp320g
1482 tm_file=m68k/hp320g.h
1483 else
1484 xmake_file=m68k/x-hp320
1485 tm_file=m68k/hpux7.h
1486 fi
1487 install_headers_dir=install-headers-cpio
1488 use_collect2=yes
1489 extra_headers=math-68881.h
1490 float_format=m68k
1491 ;;
1492 m68k-hp-hpux*) # HP 9000 series 300
1493 xm_file="xm_alloca.h ${xm_file}"
1494 xm_defines="USG NO_SYS_SIGLIST"
1495 if [[ x$gas = xyes ]]
1496 then
1497 xmake_file=m68k/x-hp320g
1498 tm_file=m68k/hp320g.h
1499 else
1500 xmake_file=m68k/x-hp320
1501 tm_file=m68k/hp320.h
1502 fi
1503 install_headers_dir=install-headers-cpio
1504 use_collect2=yes
1505 extra_headers=math-68881.h
1506 float_format=m68k
1507 ;;
1508 m68k-sun-mach*)
1509 tm_file=m68k/sun3mach.h
1510 use_collect2=yes
1511 extra_headers=math-68881.h
1512 float_format=m68k
1513 ;;
1514 m68k-sony-newsos3*)
1515 if [[ x$gas = xyes ]]
1516 then
1517 tm_file=m68k/news3gas.h
1518 else
1519 tm_file=m68k/news3.h
1520 fi
1521 use_collect2=yes
1522 extra_headers=math-68881.h
1523 float_format=m68k
1524 ;;
1525 m68k-sony-bsd* | m68k-sony-newsos*)
1526 if [[ x$gas = xyes ]]
1527 then
1528 tm_file=m68k/newsgas.h
1529 else
1530 tm_file=m68k/news.h
1531 fi
1532 use_collect2=yes
1533 extra_headers=math-68881.h
1534 float_format=m68k
1535 ;;
1536 m68k-next-nextstep2*)
1537 tm_file=m68k/next21.h
1538 xm_file="m68k/xm-next.h ${xm_file}"
1539 tmake_file=m68k/t-next
1540 xmake_file=m68k/x-next
1541 extra_objs=nextstep.o
1542 extra_headers=math-68881.h
1543 use_collect2=yes
1544 float_format=m68k
1545 ;;
1546 m68k-next-nextstep3*)
1547 tm_file=m68k/next.h
1548 xm_file="m68k/xm-next.h ${xm_file}"
1549 tmake_file=m68k/t-next
1550 xmake_file=m68k/x-next
1551 extra_objs=nextstep.o
1552 extra_headers=math-68881.h
1553 float_format=m68k
1554 if [[ x$enable_threads = xyes ]]; then
1555 thread_file='mach'
1556 fi
1557 ;;
1558 m68k-sun-sunos3*)
1559 if [[ x$with_fp = xno ]]
1560 then
1561 tm_file=m68k/sun3n3.h
1562 else
1563 tm_file=m68k/sun3o3.h
1564 float_format=m68k
1565 fi
1566 use_collect2=yes
1567 extra_headers=math-68881.h
1568 ;;
1569 m68k-sun-sunos*) # For SunOS 4 (the default).
1570 if [[ x$with_fp = xno ]]
1571 then
1572 tm_file=m68k/sun3n.h
1573 else
1574 tm_file=m68k/sun3.h
1575 float_format=m68k
1576 fi
1577 use_collect2=yes
1578 extra_headers=math-68881.h
1579 ;;
1580 m68k-wrs-vxworks*)
1581 tm_file=m68k/vxm68k.h
1582 tmake_file=m68k/t-vxworks68
1583 extra_headers=math-68881.h
1584 thread_file='vxworks'
1585 float_format=m68k
1586 ;;
1587 m68k-*-aout*)
1588 tmake_file=m68k/t-m68kbare
1589 tm_file="m68k/m68k-aout.h libgloss.h"
1590 extra_headers=math-68881.h
1591 float_format=m68k
1592 ;;
1593 m68k-*-coff*)
1594 tmake_file=m68k/t-m68kbare
1595 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1596 extra_headers=math-68881.h
1597 float_format=m68k
1598 ;;
1599 m68k-*-lynxos*)
1600 if [[ x$gas = xyes ]]
1601 then
1602 tm_file=m68k/lynx.h
1603 else
1604 tm_file=m68k/lynx-ng.h
1605 fi
1606 xm_file=m68k/xm-lynx.h
1607 xmake_file=x-lynx
1608 tmake_file=m68k/t-lynx
1609 extra_headers=math-68881.h
1610 float_format=m68k
1611 ;;
1612 m68k-*-netbsd*)
1613 tm_file=m68k/netbsd.h
1614 # On NetBSD, the headers are already okay, except for math.h.
1615 fixincludes=fixinc.wrap
1616 tmake_file=t-netbsd
1617 float_format=m68k
1618 ;;
1619 m68k-*-sysv3*) # Motorola m68k's running system V.3
1620 xm_file="xm-alloca.h ${xm_file}"
1621 xm_defines=USG
1622 xmake_file=m68k/x-m68kv
1623 extra_parts="crtbegin.o crtend.o"
1624 extra_headers=math-68881.h
1625 float_format=m68k
1626 ;;
1627 m68k-*-sysv4*) # Motorola m68k's running system V.4
1628 tm_file=m68k/m68kv4.h
1629 xm_file="xm-alloca.h ${xm_file}"
1630 xm_defines=USG
1631 tmake_file=t-svr4
1632 extra_parts="crtbegin.o crtend.o"
1633 extra_headers=math-68881.h
1634 float_format=m68k
1635 ;;
1636 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1637 # with a.out format
1638 xmake_file=x-linux
1639 tm_file=m68k/linux-aout.h
1640 tmake_file="t-linux-aout m68k/t-linux-aout"
1641 fixincludes=Makefile.in # The headers are ok already.
1642 extra_headers=math-68881.h
1643 float_format=m68k
1644 gnu_ld=yes
1645 ;;
1646 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1647 # with ELF format using the
1648 # GNU/Linux C library 5
1649 xmake_file=x-linux
1650 tm_file=m68k/linux.h
1651 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1652 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1653 fixincludes=Makefile.in # The headers are ok already.
1654 extra_headers=math-68881.h
1655 float_format=m68k
1656 gnu_ld=yes
1657 ;;
1658 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1659 # with ELF format using glibc 2
1660 # aka the GNU/Linux C library 6.
1661 xmake_file=x-linux
1662 tm_file=m68k/linux.h
1663 tmake_file="t-linux m68k/t-linux"
1664 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1665 fixincludes=Makefile.in # The headers are ok already.
1666 extra_headers=math-68881.h
1667 float_format=m68k
1668 gnu_ld=yes
1669 if [[ x$enable_threads = xyes ]]; then
1670 thread_file='posix'
1671 fi
1672 ;;
1673 m68k-*-psos*)
1674 tmake_file=m68k/t-m68kbare
1675 tm_file=m68k/m68k-psos.h
1676 extra_headers=math-68881.h
1677 float_format=m68k
1678 ;;
1679 m68k-*-rtems*)
1680 tmake_file="m68k/t-m68kbare t-rtems"
1681 tm_file=m68k/rtems.h
1682 extra_headers=math-68881.h
1683 float_format=m68k
1684 ;;
1685
1686 m88k-dg-dgux*)
1687 case $machine in
1688 m88k-dg-dguxbcs*)
1689 tm_file=m88k/dguxbcs.h
1690 tmake_file=m88k/t-dguxbcs
1691 ;;
1692 *)
1693 tm_file=m88k/dgux.h
1694 tmake_file=m88k/t-dgux
1695 ;;
1696 esac
1697 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1698 xmake_file=m88k/x-dgux
1699 if [[ x$gas = xyes ]]
1700 then
1701 tmake_file=m88k/t-dgux-gas
1702 fi
1703 fixincludes=fixinc.dgux
1704 ;;
1705 m88k-dolphin-sysv3*)
1706 tm_file=m88k/dolph.h
1707 extra_parts="crtbegin.o crtend.o"
1708 xm_file="m88k/xm-sysv3.h ${xm_file}"
1709 xmake_file=m88k/x-dolph
1710 if [[ x$gas = xyes ]]
1711 then
1712 tmake_file=m88k/t-m88k-gas
1713 fi
1714 ;;
1715 m88k-tektronix-sysv3)
1716 tm_file=m88k/tekXD88.h
1717 extra_parts="crtbegin.o crtend.o"
1718 xm_file="m88k/xm-sysv3.h ${xm_file}"
1719 xmake_file=m88k/x-tekXD88
1720 if [[ x$gas = xyes ]]
1721 then
1722 tmake_file=m88k/t-m88k-gas
1723 fi
1724 ;;
1725 m88k-*-aout*)
1726 tm_file=m88k/m88k-aout.h
1727 ;;
1728 m88k-*-coff*)
1729 tm_file=m88k/m88k-coff.h
1730 tmake_file=m88k/t-bug
1731 ;;
1732 m88k-*-luna*)
1733 tm_file=m88k/luna.h
1734 extra_parts="crtbegin.o crtend.o"
1735 if [[ x$gas = xyes ]]
1736 then
1737 tmake_file=m88k/t-luna-gas
1738 else
1739 tmake_file=m88k/t-luna
1740 fi
1741 ;;
1742 m88k-*-sysv3*)
1743 tm_file=m88k/sysv3.h
1744 extra_parts="crtbegin.o crtend.o"
1745 xm_file="m88k/xm-sysv3.h ${xm_file}"
1746 xmake_file=m88k/x-sysv3
1747 if [[ x$gas = xyes ]]
1748 then
1749 tmake_file=m88k/t-m88k-gas
1750 fi
1751 ;;
1752 m88k-*-sysv4*)
1753 tm_file=m88k/sysv4.h
1754 extra_parts="crtbegin.o crtend.o"
1755 xmake_file=m88k/x-sysv4
1756 tmake_file=m88k/t-sysv4
1757 ;;
1758 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1759 tm_file=mips/iris6.h
1760 xm_file=mips/xm-iris6.h
1761 fixincludes=fixinc.irix
1762 xmake_file=mips/x-iris6
1763 tmake_file=mips/t-iris6
1764 if [[ x$enable_threads = xyes ]]; then
1765 thread_file='irix'
1766 fi
1767 ;;
1768 mips-wrs-vxworks)
1769 tm_file="mips/elf.h libgloss.h"
1770 tmake_file=mips/t-ecoff
1771 gas=yes
1772 gnu_ld=yes
1773 extra_parts="crtbegin.o crtend.o"
1774# thread_file='vxworks'
1775 ;;
1776 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1777 tm_file="mips/iris6.h mips/cross64.h"
1778 xm_defines="USG HAVE_INTTYPES_H"
1779 fixincludes=Makefile.in
1780 xmake_file=mips/x-iris
1781 tmake_file=mips/t-cross64
1782 # See comment in mips/iris[56].h files.
1783 use_collect2=yes
1784 if [[ x$enable_threads = xyes ]]; then
1785 thread_file='irix'
1786 fi
1787 ;;
1788 mips-sni-sysv4)
1789 if [[ x$gas = xyes ]]
1790 then
1791 if [[ x$stabs = xyes ]]
1792 then
1793 tm_file=mips/iris5gdb.h
1794 else
1795 tm_file="mips/sni-svr4.h mips/sni-gas.h"
1796 fi
1797 else
1798 tm_file=mips/sni-svr4.h
1799 fi
1800 xm_defines=USG
1801 xmake_file=mips/x-sni-svr4
1802 tmake_file=mips/t-mips-gas
1803 if [[ x$gnu_ld != xyes ]]
1804 then
1805 use_collect2=yes
1806 fi
1807 ;;
1808 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1809 if [[ x$gas = xyes ]]
1810 then
1811 tm_file="mips/iris5.h mips/iris5gas.h"
1812 if [[ x$stabs = xyes ]]
1813 then
1814 tm_file="${tm_file} dbx.h"
1815 fi
1816 else
1817 tm_file=mips/iris5.h
1818 fi
1819 xm_defines="USG HAVE_INTTYPES_H"
1820 fixincludes=fixinc.irix
1821 xmake_file=mips/x-iris
1822 # mips-tfile doesn't work yet
1823 tmake_file=mips/t-mips-gas
1824 # See comment in mips/iris5.h file.
1825 use_collect2=yes
1826 if [[ x$enable_threads = xyes ]]; then
1827 thread_file='irix'
1828 fi
1829 ;;
1830 mips-sgi-irix4loser*) # Mostly like a MIPS.
1831 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
1832 if [[ x$stabs = xyes ]]; then
1833 tm_file="${tm_file} dbx.h"
1834 fi
1835 xm_defines=USG
1836 xmake_file=mips/x-iris
1837 if [[ x$gas = xyes ]]
1838 then
1839 tmake_file=mips/t-mips-gas
1840 else
1841 extra_passes="mips-tfile mips-tdump"
1842 fi
1843 if [[ x$gnu_ld != xyes ]]
1844 then
1845 use_collect2=yes
1846 fi
1847 if [[ x$enable_threads = xyes ]]; then
1848 thread_file='irix'
1849 fi
1850 ;;
1851 mips-sgi-irix4*) # Mostly like a MIPS.
1852 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
1853 if [[ x$stabs = xyes ]]; then
1854 tm_file="${tm_file} dbx.h"
1855 fi
1856 xm_defines=USG
1857 xmake_file=mips/x-iris
1858 if [[ x$gas = xyes ]]
1859 then
1860 tmake_file=mips/t-mips-gas
1861 else
1862 extra_passes="mips-tfile mips-tdump"
1863 fi
1864 if [[ x$gnu_ld != xyes ]]
1865 then
1866 use_collect2=yes
1867 fi
1868 if [[ x$enable_threads = xyes ]]; then
1869 thread_file='irix'
1870 fi
1871 ;;
1872 mips-sgi-*) # Mostly like a MIPS.
1873 tm_file="mips/iris3.h ${tm_file}"
1874 if [[ x$stabs = xyes ]]; then
1875 tm_file="${tm_file} dbx.h"
1876 fi
1877 xm_defines=USG
1878 xmake_file=mips/x-iris3
1879 if [[ x$gas = xyes ]]
1880 then
1881 tmake_file=mips/t-mips-gas
1882 else
1883 extra_passes="mips-tfile mips-tdump"
1884 fi
1885 if [[ x$gnu_ld != xyes ]]
1886 then
1887 use_collect2=yes
1888 fi
1889 ;;
1890 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1891 tm_file="mips/osfrose.h ${tm_file}"
1892 xmake_file=mips/x-osfrose
1893 tmake_file=mips/t-osfrose
1894 extra_objs=halfpic.o
1895 use_collect2=yes
1896 ;;
1897 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1898 tm_file=mips/dec-osf1.h
1899 if [[ x$stabs = xyes ]]; then
1900 tm_file="${tm_file} dbx.h"
1901 fi
1902 xmake_file=mips/x-dec-osf1
1903 if [[ x$gas = xyes ]]
1904 then
1905 tmake_file=mips/t-mips-gas
1906 else
1907 tmake_file=mips/t-ultrix
1908 extra_passes="mips-tfile mips-tdump"
1909 fi
1910 if [[ x$gnu_ld != xyes ]]
1911 then
1912 use_collect2=yes
1913 fi
1914 ;;
1915 mips-dec-bsd*) # Decstation running 4.4 BSD
1916 tm_file=mips/dec-bsd.h
1917 fixincludes=
1918 if [[ x$gas = xyes ]]
1919 then
1920 tmake_file=mips/t-mips-gas
1921 else
1922 tmake_file=mips/t-ultrix
1923 extra_passes="mips-tfile mips-tdump"
1924 fi
1925 if [[ x$gnu_ld != xyes ]]
1926 then
1927 use_collect2=yes
1928 fi
1929 ;;
1930 mips-dec-netbsd*) # Decstation running NetBSD
1931 tm_file=mips/netbsd.h
1932 # On NetBSD, the headers are already okay, except for math.h.
1933 fixincludes=fixinc.wrap
1934 tmake_file=t-netbsd
1935 ;;
1936 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1937 tm_file="mips/news4.h ${tm_file}"
1938 if [[ x$stabs = xyes ]]; then
1939 tm_file="${tm_file} dbx.h"
1940 fi
1941 if [[ x$gas = xyes ]]
1942 then
1943 tmake_file=mips/t-mips-gas
1944 else
1945 extra_passes="mips-tfile mips-tdump"
1946 fi
1947 if [[ x$gnu_ld != xyes ]]
1948 then
1949 use_collect2=yes
1950 fi
1951 xmake_file=mips/x-sony
1952 ;;
1953 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1954 # That is based on svr4.
1955 # t-svr4 is not right because this system doesn't use ELF.
1956 tm_file="mips/news5.h ${tm_file}"
1957 if [[ x$stabs = xyes ]]; then
1958 tm_file="${tm_file} dbx.h"
1959 fi
1960 xm_file="xm-siglist.h ${xm_file}"
1961 xm_defines=USG
1962 if [[ x$gas = xyes ]]
1963 then
1964 tmake_file=mips/t-mips-gas
1965 else
1966 extra_passes="mips-tfile mips-tdump"
1967 fi
1968 if [[ x$gnu_ld != xyes ]]
1969 then
1970 use_collect2=yes
1971 fi
1972 ;;
1973 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1974 tm_file="mips/svr4-5.h mips/svr4-t.h"
1975 if [[ x$stabs = xyes ]]; then
1976 tm_file="${tm_file} dbx.h"
1977 fi
1978 xm_file="xm-siglist.h ${xm_file}"
1979 xm_defines=USG
1980 xmake_file=mips/x-sysv
1981 if [[ x$gas = xyes ]]
1982 then
1983 tmake_file=mips/t-mips-gas
1984 extra_parts="crtbegin.o crtend.o"
1985 else
1986 tmake_file=mips/t-mips
1987 extra_passes="mips-tfile mips-tdump"
1988 fi
1989 if [[ x$gnu_ld != xyes ]]
1990 then
1991 use_collect2=yes
1992 fi
1993 ;;
1994 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1995 tm_file="mips/ultrix.h ${tm_file}"
1996 if [[ x$stabs = xyes ]]; then
1997 tm_file="${tm_file} dbx.h"
1998 fi
1999 xmake_file=mips/x-ultrix
2000 if [[ x$gas = xyes ]]
2001 then
2002 tmake_file=mips/t-mips-gas
2003 else
2004 tmake_file=mips/t-ultrix
2005 extra_passes="mips-tfile mips-tdump"
2006 fi
2007 if [[ x$gnu_ld != xyes ]]
2008 then
2009 use_collect2=yes
2010 fi
2011 ;;
2012 mips-*-riscos[[56789]]bsd*)
2013 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
2014 if [[ x$stabs = xyes ]]; then
2015 tm_file="${tm_file} dbx.h"
2016 fi
2017 if [[ x$gas = xyes ]]
2018 then
2019 tmake_file=mips/t-bsd-gas
2020 else
2021 tmake_file=mips/t-bsd
2022 extra_passes="mips-tfile mips-tdump"
2023 fi
2024 if [[ x$gnu_ld != xyes ]]
2025 then
2026 use_collect2=yes
2027 fi
2028 ;;
2029 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
2030 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2031 if [[ x$stabs = xyes ]]; then
2032 tm_file="${tm_file} dbx.h"
2033 fi
2034 if [[ x$gas = xyes ]]
2035 then
2036 tmake_file=mips/t-bsd-gas
2037 else
2038 tmake_file=mips/t-bsd
2039 extra_passes="mips-tfile mips-tdump"
2040 fi
2041 if [[ x$gnu_ld != xyes ]]
2042 then
2043 use_collect2=yes
2044 fi
2045 ;;
2046 mips-*-riscos[[56789]]sysv4*)
2047 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
2048 if [[ x$stabs = xyes ]]; then
2049 tm_file="${tm_file} dbx.h"
2050 fi
2051 xm_file="xm-siglist.h ${xm_file}"
2052 xmake_file=mips/x-sysv
2053 if [[ x$gas = xyes ]]
2054 then
2055 tmake_file=mips/t-svr4-gas
2056 else
2057 tmake_file=mips/t-svr4
2058 extra_passes="mips-tfile mips-tdump"
2059 fi
2060 if [[ x$gnu_ld != xyes ]]
2061 then
2062 use_collect2=yes
2063 fi
2064 ;;
2065 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
2066 tm_file="mips/svr4-4.h ${tm_file}"
2067 if [[ x$stabs = xyes ]]; then
2068 tm_file="${tm_file} dbx.h"
2069 fi
2070 xm_defines=USG
2071 xmake_file=mips/x-sysv
2072 if [[ x$gas = xyes ]]
2073 then
2074 tmake_file=mips/t-svr4-gas
2075 else
2076 tmake_file=mips/t-svr4
2077 extra_passes="mips-tfile mips-tdump"
2078 fi
2079 if [[ x$gnu_ld != xyes ]]
2080 then
2081 use_collect2=yes
2082 fi
2083 ;;
2084 mips-*-riscos[[56789]]sysv*)
2085 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
2086 if [[ x$stabs = xyes ]]; then
2087 tm_file="${tm_file} dbx.h"
2088 fi
2089 xm_defines=USG
2090 xmake_file=mips/x-sysv
2091 if [[ x$gas = xyes ]]
2092 then
2093 tmake_file=mips/t-svr3-gas
2094 else
2095 tmake_file=mips/t-svr3
2096 extra_passes="mips-tfile mips-tdump"
2097 fi
2098 if [[ x$gnu_ld != xyes ]]
2099 then
2100 use_collect2=yes
2101 fi
2102 ;;
2103 mips-*-sysv* | mips-*-riscos*sysv*)
2104 tm_file="mips/svr3-4.h ${tm_file}"
2105 if [[ x$stabs = xyes ]]; then
2106 tm_file="${tm_file} dbx.h"
2107 fi
2108 xm_defines=USG
2109 xmake_file=mips/x-sysv
2110 if [[ x$gas = xyes ]]
2111 then
2112 tmake_file=mips/t-svr3-gas
2113 else
2114 tmake_file=mips/t-svr3
2115 extra_passes="mips-tfile mips-tdump"
2116 fi
2117 if [[ x$gnu_ld != xyes ]]
2118 then
2119 use_collect2=yes
2120 fi
2121 ;;
2122 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
2123 tm_file=mips/mips-5.h
2124 if [[ x$stabs = xyes ]]; then
2125 tm_file="${tm_file} dbx.h"
2126 fi
2127 if [[ x$gas = xyes ]]
2128 then
2129 tmake_file=mips/t-mips-gas
2130 else
2131 extra_passes="mips-tfile mips-tdump"
2132 fi
2133 if [[ x$gnu_ld != xyes ]]
2134 then
2135 use_collect2=yes
2136 fi
2137 ;;
2138 mips-*-gnu*)
2139 ;;
2140 mipsel-*-ecoff*)
2141 tm_file=mips/ecoffl.h
2142 if [[ x$stabs = xyes ]]; then
2143 tm_file="${tm_file} dbx.h"
2144 fi
2145 tmake_file=mips/t-ecoff
2146 ;;
2147 mips-*-ecoff*)
2148 tm_file="gofast.h mips/ecoff.h"
2149 if [[ x$stabs = xyes ]]; then
2150 tm_file="${tm_file} dbx.h"
2151 fi
2152 tmake_file=mips/t-ecoff
2153 ;;
2154 mipsel-*-elf*)
2155 tm_file="mips/elfl.h libgloss.h"
2156 tmake_file=mips/t-ecoff
2157 ;;
2158 mips-*-elf*)
2159 tm_file="mips/elf.h libgloss.h"
2160 tmake_file=mips/t-ecoff
2161 ;;
2162 mips64el-*-elf*)
2163 tm_file="mips/elfl64.h libgloss.h"
2164 tmake_file=mips/t-ecoff
2165 ;;
2166 mips64orionel-*-elf*)
2167 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
2168 tmake_file=mips/t-ecoff
2169 ;;
2170 mips64-*-elf*)
2171 tm_file="mips/elf64.h libgloss.h"
2172 tmake_file=mips/t-ecoff
2173 ;;
2174 mips64orion-*-elf*)
2175 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
2176 tmake_file=mips/t-ecoff
2177 ;;
2178 mips64orion-*-rtems*)
2179 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
2180 tmake_file="mips/t-ecoff t-rtems"
2181 ;;
2182 mipstx39el-*-elf*)
2183 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2184 tmake_file=mips/t-r3900
2185 ;;
2186 mipstx39-*-elf*)
2187 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2188 tmake_file=mips/t-r3900
2189 ;;
2190 mips-*-*) # Default MIPS RISC-OS 4.0.
2191 if [[ x$stabs = xyes ]]; then
2192 tm_file="${tm_file} dbx.h"
2193 fi
2194 if [[ x$gas = xyes ]]
2195 then
2196 tmake_file=mips/t-mips-gas
2197 else
2198 extra_passes="mips-tfile mips-tdump"
2199 fi
2200 if [[ x$gnu_ld != xyes ]]
2201 then
2202 use_collect2=yes
2203 fi
2204 ;;
2205 mn10200-*-*)
2206 cpu_type=mn10200
2207 tm_file="mn10200/mn10200.h"
2208 if [[ x$stabs = xyes ]]
2209 then
2210 tm_file="${tm_file} dbx.h"
2211 fi
2212 use_collect2=no
2213 ;;
2214 mn10300-*-*)
2215 cpu_type=mn10300
2216 tm_file="mn10300/mn10300.h"
2217 if [[ x$stabs = xyes ]]
2218 then
2219 tm_file="${tm_file} dbx.h"
2220 fi
2221 use_collect2=no
2222 ;;
2223 ns32k-encore-bsd*)
2224 tm_file=ns32k/encore.h
2225 use_collect2=yes
2226 ;;
2227 ns32k-sequent-bsd*)
2228 tm_file=ns32k/sequent.h
2229 use_collect2=yes
2230 ;;
2231 ns32k-tek6100-bsd*)
2232 tm_file=ns32k/tek6100.h
2233 use_collect2=yes
2234 ;;
2235 ns32k-tek6200-bsd*)
2236 tm_file=ns32k/tek6200.h
2237 use_collect2=yes
2238 ;;
2239# This has not been updated to GCC 2.
2240# ns32k-ns-genix*)
2241# xm_defines=USG
2242# xmake_file=ns32k/x-genix
2243# tm_file=ns32k/genix.h
2244# use_collect2=yes
2245# ;;
2246 ns32k-merlin-*)
2247 tm_file=ns32k/merlin.h
2248 use_collect2=yes
2249 ;;
2250 ns32k-pc532-mach*)
2251 tm_file=ns32k/pc532-mach.h
2252 use_collect2=yes
2253 ;;
2254 ns32k-pc532-minix*)
2255 tm_file=ns32k/pc532-min.h
2256 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
2257 xm_defines=USG
2258 use_collect2=yes
2259 ;;
2260 ns32k-pc532-netbsd*)
2261 tm_file=ns32k/netbsd.h
2262 # On NetBSD, the headers are already okay, except for math.h.
2263 fixincludes=fixinc.wrap
2264 tmake_file=t-netbsd
2265 ;;
2266 pdp11-*-bsd)
2267 tm_file="${tm_file} pdp11/2bsd.h"
2268 ;;
2269 pdp11-*-*)
2270 ;;
2271 pyramid-*-*)
2272 cpu_type=pyr
2273 xmake_file=pyr/x-pyr
2274 use_collect2=yes
2275 ;;
2276 romp-*-aos*)
2277 use_collect2=yes
2278 ;;
2279 romp-*-mach*)
2280 xmake_file=romp/x-mach
2281 use_collect2=yes
2282 ;;
2283 powerpc-*-beos*)
2284 cpu_type=rs6000
2285 tm_file=rs6000/beos.h
2286 xm_file=rs6000/xm-beos.h
2287 tmake_file=rs6000/t-beos
2288 xmake_file=rs6000/x-beos
2289 ;;
2290 powerpc-*-sysv* | powerpc-*-elf*)
2291 tm_file=rs6000/sysv4.h
2292 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2293 xm_defines="USG POSIX"
2294 extra_headers=ppc-asm.h
2295 if [[ x$gas = xyes ]]
2296 then
2297 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2298 else
2299 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2300 fi
2301 xmake_file=rs6000/x-sysv4
2302 ;;
2303 powerpc-*-eabiaix*)
2304 tm_file=rs6000/eabiaix.h
2305 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2306 fixincludes=Makefile.in
2307 extra_headers=ppc-asm.h
2308 ;;
2309 powerpc-*-eabisim*)
2310 tm_file=rs6000/eabisim.h
2311 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2312 fixincludes=Makefile.in
2313 extra_headers=ppc-asm.h
2314 ;;
2315 powerpc-*-eabi*)
2316 tm_file=rs6000/eabi.h
2317 if [[ x$gas = xyes ]]
2318 then
2319 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2320 else
2321 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2322 fi
2323 fixincludes=Makefile.in
2324 extra_headers=ppc-asm.h
2325 ;;
2326 powerpc-*-rtems*)
2327 tm_file=rs6000/rtems.h
2328 if [[ x$gas = xyes ]]
2329 then
2330 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2331 else
2332 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2333 fi
2334 fixincludes=Makefile.in
2335 extra_headers=ppc-asm.h
2336 ;;
2337 powerpc-*-linux-gnulibc1)
2338 tm_file=rs6000/linux.h
2339 xm_file=rs6000/xm-sysv4.h
2340 out_file=rs6000/rs6000.c
2341 if [[ x$gas = xyes ]]
2342 then
2343 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2344 else
2345 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2346 fi
2347 xmake_file=x-linux
2348 fixincludes=Makefile.in
2349 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2350 extra_headers=ppc-asm.h
2351 if [[ x$enable_threads = xyes ]]; then
2352 thread_file='posix'
2353 fi
2354 ;;
2355 powerpc-*-linux-gnu*)
2356 tm_file=rs6000/linux.h
2357 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2358 xm_defines="USG ${xm_defines}"
2359 out_file=rs6000/rs6000.c
2360 if [[ x$gas = xyes ]]
2361 then
2362 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2363 else
2364 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2365 fi
2366 xmake_file=x-linux
2367 fixincludes=Makefile.in
2368 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2369 extra_headers=ppc-asm.h
2370 if [[ x$enable_threads = xyes ]]; then
2371 thread_file='posix'
2372 fi
2373 ;;
2374 powerpc-wrs-vxworks*)
2375 cpu_type=rs6000
2376 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2377 xm_defines="USG POSIX"
2378 tm_file=rs6000/vxppc.h
2379 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2380 extra_headers=ppc-asm.h
2381 thread_file='vxworks'
2382 ;;
2383 powerpcle-*-sysv* | powerpcle-*-elf*)
2384 tm_file=rs6000/sysv4le.h
2385 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2386 xm_defines="USG POSIX"
2387 if [[ x$gas = xyes ]]
2388 then
2389 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2390 else
2391 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2392 fi
2393 xmake_file=rs6000/x-sysv4
2394 extra_headers=ppc-asm.h
2395 ;;
2396 powerpcle-*-eabisim*)
2397 tm_file=rs6000/eabilesim.h
2398 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2399 fixincludes=Makefile.in
2400 extra_headers=ppc-asm.h
2401 ;;
2402 powerpcle-*-eabi*)
2403 tm_file=rs6000/eabile.h
2404 if [[ x$gas = xyes ]]
2405 then
2406 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2407 else
2408 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2409 fi
2410 fixincludes=Makefile.in
2411 extra_headers=ppc-asm.h
2412 ;;
2413 powerpcle-*-winnt* )
2414 tm_file=rs6000/win-nt.h
2415 tmake_file=rs6000/t-winnt
2416# extra_objs=pe.o
2417 fixincludes=Makefile.in
2418 if [[ x$enable_threads = xyes ]]; then
2419 thread_file='win32'
2420 fi
2421 extra_headers=ppc-asm.h
2422 ;;
2423 powerpcle-*-pe | powerpcle-*-cygwin32)
2424 tm_file=rs6000/cygwin32.h
2425 xm_file="rs6000/xm-cygwin32.h ${xm_file}"
2426 tmake_file=rs6000/t-winnt
2427 xmake_file=rs6000/x-cygwin32
2428# extra_objs=pe.o
2429 fixincludes=Makefile.in
2430 if [[ x$enable_threads = xyes ]]; then
2431 thread_file='win32'
2432 fi
2433 exeext=.exe
2434 extra_headers=ppc-asm.h
2435 ;;
2436 powerpcle-*-solaris2*)
2437 tm_file=rs6000/sol2.h
2438 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2439 xm_defines="USG POSIX"
2440 if [[ x$gas = xyes ]]
2441 then
2442 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2443 else
2444 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2445 fi
2446 xmake_file=rs6000/x-sysv4
2447 case $machine in
2448 *-*-solaris2.[[0-4]])
2449 fixincludes=fixinc.svr4;;
2450 *)
2451 fixincludes=fixinc.wrap;;
2452 esac
2453 extra_headers=ppc-asm.h
2454 ;;
2455 rs6000-ibm-aix3.[[01]]*)
2456 tm_file=rs6000/aix31.h
2457 xmake_file=rs6000/x-aix31
2458 use_collect2=yes
2459 ;;
2460 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2461 tm_file=rs6000/aix3newas.h
2462 if [[ x$host != x$target ]]
2463 then
2464 tmake_file=rs6000/t-xnewas
2465 else
2466 tmake_file=rs6000/t-newas
2467 fi
2468 use_collect2=yes
2469 ;;
2470 rs6000-ibm-aix4.[[12]].* | powerpc-ibm-aix4.[[12]].*)
2471 tm_file=rs6000/aix41.h
2472 if [[ x$host != x$target ]]
2473 then
2474 tmake_file=rs6000/t-xnewas
2475 else
2476 tmake_file=rs6000/t-newas
2477 fi
2478 xmake_file=rs6000/x-aix41
2479 use_collect2=yes
2480 ;;
2481 rs6000-ibm-aix4.[[3456789]].* | powerpc-ibm-aix4.[[3456789]].*)
2482 tm_file=rs6000/aix43.h
2483 if [[ x$host != x$target ]]
2484 then
2485 tmake_file=rs6000/t-xaix43
2486 else
2487 tmake_file=rs6000/t-aix43
2488 fi
2489 xmake_file=rs6000/x-aix43
2490 use_collect2=yes
2491 ;;
2492 rs6000-ibm-aix[[56789]].* | powerpc-ibm-aix[[56789]].*)
2493 tm_file=rs6000/aix43.h
2494 if [[ x$host != x$target ]]
2495 then
2496 tmake_file=rs6000/t-xaix43
2497 else
2498 tmake_file=rs6000/t-aix43
2499 fi
2500 xmake_file=rs6000/x-aix43
2501 use_collect2=yes
2502 ;;
2503 rs6000-ibm-aix*)
2504 use_collect2=yes
2505 ;;
2506 rs6000-bull-bosx)
2507 use_collect2=yes
2508 ;;
2509 rs6000-*-mach*)
2510 tm_file=rs6000/mach.h
2511 xm_file="${xm_file} rs6000/xm-mach.h"
2512 xmake_file=rs6000/x-mach
2513 use_collect2=yes
2514 ;;
2515 rs6000-*-lynxos*)
2516 tm_file=rs6000/lynx.h
2517 xm_file=rs6000/xm-lynx.h
2518 tmake_file=rs6000/t-rs6000
2519 xmake_file=rs6000/x-lynx
2520 use_collect2=yes
2521 ;;
2522 sh-*-elf*)
2523 tm_file=sh/elf.h
2524 float_format=sh
2525 ;;
2526 sh-*-rtems*)
2527 tmake_file="sh/t-sh t-rtems"
2528 tm_file=sh/rtems.h
2529 float_format=sh
2530 ;;
2531 sh-*-*)
2532 float_format=sh
2533 ;;
2534 sparc-tti-*)
2535 tm_file=sparc/pbd.h
2536 xm_file="xm-alloca.h ${xm_file}"
2537 xm_defines=USG
2538 ;;
2539 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2540 tm_file=sparc/vxsparc.h
2541 tmake_file=sparc/t-vxsparc
2542 use_collect2=yes
2543 thread_file='vxworks'
2544 ;;
2545 sparc-*-aout*)
2546 tmake_file=sparc/t-sparcbare
2547 tm_file="sparc/aout.h libgloss.h"
2548 ;;
2549 sparc-*-netbsd*)
2550 tm_file=sparc/netbsd.h
2551 # On NetBSD, the headers are already okay, except for math.h.
2552 fixincludes=fixinc.wrap
2553 tmake_file=t-netbsd
2554 ;;
2555 sparc-*-bsd*)
2556 tm_file=sparc/bsd.h
2557 ;;
2558 sparc-*-elf*)
2559 tm_file=sparc/elf.h
2560 tmake_file=sparc/t-elf
2561 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2562 #float_format=i128
2563 float_format=i64
2564 ;;
2565 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2566 xm_file="${xm_file} sparc/xm-linux.h"
2567 tm_file=sparc/linux-aout.h
2568 xmake_file=x-linux
2569 fixincludes=Makefile.in #On Linux, the headers are ok already.
2570 gnu_ld=yes
2571 ;;
2572 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2573 xm_file="${xm_file} sparc/xm-linux.h"
2574 xmake_file=x-linux
2575 tm_file=sparc/linux.h
2576 tmake_file="t-linux t-linux-gnulibc1"
2577 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2578 fixincludes=Makefile.in #On Linux, the headers are ok already.
2579 gnu_ld=yes
2580 ;;
2581 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2582 xm_file="${xm_file} sparc/xm-linux.h"
2583 xmake_file=x-linux
2584 tm_file=sparc/linux.h
2585 tmake_file="t-linux"
2586 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2587 fixincludes=Makefile.in #On Linux, the headers are ok already.
2588 gnu_ld=yes
2589 if [[ x$enable_threads = xyes ]]; then
2590 thread_file='posix'
2591 fi
2592 ;;
2593 sparc-*-lynxos*)
2594 if [[ x$gas = xyes ]]
2595 then
2596 tm_file=sparc/lynx.h
2597 else
2598 tm_file=sparc/lynx-ng.h
2599 fi
2600 xm_file=sparc/xm-lynx.h
2601 tmake_file=sparc/t-sunos41
2602 xmake_file=x-lynx
2603 ;;
2604 sparc-*-rtems*)
2605 tmake_file="sparc/t-sparcbare t-rtems"
2606 tm_file=sparc/rtems.h
2607 ;;
2608 sparc-*-solaris2*)
2609 if [[ x$gnu_ld = xyes ]]
2610 then
2611 tm_file=sparc/sol2.h
2612 else
2613 tm_file=sparc/sol2-sld.h
2614 fi
2615 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2616 xm_defines="USG POSIX"
2617 tmake_file=sparc/t-sol2
2618 xmake_file=sparc/x-sysv4
2619 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2620 case $machine in
2621 *-*-solaris2.[[0-4]])
2622 fixincludes=fixinc.svr4;;
2623 *)
2624 fixincludes=fixinc.wrap;;
2625 esac
2626 float_format=i128
2627 if [[ x${enable_threads} = x ]]; then
2628 enable_threads=$have_pthread_h
2629 if [[ x${enable_threads} = x ]]; then
2630 enable_threads=$have_thread_h
2631 fi
2632 fi
2633 if [[ x${enable_threads} = xyes ]]; then
2634 if [[ x${have_pthread_h} = xyes ]]; then
2635 thread_file='posix'
2636 else
2637 thread_file='solaris'
2638 fi
2639 fi
2640 ;;
2641 sparc-*-sunos4.0*)
2642 tm_file=sparc/sunos4.h
2643 tmake_file=sparc/t-sunos40
2644 use_collect2=yes
2645 ;;
2646 sparc-*-sunos4*)
2647 tm_file=sparc/sunos4.h
2648 tmake_file=sparc/t-sunos41
2649 use_collect2=yes
2650 if [[ x$gas = xyes ]]; then
2651 tm_file="${tm_file} sparc/sun4gas.h"
2652 fi
2653 ;;
2654 sparc-*-sunos3*)
2655 tm_file=sparc/sun4o3.h
2656 use_collect2=yes
2657 ;;
2658 sparc-*-sysv4*)
2659 tm_file=sparc/sysv4.h
2660 xm_file="xm-siglist.h sparc/xm-sysv4.h"
2661 xm_defines="USG POSIX"
2662 tmake_file=t-svr4
2663 xmake_file=sparc/x-sysv4
2664 extra_parts="crtbegin.o crtend.o"
2665 ;;
2666 sparc-*-vxsim*)
2667 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2668 xm_defines="USG POSIX"
2669 tm_file=sparc/vxsim.h
2670 tmake_file=sparc/t-vxsparc
2671 xmake_file=sparc/x-sysv4
2672 ;;
2673 sparclet-*-aout*)
2674 tm_file="sparc/splet.h libgloss.h"
2675 tmake_file=sparc/t-splet
2676 ;;
2677 sparclite-*-coff*)
2678 tm_file="sparc/litecoff.h libgloss.h"
2679 tmake_file=sparc/t-sparclite
2680 ;;
2681 sparclite-*-aout*)
2682 tm_file="sparc/lite.h aoutos.h libgloss.h"
2683 tmake_file=sparc/t-sparclite
2684 ;;
2685 sparc64-*-aout*)
2686 tmake_file=sparc/t-sp64
2687 tm_file=sparc/sp64-aout.h
2688 ;;
2689 sparc64-*-elf*)
2690 tmake_file=sparc/t-sp64
2691 tm_file=sparc/sp64-elf.h
2692 extra_parts="crtbegin.o crtend.o"
2693 ;;
2694 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2695 tmake_file=sparc/t-sp64
2696 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2697 tm_file=sparc/linux64.h
2698 xmake_file=x-linux
2699 fixincludes=Makefile.in # The headers are ok already.
2700 gnu_ld=yes
2701 ;;
2702# This hasn't been upgraded to GCC 2.
2703# tahoe-harris-*) # Harris tahoe, using COFF.
2704# tm_file=tahoe/harris.h
2705# ;;
2706# tahoe-*-bsd*) # tahoe running BSD
2707# ;;
2708 thumb-*-coff* | thumbel-*-coff*)
2709 tm_file=arm/tcoff.h
2710 out_file=arm/thumb.c
2711 xm_file=arm/xm-thumb.h
2712 md_file=arm/thumb.md
2713 tmake_file=arm/t-thumb
2714 ;;
2715# This hasn't been upgraded to GCC 2.
2716# tron-*-*)
2717# cpu_type=gmicro
2718# use_collect2=yes
2719# ;;
2720 v850-*-*)
2721 cpu_type=v850
2722 tm_file="v850/v850.h"
2723 xm_file="v850/xm-v850.h"
2724 tmake_file=v850/t-v850
2725 if [[ x$stabs = xyes ]]
2726 then
2727 tm_file="${tm_file} dbx.h"
2728 fi
2729 use_collect2=no
2730 ;;
2731 vax-*-bsd*) # vaxen running BSD
2732 use_collect2=yes
2733 float_format=vax
2734 ;;
2735 vax-*-sysv*) # vaxen running system V
2736 tm_file="${tm_file} vax/vaxv.h"
2737 xm_defines=USG
2738 float_format=vax
2739 ;;
2740 vax-*-netbsd*)
2741 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2742 # On NetBSD, the headers are already okay, except for math.h.
2743 fixincludes=fixinc.wrap
2744 tmake_file=t-netbsd
2745 float_format=vax
2746 ;;
2747 vax-*-ultrix*) # vaxen running ultrix
2748 tm_file="${tm_file} vax/ultrix.h"
2749 use_collect2=yes
2750 float_format=vax
2751 ;;
2752 vax-*-vms*) # vaxen running VMS
2753 xm_file=vax/xm-vms.h
2754 tm_file=vax/vms.h
2755 float_format=vax
2756 ;;
2757 vax-*-*) # vax default entry
2758 float_format=vax
2759 ;;
2760 we32k-att-sysv*)
2761 xm_file="${xm_file} xm-svr3"
2762 use_collect2=yes
2763 ;;
2764 *)
2765 echo "Configuration $machine not supported" 1>&2
2766 exit 1
2767 ;;
2768 esac
2769
2770 case $machine in
2771 *-*-linux-gnu*)
2772 ;; # Existing GNU/Linux systems do not use the GNU setup.
2773 *-*-gnu*)
2774 # On the GNU system, the setup is just about the same on
2775 # each different CPU. The specific machines that GNU
2776 # supports are matched above and just set $cpu_type.
2777 xm_file="xm-gnu.h ${xm_file}"
2778 tm_file=${cpu_type}/gnu.h
2779 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2780 # GNU always uses ELF.
2781 elf=yes
2782 # GNU tools are the only tools.
2783 gnu_ld=yes
2784 gas=yes
2785 # On GNU, the headers are already okay.
2786 fixincludes=Makefile.in
2787 xmake_file=x-linux # These details are the same as Linux.
2788 tmake_file=t-gnu # These are not.
2789 ;;
2790 *-*-sysv4*)
2791 fixincludes=fixinc.svr4
2792 xmake_try_sysv=x-sysv
2793 install_headers_dir=install-headers-cpio
2794 ;;
2795 *-*-sysv*)
2796 install_headers_dir=install-headers-cpio
2797 ;;
2798 esac
2799
2800 # Distinguish i[34567]86
2801 # Also, do not run mips-tfile on MIPS if using gas.
2802 # Process --with-cpu= for PowerPC/rs6000
2803 target_cpu_default2=
2804 case $machine in
2805 i486-*-*)
2806 target_cpu_default2=1
2807 ;;
2808 i586-*-*)
2809 target_cpu_default2=2
2810 ;;
2811 i686-*-* | i786-*-*)
2812 target_cpu_default2=3
2813 ;;
2814 alpha*-*-*)
2815 case $machine in
2816 alphaev6*)
2817 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2818 ;;
2819 alphapca56*)
2820 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
2821 ;;
2822 alphaev56*)
2823 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2824 ;;
2825 alphaev5*)
2826 target_cpu_default2="MASK_CPU_EV5"
2827 ;;
2828 esac
2829
2830 if [[ x$gas = xyes ]]
2831 then
2832 if [[ "$target_cpu_default2" = "" ]]
2833 then
2834 target_cpu_default2="MASK_GAS"
2835 else
2836 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2837 fi
2838 fi
2839 ;;
2840 arm*-*-*)
2841 case "x$with_cpu" in
2842 x)
2843 # The most generic
2844 target_cpu_default2="TARGET_CPU_generic"
2845 ;;
2846
2847 # Distinguish cores, and major variants
2848 # arm7m doesn't exist, but D & I don't affect code
2849 xarm[23678] | xarm250 | xarm[67][01]0 \
2850 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2851 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2852 | xstrongarm | xstrongarm110)
2853 target_cpu_default2="TARGET_CPU_$with_cpu"
2854 ;;
2855
2856 xyes | xno)
2857 echo "--with-cpu must be passed a value" 1>&2
2858 exit 1
2859 ;;
2860
2861 *)
2862 if [[ x$pass2done = xyes ]]
2863 then
2864 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2865 exit 1
2866 fi
2867 ;;
2868 esac
2869 ;;
2870
2871 mips*-*-ecoff* | mips*-*-elf*)
2872 if [[ x$gas = xyes ]]
2873 then
2874 if [[ x$gnu_ld = xyes ]]
2875 then
2876 target_cpu_default2=20
2877 else
2878 target_cpu_default2=16
2879 fi
2880 fi
2881 ;;
2882 mips*-*-*)
2883 if [[ x$gas = xyes ]]
2884 then
2885 target_cpu_default2=16
2886 fi
2887 ;;
2888 powerpc*-*-* | rs6000-*-*)
2889 case "x$with_cpu" in
2890 x)
2891 ;;
2892
2893 xcommon | xpower | xpower2 | xpowerpc | xrios \
2894 | xrios1 | xrios2 | xrsc | xrsc1 \
2895 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2896 | x403 | x505 | x801 | x821 | x823 | x860)
2897 target_cpu_default2="\"$with_cpu\""
2898 ;;
2899
2900 xyes | xno)
2901 echo "--with-cpu must be passed a value" 1>&2
2902 exit 1
2903 ;;
2904
2905 *)
2906 if [[ x$pass2done = xyes ]]
2907 then
2908 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2909 exit 1
2910 fi
2911 ;;
2912 esac
2913 ;;
2914 sparc*-*-*)
2915 case ".$with_cpu" in
2916 .)
2917 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2918 ;;
2919 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2920 target_cpu_default2="TARGET_CPU_$with_cpu"
2921 ;;
2922 *)
2923 if [[ x$pass2done = xyes ]]
2924 then
2925 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2926 exit 1
2927 fi
2928 ;;
2929 esac
2930 ;;
2931 esac
2932
2933 if [[ "$target_cpu_default2" != "" ]]
2934 then
2935 if [[ "$target_cpu_default" != "" ]]
2936 then
2937 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2938 else
2939 target_cpu_default=$target_cpu_default2
2940 fi
2941 fi
2942
2943 # No need for collect2 if we have the GNU linker.
2944 # Actually, there is now; GNU ld doesn't handle the EH info or
2945 # collecting for shared libraries.
2946 #case x$gnu_ld in
2947 #xyes)
2948 # use_collect2=
2949 # ;;
2950 #esac
2951
2952# Save data on machine being used to compile GCC in build_xm_file.
2953# Save data on host machine in vars host_xm_file and host_xmake_file.
2954 if [[ x$pass1done = x ]]
2955 then
2956 if [[ x"$xm_file" = x ]]
2957 then build_xm_file=$cpu_type/xm-$cpu_type.h
2958 else build_xm_file=$xm_file
2959 fi
2960 build_xm_defines=$xm_defines
2961 build_install_headers_dir=$install_headers_dir
2962 build_exeext=$exeext
2963 pass1done=yes
2964 else
2965 if [[ x$pass2done = x ]]
2966 then
2967 if [[ x"$xm_file" = x ]]
2968 then host_xm_file=$cpu_type/xm-$cpu_type.h
2969 else host_xm_file=$xm_file
2970 fi
2971 host_xm_defines=$xm_defines
2972 if [[ x"$xmake_file" = x ]]
2973 then xmake_file=$cpu_type/x-$cpu_type
2974 fi
2975 host_xmake_file="$xmake_file"
2976 host_truncate_target=$truncate_target
2977 host_extra_gcc_objs=$extra_gcc_objs
2978 host_extra_objs=$extra_host_objs
2979 host_exeext=$exeext
2980 pass2done=yes
2981 fi
2982 fi
2983done
2984
2985extra_objs="${host_extra_objs} ${extra_objs}"
2986
2987# Default the target-machine variables that were not explicitly set.
2988if [[ x"$tm_file" = x ]]
2989then tm_file=$cpu_type/$cpu_type.h; fi
2990
2991if [[ x$extra_headers = x ]]
2992then extra_headers=; fi
2993
2994if [[ x"$xm_file" = x ]]
2995then xm_file=$cpu_type/xm-$cpu_type.h; fi
2996
2997if [[ x$md_file = x ]]
2998then md_file=$cpu_type/$cpu_type.md; fi
2999
3000if [[ x$out_file = x ]]
3001then out_file=$cpu_type/$cpu_type.c; fi
3002
3003if [[ x"$tmake_file" = x ]]
3004then tmake_file=$cpu_type/t-$cpu_type
3005fi
3006
3007if [[ x$float_format = x ]]
3008then float_format=i64
3009fi
3010
3011if [[ x$enable_haifa = x ]]
3012then
3013 case $target in
3014 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-* | *sparc-* | m32r*-*)
3015 enable_haifa=yes;;
3016 esac
3017fi
3018
3019# Say what files are being used for the output code and MD file.
3020echo "Using \`$srcdir/config/$out_file' to output insns."
3021echo "Using \`$srcdir/config/$md_file' as machine description file."
3022
3023count=a
3024for f in $tm_file; do
3025 count=${count}x
3026done
3027if [[ $count = ax ]]; then
3028 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3029else
3030 echo "Using the following target machine macro files:"
3031 for f in $tm_file; do
3032 echo " $srcdir/config/$f"
3033 done
3034fi
3035
3036count=a
3037for f in $host_xm_file; do
3038 count=${count}x
3039done
3040if [[ $count = ax ]]; then
3041 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3042else
3043 echo "Using the following host machine macro files:"
3044 for f in $host_xm_file; do
3045 echo " $srcdir/config/$f"
3046 done
3047fi
3048
3049if [[ "$host_xm_file" != "$build_xm_file" ]]; then
3050 count=a
3051 for f in $build_xm_file; do
3052 count=${count}x
3053 done
3054 if [[ $count = ax ]]; then
3055 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3056 else
3057 echo "Using the following build machine macro files:"
3058 for f in $build_xm_file; do
3059 echo " $srcdir/config/$f"
3060 done
3061 fi
3062fi
3063
3064if [[ x$thread_file = x ]]; then
3065 if [[ x$target_thread_file != x ]]; then
3066 thread_file=$target_thread_file
3067 else
3068 thread_file='single'
3069 fi
3070fi
3071
3072# Set up the header files.
3073# $links is the list of header files to create.
3074# $vars is the list of shell variables with file names to include.
3075# auto-host.h is the file containing items generated by autoconf and is
3076# the first file included by config.h.
3077null_defines=
3078host_xm_file="auto-host.h ${host_xm_file}"
3079
3080# If host=build, it is correct to have hconfig include auto-host.h
3081# as well. If host!=build, we are in error and need to do more
3082# work to find out the build config parameters.
3083if [[ x$host = x$build ]]
3084then
3085 build_xm_file="auto-host.h ${build_xm_file}"
3086else
3087 # We create a subdir, then run autoconf in the subdir.
3088 # To prevent recursion we set host and build for the new
3089 # invocation of configure to the build for this invocation
3090 # of configure.
3091 tempdir=build.$$
3092 rm -rf $tempdir
3093 mkdir $tempdir
3094 cd $tempdir
3095 case ${srcdir} in
3096 /*) realsrcdir=${srcdir};;
3097 *) realsrcdir=../${srcdir};;
3098 esac
3099 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
3100 --target=$target --host=$build --build=$build
3101
3102 # We just finished tests for the build machine, so rename
3103 # the file auto-build.h in the gcc directory.
3104 mv auto-host.h ../auto-build.h
3105 cd ..
3106 rm -rf $tempdir
3107 build_xm_file="auto-build.h ${build_xm_file}"
3108fi
3109
3110vars="host_xm_file tm_file xm_file build_xm_file"
3111links="config.h tm.h tconfig.h hconfig.h"
3112defines="host_xm_defines null_defines xm_defines build_xm_defines"
3113
3114rm -f config.bak
3115if [[ -f config.status ]]; then mv -f config.status config.bak; fi
3116
3117# Make the links.
3118while [[ -n "$vars" ]]
3119do
3120 set $vars; var=$1; shift; vars=$*
3121 set $links; link=$1; shift; links=$*
3122 set $defines; define=$1; shift; defines=$*
3123
3124 rm -f $link
3125
3126 # Define TARGET_CPU_DEFAULT if the system wants one.
3127 # This substitutes for lots of *.h files.
3128 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
3129 then
3130 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
3131 fi
3132
3133 for file in `eval echo '$'$var`; do
3134 echo "#include \"$file\"" >>$link
3135 done
3136
3137 for def in `eval echo '$'$define`; do
3138 echo "#ifndef $def" >>$link
3139 echo "#define $def" >>$link
3140 echo "#endif" >>$link
3141 done
3142done
3143
3144# Truncate the target if necessary
3145if [[ x$host_truncate_target != x ]]; then
3146 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3147fi
3148
3149# Get the version trigger filename from the toplevel
3150if [[ "${with_gcc_version_trigger+set}" = set ]]; then
3151 gcc_version_trigger=$with_gcc_version_trigger
3152else
3153 gcc_version_trigger=${srcdir}/version.c
3154fi
3155gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${gcc_version_trigger}`
3156
3157# Get an absolute path to the GCC top-level source directory
3158holddir=`pwd`
3159cd $srcdir
3160topdir=`pwd`
3161cd $holddir
3162
3163# Conditionalize the makefile for this host machine.
3164# Make-host contains the concatenation of all host makefile fragments
3165# [there can be more than one]. This file is built by configure.frag.
3166host_overrides=Make-host
3167dep_host_xmake_file=
3168for f in .. ${host_xmake_file}
3169do
3170 if [[ -f ${srcdir}/config/$f ]]
3171 then
3172 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
3173 fi
3174done
3175
3176# Conditionalize the makefile for this target machine.
3177# Make-target contains the concatenation of all host makefile fragments
3178# [there can be more than one]. This file is built by configure.frag.
3179target_overrides=Make-target
3180dep_tmake_file=
3181for f in .. ${tmake_file}
3182do
3183 if [[ -f ${srcdir}/config/$f ]]
3184 then
3185 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
3186 fi
3187done
3188
3189# If the host doesn't support symlinks, modify CC in
3190# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
3191# Otherwise, we can use "CC=$(CC)".
3192rm -f symtest.tem
3193if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
3194then
3195 cc_set_by_configure="\$(CC)"
3196 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
3197else
3198 rm -f symtest.tem
3199 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
3200 then
3201 symbolic_link="cp -p"
3202 else
3203 symbolic_link="cp"
3204 fi
3205 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
3206 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
3207fi
3208rm -f symtest.tem
3209
3210out_object_file=`basename $out_file .c`.o
3211
3212tm_file_list=
3213for f in $tm_file; do
3214 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
3215done
3216
3217host_xm_file_list=
3218for f in $host_xm_file; do
3219 if test $f != "auto-host.h"; then
3220 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
3221 else
3222 host_xm_file_list="${host_xm_file_list} auto-host.h"
3223 fi
3224done
3225
3226build_xm_file_list=
3227for f in $build_xm_file; do
3228 if test $f != "auto-build.h"; then
3229 if test $f != "auto-host.h"; then
3230 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
3231 else
3232 build_xm_file_list="${build_xm_file_list} auto-host.h"
3233 fi
3234 else
3235 build_xm_file_list="${build_xm_file_list} auto-build.h"
3236 fi
3237done
3238
3239# Define macro CROSS_COMPILE in compilation
3240# if this is a cross-compiler.
3241# Also use all.cross instead of all.internal
3242# and add cross-make to Makefile.
3243cross_overrides="/dev/null"
3244if [[ x$host != x$target ]]
3245then
3246 cross_defines="CROSS=-DCROSS_COMPILE"
3247 cross_overrides="${topdir}/cross-make"
3248fi
3249
3250# When building gcc with a cross-compiler, we need to fix a few things.
3251# This must come after cross-make as we want all.build to override
3252# all.cross.
3253build_overrides="/dev/null"
3254if [[ x$build != x$host ]]
3255then
3256 build_overrides="${topdir}/build-make"
3257fi
3258
3259# Expand extra_headers to include complete path.
3260# This substitutes for lots of t-* files.
3261extra_headers_list=
3262if [[ "x$extra_headers" = x ]]
3263then true
3264else
3265 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
3266 for file in $extra_headers;
3267 do
3268 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
3269 done
3270fi
3271
3272# Add a definition of USE_COLLECT2 if system wants one.
3273# Also tell toplev.c what to do.
3274# This substitutes for lots of t-* files.
3275if [[ x$use_collect2 = x ]]
3276then
3277 will_use_collect2=
3278 maybe_use_collect2=
3279else
3280 will_use_collect2="collect2"
3281 maybe_use_collect2="-DUSE_COLLECT2"
3282fi
3283
3284# NEED TO CONVERT
3285# Set MD_DEPS if the real md file is in md.pre-cpp.
3286# Set MD_CPP to the cpp to pass the md file through. Md files use ';'
3287# for line oriented comments, so we must always use a GNU cpp. If
3288# building gcc with a cross compiler, use the cross compiler just
3289# built. Otherwise, we can use the cpp just built.
3290md_file_sub=
3291if [[ "x$md_cppflags" = x ]]
3292then
3293 md_file_sub=$srcdir/config/$md_file
3294else
3295 md_file=md
3296fi
3297
3298# If we have gas in the build tree, make a link to it.
3299if [[ -f ../gas/Makefile ]]; then
3300 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3301fi
3302
3303# If we have nm in the build tree, make a link to it.
3304if [[ -f ../binutils/Makefile ]]; then
3305 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
3306fi
3307
3308# If we have ld in the build tree, make a link to it.
3309if [[ -f ../ld/Makefile ]]; then
3310# if [[ x$use_collect2 = x ]]; then
3311# rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3312# else
3313 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3314# fi
3315fi
3316
3317# Figure out what assembler alignment features are present.
3318AC_MSG_CHECKING(assembler alignment features)
3319gcc_cv_as=
3320gcc_cv_as_alignment_features=
3321if [[ -x as$host_exeext ]]; then
3322 # Build using assembler in the current directory.
3323 gcc_cv_as=./as$host_exeext
3324elif [[ -f $srcdir/../gas/configure.in ]]; then
3325 # Single tree build which includes gas.
3326 for f in $srcdir/../gas/configure $srcdir/../gas/configure.in $srcdir/../gas/Makefile.in
3327 do
3328 gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
3329 if [[ x$gcc_cv_gas_version != x ]]; then
3330 break
3331 fi
3332 done
3333 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
3334 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
3335 # Gas version 2.8 and later support specifying the maximum
3336 # bytes to skip when using .p2align.
3337 if [[ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2 ]]; then
3338 gcc_cv_as_alignment_features=".p2align including maximum skip"
3339 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3340 fi
3341elif [[ x$host = x$target ]]; then
3342 # Native build.
3343 gcc_cv_as=as$host_exeext
3344fi
3345if [[ x$gcc_cv_as != x ]]; then
3346 # Check if specifying the maximum bytes to skip when
3347 # using .p2align is supported.
3348 echo ".p2align 4,,7" > conftest.s
3349 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
3350 gcc_cv_as_alignment_features=".p2align including maximum skip"
3351 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3352 fi
3353 rm -f conftest.s conftest.o
3354fi
3355AC_MSG_RESULT($gcc_cv_as_alignment_features)
3356
3357# Figure out what language subdirectories are present.
3358subdirs=
3359for lang in ${srcdir}/*/config-lang.in ..
3360do
3361 case $lang in
3362 ..) ;;
3363 # The odd quoting in the next line works around
3364 # an apparent bug in bash 1.12 on linux.
3365 ${srcdir}/[[*]]/config-lang.in) ;;
3366 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3367 esac
3368done
3369
3370# Make gthr-default.h if we have a thread file.
3371gthread_flags=
3372if [[ $thread_file != single ]]; then
3373 rm -f gthr-default.h
3374 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3375 gthread_flags=-DHAVE_GTHR_DEFAULT
3376fi
3377AC_SUBST(gthread_flags)
3378
3379# Make empty files to contain the specs and options for each language.
3380# Then add #include lines to for a compiler that has specs and/or options.
3381
3382lang_specs_files=
3383lang_options_files=
3384rm -f specs.h options.h
3385touch specs.h options.h
3386for subdir in . $subdirs
3387do
3388 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3389 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3390 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3391 fi
3392 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3393 echo "#include \"$subdir/lang-options.h\"" >>options.h
3394 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3395 fi
3396done
3397
3398# These (without "all_") are set in each config-lang.in.
3399# `language' must be a single word so is spelled singularly.
3400all_languages=
3401all_boot_languages=
3402all_compilers=
3403all_stagestuff=
3404all_diff_excludes=
3405all_outputs=Makefile
3406# List of language makefile fragments.
3407all_lang_makefiles=
3408all_headers=
3409all_lib2funcs=
3410
3411# Add the language fragments.
3412# Languages are added via two mechanisms. Some information must be
3413# recorded in makefile variables, these are defined in config-lang.in.
3414# We accumulate them and plug them into the main Makefile.
3415# The other mechanism is a set of hooks for each of the main targets
3416# like `clean', `install', etc.
3417
3418language_fragments="Make-lang"
3419language_hooks="Make-hooks"
3420oldstyle_subdirs=
3421
3422for s in .. $subdirs
3423do
3424 if [[ $s != ".." ]]
3425 then
3426 language=
3427 boot_language=
3428 compilers=
3429 stagestuff=
3430 diff_excludes=
3431 headers=
3432 outputs=
3433 lib2funcs=
3434 . ${srcdir}/$s/config-lang.in
3435 if [[ "x$language" = x ]]
3436 then
3437 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3438 exit 1
3439 fi
3440 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3441 all_languages="$all_languages $language"
3442 if [[ "x$boot_language" = xyes ]]
3443 then
3444 all_boot_languages="$all_boot_languages $language"
3445 fi
3446 all_compilers="$all_compilers $compilers"
3447 all_stagestuff="$all_stagestuff $stagestuff"
3448 all_diff_excludes="$all_diff_excludes $diff_excludes"
3449 all_headers="$all_headers $headers"
3450 all_outputs="$all_outputs $outputs"
3451 if [[ x$outputs = x ]]
3452 then
3453 oldstyle_subdirs="$oldstyle_subdirs $s"
3454 fi
3455 all_lib2funcs="$all_lib2funcs $lib2funcs"
3456 fi
3457done
3458
3459# Since we can't use `::' targets, we link each language in
3460# with a set of hooks, reached indirectly via lang.${target}.
3461
3462rm -f Make-hooks
3463touch Make-hooks
3464target_list="all.build all.cross start.encap rest.encap \
3465 info dvi \
3466 install-normal install-common install-info install-man \
3467 uninstall distdir \
3468 mostlyclean clean distclean extraclean maintainer-clean \
3469 stage1 stage2 stage3 stage4"
3470for t in $target_list
3471do
3472 x=
3473 for l in .. $all_languages
3474 do
3475 if [[ $l != ".." ]]; then
3476 x="$x $l.$t"
3477 fi
3478 done
3479 echo "lang.$t: $x" >> Make-hooks
3480done
3481
3482# If we're not building in srcdir, create .gdbinit.
3483
3484if [[ ! -f Makefile.in ]]; then
3485 echo "dir ." > .gdbinit
3486 echo "dir ${srcdir}" >> .gdbinit
3487 if [[ x$gdb_needs_out_file_path = xyes ]]
3488 then
3489 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3490 fi
3491 if [[ "x$subdirs" != x ]]; then
3492 for s in $subdirs
3493 do
3494 echo "dir ${srcdir}/$s" >> .gdbinit
3495 done
3496 fi
3497 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3498fi
3499
3500# Define variables host_canonical and build_canonical
3501# because some Cygnus local changes in the Makefile depend on them.
3502build_canonical=${build}
3503host_canonical=${host}
3504target_subdir=
3505if [[ "${host}" != "${target}" ]] ; then
3506 target_subdir=${target}/
3507fi
3508AC_SUBST(build_canonical)
3509AC_SUBST(host_canonical)
3510AC_SUBST(target_subdir)
3511
3512# If this is using newlib, then define inhibit_libc in
3513# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3514# libgcc.a, but that's OK because newib should have its own version of
3515# assert.h.
3516inhibit_libc=
3517if [[ x$with_newlib = xyes ]]; then
3518 inhibit_libc=-Dinhibit_libc
3519fi
3520AC_SUBST(inhibit_libc)
3521
3522# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3523sched_prefix=
3524sched_cflags=
3525if [[ x$enable_haifa = xyes ]]; then
3526 echo "Using the Haifa scheduler."
3527 sched_prefix=haifa-
3528 sched_cflags=-DHAIFA
3529fi
3530AC_SUBST(sched_prefix)
3531AC_SUBST(sched_cflags)
3532if [[ x$enable_haifa != x ]]; then
3533 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3534 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3535 if [[ -f $x ]]; then
3536 echo "Removing $x"
3537 rm -f $x
3538 fi
3539 done
3540fi
3541
3542# Nothing to do for FLOAT_H, float_format already handled.
3543objdir=`pwd`
3544AC_SUBST(objdir)
3545
3546# Process the language and host/target makefile fragments.
3547${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3548
3549# Substitute configuration variables
3550AC_SUBST(subdirs)
3551AC_SUBST(all_languages)
3552AC_SUBST(all_boot_languages)
3553AC_SUBST(all_compilers)
3554AC_SUBST(all_lang_makefiles)
3555AC_SUBST(all_stagestuff)
3556AC_SUBST(all_diff_excludes)
3557AC_SUBST(all_lib2funcs)
3558AC_SUBST(all_headers)
3559AC_SUBST(cpp_main)
3560AC_SUBST(extra_passes)
3561AC_SUBST(extra_programs)
3562AC_SUBST(extra_parts)
3563AC_SUBST(extra_c_objs)
3564AC_SUBST(extra_cxx_objs)
3565AC_SUBST(extra_c_flags)
3566AC_SUBST(extra_objs)
3567AC_SUBST(host_extra_gcc_objs)
3568AC_SUBST(extra_headers_list)
3569AC_SUBST(dep_host_xmake_file)
3570AC_SUBST(dep_tmake_file)
3571AC_SUBST(out_file)
3572AC_SUBST(out_object_file)
3573AC_SUBST(md_file)
3574AC_SUBST(tm_file_list)
3575AC_SUBST(build_xm_file_list)
3576AC_SUBST(host_xm_file_list)
3577AC_SUBST(lang_specs_files)
3578AC_SUBST(lang_options_files)
3579AC_SUBST(thread_file)
3580AC_SUBST(gcc_version)
3581AC_SUBST(gcc_version_trigger)
3582AC_SUBST(local_prefix)
3583AC_SUBST(gxx_include_dir)
3584AC_SUBST(fixincludes)
3585AC_SUBST(build_install_headers_dir)
3586AC_SUBST(build_exeext)
3587AC_SUBST(host_exeext)
3588AC_SUBST(float_format)
3589AC_SUBST(will_use_collect2)
3590AC_SUBST(maybe_use_collect2)
3591AC_SUBST(cc_set_by_configure)
3592AC_SUBST(stage_prefix_set_by_configure)
3593AC_SUBST(install)
3594AC_SUBST(symbolic_link)
3595
3596AC_SUBST_FILE(target_overrides)
3597AC_SUBST_FILE(host_overrides)
3598AC_SUBST(cross_defines)
3599AC_SUBST_FILE(cross_overrides)
3600AC_SUBST_FILE(build_overrides)
3601AC_SUBST_FILE(language_fragments)
3602AC_SUBST_FILE(language_hooks)
3603
3604# Echo that links are built
3605if [[ x$host = x$target ]]
3606then
3607 str1="native "
3608else
3609 str1="cross-"
3610 str2=" from $host"
3611fi
3612
3613if [[ x$host != x$build ]]
3614then
3615 str3=" on a $build system"
3616fi
3617
3618if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3619then
3620 str4=
3621fi
3622
3623echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3624
3625if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3626then
3627 echo " ${str2}${str3}." 1>&2
3628fi
3629
3630# Truncate the target if necessary
3631if [[ x$host_truncate_target != x ]]; then
3632 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3633fi
3634
3635# Configure the subdirectories
3636# AC_CONFIG_SUBDIRS($subdirs)
3637
3638# Create the Makefile
3639# and configure language subdirectories
3640AC_OUTPUT($all_outputs,
3641[
3642. $srcdir/configure.lang
3643case x$CONFIG_HEADERS in
3644xauto-host.h:config.in)
3645echo > cstamp-h ;;
3646esac
3647# If the host supports symlinks, point stage[1234] at ../stage[1234] so
3648# bootstrapping and the installation procedure can still use
3649# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3650# FLAGS_TO_PASS has been modified to solve the problem there.
3651# This is virtually a duplicate of what happens in configure.lang; we do
3652# an extra check to make sure this only happens if ln -s can be used.
3653if [[ "$symbolic_link" = "ln -s" ]]; then
3654 for d in .. ${subdirs} ; do
3655 if [[ $d != .. ]]; then
3656 STARTDIR=`pwd`
3657 cd $d
3658 for t in stage1 stage2 stage3 stage4 include
3659 do
3660 rm -f $t
3661 $symbolic_link ../$t $t 2>/dev/null
3662 done
3663 cd $STARTDIR
3664 fi
3665 done
3666else true ; fi
3667],
3668[
3669host='${host}'
3670build='${build}'
3671target='${target}'
3672target_alias='${target_alias}'
3673srcdir='${srcdir}'
3674subdirs='${subdirs}'
3675oldstyle_subdirs='${oldstyle_subdirs}'
3676symbolic_link='${symbolic_link}'
3677program_transform_set='${program_transform_set}'
3678program_transform_name='${program_transform_name}'
3679dep_host_xmake_file='${dep_host_xmake_file}'
3680host_xmake_file='${host_xmake_file}'
3681dep_tmake_file='${dep_tmake_file}'
3682tmake_file='${tmake_file}'
3683thread_file='${thread_file}'
3684gcc_version='${gcc_version}'
3685gcc_version_trigger='${gcc_version_trigger}'
3686local_prefix='${local_prefix}'
3687build_install_headers_dir='${build_install_headers_dir}'
3688build_exeext='${build_exeext}'
3689host_exeext='${host_exeext}'
3690out_file='${out_file}'
3691gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3692SET_MAKE='${SET_MAKE}'
3693target_list='${target_list}'
3694target_overrides='${target_overrides}'
3695host_overrides='${host_overrides}'
3696cross_defines='${cross_defines}'
3697cross_overrides='${cross_overrides}'
3698build_overrides='${build_overrides}'
3699])