1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997 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
116 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
118 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 # Use <inttypes.h> only if it exists,
151 # doesn't clash with <sys/types.h>, and declares intmax_t.
152 AC_MSG_CHECKING(for inttypes.h)
153 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
155 [#include <sys/types.h>
156 #include <inttypes.h>],
158 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
159 gcc_cv_header_inttypes_h=yes],
160 gcc_cv_header_inttypes_h=no)])
161 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
163 AC_CHECK_FUNCS(strtoul)
164 AC_CHECK_FUNCS(bsearch)
165 AC_CHECK_FUNCS(strerror)
166 AC_CHECK_FUNCS(putenv)
167 AC_CHECK_FUNCS(popen)
168 AC_CHECK_FUNCS(vprintf)
169 AC_CHECK_FUNCS(bcopy)
170 AC_CHECK_FUNCS(bzero)
172 AC_CHECK_FUNCS(index)
173 AC_CHECK_FUNCS(rindex)
175 AC_CHECK_FUNCS(getrlimit)
176 AC_CHECK_FUNCS(setrlimit)
178 GCC_NEED_DECLARATION(malloc)
179 GCC_NEED_DECLARATION(realloc)
180 GCC_NEED_DECLARATION(calloc)
181 GCC_NEED_DECLARATION(free)
182 GCC_NEED_DECLARATION(index)
183 GCC_NEED_DECLARATION(rindex)
184 GCC_NEED_DECLARATION(getenv)
195 build_install_headers_dir=install-headers-tar
199 host_truncate_target=
201 # Decode the host machine, then the target machine.
202 # For the host machine, we save the xm_file variable as host_xm_file;
203 # then we decode the target machine and forget everything else
204 # that came from the host machine.
205 for machine in $build $host $target; do
218 # Set this to force installation and use of collect2.
220 # Set this to override the default target model.
222 # Set this to control which fixincludes program to use.
223 fixincludes=fixincludes
224 # Set this to control how the header file directory is installed.
225 install_headers_dir=install-headers-tar
226 # Set this to a non-empty list of args to pass to cpp if the target
227 # wants its .md file passed through cpp.
229 # Set this if directory names should be truncated to 14 characters.
231 # Set this if gdb needs a dir command with `dirname $out_file`
232 gdb_needs_out_file_path=
233 # Set this if the build machine requires executables to have a
237 # Set default cpu_type, tm_file and xm_file so it can be updated in
238 # each machine entry.
239 cpu_type=`echo $machine | sed 's/-.*$//'`
273 tm_file=${cpu_type}/${cpu_type}.h
274 xm_file=${cpu_type}/xm-${cpu_type}.h
277 # Support site-specific machine types.
279 cpu_type=`echo $machine | sed -e 's/-.*//'`
280 rest=`echo $machine | sed -e "s/$cpu_type-//"`
281 xm_file=${cpu_type}/xm-$rest.h
282 tm_file=${cpu_type}/$rest.h
283 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
284 then xmake_file=${cpu_type}/x-$rest; \
287 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
288 then tmake_file=${cpu_type}/t-$rest; \
294 a29k-*-bsd* | a29k-*-sym1*)
295 tm_file="${tm_file} a29k/unix.h"
296 xm_file=a29k/xm-unix.h
297 xmake_file=a29k/x-unix
300 a29k-*-udi | a29k-*-coff)
301 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
302 tmake_file=a29k/t-a29kbare
305 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
306 tmake_file=a29k/t-vx29k
307 extra_parts="crtbegin.o crtend.o"
309 a29k-*-*) # Default a29k environment.
312 alpha*-*-linux-gnuecoff*)
313 tm_file="${tm_file} alpha/linux.h"
314 xm_file="${xm_file} alpha/xm-linux.h"
315 target_cpu_default="MASK_GAS"
318 fixincludes=Makefile.in
321 alpha*-*-linux-gnulibc1*)
322 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
323 xm_file="${xm_file} alpha/xm-linux.h"
324 target_cpu_default="MASK_GAS"
325 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
327 fixincludes=Makefile.in
329 if [[ x$enable_threads = xyes ]]; then
334 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
335 xm_file="${xm_file} alpha/xm-linux.h"
336 target_cpu_default="MASK_GAS"
337 tmake_file="t-linux alpha/t-linux"
339 fixincludes=Makefile.in
341 if [[ x$enable_threads = xyes ]]; then
346 if [[ x$stabs = xyes ]]
348 tm_file="${tm_file} dbx.h"
350 if [[ x$gas != xyes ]]
352 extra_passes="mips-tfile mips-tdump"
357 tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h"
360 tm_file="${tm_file} alpha/osf2or3.h"
363 # Some versions of OSF4 (specifically X4.0-9 296.7) have
364 # a broken tar, so we use cpio instead.
365 install_headers_dir=install-headers-cpio
369 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
370 target_cpu_default=MASK_SUPPORT_ARCH
375 tm_file="${tm_file} alpha/win-nt.h"
376 target_cpu_default=MASK_WINDOWS_NT
377 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
379 xmake_file=winnt/x-winnt
380 extra_host_objs=oldnames.o
381 extra_gcc_objs="spawnv.o oldnames.o"
382 fixincludes=fixinc.winnt
383 if [[ x$gnu_ld != xyes ]]
385 extra_programs=ld.exe
387 if [[ x$enable_threads = xyes ]]; then
393 xm_file="${xm_file} alpha/xm-vms.h"
394 tmake_file=alpha/t-vms
395 fixincludes=Makefile.in
398 extra_parts="crtinit.o crtfini.o"
400 arm-*-coff* | armel-*-coff*)
402 tmake_file=arm/t-bare
404 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
405 tm_file=arm/riscix1-1.h
408 arm-*-riscix*) # Acorn RISC machine
409 if [[ x$gas = xyes ]]
411 tm_file=arm/rix-gas.h
415 xmake_file=arm/x-riscix
416 tmake_file=arm/t-riscix
419 arm-semi-aout | armel-semi-aout)
421 tmake_file=arm/t-semi
422 fixincludes=Makefile.in # There is nothing to fix
424 arm-semi-aof | armel-semi-aof)
425 tm_file=arm/semiaof.h
426 tmake_file=arm/t-semiaof
427 fixincludes=Makefile.in # There is nothing to fix
431 xm_file=arm/xm-netbsd.h
432 tmake_file="t-netbsd arm/t-netbsd"
433 # On NetBSD, the headers are already okay, except for math.h.
434 fixincludes=fixinc.math
436 arm-*-linux-gnuaout*) # ARM GNU/Linux
438 xm_file=arm/xm-linux.h
440 tm_file=arm/linux-gas.h
441 tmake_file=arm/t-linux
442 fixincludes=Makefile.in
447 tmake_file=arm/t-bare
449 c1-convex-*) # Convex C1
452 fixincludes=Makefile.in
454 c2-convex-*) # Convex C2
457 fixincludes=Makefile.in
462 fixincludes=Makefile.in
467 fixincludes=Makefile.in
470 target_cpu_default=16
472 fixincludes=Makefile.in
474 clipper-intergraph-clix*)
475 tm_file="${tm_file} svr3.h clipper/clix.h"
476 xm_file=clipper/xm-clix.h
477 xmake_file=clipper/x-clix
478 extra_headers=va-clipper.h
479 extra_parts="crtbegin.o crtend.o"
480 install_headers_dir=install-headers-cpio
487 # This hasn't been upgraded to GCC 2.
488 # fx80-alliant-*) # Alliant FX/80
494 if [[ x$enable_haifa != xno ]]; then
497 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
498 xm_file=pa/xm-papro.h
502 if [[ x$enable_haifa != xno ]]; then
506 tm_file="${tm_file} pa/pa-osf.h"
508 fixincludes=Makefile.in
511 if [[ x$enable_haifa != xno ]]; then
514 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
515 xm_file=pa/xm-papro.h
519 if [[ x$enable_haifa != xno ]]; then
522 tm_file="${tm_file} pa/pa-osf.h"
524 fixincludes=Makefile.in
527 if [[ x$enable_haifa != xno ]]; then
532 fixincludes=Makefile.in
535 if [[ x$enable_haifa != xno ]]; then
539 fixincludes=Makefile.in
542 if [[ x$enable_haifa != xno ]]; then
545 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
546 xm_file=pa/xm-pahpux.h
547 xmake_file=pa/x-pa-hpux
548 if [[ x$gas = xyes ]]
550 tm_file="${tm_file} pa/gas.h"
552 install_headers_dir=install-headers-cpio
555 hppa1.0-*-hpux8.0[[0-2]]*)
556 if [[ x$enable_haifa != xno ]]; then
559 tm_file="${tm_file} pa/pa-hpux.h"
560 xm_file=pa/xm-pahpux.h
561 xmake_file=pa/x-pa-hpux
562 if [[ x$gas = xyes ]]
564 tm_file="${tm_file} pa/pa-gas.h"
566 tm_file="pa/pa-oldas.h ${tm_file}"
568 install_headers_dir=install-headers-cpio
571 hppa1.1-*-hpux8.0[[0-2]]*)
572 if [[ x$enable_haifa != xno ]]; then
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 tm_file="pa/pa-oldas.h ${tm_file}"
585 install_headers_dir=install-headers-cpio
589 if [[ x$enable_haifa != xno ]]; then
593 tm_file="${tm_file} pa/pa-hpux.h"
594 xm_file=pa/xm-pahpux.h
595 xmake_file=pa/x-pa-hpux
596 if [[ x$gas = xyes ]]
598 tm_file="${tm_file} pa/pa-gas.h"
600 install_headers_dir=install-headers-cpio
604 if [[ x$enable_haifa != xno ]]; then
607 tm_file="${tm_file} pa/pa-hpux.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
618 if [[ x$enable_haifa != xno ]]; then
622 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
623 xm_file=pa/xm-pahpux.h
624 xmake_file=pa/x-pa-hpux
625 if [[ x$gas = xyes ]]
627 tm_file="${tm_file} pa/pa-gas.h"
629 install_headers_dir=install-headers-cpio
633 if [[ x$enable_haifa != xno ]]; then
636 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
637 xm_file=pa/xm-pahpux.h
638 xmake_file=pa/x-pa-hpux
639 if [[ x$gas = xyes ]]
641 tm_file="${tm_file} pa/pa-gas.h"
643 install_headers_dir=install-headers-cpio
647 if [[ x$enable_haifa != xno ]]; then
651 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
652 xm_file=pa/xm-pahpux.h
653 xmake_file=pa/x-pa-hpux
654 if [[ x$gas = xyes ]]
656 tm_file="${tm_file} pa/pa-gas.h"
658 install_headers_dir=install-headers-cpio
662 if [[ x$enable_haifa != xno ]]; then
665 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
666 xm_file=pa/xm-pahpux.h
667 xmake_file=pa/x-pa-hpux
668 if [[ x$gas = xyes ]]
670 tm_file="${tm_file} pa/pa-gas.h"
672 install_headers_dir=install-headers-cpio
676 if [[ x$enable_haifa != xno ]]; then
680 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
681 xm_file=pa/xm-pahpux.h
682 xmake_file=pa/x-pa-hpux
683 if [[ x$gas = xyes ]]
685 tm_file="${tm_file} pa/pa-gas.h"
687 install_headers_dir=install-headers-cpio
691 if [[ x$enable_haifa != xno ]]; then
694 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
695 xm_file=pa/xm-pahpux.h
696 xmake_file=pa/x-pa-hpux
697 if [[ x$gas = xyes ]]
699 tm_file="${tm_file} pa/pa-gas.h"
701 install_headers_dir=install-headers-cpio
705 if [[ x$enable_haifa != xno ]]; then
710 fixincludes=Makefile.in
714 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
715 if [[ x$gas = xyes ]]
717 tm_file=i386/aix386.h
718 extra_parts="crtbegin.o crtend.o"
719 tmake_file=i386/t-crtstuff
721 tm_file=i386/aix386ng.h
724 xm_file=i386/xm-aix.h
725 xmake_file=i386/x-aix
727 i[[456]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
728 xm_file=i386/xm-sysv4.h
729 xmake_file=i386/x-ncr3000
730 if [[ x$stabs = xyes -a x$gas = xyes ]]
732 tm_file=i386/sysv4gdb.h
736 extra_parts="crtbegin.o crtend.o"
737 tmake_file=i386/t-crtpic
741 xm_file=i386/xm-next.h
742 tmake_file=i386/t-next
743 xmake_file=i386/x-next
744 extra_objs=nextstep.o
745 if [[ x$enable_threads = xyes ]]; then
749 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
751 if [[ x$gas = xyes ]]
753 tm_file=i386/seq-gas.h
755 tm_file=i386/sequent.h
758 i[[3456]]86-sequent-ptx1*)
759 xm_file=i386/xm-sysv3.h
760 xmake_file=i386/x-sysv3
761 tm_file=i386/seq-sysv3.h
762 tmake_file=i386/t-crtstuff
763 fixincludes=fixinc.ptx
764 extra_parts="crtbegin.o crtend.o"
765 install_headers_dir=install-headers-cpio
767 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
768 xm_file=i386/xm-sysv3.h
769 xmake_file=i386/x-sysv3
770 tm_file=i386/seq2-sysv3.h
771 tmake_file=i386/t-crtstuff
772 extra_parts="crtbegin.o crtend.o"
773 fixincludes=fixinc.ptx
774 install_headers_dir=install-headers-cpio
776 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
777 xm_file=i386/xm-sysv4.h
779 tm_file=i386/ptx4-i.h
781 extra_parts="crtbegin.o crtend.o"
782 fixincludes=fixinc.ptx
783 install_headers_dir=install-headers-cpio
785 i386-sun-sunos*) # Sun i386 roadrunner
786 xm_file=i386/xm-sun.h
791 tm_file=i386/i386-aout.h
792 tmake_file=i386/t-i386bare
794 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
795 tm_file=i386/bsd386.h
796 xm_file=i386/xm-bsd386.h
797 # tmake_file=t-libc-ok
800 tm_file=i386/386bsd.h
801 xm_file=i386/xm-bsd386.h
802 # tmake_file=t-libc-ok
803 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
806 i[[3456]]86-*-freebsdelf*)
807 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
808 # On FreeBSD, the headers are already ok, except for math.h.
809 fixincludes=fixinc.math
810 tmake_file=i386/t-freebsd
815 i[[3456]]86-*-freebsd*)
816 tm_file=i386/freebsd.h
817 # On FreeBSD, the headers are already ok, except for math.h.
818 fixincludes=fixinc.math
819 tmake_file=i386/t-freebsd
821 i[[3456]]86-*-netbsd*)
822 tm_file=i386/netbsd.h
823 # On NetBSD, the headers are already okay, except for math.h.
824 fixincludes=fixinc.math
828 tm_file=i386/i386-coff.h
829 tmake_file=i386/t-i386bare
831 i[[3456]]86-*-isc*) # 80386 running ISC system
832 xm_file=i386/xm-isc.h
834 i[[345]]86-*-isc[[34]]*)
835 xmake_file=i386/x-isc3
838 xmake_file=i386/x-isc
841 if [[ x$gas = xyes -a x$stabs = xyes ]]
843 tm_file=i386/iscdbx.h
844 tmake_file=i386/t-svr3dbx
845 extra_parts="svr3.ifile svr3z.ifile"
847 tm_file=i386/isccoff.h
848 tmake_file=i386/t-crtstuff
849 extra_parts="crtbegin.o crtend.o"
851 install_headers_dir=install-headers-cpio
853 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
854 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
855 xmake_file=x-linux-aout
856 tmake_file="t-linux-aout i386/t-crtstuff"
857 tm_file=i386/linux-oldld.h
858 fixincludes=Makefile.in #On Linux, the headers are ok already.
861 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
862 xm_file=i386/xm-linux.h # with a.out format
863 xmake_file=x-linux-aout
864 tmake_file="t-linux-aout i386/t-crtstuff"
865 tm_file=i386/linux-aout.h
866 fixincludes=Makefile.in #On Linux, the headers are ok already.
869 i[[3456]]86-*-linux-gnulibc1)
870 xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
871 xmake_file=x-linux # with ELF format using the
872 tm_file=i386/linux.h # GNU/Linux C library 5
873 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
874 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
875 fixincludes=Makefile.in #On Linux, the headers are ok already.
877 if [[ x$enable_threads = xyes ]]; then
881 i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
882 xm_file=i386/xm-linux.h # with ELF format using glibc 2
883 xmake_file=x-linux # aka GNU/Linux C library 6
885 tmake_file="t-linux i386/t-crtstuff"
886 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
887 fixincludes=Makefile.in #On Linux, the headers are ok already.
889 if [[ x$enable_threads = xyes ]]; then
895 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
896 xm_file=i386/xm-go32.h
898 tmake_file=i386/t-go32
900 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
903 fixincludes=Makefile.in
907 i[[3456]]86-*-lynxos*)
908 if [[ x$gas = xyes ]]
912 tm_file=i386/lynx-ng.h
914 xm_file=i386/xm-lynx.h
915 tmake_file=i386/t-i386bare
920 # tmake_file=t-libc-ok
923 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
924 if [[ x$elf = xyes ]]
926 tm_file=i386/osfelf.h
929 tm_file=i386/osfrose.h
932 xm_file=i386/xm-osf.h
933 xmake_file=i386/x-osfrose
934 tmake_file=i386/t-osf
937 i[[345]]86-go32-rtems*)
939 xm_file=i386/xm-go32.h
940 tm_file=i386/go32-rtems.h
941 tmake_file="i386/t-go32 t-rtems"
946 tmake_file="i386/t-i386bare t-rtems"
948 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
949 xm_file=i386/xm-sco5.h
950 xmake_file=i386/x-sco5
951 fixincludes=fixinc.sco
952 install_headers_dir=install-headers-cpio
954 tmake_file=i386/t-sco5
955 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
957 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
958 xm_file=i386/xm-sco.h
959 xmake_file=i386/x-sco4
960 fixincludes=fixinc.sco
961 install_headers_dir=install-headers-cpio
962 if [[ x$stabs = xyes ]]
964 tm_file=i386/sco4dbx.h
965 tmake_file=i386/t-svr3dbx
966 extra_parts="svr3.ifile svr3z.rfile"
969 tmake_file=i386/t-crtstuff
970 extra_parts="crtbegin.o crtend.o"
974 i[[3456]]86-*-sco*) # 80386 running SCO system
975 xm_file=i386/xm-sco.h
976 xmake_file=i386/x-sco
977 install_headers_dir=install-headers-cpio
978 if [[ x$stabs = xyes ]]
980 tm_file=i386/scodbx.h
981 tmake_file=i386/t-svr3dbx
982 extra_parts="svr3.ifile svr3z.rfile"
985 extra_parts="crtbegin.o crtend.o"
986 tmake_file=i386/t-crtstuff
990 i[[3456]]86-*-solaris2*)
991 xm_file=i386/xm-sysv4.h
992 if [[ x$stabs = xyes ]]
994 tm_file=i386/sol2dbg.h
998 tmake_file=i386/t-sol2
999 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
1001 fixincludes=fixinc.svr4
1003 if [[ x$enable_threads = xyes ]]; then
1004 thread_file='solaris'
1007 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
1008 xm_file=i386/xm-sysv4.h
1009 tm_file=i386/sysv4.h
1010 if [[ x$stabs = xyes ]]
1012 tm_file="${tm_file} dbx.h"
1014 tmake_file=i386/t-crtpic
1016 extra_parts="crtbegin.o crtend.o"
1018 i[[3456]]86-*-sysv*) # Intel 80386's running system V
1019 xm_file=i386/xm-sysv3.h
1020 xmake_file=i386/x-sysv3
1021 if [[ x$gas = xyes ]]
1023 if [[ x$stabs = xyes ]]
1025 tm_file=i386/svr3dbx.h
1026 tmake_file=i386/t-svr3dbx
1027 extra_parts="svr3.ifile svr3z.rfile"
1029 tm_file=i386/svr3gas.h
1030 extra_parts="crtbegin.o crtend.o"
1031 tmake_file=i386/t-crtstuff
1034 tm_file=i386/sysv3.h
1035 extra_parts="crtbegin.o crtend.o"
1036 tmake_file=i386/t-crtstuff
1039 i386-*-vsta) # Intel 80386's running VSTa kernel
1040 xm_file=i386/xm-vsta.h
1042 tmake_file=i386/t-vsta
1043 xmake_file=i386/x-vsta
1045 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1046 xm_file="${xm_file} i386/xm-cygwin32.h"
1047 tmake_file=i386/t-cygwin32
1048 tm_file=i386/cygwin32.h
1049 xmake_file=i386/x-cygwin32
1051 fixincludes=Makefile.in
1052 if [[ x$enable_threads = xyes ]]; then
1057 i[[3456]]86-*-mingw32)
1058 tm_file=i386/mingw32.h
1059 xm_file="${xm_file} i386/xm-mingw32.h"
1060 tmake_file=i386/t-cygwin32
1062 xmake_file=i386/x-cygwin32
1063 fixincludes=Makefile.in
1064 if [[ x$enable_threads = xyes ]]; then
1069 i[[3456]]86-*-winnt3*)
1070 tm_file=i386/win-nt.h
1071 out_file=i386/i386.c
1072 xm_file=i386/xm-winnt.h
1073 xmake_file=winnt/x-winnt
1074 tmake_file=i386/t-winnt
1075 extra_host_objs="winnt.o oldnames.o"
1076 extra_gcc_objs="spawnv.o oldnames.o"
1077 fixincludes=fixinc.winnt
1078 if [[ x$gnu_ld != xyes ]]
1080 extra_programs=ld.exe
1082 if [[ x$enable_threads = xyes ]]; then
1086 i[[3456]]86-dg-dgux)
1087 xm_file=i386/xm-dgux.h
1088 out_file=i386/dgux.c
1090 tmake_file=i386/t-dgux
1091 xmake_file=i386/x-dgux
1092 fixincludes=fixinc.dgux
1093 install_headers_dir=install-headers-cpio
1095 i860-alliant-*) # Alliant FX/2800
1096 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1097 xm_file="${xm_file}"
1098 xmake_file=i860/x-fx2800
1099 tmake_file=i860/t-fx2800
1100 extra_parts="crtbegin.o crtend.o"
1103 tm_file="${tm_file} i860/bsd.h"
1104 if [[ x$gas = xyes ]]
1106 tm_file="${tm_file} i860/bsd-gas.h"
1111 tm_file="${tm_file} i860/mach.h"
1112 tmake_file=t-libc-ok
1114 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1115 tm_file="${tm_file} svr3.h i860/paragon.h"
1116 xm_file="${xm_file} xm-svr3.h"
1120 tm_file="${tm_file} svr3.h i860/sysv3.h"
1121 xm_file="${tm_file} xm-svr3.h"
1122 xmake_file=i860/x-sysv3
1123 extra_parts="crtbegin.o crtend.o"
1126 tm_file="${tm_file} svr4.h i860/sysv4.h"
1127 xm_file="${xm_file} xm-svr3.h"
1128 xmake_file=i860/x-sysv4
1130 extra_parts="crtbegin.o crtend.o"
1132 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1133 tm_file="${tm_file} i960/vx960.h"
1134 tmake_file=i960/t-vxworks960
1138 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1139 tmake_file=i960/t-vxworks960
1143 tm_file="${tm_file} i960/vx960.h"
1144 tmake_file=i960/t-vxworks960
1148 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1149 tmake_file=i960/t-960bare
1153 tmake_file="i960/t-960bare t-rtems"
1154 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1157 i960-*-*) # Default i960 environment.
1161 extra_parts="crtinit.o crtfini.o"
1163 m68000-convergent-sysv*)
1165 xm_file=m68k/xm-3b1.h
1167 extra_headers=math-68881.h
1169 m68000-hp-bsd*) # HP 9000/200 running BSD
1170 tm_file=m68k/hp2bsd.h
1171 xmake_file=m68k/x-hp2bsd
1173 extra_headers=math-68881.h
1175 m68000-hp-hpux*) # HP 9000 series 300
1176 xm_file=m68k/xm-hp320.h
1177 if [[ x$gas = xyes ]]
1179 xmake_file=m68k/x-hp320g
1180 tm_file=m68k/hp310g.h
1182 xmake_file=m68k/x-hp320
1183 tm_file=m68k/hp310.h
1185 install_headers_dir=install-headers-cpio
1187 extra_headers=math-68881.h
1192 extra_headers=math-68881.h
1195 tm_file=m68k/sun2o4.h
1197 extra_headers=math-68881.h
1200 xm_file=m68k/xm-3b1.h
1201 if [[ x$gas = xyes ]]
1208 extra_headers=math-68881.h
1210 m68k-apple-aux*) # Apple Macintosh running A/UX
1211 xm_file=m68k/xm-aux.h
1212 tmake_file=m68k/t-aux
1213 install_headers_dir=install-headers-cpio
1214 extra_headers=math-68881.h
1215 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1217 if [[ "$gnu_ld" = yes ]]
1219 tm_file="${tm_file} m68k/auxgld.h"
1221 tm_file="${tm_file} m68k/auxld.h"
1223 if [[ "$gas" = yes ]]
1225 tm_file="${tm_file} m68k/auxgas.h"
1227 tm_file="${tm_file} m68k/auxas.h"
1229 tm_file="${tm_file} m68k/a-ux.h"
1232 tm_file=m68k/apollo68.h
1233 xmake_file=m68k/x-apollo68
1235 extra_headers=math-68881.h
1237 m68k-altos-sysv*) # Altos 3068
1238 if [[ x$gas = xyes ]]
1240 tm_file=m68k/altos3068.h
1241 xm_file=m68k/xm-altos3068.h
1243 echo "The Altos is supported only with the GNU assembler" 1>&2
1246 extra_headers=math-68881.h
1248 m68k-bull-sysv*) # Bull DPX/2
1249 if [[ x$gas = xyes ]]
1251 if [[ x$stabs = xyes ]]
1253 tm_file=m68k/dpx2cdbx.h
1255 tm_file=m68k/dpx2g.h
1260 xm_file=m68k/xm-m68kv.h
1261 xmake_file=m68k/x-dpx2
1263 extra_headers=math-68881.h
1265 m68k-atari-sysv4*) # Atari variant of V.4.
1266 tm_file=m68k/atari.h
1267 xm_file=m68k/xm-atari.h
1269 extra_parts="crtbegin.o crtend.o"
1270 extra_headers=math-68881.h
1272 m68k-motorola-sysv*)
1273 tm_file=m68k/mot3300.h
1274 xm_file=m68k/xm-mot3300.h
1275 if [[ x$gas = xyes ]]
1277 xmake_file=m68k/x-mot3300-gas
1278 if [[ x$gnu_ld = xyes ]]
1280 tmake_file=m68k/t-mot3300-gald
1282 tmake_file=m68k/t-mot3300-gas
1286 xmake_file=m68k/x-mot3300
1287 if [[ x$gnu_ld = xyes ]]
1289 tmake_file=m68k/t-mot3300-gld
1291 tmake_file=m68k/t-mot3300
1295 gdb_needs_out_file_path=yes
1296 extra_parts="crt0.o mcrt0.o"
1297 extra_headers=math-68881.h
1299 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1300 tm_file=m68k/tower-as.h
1301 xm_file="${xm_file} xm-svr3.h"
1302 xmake_file=m68k/x-tower
1303 extra_parts="crtbegin.o crtend.o"
1304 extra_headers=math-68881.h
1307 tm_file=m68k/plexus.h
1308 xm_file=m68k/xm-plexus.h
1310 extra_headers=math-68881.h
1314 xm_file=m68k/xm-m68kv.h
1315 extra_headers=math-68881.h
1318 xm_file=m68k/xm-crds.h
1319 xmake_file=m68k/x-crds
1322 extra_headers=math-68881.h
1324 m68k-cbm-sysv4*) # Commodore variant of V.4.
1326 xm_file=m68k/xm-amix.h
1327 xmake_file=m68k/x-amix
1329 extra_parts="crtbegin.o crtend.o"
1330 extra_headers=math-68881.h
1333 tm_file=m68k/ccur-GAS.h
1334 xmake_file=m68k/x-ccur
1335 extra_headers=math-68881.h
1338 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1339 tm_file=m68k/hp3bsd44.h
1340 xmake_file=m68k/x-hp3bsd44
1342 extra_headers=math-68881.h
1344 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1345 tm_file=m68k/hp3bsd.h
1347 extra_headers=math-68881.h
1350 if [[ x$with_fp = xno ]]
1352 tm_file=m68k/isi-nfp.h
1357 extra_headers=math-68881.h
1359 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1360 xm_file=m68k/xm-hp320.h
1361 if [[ x$gas = xyes ]]
1363 xmake_file=m68k/x-hp320g
1364 tm_file=m68k/hp320g.h
1366 xmake_file=m68k/x-hp320
1367 tm_file=m68k/hpux7.h
1369 install_headers_dir=install-headers-cpio
1371 extra_headers=math-68881.h
1373 m68k-hp-hpux*) # HP 9000 series 300
1374 xm_file=m68k/xm-hp320.h
1375 if [[ x$gas = xyes ]]
1377 xmake_file=m68k/x-hp320g
1378 tm_file=m68k/hp320g.h
1380 xmake_file=m68k/x-hp320
1381 tm_file=m68k/hp320.h
1383 install_headers_dir=install-headers-cpio
1385 extra_headers=math-68881.h
1388 tm_file=m68k/sun3mach.h
1390 extra_headers=math-68881.h
1393 if [[ x$gas = xyes ]]
1395 tm_file=m68k/news3gas.h
1397 tm_file=m68k/news3.h
1400 extra_headers=math-68881.h
1402 m68k-sony-bsd* | m68k-sony-newsos*)
1403 if [[ x$gas = xyes ]]
1405 tm_file=m68k/newsgas.h
1410 extra_headers=math-68881.h
1412 m68k-next-nextstep2*)
1413 tm_file=m68k/next21.h
1414 xm_file=m68k/xm-next.h
1415 tmake_file=m68k/t-next
1416 xmake_file=m68k/x-next
1417 extra_objs=nextstep.o
1418 extra_headers=math-68881.h
1421 m68k-next-nextstep3*)
1423 xm_file=m68k/xm-next.h
1424 tmake_file=m68k/t-next
1425 xmake_file=m68k/x-next
1426 extra_objs=nextstep.o
1427 extra_headers=math-68881.h
1428 if [[ x$enable_threads = xyes ]]; then
1433 if [[ x$with_fp = xno ]]
1435 tm_file=m68k/sun3n3.h
1437 tm_file=m68k/sun3o3.h
1440 extra_headers=math-68881.h
1442 m68k-sun-sunos*) # For SunOS 4 (the default).
1443 if [[ x$with_fp = xno ]]
1445 tm_file=m68k/sun3n.h
1450 extra_headers=math-68881.h
1453 tm_file=m68k/vxm68k.h
1454 tmake_file=m68k/t-vxworks68
1455 extra_headers=math-68881.h
1458 tmake_file=m68k/t-m68kbare
1459 tm_file="m68k/m68k-aout.h libgloss.h"
1460 extra_headers=math-68881.h
1463 tmake_file=m68k/t-m68kbare
1464 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1465 extra_headers=math-68881.h
1468 if [[ x$gas = xyes ]]
1472 tm_file=m68k/lynx-ng.h
1474 xm_file=m68k/xm-lynx.h
1476 tmake_file=m68k/t-lynx
1477 extra_headers=math-68881.h
1480 tm_file=m68k/netbsd.h
1481 # On NetBSD, the headers are already okay, except for math.h.
1482 fixincludes=fixinc.math
1485 m68k-*-sysv3*) # Motorola m68k's running system V.3
1486 xm_file=m68k/xm-m68kv.h
1487 xmake_file=m68k/x-m68kv
1488 extra_parts="crtbegin.o crtend.o"
1489 extra_headers=math-68881.h
1491 m68k-*-sysv4*) # Motorola m68k's running system V.4
1492 tm_file=m68k/m68kv4.h
1493 xm_file=m68k/xm-m68kv.h
1495 extra_parts="crtbegin.o crtend.o"
1496 extra_headers=math-68881.h
1498 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1499 xm_file=m68k/xm-linux.h # with a.out format
1501 tm_file=m68k/linux-aout.h
1502 tmake_file="t-linux-aout m68k/t-linux-aout"
1503 fixincludes=Makefile.in # The headers are ok already.
1504 extra_headers=math-68881.h
1507 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1508 xm_file=m68k/xm-linux.h # with ELF format using the
1509 xmake_file=x-linux # GNU/Linux C library 5
1510 tm_file=m68k/linux.h
1511 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1512 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1513 fixincludes=Makefile.in # The headers are ok already.
1514 extra_headers=math-68881.h
1517 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1518 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1519 xmake_file=x-linux # aka the GNU/Linux C library 6.
1520 tm_file=m68k/linux.h
1521 tmake_file="t-linux m68k/t-linux"
1522 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1523 fixincludes=Makefile.in # The headers are ok already.
1524 extra_headers=math-68881.h
1526 if [[ x$enable_threads = xyes ]]; then
1531 tmake_file=m68k/t-m68kbare
1532 tm_file=m68k/m68k-psos.h
1533 extra_headers=math-68881.h
1536 tmake_file="m68k/t-m68kbare t-rtems"
1537 tm_file=m68k/rtems.h
1538 extra_headers=math-68881.h
1544 tm_file=m88k/dguxbcs.h
1545 tmake_file=m88k/t-dguxbcs
1549 tmake_file=m88k/t-dgux
1552 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1553 xmake_file=m88k/x-dgux
1554 if [[ x$gas = xyes ]]
1556 tmake_file=m88k/t-dgux-gas
1558 fixincludes=fixinc.dgux
1560 m88k-dolphin-sysv3*)
1561 tm_file=m88k/dolph.h
1562 extra_parts="crtbegin.o crtend.o"
1563 xm_file=m88k/xm-sysv3.h
1564 xmake_file=m88k/x-dolph
1565 if [[ x$gas = xyes ]]
1567 tmake_file=m88k/t-m88k-gas
1570 m88k-tektronix-sysv3)
1571 tm_file=m88k/tekXD88.h
1572 extra_parts="crtbegin.o crtend.o"
1573 xm_file=m88k/xm-sysv3.h
1574 xmake_file=m88k/x-tekXD88
1575 if [[ x$gas = xyes ]]
1577 tmake_file=m88k/t-m88k-gas
1581 tm_file=m88k/m88k-aout.h
1584 tm_file=m88k/m88k-coff.h
1585 tmake_file=m88k/t-bug
1589 extra_parts="crtbegin.o crtend.o"
1590 if [[ x$gas = xyes ]]
1592 tmake_file=m88k/t-luna-gas
1594 tmake_file=m88k/t-luna
1598 tm_file=m88k/sysv3.h
1599 extra_parts="crtbegin.o crtend.o"
1600 xm_file=m88k/xm-sysv3.h
1601 xmake_file=m88k/x-sysv3
1602 if [[ x$gas = xyes ]]
1604 tmake_file=m88k/t-m88k-gas
1608 tm_file=m88k/sysv4.h
1609 extra_parts="crtbegin.o crtend.o"
1610 xmake_file=m88k/x-sysv4
1611 tmake_file=m88k/t-sysv4
1613 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1614 tm_file=mips/iris6.h
1615 xm_file=mips/xm-iris6.h
1616 fixincludes=fixinc.irix
1617 xmake_file=mips/x-iris6
1618 tmake_file=mips/t-iris6
1619 if [[ x$enable_threads = xyes ]]; then
1623 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1624 tm_file=mips/cross64.h
1625 xm_file=mips/xm-iris5.h
1626 fixincludes=Makefile.in
1627 xmake_file=mips/x-iris
1628 tmake_file=mips/t-cross64
1629 # See comment in mips/iris[56].h files.
1631 if [[ x$enable_threads = xyes ]]; then
1636 if [[ x$gas = xyes ]]
1638 if [[ x$stabs = xyes ]]
1640 tm_file=mips/iris5gdb.h
1642 tm_file=mips/sni-gas.h
1645 tm_file=mips/sni-svr4.h
1647 xm_file=mips/xm-sysv.h
1648 xmake_file=mips/x-sni-svr4
1649 tmake_file=mips/t-mips-gas
1650 if [[ x$gnu_ld != xyes ]]
1655 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1656 if [[ x$gas = xyes ]]
1658 tm_file=mips/iris5gas.h
1659 if [[ x$stabs = xyes ]]
1661 tm_file="${tm_file} dbx.h"
1664 tm_file=mips/iris5.h
1666 xm_file=mips/xm-iris5.h
1667 fixincludes=fixinc.irix
1668 xmake_file=mips/x-iris
1669 # mips-tfile doesn't work yet
1670 tmake_file=mips/t-mips-gas
1671 # See comment in mips/iris5.h file.
1673 if [[ x$enable_threads = xyes ]]; then
1677 mips-sgi-irix4loser*) # Mostly like a MIPS.
1678 tm_file=mips/iris4loser.h
1679 if [[ x$stabs = xyes ]]; then
1680 tm_file="${tm_file} dbx.h"
1682 xm_file=mips/xm-iris4.h
1683 xmake_file=mips/x-iris
1684 if [[ x$gas = xyes ]]
1686 tmake_file=mips/t-mips-gas
1688 extra_passes="mips-tfile mips-tdump"
1690 if [[ x$gnu_ld != xyes ]]
1694 if [[ x$enable_threads = xyes ]]; then
1698 mips-sgi-irix4*) # Mostly like a MIPS.
1699 tm_file=mips/iris4.h
1700 if [[ x$stabs = xyes ]]; then
1701 tm_file="${tm_file} dbx.h"
1703 xm_file=mips/xm-iris4.h
1704 xmake_file=mips/x-iris
1705 if [[ x$gas = xyes ]]
1707 tmake_file=mips/t-mips-gas
1709 extra_passes="mips-tfile mips-tdump"
1711 if [[ x$gnu_ld != xyes ]]
1715 if [[ x$enable_threads = xyes ]]; then
1719 mips-sgi-*) # Mostly like a MIPS.
1720 tm_file=mips/iris3.h
1721 if [[ x$stabs = xyes ]]; then
1722 tm_file="${tm_file} dbx.h"
1724 xm_file=mips/xm-iris3.h
1725 xmake_file=mips/x-iris3
1726 if [[ x$gas = xyes ]]
1728 tmake_file=mips/t-mips-gas
1730 extra_passes="mips-tfile mips-tdump"
1732 if [[ x$gnu_ld != xyes ]]
1737 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1738 tm_file=mips/osfrose.h
1739 xmake_file=mips/x-osfrose
1740 tmake_file=mips/t-osfrose
1741 extra_objs=halfpic.o
1744 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1745 tm_file=mips/dec-osf1.h
1746 if [[ x$stabs = xyes ]]; then
1747 tm_file="${tm_file} dbx.h"
1749 xmake_file=mips/x-dec-osf1
1750 if [[ x$gas = xyes ]]
1752 tmake_file=mips/t-mips-gas
1754 tmake_file=mips/t-ultrix
1755 extra_passes="mips-tfile mips-tdump"
1757 if [[ x$gnu_ld != xyes ]]
1762 mips-dec-bsd*) # Decstation running 4.4 BSD
1763 tm_file=mips/dec-bsd.h
1765 if [[ x$gas = xyes ]]
1767 tmake_file=mips/t-mips-gas
1769 tmake_file=mips/t-ultrix
1770 extra_passes="mips-tfile mips-tdump"
1772 if [[ x$gnu_ld != xyes ]]
1777 mips-dec-netbsd*) # Decstation running NetBSD
1778 tm_file=mips/netbsd.h
1779 # On NetBSD, the headers are already okay, except for math.h.
1780 fixincludes=fixinc.math
1783 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1784 tm_file=mips/news4.h
1785 if [[ x$stabs = xyes ]]; then
1786 tm_file="${tm_file} dbx.h"
1788 if [[ x$gas = xyes ]]
1790 tmake_file=mips/t-mips-gas
1792 extra_passes="mips-tfile mips-tdump"
1794 if [[ x$gnu_ld != xyes ]]
1798 xmake_file=mips/x-sony
1800 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1801 # That is based on svr4.
1802 # t-svr4 is not right because this system doesn't use ELF.
1803 tm_file=mips/news5.h
1804 if [[ x$stabs = xyes ]]; then
1805 tm_file="${tm_file} dbx.h"
1807 xm_file=mips/xm-news.h
1808 if [[ x$gas = xyes ]]
1810 tmake_file=mips/t-mips-gas
1812 extra_passes="mips-tfile mips-tdump"
1814 if [[ x$gnu_ld != xyes ]]
1819 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1820 tm_file=mips/svr4-t.h
1821 if [[ x$stabs = xyes ]]; then
1822 tm_file="${tm_file} dbx.h"
1824 xm_file=mips/xm-sysv4.h
1825 xmake_file=mips/x-sysv
1826 if [[ x$gas = xyes ]]
1828 tmake_file=mips/t-mips-gas
1829 extra_parts="crtbegin.o crtend.o"
1831 tmake_file=mips/t-mips
1832 extra_passes="mips-tfile mips-tdump"
1834 if [[ x$gnu_ld != xyes ]]
1839 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1840 tm_file=mips/ultrix.h
1841 if [[ x$stabs = xyes ]]; then
1842 tm_file="${tm_file} dbx.h"
1844 xmake_file=mips/x-ultrix
1845 if [[ x$gas = xyes ]]
1847 tmake_file=mips/t-mips-gas
1849 tmake_file=mips/t-ultrix
1850 extra_passes="mips-tfile mips-tdump"
1852 if [[ x$gnu_ld != xyes ]]
1857 mips-*-riscos[[56789]]bsd*)
1858 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1859 if [[ x$stabs = xyes ]]; then
1860 tm_file="${tm_file} dbx.h"
1862 if [[ x$gas = xyes ]]
1864 tmake_file=mips/t-bsd-gas
1866 tmake_file=mips/t-bsd
1867 extra_passes="mips-tfile mips-tdump"
1869 if [[ x$gnu_ld != xyes ]]
1874 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1875 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1876 if [[ x$stabs = xyes ]]; then
1877 tm_file="${tm_file} dbx.h"
1879 if [[ x$gas = xyes ]]
1881 tmake_file=mips/t-bsd-gas
1883 tmake_file=mips/t-bsd
1884 extra_passes="mips-tfile mips-tdump"
1886 if [[ x$gnu_ld != xyes ]]
1891 mips-*-riscos[[56789]]sysv4*)
1892 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1893 if [[ x$stabs = xyes ]]; then
1894 tm_file="${tm_file} dbx.h"
1896 xm_file=mips/xm-sysv4.h
1897 xmake_file=mips/x-sysv
1898 if [[ x$gas = xyes ]]
1900 tmake_file=mips/t-svr4-gas
1902 tmake_file=mips/t-svr4
1903 extra_passes="mips-tfile mips-tdump"
1905 if [[ x$gnu_ld != xyes ]]
1910 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1911 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1912 if [[ x$stabs = xyes ]]; then
1913 tm_file="${tm_file} dbx.h"
1915 xm_file=mips/xm-sysv.h
1916 xmake_file=mips/x-sysv
1917 if [[ x$gas = xyes ]]
1919 tmake_file=mips/t-svr4-gas
1921 tmake_file=mips/t-svr4
1922 extra_passes="mips-tfile mips-tdump"
1924 if [[ x$gnu_ld != xyes ]]
1929 mips-*-riscos[[56789]]sysv*)
1930 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1931 if [[ x$stabs = xyes ]]; then
1932 tm_file="${tm_file} dbx.h"
1934 xm_file=mips/xm-sysv.h
1935 xmake_file=mips/x-sysv
1936 if [[ x$gas = xyes ]]
1938 tmake_file=mips/t-svr3-gas
1940 tmake_file=mips/t-svr3
1941 extra_passes="mips-tfile mips-tdump"
1943 if [[ x$gnu_ld != xyes ]]
1948 mips-*-sysv* | mips-*-riscos*sysv*)
1949 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1950 if [[ x$stabs = xyes ]]; then
1951 tm_file="${tm_file} dbx.h"
1953 xm_file=mips/xm-sysv.h
1954 xmake_file=mips/x-sysv
1955 if [[ x$gas = xyes ]]
1957 tmake_file=mips/t-svr3-gas
1959 tmake_file=mips/t-svr3
1960 extra_passes="mips-tfile mips-tdump"
1962 if [[ x$gnu_ld != xyes ]]
1967 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1968 tm_file=mips/mips-5.h
1969 if [[ x$stabs = xyes ]]; then
1970 tm_file="${tm_file} dbx.h"
1972 if [[ x$gas = xyes ]]
1974 tmake_file=mips/t-mips-gas
1976 extra_passes="mips-tfile mips-tdump"
1978 if [[ x$gnu_ld != xyes ]]
1986 tm_file=mips/ecoffl.h
1987 if [[ x$stabs = xyes ]]; then
1988 tm_file="${tm_file} dbx.h"
1990 tmake_file=mips/t-ecoff
1993 tm_file=mips/ecoff.h
1994 if [[ x$stabs = xyes ]]; then
1995 tm_file="${tm_file} dbx.h"
1997 tmake_file=mips/t-ecoff
2000 tm_file="mips/elfl.h libgloss.h"
2001 tmake_file=mips/t-ecoff
2004 tm_file="mips/elf.h libgloss.h"
2005 tmake_file=mips/t-ecoff
2008 tm_file="mips/elfl64.h libgloss.h"
2009 tmake_file=mips/t-ecoff
2011 mips64orionel-*-elf*)
2012 tm_file="mips/elflorion.h libgloss.h"
2013 tmake_file=mips/t-ecoff
2016 tm_file="mips/elf64.h libgloss.h"
2017 tmake_file=mips/t-ecoff
2020 tm_file="mips/elforion.h libgloss.h"
2021 tmake_file=mips/t-ecoff
2023 mips64orion-*-rtems*)
2024 tm_file=mips/rtems64.h
2025 tmake_file="mips/t-ecoff t-rtems"
2028 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2029 tmake_file=mips/t-ecoff
2032 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2033 tmake_file=mips/t-ecoff
2035 mips-*-*) # Default MIPS RISC-OS 4.0.
2036 if [[ x$stabs = xyes ]]; then
2037 tm_file="${tm_file} dbx.h"
2039 if [[ x$gas = xyes ]]
2041 tmake_file=mips/t-mips-gas
2043 extra_passes="mips-tfile mips-tdump"
2045 if [[ x$gnu_ld != xyes ]]
2052 tm_file="mn10200/mn10200.h"
2053 if [[ x$stabs = xyes ]]
2055 tm_file="${tm_file} dbx.h"
2061 tm_file="mn10300/mn10300.h"
2062 if [[ x$stabs = xyes ]]
2064 tm_file="${tm_file} dbx.h"
2069 tm_file=ns32k/encore.h
2073 tm_file=ns32k/sequent.h
2077 tm_file=ns32k/tek6100.h
2081 tm_file=ns32k/tek6200.h
2084 # This has not been updated to GCC 2.
2086 # xm_file=ns32k/xm-genix.h
2087 # xmake_file=ns32k/x-genix
2088 # tm_file=ns32k/genix.h
2092 tm_file=ns32k/merlin.h
2096 tm_file=ns32k/pc532-mach.h
2100 tm_file=ns32k/pc532-min.h
2101 xm_file=ns32k/xm-pc532-min.h
2104 ns32k-pc532-netbsd*)
2105 tm_file=ns32k/netbsd.h
2106 # On NetBSD, the headers are already okay, except for math.h.
2107 fixincludes=fixinc.math
2111 tm_file="${tm_file} pdp11/2bsd.h"
2117 xmake_file=pyr/x-pyr
2124 xmake_file=romp/x-mach
2127 powerpc-*-sysv* | powerpc-*-elf*)
2128 tm_file=rs6000/sysv4.h
2129 xm_file=rs6000/xm-sysv4.h
2130 extra_headers=ppc-asm.h
2131 if [[ x$gas = xyes ]]
2133 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2135 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2137 xmake_file=rs6000/x-sysv4
2140 tm_file=rs6000/eabiaix.h
2141 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2142 fixincludes=Makefile.in
2143 extra_headers=ppc-asm.h
2146 tm_file=rs6000/eabisim.h
2147 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2148 fixincludes=Makefile.in
2149 extra_headers=ppc-asm.h
2152 tm_file=rs6000/eabi.h
2153 if [[ x$gas = xyes ]]
2155 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2157 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2159 fixincludes=Makefile.in
2160 extra_headers=ppc-asm.h
2163 tm_file=rs6000/rtems.h
2164 if [[ x$gas = xyes ]]
2166 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2168 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2170 fixincludes=Makefile.in
2171 extra_headers=ppc-asm.h
2173 powerpc-*-linux-gnu*)
2174 tm_file=rs6000/linux.h
2175 xm_file=rs6000/xm-sysv4.h
2176 out_file=rs6000/rs6000.c
2177 if [[ x$gas = xyes ]]
2179 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2181 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2184 fixincludes=Makefile.in
2185 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2186 extra_headers=ppc-asm.h
2187 if [[ x$enable_threads = xyes ]]; then
2193 xm_file=rs6000/xm-sysv4.h
2194 tm_file=rs6000/vxppc.h
2195 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2196 extra_headers=ppc-asm.h
2198 powerpcle-*-sysv* | powerpcle-*-elf*)
2199 tm_file=rs6000/sysv4le.h
2200 xm_file=rs6000/xm-sysv4.h
2201 if [[ x$gas = xyes ]]
2203 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2205 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2207 xmake_file=rs6000/x-sysv4
2208 extra_headers=ppc-asm.h
2210 powerpcle-*-eabisim*)
2211 tm_file=rs6000/eabilesim.h
2212 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2213 fixincludes=Makefile.in
2214 extra_headers=ppc-asm.h
2217 tm_file=rs6000/eabile.h
2218 if [[ x$gas = xyes ]]
2220 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2222 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2224 fixincludes=Makefile.in
2225 extra_headers=ppc-asm.h
2227 powerpcle-*-winnt* )
2228 tm_file=rs6000/win-nt.h
2229 tmake_file=rs6000/t-winnt
2231 fixincludes=Makefile.in
2232 if [[ x$enable_threads = xyes ]]; then
2235 extra_headers=ppc-asm.h
2237 powerpcle-*-pe | powerpcle-*-cygwin32)
2238 tm_file=rs6000/cygwin32.h
2239 xm_file=rs6000/xm-cygwin32.h
2240 tmake_file=rs6000/t-winnt
2241 xmake_file=rs6000/x-cygwin32
2243 fixincludes=Makefile.in
2244 if [[ x$enable_threads = xyes ]]; then
2248 extra_headers=ppc-asm.h
2250 powerpcle-*-solaris2*)
2251 tm_file=rs6000/sol2.h
2252 xm_file=rs6000/xm-sysv4.h
2253 if [[ x$gas = xyes ]]
2255 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2257 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2259 xmake_file=rs6000/x-sysv4
2260 fixincludes=fixinc.math
2261 extra_headers=ppc-asm.h
2263 rs6000-ibm-aix3.[[01]]*)
2264 tm_file=rs6000/aix31.h
2265 xmake_file=rs6000/x-aix31
2268 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2269 tm_file=rs6000/aix3newas.h
2270 if [[ x$host != x$target ]]
2272 tmake_file=rs6000/t-xnewas
2274 tmake_file=rs6000/t-newas
2278 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2279 tm_file=rs6000/aix41.h
2280 if [[ x$host != x$target ]]
2282 tmake_file=rs6000/t-xnewas
2284 tmake_file=rs6000/t-newas
2286 xmake_file=rs6000/x-aix31
2296 tm_file=rs6000/mach.h
2297 xm_file=rs6000/xm-mach.h
2298 xmake_file=rs6000/x-mach
2302 tm_file=rs6000/lynx.h
2303 xm_file=rs6000/xm-lynx.h
2304 tmake_file=rs6000/t-rs6000
2305 xmake_file=rs6000/x-lynx
2313 tmake_file="sh/t-sh t-rtems"
2322 xm_file=sparc/xm-pbd.h
2324 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2325 tm_file=sparc/vxsparc.h
2326 tmake_file=sparc/t-vxsparc
2330 tmake_file=sparc/t-sparcbare
2331 tm_file="sparc/aout.h libgloss.h"
2334 tm_file=sparc/netbsd.h
2335 # On NetBSD, the headers are already okay, except for math.h.
2336 fixincludes=fixinc.math
2344 tmake_file=sparc/t-elf
2345 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2349 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2350 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2351 tm_file=sparc/linux-aout.h
2353 fixincludes=Makefile.in #On Linux, the headers are ok already.
2356 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2357 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2359 tm_file=sparc/linux.h
2360 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2361 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2362 fixincludes=Makefile.in #On Linux, the headers are ok already.
2365 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2366 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2368 tm_file=sparc/linux.h
2369 tmake_file="t-linux sparc/t-linux"
2370 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2371 fixincludes=Makefile.in #On Linux, the headers are ok already.
2373 if [[ x$enable_threads = xyes ]]; then
2378 if [[ x$gas = xyes ]]
2380 tm_file=sparc/lynx.h
2382 tm_file=sparc/lynx-ng.h
2384 xm_file=sparc/xm-lynx.h
2385 tmake_file=sparc/t-sunos41
2389 tmake_file="sparc/t-sparcbare t-rtems"
2390 tm_file=sparc/rtems.h
2393 tm_file=sparc/sol2.h
2394 xm_file=sparc/xm-sol2.h
2395 tmake_file=sparc/t-sol2
2396 xmake_file=sparc/x-sysv4
2397 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2398 fixincludes=fixinc.svr4
2401 if [[ x$enable_threads = xyes ]]; then
2402 thread_file='solaris'
2406 tm_file=sparc/sunos4.h
2407 tmake_file=sparc/t-sunos40
2411 tm_file=sparc/sunos4.h
2412 tmake_file=sparc/t-sunos41
2414 if [[ x$gas = xyes ]]; then
2415 tm_file="${tm_file} sparc/sun4gas.h"
2419 tm_file=sparc/sun4o3.h
2423 tm_file=sparc/sysv4.h
2424 xm_file=sparc/xm-sysv4.h
2426 xmake_file=sparc/x-sysv4
2427 extra_parts="crtbegin.o crtend.o"
2430 xm_file=sparc/xm-sol2.h
2431 tm_file=sparc/vxsim.h
2432 tmake_file=sparc/t-vxsparc
2433 xmake_file=sparc/x-sysv4
2436 tm_file="sparc/splet.h libgloss.h"
2437 tmake_file=sparc/t-splet
2440 tm_file="sparc/litecoff.h libgloss.h"
2441 tmake_file=sparc/t-sparclite
2444 tm_file="sparc/lite.h aoutos.h libgloss.h"
2445 tmake_file=sparc/t-sparclite
2448 tmake_file=sparc/t-sp64
2449 tm_file=sparc/sp64-aout.h
2452 tmake_file=sparc/t-sp64
2453 tm_file=sparc/sp64-elf.h
2454 extra_parts="crtbegin.o crtend.o"
2456 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2457 tmake_file=sparc/t-sp64
2458 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2459 tm_file=sparc/linux64.h
2461 fixincludes=Makefile.in # The headers are ok already.
2464 # This hasn't been upgraded to GCC 2.
2465 # tahoe-harris-*) # Harris tahoe, using COFF.
2466 # tm_file=tahoe/harris.h
2468 # tahoe-*-bsd*) # tahoe running BSD
2470 # This hasn't been upgraded to GCC 2.
2477 tm_file="v850/v850.h"
2478 xm_file="v850/xm-v850.h"
2479 if [[ x$stabs = xyes ]]
2481 tm_file="${tm_file} dbx.h"
2485 vax-*-bsd*) # vaxen running BSD
2489 vax-*-sysv*) # vaxen running system V
2490 tm_file="${tm_file} vax/vaxv.h"
2491 xm_file="${xm_file} vax/xm-vaxv.h"
2495 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2496 # On NetBSD, the headers are already okay, except for math.h.
2497 fixincludes=fixinc.math
2501 vax-*-ultrix*) # vaxen running ultrix
2502 tm_file="${tm_file} vax/ultrix.h"
2506 vax-*-vms*) # vaxen running VMS
2507 xm_file=vax/xm-vms.h
2511 vax-*-*) # vax default entry
2515 xm_file="${xm_file} xm-svr3"
2519 echo "Configuration $machine not supported" 1>&2
2526 ;; # Existing Linux/GNU systems do not use the GNU setup.
2528 # On the GNU system, the setup is just about the same on
2529 # each different CPU. The specific machines that GNU
2530 # supports are matched above and just set $cpu_type.
2531 xm_file=${cpu_type}/xm-gnu.h
2532 tm_file=${cpu_type}/gnu.h
2533 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2534 # GNU always uses ELF.
2536 # GNU tools are the only tools.
2539 # On GNU, the headers are already okay.
2540 fixincludes=Makefile.in
2541 xmake_file=x-linux # These details are the same as Linux.
2542 tmake_file=t-gnu # These are not.
2545 fixincludes=fixinc.svr4
2546 xmake_try_sysv=x-sysv
2547 install_headers_dir=install-headers-cpio
2550 install_headers_dir=install-headers-cpio
2554 # Distinguish i[3456]86
2555 # Also, do not run mips-tfile on MIPS if using gas.
2556 # Process --with-cpu= for PowerPC/rs6000
2557 target_cpu_default2=
2560 target_cpu_default2=1
2563 target_cpu_default2=2
2566 target_cpu_default2=3
2571 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2574 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
2577 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2580 target_cpu_default2="MASK_CPU_EV5"
2584 if [[ x$gas = xyes ]]
2586 if [[ x$target_cpu_default2 = x ]]
2588 target_cpu_default2="MASK_GAS"
2590 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2595 case "x$with_cpu" in
2598 target_cpu_default2="TARGET_CPU_generic"
2601 # Distinguish cores, and major variants
2602 # arm7m doesn't exist, but D & I don't affect code
2603 xarm[23678] | xarm250 | xarm[67][01]0 \
2604 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2605 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2606 | xstrongarm | xstrongarm110)
2607 target_cpu_default2="TARGET_CPU_$with_cpu"
2611 echo "--with-cpu must be passed a value" 1>&2
2616 if [[ x$pass2done = xyes ]]
2618 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2625 mips*-*-ecoff* | mips*-*-elf*)
2626 if [[ x$gas = xyes ]]
2628 if [[ x$gnu_ld = xyes ]]
2630 target_cpu_default2=20
2632 target_cpu_default2=16
2637 if [[ x$gas = xyes ]]
2639 target_cpu_default2=16
2642 powerpc*-*-* | rs6000-*-*)
2643 case "x$with_cpu" in
2647 xcommon | xpower | xpower2 | xpowerpc | xrios \
2648 | xrios1 | xrios2 | xrsc | xrsc1 \
2649 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2650 | x403 | x505 | x801 | x821 | x823 | x860)
2651 target_cpu_default2="\"$with_cpu\""
2655 echo "--with-cpu must be passed a value" 1>&2
2660 if [[ x$pass2done = xyes ]]
2662 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2669 case ".$with_cpu" in
2671 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2673 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2674 target_cpu_default2="TARGET_CPU_$with_cpu"
2677 if [[ x$pass2done = xyes ]]
2679 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2687 if [[ x$target_cpu_default2 != x ]]
2689 if [[ x$target_cpu_default != x ]]
2691 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2693 target_cpu_default=$target_cpu_default2
2697 # No need for collect2 if we have the GNU linker.
2704 # Save data on machine being used to compile GCC in build_xm_file.
2705 # Save data on host machine in vars host_xm_file and host_xmake_file.
2706 if [[ x$pass1done = x ]]
2708 if [[ x"$xm_file" = x ]]
2709 then build_xm_file=$cpu_type/xm-$cpu_type.h
2710 else build_xm_file=$xm_file
2712 build_install_headers_dir=$install_headers_dir
2713 build_exeext=$exeext
2716 if [[ x$pass2done = x ]]
2718 if [[ x"$xm_file" = x ]]
2719 then host_xm_file=$cpu_type/xm-$cpu_type.h
2720 else host_xm_file=$xm_file
2722 if [[ x"$xmake_file" = x ]]
2723 then xmake_file=$cpu_type/x-$cpu_type
2725 host_xmake_file="$xmake_file"
2726 host_truncate_target=$truncate_target
2727 host_extra_gcc_objs=$extra_gcc_objs
2728 host_extra_objs=$extra_host_objs
2734 extra_objs="${host_extra_objs} ${extra_objs}"
2736 # Default the target-machine variables that were not explicitly set.
2737 if [[ x"$tm_file" = x ]]
2738 then tm_file=$cpu_type/$cpu_type.h; fi
2740 if [[ x$extra_headers = x ]]
2741 then extra_headers=; fi
2743 if [[ x"$xm_file" = x ]]
2744 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2746 md_file=$cpu_type/$cpu_type.md
2748 if [[ x$out_file = x ]]
2749 then out_file=$cpu_type/$cpu_type.c; fi
2751 if [[ x"$tmake_file" = x ]]
2752 then tmake_file=$cpu_type/t-$cpu_type
2755 if [[ x$float_format = x ]]
2756 then float_format=i64
2759 # Say what files are being used for the output code and MD file.
2760 echo "Using \`$srcdir/config/$out_file' to output insns."
2761 echo "Using \`$srcdir/config/$md_file' as machine description file."
2764 for f in $tm_file; do
2767 if [[ $count = ax ]]; then
2768 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2770 echo "Using the following target machine macro files:"
2771 for f in $tm_file; do
2772 echo " $srcdir/config/$f"
2777 for f in $host_xm_file; do
2780 if [[ $count = ax ]]; then
2781 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2783 echo "Using the following host machine macro files:"
2784 for f in $host_xm_file; do
2785 echo " $srcdir/config/$f"
2789 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2791 for f in $build_xm_file; do
2794 if [[ $count = ax ]]; then
2795 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2797 echo "Using the following build machine macro files:"
2798 for f in $build_xm_file; do
2799 echo " $srcdir/config/$f"
2804 if [[ x$thread_file = x ]]
2805 then thread_file='single'
2808 # Set up the header files.
2809 # $links is the list of header files to create.
2810 # $vars is the list of shell variables with file names to include.
2811 # auto-conf.h is the file containing items generated by autoconf and is
2812 # the first file included by config.h.
2813 host_xm_file="auto-config.h ${host_xm_file}"
2814 vars="host_xm_file tm_file xm_file build_xm_file"
2815 links="config.h tm.h tconfig.h hconfig.h"
2818 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2821 while [[ -n "$vars" ]]
2823 # set file to car of files, files to cdr of files
2824 set $vars; var=$1; shift; vars=$*
2825 set $links; link=$1; shift; links=$*
2829 # Define TARGET_CPU_DEFAULT if the system wants one.
2830 # This substitutes for lots of *.h files.
2831 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2833 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2836 for file in `eval echo '$'$var`; do
2837 echo "#include \"$file\"" >>$link
2841 # Truncate the target if necessary
2842 if [[ x$host_truncate_target != x ]]; then
2843 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2846 # Get the version number from the toplevel
2847 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2849 # Get an absolute path to the GCC top-level source directory
2855 # Conditionalize the makefile for this host machine.
2856 # Make-host contains the concatenation of all host makefile fragments
2857 # [there can be more than one]. This file is built by configure.frag.
2858 host_overrides=Make-host
2859 dep_host_xmake_file=
2860 for f in .. ${host_xmake_file}
2862 if [[ -f ${srcdir}/config/$f ]]
2864 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2868 # Conditionalize the makefile for this target machine.
2869 # Make-target contains the concatenation of all host makefile fragments
2870 # [there can be more than one]. This file is built by configure.frag.
2871 target_overrides=Make-target
2873 for f in .. ${tmake_file}
2875 if [[ -f ${srcdir}/config/$f ]]
2877 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2881 # If the host doesn't support symlinks, modify CC in
2882 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2883 # Otherwise, we can use "CC=$(CC)".
2885 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2887 cc_set_by_configure="\$(CC)"
2888 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2890 symbolic_link="cp -p"
2891 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2892 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2896 out_object_file=`basename $out_file .c`.o
2899 for f in $tm_file; do
2900 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2904 for f in $host_xm_file; do
2905 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2909 for f in $build_xm_file; do
2910 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2913 # Define macro CROSS_COMPILE in compilation
2914 # if this is a cross-compiler.
2915 # Also use all.cross instead of all.internal
2916 # and add cross-make to Makefile.
2917 cross_overrides="/dev/null"
2918 if [[ x$host != x$target ]]
2920 cross_defines="CROSS=-DCROSS_COMPILE"
2921 cross_overrides="${topdir}/cross-make"
2924 # When building gcc with a cross-compiler, we need to fix a few things.
2925 # This must come after cross-make as we want all.build to override
2927 build_overrides="/dev/null"
2928 if [[ x$build != x$host ]]
2930 build_overrides="${topdir}/build-make"
2933 # Expand extra_headers to include complete path.
2934 # This substitutes for lots of t-* files.
2936 if [[ "x$extra_headers" = x ]]
2939 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2940 for file in $extra_headers;
2942 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2946 # Add a definition of USE_COLLECT2 if system wants one.
2947 # Also tell toplev.c what to do.
2948 # This substitutes for lots of t-* files.
2949 if [[ x$use_collect2 = x ]]
2954 will_use_collect2="ld"
2955 maybe_use_collect2="-DUSE_COLLECT2"
2959 # Set MD_DEPS if the real md file is in md.pre-cpp.
2960 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2961 # for line oriented comments, so we must always use a GNU cpp. If
2962 # building gcc with a cross compiler, use the cross compiler just
2963 # built. Otherwise, we can use the cpp just built.
2965 if [[ "x$md_cppflags" = x ]]
2967 md_file_sub=$srcdir/config/$md_file
2972 # If we have gas in the build tree, make a link to it.
2973 if [[ -f ../gas/Makefile ]]; then
2974 rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null
2977 # If we have ld in the build tree, make a link to it.
2978 if [[ -f ../ld/Makefile ]]; then
2979 # if [[ x$use_collect2 = x ]]; then
2980 # rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null
2982 rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null
2986 # Figure out what language subdirectories are present.
2988 for lang in ${srcdir}/*/config-lang.in ..
2992 # The odd quoting in the next line works around
2993 # an apparent bug in bash 1.12 on linux.
2994 ${srcdir}/[[*]]/config-lang.in) ;;
2995 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2999 # Make empty files to contain the specs and options for each language.
3000 # Then add #include lines to for a compiler that has specs and/or options.
3004 rm -f specs.h options.h
3005 touch specs.h options.h
3006 for subdir in . $subdirs
3008 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3009 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3010 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3012 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3013 echo "#include \"$subdir/lang-options.h\"" >>options.h
3014 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3018 # These (without "all_") are set in each config-lang.in.
3019 # `language' must be a single word so is spelled singularly.
3025 all_outputs=Makefile
3026 # List of language makefile fragments.
3031 # Add the language fragments.
3032 # Languages are added via two mechanisms. Some information must be
3033 # recorded in makefile variables, these are defined in config-lang.in.
3034 # We accumulate them and plug them into the main Makefile.
3035 # The other mechanism is a set of hooks for each of the main targets
3036 # like `clean', `install', etc.
3038 language_fragments="Make-lang"
3039 language_hooks="Make-hooks"
3042 for s in .. $subdirs
3054 . ${srcdir}/$s/config-lang.in
3055 if [[ "x$language" = x ]]
3057 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3060 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3061 all_languages="$all_languages $language"
3062 if [[ "x$boot_language" = xyes ]]
3064 all_boot_languages="$all_boot_languages $language"
3066 all_compilers="$all_compilers $compilers"
3067 all_stagestuff="$all_stagestuff $stagestuff"
3068 all_diff_excludes="$all_diff_excludes $diff_excludes"
3069 all_headers="$all_headers $headers"
3070 all_outputs="$all_outputs $outputs"
3071 if [[ x$outputs = x ]]
3073 oldstyle_subdirs="$oldstyle_subdirs $s"
3075 all_lib2funcs="$all_lib2funcs $lib2funcs"
3079 # Since we can't use `::' targets, we link each language in
3080 # with a set of hooks, reached indirectly via lang.${target}.
3084 target_list="all.build all.cross start.encap rest.encap \
3086 install-normal install-common install-info install-man \
3088 mostlyclean clean distclean extraclean maintainer-clean \
3089 stage1 stage2 stage3 stage4"
3090 for t in $target_list
3093 for l in .. $all_languages
3095 if [[ $l != ".." ]]; then
3099 echo "lang.$t: $x" >> Make-hooks
3102 # If we're not building in srcdir, create .gdbinit.
3104 if [[ ! -f Makefile.in ]]; then
3105 echo "dir ." > .gdbinit
3106 echo "dir ${srcdir}" >> .gdbinit
3107 if [[ x$gdb_needs_out_file_path = xyes ]]
3109 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3111 if [[ "x$subdirs" != x ]]; then
3114 echo "dir ${srcdir}/$s" >> .gdbinit
3117 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3120 # If this is using newlib, then define inhibit_libc in
3121 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3122 # libgcc.a, but that's OK because newib should have its own version of
3125 if [[ x$with_newlib = xyes ]]; then
3126 inhibit_libc=-Dinhibit_libc
3128 AC_SUBST(inhibit_libc)
3130 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3133 if [[ x$enable_haifa = xyes ]]; then
3134 echo "Using the Haifa scheduler."
3136 sched_cflags=-DHAIFA
3138 AC_SUBST(sched_prefix)
3139 AC_SUBST(sched_cflags)
3140 if [[ x$enable_haifa != x ]]; then
3141 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3142 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3143 if [[ -f $x ]]; then
3150 # Process the language and host/target makefile fragments.
3151 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3153 # Substitute configuration variables
3155 AC_SUBST(all_languages)
3156 AC_SUBST(all_boot_languages)
3157 AC_SUBST(all_compilers)
3158 AC_SUBST(all_lang_makefiles)
3159 AC_SUBST(all_stagestuff)
3160 AC_SUBST(all_diff_excludes)
3161 AC_SUBST(all_lib2funcs)
3162 AC_SUBST(all_headers)
3163 AC_SUBST(extra_passes)
3164 AC_SUBST(extra_programs)
3165 AC_SUBST(extra_parts)
3166 AC_SUBST(extra_c_objs)
3167 AC_SUBST(extra_c_flags)
3168 AC_SUBST(extra_objs)
3169 AC_SUBST(host_extra_gcc_objs)
3170 AC_SUBST(extra_headers_list)
3171 AC_SUBST(dep_host_xmake_file)
3172 AC_SUBST(dep_tmake_file)
3174 AC_SUBST(out_object_file)
3176 AC_SUBST(tm_file_list)
3177 AC_SUBST(build_xm_file_list)
3178 AC_SUBST(host_xm_file_list)
3179 AC_SUBST(lang_specs_files)
3180 AC_SUBST(lang_options_files)
3181 AC_SUBST(thread_file)
3183 AC_SUBST(local_prefix)
3184 AC_SUBST(gxx_include_dir)
3185 AC_SUBST(fixincludes)
3186 AC_SUBST(build_install_headers_dir)
3187 AC_SUBST(build_exeext)
3188 AC_SUBST(float_format)
3189 AC_SUBST(will_use_collect2)
3190 AC_SUBST(maybe_use_collect2)
3191 AC_SUBST(cc_set_by_configure)
3192 AC_SUBST(stage_prefix_set_by_configure)
3194 AC_SUBST(symbolic_link)
3196 AC_SUBST_FILE(target_overrides)
3197 AC_SUBST_FILE(host_overrides)
3198 AC_SUBST(cross_defines)
3199 AC_SUBST_FILE(cross_overrides)
3200 AC_SUBST_FILE(build_overrides)
3201 AC_SUBST_FILE(language_fragments)
3202 AC_SUBST_FILE(language_hooks)
3204 # Echo that links are built
3205 if [[ x$host = x$target ]]
3213 if [[ x$host != x$build ]]
3215 str3=" on a $build system"
3218 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3223 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3225 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3227 echo " ${str2}${str3}." 1>&2
3230 # Configure the subdirectories
3231 # AC_CONFIG_SUBDIRS($subdirs)
3233 # Create the Makefile
3234 # and configure language subdirectories
3235 AC_OUTPUT($all_outputs,
3237 . $srcdir/configure.lang
3238 case x$CONFIG_HEADERS in
3239 xauto-config.h:config.in)
3242 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3243 # bootstrapping and the installation procedure can still use
3244 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3245 # FLAGS_TO_PASS has been modified to solve the problem there.
3246 # This is virtually a duplicate of what happens in configure.lang; we do
3247 # an extra check to make sure this only happens if ln -s can be used.
3248 if [[ "$symbolic_link" = "ln -s" ]]; then
3249 for d in .. ${subdirs} ; do
3250 if [[ $d != .. ]]; then
3253 for t in stage1 stage2 stage3 stage4 include
3256 $symbolic_link ../$t $t 2>/dev/null
3267 target_alias='${target_alias}'
3269 subdirs='${subdirs}'
3270 oldstyle_subdirs='${oldstyle_subdirs}'
3271 symbolic_link='${symbolic_link}'
3272 program_transform_set='${program_transform_set}'
3273 program_transform_name='${program_transform_name}'
3274 dep_host_xmake_file='${dep_host_xmake_file}'
3275 host_xmake_file='${host_xmake_file}'
3276 dep_tmake_file='${dep_tmake_file}'
3277 tmake_file='${tmake_file}'
3278 thread_file='${thread_file}'
3279 version='${version}'
3280 local_prefix='${local_prefix}'
3281 build_install_headers_dir='${build_install_headers_dir}'
3282 build_exeext='${build_exeext}'
3283 out_file='${out_file}'
3284 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3285 SET_MAKE='${SET_MAKE}'
3286 target_list='${target_list}'
3287 target_overrides='${target_overrides}'
3288 host_overrides='${host_overrides}'
3289 cross_defines='${cross_defines}'
3290 cross_overrides='${cross_overrides}'
3291 build_overrides='${build_overrides}'