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
90 # Pass with no value to take the default
91 # Pass with a value to specify a thread package
92 AC_ARG_ENABLE(threads,
93 [ --enable-threads enable thread usage for target GCC.
94 --enable-threads=LIB use LIB thread package for target GCC.],
95 if [[[ x$enable_threads = xno ]]]; then
100 # Check if a valid thread package
101 case x${enable_threads} in
110 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
112 thread_file=$enable_threads
115 echo "$enable_threads is an unknown thread package" 1>&2
120 # Determine the host, build, and target systems
123 # Find the native compiler
127 # Find some useful tools
136 # Find the native compiler
140 AC_CHECK_HEADERS(inttypes.h limits.h stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h)
142 GCC_NEED_DECLARATION(malloc)
143 GCC_NEED_DECLARATION(realloc)
144 GCC_NEED_DECLARATION(calloc)
145 GCC_NEED_DECLARATION(free)
149 AC_CHECK_FUNCS(strerror strtoul bsearch)
158 build_install_headers_dir=install-headers-tar
162 host_truncate_target=
164 # Decode the host machine, then the target machine.
165 # For the host machine, we save the xm_file variable as host_xm_file;
166 # then we decode the target machine and forget everything else
167 # that came from the host machine.
168 for machine in $build $host $target; do
181 # Set this to force installation and use of collect2.
183 # Set this to override the default target model.
185 # Set this to control which fixincludes program to use.
186 fixincludes=fixincludes
187 # Set this to control how the header file directory is installed.
188 install_headers_dir=install-headers-tar
189 # Set this to a non-empty list of args to pass to cpp if the target
190 # wants its .md file passed through cpp.
192 # Set this if directory names should be truncated to 14 characters.
194 # Set this if gdb needs a dir command with `dirname $out_file`
195 gdb_needs_out_file_path=
196 # Set this if the build machine requires executables to have a
200 # Set default cpu_type, tm_file and xm_file so it can be updated in
201 # each machine entry.
202 cpu_type=`echo $machine | sed 's/-.*$//'`
236 tm_file=${cpu_type}/${cpu_type}.h
237 xm_file=${cpu_type}/xm-${cpu_type}.h
240 # Support site-specific machine types.
242 cpu_type=`echo $machine | sed -e 's/-.*//'`
243 rest=`echo $machine | sed -e "s/$cpu_type-//"`
244 xm_file=${cpu_type}/xm-$rest.h
245 tm_file=${cpu_type}/$rest.h
246 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
247 then xmake_file=${cpu_type}/x-$rest; \
250 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
251 then tmake_file=${cpu_type}/t-$rest; \
257 a29k-*-bsd* | a29k-*-sym1*)
258 tm_file="${tm_file} a29k/unix.h"
259 xm_file=a29k/xm-unix.h
260 xmake_file=a29k/x-unix
263 a29k-*-udi | a29k-*-coff)
264 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
265 tmake_file=a29k/t-a29kbare
268 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
269 tmake_file=a29k/t-vx29k
270 extra_parts="crtbegin.o crtend.o"
272 a29k-*-*) # Default a29k environment.
275 alpha*-*-linux-gnuecoff*)
276 tm_file="${tm_file} alpha/linux.h"
277 xm_file="${xm_file} alpha/xm-linux.h"
278 target_cpu_default="MASK_GAS"
281 fixincludes=Makefile.in
284 alpha*-*-linux-gnulibc1*)
285 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
286 xm_file="${xm_file} alpha/xm-linux.h"
287 target_cpu_default="MASK_GAS"
288 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
290 fixincludes=Makefile.in
292 if [[ x$enable_threads = xyes ]]; then
297 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
298 xm_file="${xm_file} alpha/xm-linux.h"
299 target_cpu_default="MASK_GAS"
300 tmake_file="t-linux alpha/t-linux"
302 fixincludes=Makefile.in
304 if [[ x$enable_threads = xyes ]]; then
309 if [[ x$stabs = xyes ]]
311 tm_file="${tm_file} dbx.h"
313 if [[ x$gas != xyes ]]
315 extra_passes="mips-tfile mips-tdump"
320 tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h"
323 tm_file="${tm_file} alpha/osf2or3.h"
326 # Some versions of OSF4 (specifically X4.0-9 296.7) have
327 # a broken tar, so we use cpio instead.
328 install_headers_dir=install-headers-cpio
332 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
333 target_cpu_default=MASK_SUPPORT_ARCH
338 tm_file="${tm_file} alpha/win-nt.h"
339 target_cpu_default=MASK_WINDOWS_NT
340 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
342 xmake_file=winnt/x-winnt
343 extra_host_objs=oldnames.o
344 extra_gcc_objs="spawnv.o oldnames.o"
345 fixincludes=fixinc.winnt
346 if [[ x$gnu_ld != xyes ]]
348 extra_programs=ld.exe
350 if [[ x$enable_threads = xyes ]]; then
356 xm_file="${xm_file} alpha/xm-vms.h"
357 tmake_file=alpha/t-vms
358 fixincludes=Makefile.in
361 extra_parts="crtinit.o crtfini.o"
363 arm-*-coff* | armel-*-coff*)
365 tmake_file=arm/t-bare
367 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
368 tm_file=arm/riscix1-1.h
371 arm-*-riscix*) # Acorn RISC machine
372 if [[ x$gas = xyes ]]
374 tm_file=arm/rix-gas.h
378 xmake_file=arm/x-riscix
379 tmake_file=arm/t-riscix
382 arm-semi-aout | armel-semi-aout)
384 tmake_file=arm/t-semi
385 fixincludes=Makefile.in # There is nothing to fix
387 arm-semi-aof | armel-semi-aof)
388 tm_file=arm/semiaof.h
389 tmake_file=arm/t-semiaof
390 fixincludes=Makefile.in # There is nothing to fix
394 xm_file=arm/xm-netbsd.h
395 tmake_file="t-netbsd arm/t-netbsd"
396 # On NetBSD, the headers are already okay, except for math.h.
397 fixincludes=fixinc.math
400 arm-*-linux-gnuaout*) # ARM Linux
402 xm_file=arm/xm-linux.h
404 tm_file=arm/linux-gas.h
405 tmake_file=arm/t-linux
406 fixincludes=Makefile.in
411 tmake_file=arm/t-bare
413 c1-convex-*) # Convex C1
416 fixincludes=Makefile.in
418 c2-convex-*) # Convex C2
421 fixincludes=Makefile.in
426 fixincludes=Makefile.in
431 fixincludes=Makefile.in
434 target_cpu_default=16
436 fixincludes=Makefile.in
438 clipper-intergraph-clix*)
439 tm_file="${tm_file} svr3.h clipper/clix.h"
440 xm_file=clipper/xm-clix.h
441 xmake_file=clipper/x-clix
442 extra_headers=va-clipper.h
443 extra_parts="crtbegin.o crtend.o"
444 install_headers_dir=install-headers-cpio
451 # This hasn't been upgraded to GCC 2.
452 # fx80-alliant-*) # Alliant FX/80
458 if [[ x$enable_haifa != xno ]]; then
461 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
462 xm_file=pa/xm-papro.h
466 if [[ x$enable_haifa != xno ]]; then
470 tm_file="${tm_file} pa/pa-osf.h"
472 fixincludes=Makefile.in
475 if [[ x$enable_haifa != xno ]]; then
478 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
479 xm_file=pa/xm-papro.h
483 if [[ x$enable_haifa != xno ]]; then
486 tm_file="${tm_file} pa/pa-osf.h"
488 fixincludes=Makefile.in
491 if [[ x$enable_haifa != xno ]]; then
496 fixincludes=Makefile.in
499 if [[ x$enable_haifa != xno ]]; then
503 fixincludes=Makefile.in
506 if [[ x$enable_haifa != xno ]]; then
509 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
510 xm_file=pa/xm-pahpux.h
511 xmake_file=pa/x-pa-hpux
512 if [[ x$gas = xyes ]]
514 tm_file="${tm_file} pa/gas.h"
516 install_headers_dir=install-headers-cpio
519 hppa1.0-*-hpux8.0[[0-2]]*)
520 if [[ x$enable_haifa != xno ]]; then
523 tm_file="${tm_file} pa/pa-hpux.h"
524 xm_file=pa/xm-pahpux.h
525 xmake_file=pa/x-pa-hpux
526 if [[ x$gas = xyes ]]
528 tm_file="${tm_file} pa/pa-gas.h"
530 tm_file="pa/pa-oldas.h ${tm_file}"
532 install_headers_dir=install-headers-cpio
535 hppa1.1-*-hpux8.0[[0-2]]*)
536 if [[ x$enable_haifa != xno ]]; then
540 tm_file="${tm_file} pa/pa-hpux.h"
541 xm_file=pa/xm-pahpux.h
542 xmake_file=pa/x-pa-hpux
543 if [[ x$gas = xyes ]]
545 tm_file="${tm_file} pa/pa-gas.h"
547 tm_file="pa/pa-oldas.h ${tm_file}"
549 install_headers_dir=install-headers-cpio
553 if [[ x$enable_haifa != xno ]]; then
557 tm_file="${tm_file} pa/pa-hpux.h"
558 xm_file=pa/xm-pahpux.h
559 xmake_file=pa/x-pa-hpux
560 if [[ x$gas = xyes ]]
562 tm_file="${tm_file} pa/pa-gas.h"
564 install_headers_dir=install-headers-cpio
568 if [[ x$enable_haifa != xno ]]; then
571 tm_file="${tm_file} pa/pa-hpux.h"
572 xm_file=pa/xm-pahpux.h
573 xmake_file=pa/x-pa-hpux
574 if [[ x$gas = xyes ]]
576 tm_file="${tm_file} pa/pa-gas.h"
578 install_headers_dir=install-headers-cpio
582 if [[ x$enable_haifa != xno ]]; then
586 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
587 xm_file=pa/xm-pahpux.h
588 xmake_file=pa/x-pa-hpux
589 if [[ x$gas = xyes ]]
591 tm_file="${tm_file} pa/pa-gas.h"
593 install_headers_dir=install-headers-cpio
597 if [[ x$enable_haifa != xno ]]; then
600 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
601 xm_file=pa/xm-pahpux.h
602 xmake_file=pa/x-pa-hpux
603 if [[ x$gas = xyes ]]
605 tm_file="${tm_file} pa/pa-gas.h"
607 install_headers_dir=install-headers-cpio
611 if [[ x$enable_haifa != xno ]]; then
615 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
616 xm_file=pa/xm-pahpux.h
617 xmake_file=pa/x-pa-hpux
618 if [[ x$gas = xyes ]]
620 tm_file="${tm_file} pa/pa-gas.h"
622 install_headers_dir=install-headers-cpio
626 if [[ x$enable_haifa != xno ]]; then
629 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
630 xm_file=pa/xm-pahpux.h
631 xmake_file=pa/x-pa-hpux
632 if [[ x$gas = xyes ]]
634 tm_file="${tm_file} pa/pa-gas.h"
636 install_headers_dir=install-headers-cpio
640 if [[ x$enable_haifa != xno ]]; then
644 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
645 xm_file=pa/xm-pahpux.h
646 xmake_file=pa/x-pa-hpux
647 if [[ x$gas = xyes ]]
649 tm_file="${tm_file} pa/pa-gas.h"
651 install_headers_dir=install-headers-cpio
655 if [[ x$enable_haifa != xno ]]; then
658 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
659 xm_file=pa/xm-pahpux.h
660 xmake_file=pa/x-pa-hpux
661 if [[ x$gas = xyes ]]
663 tm_file="${tm_file} pa/pa-gas.h"
665 install_headers_dir=install-headers-cpio
669 if [[ x$enable_haifa != xno ]]; then
674 fixincludes=Makefile.in
678 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
679 if [[ x$gas = xyes ]]
681 tm_file=i386/aix386.h
682 extra_parts="crtbegin.o crtend.o"
683 tmake_file=i386/t-crtstuff
685 tm_file=i386/aix386ng.h
688 xm_file=i386/xm-aix.h
689 xmake_file=i386/x-aix
691 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
692 xm_file=i386/xm-sysv4.h
693 xmake_file=i386/x-ncr3000
694 if [[ x$stabs = xyes -a x$gas = xyes ]]
696 tm_file=i386/sysv4gdb.h
700 extra_parts="crtbegin.o crtend.o"
701 tmake_file=i386/t-crtpic
705 xm_file=i386/xm-next.h
706 tmake_file=i386/t-next
707 xmake_file=i386/x-next
708 extra_objs=nextstep.o
709 if [[ x$enable_threads = xyes ]]; then
713 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
715 if [[ x$gas = xyes ]]
717 tm_file=i386/seq-gas.h
719 tm_file=i386/sequent.h
722 i[[3456]]86-sequent-ptx1*)
723 xm_file=i386/xm-sysv3.h
724 xmake_file=i386/x-sysv3
725 tm_file=i386/seq-sysv3.h
726 tmake_file=i386/t-crtstuff
727 fixincludes=fixinc.ptx
728 extra_parts="crtbegin.o crtend.o"
729 install_headers_dir=install-headers-cpio
731 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
732 xm_file=i386/xm-sysv3.h
733 xmake_file=i386/x-sysv3
734 tm_file=i386/seq2-sysv3.h
735 tmake_file=i386/t-crtstuff
736 extra_parts="crtbegin.o crtend.o"
737 fixincludes=fixinc.ptx
738 install_headers_dir=install-headers-cpio
740 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
741 xm_file=i386/xm-sysv4.h
743 tm_file=i386/ptx4-i.h
745 extra_parts="crtbegin.o crtend.o"
746 fixincludes=fixinc.ptx
747 install_headers_dir=install-headers-cpio
749 i386-sun-sunos*) # Sun i386 roadrunner
750 xm_file=i386/xm-sun.h
755 tm_file=i386/i386-aout.h
756 tmake_file=i386/t-i386bare
758 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
759 tm_file=i386/bsd386.h
760 xm_file=i386/xm-bsd386.h
761 # tmake_file=t-libc-ok
764 tm_file=i386/386bsd.h
765 xm_file=i386/xm-bsd386.h
766 # tmake_file=t-libc-ok
767 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
770 i[[3456]]86-*-freebsdelf*)
771 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
772 xm_file=i386/xm-freebsd.h
773 # On FreeBSD, the headers are already ok, except for math.h.
774 fixincludes=fixinc.math
775 tmake_file=i386/t-freebsd
780 i[[3456]]86-*-freebsd*)
781 tm_file=i386/freebsd.h
782 xm_file=i386/xm-freebsd.h
783 # On FreeBSD, the headers are already ok, except for math.h.
784 fixincludes=fixinc.math
785 tmake_file=i386/t-freebsd
787 i[[3456]]86-*-netbsd*)
788 tm_file=i386/netbsd.h
789 xm_file=i386/xm-netbsd.h
790 # On NetBSD, the headers are already okay, except for math.h.
791 fixincludes=fixinc.math
795 tm_file=i386/i386-coff.h
796 tmake_file=i386/t-i386bare
798 i[[3456]]86-*-isc*) # 80386 running ISC system
799 xm_file=i386/xm-isc.h
801 i[[345]]86-*-isc[[34]]*)
802 xmake_file=i386/x-isc3
805 xmake_file=i386/x-isc
808 if [[ x$gas = xyes -a x$stabs = xyes ]]
810 tm_file=i386/iscdbx.h
811 tmake_file=i386/t-svr3dbx
812 extra_parts="svr3.ifile svr3z.ifile"
814 tm_file=i386/isccoff.h
815 tmake_file=i386/t-crtstuff
816 extra_parts="crtbegin.o crtend.o"
818 install_headers_dir=install-headers-cpio
820 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
821 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
822 xmake_file=x-linux-aout
823 tmake_file="t-linux-aout i386/t-crtstuff"
824 tm_file=i386/linux-oldld.h
825 fixincludes=Makefile.in #On Linux, the headers are ok already.
828 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
829 xm_file=i386/xm-linux.h # with a.out format
830 xmake_file=x-linux-aout
831 tmake_file="t-linux-aout i386/t-crtstuff"
832 tm_file=i386/linux-aout.h
833 fixincludes=Makefile.in #On Linux, the headers are ok already.
836 i[[3456]]86-*-linux-gnulibc1)
837 xm_file=i386/xm-linux.h # Intel 80386's running Linux
838 xmake_file=x-linux # with ELF format using the
839 tm_file=i386/linux.h # Linux C library 5
840 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
841 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
842 fixincludes=Makefile.in #On Linux, the headers are ok already.
844 if [[ x$enable_threads = xyes ]]; then
848 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
849 xm_file=i386/xm-linux.h # with ELF format using glibc 2
850 xmake_file=x-linux # aka Linux C library 6
852 tmake_file="t-linux i386/t-crtstuff"
853 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
854 fixincludes=Makefile.in #On Linux, the headers are ok already.
856 if [[ x$enable_threads = xyes ]]; then
862 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
863 xm_file=i386/xm-go32.h
865 tmake_file=i386/t-go32
867 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
870 fixincludes=Makefile.in
874 i[[3456]]86-*-lynxos*)
875 if [[ x$gas = xyes ]]
879 tm_file=i386/lynx-ng.h
881 xm_file=i386/xm-lynx.h
882 tmake_file=i386/t-i386bare
887 # tmake_file=t-libc-ok
890 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
891 if [[ x$elf = xyes ]]
893 tm_file=i386/osfelf.h
896 tm_file=i386/osfrose.h
899 xm_file=i386/xm-osf.h
900 xmake_file=i386/x-osfrose
901 tmake_file=i386/t-osf
904 i[[345]]86-go32-rtems*)
906 xm_file=i386/xm-go32.h
907 tm_file=i386/go32-rtems.h
908 tmake_file="i386/t-go32 t-rtems"
913 tmake_file="i386/t-i386bare t-rtems"
915 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
916 xm_file=i386/xm-sco5.h
917 xmake_file=i386/x-sco5
918 fixincludes=fixinc.sco
920 tmake_file=i386/t-sco5
921 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
923 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
924 xm_file=i386/xm-sco.h
925 xmake_file=i386/x-sco4
926 fixincludes=fixinc.sco
927 install_headers_dir=install-headers-cpio
928 if [[ x$stabs = xyes ]]
930 tm_file=i386/sco4dbx.h
931 tmake_file=i386/t-svr3dbx
932 extra_parts="svr3.ifile svr3z.rfile"
935 tmake_file=i386/t-crtstuff
936 extra_parts="crtbegin.o crtend.o"
940 i[[3456]]86-*-sco*) # 80386 running SCO system
941 xm_file=i386/xm-sco.h
942 xmake_file=i386/x-sco
943 install_headers_dir=install-headers-cpio
944 if [[ x$stabs = xyes ]]
946 tm_file=i386/scodbx.h
947 tmake_file=i386/t-svr3dbx
948 extra_parts="svr3.ifile svr3z.rfile"
951 extra_parts="crtbegin.o crtend.o"
952 tmake_file=i386/t-crtstuff
956 i[[3456]]86-*-solaris2*)
957 xm_file=i386/xm-sysv4.h
958 if [[ x$stabs = xyes ]]
960 tm_file=i386/sol2dbg.h
964 tmake_file=i386/t-sol2
965 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
967 fixincludes=fixinc.svr4
969 if [[ x$enable_threads = xyes ]]; then
970 thread_file='solaris'
973 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
974 xm_file=i386/xm-sysv4.h
976 if [[ x$stabs = xyes ]]
978 tm_file="${tm_file} dbx.h"
980 tmake_file=i386/t-crtpic
982 extra_parts="crtbegin.o crtend.o"
984 i[[3456]]86-*-sysv*) # Intel 80386's running system V
985 xm_file=i386/xm-sysv3.h
986 xmake_file=i386/x-sysv3
987 if [[ x$gas = xyes ]]
989 if [[ x$stabs = xyes ]]
991 tm_file=i386/svr3dbx.h
992 tmake_file=i386/t-svr3dbx
993 extra_parts="svr3.ifile svr3z.rfile"
995 tm_file=i386/svr3gas.h
996 extra_parts="crtbegin.o crtend.o"
997 tmake_file=i386/t-crtstuff
1000 tm_file=i386/sysv3.h
1001 extra_parts="crtbegin.o crtend.o"
1002 tmake_file=i386/t-crtstuff
1005 i386-*-vsta) # Intel 80386's running VSTa kernel
1006 xm_file=i386/xm-vsta.h
1008 tmake_file=i386/t-vsta
1009 xmake_file=i386/x-vsta
1011 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1012 xm_file="${xm_file} i386/xm-cygwin32.h"
1013 tmake_file=i386/t-cygwin32
1014 tm_file=i386/cygwin32.h
1015 xmake_file=i386/x-cygwin32
1017 fixincludes=Makefile.in
1018 if [[ x$enable_threads = xyes ]]; then
1023 i[[3456]]86-*-mingw32)
1024 tm_file=i386/mingw32.h
1025 xm_file="${xm_file} i386/xm-mingw32.h"
1026 tmake_file=i386/t-cygwin32
1028 xmake_file=i386/x-cygwin32
1029 fixincludes=Makefile.in
1030 if [[ x$enable_threads = xyes ]]; then
1035 i[[3456]]86-*-winnt3*)
1036 tm_file=i386/win-nt.h
1037 out_file=i386/i386.c
1038 xm_file=i386/xm-winnt.h
1039 xmake_file=winnt/x-winnt
1040 tmake_file=i386/t-winnt
1041 extra_host_objs="winnt.o oldnames.o"
1042 extra_gcc_objs="spawnv.o oldnames.o"
1043 fixincludes=fixinc.winnt
1044 if [[ x$gnu_ld != xyes ]]
1046 extra_programs=ld.exe
1048 if [[ x$enable_threads = xyes ]]; then
1052 i[[3456]]86-dg-dgux)
1053 xm_file=i386/xm-dgux.h
1054 out_file=i386/dgux.c
1056 tmake_file=i386/t-dgux
1057 xmake_file=i386/x-dgux
1058 fixincludes=fixinc.dgux
1059 install_headers_dir=install-headers-cpio
1061 i860-alliant-*) # Alliant FX/2800
1062 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1063 xm_file="${xm_file} i860/xm-fx2800.h"
1064 xmake_file=i860/x-fx2800
1065 tmake_file=i860/t-fx2800
1066 extra_parts="crtbegin.o crtend.o"
1069 tm_file="${tm_file} i860/bsd.h"
1070 if [[ x$gas = xyes ]]
1072 tm_file="${tm_file} i860/bsd-gas.h"
1077 tm_file="${tm_file} i860/mach.h"
1078 tmake_file=t-libc-ok
1080 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1081 tm_file="${tm_file} svr3.h i860/paragon.h"
1082 xm_file="${xm_file} xm-svr3.h"
1086 tm_file="${tm_file} svr3.h i860/sysv3.h"
1087 xm_file="${tm_file} xm-svr3.h"
1088 xmake_file=i860/x-sysv3
1089 extra_parts="crtbegin.o crtend.o"
1092 tm_file="${tm_file} svr4.h i860/sysv4.h"
1093 xm_file="${xm_file} xm-svr3.h"
1094 xmake_file=i860/x-sysv4
1096 extra_parts="crtbegin.o crtend.o"
1098 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1099 tm_file="${tm_file} i960/vx960.h"
1100 tmake_file=i960/t-vxworks960
1104 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1105 tmake_file=i960/t-vxworks960
1109 tm_file="${tm_file} i960/vx960.h"
1110 tmake_file=i960/t-vxworks960
1114 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1115 tmake_file=i960/t-960bare
1119 tmake_file="i960/t-960bare t-rtems"
1120 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1123 i960-*-*) # Default i960 environment.
1127 extra_parts="crtinit.o crtfini.o"
1129 m68000-convergent-sysv*)
1131 xm_file=m68k/xm-3b1.h
1133 extra_headers=math-68881.h
1135 m68000-hp-bsd*) # HP 9000/200 running BSD
1136 tm_file=m68k/hp2bsd.h
1137 xmake_file=m68k/x-hp2bsd
1139 extra_headers=math-68881.h
1141 m68000-hp-hpux*) # HP 9000 series 300
1142 xm_file=m68k/xm-hp320.h
1143 if [[ x$gas = xyes ]]
1145 xmake_file=m68k/x-hp320g
1146 tm_file=m68k/hp310g.h
1148 xmake_file=m68k/x-hp320
1149 tm_file=m68k/hp310.h
1151 install_headers_dir=install-headers-cpio
1153 extra_headers=math-68881.h
1158 extra_headers=math-68881.h
1161 tm_file=m68k/sun2o4.h
1163 extra_headers=math-68881.h
1166 xm_file=m68k/xm-3b1.h
1167 if [[ x$gas = xyes ]]
1174 extra_headers=math-68881.h
1176 m68k-apple-aux*) # Apple Macintosh running A/UX
1177 xm_file=m68k/xm-aux.h
1178 tmake_file=m68k/t-aux
1179 install_headers_dir=install-headers-cpio
1180 extra_headers=math-68881.h
1181 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1183 if [[ "$gnu_ld" = yes ]]
1185 tm_file="${tm_file} m68k/auxgld.h"
1187 tm_file="${tm_file} m68k/auxld.h"
1189 if [[ "$gas" = yes ]]
1191 tm_file="${tm_file} m68k/auxgas.h"
1193 tm_file="${tm_file} m68k/auxas.h"
1195 tm_file="${tm_file} m68k/a-ux.h"
1198 tm_file=m68k/apollo68.h
1199 xmake_file=m68k/x-apollo68
1201 extra_headers=math-68881.h
1203 m68k-altos-sysv*) # Altos 3068
1204 if [[ x$gas = xyes ]]
1206 tm_file=m68k/altos3068.h
1207 xm_file=m68k/xm-altos3068.h
1209 echo "The Altos is supported only with the GNU assembler" 1>&2
1212 extra_headers=math-68881.h
1214 m68k-bull-sysv*) # Bull DPX/2
1215 if [[ x$gas = xyes ]]
1217 if [[ x$stabs = xyes ]]
1219 tm_file=m68k/dpx2cdbx.h
1221 tm_file=m68k/dpx2g.h
1226 xm_file=m68k/xm-m68kv.h
1227 xmake_file=m68k/x-dpx2
1229 extra_headers=math-68881.h
1231 m68k-atari-sysv4*) # Atari variant of V.4.
1232 tm_file=m68k/atari.h
1233 xm_file=m68k/xm-atari.h
1235 extra_parts="crtbegin.o crtend.o"
1236 extra_headers=math-68881.h
1238 m68k-motorola-sysv*)
1239 tm_file=m68k/mot3300.h
1240 xm_file=m68k/xm-mot3300.h
1241 if [[ x$gas = xyes ]]
1243 xmake_file=m68k/x-mot3300-gas
1244 if [[ x$gnu_ld = xyes ]]
1246 tmake_file=m68k/t-mot3300-gald
1248 tmake_file=m68k/t-mot3300-gas
1252 xmake_file=m68k/x-mot3300
1253 if [[ x$gnu_ld = xyes ]]
1255 tmake_file=m68k/t-mot3300-gld
1257 tmake_file=m68k/t-mot3300
1261 gdb_needs_out_file_path=yes
1262 extra_parts="crt0.o mcrt0.o"
1263 extra_headers=math-68881.h
1265 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1266 tm_file=m68k/tower-as.h
1267 xm_file=m68k/xm-tower.h
1268 xmake_file=m68k/x-tower
1269 extra_parts="crtbegin.o crtend.o"
1270 extra_headers=math-68881.h
1273 tm_file=m68k/plexus.h
1274 xm_file=m68k/xm-plexus.h
1276 extra_headers=math-68881.h
1280 xm_file=m68k/xm-m68kv.h
1281 extra_headers=math-68881.h
1284 xm_file=m68k/xm-crds.h
1285 xmake_file=m68k/x-crds
1288 extra_headers=math-68881.h
1290 m68k-cbm-sysv4*) # Commodore variant of V.4.
1292 xm_file=m68k/xm-amix.h
1293 xmake_file=m68k/x-amix
1295 extra_parts="crtbegin.o crtend.o"
1296 extra_headers=math-68881.h
1299 tm_file=m68k/ccur-GAS.h
1300 xmake_file=m68k/x-ccur
1301 extra_headers=math-68881.h
1304 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1305 tm_file=m68k/hp3bsd44.h
1306 xmake_file=m68k/x-hp3bsd44
1308 extra_headers=math-68881.h
1310 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1311 tm_file=m68k/hp3bsd.h
1313 extra_headers=math-68881.h
1316 if [[ x$with_fp = xno ]]
1318 tm_file=m68k/isi-nfp.h
1323 extra_headers=math-68881.h
1325 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1326 xm_file=m68k/xm-hp320.h
1327 if [[ x$gas = xyes ]]
1329 xmake_file=m68k/x-hp320g
1330 tm_file=m68k/hp320g.h
1332 xmake_file=m68k/x-hp320
1333 tm_file=m68k/hpux7.h
1335 install_headers_dir=install-headers-cpio
1337 extra_headers=math-68881.h
1339 m68k-hp-hpux*) # HP 9000 series 300
1340 xm_file=m68k/xm-hp320.h
1341 if [[ x$gas = xyes ]]
1343 xmake_file=m68k/x-hp320g
1344 tm_file=m68k/hp320g.h
1346 xmake_file=m68k/x-hp320
1347 tm_file=m68k/hp320.h
1349 install_headers_dir=install-headers-cpio
1351 extra_headers=math-68881.h
1354 tm_file=m68k/sun3mach.h
1356 extra_headers=math-68881.h
1359 if [[ x$gas = xyes ]]
1361 tm_file=m68k/news3gas.h
1363 tm_file=m68k/news3.h
1366 extra_headers=math-68881.h
1368 m68k-sony-bsd* | m68k-sony-newsos*)
1369 if [[ x$gas = xyes ]]
1371 tm_file=m68k/newsgas.h
1376 extra_headers=math-68881.h
1378 m68k-next-nextstep2*)
1379 tm_file=m68k/next21.h
1380 xm_file=m68k/xm-next.h
1381 tmake_file=m68k/t-next
1382 xmake_file=m68k/x-next
1383 extra_objs=nextstep.o
1384 extra_headers=math-68881.h
1387 m68k-next-nextstep3*)
1389 xm_file=m68k/xm-next.h
1390 tmake_file=m68k/t-next
1391 xmake_file=m68k/x-next
1392 extra_objs=nextstep.o
1393 extra_headers=math-68881.h
1394 if [[ x$enable_threads = xyes ]]; then
1399 if [[ x$with_fp = xno ]]
1401 tm_file=m68k/sun3n3.h
1403 tm_file=m68k/sun3o3.h
1406 extra_headers=math-68881.h
1408 m68k-sun-sunos*) # For SunOS 4 (the default).
1409 if [[ x$with_fp = xno ]]
1411 tm_file=m68k/sun3n.h
1415 xm_file=m68k/xm-sun3.h
1417 extra_headers=math-68881.h
1420 tm_file=m68k/vxm68k.h
1421 tmake_file=m68k/t-vxworks68
1422 extra_headers=math-68881.h
1425 tmake_file=m68k/t-m68kbare
1426 tm_file="m68k/m68k-aout.h libgloss.h"
1427 extra_headers=math-68881.h
1430 tmake_file=m68k/t-m68kbare
1431 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1432 extra_headers=math-68881.h
1435 if [[ x$gas = xyes ]]
1439 tm_file=m68k/lynx-ng.h
1441 xm_file=m68k/xm-lynx.h
1443 tmake_file=m68k/t-lynx
1444 extra_headers=math-68881.h
1447 tm_file=m68k/netbsd.h
1448 xm_file=m68k/xm-netbsd.h
1449 # On NetBSD, the headers are already okay, except for math.h.
1450 fixincludes=fixinc.math
1453 m68k-*-sysv3*) # Motorola m68k's running system V.3
1454 xm_file=m68k/xm-m68kv.h
1455 xmake_file=m68k/x-m68kv
1456 extra_parts="crtbegin.o crtend.o"
1457 extra_headers=math-68881.h
1459 m68k-*-sysv4*) # Motorola m68k's running system V.4
1460 tm_file=m68k/m68kv4.h
1461 xm_file=m68k/xm-m68kv.h
1463 extra_parts="crtbegin.o crtend.o"
1464 extra_headers=math-68881.h
1466 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1467 xm_file=m68k/xm-linux.h # with a.out format
1469 tm_file=m68k/linux-aout.h
1470 tmake_file="t-linux-aout m68k/t-linux-aout"
1471 fixincludes=Makefile.in #On Linux, the headers are ok already.
1472 extra_headers=math-68881.h
1475 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1476 xm_file=m68k/xm-linux.h # with ELF format using the
1477 xmake_file=x-linux # Linux C library 5
1478 tm_file=m68k/linux.h
1479 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1480 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1481 fixincludes=Makefile.in #On Linux, the headers are ok already.
1482 extra_headers=math-68881.h
1485 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1486 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1487 xmake_file=x-linux # aka the Linux C library 6.
1488 tm_file=m68k/linux.h
1489 tmake_file="t-linux m68k/t-linux"
1490 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1491 fixincludes=Makefile.in #On Linux, the headers are ok already.
1492 extra_headers=math-68881.h
1494 if [[ x$enable_threads = xyes ]]; then
1499 tmake_file=m68k/t-m68kbare
1500 tm_file=m68k/m68k-psos.h
1501 extra_headers=math-68881.h
1504 tmake_file="m68k/t-m68kbare t-rtems"
1505 tm_file=m68k/rtems.h
1506 extra_headers=math-68881.h
1512 tm_file=m88k/dguxbcs.h
1513 tmake_file=m88k/t-dguxbcs
1517 tmake_file=m88k/t-dgux
1520 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1521 xmake_file=m88k/x-dgux
1522 if [[ x$gas = xyes ]]
1524 tmake_file=m88k/t-dgux-gas
1526 fixincludes=fixinc.dgux
1528 m88k-dolphin-sysv3*)
1529 tm_file=m88k/dolph.h
1530 extra_parts="crtbegin.o crtend.o"
1531 xm_file=m88k/xm-sysv3.h
1532 xmake_file=m88k/x-dolph
1533 if [[ x$gas = xyes ]]
1535 tmake_file=m88k/t-m88k-gas
1538 m88k-tektronix-sysv3)
1539 tm_file=m88k/tekXD88.h
1540 extra_parts="crtbegin.o crtend.o"
1541 xm_file=m88k/xm-sysv3.h
1542 xmake_file=m88k/x-tekXD88
1543 if [[ x$gas = xyes ]]
1545 tmake_file=m88k/t-m88k-gas
1549 tm_file=m88k/m88k-aout.h
1552 tm_file=m88k/m88k-coff.h
1553 tmake_file=m88k/t-bug
1557 extra_parts="crtbegin.o crtend.o"
1558 if [[ x$gas = xyes ]]
1560 tmake_file=m88k/t-luna-gas
1562 tmake_file=m88k/t-luna
1566 tm_file=m88k/sysv3.h
1567 extra_parts="crtbegin.o crtend.o"
1568 xm_file=m88k/xm-sysv3.h
1569 xmake_file=m88k/x-sysv3
1570 if [[ x$gas = xyes ]]
1572 tmake_file=m88k/t-m88k-gas
1576 tm_file=m88k/sysv4.h
1577 extra_parts="crtbegin.o crtend.o"
1578 xmake_file=m88k/x-sysv4
1579 tmake_file=m88k/t-sysv4
1581 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1582 tm_file=mips/iris6.h
1583 xm_file=mips/xm-iris6.h
1584 fixincludes=fixinc.irix
1585 xmake_file=mips/x-iris6
1586 tmake_file=mips/t-iris6
1587 if [[ x$enable_threads = xyes ]]; then
1591 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1592 tm_file=mips/cross64.h
1593 xm_file=mips/xm-iris5.h
1594 fixincludes=Makefile.in
1595 xmake_file=mips/x-iris
1596 tmake_file=mips/t-cross64
1597 # See comment in mips/iris[56].h files.
1599 if [[ x$enable_threads = xyes ]]; then
1604 if [[ x$gas = xyes ]]
1606 if [[ x$stabs = xyes ]]
1608 tm_file=mips/iris5gdb.h
1610 tm_file=mips/sni-gas.h
1613 tm_file=mips/sni-svr4.h
1615 xm_file=mips/xm-sysv.h
1616 xmake_file=mips/x-sni-svr4
1617 tmake_file=mips/t-mips-gas
1618 if [[ x$gnu_ld != xyes ]]
1623 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1624 if [[ x$gas = xyes ]]
1626 tm_file=mips/iris5gas.h
1627 if [[ x$stabs = xyes ]]
1629 tm_file="${tm_file} dbx.h"
1632 tm_file=mips/iris5.h
1634 xm_file=mips/xm-iris5.h
1635 fixincludes=fixinc.irix
1636 xmake_file=mips/x-iris
1637 # mips-tfile doesn't work yet
1638 tmake_file=mips/t-mips-gas
1639 # See comment in mips/iris5.h file.
1641 if [[ x$enable_threads = xyes ]]; then
1645 mips-sgi-irix4loser*) # Mostly like a MIPS.
1646 tm_file=mips/iris4loser.h
1647 if [[ x$stabs = xyes ]]; then
1648 tm_file="${tm_file} dbx.h"
1650 xm_file=mips/xm-iris4.h
1651 xmake_file=mips/x-iris
1652 if [[ x$gas = xyes ]]
1654 tmake_file=mips/t-mips-gas
1656 extra_passes="mips-tfile mips-tdump"
1658 if [[ x$gnu_ld != xyes ]]
1662 if [[ x$enable_threads = xyes ]]; then
1666 mips-sgi-irix4*) # Mostly like a MIPS.
1667 tm_file=mips/iris4.h
1668 if [[ x$stabs = xyes ]]; then
1669 tm_file="${tm_file} dbx.h"
1671 xm_file=mips/xm-iris4.h
1672 xmake_file=mips/x-iris
1673 if [[ x$gas = xyes ]]
1675 tmake_file=mips/t-mips-gas
1677 extra_passes="mips-tfile mips-tdump"
1679 if [[ x$gnu_ld != xyes ]]
1683 if [[ x$enable_threads = xyes ]]; then
1687 mips-sgi-*) # Mostly like a MIPS.
1688 tm_file=mips/iris3.h
1689 if [[ x$stabs = xyes ]]; then
1690 tm_file="${tm_file} dbx.h"
1692 xm_file=mips/xm-iris3.h
1693 xmake_file=mips/x-iris3
1694 if [[ x$gas = xyes ]]
1696 tmake_file=mips/t-mips-gas
1698 extra_passes="mips-tfile mips-tdump"
1700 if [[ x$gnu_ld != xyes ]]
1705 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1706 tm_file=mips/osfrose.h
1707 xmake_file=mips/x-osfrose
1708 tmake_file=mips/t-osfrose
1709 extra_objs=halfpic.o
1712 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1713 tm_file=mips/dec-osf1.h
1714 if [[ x$stabs = xyes ]]; then
1715 tm_file="${tm_file} dbx.h"
1717 xmake_file=mips/x-dec-osf1
1718 if [[ x$gas = xyes ]]
1720 tmake_file=mips/t-mips-gas
1722 tmake_file=mips/t-ultrix
1723 extra_passes="mips-tfile mips-tdump"
1725 if [[ x$gnu_ld != xyes ]]
1730 mips-dec-bsd*) # Decstation running 4.4 BSD
1731 tm_file=mips/dec-bsd.h
1733 if [[ x$gas = xyes ]]
1735 tmake_file=mips/t-mips-gas
1737 tmake_file=mips/t-ultrix
1738 extra_passes="mips-tfile mips-tdump"
1740 if [[ x$gnu_ld != xyes ]]
1745 mips-dec-netbsd*) # Decstation running NetBSD
1746 tm_file=mips/netbsd.h
1747 xm_file=mips/xm-netbsd.h
1748 # On NetBSD, the headers are already okay, except for math.h.
1749 fixincludes=fixinc.math
1752 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1753 tm_file=mips/news4.h
1754 if [[ x$stabs = xyes ]]; then
1755 tm_file="${tm_file} dbx.h"
1757 if [[ x$gas = xyes ]]
1759 tmake_file=mips/t-mips-gas
1761 extra_passes="mips-tfile mips-tdump"
1763 if [[ x$gnu_ld != xyes ]]
1767 xmake_file=mips/x-sony
1769 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1770 # That is based on svr4.
1771 # t-svr4 is not right because this system doesn't use ELF.
1772 tm_file=mips/news5.h
1773 if [[ x$stabs = xyes ]]; then
1774 tm_file="${tm_file} dbx.h"
1776 xm_file=mips/xm-news.h
1777 if [[ x$gas = xyes ]]
1779 tmake_file=mips/t-mips-gas
1781 extra_passes="mips-tfile mips-tdump"
1783 if [[ x$gnu_ld != xyes ]]
1788 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1789 tm_file=mips/svr4-t.h
1790 if [[ x$stabs = xyes ]]; then
1791 tm_file="${tm_file} dbx.h"
1793 xm_file=mips/xm-sysv4.h
1794 xmake_file=mips/x-sysv
1795 if [[ x$gas = xyes ]]
1797 tmake_file=mips/t-mips-gas
1798 extra_parts="crtbegin.o crtend.o"
1800 tmake_file=mips/t-mips
1801 extra_passes="mips-tfile mips-tdump"
1803 if [[ x$gnu_ld != xyes ]]
1808 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1809 tm_file=mips/ultrix.h
1810 if [[ x$stabs = xyes ]]; then
1811 tm_file="${tm_file} dbx.h"
1813 xmake_file=mips/x-ultrix
1814 if [[ x$gas = xyes ]]
1816 tmake_file=mips/t-mips-gas
1818 tmake_file=mips/t-ultrix
1819 extra_passes="mips-tfile mips-tdump"
1821 if [[ x$gnu_ld != xyes ]]
1826 mips-*-riscos[[56789]]bsd*)
1827 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1828 if [[ x$stabs = xyes ]]; then
1829 tm_file="${tm_file} dbx.h"
1831 if [[ x$gas = xyes ]]
1833 tmake_file=mips/t-bsd-gas
1835 tmake_file=mips/t-bsd
1836 extra_passes="mips-tfile mips-tdump"
1838 if [[ x$gnu_ld != xyes ]]
1843 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1844 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1845 if [[ x$stabs = xyes ]]; then
1846 tm_file="${tm_file} dbx.h"
1848 if [[ x$gas = xyes ]]
1850 tmake_file=mips/t-bsd-gas
1852 tmake_file=mips/t-bsd
1853 extra_passes="mips-tfile mips-tdump"
1855 if [[ x$gnu_ld != xyes ]]
1860 mips-*-riscos[[56789]]sysv4*)
1861 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1862 if [[ x$stabs = xyes ]]; then
1863 tm_file="${tm_file} dbx.h"
1865 xm_file=mips/xm-sysv4.h
1866 xmake_file=mips/x-sysv
1867 if [[ x$gas = xyes ]]
1869 tmake_file=mips/t-svr4-gas
1871 tmake_file=mips/t-svr4
1872 extra_passes="mips-tfile mips-tdump"
1874 if [[ x$gnu_ld != xyes ]]
1879 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1880 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1881 if [[ x$stabs = xyes ]]; then
1882 tm_file="${tm_file} dbx.h"
1884 xm_file=mips/xm-sysv.h
1885 xmake_file=mips/x-sysv
1886 if [[ x$gas = xyes ]]
1888 tmake_file=mips/t-svr4-gas
1890 tmake_file=mips/t-svr4
1891 extra_passes="mips-tfile mips-tdump"
1893 if [[ x$gnu_ld != xyes ]]
1898 mips-*-riscos[[56789]]sysv*)
1899 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1900 if [[ x$stabs = xyes ]]; then
1901 tm_file="${tm_file} dbx.h"
1903 xm_file=mips/xm-sysv.h
1904 xmake_file=mips/x-sysv
1905 if [[ x$gas = xyes ]]
1907 tmake_file=mips/t-svr3-gas
1909 tmake_file=mips/t-svr3
1910 extra_passes="mips-tfile mips-tdump"
1912 if [[ x$gnu_ld != xyes ]]
1917 mips-*-sysv* | mips-*-riscos*sysv*)
1918 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1919 if [[ x$stabs = xyes ]]; then
1920 tm_file="${tm_file} dbx.h"
1922 xm_file=mips/xm-sysv.h
1923 xmake_file=mips/x-sysv
1924 if [[ x$gas = xyes ]]
1926 tmake_file=mips/t-svr3-gas
1928 tmake_file=mips/t-svr3
1929 extra_passes="mips-tfile mips-tdump"
1931 if [[ x$gnu_ld != xyes ]]
1936 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1937 tm_file=mips/mips-5.h
1938 if [[ x$stabs = xyes ]]; then
1939 tm_file="${tm_file} dbx.h"
1941 if [[ x$gas = xyes ]]
1943 tmake_file=mips/t-mips-gas
1945 extra_passes="mips-tfile mips-tdump"
1947 if [[ x$gnu_ld != xyes ]]
1955 tm_file=mips/ecoffl.h
1956 if [[ x$stabs = xyes ]]; then
1957 tm_file="${tm_file} dbx.h"
1959 tmake_file=mips/t-ecoff
1962 tm_file=mips/ecoff.h
1963 if [[ x$stabs = xyes ]]; then
1964 tm_file="${tm_file} dbx.h"
1966 tmake_file=mips/t-ecoff
1969 tm_file="mips/elfl.h libgloss.h"
1970 tmake_file=mips/t-ecoff
1973 tm_file="mips/elf.h libgloss.h"
1974 tmake_file=mips/t-ecoff
1977 tm_file="mips/elfl64.h libgloss.h"
1978 tmake_file=mips/t-ecoff
1980 mips64orionel-*-elf*)
1981 tm_file="mips/elflorion.h libgloss.h"
1982 tmake_file=mips/t-ecoff
1985 tm_file="mips/elf64.h libgloss.h"
1986 tmake_file=mips/t-ecoff
1989 tm_file="mips/elforion.h libgloss.h"
1990 tmake_file=mips/t-ecoff
1992 mips64orion-*-rtems*)
1993 tm_file=mips/rtems64.h
1994 tmake_file="mips/t-ecoff t-rtems"
1997 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
1998 tmake_file=mips/t-ecoff
2001 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2002 tmake_file=mips/t-ecoff
2004 mips-*-*) # Default MIPS RISC-OS 4.0.
2005 if [[ x$stabs = xyes ]]; then
2006 tm_file="${tm_file} dbx.h"
2008 if [[ x$gas = xyes ]]
2010 tmake_file=mips/t-mips-gas
2012 extra_passes="mips-tfile mips-tdump"
2014 if [[ x$gnu_ld != xyes ]]
2021 tm_file="mn10200/mn10200.h"
2022 if [[ x$stabs = xyes ]]
2024 tm_file="${tm_file} dbx.h"
2030 tm_file="mn10300/mn10300.h"
2031 if [[ x$stabs = xyes ]]
2033 tm_file="${tm_file} dbx.h"
2038 tm_file=ns32k/encore.h
2042 tm_file=ns32k/sequent.h
2046 tm_file=ns32k/tek6100.h
2050 tm_file=ns32k/tek6200.h
2053 # This has not been updated to GCC 2.
2055 # xm_file=ns32k/xm-genix.h
2056 # xmake_file=ns32k/x-genix
2057 # tm_file=ns32k/genix.h
2061 tm_file=ns32k/merlin.h
2065 tm_file=ns32k/pc532-mach.h
2069 tm_file=ns32k/pc532-min.h
2070 xm_file=ns32k/xm-pc532-min.h
2073 ns32k-pc532-netbsd*)
2074 tm_file=ns32k/netbsd.h
2075 xm_file=ns32k/xm-netbsd.h
2076 # On NetBSD, the headers are already okay, except for math.h.
2077 fixincludes=fixinc.math
2081 tm_file="${tm_file} pdp11/2bsd.h"
2087 xmake_file=pyr/x-pyr
2094 xmake_file=romp/x-mach
2097 powerpc-*-sysv* | powerpc-*-elf*)
2098 tm_file=rs6000/sysv4.h
2099 xm_file=rs6000/xm-sysv4.h
2100 extra_headers=ppc-asm.h
2101 if [[ x$gas = xyes ]]
2103 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2105 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2107 xmake_file=rs6000/x-sysv4
2110 tm_file=rs6000/eabiaix.h
2111 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2112 fixincludes=Makefile.in
2113 extra_headers=ppc-asm.h
2116 tm_file=rs6000/eabisim.h
2117 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2118 fixincludes=Makefile.in
2119 extra_headers=ppc-asm.h
2122 tm_file=rs6000/eabi.h
2123 if [[ x$gas = xyes ]]
2125 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2127 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2129 fixincludes=Makefile.in
2130 extra_headers=ppc-asm.h
2133 tm_file=rs6000/rtems.h
2134 if [[ x$gas = xyes ]]
2136 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2138 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2140 fixincludes=Makefile.in
2141 extra_headers=ppc-asm.h
2143 powerpc-*-linux-gnu*)
2144 tm_file=rs6000/linux.h
2145 xm_file=rs6000/xm-sysv4.h
2146 out_file=rs6000/rs6000.c
2147 if [[ x$gas = xyes ]]
2149 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2151 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2154 fixincludes=Makefile.in
2155 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2156 extra_headers=ppc-asm.h
2157 if [[ x$enable_threads = xyes ]]; then
2163 xm_file=rs6000/xm-sysv4.h
2164 tm_file=rs6000/vxppc.h
2165 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2166 extra_headers=ppc-asm.h
2168 powerpcle-*-sysv* | powerpcle-*-elf*)
2169 tm_file=rs6000/sysv4le.h
2170 xm_file=rs6000/xm-sysv4.h
2171 if [[ x$gas = xyes ]]
2173 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2175 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2177 xmake_file=rs6000/x-sysv4
2178 extra_headers=ppc-asm.h
2180 powerpcle-*-eabisim*)
2181 tm_file=rs6000/eabilesim.h
2182 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2183 fixincludes=Makefile.in
2184 extra_headers=ppc-asm.h
2187 tm_file=rs6000/eabile.h
2188 if [[ x$gas = xyes ]]
2190 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2192 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2194 fixincludes=Makefile.in
2195 extra_headers=ppc-asm.h
2197 powerpcle-*-winnt* )
2198 tm_file=rs6000/win-nt.h
2199 tmake_file=rs6000/t-winnt
2201 fixincludes=Makefile.in
2202 if [[ x$enable_threads = xyes ]]; then
2205 extra_headers=ppc-asm.h
2207 powerpcle-*-pe | powerpcle-*-cygwin32)
2208 tm_file=rs6000/cygwin32.h
2209 xm_file=rs6000/xm-cygwin32.h
2210 tmake_file=rs6000/t-winnt
2211 xmake_file=rs6000/x-cygwin32
2213 fixincludes=Makefile.in
2214 if [[ x$enable_threads = xyes ]]; then
2218 extra_headers=ppc-asm.h
2220 powerpcle-*-solaris2*)
2221 tm_file=rs6000/sol2.h
2222 xm_file=rs6000/xm-sysv4.h
2223 if [[ x$gas = xyes ]]
2225 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2227 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2229 xmake_file=rs6000/x-sysv4
2230 fixincludes=fixinc.math
2231 extra_headers=ppc-asm.h
2233 rs6000-ibm-aix3.[[01]]*)
2234 tm_file=rs6000/aix31.h
2235 xmake_file=rs6000/x-aix31
2238 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2239 tm_file=rs6000/aix3newas.h
2240 if [[ x$host != x$target ]]
2242 tmake_file=rs6000/t-xnewas
2244 tmake_file=rs6000/t-newas
2248 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2249 tm_file=rs6000/aix41.h
2250 if [[ x$host != x$target ]]
2252 tmake_file=rs6000/t-xnewas
2254 tmake_file=rs6000/t-newas
2256 xmake_file=rs6000/x-aix31
2266 tm_file=rs6000/mach.h
2267 xm_file=rs6000/xm-mach.h
2268 xmake_file=rs6000/x-mach
2272 tm_file=rs6000/lynx.h
2273 xm_file=rs6000/xm-lynx.h
2274 tmake_file=rs6000/t-rs6000
2275 xmake_file=rs6000/x-lynx
2283 tmake_file="sh/t-sh t-rtems"
2292 xm_file=sparc/xm-pbd.h
2294 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2295 tm_file=sparc/vxsparc.h
2296 tmake_file=sparc/t-vxsparc
2300 tmake_file=sparc/t-sparcbare
2301 tm_file="sparc/aout.h libgloss.h"
2304 tm_file=sparc/netbsd.h
2305 xm_file=sparc/xm-netbsd.h
2306 # On NetBSD, the headers are already okay, except for math.h.
2307 fixincludes=fixinc.math
2315 tmake_file=sparc/t-elf
2316 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2320 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2321 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2322 tm_file=sparc/linux-aout.h
2324 fixincludes=Makefile.in #On Linux, the headers are ok already.
2327 sparc-*-linux-gnulibc1*) # Sparc's running Linux, libc5
2328 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2330 tm_file=sparc/linux.h
2331 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2332 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2333 fixincludes=Makefile.in #On Linux, the headers are ok already.
2336 sparc-*-linux-gnu*) # Sparc's running Linux, libc6
2337 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2339 tm_file=sparc/linux.h
2340 tmake_file="t-linux sparc/t-linux"
2341 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2342 fixincludes=Makefile.in #On Linux, the headers are ok already.
2344 if [[ x$enable_threads = xyes ]]; then
2349 if [[ x$gas = xyes ]]
2351 tm_file=sparc/lynx.h
2353 tm_file=sparc/lynx-ng.h
2355 xm_file=sparc/xm-lynx.h
2356 tmake_file=sparc/t-sunos41
2360 tmake_file="sparc/t-sparcbare t-rtems"
2361 tm_file=sparc/rtems.h
2364 tm_file=sparc/sol2.h
2365 xm_file=sparc/xm-sol2.h
2366 tmake_file=sparc/t-sol2
2367 xmake_file=sparc/x-sysv4
2368 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2369 fixincludes=fixinc.svr4
2372 if [[ x$enable_threads = xyes ]]; then
2373 thread_file='solaris'
2377 tm_file=sparc/sunos4.h
2378 tmake_file=sparc/t-sunos40
2382 tm_file=sparc/sunos4.h
2383 tmake_file=sparc/t-sunos41
2385 if [[ x$gas = xyes ]]; then
2386 tm_file="${tm_file} sparc/sun4gas.h"
2390 tm_file=sparc/sun4o3.h
2394 tm_file=sparc/sysv4.h
2395 xm_file=sparc/xm-sysv4.h
2397 xmake_file=sparc/x-sysv4
2398 extra_parts="crtbegin.o crtend.o"
2401 xm_file=sparc/xm-sol2.h
2402 tm_file=sparc/vxsim.h
2403 tmake_file=sparc/t-vxsparc
2404 xmake_file=sparc/x-sysv4
2407 tm_file="sparc/splet.h libgloss.h"
2408 tmake_file=sparc/t-splet
2411 tm_file="sparc/litecoff.h libgloss.h"
2412 tmake_file=sparc/t-sparclite
2415 tm_file="sparc/lite.h aoutos.h libgloss.h"
2416 tmake_file=sparc/t-sparclite
2419 tmake_file=sparc/t-sp64
2420 tm_file=sparc/sp64-aout.h
2423 tmake_file=sparc/t-sp64
2424 tm_file=sparc/sp64-elf.h
2425 extra_parts="crtbegin.o crtend.o"
2427 sparc64-*-linux*) # 64-bit Sparc's running Linux
2428 tmake_file=sparc/t-sp64
2429 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2430 tm_file=sparc/linux64.h
2432 fixincludes=Makefile.in # On Linux, the headers are ok already.
2435 # This hasn't been upgraded to GCC 2.
2436 # tahoe-harris-*) # Harris tahoe, using COFF.
2437 # tm_file=tahoe/harris.h
2439 # tahoe-*-bsd*) # tahoe running BSD
2441 # This hasn't been upgraded to GCC 2.
2448 tm_file="v850/v850.h"
2449 xm_file="v850/xm-v850.h"
2450 if [[ x$stabs = xyes ]]
2452 tm_file="${tm_file} dbx.h"
2456 vax-*-bsd*) # vaxen running BSD
2460 vax-*-sysv*) # vaxen running system V
2461 tm_file="${tm_file} vax/vaxv.h"
2462 xm_file="${tm_file} vax/xm-vaxv.h"
2466 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2467 xm_file="${xm_file} xm-netbsd.h"
2468 # On NetBSD, the headers are already okay, except for math.h.
2469 fixincludes=fixinc.math
2473 vax-*-ultrix*) # vaxen running ultrix
2474 tm_file="${tm_file} vax/ultrix.h"
2478 vax-*-vms*) # vaxen running VMS
2479 xm_file=vax/xm-vms.h
2483 vax-*-*) # vax default entry
2487 xm_file="${xm_file} xm-svr3"
2491 echo "Configuration $machine not supported" 1>&2
2498 ;; # Existing Linux/GNU systems do not use the GNU setup.
2500 # On the GNU system, the setup is just about the same on
2501 # each different CPU. The specific machines that GNU
2502 # supports are matched above and just set $cpu_type.
2503 xm_file=${cpu_type}/xm-gnu.h
2504 tm_file=${cpu_type}/gnu.h
2505 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2506 # GNU always uses ELF.
2508 # GNU tools are the only tools.
2511 # On GNU, the headers are already okay.
2512 fixincludes=Makefile.in
2513 xmake_file=x-linux # These details are the same as Linux.
2514 tmake_file=t-gnu # These are not.
2517 fixincludes=fixinc.svr4
2518 xmake_try_sysv=x-sysv
2519 install_headers_dir=install-headers-cpio
2522 install_headers_dir=install-headers-cpio
2526 # Distinguish i[3456]86
2527 # Also, do not run mips-tfile on MIPS if using gas.
2528 # Process --with-cpu= for PowerPC/rs6000
2529 target_cpu_default2=
2532 target_cpu_default2=1
2535 target_cpu_default2=2
2538 target_cpu_default2=3
2543 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2546 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
2549 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2552 target_cpu_default2="MASK_CPU_EV5"
2556 if [[ x$gas = xyes ]]
2558 if [[ x$target_cpu_default2 = x ]]
2560 target_cpu_default2="MASK_GAS"
2562 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2566 mips*-*-ecoff* | mips*-*-elf*)
2567 if [[ x$gas = xyes ]]
2569 if [[ x$gnu_ld = xyes ]]
2571 target_cpu_default2=20
2573 target_cpu_default2=16
2578 if [[ x$gas = xyes ]]
2580 target_cpu_default2=16
2583 powerpc*-*-* | rs6000-*-*)
2584 case "x$with_cpu" in
2588 xcommon | xpower | xpower2 | xpowerpc | xrios \
2589 | xrios1 | xrios2 | xrsc | xrsc1 \
2590 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2591 | x403 | x505 | x801 | x821 | x823 | x860)
2592 target_cpu_default2="\"$with_cpu\""
2596 echo "--with-cpu must be passed a value" 1>&2
2601 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2607 case ".$with_cpu" in
2609 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2611 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2612 target_cpu_default2="TARGET_CPU_$with_cpu"
2615 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2622 if [[ x$target_cpu_default2 != x ]]
2624 if [[ x$target_cpu_default != x ]]
2626 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2628 target_cpu_default=$target_cpu_default2
2632 # No need for collect2 if we have the GNU linker.
2639 # Save data on machine being used to compile GCC in build_xm_file.
2640 # Save data on host machine in vars host_xm_file and host_xmake_file.
2641 if [[ x$pass1done = x ]]
2643 if [[ x"$xm_file" = x ]]
2644 then build_xm_file=$cpu_type/xm-$cpu_type.h
2645 else build_xm_file=$xm_file
2647 build_install_headers_dir=$install_headers_dir
2648 build_exeext=$exeext
2651 if [[ x$pass2done = x ]]
2653 if [[ x"$xm_file" = x ]]
2654 then host_xm_file=$cpu_type/xm-$cpu_type.h
2655 else host_xm_file=$xm_file
2657 if [[ x"$xmake_file" = x ]]
2658 then xmake_file=$cpu_type/x-$cpu_type
2660 host_xmake_file="$xmake_file"
2661 host_truncate_target=$truncate_target
2662 host_extra_gcc_objs=$extra_gcc_objs
2663 host_extra_objs=$extra_host_objs
2669 extra_objs="${host_extra_objs} ${extra_objs}"
2671 # Default the target-machine variables that were not explicitly set.
2672 if [[ x"$tm_file" = x ]]
2673 then tm_file=$cpu_type/$cpu_type.h; fi
2675 if [[ x$extra_headers = x ]]
2676 then extra_headers=; fi
2678 if [[ x"$xm_file" = x ]]
2679 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2681 md_file=$cpu_type/$cpu_type.md
2683 if [[ x$out_file = x ]]
2684 then out_file=$cpu_type/$cpu_type.c; fi
2686 if [[ x"$tmake_file" = x ]]
2687 then tmake_file=$cpu_type/t-$cpu_type
2690 if [[ x$float_format = x ]]
2691 then float_format=i64
2694 # Say what files are being used for the output code and MD file.
2695 echo "Using \`$srcdir/config/$out_file' to output insns."
2696 echo "Using \`$srcdir/config/$md_file' as machine description file."
2699 for f in $tm_file; do
2702 if [[ $count = ax ]]; then
2703 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2705 echo "Using the following target machine macro files:"
2706 for f in $tm_file; do
2707 echo " $srcdir/config/$f"
2712 for f in $host_xm_file; do
2715 if [[ $count = ax ]]; then
2716 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2718 echo "Using the following host machine macro files:"
2719 for f in $host_xm_file; do
2720 echo " $srcdir/config/$f"
2724 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2726 for f in $build_xm_file; do
2729 if [[ $count = ax ]]; then
2730 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2732 echo "Using the following build machine macro files:"
2733 for f in $build_xm_file; do
2734 echo " $srcdir/config/$f"
2739 if [[ x$thread_file = x ]]
2740 then thread_file='single'
2743 # Set up the header files.
2744 # $links is the list of header files to create.
2745 # $vars is the list of shell variables with file names to include.
2746 # auto-conf.h is the file containing items generated by autoconf and is
2747 # the first file included by config.h.
2748 host_xm_file="auto-config.h ${host_xm_file}"
2749 vars="host_xm_file tm_file xm_file build_xm_file"
2750 links="config.h tm.h tconfig.h hconfig.h"
2753 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2756 while [[ -n "$vars" ]]
2758 # set file to car of files, files to cdr of files
2759 set $vars; var=$1; shift; vars=$*
2760 set $links; link=$1; shift; links=$*
2764 # Define TARGET_CPU_DEFAULT if the system wants one.
2765 # This substitutes for lots of *.h files.
2766 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2768 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2771 for file in `eval echo '$'$var`; do
2772 echo "#include \"$file\"" >>$link
2776 # Truncate the target if necessary
2777 if [[ x$host_truncate_target != x ]]; then
2778 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2781 # Get the version number from the toplevel
2782 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2784 # Get an absolute path to the GCC top-level source directory
2790 # Conditionalize the makefile for this host machine.
2791 # Make-host contains the concatenation of all host makefile fragments
2792 # [there can be more than one]. This file is built by configure.frag.
2793 host_overrides=Make-host
2794 dep_host_xmake_file=
2795 for f in .. ${host_xmake_file}
2797 if [[ -f ${srcdir}/config/$f ]]
2799 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2803 # Conditionalize the makefile for this target machine.
2804 # Make-target contains the concatenation of all host makefile fragments
2805 # [there can be more than one]. This file is built by configure.frag.
2806 target_overrides=Make-target
2808 for f in .. ${tmake_file}
2810 if [[ -f ${srcdir}/config/$f ]]
2812 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2816 # If the host doesn't support symlinks, modify CC in
2817 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2818 # Otherwise, we can use "CC=$(CC)".
2820 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2822 cc_set_by_configure="\$(CC)"
2823 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2825 symbolic_link="cp -p"
2826 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2827 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2831 out_object_file=`basename $out_file .c`.o
2834 for f in $tm_file; do
2835 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2839 for f in $host_xm_file; do
2840 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2844 for f in $build_xm_file; do
2845 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2848 # Define macro CROSS_COMPILE in compilation
2849 # if this is a cross-compiler.
2850 # Also use all.cross instead of all.internal
2851 # and add cross-make to Makefile.
2852 cross_overrides="/dev/null"
2853 if [[ x$host != x$target ]]
2855 cross_defines="CROSS=-DCROSS_COMPILE"
2856 cross_overrides="${topdir}/cross-make"
2859 # When building gcc with a cross-compiler, we need to fix a few things.
2860 # This must come after cross-make as we want all.build to override
2862 build_overrides="/dev/null"
2863 if [[ x$build != x$host ]]
2865 build_overrides="${topdir}/build-make"
2868 # Expand extra_headers to include complete path.
2869 # This substitutes for lots of t-* files.
2871 if [[ "x$extra_headers" = x ]]
2874 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2875 for file in $extra_headers;
2877 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2881 # Add a definition of USE_COLLECT2 if system wants one.
2882 # Also tell toplev.c what to do.
2883 # This substitutes for lots of t-* files.
2884 if [[ x$use_collect2 = x ]]
2889 will_use_collect2="ld"
2890 maybe_use_collect2="-DUSE_COLLECT2"
2894 # Set MD_DEPS if the real md file is in md.pre-cpp.
2895 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2896 # for line oriented comments, so we must always use a GNU cpp. If
2897 # building gcc with a cross compiler, use the cross compiler just
2898 # built. Otherwise, we can use the cpp just built.
2900 if [[ "x$md_cppflags" = x ]]
2902 md_file_sub=$srcdir/config/$md_file
2907 # If we have gas in the build tree, make a link to it.
2908 if [[ -f ../gas/Makefile ]]; then
2909 rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null
2912 # If we have ld in the build tree, make a link to it.
2913 if [[ -f ../ld/Makefile ]]; then
2914 # if [[ x$use_collect2 = x ]]; then
2915 # rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null
2917 rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null
2921 # Figure out what language subdirectories are present.
2923 for lang in ${srcdir}/*/config-lang.in ..
2927 # The odd quoting in the next line works around
2928 # an apparent bug in bash 1.12 on linux.
2929 ${srcdir}/[[*]]/config-lang.in) ;;
2930 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2934 # Make empty files to contain the specs and options for each language.
2935 # Then add #include lines to for a compiler that has specs and/or options.
2939 rm -f specs.h options.h
2940 touch specs.h options.h
2941 for subdir in . $subdirs
2943 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2944 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2945 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2947 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2948 echo "#include \"$subdir/lang-options.h\"" >>options.h
2949 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2953 # These (without "all_") are set in each config-lang.in.
2954 # `language' must be a single word so is spelled singularly.
2960 all_outputs=Makefile
2961 # List of language makefile fragments.
2966 # Add the language fragments.
2967 # Languages are added via two mechanisms. Some information must be
2968 # recorded in makefile variables, these are defined in config-lang.in.
2969 # We accumulate them and plug them into the main Makefile.
2970 # The other mechanism is a set of hooks for each of the main targets
2971 # like `clean', `install', etc.
2973 language_fragments="Make-lang"
2974 language_hooks="Make-hooks"
2977 for s in .. $subdirs
2989 . ${srcdir}/$s/config-lang.in
2990 if [[ "x$language" = x ]]
2992 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2995 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2996 all_languages="$all_languages $language"
2997 if [[ "x$boot_language" = xyes ]]
2999 all_boot_languages="$all_boot_languages $language"
3001 all_compilers="$all_compilers $compilers"
3002 all_stagestuff="$all_stagestuff $stagestuff"
3003 all_diff_excludes="$all_diff_excludes $diff_excludes"
3004 all_headers="$all_headers $headers"
3005 all_outputs="$all_outputs $outputs"
3006 if [[ x$outputs = x ]]
3008 oldstyle_subdirs="$oldstyle_subdirs $s"
3010 all_lib2funcs="$all_lib2funcs $lib2funcs"
3014 # Since we can't use `::' targets, we link each language in
3015 # with a set of hooks, reached indirectly via lang.${target}.
3019 target_list="all.build all.cross start.encap rest.encap \
3021 install-normal install-common install-info install-man \
3023 mostlyclean clean distclean extraclean maintainer-clean \
3024 stage1 stage2 stage3 stage4"
3025 for t in $target_list
3028 for l in .. $all_languages
3030 if [[ $l != ".." ]]; then
3034 echo "lang.$t: $x" >> Make-hooks
3037 # If we're not building in srcdir, create .gdbinit.
3039 if [[ ! -f Makefile.in ]]; then
3040 echo "dir ." > .gdbinit
3041 echo "dir ${srcdir}" >> .gdbinit
3042 if [[ x$gdb_needs_out_file_path = xyes ]]
3044 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3046 if [[ "x$subdirs" != x ]]; then
3049 echo "dir ${srcdir}/$s" >> .gdbinit
3052 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3055 # If this is using newlib, then define inhibit_libc in
3056 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3057 # libgcc.a, but that's OK because newib should have its own version of
3060 if [[ x$with_newlib = xyes ]]; then
3061 inhibit_libc=-Dinhibit_libc
3063 AC_SUBST(inhibit_libc)
3065 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3068 if [[ x$enable_haifa = xyes ]]; then
3069 echo "Using the Haifa scheduler."
3071 sched_cflags=-DHAIFA
3073 AC_SUBST(sched_prefix)
3074 AC_SUBST(sched_cflags)
3075 if [[ x$enable_haifa != x ]]; then
3076 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3077 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3078 if [[ -f $x ]]; then
3085 # Process the language and host/target makefile fragments.
3086 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3088 # Substitute configuration variables
3090 AC_SUBST(all_languages)
3091 AC_SUBST(all_boot_languages)
3092 AC_SUBST(all_compilers)
3093 AC_SUBST(all_lang_makefiles)
3094 AC_SUBST(all_stagestuff)
3095 AC_SUBST(all_diff_excludes)
3096 AC_SUBST(all_lib2funcs)
3097 AC_SUBST(all_headers)
3098 AC_SUBST(extra_passes)
3099 AC_SUBST(extra_programs)
3100 AC_SUBST(extra_parts)
3101 AC_SUBST(extra_c_objs)
3102 AC_SUBST(extra_c_flags)
3103 AC_SUBST(extra_objs)
3104 AC_SUBST(host_extra_gcc_objs)
3105 AC_SUBST(extra_headers_list)
3106 AC_SUBST(dep_host_xmake_file)
3107 AC_SUBST(dep_tmake_file)
3109 AC_SUBST(out_object_file)
3111 AC_SUBST(tm_file_list)
3112 AC_SUBST(build_xm_file_list)
3113 AC_SUBST(host_xm_file_list)
3114 AC_SUBST(lang_specs_files)
3115 AC_SUBST(lang_options_files)
3116 AC_SUBST(thread_file)
3118 AC_SUBST(local_prefix)
3119 AC_SUBST(gxx_include_dir)
3120 AC_SUBST(fixincludes)
3121 AC_SUBST(build_install_headers_dir)
3122 AC_SUBST(build_exeext)
3123 AC_SUBST(float_format)
3124 AC_SUBST(will_use_collect2)
3125 AC_SUBST(maybe_use_collect2)
3126 AC_SUBST(cc_set_by_configure)
3127 AC_SUBST(stage_prefix_set_by_configure)
3129 AC_SUBST(symbolic_link)
3131 AC_SUBST_FILE(target_overrides)
3132 AC_SUBST_FILE(host_overrides)
3133 AC_SUBST(cross_defines)
3134 AC_SUBST_FILE(cross_overrides)
3135 AC_SUBST_FILE(build_overrides)
3136 AC_SUBST_FILE(language_fragments)
3137 AC_SUBST_FILE(language_hooks)
3139 # Echo that links are built
3140 if [[ x$host = x$target ]]
3148 if [[ x$host != x$build ]]
3150 str3=" on a $build system"
3153 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3158 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3160 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3162 echo " ${str2}${str3}." 1>&2
3165 # Configure the subdirectories
3166 # AC_CONFIG_SUBDIRS($subdirs)
3168 # Create the Makefile
3169 # and configure language subdirectories
3170 AC_OUTPUT($all_outputs,
3172 . $srcdir/configure.lang
3173 case x$CONFIG_HEADERS in
3174 xauto-config.h:config.in)
3177 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3178 # bootstrapping and the installation procedure can still use
3179 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3180 # FLAGS_TO_PASS has been modified to solve the problem there.
3181 # This is virtually a duplicate of what happens in configure.lang; we do
3182 # an extra check to make sure this only happens if ln -s can be used.
3183 if [[ "$symbolic_link" = "ln -s" ]]; then
3184 for d in .. ${subdirs} ; do
3185 if [[ $d != .. ]]; then
3188 for t in stage1 stage2 stage3 stage4 include
3191 $symbolic_link ../$t $t 2>/dev/null
3202 target_alias='${target_alias}'
3204 subdirs='${subdirs}'
3205 oldstyle_subdirs='${oldstyle_subdirs}'
3206 symbolic_link='${symbolic_link}'
3207 program_transform_set='${program_transform_set}'
3208 program_transform_name='${program_transform_name}'
3209 dep_host_xmake_file='${dep_host_xmake_file}'
3210 host_xmake_file='${host_xmake_file}'
3211 dep_tmake_file='${dep_tmake_file}'
3212 tmake_file='${tmake_file}'
3213 thread_file='${thread_file}'
3214 version='${version}'
3215 local_prefix='${local_prefix}'
3216 build_install_headers_dir='${build_install_headers_dir}'
3217 build_exeext='${build_exeext}'
3218 out_file='${out_file}'
3219 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3220 SET_MAKE='${SET_MAKE}'
3221 target_list='${target_list}'
3222 target_overrides='${target_overrides}'
3223 host_overrides='${host_overrides}'
3224 cross_defines='${cross_defines}'
3225 cross_overrides='${cross_overrides}'
3226 build_overrides='${build_overrides}'