1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997, 1998 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
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)
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.
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.
23 # Initialization and defaults
25 AC_CONFIG_HEADER(auto-config.h:config.in)
32 # Check for additional parameters
36 [ --with-gnu-ld arrange to work with GNU ld.],
42 [ --with-gnu-as arrange to work with GNU as.],
48 [ --with-stabs arrange to use stabs instead of host debug format.],
54 [ --with-elf arrange to use ELF instead of host debug format.],
58 # Specify the local prefix
59 AC_ARG_WITH(local-prefix,
60 [ --with-local-prefix=DIR specifies directory to put local include.],
61 local_prefix=$with_local_prefix,
62 local_prefix=/usr/local)
64 # Default local prefix if it is empty
65 if [[ x$local_prefix = x ]]; then
66 local_prefix=/usr/local
69 # Specify the g++ header file directory
70 AC_ARG_WITH(gxx-include-dir,
71 [ --with-gxx-include-dir=DIR
72 specifies directory to put g++ header files.],
73 gxx_include_dir=$with_gxx_include_dir,
74 gxx_include_dir='${prefix}/include/g++')
76 # Default g++ header file directory if it is empty
77 if [[ x$gxx_include_dir = x ]]; then
78 gxx_include_dir='${prefix}/include/g++'
81 # Enable use of cpplib for C.
82 AC_ARG_ENABLE(c-cpplib,
83 [ --enable-c-cpplib Use cpplib for C.],
84 if [[[ x$enable_c_cpplib != xno ]]]; then
85 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
86 extra_c_flags=-DUSE_CPPLIB=1
89 # Enable Haifa scheduler.
91 [ --enable-haifa Use the experimental scheduler.
92 --disable-haifa Don't use the experimental scheduler for the
93 targets which normally enable it.])
96 # Pass with no value to take the default
97 # Pass with a value to specify a thread package
98 AC_ARG_ENABLE(threads,
99 [ --enable-threads enable thread usage for target GCC.
100 --enable-threads=LIB use LIB thread package for target GCC.],
101 if [[[ x$enable_threads = xno ]]]; then
106 # Check if a valid thread package
107 case x${enable_threads} in
110 target_thread_file='single'
114 target_thread_file=''
116 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
117 xsolaris | xwin32 | xdce)
118 target_thread_file=$enable_threads
121 echo "$enable_threads is an unknown thread package" 1>&2
126 # Determine the host, build, and target systems
129 # Find the native compiler
133 # Find some useful tools
142 # Find the native compiler
148 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h)
150 # Check for thread headers.
151 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
152 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
154 # See if the system preprocessor understands the ANSI C preprocessor
155 # stringification operator.
156 AC_MSG_CHECKING(whether cpp understands the stringify operator)
157 AC_CACHE_VAL(gcc_cv_c_have_stringify,
160 char *test = S(foo);],
161 gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
162 AC_MSG_RESULT($gcc_cv_c_have_stringify)
163 if test $gcc_cv_c_have_stringify = yes; then
164 AC_DEFINE(HAVE_CPP_STRINGIFY)
167 # Use <inttypes.h> only if it exists,
168 # doesn't clash with <sys/types.h>, and declares intmax_t.
169 AC_MSG_CHECKING(for inttypes.h)
170 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
172 [#include <sys/types.h>
173 #include <inttypes.h>],
175 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
176 gcc_cv_header_inttypes_h=yes],
177 gcc_cv_header_inttypes_h=no)])
178 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
180 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen vprintf bcopy bzero bcmp \
181 index rindex kill getrlimit setrlimit atoll atoq)
185 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
186 index rindex getenv atol sbrk abort)
197 build_install_headers_dir=install-headers-tar
201 host_truncate_target=
204 # Decode the host machine, then the target machine.
205 # For the host machine, we save the xm_file variable as host_xm_file;
206 # then we decode the target machine and forget everything else
207 # that came from the host machine.
208 for machine in $build $host $target; do
221 # Set this to force installation and use of collect2.
223 # Set this to override the default target model.
225 # Set this to control which fixincludes program to use.
226 fixincludes=fixincludes
227 # Set this to control how the header file directory is installed.
228 install_headers_dir=install-headers-tar
229 # Set this to a non-empty list of args to pass to cpp if the target
230 # wants its .md file passed through cpp.
232 # Set this if directory names should be truncated to 14 characters.
234 # Set this if gdb needs a dir command with `dirname $out_file`
235 gdb_needs_out_file_path=
236 # Set this if the build machine requires executables to have a
239 # Set this to control which thread package will be used.
242 # Set default cpu_type, tm_file and xm_file so it can be updated in
243 # each machine entry.
244 cpu_type=`echo $machine | sed 's/-.*$//'`
278 tm_file=${cpu_type}/${cpu_type}.h
279 xm_file=${cpu_type}/xm-${cpu_type}.h
282 # Support site-specific machine types.
284 cpu_type=`echo $machine | sed -e 's/-.*//'`
285 rest=`echo $machine | sed -e "s/$cpu_type-//"`
286 xm_file=${cpu_type}/xm-$rest.h
287 tm_file=${cpu_type}/$rest.h
288 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
289 then xmake_file=${cpu_type}/x-$rest; \
292 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
293 then tmake_file=${cpu_type}/t-$rest; \
299 a29k-*-bsd* | a29k-*-sym1*)
300 tm_file="${tm_file} a29k/unix.h"
301 xm_file=a29k/xm-unix.h
302 xmake_file=a29k/x-unix
305 a29k-*-udi | a29k-*-coff)
306 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
307 tmake_file=a29k/t-a29kbare
310 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
311 tmake_file=a29k/t-vx29k
312 extra_parts="crtbegin.o crtend.o"
314 a29k-*-*) # Default a29k environment.
317 alpha*-*-linux-gnuecoff*)
318 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
319 xm_file="${xm_file} alpha/xm-linux.h"
322 fixincludes=Makefile.in
325 alpha*-*-linux-gnulibc1*)
326 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
327 xm_file="${xm_file} alpha/xm-linux.h"
328 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
330 fixincludes=Makefile.in
332 if [[ x$enable_threads = xyes ]]; then
337 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
338 xm_file="${xm_file} alpha/xm-linux.h"
339 tmake_file="t-linux alpha/t-linux"
341 fixincludes=Makefile.in
343 if [[ x$enable_threads = xyes ]]; then
348 if [[ x$stabs = xyes ]]
350 tm_file="${tm_file} dbx.h"
352 if [[ x$gas != xyes ]]
354 extra_passes="mips-tfile mips-tdump"
359 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
362 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
365 tm_file="${tm_file} alpha/osf.h"
366 # Some versions of OSF4 (specifically X4.0-9 296.7) have
367 # a broken tar, so we use cpio instead.
368 install_headers_dir=install-headers-cpio
372 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
373 target_cpu_default=MASK_SUPPORT_ARCH
378 tm_file="${tm_file} alpha/win-nt.h"
379 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
381 xmake_file=winnt/x-winnt
382 extra_host_objs=oldnames.o
383 extra_gcc_objs="spawnv.o oldnames.o"
384 fixincludes=fixinc.winnt
385 if [[ x$gnu_ld != xyes ]]
387 extra_programs=ld.exe
389 if [[ x$enable_threads = xyes ]]; then
395 xm_file="${xm_file} alpha/xm-vms.h"
396 tmake_file=alpha/t-vms
397 fixincludes=Makefile.in
400 extra_parts="crtinit.o crtfini.o"
402 arm-*-coff* | armel-*-coff*)
404 tmake_file=arm/t-bare
406 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
407 tm_file=arm/riscix1-1.h
410 arm-*-riscix*) # Acorn RISC machine
411 if [[ x$gas = xyes ]]
413 tm_file=arm/rix-gas.h
417 xmake_file=arm/x-riscix
418 tmake_file=arm/t-riscix
421 arm-semi-aout | armel-semi-aout)
423 tmake_file=arm/t-semi
424 fixincludes=Makefile.in # There is nothing to fix
426 arm-semi-aof | armel-semi-aof)
427 tm_file=arm/semiaof.h
428 tmake_file=arm/t-semiaof
429 fixincludes=Makefile.in # There is nothing to fix
433 xm_file=arm/xm-netbsd.h
434 tmake_file="t-netbsd arm/t-netbsd"
435 # On NetBSD, the headers are already okay, except for math.h.
436 fixincludes=fixinc.math
438 arm-*-linux-gnuaout*) # ARM GNU/Linux
440 xm_file=arm/xm-linux.h
442 tm_file=arm/linux-gas.h
443 tmake_file=arm/t-linux
444 fixincludes=Makefile.in
449 tmake_file=arm/t-bare
451 c1-convex-*) # Convex C1
454 fixincludes=Makefile.in
456 c2-convex-*) # Convex C2
459 fixincludes=Makefile.in
464 fixincludes=Makefile.in
469 fixincludes=Makefile.in
472 target_cpu_default=16
474 fixincludes=Makefile.in
476 clipper-intergraph-clix*)
477 tm_file="${tm_file} svr3.h clipper/clix.h"
478 xm_file=clipper/xm-clix.h
479 xmake_file=clipper/x-clix
480 extra_headers=va-clipper.h
481 extra_parts="crtbegin.o crtend.o"
482 install_headers_dir=install-headers-cpio
489 # This hasn't been upgraded to GCC 2.
490 # fx80-alliant-*) # Alliant FX/80
496 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
497 xm_file=pa/xm-papro.h
502 tm_file="${tm_file} pa/pa-osf.h"
504 fixincludes=Makefile.in
507 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
508 xm_file=pa/xm-papro.h
512 tm_file="${tm_file} pa/pa-osf.h"
514 fixincludes=Makefile.in
519 fixincludes=Makefile.in
523 fixincludes=Makefile.in
526 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
527 xm_file=pa/xm-pahpux.h
528 xmake_file=pa/x-pa-hpux
529 if [[ x$gas = xyes ]]
531 tm_file="${tm_file} pa/gas.h"
533 install_headers_dir=install-headers-cpio
536 hppa1.0-*-hpux8.0[[0-2]]*)
537 tm_file="${tm_file} pa/pa-hpux.h"
538 xm_file=pa/xm-pahpux.h
539 xmake_file=pa/x-pa-hpux
540 if [[ x$gas = xyes ]]
542 tm_file="${tm_file} pa/pa-gas.h"
544 tm_file="pa/pa-oldas.h ${tm_file}"
546 install_headers_dir=install-headers-cpio
549 hppa1.1-*-hpux8.0[[0-2]]*)
551 tm_file="${tm_file} pa/pa-hpux.h"
552 xm_file=pa/xm-pahpux.h
553 xmake_file=pa/x-pa-hpux
554 if [[ x$gas = xyes ]]
556 tm_file="${tm_file} pa/pa-gas.h"
558 tm_file="pa/pa-oldas.h ${tm_file}"
560 install_headers_dir=install-headers-cpio
565 tm_file="${tm_file} pa/pa-hpux.h"
566 xm_file=pa/xm-pahpux.h
567 xmake_file=pa/x-pa-hpux
568 if [[ x$gas = xyes ]]
570 tm_file="${tm_file} pa/pa-gas.h"
572 install_headers_dir=install-headers-cpio
576 tm_file="${tm_file} pa/pa-hpux.h"
577 xm_file=pa/xm-pahpux.h
578 xmake_file=pa/x-pa-hpux
579 if [[ x$gas = xyes ]]
581 tm_file="${tm_file} pa/pa-gas.h"
583 install_headers_dir=install-headers-cpio
588 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
589 xm_file=pa/xm-pahpux.h
590 xmake_file=pa/x-pa-hpux
592 if [[ x$gas = xyes ]]
594 tm_file="${tm_file} pa/pa-gas.h"
596 if [[ x$enable_threads = x ]]; then
597 enable_threads=$have_pthread_h
599 if [[ x$enable_threads = xyes ]]; then
601 tmake_file="${tmake_file} pa/t-dce-thr"
603 install_headers_dir=install-headers-cpio
607 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
608 xm_file=pa/xm-pahpux.h
609 xmake_file=pa/x-pa-hpux
610 if [[ x$gas = xyes ]]
612 tm_file="${tm_file} pa/pa-gas.h"
614 install_headers_dir=install-headers-cpio
619 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
620 xm_file=pa/xm-pahpux.h
621 xmake_file=pa/x-pa-hpux
622 if [[ x$gas = xyes ]]
624 tm_file="${tm_file} pa/pa-gas.h"
626 install_headers_dir=install-headers-cpio
630 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
631 xm_file=pa/xm-pahpux.h
632 xmake_file=pa/x-pa-hpux
633 if [[ x$gas = xyes ]]
635 tm_file="${tm_file} pa/pa-gas.h"
637 install_headers_dir=install-headers-cpio
642 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
643 xm_file=pa/xm-pahpux.h
644 xmake_file=pa/x-pa-hpux
645 if [[ x$gas = xyes ]]
647 tm_file="${tm_file} pa/pa-gas.h"
649 install_headers_dir=install-headers-cpio
653 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
654 xm_file=pa/xm-pahpux.h
655 xmake_file=pa/x-pa-hpux
656 if [[ x$gas = xyes ]]
658 tm_file="${tm_file} pa/pa-gas.h"
660 install_headers_dir=install-headers-cpio
666 fixincludes=Makefile.in
670 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
671 if [[ x$gas = xyes ]]
673 tm_file=i386/aix386.h
674 extra_parts="crtbegin.o crtend.o"
675 tmake_file=i386/t-crtstuff
677 tm_file=i386/aix386ng.h
680 xm_file=i386/xm-aix.h
681 xmake_file=i386/x-aix
683 i[[456]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
684 xm_file=i386/xm-sysv4.h
685 xmake_file=i386/x-ncr3000
686 if [[ x$stabs = xyes -a x$gas = xyes ]]
688 tm_file=i386/sysv4gdb.h
692 extra_parts="crtbegin.o crtend.o"
693 tmake_file=i386/t-crtpic
697 xm_file=i386/xm-next.h
698 tmake_file=i386/t-next
699 xmake_file=i386/x-next
700 extra_objs=nextstep.o
701 if [[ x$enable_threads = xyes ]]; then
705 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
707 if [[ x$gas = xyes ]]
709 tm_file=i386/seq-gas.h
711 tm_file=i386/sequent.h
714 i[[3456]]86-sequent-ptx1*)
715 xm_file=i386/xm-sysv3.h
716 xmake_file=i386/x-sysv3
717 tm_file=i386/seq-sysv3.h
718 tmake_file=i386/t-crtstuff
719 fixincludes=fixinc.ptx
720 extra_parts="crtbegin.o crtend.o"
721 install_headers_dir=install-headers-cpio
723 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
724 xm_file=i386/xm-sysv3.h
725 xmake_file=i386/x-sysv3
726 tm_file=i386/seq2-sysv3.h
727 tmake_file=i386/t-crtstuff
728 extra_parts="crtbegin.o crtend.o"
729 fixincludes=fixinc.ptx
730 install_headers_dir=install-headers-cpio
732 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
733 xm_file=i386/xm-sysv4.h
735 tm_file=i386/ptx4-i.h
737 extra_parts="crtbegin.o crtend.o"
738 fixincludes=fixinc.ptx
739 install_headers_dir=install-headers-cpio
741 i386-sun-sunos*) # Sun i386 roadrunner
742 xm_file=i386/xm-sun.h
746 i[[3456]]86-wrs-vxworks*)
747 tm_file=i386/vxi386.h
748 tmake_file=i386/t-i386bare
751 tm_file=i386/i386-aout.h
752 tmake_file=i386/t-i386bare
754 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
755 tm_file=i386/bsd386.h
756 xm_file=i386/xm-bsd386.h
757 # tmake_file=t-libc-ok
760 tm_file=i386/386bsd.h
761 xm_file=i386/xm-bsd386.h
762 # tmake_file=t-libc-ok
763 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
766 i[[3456]]86-*-freebsdelf*)
767 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
768 # On FreeBSD, the headers are already ok, except for math.h.
769 fixincludes=fixinc.math
770 tmake_file=i386/t-freebsd
775 i[[3456]]86-*-freebsd*)
776 tm_file=i386/freebsd.h
777 # On FreeBSD, the headers are already ok, except for math.h.
778 fixincludes=fixinc.math
779 tmake_file=i386/t-freebsd
781 i[[3456]]86-*-netbsd*)
782 tm_file=i386/netbsd.h
783 # On NetBSD, the headers are already okay, except for math.h.
784 fixincludes=fixinc.math
788 tm_file=i386/i386-coff.h
789 tmake_file=i386/t-i386bare
791 i[[3456]]86-*-isc*) # 80386 running ISC system
792 xm_file=i386/xm-isc.h
794 i[[345]]86-*-isc[[34]]*)
795 xmake_file=i386/x-isc3
798 xmake_file=i386/x-isc
801 if [[ x$gas = xyes -a x$stabs = xyes ]]
803 tm_file=i386/iscdbx.h
804 tmake_file=i386/t-svr3dbx
805 extra_parts="svr3.ifile svr3z.ifile"
807 tm_file=i386/isccoff.h
808 tmake_file=i386/t-crtstuff
809 extra_parts="crtbegin.o crtend.o"
811 install_headers_dir=install-headers-cpio
813 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
814 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
815 xmake_file=x-linux-aout
816 tmake_file="t-linux-aout i386/t-crtstuff"
817 tm_file=i386/linux-oldld.h
818 fixincludes=Makefile.in #On Linux, the headers are ok already.
821 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
822 xm_file=i386/xm-linux.h # with a.out format
823 xmake_file=x-linux-aout
824 tmake_file="t-linux-aout i386/t-crtstuff"
825 tm_file=i386/linux-aout.h
826 fixincludes=Makefile.in #On Linux, the headers are ok already.
829 i[[3456]]86-*-linux-gnulibc1)
830 xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
831 xmake_file=x-linux # with ELF format using the
832 tm_file=i386/linux.h # GNU/Linux C library 5
833 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
834 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
835 fixincludes=Makefile.in #On Linux, the headers are ok already.
837 if [[ x$enable_threads = xyes ]]; then
841 i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
842 xm_file=i386/xm-linux.h # with ELF format using glibc 2
843 xmake_file=x-linux # aka GNU/Linux C library 6
845 tmake_file="t-linux i386/t-crtstuff"
846 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
847 fixincludes=Makefile.in #On Linux, the headers are ok already.
849 if [[ x$enable_threads = xyes ]]; then
855 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
856 xm_file=i386/xm-go32.h
858 tmake_file=i386/t-go32
860 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
863 fixincludes=Makefile.in
867 i[[3456]]86-*-lynxos*)
868 if [[ x$gas = xyes ]]
872 tm_file=i386/lynx-ng.h
874 xm_file=i386/xm-lynx.h
875 tmake_file=i386/t-i386bare
880 # tmake_file=t-libc-ok
883 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
884 if [[ x$elf = xyes ]]
886 tm_file=i386/osfelf.h
889 tm_file=i386/osfrose.h
892 xm_file=i386/xm-osf.h
893 xmake_file=i386/x-osfrose
894 tmake_file=i386/t-osf
897 i[[345]]86-go32-rtems*)
899 xm_file=i386/xm-go32.h
900 tm_file=i386/go32-rtems.h
901 tmake_file="i386/t-go32 t-rtems"
906 tmake_file="i386/t-i386bare t-rtems"
908 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
909 xm_file=i386/xm-sco5.h
910 xmake_file=i386/x-sco5
911 fixincludes=fixinc.sco
912 install_headers_dir=install-headers-cpio
914 tmake_file=i386/t-sco5
915 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
917 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
918 xm_file=i386/xm-sco.h
919 xmake_file=i386/x-sco4
920 fixincludes=fixinc.sco
921 install_headers_dir=install-headers-cpio
922 if [[ x$stabs = xyes ]]
924 tm_file=i386/sco4dbx.h
925 tmake_file=i386/t-svr3dbx
926 extra_parts="svr3.ifile svr3z.rfile"
929 tmake_file=i386/t-crtstuff
930 extra_parts="crtbegin.o crtend.o"
934 i[[3456]]86-*-sco*) # 80386 running SCO system
935 xm_file=i386/xm-sco.h
936 xmake_file=i386/x-sco
937 install_headers_dir=install-headers-cpio
938 if [[ x$stabs = xyes ]]
940 tm_file=i386/scodbx.h
941 tmake_file=i386/t-svr3dbx
942 extra_parts="svr3.ifile svr3z.rfile"
945 extra_parts="crtbegin.o crtend.o"
946 tmake_file=i386/t-crtstuff
950 i[[3456]]86-*-solaris2*)
951 xm_file=i386/xm-sysv4.h
952 if [[ x$stabs = xyes ]]
954 tm_file=i386/sol2dbg.h
958 tmake_file=i386/t-sol2
959 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
961 fixincludes=fixinc.svr4
963 if [[ x$enable_threads = xyes ]]; then
964 thread_file='solaris'
967 i[[3456]]86-*-sysv5*) # Intel x86 on System V Release 5
968 xm_file=i386/xm-sysv4.h
970 if [[ x$stabs = xyes ]]
972 tm_file="${tm_file} dbx.h"
974 tmake_file=i386/t-crtpic
976 extra_parts="crtbegin.o crtend.o"
977 fixincludes=Makefile.in # The headers are just fine, thank you.
979 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
980 xm_file=i386/xm-sysv4.h
982 if [[ x$stabs = xyes ]]
984 tm_file="${tm_file} dbx.h"
986 tmake_file=i386/t-crtpic
988 extra_parts="crtbegin.o crtend.o"
990 i[[3456]]86-*-sysv*) # Intel 80386's running system V
991 xm_file=i386/xm-sysv3.h
992 xmake_file=i386/x-sysv3
993 if [[ x$gas = xyes ]]
995 if [[ x$stabs = xyes ]]
997 tm_file=i386/svr3dbx.h
998 tmake_file=i386/t-svr3dbx
999 extra_parts="svr3.ifile svr3z.rfile"
1001 tm_file=i386/svr3gas.h
1002 extra_parts="crtbegin.o crtend.o"
1003 tmake_file=i386/t-crtstuff
1006 tm_file=i386/sysv3.h
1007 extra_parts="crtbegin.o crtend.o"
1008 tmake_file=i386/t-crtstuff
1011 i386-*-vsta) # Intel 80386's running VSTa kernel
1012 xm_file=i386/xm-vsta.h
1014 tmake_file=i386/t-vsta
1015 xmake_file=i386/x-vsta
1017 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1018 xm_file="${xm_file} i386/xm-cygwin32.h"
1019 tmake_file=i386/t-cygwin32
1020 tm_file=i386/cygwin32.h
1021 xmake_file=i386/x-cygwin32
1023 fixincludes=Makefile.in
1024 if [[ x$enable_threads = xyes ]]; then
1029 i[[3456]]86-*-mingw32)
1030 tm_file=i386/mingw32.h
1031 xm_file="${xm_file} i386/xm-mingw32.h"
1032 tmake_file=i386/t-cygwin32
1034 xmake_file=i386/x-cygwin32
1035 fixincludes=Makefile.in
1036 if [[ x$enable_threads = xyes ]]; then
1041 i[[3456]]86-*-winnt*)
1042 tm_file=i386/win-nt.h
1043 out_file=i386/i386.c
1044 xm_file=i386/xm-winnt.h
1045 xmake_file=winnt/x-winnt
1046 tmake_file=i386/t-winnt
1047 extra_host_objs="winnt.o oldnames.o"
1048 extra_gcc_objs="spawnv.o oldnames.o"
1049 fixincludes=fixinc.winnt
1050 if [[ x$gnu_ld != xyes ]]
1052 extra_programs=ld.exe
1054 if [[ x$enable_threads = xyes ]]; then
1058 i[[3456]]86-dg-dgux)
1059 xm_file=i386/xm-dgux.h
1060 out_file=i386/dgux.c
1062 tmake_file=i386/t-dgux
1063 xmake_file=i386/x-dgux
1064 fixincludes=fixinc.dgux
1065 install_headers_dir=install-headers-cpio
1067 i860-alliant-*) # Alliant FX/2800
1068 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1069 xm_file="${xm_file}"
1070 xmake_file=i860/x-fx2800
1071 tmake_file=i860/t-fx2800
1072 extra_parts="crtbegin.o crtend.o"
1075 tm_file="${tm_file} i860/bsd.h"
1076 if [[ x$gas = xyes ]]
1078 tm_file="${tm_file} i860/bsd-gas.h"
1083 tm_file="${tm_file} i860/mach.h"
1084 tmake_file=t-libc-ok
1086 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1087 tm_file="${tm_file} svr3.h i860/paragon.h"
1088 xm_file="${xm_file} xm-svr3.h"
1092 tm_file="${tm_file} svr3.h i860/sysv3.h"
1093 xm_file="${tm_file} xm-svr3.h"
1094 xmake_file=i860/x-sysv3
1095 extra_parts="crtbegin.o crtend.o"
1098 tm_file="${tm_file} svr4.h i860/sysv4.h"
1099 xm_file="${xm_file} xm-svr3.h"
1100 xmake_file=i860/x-sysv4
1102 extra_parts="crtbegin.o crtend.o"
1104 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1105 tm_file="${tm_file} i960/vx960.h"
1106 tmake_file=i960/t-vxworks960
1109 i960-wrs-vxworks5* | i960-wrs-vxworks)
1110 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1111 tmake_file=i960/t-vxworks960
1115 tm_file="${tm_file} i960/vx960.h"
1116 tmake_file=i960/t-vxworks960
1120 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1121 tmake_file=i960/t-960bare
1125 tmake_file="i960/t-960bare t-rtems"
1126 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1129 i960-*-*) # Default i960 environment.
1133 extra_parts="crtinit.o crtfini.o"
1135 m68000-convergent-sysv*)
1137 xm_file=m68k/xm-3b1.h
1139 extra_headers=math-68881.h
1141 m68000-hp-bsd*) # HP 9000/200 running BSD
1142 tm_file=m68k/hp2bsd.h
1143 xmake_file=m68k/x-hp2bsd
1145 extra_headers=math-68881.h
1147 m68000-hp-hpux*) # HP 9000 series 300
1148 xm_file=m68k/xm-hp320.h
1149 if [[ x$gas = xyes ]]
1151 xmake_file=m68k/x-hp320g
1152 tm_file=m68k/hp310g.h
1154 xmake_file=m68k/x-hp320
1155 tm_file=m68k/hp310.h
1157 install_headers_dir=install-headers-cpio
1159 extra_headers=math-68881.h
1164 extra_headers=math-68881.h
1167 tm_file=m68k/sun2o4.h
1169 extra_headers=math-68881.h
1172 xm_file=m68k/xm-3b1.h
1173 if [[ x$gas = xyes ]]
1180 extra_headers=math-68881.h
1182 m68k-apple-aux*) # Apple Macintosh running A/UX
1183 xm_file=m68k/xm-aux.h
1184 tmake_file=m68k/t-aux
1185 install_headers_dir=install-headers-cpio
1186 extra_headers=math-68881.h
1187 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1189 if [[ "$gnu_ld" = yes ]]
1191 tm_file="${tm_file} m68k/auxgld.h"
1193 tm_file="${tm_file} m68k/auxld.h"
1195 if [[ "$gas" = yes ]]
1197 tm_file="${tm_file} m68k/auxgas.h"
1199 tm_file="${tm_file} m68k/auxas.h"
1201 tm_file="${tm_file} m68k/a-ux.h"
1204 tm_file=m68k/apollo68.h
1205 xmake_file=m68k/x-apollo68
1207 extra_headers=math-68881.h
1209 m68k-altos-sysv*) # Altos 3068
1210 if [[ x$gas = xyes ]]
1212 tm_file=m68k/altos3068.h
1213 xm_file=m68k/xm-altos3068.h
1215 echo "The Altos is supported only with the GNU assembler" 1>&2
1218 extra_headers=math-68881.h
1220 m68k-bull-sysv*) # Bull DPX/2
1221 if [[ x$gas = xyes ]]
1223 if [[ x$stabs = xyes ]]
1225 tm_file=m68k/dpx2cdbx.h
1227 tm_file=m68k/dpx2g.h
1232 xm_file=m68k/xm-m68kv.h
1233 xmake_file=m68k/x-dpx2
1235 extra_headers=math-68881.h
1237 m68k-atari-sysv4*) # Atari variant of V.4.
1238 tm_file=m68k/atari.h
1239 xm_file=m68k/xm-atari.h
1241 extra_parts="crtbegin.o crtend.o"
1242 extra_headers=math-68881.h
1244 m68k-motorola-sysv*)
1245 tm_file=m68k/mot3300.h
1246 xm_file=m68k/xm-mot3300.h
1247 if [[ x$gas = xyes ]]
1249 xmake_file=m68k/x-mot3300-gas
1250 if [[ x$gnu_ld = xyes ]]
1252 tmake_file=m68k/t-mot3300-gald
1254 tmake_file=m68k/t-mot3300-gas
1258 xmake_file=m68k/x-mot3300
1259 if [[ x$gnu_ld = xyes ]]
1261 tmake_file=m68k/t-mot3300-gld
1263 tmake_file=m68k/t-mot3300
1267 gdb_needs_out_file_path=yes
1268 extra_parts="crt0.o mcrt0.o"
1269 extra_headers=math-68881.h
1271 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1272 tm_file=m68k/tower-as.h
1273 xm_file="${xm_file} xm-svr3.h"
1274 xmake_file=m68k/x-tower
1275 extra_parts="crtbegin.o crtend.o"
1276 extra_headers=math-68881.h
1279 tm_file=m68k/plexus.h
1280 xm_file=m68k/xm-plexus.h
1282 extra_headers=math-68881.h
1286 xm_file=m68k/xm-m68kv.h
1287 extra_headers=math-68881.h
1290 xm_file=m68k/xm-crds.h
1291 xmake_file=m68k/x-crds
1294 extra_headers=math-68881.h
1296 m68k-cbm-sysv4*) # Commodore variant of V.4.
1298 xm_file=m68k/xm-amix.h
1299 xmake_file=m68k/x-amix
1301 extra_parts="crtbegin.o crtend.o"
1302 extra_headers=math-68881.h
1305 tm_file=m68k/ccur-GAS.h
1306 xmake_file=m68k/x-ccur
1307 extra_headers=math-68881.h
1310 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1311 tm_file=m68k/hp3bsd44.h
1312 xmake_file=m68k/x-hp3bsd44
1314 extra_headers=math-68881.h
1316 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1317 tm_file=m68k/hp3bsd.h
1319 extra_headers=math-68881.h
1322 if [[ x$with_fp = xno ]]
1324 tm_file=m68k/isi-nfp.h
1329 extra_headers=math-68881.h
1331 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1332 xm_file=m68k/xm-hp320.h
1333 if [[ x$gas = xyes ]]
1335 xmake_file=m68k/x-hp320g
1336 tm_file=m68k/hp320g.h
1338 xmake_file=m68k/x-hp320
1339 tm_file=m68k/hpux7.h
1341 install_headers_dir=install-headers-cpio
1343 extra_headers=math-68881.h
1345 m68k-hp-hpux*) # HP 9000 series 300
1346 xm_file=m68k/xm-hp320.h
1347 if [[ x$gas = xyes ]]
1349 xmake_file=m68k/x-hp320g
1350 tm_file=m68k/hp320g.h
1352 xmake_file=m68k/x-hp320
1353 tm_file=m68k/hp320.h
1355 install_headers_dir=install-headers-cpio
1357 extra_headers=math-68881.h
1360 tm_file=m68k/sun3mach.h
1362 extra_headers=math-68881.h
1365 if [[ x$gas = xyes ]]
1367 tm_file=m68k/news3gas.h
1369 tm_file=m68k/news3.h
1372 extra_headers=math-68881.h
1374 m68k-sony-bsd* | m68k-sony-newsos*)
1375 if [[ x$gas = xyes ]]
1377 tm_file=m68k/newsgas.h
1382 extra_headers=math-68881.h
1384 m68k-next-nextstep2*)
1385 tm_file=m68k/next21.h
1386 xm_file=m68k/xm-next.h
1387 tmake_file=m68k/t-next
1388 xmake_file=m68k/x-next
1389 extra_objs=nextstep.o
1390 extra_headers=math-68881.h
1393 m68k-next-nextstep3*)
1395 xm_file=m68k/xm-next.h
1396 tmake_file=m68k/t-next
1397 xmake_file=m68k/x-next
1398 extra_objs=nextstep.o
1399 extra_headers=math-68881.h
1400 if [[ x$enable_threads = xyes ]]; then
1405 if [[ x$with_fp = xno ]]
1407 tm_file=m68k/sun3n3.h
1409 tm_file=m68k/sun3o3.h
1412 extra_headers=math-68881.h
1414 m68k-sun-sunos*) # For SunOS 4 (the default).
1415 if [[ x$with_fp = xno ]]
1417 tm_file=m68k/sun3n.h
1422 extra_headers=math-68881.h
1425 tm_file=m68k/vxm68k.h
1426 tmake_file=m68k/t-vxworks68
1427 extra_headers=math-68881.h
1430 tmake_file=m68k/t-m68kbare
1431 tm_file="m68k/m68k-aout.h libgloss.h"
1432 extra_headers=math-68881.h
1435 tmake_file=m68k/t-m68kbare
1436 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1437 extra_headers=math-68881.h
1440 if [[ x$gas = xyes ]]
1444 tm_file=m68k/lynx-ng.h
1446 xm_file=m68k/xm-lynx.h
1448 tmake_file=m68k/t-lynx
1449 extra_headers=math-68881.h
1452 tm_file=m68k/netbsd.h
1453 # On NetBSD, the headers are already okay, except for math.h.
1454 fixincludes=fixinc.math
1457 m68k-*-sysv3*) # Motorola m68k's running system V.3
1458 xm_file=m68k/xm-m68kv.h
1459 xmake_file=m68k/x-m68kv
1460 extra_parts="crtbegin.o crtend.o"
1461 extra_headers=math-68881.h
1463 m68k-*-sysv4*) # Motorola m68k's running system V.4
1464 tm_file=m68k/m68kv4.h
1465 xm_file=m68k/xm-m68kv.h
1467 extra_parts="crtbegin.o crtend.o"
1468 extra_headers=math-68881.h
1470 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1471 xm_file=m68k/xm-linux.h # with a.out format
1473 tm_file=m68k/linux-aout.h
1474 tmake_file="t-linux-aout m68k/t-linux-aout"
1475 fixincludes=Makefile.in # The headers are ok already.
1476 extra_headers=math-68881.h
1479 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1480 xm_file=m68k/xm-linux.h # with ELF format using the
1481 xmake_file=x-linux # GNU/Linux C library 5
1482 tm_file=m68k/linux.h
1483 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1484 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1485 fixincludes=Makefile.in # The headers are ok already.
1486 extra_headers=math-68881.h
1489 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1490 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1491 xmake_file=x-linux # aka the GNU/Linux C library 6.
1492 tm_file=m68k/linux.h
1493 tmake_file="t-linux m68k/t-linux"
1494 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1495 fixincludes=Makefile.in # The headers are ok already.
1496 extra_headers=math-68881.h
1498 if [[ x$enable_threads = xyes ]]; then
1503 tmake_file=m68k/t-m68kbare
1504 tm_file=m68k/m68k-psos.h
1505 extra_headers=math-68881.h
1508 tmake_file="m68k/t-m68kbare t-rtems"
1509 tm_file=m68k/rtems.h
1510 extra_headers=math-68881.h
1516 tm_file=m88k/dguxbcs.h
1517 tmake_file=m88k/t-dguxbcs
1521 tmake_file=m88k/t-dgux
1524 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1525 xmake_file=m88k/x-dgux
1526 if [[ x$gas = xyes ]]
1528 tmake_file=m88k/t-dgux-gas
1530 fixincludes=fixinc.dgux
1532 m88k-dolphin-sysv3*)
1533 tm_file=m88k/dolph.h
1534 extra_parts="crtbegin.o crtend.o"
1535 xm_file=m88k/xm-sysv3.h
1536 xmake_file=m88k/x-dolph
1537 if [[ x$gas = xyes ]]
1539 tmake_file=m88k/t-m88k-gas
1542 m88k-tektronix-sysv3)
1543 tm_file=m88k/tekXD88.h
1544 extra_parts="crtbegin.o crtend.o"
1545 xm_file=m88k/xm-sysv3.h
1546 xmake_file=m88k/x-tekXD88
1547 if [[ x$gas = xyes ]]
1549 tmake_file=m88k/t-m88k-gas
1553 tm_file=m88k/m88k-aout.h
1556 tm_file=m88k/m88k-coff.h
1557 tmake_file=m88k/t-bug
1561 extra_parts="crtbegin.o crtend.o"
1562 if [[ x$gas = xyes ]]
1564 tmake_file=m88k/t-luna-gas
1566 tmake_file=m88k/t-luna
1570 tm_file=m88k/sysv3.h
1571 extra_parts="crtbegin.o crtend.o"
1572 xm_file=m88k/xm-sysv3.h
1573 xmake_file=m88k/x-sysv3
1574 if [[ x$gas = xyes ]]
1576 tmake_file=m88k/t-m88k-gas
1580 tm_file=m88k/sysv4.h
1581 extra_parts="crtbegin.o crtend.o"
1582 xmake_file=m88k/x-sysv4
1583 tmake_file=m88k/t-sysv4
1585 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1586 tm_file=mips/iris6.h
1587 xm_file=mips/xm-iris6.h
1588 fixincludes=fixinc.irix
1589 xmake_file=mips/x-iris6
1590 tmake_file=mips/t-iris6
1591 if [[ x$enable_threads = xyes ]]; then
1595 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1596 tm_file=mips/cross64.h
1597 xm_file=mips/xm-iris5.h
1598 fixincludes=Makefile.in
1599 xmake_file=mips/x-iris
1600 tmake_file=mips/t-cross64
1601 # See comment in mips/iris[56].h files.
1603 if [[ x$enable_threads = xyes ]]; then
1608 if [[ x$gas = xyes ]]
1610 if [[ x$stabs = xyes ]]
1612 tm_file=mips/iris5gdb.h
1614 tm_file=mips/sni-gas.h
1617 tm_file=mips/sni-svr4.h
1619 xm_file=mips/xm-sysv.h
1620 xmake_file=mips/x-sni-svr4
1621 tmake_file=mips/t-mips-gas
1622 if [[ x$gnu_ld != xyes ]]
1627 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1628 if [[ x$gas = xyes ]]
1630 tm_file=mips/iris5gas.h
1631 if [[ x$stabs = xyes ]]
1633 tm_file="${tm_file} dbx.h"
1636 tm_file=mips/iris5.h
1638 xm_file=mips/xm-iris5.h
1639 fixincludes=fixinc.irix
1640 xmake_file=mips/x-iris
1641 # mips-tfile doesn't work yet
1642 tmake_file=mips/t-mips-gas
1643 # See comment in mips/iris5.h file.
1645 if [[ x$enable_threads = xyes ]]; then
1649 mips-sgi-irix4loser*) # Mostly like a MIPS.
1650 tm_file=mips/iris4loser.h
1651 if [[ x$stabs = xyes ]]; then
1652 tm_file="${tm_file} dbx.h"
1654 xm_file=mips/xm-iris4.h
1655 xmake_file=mips/x-iris
1656 if [[ x$gas = xyes ]]
1658 tmake_file=mips/t-mips-gas
1660 extra_passes="mips-tfile mips-tdump"
1662 if [[ x$gnu_ld != xyes ]]
1666 if [[ x$enable_threads = xyes ]]; then
1670 mips-sgi-irix4*) # Mostly like a MIPS.
1671 tm_file=mips/iris4.h
1672 if [[ x$stabs = xyes ]]; then
1673 tm_file="${tm_file} dbx.h"
1675 xm_file=mips/xm-iris4.h
1676 xmake_file=mips/x-iris
1677 if [[ x$gas = xyes ]]
1679 tmake_file=mips/t-mips-gas
1681 extra_passes="mips-tfile mips-tdump"
1683 if [[ x$gnu_ld != xyes ]]
1687 if [[ x$enable_threads = xyes ]]; then
1691 mips-sgi-*) # Mostly like a MIPS.
1692 tm_file=mips/iris3.h
1693 if [[ x$stabs = xyes ]]; then
1694 tm_file="${tm_file} dbx.h"
1696 xm_file=mips/xm-iris3.h
1697 xmake_file=mips/x-iris3
1698 if [[ x$gas = xyes ]]
1700 tmake_file=mips/t-mips-gas
1702 extra_passes="mips-tfile mips-tdump"
1704 if [[ x$gnu_ld != xyes ]]
1709 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1710 tm_file=mips/osfrose.h
1711 xmake_file=mips/x-osfrose
1712 tmake_file=mips/t-osfrose
1713 extra_objs=halfpic.o
1716 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1717 tm_file=mips/dec-osf1.h
1718 if [[ x$stabs = xyes ]]; then
1719 tm_file="${tm_file} dbx.h"
1721 xmake_file=mips/x-dec-osf1
1722 if [[ x$gas = xyes ]]
1724 tmake_file=mips/t-mips-gas
1726 tmake_file=mips/t-ultrix
1727 extra_passes="mips-tfile mips-tdump"
1729 if [[ x$gnu_ld != xyes ]]
1734 mips-dec-bsd*) # Decstation running 4.4 BSD
1735 tm_file=mips/dec-bsd.h
1737 if [[ x$gas = xyes ]]
1739 tmake_file=mips/t-mips-gas
1741 tmake_file=mips/t-ultrix
1742 extra_passes="mips-tfile mips-tdump"
1744 if [[ x$gnu_ld != xyes ]]
1749 mips-dec-netbsd*) # Decstation running NetBSD
1750 tm_file=mips/netbsd.h
1751 # On NetBSD, the headers are already okay, except for math.h.
1752 fixincludes=fixinc.math
1755 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1756 tm_file=mips/news4.h
1757 if [[ x$stabs = xyes ]]; then
1758 tm_file="${tm_file} dbx.h"
1760 if [[ x$gas = xyes ]]
1762 tmake_file=mips/t-mips-gas
1764 extra_passes="mips-tfile mips-tdump"
1766 if [[ x$gnu_ld != xyes ]]
1770 xmake_file=mips/x-sony
1772 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1773 # That is based on svr4.
1774 # t-svr4 is not right because this system doesn't use ELF.
1775 tm_file=mips/news5.h
1776 if [[ x$stabs = xyes ]]; then
1777 tm_file="${tm_file} dbx.h"
1779 xm_file=mips/xm-news.h
1780 if [[ x$gas = xyes ]]
1782 tmake_file=mips/t-mips-gas
1784 extra_passes="mips-tfile mips-tdump"
1786 if [[ x$gnu_ld != xyes ]]
1791 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1792 tm_file=mips/svr4-t.h
1793 if [[ x$stabs = xyes ]]; then
1794 tm_file="${tm_file} dbx.h"
1796 xm_file=mips/xm-sysv4.h
1797 xmake_file=mips/x-sysv
1798 if [[ x$gas = xyes ]]
1800 tmake_file=mips/t-mips-gas
1801 extra_parts="crtbegin.o crtend.o"
1803 tmake_file=mips/t-mips
1804 extra_passes="mips-tfile mips-tdump"
1806 if [[ x$gnu_ld != xyes ]]
1811 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1812 tm_file=mips/ultrix.h
1813 if [[ x$stabs = xyes ]]; then
1814 tm_file="${tm_file} dbx.h"
1816 xmake_file=mips/x-ultrix
1817 if [[ x$gas = xyes ]]
1819 tmake_file=mips/t-mips-gas
1821 tmake_file=mips/t-ultrix
1822 extra_passes="mips-tfile mips-tdump"
1824 if [[ x$gnu_ld != xyes ]]
1829 mips-*-riscos[[56789]]bsd*)
1830 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1831 if [[ x$stabs = xyes ]]; then
1832 tm_file="${tm_file} dbx.h"
1834 if [[ x$gas = xyes ]]
1836 tmake_file=mips/t-bsd-gas
1838 tmake_file=mips/t-bsd
1839 extra_passes="mips-tfile mips-tdump"
1841 if [[ x$gnu_ld != xyes ]]
1846 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1847 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1848 if [[ x$stabs = xyes ]]; then
1849 tm_file="${tm_file} dbx.h"
1851 if [[ x$gas = xyes ]]
1853 tmake_file=mips/t-bsd-gas
1855 tmake_file=mips/t-bsd
1856 extra_passes="mips-tfile mips-tdump"
1858 if [[ x$gnu_ld != xyes ]]
1863 mips-*-riscos[[56789]]sysv4*)
1864 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1865 if [[ x$stabs = xyes ]]; then
1866 tm_file="${tm_file} dbx.h"
1868 xm_file=mips/xm-sysv4.h
1869 xmake_file=mips/x-sysv
1870 if [[ x$gas = xyes ]]
1872 tmake_file=mips/t-svr4-gas
1874 tmake_file=mips/t-svr4
1875 extra_passes="mips-tfile mips-tdump"
1877 if [[ x$gnu_ld != xyes ]]
1882 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1883 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1884 if [[ x$stabs = xyes ]]; then
1885 tm_file="${tm_file} dbx.h"
1887 xm_file=mips/xm-sysv.h
1888 xmake_file=mips/x-sysv
1889 if [[ x$gas = xyes ]]
1891 tmake_file=mips/t-svr4-gas
1893 tmake_file=mips/t-svr4
1894 extra_passes="mips-tfile mips-tdump"
1896 if [[ x$gnu_ld != xyes ]]
1901 mips-*-riscos[[56789]]sysv*)
1902 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1903 if [[ x$stabs = xyes ]]; then
1904 tm_file="${tm_file} dbx.h"
1906 xm_file=mips/xm-sysv.h
1907 xmake_file=mips/x-sysv
1908 if [[ x$gas = xyes ]]
1910 tmake_file=mips/t-svr3-gas
1912 tmake_file=mips/t-svr3
1913 extra_passes="mips-tfile mips-tdump"
1915 if [[ x$gnu_ld != xyes ]]
1920 mips-*-sysv* | mips-*-riscos*sysv*)
1921 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1922 if [[ x$stabs = xyes ]]; then
1923 tm_file="${tm_file} dbx.h"
1925 xm_file=mips/xm-sysv.h
1926 xmake_file=mips/x-sysv
1927 if [[ x$gas = xyes ]]
1929 tmake_file=mips/t-svr3-gas
1931 tmake_file=mips/t-svr3
1932 extra_passes="mips-tfile mips-tdump"
1934 if [[ x$gnu_ld != xyes ]]
1939 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1940 tm_file=mips/mips-5.h
1941 if [[ x$stabs = xyes ]]; then
1942 tm_file="${tm_file} dbx.h"
1944 if [[ x$gas = xyes ]]
1946 tmake_file=mips/t-mips-gas
1948 extra_passes="mips-tfile mips-tdump"
1950 if [[ x$gnu_ld != xyes ]]
1958 tm_file=mips/ecoffl.h
1959 if [[ x$stabs = xyes ]]; then
1960 tm_file="${tm_file} dbx.h"
1962 tmake_file=mips/t-ecoff
1965 tm_file=mips/ecoff.h
1966 if [[ x$stabs = xyes ]]; then
1967 tm_file="${tm_file} dbx.h"
1969 tmake_file=mips/t-ecoff
1972 tm_file="mips/elfl.h libgloss.h"
1973 tmake_file=mips/t-ecoff
1976 tm_file="mips/elf.h libgloss.h"
1977 tmake_file=mips/t-ecoff
1980 tm_file="mips/elfl64.h libgloss.h"
1981 tmake_file=mips/t-ecoff
1983 mips64orionel-*-elf*)
1984 tm_file="mips/elflorion.h libgloss.h"
1985 tmake_file=mips/t-ecoff
1988 tm_file="mips/elf64.h libgloss.h"
1989 tmake_file=mips/t-ecoff
1992 tm_file="mips/elforion.h libgloss.h"
1993 tmake_file=mips/t-ecoff
1995 mips64orion-*-rtems*)
1996 tm_file=mips/rtems64.h
1997 tmake_file="mips/t-ecoff t-rtems"
2000 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2001 tmake_file=mips/t-r3900
2004 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2005 tmake_file=mips/t-r3900
2007 mips-*-*) # Default MIPS RISC-OS 4.0.
2008 if [[ x$stabs = xyes ]]; then
2009 tm_file="${tm_file} dbx.h"
2011 if [[ x$gas = xyes ]]
2013 tmake_file=mips/t-mips-gas
2015 extra_passes="mips-tfile mips-tdump"
2017 if [[ x$gnu_ld != xyes ]]
2024 tm_file="mn10200/mn10200.h"
2025 if [[ x$stabs = xyes ]]
2027 tm_file="${tm_file} dbx.h"
2033 tm_file="mn10300/mn10300.h"
2034 if [[ x$stabs = xyes ]]
2036 tm_file="${tm_file} dbx.h"
2041 tm_file=ns32k/encore.h
2045 tm_file=ns32k/sequent.h
2049 tm_file=ns32k/tek6100.h
2053 tm_file=ns32k/tek6200.h
2056 # This has not been updated to GCC 2.
2058 # xm_file=ns32k/xm-genix.h
2059 # xmake_file=ns32k/x-genix
2060 # tm_file=ns32k/genix.h
2064 tm_file=ns32k/merlin.h
2068 tm_file=ns32k/pc532-mach.h
2072 tm_file=ns32k/pc532-min.h
2073 xm_file=ns32k/xm-pc532-min.h
2076 ns32k-pc532-netbsd*)
2077 tm_file=ns32k/netbsd.h
2078 # On NetBSD, the headers are already okay, except for math.h.
2079 fixincludes=fixinc.math
2083 tm_file="${tm_file} pdp11/2bsd.h"
2089 xmake_file=pyr/x-pyr
2096 xmake_file=romp/x-mach
2101 tm_file=rs6000/beos.h
2102 xm_file=rs6000/xm-beos.h
2103 tmake_file=rs6000/t-beos
2104 xmake_file=rs6000/x-beos
2106 powerpc-*-sysv* | powerpc-*-elf*)
2107 tm_file=rs6000/sysv4.h
2108 xm_file=rs6000/xm-sysv4.h
2109 extra_headers=ppc-asm.h
2110 if [[ x$gas = xyes ]]
2112 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2114 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2116 xmake_file=rs6000/x-sysv4
2119 tm_file=rs6000/eabiaix.h
2120 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2121 fixincludes=Makefile.in
2122 extra_headers=ppc-asm.h
2125 tm_file=rs6000/eabisim.h
2126 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2127 fixincludes=Makefile.in
2128 extra_headers=ppc-asm.h
2131 tm_file=rs6000/eabi.h
2132 if [[ x$gas = xyes ]]
2134 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2136 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2138 fixincludes=Makefile.in
2139 extra_headers=ppc-asm.h
2142 tm_file=rs6000/rtems.h
2143 if [[ x$gas = xyes ]]
2145 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2147 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2149 fixincludes=Makefile.in
2150 extra_headers=ppc-asm.h
2152 powerpc-*-linux-gnu*)
2153 tm_file=rs6000/linux.h
2154 xm_file=rs6000/xm-sysv4.h
2155 out_file=rs6000/rs6000.c
2156 if [[ x$gas = xyes ]]
2158 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2160 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2163 fixincludes=Makefile.in
2164 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2165 extra_headers=ppc-asm.h
2166 if [[ x$enable_threads = xyes ]]; then
2172 xm_file=rs6000/xm-sysv4.h
2173 tm_file=rs6000/vxppc.h
2174 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2175 extra_headers=ppc-asm.h
2177 powerpcle-*-sysv* | powerpcle-*-elf*)
2178 tm_file=rs6000/sysv4le.h
2179 xm_file=rs6000/xm-sysv4.h
2180 if [[ x$gas = xyes ]]
2182 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2184 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2186 xmake_file=rs6000/x-sysv4
2187 extra_headers=ppc-asm.h
2189 powerpcle-*-eabisim*)
2190 tm_file=rs6000/eabilesim.h
2191 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2192 fixincludes=Makefile.in
2193 extra_headers=ppc-asm.h
2196 tm_file=rs6000/eabile.h
2197 if [[ x$gas = xyes ]]
2199 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2201 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2203 fixincludes=Makefile.in
2204 extra_headers=ppc-asm.h
2206 powerpcle-*-winnt* )
2207 tm_file=rs6000/win-nt.h
2208 tmake_file=rs6000/t-winnt
2210 fixincludes=Makefile.in
2211 if [[ x$enable_threads = xyes ]]; then
2214 extra_headers=ppc-asm.h
2216 powerpcle-*-pe | powerpcle-*-cygwin32)
2217 tm_file=rs6000/cygwin32.h
2218 xm_file=rs6000/xm-cygwin32.h
2219 tmake_file=rs6000/t-winnt
2220 xmake_file=rs6000/x-cygwin32
2222 fixincludes=Makefile.in
2223 if [[ x$enable_threads = xyes ]]; then
2227 extra_headers=ppc-asm.h
2229 powerpcle-*-solaris2*)
2230 tm_file=rs6000/sol2.h
2231 xm_file=rs6000/xm-sysv4.h
2232 if [[ x$gas = xyes ]]
2234 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2236 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2238 xmake_file=rs6000/x-sysv4
2239 fixincludes=fixinc.math
2240 extra_headers=ppc-asm.h
2242 rs6000-ibm-aix3.[[01]]*)
2243 tm_file=rs6000/aix31.h
2244 xmake_file=rs6000/x-aix31
2247 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2248 tm_file=rs6000/aix3newas.h
2249 if [[ x$host != x$target ]]
2251 tmake_file=rs6000/t-xnewas
2253 tmake_file=rs6000/t-newas
2257 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2258 tm_file=rs6000/aix41.h
2259 if [[ x$host != x$target ]]
2261 tmake_file=rs6000/t-xnewas
2263 tmake_file=rs6000/t-newas
2265 xmake_file=rs6000/x-aix31
2275 tm_file=rs6000/mach.h
2276 xm_file=rs6000/xm-mach.h
2277 xmake_file=rs6000/x-mach
2281 tm_file=rs6000/lynx.h
2282 xm_file=rs6000/xm-lynx.h
2283 tmake_file=rs6000/t-rs6000
2284 xmake_file=rs6000/x-lynx
2292 tmake_file="sh/t-sh t-rtems"
2301 xm_file=sparc/xm-pbd.h
2303 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2304 tm_file=sparc/vxsparc.h
2305 tmake_file=sparc/t-vxsparc
2309 tmake_file=sparc/t-sparcbare
2310 tm_file="sparc/aout.h libgloss.h"
2313 tm_file=sparc/netbsd.h
2314 # On NetBSD, the headers are already okay, except for math.h.
2315 fixincludes=fixinc.math
2323 tmake_file=sparc/t-elf
2324 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2328 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2329 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2330 tm_file=sparc/linux-aout.h
2332 fixincludes=Makefile.in #On Linux, the headers are ok already.
2335 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2336 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2338 tm_file=sparc/linux.h
2339 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2340 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2341 fixincludes=Makefile.in #On Linux, the headers are ok already.
2344 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2345 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2347 tm_file=sparc/linux.h
2348 tmake_file="t-linux sparc/t-linux"
2349 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2350 fixincludes=Makefile.in #On Linux, the headers are ok already.
2352 if [[ x$enable_threads = xyes ]]; then
2357 if [[ x$gas = xyes ]]
2359 tm_file=sparc/lynx.h
2361 tm_file=sparc/lynx-ng.h
2363 xm_file=sparc/xm-lynx.h
2364 tmake_file=sparc/t-sunos41
2368 tmake_file="sparc/t-sparcbare t-rtems"
2369 tm_file=sparc/rtems.h
2372 if [[ x$gnu_ld = xyes ]]
2374 tm_file=sparc/sol2.h
2376 tm_file=sparc/sol2-sld.h
2378 xm_file=sparc/xm-sol2.h
2379 tmake_file=sparc/t-sol2
2380 xmake_file=sparc/x-sysv4
2381 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2382 fixincludes=fixinc.svr4
2385 if [[ x${enable_threads} = x ]]; then
2386 enable_threads=$have_pthread_h
2387 if [[ x${enable_threads} = x ]]; then
2388 enable_threads=$have_thread_h
2391 if [[ x${enable_threads} = xyes ]]; then
2392 if [[ x${have_pthread_h} = xyes ]]; then
2395 thread_file='solaris'
2400 tm_file=sparc/sunos4.h
2401 tmake_file=sparc/t-sunos40
2405 tm_file=sparc/sunos4.h
2406 tmake_file=sparc/t-sunos41
2408 if [[ x$gas = xyes ]]; then
2409 tm_file="${tm_file} sparc/sun4gas.h"
2413 tm_file=sparc/sun4o3.h
2417 tm_file=sparc/sysv4.h
2418 xm_file=sparc/xm-sysv4.h
2420 xmake_file=sparc/x-sysv4
2421 extra_parts="crtbegin.o crtend.o"
2424 xm_file=sparc/xm-sol2.h
2425 tm_file=sparc/vxsim.h
2426 tmake_file=sparc/t-vxsparc
2427 xmake_file=sparc/x-sysv4
2430 tm_file="sparc/splet.h libgloss.h"
2431 tmake_file=sparc/t-splet
2434 tm_file="sparc/litecoff.h libgloss.h"
2435 tmake_file=sparc/t-sparclite
2438 tm_file="sparc/lite.h aoutos.h libgloss.h"
2439 tmake_file=sparc/t-sparclite
2442 tmake_file=sparc/t-sp64
2443 tm_file=sparc/sp64-aout.h
2446 tmake_file=sparc/t-sp64
2447 tm_file=sparc/sp64-elf.h
2448 extra_parts="crtbegin.o crtend.o"
2450 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2451 tmake_file=sparc/t-sp64
2452 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2453 tm_file=sparc/linux64.h
2455 fixincludes=Makefile.in # The headers are ok already.
2458 # This hasn't been upgraded to GCC 2.
2459 # tahoe-harris-*) # Harris tahoe, using COFF.
2460 # tm_file=tahoe/harris.h
2462 # tahoe-*-bsd*) # tahoe running BSD
2464 # This hasn't been upgraded to GCC 2.
2471 tm_file="v850/v850.h"
2472 xm_file="v850/xm-v850.h"
2473 if [[ x$stabs = xyes ]]
2475 tm_file="${tm_file} dbx.h"
2479 vax-*-bsd*) # vaxen running BSD
2483 vax-*-sysv*) # vaxen running system V
2484 tm_file="${tm_file} vax/vaxv.h"
2485 xm_file="${xm_file} vax/xm-vaxv.h"
2489 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2490 # On NetBSD, the headers are already okay, except for math.h.
2491 fixincludes=fixinc.math
2495 vax-*-ultrix*) # vaxen running ultrix
2496 tm_file="${tm_file} vax/ultrix.h"
2500 vax-*-vms*) # vaxen running VMS
2501 xm_file=vax/xm-vms.h
2505 vax-*-*) # vax default entry
2509 xm_file="${xm_file} xm-svr3"
2513 echo "Configuration $machine not supported" 1>&2
2520 ;; # Existing Linux/GNU systems do not use the GNU setup.
2522 # On the GNU system, the setup is just about the same on
2523 # each different CPU. The specific machines that GNU
2524 # supports are matched above and just set $cpu_type.
2525 xm_file=${cpu_type}/xm-gnu.h
2526 tm_file=${cpu_type}/gnu.h
2527 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2528 # GNU always uses ELF.
2530 # GNU tools are the only tools.
2533 # On GNU, the headers are already okay.
2534 fixincludes=Makefile.in
2535 xmake_file=x-linux # These details are the same as Linux.
2536 tmake_file=t-gnu # These are not.
2539 fixincludes=fixinc.svr4
2540 xmake_try_sysv=x-sysv
2541 install_headers_dir=install-headers-cpio
2544 install_headers_dir=install-headers-cpio
2548 # Distinguish i[3456]86
2549 # Also, do not run mips-tfile on MIPS if using gas.
2550 # Process --with-cpu= for PowerPC/rs6000
2551 target_cpu_default2=
2554 target_cpu_default2=1
2557 target_cpu_default2=2
2560 target_cpu_default2=3
2565 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2568 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
2571 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2574 target_cpu_default2="MASK_CPU_EV5"
2578 if [[ x$gas = xyes ]]
2580 if [[ "$target_cpu_default2" = "" ]]
2582 target_cpu_default2="MASK_GAS"
2584 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2589 case "x$with_cpu" in
2592 target_cpu_default2="TARGET_CPU_generic"
2595 # Distinguish cores, and major variants
2596 # arm7m doesn't exist, but D & I don't affect code
2597 xarm[23678] | xarm250 | xarm[67][01]0 \
2598 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2599 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2600 | xstrongarm | xstrongarm110)
2601 target_cpu_default2="TARGET_CPU_$with_cpu"
2605 echo "--with-cpu must be passed a value" 1>&2
2610 if [[ x$pass2done = xyes ]]
2612 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2619 mips*-*-ecoff* | mips*-*-elf*)
2620 if [[ x$gas = xyes ]]
2622 if [[ x$gnu_ld = xyes ]]
2624 target_cpu_default2=20
2626 target_cpu_default2=16
2631 if [[ x$gas = xyes ]]
2633 target_cpu_default2=16
2636 powerpc*-*-* | rs6000-*-*)
2637 case "x$with_cpu" in
2641 xcommon | xpower | xpower2 | xpowerpc | xrios \
2642 | xrios1 | xrios2 | xrsc | xrsc1 \
2643 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2644 | x403 | x505 | x801 | x821 | x823 | x860)
2645 target_cpu_default2="\"$with_cpu\""
2649 echo "--with-cpu must be passed a value" 1>&2
2654 if [[ x$pass2done = xyes ]]
2656 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2663 case ".$with_cpu" in
2665 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2667 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2668 target_cpu_default2="TARGET_CPU_$with_cpu"
2671 if [[ x$pass2done = xyes ]]
2673 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2681 if [[ "$target_cpu_default2" != "" ]]
2683 if [[ "$target_cpu_default" != "" ]]
2685 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2687 target_cpu_default=$target_cpu_default2
2691 # No need for collect2 if we have the GNU linker.
2698 # Save data on machine being used to compile GCC in build_xm_file.
2699 # Save data on host machine in vars host_xm_file and host_xmake_file.
2700 if [[ x$pass1done = x ]]
2702 if [[ x"$xm_file" = x ]]
2703 then build_xm_file=$cpu_type/xm-$cpu_type.h
2704 else build_xm_file=$xm_file
2706 build_install_headers_dir=$install_headers_dir
2707 build_exeext=$exeext
2710 if [[ x$pass2done = x ]]
2712 if [[ x"$xm_file" = x ]]
2713 then host_xm_file=$cpu_type/xm-$cpu_type.h
2714 else host_xm_file=$xm_file
2716 if [[ x"$xmake_file" = x ]]
2717 then xmake_file=$cpu_type/x-$cpu_type
2719 host_xmake_file="$xmake_file"
2720 host_truncate_target=$truncate_target
2721 host_extra_gcc_objs=$extra_gcc_objs
2722 host_extra_objs=$extra_host_objs
2729 extra_objs="${host_extra_objs} ${extra_objs}"
2731 # Default the target-machine variables that were not explicitly set.
2732 if [[ x"$tm_file" = x ]]
2733 then tm_file=$cpu_type/$cpu_type.h; fi
2735 if [[ x$extra_headers = x ]]
2736 then extra_headers=; fi
2738 if [[ x"$xm_file" = x ]]
2739 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2741 md_file=$cpu_type/$cpu_type.md
2743 if [[ x$out_file = x ]]
2744 then out_file=$cpu_type/$cpu_type.c; fi
2746 if [[ x"$tmake_file" = x ]]
2747 then tmake_file=$cpu_type/t-$cpu_type
2750 if [[ x$float_format = x ]]
2751 then float_format=i64
2754 if [[ x$enable_haifa = x ]]
2757 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-*)
2762 # Say what files are being used for the output code and MD file.
2763 echo "Using \`$srcdir/config/$out_file' to output insns."
2764 echo "Using \`$srcdir/config/$md_file' as machine description file."
2767 for f in $tm_file; do
2770 if [[ $count = ax ]]; then
2771 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2773 echo "Using the following target machine macro files:"
2774 for f in $tm_file; do
2775 echo " $srcdir/config/$f"
2780 for f in $host_xm_file; do
2783 if [[ $count = ax ]]; then
2784 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2786 echo "Using the following host machine macro files:"
2787 for f in $host_xm_file; do
2788 echo " $srcdir/config/$f"
2792 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2794 for f in $build_xm_file; do
2797 if [[ $count = ax ]]; then
2798 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2800 echo "Using the following build machine macro files:"
2801 for f in $build_xm_file; do
2802 echo " $srcdir/config/$f"
2807 if [[ x$thread_file = x ]]; then
2808 if [[ x$target_thread_file != x ]]; then
2809 thread_file=$target_thread_file
2811 thread_file='single'
2815 # Set up the header files.
2816 # $links is the list of header files to create.
2817 # $vars is the list of shell variables with file names to include.
2818 # auto-conf.h is the file containing items generated by autoconf and is
2819 # the first file included by config.h.
2820 host_xm_file="auto-config.h ${host_xm_file}"
2822 # If host=build, it is correct to have hconfig include auto-conf.h
2823 # as well. If host!=build, we are in error and need to do more
2824 # work to find out the build config parameters.
2825 if [[ x$host = x$build ]]
2827 build_xm_file="auto-config.h ${build_xm_file}"
2830 vars="host_xm_file tm_file xm_file build_xm_file"
2831 links="config.h tm.h tconfig.h hconfig.h"
2834 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2837 while [[ -n "$vars" ]]
2839 # set file to car of files, files to cdr of files
2840 set $vars; var=$1; shift; vars=$*
2841 set $links; link=$1; shift; links=$*
2845 # Define TARGET_CPU_DEFAULT if the system wants one.
2846 # This substitutes for lots of *.h files.
2847 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
2849 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
2852 for file in `eval echo '$'$var`; do
2853 echo "#include \"$file\"" >>$link
2857 # Truncate the target if necessary
2858 if [[ x$host_truncate_target != x ]]; then
2859 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2862 # Get the version number from the toplevel
2863 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2865 # Get an absolute path to the GCC top-level source directory
2871 # Conditionalize the makefile for this host machine.
2872 # Make-host contains the concatenation of all host makefile fragments
2873 # [there can be more than one]. This file is built by configure.frag.
2874 host_overrides=Make-host
2875 dep_host_xmake_file=
2876 for f in .. ${host_xmake_file}
2878 if [[ -f ${srcdir}/config/$f ]]
2880 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2884 # Conditionalize the makefile for this target machine.
2885 # Make-target contains the concatenation of all host makefile fragments
2886 # [there can be more than one]. This file is built by configure.frag.
2887 target_overrides=Make-target
2889 for f in .. ${tmake_file}
2891 if [[ -f ${srcdir}/config/$f ]]
2893 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2897 # If the host doesn't support symlinks, modify CC in
2898 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2899 # Otherwise, we can use "CC=$(CC)".
2901 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2903 cc_set_by_configure="\$(CC)"
2904 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2906 symbolic_link="cp -p"
2907 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2908 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2912 out_object_file=`basename $out_file .c`.o
2915 for f in $tm_file; do
2916 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2920 for f in $host_xm_file; do
2921 if test $f != "auto-config.h"; then
2922 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2924 host_xm_file_list="${host_xm_file_list} auto-config.h"
2929 for f in $build_xm_file; do
2930 if test $f != "auto-config.h"; then
2931 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2933 build_xm_file_list="${build_xm_file_list} auto-config.h"
2937 # Define macro CROSS_COMPILE in compilation
2938 # if this is a cross-compiler.
2939 # Also use all.cross instead of all.internal
2940 # and add cross-make to Makefile.
2941 cross_overrides="/dev/null"
2942 if [[ x$host != x$target ]]
2944 cross_defines="CROSS=-DCROSS_COMPILE"
2945 cross_overrides="${topdir}/cross-make"
2948 # When building gcc with a cross-compiler, we need to fix a few things.
2949 # This must come after cross-make as we want all.build to override
2951 build_overrides="/dev/null"
2952 if [[ x$build != x$host ]]
2954 build_overrides="${topdir}/build-make"
2957 # Expand extra_headers to include complete path.
2958 # This substitutes for lots of t-* files.
2960 if [[ "x$extra_headers" = x ]]
2963 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2964 for file in $extra_headers;
2966 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2970 # Add a definition of USE_COLLECT2 if system wants one.
2971 # Also tell toplev.c what to do.
2972 # This substitutes for lots of t-* files.
2973 if [[ x$use_collect2 = x ]]
2978 will_use_collect2="ld"
2979 maybe_use_collect2="-DUSE_COLLECT2"
2983 # Set MD_DEPS if the real md file is in md.pre-cpp.
2984 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2985 # for line oriented comments, so we must always use a GNU cpp. If
2986 # building gcc with a cross compiler, use the cross compiler just
2987 # built. Otherwise, we can use the cpp just built.
2989 if [[ "x$md_cppflags" = x ]]
2991 md_file_sub=$srcdir/config/$md_file
2996 # If we have gas in the build tree, make a link to it.
2997 if [[ -f ../gas/Makefile ]]; then
2998 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3001 # If we have ld in the build tree, make a link to it.
3002 if [[ -f ../ld/Makefile ]]; then
3003 # if [[ x$use_collect2 = x ]]; then
3004 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3006 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3010 # Figure out what language subdirectories are present.
3012 for lang in ${srcdir}/*/config-lang.in ..
3016 # The odd quoting in the next line works around
3017 # an apparent bug in bash 1.12 on linux.
3018 ${srcdir}/[[*]]/config-lang.in) ;;
3019 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3023 # Make gthr-default.h if we have a thread file.
3025 if [[ $thread_file != single ]]; then
3026 rm -f gthr-default.h
3027 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3028 gthread_flags=-DHAVE_GTHR_DEFAULT
3030 AC_SUBST(gthread_flags)
3032 # Make empty files to contain the specs and options for each language.
3033 # Then add #include lines to for a compiler that has specs and/or options.
3037 rm -f specs.h options.h
3038 touch specs.h options.h
3039 for subdir in . $subdirs
3041 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3042 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3043 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3045 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3046 echo "#include \"$subdir/lang-options.h\"" >>options.h
3047 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3051 # These (without "all_") are set in each config-lang.in.
3052 # `language' must be a single word so is spelled singularly.
3058 all_outputs=Makefile
3059 # List of language makefile fragments.
3064 # Add the language fragments.
3065 # Languages are added via two mechanisms. Some information must be
3066 # recorded in makefile variables, these are defined in config-lang.in.
3067 # We accumulate them and plug them into the main Makefile.
3068 # The other mechanism is a set of hooks for each of the main targets
3069 # like `clean', `install', etc.
3071 language_fragments="Make-lang"
3072 language_hooks="Make-hooks"
3075 for s in .. $subdirs
3087 . ${srcdir}/$s/config-lang.in
3088 if [[ "x$language" = x ]]
3090 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3093 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3094 all_languages="$all_languages $language"
3095 if [[ "x$boot_language" = xyes ]]
3097 all_boot_languages="$all_boot_languages $language"
3099 all_compilers="$all_compilers $compilers"
3100 all_stagestuff="$all_stagestuff $stagestuff"
3101 all_diff_excludes="$all_diff_excludes $diff_excludes"
3102 all_headers="$all_headers $headers"
3103 all_outputs="$all_outputs $outputs"
3104 if [[ x$outputs = x ]]
3106 oldstyle_subdirs="$oldstyle_subdirs $s"
3108 all_lib2funcs="$all_lib2funcs $lib2funcs"
3112 # Since we can't use `::' targets, we link each language in
3113 # with a set of hooks, reached indirectly via lang.${target}.
3117 target_list="all.build all.cross start.encap rest.encap \
3119 install-normal install-common install-info install-man \
3121 mostlyclean clean distclean extraclean maintainer-clean \
3122 stage1 stage2 stage3 stage4"
3123 for t in $target_list
3126 for l in .. $all_languages
3128 if [[ $l != ".." ]]; then
3132 echo "lang.$t: $x" >> Make-hooks
3135 # If we're not building in srcdir, create .gdbinit.
3137 if [[ ! -f Makefile.in ]]; then
3138 echo "dir ." > .gdbinit
3139 echo "dir ${srcdir}" >> .gdbinit
3140 if [[ x$gdb_needs_out_file_path = xyes ]]
3142 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3144 if [[ "x$subdirs" != x ]]; then
3147 echo "dir ${srcdir}/$s" >> .gdbinit
3150 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3153 # If this is using newlib, then define inhibit_libc in
3154 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3155 # libgcc.a, but that's OK because newib should have its own version of
3158 if [[ x$with_newlib = xyes ]]; then
3159 inhibit_libc=-Dinhibit_libc
3161 AC_SUBST(inhibit_libc)
3163 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3166 if [[ x$enable_haifa = xyes ]]; then
3167 echo "Using the Haifa scheduler."
3169 sched_cflags=-DHAIFA
3171 AC_SUBST(sched_prefix)
3172 AC_SUBST(sched_cflags)
3173 if [[ x$enable_haifa != x ]]; then
3174 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3175 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3176 if [[ -f $x ]]; then
3183 # Process the language and host/target makefile fragments.
3184 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3186 # Substitute configuration variables
3188 AC_SUBST(all_languages)
3189 AC_SUBST(all_boot_languages)
3190 AC_SUBST(all_compilers)
3191 AC_SUBST(all_lang_makefiles)
3192 AC_SUBST(all_stagestuff)
3193 AC_SUBST(all_diff_excludes)
3194 AC_SUBST(all_lib2funcs)
3195 AC_SUBST(all_headers)
3196 AC_SUBST(extra_passes)
3197 AC_SUBST(extra_programs)
3198 AC_SUBST(extra_parts)
3199 AC_SUBST(extra_c_objs)
3200 AC_SUBST(extra_c_flags)
3201 AC_SUBST(extra_objs)
3202 AC_SUBST(host_extra_gcc_objs)
3203 AC_SUBST(extra_headers_list)
3204 AC_SUBST(dep_host_xmake_file)
3205 AC_SUBST(dep_tmake_file)
3207 AC_SUBST(out_object_file)
3209 AC_SUBST(tm_file_list)
3210 AC_SUBST(build_xm_file_list)
3211 AC_SUBST(host_xm_file_list)
3212 AC_SUBST(lang_specs_files)
3213 AC_SUBST(lang_options_files)
3214 AC_SUBST(thread_file)
3216 AC_SUBST(local_prefix)
3217 AC_SUBST(gxx_include_dir)
3218 AC_SUBST(fixincludes)
3219 AC_SUBST(build_install_headers_dir)
3220 AC_SUBST(build_exeext)
3221 AC_SUBST(host_exeext)
3222 AC_SUBST(float_format)
3223 AC_SUBST(will_use_collect2)
3224 AC_SUBST(maybe_use_collect2)
3225 AC_SUBST(cc_set_by_configure)
3226 AC_SUBST(stage_prefix_set_by_configure)
3228 AC_SUBST(symbolic_link)
3230 AC_SUBST_FILE(target_overrides)
3231 AC_SUBST_FILE(host_overrides)
3232 AC_SUBST(cross_defines)
3233 AC_SUBST_FILE(cross_overrides)
3234 AC_SUBST_FILE(build_overrides)
3235 AC_SUBST_FILE(language_fragments)
3236 AC_SUBST_FILE(language_hooks)
3238 # Echo that links are built
3239 if [[ x$host = x$target ]]
3247 if [[ x$host != x$build ]]
3249 str3=" on a $build system"
3252 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3257 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3259 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3261 echo " ${str2}${str3}." 1>&2
3264 # Configure the subdirectories
3265 # AC_CONFIG_SUBDIRS($subdirs)
3267 # Create the Makefile
3268 # and configure language subdirectories
3269 AC_OUTPUT($all_outputs,
3271 . $srcdir/configure.lang
3272 case x$CONFIG_HEADERS in
3273 xauto-config.h:config.in)
3276 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3277 # bootstrapping and the installation procedure can still use
3278 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3279 # FLAGS_TO_PASS has been modified to solve the problem there.
3280 # This is virtually a duplicate of what happens in configure.lang; we do
3281 # an extra check to make sure this only happens if ln -s can be used.
3282 if [[ "$symbolic_link" = "ln -s" ]]; then
3283 for d in .. ${subdirs} ; do
3284 if [[ $d != .. ]]; then
3287 for t in stage1 stage2 stage3 stage4 include
3290 $symbolic_link ../$t $t 2>/dev/null
3301 target_alias='${target_alias}'
3303 subdirs='${subdirs}'
3304 oldstyle_subdirs='${oldstyle_subdirs}'
3305 symbolic_link='${symbolic_link}'
3306 program_transform_set='${program_transform_set}'
3307 program_transform_name='${program_transform_name}'
3308 dep_host_xmake_file='${dep_host_xmake_file}'
3309 host_xmake_file='${host_xmake_file}'
3310 dep_tmake_file='${dep_tmake_file}'
3311 tmake_file='${tmake_file}'
3312 thread_file='${thread_file}'
3313 version='${version}'
3314 local_prefix='${local_prefix}'
3315 build_install_headers_dir='${build_install_headers_dir}'
3316 build_exeext='${build_exeext}'
3317 host_exeext='${host_exeext}'
3318 out_file='${out_file}'
3319 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3320 SET_MAKE='${SET_MAKE}'
3321 target_list='${target_list}'
3322 target_overrides='${target_overrides}'
3323 host_overrides='${host_overrides}'
3324 cross_defines='${cross_defines}'
3325 cross_overrides='${cross_overrides}'
3326 build_overrides='${build_overrides}'