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
31 # Check for additional parameters
35 [ --with-gnu-ld arrange to work with GNU ld.],
41 [ --with-gnu-as arrange to work with GNU as.],
47 [ --with-stabs arrange to use stabs instead of host debug format.],
53 [ --with-elf arrange to use ELF instead of host debug format.],
57 # Specify the local prefix
58 AC_ARG_WITH(local-prefix,
59 [ --with-local-prefix=DIR specifies directory to put local include.],
60 local_prefix=$with_local_prefix,
61 local_prefix=/usr/local)
63 # Default local prefix if it is empty
64 if [[ x$local_prefix = x ]]; then
65 local_prefix=/usr/local
68 # Specify the g++ header file directory
69 AC_ARG_WITH(gxx-include-dir,
70 [ --with-gxx-include-dir=DIR
71 specifies directory to put g++ header files.],
72 gxx_include_dir=$with_gxx_include_dir,
73 gxx_include_dir='${prefix}/include/g++')
75 # Default g++ header file directory if it is empty
76 if [[ x$gxx_include_dir = x ]]; then
77 gxx_include_dir='${prefix}/include/g++'
81 # Pass with no value to take the default
82 # Pass with a value to specify a thread package
83 AC_ARG_ENABLE(threads,
84 [ --enable-threads enable thread usage for target GCC.
85 --enable-threads=LIB use LIB thread package for target GCC.],
86 if [[[ x$enable_threads = xno ]]]; then
91 # Check if a valid thread package
92 case x${enable_threads} in
101 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
103 thread_file=$enable_threads
106 echo "$enable_threads is an unknown thread package" 1>&2
111 # Determine the host, build, and target systems
114 # Find some useful tools
122 # Find the native compiler
135 build_broken_install=
136 build_install_headers_dir=install-headers-tar
140 host_truncate_target=
142 # Decode the host machine, then the target machine.
143 # For the host machine, we save the xm_file variable as host_xm_file;
144 # then we decode the target machine and forget everything else
145 # that came from the host machine.
146 for machine in $build $host $target; do
159 # Set this to force installation and use of collect2.
161 # Set this to override the default target model.
163 # Set this to force use of install.sh.
165 # Set this to control which fixincludes program to use.
166 fixincludes=fixincludes
167 # Set this to control how the header file directory is installed.
168 install_headers_dir=install-headers-tar
169 # Set this to a non-empty list of args to pass to cpp if the target
170 # wants its .md file passed through cpp.
172 # Set this if directory names should be truncated to 14 characters.
174 # Set this if gdb needs a dir command with `dirname $out_file`
175 gdb_needs_out_file_path=
176 # Set this if the build machine requires executables to have a
180 # Set default cpu_type, tm_file and xm_file so it can be updated in
181 # each machine entry.
182 cpu_type=`echo $machine | sed 's/-.*$//'`
213 tm_file=${cpu_type}/${cpu_type}.h
214 xm_file=${cpu_type}/xm-${cpu_type}.h
217 # Support site-specific machine types.
219 cpu_type=`echo $machine | sed -e 's/-.*//'`
220 rest=`echo $machine | sed -e "s/$cpu_type-//"`
221 xm_file=${cpu_type}/xm-$rest.h
222 tm_file=${cpu_type}/$rest.h
223 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
224 then xmake_file=${cpu_type}/x-$rest; \
227 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
228 then tmake_file=${cpu_type}/t-$rest; \
234 a29k-*-bsd* | a29k-*-sym1*)
235 tm_file="${tm_file} a29k/unix.h"
236 xm_file=a29k/xm-unix.h
237 xmake_file=a29k/x-unix
240 a29k-*-udi | a29k-*-coff)
241 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
242 tmake_file=a29k/t-a29kbare
245 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
246 tmake_file=a29k/t-vx29k
247 extra_parts="crtbegin.o crtend.o"
249 a29k-*-*) # Default a29k environment.
252 alpha-*-linux-gnuecoff*)
253 tm_file="${tm_file} alpha/linux.h"
254 xm_file="${xm_file} alpha/xm-linux.h"
257 fixincludes=Makefile.in
261 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
262 xm_file="${xm_file} alpha/xm-linux.h"
265 fixincludes=Makefile.in
266 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
268 if [[ x$thread_file = x ]]; then
272 alpha-dec-osf[[456789]]*)
273 if [[ x$stabs = xyes ]]
275 tm_file="${tm_file} dbx.h"
277 if [[ x$gas != xyes ]]
279 extra_passes="mips-tfile mips-tdump"
283 # Some versions of OSF4 (specifically X4.0-9 296.7) have
284 # a broken tar, so we use cpio instead.
287 install_headers_dir=install-headers-cpio
291 alpha-dec-osf[[23]]*)
292 tm_file="${tm_file} alpha/osf2or3.h"
293 if [[ x$stabs = xyes ]]
295 tm_file="${tm_file} dbx.h"
297 if [[ x$gas != xyes ]]
299 extra_passes="mips-tfile mips-tdump"
305 tm_file="${tm_file} alpha/osf12.h"
306 if [[ x$stabs = xyes ]]
308 tm_file="${tm_file} dbx.h"
310 if [[ x$gas != xyes ]]
312 extra_passes="mips-tfile mips-tdump"
318 if [[ x$stabs = xyes ]]
320 tm_file="${tm_file} dbx.h"
322 if [[ x$gas != xyes ]]
324 extra_passes="mips-tfile mips-tdump"
330 tm_file="${tm_file} alpha/win-nt.h"
331 target_cpu_default=64
332 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
334 xmake_file=winnt/x-winnt
335 extra_host_objs=oldnames.o
336 extra_gcc_objs="spawnv.o oldnames.o"
337 fixincludes=fixinc.winnt
338 if [[ x$gnu_ld != xyes ]]
340 extra_programs=ld.exe
342 if [[ x$thread_file = x ]]; then
348 xm_file="${xm_file} alpha/xm-vms.h"
349 tmake_file=alpha/t-vms
350 fixincludes=Makefile.in
352 arm-*-coff* | armel-*-coff*)
354 tmake_file=arm/t-bare
356 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
357 tm_file=arm/riscix1-1.h
360 arm-*-riscix*) # Acorn RISC machine
361 if [[ x$gas = xyes ]]
363 tm_file=arm/rix-gas.h
367 xmake_file=arm/x-riscix
368 tmake_file=arm/t-riscix
371 arm-semi-aout | armel-semi-aout)
373 tmake_file=arm/t-semi
374 fixincludes=Makefile.in # There is nothing to fix
376 arm-semi-aof | armel-semi-aof)
377 tm_file=arm/semiaof.h
378 tmake_file=arm/t-semiaof
379 fixincludes=Makefile.in # There is nothing to fix
381 arm-*-linux-gnuaout*) # ARM Linux
383 xm_file=arm/xm-linux.h
385 tm_file=arm/linux-gas.h
386 tmake_file=arm/t-linux
387 fixincludes=Makefile.in
391 arm-*-*) # generic version
393 c1-convex-*) # Convex C1
396 fixincludes=Makefile.in
398 c2-convex-*) # Convex C2
401 fixincludes=Makefile.in
406 fixincludes=Makefile.in
411 fixincludes=Makefile.in
414 target_cpu_default=16
416 fixincludes=Makefile.in
418 clipper-intergraph-clix*)
419 tm_file="${tm_file} svr3.h clipper/clix.h"
420 xm_file=clipper/xm-clix.h
421 xmake_file=clipper/x-clix
422 extra_headers=va-clipper.h
423 extra_parts="crtbegin.o crtend.o"
424 install_headers_dir=install-headers-cpio
432 # This hasn't been upgraded to GCC 2.
433 # fx80-alliant-*) # Alliant FX/80
439 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
440 xm_file=pa/xm-papro.h
445 tm_file="${tm_file} pa/pa-osf.h"
447 fixincludes=Makefile.in
450 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
451 xm_file=pa/xm-papro.h
455 tm_file="${tm_file} pa/pa-osf.h"
457 fixincludes=Makefile.in
462 fixincludes=Makefile.in
466 fixincludes=Makefile.in
469 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
470 xm_file=pa/xm-pahpux.h
471 xmake_file=pa/x-pa-hpux
472 if [[ x$gas = xyes ]]
474 tm_file="${tm_file} pa/gas.h"
477 install_headers_dir=install-headers-cpio
480 hppa1.0-*-hpux8.0[[0-2]]*)
481 tm_file="${tm_file} pa/pa-hpux.h"
482 xm_file=pa/xm-pahpux.h
483 xmake_file=pa/x-pa-hpux
484 if [[ x$gas = xyes ]]
486 tm_file="${tm_file} pa/pa-gas.h"
488 tm_file="pa/pa-oldas.h ${tm_file}"
491 install_headers_dir=install-headers-cpio
494 hppa1.1-*-hpux8.0[[0-2]]*)
496 tm_file="${tm_file} pa/pa-hpux.h"
497 xm_file=pa/xm-pahpux.h
498 xmake_file=pa/x-pa-hpux
499 if [[ x$gas = xyes ]]
501 tm_file="${tm_file} pa/pa-gas.h"
503 tm_file="pa/pa-oldas.h ${tm_file}"
506 install_headers_dir=install-headers-cpio
511 tm_file="${tm_file} pa/pa-hpux.h"
512 xm_file=pa/xm-pahpux.h
513 xmake_file=pa/x-pa-hpux
514 if [[ x$gas = xyes ]]
516 tm_file="${tm_file} pa/pa-gas.h"
519 install_headers_dir=install-headers-cpio
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"
531 install_headers_dir=install-headers-cpio
536 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
537 xm_file=pa/xm-pahpux.h
538 xmake_file=pa/x-pa-hpux
539 if [[ x$gas = xyes ]]
541 tm_file="${tm_file} pa/pa-gas.h"
544 install_headers_dir=install-headers-cpio
548 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
549 xm_file=pa/xm-pahpux.h
550 xmake_file=pa/x-pa-hpux
551 if [[ x$gas = xyes ]]
553 tm_file="${tm_file} pa/pa-gas.h"
556 install_headers_dir=install-headers-cpio
561 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
562 xm_file=pa/xm-pahpux.h
563 xmake_file=pa/x-pa-hpux
564 if [[ x$gas = xyes ]]
566 tm_file="${tm_file} pa/pa-gas.h"
569 install_headers_dir=install-headers-cpio
573 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
574 xm_file=pa/xm-pahpux.h
575 xmake_file=pa/x-pa-hpux
576 if [[ x$gas = xyes ]]
578 tm_file="${tm_file} pa/pa-gas.h"
581 install_headers_dir=install-headers-cpio
586 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.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"
594 install_headers_dir=install-headers-cpio
598 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
599 xm_file=pa/xm-pahpux.h
600 xmake_file=pa/x-pa-hpux
601 if [[ x$gas = xyes ]]
603 tm_file="${tm_file} pa/pa-gas.h"
606 install_headers_dir=install-headers-cpio
612 fixincludes=Makefile.in
616 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
617 if [[ x$gas = xyes ]]
619 tm_file=i386/aix386.h
620 extra_parts="crtbegin.o crtend.o"
621 tmake_file=i386/t-crtstuff
623 tm_file=i386/aix386ng.h
626 xm_file=i386/xm-aix.h
627 xmake_file=i386/x-aix
630 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
631 xm_file=i386/xm-sysv4.h
632 xmake_file=i386/x-ncr3000
633 if [[ x$stabs = xyes -a x$gas = xyes ]]
635 tm_file=i386/sysv4gdb.h
639 extra_parts="crtbegin.o crtend.o"
640 tmake_file=i386/t-crtpic
644 xm_file=i386/xm-next.h
645 tmake_file=i386/t-next
646 xmake_file=i386/x-next
647 extra_objs=nextstep.o
648 if [[ x$thread_file = x ]]; then
652 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
654 if [[ x$gas = xyes ]]
656 tm_file=i386/seq-gas.h
658 tm_file=i386/sequent.h
661 i[[3456]]86-sequent-ptx1*)
662 xm_file=i386/xm-sysv3.h
663 xmake_file=i386/x-sysv3
664 tm_file=i386/seq-sysv3.h
665 tmake_file=i386/t-crtstuff
666 fixincludes=fixinc.ptx
667 extra_parts="crtbegin.o crtend.o"
668 install_headers_dir=install-headers-cpio
671 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
672 xm_file=i386/xm-sysv3.h
673 xmake_file=i386/x-sysv3
674 tm_file=i386/seq2-sysv3.h
675 tmake_file=i386/t-crtstuff
676 extra_parts="crtbegin.o crtend.o"
677 fixincludes=fixinc.ptx
678 install_headers_dir=install-headers-cpio
681 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
682 xm_file=i386/xm-sysv4.h
684 tm_file=i386/ptx4-i.h
686 extra_parts="crtbegin.o crtend.o"
687 fixincludes=fixinc.ptx
688 install_headers_dir=install-headers-cpio
691 i386-sun-sunos*) # Sun i386 roadrunner
692 xm_file=i386/xm-sun.h
697 tm_file=i386/i386-aout.h
698 tmake_file=i386/t-i386bare
700 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
701 tm_file=i386/bsd386.h
702 xm_file=i386/xm-bsd386.h
703 # tmake_file=t-libc-ok
706 tm_file=i386/386bsd.h
707 xm_file=i386/xm-bsd386.h
708 # tmake_file=t-libc-ok
709 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
712 i[[3456]]86-*-freebsdelf*)
713 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
714 xm_file=i386/xm-freebsd.h
715 # On FreeBSD, the headers are already ok.
716 fixincludes=Makefile.in
717 tmake_file=i386/t-freebsd
722 i[[3456]]86-*-freebsd*)
723 tm_file=i386/freebsd.h
724 xm_file=i386/xm-freebsd.h
725 # On FreeBSD, the headers are already ok.
726 fixincludes=Makefile.in
727 tmake_file=i386/t-freebsd
729 i[[3456]]86-*-netbsd*)
730 tm_file=i386/netbsd.h
731 xm_file=i386/xm-netbsd.h
732 # On NetBSD, the headers are already okay.
733 fixincludes=Makefile.in
737 tm_file=i386/i386-coff.h
738 tmake_file=i386/t-i386bare
740 i[[3456]]86-*-isc*) # 80386 running ISC system
741 xm_file=i386/xm-isc.h
743 i[[345]]86-*-isc[[34]]*)
744 xmake_file=i386/x-isc3
747 xmake_file=i386/x-isc
750 if [[ x$gas = xyes -a x$stabs = xyes ]]
752 tm_file=i386/iscdbx.h
753 tmake_file=i386/t-svr3dbx
754 extra_parts="svr3.ifile svr3z.ifile"
756 tm_file=i386/isccoff.h
757 tmake_file=i386/t-crtstuff
758 extra_parts="crtbegin.o crtend.o"
760 install_headers_dir=install-headers-cpio
763 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
764 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
765 xmake_file=x-linux-aout
766 tmake_file="t-linux-aout i386/t-crtstuff"
767 tm_file=i386/linux-oldld.h
768 fixincludes=Makefile.in #On Linux, the headers are ok already.
772 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
773 xm_file=i386/xm-linux.h # with a.out format
774 xmake_file=x-linux-aout
775 tmake_file="t-linux-aout i386/t-crtstuff"
776 tm_file=i386/linux-aout.h
777 fixincludes=Makefile.in #On Linux, the headers are ok already.
781 i[[3456]]86-*-linux-gnulibc1)
782 xm_file=i386/xm-linux.h # Intel 80386's running Linux
783 xmake_file=x-linux # with ELF format using the
784 tm_file=i386/linux.h # Linux C library 5
785 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
786 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
787 fixincludes=Makefile.in #On Linux, the headers are ok already.
790 if [[ x$thread_file = x ]]; then
794 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
795 xm_file=i386/xm-linux.h # with ELF format using glibc 2
796 xmake_file=x-linux # aka Linux C library 6
798 tmake_file="t-linux i386/t-crtstuff"
799 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
800 fixincludes=Makefile.in #On Linux, the headers are ok already.
803 if [[ x$thread_file = x ]]; then
809 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
810 xm_file=i386/xm-go32.h
812 tmake_file=i386/t-go32
814 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
817 fixincludes=Makefile.in
821 i[[3456]]86-*-lynxos*)
822 if [[ x$gas = xyes ]]
826 tm_file=i386/lynx-ng.h
828 xm_file=i386/xm-lynx.h
829 tmake_file=i386/t-i386bare
834 # tmake_file=t-libc-ok
837 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
838 if [[ x$elf = xyes ]]
840 tm_file=i386/osfelf.h
843 tm_file=i386/osfrose.h
846 xm_file=i386/xm-osf.h
847 xmake_file=i386/x-osfrose
848 tmake_file=i386/t-osf
851 i[[345]]86-go32-rtems*)
853 xm_file=i386/xm-go32.h
854 tm_file=i386/go32-rtems.h
855 tmake_file="i386/t-go32 t-rtems"
860 tmake_file="i386/t-i386bare t-rtems"
862 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
863 xm_file=i386/xm-sco5.h
864 xmake_file=i386/x-sco5
865 fixincludes=fixinc.sco
868 tmake_file=i386/t-sco5
869 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
871 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
872 xm_file=i386/xm-sco.h
873 xmake_file=i386/x-sco4
874 fixincludes=fixinc.sco
876 install_headers_dir=install-headers-cpio
877 if [[ x$stabs = xyes ]]
879 tm_file=i386/sco4dbx.h
880 tmake_file=i386/t-svr3dbx
881 extra_parts="svr3.ifile svr3z.rfile"
884 tmake_file=i386/t-crtstuff
885 extra_parts="crtbegin.o crtend.o"
889 i[[3456]]86-*-sco*) # 80386 running SCO system
890 xm_file=i386/xm-sco.h
891 xmake_file=i386/x-sco
893 install_headers_dir=install-headers-cpio
894 if [[ x$stabs = xyes ]]
896 tm_file=i386/scodbx.h
897 tmake_file=i386/t-svr3dbx
898 extra_parts="svr3.ifile svr3z.rfile"
901 extra_parts="crtbegin.o crtend.o"
902 tmake_file=i386/t-crtstuff
906 i[[3456]]86-*-solaris2*)
907 xm_file=i386/xm-sysv4.h
908 if [[ x$stabs = xyes ]]
910 tm_file=i386/sol2dbg.h
914 tmake_file=i386/t-sol2
915 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
917 fixincludes=fixinc.svr4
919 if [[ x$thread_file = x ]]; then
920 thread_file='solaris'
923 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
924 xm_file=i386/xm-sysv4.h
926 if [[ x$stabs = xyes ]]
928 tm_file="${tm_file} dbx.h"
930 tmake_file=i386/t-crtpic
932 extra_parts="crtbegin.o crtend.o"
934 i[[3456]]86-*-sysv*) # Intel 80386's running system V
935 xm_file=i386/xm-sysv3.h
936 xmake_file=i386/x-sysv3
937 if [[ x$gas = xyes ]]
939 if [[ x$stabs = xyes ]]
941 tm_file=i386/svr3dbx.h
942 tmake_file=i386/t-svr3dbx
943 extra_parts="svr3.ifile svr3z.rfile"
945 tm_file=i386/svr3gas.h
946 extra_parts="crtbegin.o crtend.o"
947 tmake_file=i386/t-crtstuff
951 extra_parts="crtbegin.o crtend.o"
952 tmake_file=i386/t-crtstuff
955 i386-*-vsta) # Intel 80386's running VSTa kernel
956 xm_file=i386/xm-vsta.h
958 tmake_file=i386/t-vsta
959 xmake_file=i386/x-vsta
961 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
962 xm_file="${xm_file} i386/xm-cygwin32.h"
963 tmake_file=i386/t-cygwin32
964 tm_file=i386/cygwin32.h
965 xmake_file=i386/x-cygwin32
967 fixincludes=Makefile.in
968 if [[ x$thread_file = x ]]; then
973 i[[3456]]86-*-mingw32)
974 tm_file=i386/mingw32.h
975 xm_file="${xm_file} i386/xm-mingw32.h"
976 tmake_file=i386/t-cygwin32
978 xmake_file=i386/x-cygwin32
979 fixincludes=Makefile.in
980 if [[ x$thread_file = x ]]; then
985 i[[3456]]86-*-winnt3*)
986 tm_file=i386/win-nt.h
988 xm_file=i386/xm-winnt.h
989 xmake_file=winnt/x-winnt
990 tmake_file=i386/t-winnt
991 extra_host_objs="winnt.o oldnames.o"
992 extra_gcc_objs="spawnv.o oldnames.o"
993 fixincludes=fixinc.winnt
994 if [[ x$gnu_ld != xyes ]]
996 extra_programs=ld.exe
998 if [[ x$thread_file = x ]]; then
1002 i[[3456]]86-dg-dgux)
1003 xm_file=i386/xm-dgux.h
1004 out_file=i386/dgux.c
1006 tmake_file=i386/t-dgux
1007 xmake_file=i386/x-dgux
1008 fixincludes=fixinc.dgux
1009 install_headers_dir=install-headers-cpio
1011 i860-alliant-*) # Alliant FX/2800
1012 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1013 xm_file="${xm_file} i860/xm-fx2800.h"
1014 xmake_file=i860/x-fx2800
1015 tmake_file=i860/t-fx2800
1016 extra_parts="crtbegin.o crtend.o"
1019 tm_file="${tm_file} i860/bsd.h"
1020 if [[ x$gas = xyes ]]
1022 tm_file="${tm_file} i860/bsd-gas.h"
1027 tm_file="${tm_file} i860/mach.h"
1028 tmake_file=t-libc-ok
1030 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1031 tm_file="${tm_file} svr3.h i860/paragon.h"
1032 xm_file="${xm_file} xm-svr3.h"
1037 tm_file="${tm_file} svr3.h i860/sysv3.h"
1038 xm_file="${tm_file} xm-svr3.h"
1039 xmake_file=i860/x-sysv3
1040 extra_parts="crtbegin.o crtend.o"
1043 tm_file="${tm_file} svr4.h i860/sysv4.h"
1044 xm_file="${xm_file} xm-svr3.h"
1045 xmake_file=i860/x-sysv4
1047 extra_parts="crtbegin.o crtend.o"
1049 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1050 tm_file="${tm_file} i960/vx960.h"
1051 tmake_file=i960/t-vxworks960
1055 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1056 tmake_file=i960/t-vxworks960
1060 tm_file="${tm_file} i960/vx960.h"
1061 tmake_file=i960/t-vxworks960
1065 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1066 tmake_file=i960/t-960bare
1070 tmake_file="i960/t-960bare t-rtems"
1071 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1074 i960-*-*) # Default i960 environment.
1078 extra_parts="crtinit.o crtfini.o"
1080 m68000-convergent-sysv*)
1082 xm_file=m68k/xm-3b1.h
1084 extra_headers=math-68881.h
1086 m68000-hp-bsd*) # HP 9000/200 running BSD
1087 tm_file=m68k/hp2bsd.h
1088 xmake_file=m68k/x-hp2bsd
1090 extra_headers=math-68881.h
1092 m68000-hp-hpux*) # HP 9000 series 300
1093 xm_file=m68k/xm-hp320.h
1094 if [[ x$gas = xyes ]]
1096 xmake_file=m68k/x-hp320g
1097 tm_file=m68k/hp310g.h
1099 xmake_file=m68k/x-hp320
1100 tm_file=m68k/hp310.h
1103 install_headers_dir=install-headers-cpio
1105 extra_headers=math-68881.h
1110 extra_headers=math-68881.h
1113 tm_file=m68k/sun2o4.h
1115 extra_headers=math-68881.h
1118 xm_file=m68k/xm-3b1.h
1119 if [[ x$gas = xyes ]]
1126 extra_headers=math-68881.h
1128 m68k-apple-aux*) # Apple Macintosh running A/UX
1129 xm_file=m68k/xm-aux.h
1130 tmake_file=m68k/t-aux
1132 install_headers_dir=install-headers-cpio
1133 extra_headers=math-68881.h
1134 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1136 if [[ "$gnu_ld" = yes ]]
1138 tm_file="${tm_file} m68k/auxgld.h"
1140 tm_file="${tm_file} m68k/auxld.h"
1142 if [[ "$gas" = yes ]]
1144 tm_file="${tm_file} m68k/auxgas.h"
1146 tm_file="${tm_file} m68k/auxas.h"
1148 tm_file="${tm_file} m68k/a-ux.h"
1151 tm_file=m68k/apollo68.h
1152 xmake_file=m68k/x-apollo68
1154 extra_headers=math-68881.h
1156 m68k-altos-sysv*) # Altos 3068
1157 if [[ x$gas = xyes ]]
1159 tm_file=m68k/altos3068.h
1160 xm_file=m68k/xm-altos3068.h
1162 echo "The Altos is supported only with the GNU assembler" 1>&2
1165 extra_headers=math-68881.h
1167 m68k-bull-sysv*) # Bull DPX/2
1168 if [[ x$gas = xyes ]]
1170 if [[ x$stabs = xyes ]]
1172 tm_file=m68k/dpx2cdbx.h
1174 tm_file=m68k/dpx2g.h
1179 xm_file=m68k/xm-m68kv.h
1180 xmake_file=m68k/x-dpx2
1182 extra_headers=math-68881.h
1184 m68k-atari-sysv4*) # Atari variant of V.4.
1185 tm_file=m68k/atari.h
1186 xm_file=m68k/xm-atari.h
1188 extra_parts="crtbegin.o crtend.o"
1189 extra_headers=math-68881.h
1191 m68k-motorola-sysv*)
1192 tm_file=m68k/mot3300.h
1193 xm_file=m68k/xm-mot3300.h
1194 if [[ x$gas = xyes ]]
1196 xmake_file=m68k/x-mot3300-gas
1197 if [[ x$gnu_ld = xyes ]]
1199 tmake_file=m68k/t-mot3300-gald
1201 tmake_file=m68k/t-mot3300-gas
1205 xmake_file=m68k/x-mot3300
1206 if [[ x$gnu_ld = xyes ]]
1208 tmake_file=m68k/t-mot3300-gld
1210 tmake_file=m68k/t-mot3300
1214 gdb_needs_out_file_path=yes
1215 extra_parts="crt0.o mcrt0.o"
1216 extra_headers=math-68881.h
1218 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1219 tm_file=m68k/tower-as.h
1220 xm_file=m68k/xm-tower.h
1221 xmake_file=m68k/x-tower
1222 extra_parts="crtbegin.o crtend.o"
1223 extra_headers=math-68881.h
1226 tm_file=m68k/plexus.h
1227 xm_file=m68k/xm-plexus.h
1229 extra_headers=math-68881.h
1233 xm_file=m68k/xm-m68kv.h
1234 extra_headers=math-68881.h
1237 xm_file=m68k/xm-crds.h
1238 xmake_file=m68k/x-crds
1242 extra_headers=math-68881.h
1244 m68k-cbm-sysv4*) # Commodore variant of V.4.
1246 xm_file=m68k/xm-amix.h
1247 xmake_file=m68k/x-amix
1249 extra_parts="crtbegin.o crtend.o"
1250 extra_headers=math-68881.h
1253 tm_file=m68k/ccur-GAS.h
1254 xmake_file=m68k/x-ccur
1255 extra_headers=math-68881.h
1259 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1260 tm_file=m68k/hp3bsd44.h
1261 xmake_file=m68k/x-hp3bsd44
1263 extra_headers=math-68881.h
1265 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1266 tm_file=m68k/hp3bsd.h
1268 extra_headers=math-68881.h
1271 if [[ x$with_fp = xno ]]
1273 tm_file=m68k/isi-nfp.h
1278 extra_headers=math-68881.h
1280 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1281 xm_file=m68k/xm-hp320.h
1282 if [[ x$gas = xyes ]]
1284 xmake_file=m68k/x-hp320g
1285 tm_file=m68k/hp320g.h
1287 xmake_file=m68k/x-hp320
1288 tm_file=m68k/hpux7.h
1291 install_headers_dir=install-headers-cpio
1293 extra_headers=math-68881.h
1295 m68k-hp-hpux*) # HP 9000 series 300
1296 xm_file=m68k/xm-hp320.h
1297 if [[ x$gas = xyes ]]
1299 xmake_file=m68k/x-hp320g
1300 tm_file=m68k/hp320g.h
1302 xmake_file=m68k/x-hp320
1303 tm_file=m68k/hp320.h
1306 install_headers_dir=install-headers-cpio
1308 extra_headers=math-68881.h
1311 tm_file=m68k/sun3mach.h
1313 extra_headers=math-68881.h
1316 if [[ x$gas = xyes ]]
1318 tm_file=m68k/news3gas.h
1320 tm_file=m68k/news3.h
1323 extra_headers=math-68881.h
1325 m68k-sony-bsd* | m68k-sony-newsos*)
1326 if [[ x$gas = xyes ]]
1328 tm_file=m68k/newsgas.h
1333 extra_headers=math-68881.h
1335 m68k-next-nextstep2*)
1336 tm_file=m68k/next21.h
1337 xm_file=m68k/xm-next.h
1338 tmake_file=m68k/t-next
1339 xmake_file=m68k/x-next
1340 extra_objs=nextstep.o
1341 extra_headers=math-68881.h
1344 m68k-next-nextstep3*)
1346 xm_file=m68k/xm-next.h
1347 tmake_file=m68k/t-next
1348 xmake_file=m68k/x-next
1349 extra_objs=nextstep.o
1350 extra_headers=math-68881.h
1351 if [[ x$thread_file = x ]]; then
1356 if [[ x$with_fp = xno ]]
1358 tm_file=m68k/sun3n3.h
1360 tm_file=m68k/sun3o3.h
1363 extra_headers=math-68881.h
1365 m68k-sun-sunos*) # For SunOS 4 (the default).
1366 if [[ x$with_fp = xno ]]
1368 tm_file=m68k/sun3n.h
1372 xm_file=m68k/xm-sun3.h
1374 extra_headers=math-68881.h
1377 tm_file=m68k/vxm68k.h
1378 tmake_file=m68k/t-vxworks68
1379 extra_headers=math-68881.h
1382 tmake_file=m68k/t-m68kbare
1383 tm_file="m68k/m68k-aout.h libgloss.h"
1384 extra_headers=math-68881.h
1387 tmake_file=m68k/t-m68kbare
1388 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1389 extra_headers=math-68881.h
1392 if [[ x$gas = xyes ]]
1396 tm_file=m68k/lynx-ng.h
1398 xm_file=m68k/xm-lynx.h
1400 tmake_file=m68k/t-lynx
1401 extra_headers=math-68881.h
1404 tm_file=m68k/netbsd.h
1405 xm_file=m68k/xm-netbsd.h
1406 # On NetBSD, the headers are already okay.
1407 fixincludes=Makefile.in
1410 m68k-*-sysv3*) # Motorola m68k's running system V.3
1411 xm_file=m68k/xm-m68kv.h
1412 xmake_file=m68k/x-m68kv
1413 extra_parts="crtbegin.o crtend.o"
1414 extra_headers=math-68881.h
1416 m68k-*-sysv4*) # Motorola m68k's running system V.4
1417 tm_file=m68k/m68kv4.h
1418 xm_file=m68k/xm-m68kv.h
1420 extra_parts="crtbegin.o crtend.o"
1421 extra_headers=math-68881.h
1423 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1424 xm_file=m68k/xm-linux.h # with a.out format
1426 tm_file=m68k/linux-aout.h
1427 tmake_file="t-linux-aout m68k/t-linux-aout"
1428 fixincludes=Makefile.in #On Linux, the headers are ok already.
1429 extra_headers=math-68881.h
1432 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1433 xm_file=m68k/xm-linux.h # with ELF format
1435 tm_file=m68k/linux.h
1436 tmake_file="t-linux m68k/t-linux"
1437 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1438 fixincludes=Makefile.in #On Linux, the headers are ok already.
1439 extra_headers=math-68881.h
1443 tmake_file=m68k/t-m68kbare
1444 tm_file=m68k/m68k-psos.h
1445 extra_headers=math-68881.h
1448 tmake_file="m68k/t-m68kbare t-rtems"
1449 tm_file=m68k/rtems.h
1450 extra_headers=math-68881.h
1456 tm_file=m88k/dguxbcs.h
1457 tmake_file=m88k/t-dguxbcs
1461 tmake_file=m88k/t-dgux
1464 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1466 xmake_file=m88k/x-dgux
1467 if [[ x$gas = xyes ]]
1469 tmake_file=m88k/t-dgux-gas
1471 fixincludes=fixinc.dgux
1473 m88k-dolphin-sysv3*)
1474 tm_file=m88k/dolph.h
1475 extra_parts="crtbegin.o crtend.o"
1476 xm_file=m88k/xm-sysv3.h
1477 xmake_file=m88k/x-dolph
1478 if [[ x$gas = xyes ]]
1480 tmake_file=m88k/t-m88k-gas
1483 m88k-tektronix-sysv3)
1484 tm_file=m88k/tekXD88.h
1485 extra_parts="crtbegin.o crtend.o"
1486 xm_file=m88k/xm-sysv3.h
1487 xmake_file=m88k/x-tekXD88
1488 if [[ x$gas = xyes ]]
1490 tmake_file=m88k/t-m88k-gas
1494 tm_file=m88k/m88k-aout.h
1497 tm_file=m88k/m88k-coff.h
1498 tmake_file=m88k/t-bug
1502 extra_parts="crtbegin.o crtend.o"
1503 if [[ x$gas = xyes ]]
1505 tmake_file=m88k/t-luna-gas
1507 tmake_file=m88k/t-luna
1511 tm_file=m88k/sysv3.h
1512 extra_parts="crtbegin.o crtend.o"
1513 xm_file=m88k/xm-sysv3.h
1514 xmake_file=m88k/x-sysv3
1515 if [[ x$gas = xyes ]]
1517 tmake_file=m88k/t-m88k-gas
1521 tm_file=m88k/sysv4.h
1522 extra_parts="crtbegin.o crtend.o"
1523 xmake_file=m88k/x-sysv4
1524 tmake_file=m88k/t-sysv4
1526 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1527 tm_file=mips/iris6.h
1528 xm_file=mips/xm-iris6.h
1530 fixincludes=fixinc.irix
1531 xmake_file=mips/x-iris6
1532 tmake_file=mips/t-iris6
1533 if [[ x$thread_file = x ]]; then
1537 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1538 tm_file=mips/cross64.h
1539 xm_file=mips/xm-iris5.h
1541 fixincludes=Makefile.in
1542 xmake_file=mips/x-iris
1543 tmake_file=mips/t-cross64
1544 # See comment in mips/iris[56].h files.
1546 if [[ x$thread_file = x ]]; then
1551 if [[ x$gas = xyes ]]
1553 if [[ x$stabs = xyes ]]
1555 tm_file=mips/iris5gdb.h
1557 tm_file=mips/sni-gas.h
1560 tm_file=mips/sni-svr4.h
1562 xm_file=mips/xm-sysv.h
1563 xmake_file=mips/x-sni-svr4
1564 tmake_file=mips/t-mips-gas
1565 if [[ x$gnu_ld != xyes ]]
1571 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1572 if [[ x$gas = xyes ]]
1574 tm_file=mips/iris5gas.h
1575 if [[ x$stabs = xyes ]]
1577 tm_file="${tm_file} dbx.h"
1580 tm_file=mips/iris5.h
1582 xm_file=mips/xm-iris5.h
1584 fixincludes=fixinc.irix
1585 xmake_file=mips/x-iris
1586 # mips-tfile doesn't work yet
1587 tmake_file=mips/t-mips-gas
1588 # See comment in mips/iris5.h file.
1590 if [[ x$thread_file = x ]]; then
1594 mips-sgi-irix4loser*) # Mostly like a MIPS.
1595 tm_file=mips/iris4loser.h
1596 if [[ x$stabs = xyes ]]; then
1597 tm_file="${tm_file} dbx.h"
1599 xm_file=mips/xm-iris4.h
1601 xmake_file=mips/x-iris
1602 if [[ x$gas = xyes ]]
1604 tmake_file=mips/t-mips-gas
1606 extra_passes="mips-tfile mips-tdump"
1608 if [[ x$gnu_ld != xyes ]]
1612 if [[ x$thread_file = x ]]; then
1616 mips-sgi-irix4*) # Mostly like a MIPS.
1617 tm_file=mips/iris4.h
1618 if [[ x$stabs = xyes ]]; then
1619 tm_file="${tm_file} dbx.h"
1621 xm_file=mips/xm-iris4.h
1623 xmake_file=mips/x-iris
1624 if [[ x$gas = xyes ]]
1626 tmake_file=mips/t-mips-gas
1628 extra_passes="mips-tfile mips-tdump"
1630 if [[ x$gnu_ld != xyes ]]
1634 if [[ x$thread_file = x ]]; then
1638 mips-sgi-*) # Mostly like a MIPS.
1639 tm_file=mips/iris3.h
1640 if [[ x$stabs = xyes ]]; then
1641 tm_file="${tm_file} dbx.h"
1643 xm_file=mips/xm-iris3.h
1645 xmake_file=mips/x-iris3
1646 if [[ x$gas = xyes ]]
1648 tmake_file=mips/t-mips-gas
1650 extra_passes="mips-tfile mips-tdump"
1652 if [[ x$gnu_ld != xyes ]]
1657 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1658 tm_file=mips/osfrose.h
1659 xmake_file=mips/x-osfrose
1660 tmake_file=mips/t-osfrose
1661 extra_objs=halfpic.o
1664 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1665 tm_file=mips/dec-osf1.h
1666 if [[ x$stabs = xyes ]]; then
1667 tm_file="${tm_file} dbx.h"
1669 xmake_file=mips/x-dec-osf1
1670 if [[ x$gas = xyes ]]
1672 tmake_file=mips/t-mips-gas
1674 tmake_file=mips/t-ultrix
1675 extra_passes="mips-tfile mips-tdump"
1677 if [[ x$gnu_ld != xyes ]]
1682 mips-dec-bsd*) # Decstation running 4.4 BSD
1683 tm_file=mips/dec-bsd.h
1685 if [[ x$gas = xyes ]]
1687 tmake_file=mips/t-mips-gas
1689 tmake_file=mips/t-ultrix
1690 extra_passes="mips-tfile mips-tdump"
1692 if [[ x$gnu_ld != xyes ]]
1697 mips-dec-netbsd*) # Decstation running NetBSD
1698 tm_file=mips/netbsd.h
1699 xm_file=mips/xm-netbsd.h
1700 # On NetBSD, the headers are already okay.
1701 fixincludes=Makefile.in
1703 if [[ x$prefix = xNONE ]]; then
1704 prefix=$native_prefix
1706 prefix=$native_prefix
1708 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1709 tm_file=mips/news4.h
1710 if [[ x$stabs = xyes ]]; then
1711 tm_file="${tm_file} dbx.h"
1713 if [[ x$gas = xyes ]]
1715 tmake_file=mips/t-mips-gas
1717 extra_passes="mips-tfile mips-tdump"
1719 if [[ x$gnu_ld != xyes ]]
1723 xmake_file=mips/x-sony
1725 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1726 # That is based on svr4.
1727 # t-svr4 is not right because this system doesn't use ELF.
1728 tm_file=mips/news5.h
1729 if [[ x$stabs = xyes ]]; then
1730 tm_file="${tm_file} dbx.h"
1732 xm_file=mips/xm-news.h
1733 if [[ x$gas = xyes ]]
1735 tmake_file=mips/t-mips-gas
1737 extra_passes="mips-tfile mips-tdump"
1739 if [[ x$gnu_ld != xyes ]]
1744 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1745 tm_file=mips/svr4-t.h
1746 if [[ x$stabs = xyes ]]; then
1747 tm_file="${tm_file} dbx.h"
1749 xm_file=mips/xm-sysv4.h
1750 xmake_file=mips/x-sysv
1751 if [[ x$gas = xyes ]]
1753 tmake_file=mips/t-mips-gas
1754 extra_parts="crtbegin.o crtend.o"
1756 tmake_file=mips/t-mips
1757 extra_passes="mips-tfile mips-tdump"
1759 if [[ x$gnu_ld != xyes ]]
1765 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1766 tm_file=mips/ultrix.h
1767 if [[ x$stabs = xyes ]]; then
1768 tm_file="${tm_file} dbx.h"
1770 xmake_file=mips/x-ultrix
1771 if [[ x$gas = xyes ]]
1773 tmake_file=mips/t-mips-gas
1775 tmake_file=mips/t-ultrix
1776 extra_passes="mips-tfile mips-tdump"
1778 if [[ x$gnu_ld != xyes ]]
1783 mips-*-riscos[[56789]]bsd*)
1784 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1785 if [[ x$stabs = xyes ]]; then
1786 tm_file="${tm_file} dbx.h"
1788 if [[ x$gas = xyes ]]
1790 tmake_file=mips/t-bsd-gas
1792 tmake_file=mips/t-bsd
1793 extra_passes="mips-tfile mips-tdump"
1795 if [[ x$gnu_ld != xyes ]]
1801 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1802 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1803 if [[ x$stabs = xyes ]]; then
1804 tm_file="${tm_file} dbx.h"
1806 if [[ x$gas = xyes ]]
1808 tmake_file=mips/t-bsd-gas
1810 tmake_file=mips/t-bsd
1811 extra_passes="mips-tfile mips-tdump"
1813 if [[ x$gnu_ld != xyes ]]
1819 mips-*-riscos[[56789]]sysv4*)
1820 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
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-svr4-gas
1830 tmake_file=mips/t-svr4
1831 extra_passes="mips-tfile mips-tdump"
1833 if [[ x$gnu_ld != xyes ]]
1839 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1840 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1841 if [[ x$stabs = xyes ]]; then
1842 tm_file="${tm_file} dbx.h"
1844 xm_file=mips/xm-sysv.h
1845 xmake_file=mips/x-sysv
1846 if [[ x$gas = xyes ]]
1848 tmake_file=mips/t-svr4-gas
1850 tmake_file=mips/t-svr4
1851 extra_passes="mips-tfile mips-tdump"
1853 if [[ x$gnu_ld != xyes ]]
1859 mips-*-riscos[[56789]]sysv*)
1860 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1861 if [[ x$stabs = xyes ]]; then
1862 tm_file="${tm_file} dbx.h"
1864 xm_file=mips/xm-sysv.h
1865 xmake_file=mips/x-sysv
1866 if [[ x$gas = xyes ]]
1868 tmake_file=mips/t-svr3-gas
1870 tmake_file=mips/t-svr3
1871 extra_passes="mips-tfile mips-tdump"
1873 if [[ x$gnu_ld != xyes ]]
1879 mips-*-sysv* | mips-*-riscos*sysv*)
1880 tm_file=mips/svr3-4.h # MIPS System V.3, 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-svr3-gas
1890 tmake_file=mips/t-svr3
1891 extra_passes="mips-tfile mips-tdump"
1893 if [[ x$gnu_ld != xyes ]]
1899 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1900 tm_file=mips/mips-5.h
1901 if [[ x$stabs = xyes ]]; then
1902 tm_file="${tm_file} dbx.h"
1904 if [[ x$gas = xyes ]]
1906 tmake_file=mips/t-mips-gas
1908 extra_passes="mips-tfile mips-tdump"
1910 if [[ x$gnu_ld != xyes ]]
1919 tm_file=mips/ecoffl.h
1920 if [[ x$stabs = xyes ]]; then
1921 tm_file="${tm_file} dbx.h"
1923 tmake_file=mips/t-ecoff
1926 tm_file=mips/ecoff.h
1927 if [[ x$stabs = xyes ]]; then
1928 tm_file="${tm_file} dbx.h"
1930 tmake_file=mips/t-ecoff
1934 tm_file="mips/elfl.h libgloss.h"
1935 tmake_file=mips/t-ecoff
1938 tm_file="mips/elf.h libgloss.h"
1939 tmake_file=mips/t-ecoff
1942 tm_file="mips/elfl64.h libgloss.h"
1943 tmake_file=mips/t-ecoff
1945 mips64orionel-*-elf*)
1946 tm_file="mips/elflorion.h libgloss.h"
1947 tmake_file=mips/t-ecoff
1950 tm_file="mips/elf64.h libgloss.h"
1951 tmake_file=mips/t-ecoff
1954 tm_file="mips/elforion.h libgloss.h"
1955 tmake_file=mips/t-ecoff
1957 mips64orion-*-rtems*)
1958 tm_file=mips/rtems64.h
1959 tmake_file="mips/t-ecoff t-rtems"
1961 mips-*-*) # Default MIPS RISC-OS 4.0.
1962 if [[ x$stabs = xyes ]]; then
1963 tm_file="${tm_file} dbx.h"
1965 if [[ x$gas = xyes ]]
1967 tmake_file=mips/t-mips-gas
1969 extra_passes="mips-tfile mips-tdump"
1971 if [[ x$gnu_ld != xyes ]]
1978 tm_file="mn10200/mn10200.h"
1979 if [[ x$stabs = xyes ]]
1981 tm_file="${tm_file} dbx.h"
1987 tm_file="mn10300/mn10300.h"
1988 if [[ x$stabs = xyes ]]
1990 tm_file="${tm_file} dbx.h"
1995 tm_file=ns32k/encore.h
1999 tm_file=ns32k/sequent.h
2003 tm_file=ns32k/tek6100.h
2008 tm_file=ns32k/tek6200.h
2012 # This has not been updated to GCC 2.
2014 # xm_file=ns32k/xm-genix.h
2015 # xmake_file=ns32k/x-genix
2016 # tm_file=ns32k/genix.h
2017 # broken_install=yes
2021 tm_file=ns32k/merlin.h
2025 tm_file=ns32k/pc532-mach.h
2029 tm_file=ns32k/pc532-min.h
2030 xm_file=ns32k/xm-pc532-min.h
2033 ns32k-pc532-netbsd*)
2034 tm_file=ns32k/netbsd.h
2035 xm_file=ns32k/xm-netbsd.h
2036 # On NetBSD, the headers are already okay.
2037 fixincludes=Makefile.in
2041 tm_file="${tm_file} pdp11/2bsd.h"
2047 xmake_file=pyr/x-pyr
2054 xmake_file=romp/x-mach
2057 powerpc-*-sysv* | powerpc-*-elf*)
2058 tm_file=rs6000/sysv4.h
2059 xm_file=rs6000/xm-sysv4.h
2060 extra_headers=ppc-asm.h
2061 if [[ x$gas = xyes ]]
2063 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2065 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2067 xmake_file=rs6000/x-sysv4
2070 tm_file=rs6000/eabiaix.h
2071 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2072 fixincludes=Makefile.in
2073 extra_headers=ppc-asm.h
2076 tm_file=rs6000/eabisim.h
2077 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2078 fixincludes=Makefile.in
2079 extra_headers=ppc-asm.h
2082 tm_file=rs6000/eabi.h
2083 if [[ x$gas = xyes ]]
2085 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2087 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2089 fixincludes=Makefile.in
2090 extra_headers=ppc-asm.h
2093 tm_file=rs6000/rtems.h
2094 if [[ x$gas = xyes ]]
2096 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2098 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2100 fixincludes=Makefile.in
2101 extra_headers=ppc-asm.h
2103 powerpc-*-linux-gnu*)
2104 tm_file=rs6000/linux.h
2105 xm_file=rs6000/xm-sysv4.h
2106 out_file=rs6000/rs6000.c
2107 if [[ x$gas = xyes ]]
2109 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2111 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2113 xmake_file=rs6000/x-sysv4
2114 fixincludes=Makefile.in
2115 extra_headers=ppc-asm.h
2119 xm_file=rs6000/xm-sysv4.h
2120 tm_file=rs6000/vxppc.h
2121 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2122 extra_headers=ppc-asm.h
2124 powerpcle-*-sysv* | powerpcle-*-elf*)
2125 tm_file=rs6000/sysv4le.h
2126 xm_file=rs6000/xm-sysv4.h
2127 if [[ x$gas = xyes ]]
2129 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2131 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2133 xmake_file=rs6000/x-sysv4
2134 extra_headers=ppc-asm.h
2136 powerpcle-*-eabisim*)
2137 tm_file=rs6000/eabilesim.h
2138 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2139 fixincludes=Makefile.in
2140 extra_headers=ppc-asm.h
2143 tm_file=rs6000/eabile.h
2144 if [[ x$gas = xyes ]]
2146 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2148 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2150 fixincludes=Makefile.in
2151 extra_headers=ppc-asm.h
2153 powerpcle-*-winnt* )
2154 tm_file=rs6000/win-nt.h
2155 tmake_file=rs6000/t-winnt
2157 fixincludes=Makefile.in
2158 if [[ x$thread_file = x ]]; then
2161 extra_headers=ppc-asm.h
2163 powerpcle-*-pe | powerpcle-*-cygwin32)
2164 tm_file=rs6000/cygwin32.h
2165 xm_file=rs6000/xm-cygwin32.h
2166 tmake_file=rs6000/t-winnt
2167 xmake_file=rs6000/x-cygwin32
2169 fixincludes=Makefile.in
2170 if [[ x$thread_file = x ]]; then
2174 extra_headers=ppc-asm.h
2176 powerpcle-*-solaris2*)
2177 tm_file=rs6000/sol2.h
2178 xm_file=rs6000/xm-sysv4.h
2179 if [[ x$gas = xyes ]]
2181 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2183 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2185 xmake_file=rs6000/x-sysv4
2186 fixincludes=fixinc.svr4
2187 extra_headers=ppc-asm.h
2189 rs6000-ibm-aix3.[[01]]*)
2190 tm_file=rs6000/aix31.h
2191 xmake_file=rs6000/x-aix31
2194 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2195 tm_file=rs6000/aix3newas.h
2196 if [[ x$host != x$target ]]
2198 tmake_file=rs6000/t-xnewas
2200 tmake_file=rs6000/t-newas
2204 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2205 tm_file=rs6000/aix41.h
2206 if [[ x$host != x$target ]]
2208 tmake_file=rs6000/t-xnewas
2210 tmake_file=rs6000/t-newas
2212 xmake_file=rs6000/x-aix31
2222 tm_file=rs6000/mach.h
2223 xm_file=rs6000/xm-mach.h
2224 xmake_file=rs6000/x-mach
2228 tm_file=rs6000/lynx.h
2229 xm_file=rs6000/xm-lynx.h
2230 tmake_file=rs6000/t-rs6000
2231 xmake_file=rs6000/x-lynx
2243 xm_file=sparc/xm-pbd.h
2245 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2246 tm_file=sparc/vxsparc.h
2247 tmake_file=sparc/t-vxsparc
2251 tmake_file=sparc/t-sparcbare
2252 tm_file="sparc/aout.h libgloss.h"
2255 tm_file=sparc/netbsd.h
2256 xm_file=sparc/xm-netbsd.h
2257 # On NetBSD, the headers are already okay.
2258 fixincludes=Makefile.in
2264 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2265 xm_file=sparc/xm-linux.h
2266 tm_file=sparc/linux-aout.h
2268 fixincludes=Makefile.in #On Linux, the headers are ok already.
2272 sparc-*-linux-gnu*) # Sparc's running Linux, ELF
2273 xm_file=sparc/xm-linux.h
2274 tm_file=sparc/linux.h
2276 fixincludes=Makefile.in #On Linux, the headers are ok already.
2279 # Don't use it. Linux uses a slightly different one.
2280 # The real one comes with the Linux C library.
2281 #extra_parts="crtbegin.o crtend.o"
2284 if [[ x$gas = xyes ]]
2286 tm_file=sparc/lynx.h
2288 tm_file=sparc/lynx-ng.h
2290 xm_file=sparc/xm-lynx.h
2291 tmake_file=sparc/t-sunos41
2295 tmake_file="sparc/t-sparcbare t-rtems"
2296 tm_file=sparc/rtems.h
2299 tm_file=sparc/sol2.h
2300 xm_file=sparc/xm-sol2.h
2301 tmake_file=sparc/t-sol2
2302 xmake_file=sparc/x-sysv4
2303 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2304 fixincludes=fixinc.svr4
2306 if [[ x$thread_file = x ]]; then
2307 thread_file='solaris'
2311 tm_file=sparc/sunos4.h
2312 tmake_file=sparc/t-sunos40
2316 tm_file=sparc/sunos4.h
2317 tmake_file=sparc/t-sunos41
2321 tm_file=sparc/sun4o3.h
2325 tm_file=sparc/sysv4.h
2326 xm_file=sparc/xm-sysv4.h
2328 xmake_file=sparc/x-sysv4
2329 extra_parts="crtbegin.o crtend.o"
2332 xm_file=sparc/xm-sol2.h
2333 tm_file=sparc/vxsim.h
2334 tmake_file=sparc/t-vxsparc
2335 xmake_file=sparc/x-sysv4
2338 tm_file="sparc/splet.h libgloss.h"
2339 tmake_file=sparc/t-splet
2342 tm_file="sparc/litecoff.h libgloss.h"
2343 tmake_file=sparc/t-sparclite
2346 tm_file="sparc/lite.h aoutos.h libgloss.h"
2347 tmake_file=sparc/t-sparclite
2350 tmake_file=sparc/t-sp64
2351 tm_file=sparc/sp64-aout.h
2354 tmake_file=sparc/t-sp64
2355 tm_file=sparc/sp64-elf.h
2356 extra_parts="crtbegin.o crtend.o"
2358 # This hasn't been upgraded to GCC 2.
2359 # tahoe-harris-*) # Harris tahoe, using COFF.
2360 # tm_file=tahoe/harris.h
2362 # tahoe-*-bsd*) # tahoe running BSD
2364 # This hasn't been upgraded to GCC 2.
2369 vax-*-bsd*) # vaxen running BSD
2373 vax-*-sysv*) # vaxen running system V
2374 tm_file="${tm_file} vax/vaxv.h"
2375 xm_file="${tm_file} vax/xm-vaxv.h"
2379 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2380 xm_file="${xm_file} xm-netbsd.h"
2381 # On NetBSD, the headers are already okay.
2382 fixincludes=Makefile.in
2386 vax-*-ultrix*) # vaxen running ultrix
2387 tm_file="${tm_file} vax/ultrix.h"
2391 vax-*-vms*) # vaxen running VMS
2392 xm_file=vax/xm-vms.h
2396 vax-*-*) # vax default entry
2400 xm_file="${xm_file} xm-svr3"
2404 echo "Configuration $machine not supported" 1>&2
2411 ;; # Existing Linux/GNU systems do not use the GNU setup.
2413 # On the GNU system, the setup is just about the same on
2414 # each different CPU. The specific machines that GNU
2415 # supports are matched above and just set $cpu_type.
2416 xm_file=${cpu_type}/xm-gnu.h
2417 tm_file=${cpu_type}/gnu.h
2418 extra_parts="crtbegin.o crtend.o"
2419 # GNU always uses ELF.
2421 # GNU tools are the only tools.
2424 # On GNU, the headers are already okay.
2425 fixincludes=Makefile.in
2426 xmake_file=x-linux # These details are the same as Linux.
2427 tmake_file=t-gnu # These are not.
2430 fixincludes=fixinc.svr4
2431 xmake_try_sysv=x-sysv
2433 install_headers_dir=install-headers-cpio
2437 install_headers_dir=install-headers-cpio
2441 # Distinguish i[3456]86
2442 # Also, do not run mips-tfile on MIPS if using gas.
2443 # Process --with-cpu= for PowerPC/rs6000
2444 target_cpu_default2=
2447 target_cpu_default2=1
2450 target_cpu_default2=2
2453 target_cpu_default2=3
2456 if [[ x$gas = xyes ]]
2458 target_cpu_default2=4
2461 mips*-*-ecoff* | mips*-*-elf*)
2462 if [[ x$gas = xyes ]]
2464 if [[ x$gnu_ld = xyes ]]
2466 target_cpu_default2=20
2468 target_cpu_default2=16
2473 if [[ x$gas = xyes ]]
2475 target_cpu_default2=16
2478 powerpc*-*-* | rs6000-*-*)
2479 case "x$with_cpu" in
2483 xcommon | xpower | xpower2 | xpowerpc | xrios \
2484 | xrios1 | xrios2 | xrsc | xrsc1 \
2485 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2486 | x403 | x505 | x801 | x821 | x823 | x860)
2487 target_cpu_default2="'\"$with_cpu\"'"
2491 echo "--with-cpu must be passed a value" 1>&2
2496 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2502 case ".$with_cpu" in
2504 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2506 .supersparc | .ultrasparc | .v7 | .v8)
2507 target_cpu_default2="TARGET_CPU_$with_cpu"
2510 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2517 if [[ x$target_cpu_default2 != x ]]
2519 if [[ x$target_cpu_default != x ]]
2521 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2523 target_cpu_default=$target_cpu_default2
2527 # No need for collect2 if we have the GNU linker.
2534 # Save data on machine being used to compile GCC in build_xm_file.
2535 # Save data on host machine in vars host_xm_file and host_xmake_file.
2536 if [[ x$pass1done = x ]]
2538 if [[ x"$xm_file" = x ]]
2539 then build_xm_file=$cpu_type/xm-$cpu_type.h
2540 else build_xm_file=$xm_file
2542 build_broken_install=$broken_install
2543 build_install_headers_dir=$install_headers_dir
2544 build_exeext=$exeext
2547 if [[ x$pass2done = x ]]
2549 if [[ x"$xm_file" = x ]]
2550 then host_xm_file=$cpu_type/xm-$cpu_type.h
2551 else host_xm_file=$xm_file
2553 if [[ x"$xmake_file" = x ]]
2554 then xmake_file=$cpu_type/x-$cpu_type
2556 host_xmake_file="$xmake_file"
2557 host_truncate_target=$truncate_target
2558 host_extra_gcc_objs=$extra_gcc_objs
2559 host_extra_objs=$extra_host_objs
2565 extra_objs="${host_extra_objs} ${extra_objs}"
2567 # Default the target-machine variables that were not explicitly set.
2568 if [[ x"$tm_file" = x ]]
2569 then tm_file=$cpu_type/$cpu_type.h; fi
2571 if [[ x$extra_headers = x ]]
2572 then extra_headers=; fi
2574 if [[ x"$xm_file" = x ]]
2575 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2577 md_file=$cpu_type/$cpu_type.md
2579 if [[ x$out_file = x ]]
2580 then out_file=$cpu_type/$cpu_type.c; fi
2582 if [[ x"$tmake_file" = x ]]
2583 then tmake_file=$cpu_type/t-$cpu_type
2586 if [[ x$float_format = x ]]
2587 then float_format=i64
2590 # Say what files are being used for the output code and MD file.
2591 echo "Using \`$srcdir/config/$out_file' to output insns."
2592 echo "Using \`$srcdir/config/$md_file' as machine description file."
2595 for f in $tm_file; do
2598 if [[ $count = ax ]]; then
2599 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2601 echo "Using the following target machine macro files:"
2602 for f in $tm_file; do
2603 echo " $srcdir/config/$f"
2608 for f in $host_xm_file; do
2611 if [[ $count = ax ]]; then
2612 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2614 echo "Using the following host machine macro files:"
2615 for f in $host_xm_file; do
2616 echo " $srcdir/config/$f"
2620 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2622 for f in $build_xm_file; do
2625 if [[ $count = ax ]]; then
2626 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2628 echo "Using the following build machine macro files:"
2629 for f in $build_xm_file; do
2630 echo " $srcdir/config/$f"
2635 if [[ x$thread_file = x ]]
2636 then thread_file='single'
2639 # Set up the header files.
2640 # $links is the list of header files to create.
2641 # $vars is the list of shell variables with file names to include.
2642 vars="host_xm_file tm_file xm_file build_xm_file"
2643 links="config.h tm.h tconfig.h hconfig.h"
2646 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2649 while [[ -n "$vars" ]]
2651 # set file to car of files, files to cdr of files
2652 set $vars; var=$1; shift; vars=$*
2653 set $links; link=$1; shift; links=$*
2657 # Define TARGET_CPU_DEFAULT if the system wants one.
2658 # This substitutes for lots of *.h files.
2659 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2661 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2664 for file in `eval echo '$'$var`; do
2665 echo "#include \"$file\"" >>$link
2669 # Truncate the target if necessary
2670 if [[ x$host_truncate_target != x ]]; then
2671 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2674 # Get the version number from the toplevel
2675 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2677 # For the current directory and all of the language subdirectories,
2678 # do the rest of the script ...
2681 for lang in ${srcdir}/*/config-lang.in ..
2685 # The odd quoting in the next line works around
2686 # an apparent bug in bash 1.12 on linux.
2687 ${srcdir}/[[*]]/config-lang.in) ;;
2688 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2692 # Are we using gcc as the native compiler?
2694 *linux*) # All Linux's use gcc as the native compiler.
2695 if [[ x$prefix = xNONE ]]; then
2696 prefix=$native_prefix
2701 # Make empty files to contain the specs and options for each language.
2702 # Then add #include lines to for a compiler that has specs and/or options.
2706 rm -f specs.h options.h
2707 touch specs.h options.h
2708 for subdir in . $subdirs
2710 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2711 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2712 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2714 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2715 echo "#include \"$subdir/lang-options.h\"" >>options.h
2716 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2720 # Get an absolute path to the GCC top-level source directory
2726 # These (without "all_") are set in each config-lang.in.
2727 # `language' must be a single word so is spelled singularly.
2733 # List of language makefile fragments.
2738 host_overrides="Make-host"
2739 target_overrides="Make-target"
2740 cross_overrides="/dev/null"
2741 build_overrides="/dev/null"
2742 language_fragments="Make-lang"
2743 language_hooks="Make-hooks"
2746 for subdir in . $subdirs
2748 oldsrcdir=$savesrcdir
2750 # Re-adjust the path
2758 srcdir=$oldsrcdir/$subdir
2767 oldsrcdir=../${oldsrcdir}
2768 srcdir=$oldsrcdir/$subdir
2773 mainsrcdir=$oldsrcdir
2775 test -d $subdir || mkdir $subdir
2778 rm -f Make-host Make-target Make-hooks
2782 # Conditionalize the makefile for this host machine.
2783 dep_host_xmake_file=
2785 for f in .. ${host_xmake_file}
2787 if [[ -f ${mainsrcdir}/config/$f ]]
2789 cat ${mainsrcdir}/config/$f >> Make-host
2790 dep_host_xmake_file="${dep_host_xmake_file} \$(srcdir)/config/$f"
2794 # Set EXTRA_HEADERS according to extra_headers.
2795 # This substitutes for lots of t-* files.
2797 if [[ "x$extra_headers" = x ]]
2800 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2801 for file in $extra_headers;
2803 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2807 # Add a definition of USE_COLLECT2 if system wants one.
2808 # Also tell toplev.c what to do.
2809 # This substitutes for lots of t-* files.
2810 if [[ x$use_collect2 = x ]]
2815 will_use_collect2="ld"
2816 maybe_use_collect2="-DUSE_COLLECT2"
2820 # Set MD_DEPS if the real md file is in md.pre-cpp.
2821 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2822 # for line oriented comments, so we must always use a GNU cpp. If
2823 # building gcc with a cross compiler, use the cross compiler just
2824 # built. Otherwise, we can use the cpp just built.
2826 if [[ "x$md_cppflags" = x ]]
2828 md_file_sub=$srcdir/config/$md_file
2833 # If we have gas in the build tree, make a link to it.
2834 if [[ -f ../gas/Makefile ]]; then
2835 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2838 # If we have ld in the build tree, make a link to it.
2839 if [[ -f ../ld/Makefile ]]; then
2840 if [[ x$use_collect2 = x ]]; then
2841 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2843 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2847 # Conditionalize the makefile for this target machine.
2850 for f in .. ${tmake_file}
2852 if [[ -f ${mainsrcdir}/config/$f ]]
2854 cat ${mainsrcdir}/config/$f >> Make-target
2855 dep_tmake_file="${dep_tmake_file} \$(srcdir)/config/$f"
2859 # If this is the top level Makefile, add the language fragments.
2860 # Languages are added via two mechanisms. Some information must be
2861 # recorded in makefile variables, these are defined in config-lang.in.
2862 # We accumulate them and plug them into the main Makefile.
2863 # The other mechanism is a set of hooks for each of the main targets
2864 # like `clean', `install', etc.
2865 if [[ $subdir = . ]]
2867 for s in .. $subdirs
2876 . ${mainsrcdir}/$s/config-lang.in
2877 if [[ "x$language" = x ]]
2879 echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2882 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
2883 all_languages="$all_languages $language"
2884 if [[ "x$boot_language" = xyes ]]
2886 all_boot_languages="$all_boot_languages $language"
2888 all_compilers="$all_compilers $compilers"
2889 all_stagestuff="$all_stagestuff $stagestuff"
2890 all_diff_excludes="$all_diff_excludes $diff_excludes"
2891 all_headers="$all_headers $headers"
2892 all_lib2funcs="$all_lib2funcs $lib2funcs"
2896 # Since we can't use `::' targets, we link each language in
2897 # with a set of hooks, reached indirectly via lang.${target}.
2899 target_list="all.build all.cross start.encap rest.encap \
2901 install-normal install-common install-info install-man \
2903 mostlyclean clean distclean extraclean maintainer-clean \
2904 stage1 stage2 stage3 stage4"
2905 for t in $target_list
2908 for l in .. $all_languages
2910 if [[ $l != ".." ]]; then
2914 echo "lang.$t: $x" >> Make-hooks
2917 # If the host doesn't support symlinks, modify CC in
2918 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2919 # Otherwise, we can use "CC=$(CC)".
2921 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2923 cc_set_by_configure="\$(CC)"
2924 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2926 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2928 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2931 # Otherwise, this is a language subdirectory. If the host supports
2932 # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
2933 # installation procedure can still use CC="stage1/xgcc -Bstage1/".
2934 # If the host doesn't support symlinks, FLAGS_TO_PASS has been
2935 # modified to solve the problem there.
2937 for t in stage1 stage2 stage3 stage4 include
2940 $symbolic_link ../$t $t 2>/dev/null
2944 out_object_file=`basename $out_file .c`.o
2946 if [[ $subdir = . ]]
2949 for f in $tm_file; do
2950 tm_file_list="${tm_file_sub} \$(srcdir)/config/$f"
2954 for f in $host_xm_file; do
2955 host_xm_file_list="${host_xm_file_sub} \$(srcdir)/config/$f"
2959 for f in $build_xm_file; do
2960 build_xm_file_list="${build_xm_file_sub} \$(srcdir)/config/$f"
2964 # Remove all formfeeds, since some Makes get confused by them.
2965 # Also arrange to give the variables `target', `host_xmake_file',
2966 # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
2967 # `out_file', `out_object', `md_file', `lang_specs_files',
2968 # `lang_options_files', `INSTALL_HEADERS_DIR', and `CROSS_FLOAT_H'
2969 # values in the Makefile from the values they have in this script.
2972 for f in $tm_file; do
2973 tm_file_sub="${tm_file_sub} ${srcdir}/config/$f"
2977 for f in $host_xm_file; do
2978 host_xm_file_sub="${host_xm_file_sub} ${srcdir}/config/$f"
2982 for f in $build_xm_file; do
2983 build_xm_file_sub="${build_xm_file_sub} ${srcdir}/config/$f"
2986 # Define macro CROSS_COMPILE in compilation
2987 # if this is a cross-compiler.
2988 # Also use all.cross instead of all.internal
2989 # and add cross-make to Makefile.
2990 if [[ x$host != x$target ]]
2992 cross_defines="CROSS=-DCROSS_COMPILE"
2993 cross_overrides="${topdir}/cross-make"
2996 # When building gcc with a cross-compiler, we need to fix a few things.
2997 # This must come after cross-make as we want all.build to override
2999 if [[ x$build != x$host ]]
3001 build_overrides="${topdir}/build-make"
3005 done # end of current-dir SUBDIRS loop
3009 # Process the language fragments
3010 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs"
3012 # Substitute configuration variables
3014 AC_SUBST(all_languages)
3015 AC_SUBST(all_boot_languages)
3016 AC_SUBST(all_compilers)
3017 AC_SUBST(all_lang_makefiles)
3018 AC_SUBST(all_stagestuff)
3019 AC_SUBST(all_diff_excludes)
3020 AC_SUBST(all_lib2funcs)
3021 AC_SUBST(all_headers)
3022 AC_SUBST(extra_passes)
3023 AC_SUBST(extra_programs)
3024 AC_SUBST(extra_parts)
3025 AC_SUBST(extra_objs)
3026 AC_SUBST(host_extra_gcc_objs)
3027 AC_SUBST(extra_headers_list)
3028 AC_SUBST(dep_host_xmake_file)
3029 AC_SUBST(dep_tmake_file)
3031 AC_SUBST(out_object_file)
3033 AC_SUBST(tm_file_list)
3034 AC_SUBST(build_xm_file_list)
3035 AC_SUBST(host_xm_file_list)
3036 AC_SUBST(lang_specs_files)
3037 AC_SUBST(lang_options_files)
3038 AC_SUBST(thread_file)
3040 AC_SUBST(local_prefix)
3041 AC_SUBST(gxx_include_dir)
3042 AC_SUBST(fixincludes)
3043 AC_SUBST(build_install_headers_dir)
3045 AC_SUBST(float_format)
3046 AC_SUBST(will_use_collect2)
3047 AC_SUBST(maybe_use_collect2)
3048 AC_SUBST(cc_set_by_configure)
3049 AC_SUBST(stage_prefix_set_by_configure)
3051 AC_SUBST_FILE(target_overrides)
3052 AC_SUBST_FILE(host_overrides)
3053 AC_SUBST(cross_defines)
3054 AC_SUBST_FILE(cross_overrides)
3055 AC_SUBST_FILE(build_overrides)
3056 AC_SUBST_FILE(language_fragments)
3057 AC_SUBST_FILE(language_hooks)
3059 # Echo that links are built
3060 if [[ x$host = x$target ]]
3068 if [[ x$host != x$build ]]
3070 str3=" on a $build system"
3073 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3078 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3080 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3082 echo " ${str2}${str3}." 1>&2
3085 # Configure the subdirectories
3086 # AC_CONFIG_SUBDIRS($subdirs)
3088 # Create the Makefile
3089 # and configure language subdirectories
3091 . $srcdir/configure.lang,
3095 target_alias='${target_alias}'
3097 subdirs='${subdirs}'
3098 symbolic_link='${symbolic_link}'
3099 program_transform_set='${program_transform_set}'
3100 program_transform_name='${program_transform_name}'
3101 all_languages='${all_languages}'
3102 all_boot_languages='${all_boot_languages}'
3103 all_compilers='${all_compilers}'
3104 all_lang_makefiles='${all_lang_makefiles}'
3105 all_stagestuff='${all_stagestuff}'
3106 all_diff_excludes='${all_diff_excludes}'
3107 all_lib2funcs='${all_lib2funcs}'
3108 all_headers='${all_headers}'
3109 extra_headers='${extra_headers}'
3110 extra_passes='${extra_passes}'
3111 extra_programs='${extra_programs}'
3112 extra_parts='${extra_parts}'
3113 extra_objs='${extra_objs}'
3114 host_extra_gcc_objs='${host_extra_gcc_objs}'
3115 extra_headers_list='${extra_headers_list}'
3116 dep_host_xmake_file='${dep_host_xmake_file}'
3117 host_xmake_file='${host_xmake_file}'
3118 dep_tmake_file='${dep_tmake_file}'
3119 tmake_file='${tmake_file}'
3120 out_file='${out_file}'
3121 out_object_file='${out_object_file}'
3122 md_file='${md_file}'
3123 md_file_sub='${md_file_sub}'
3124 tm_file_list='${tm_file_list}'
3125 tm_file_sub='${tm_file_sub}'
3126 build_xm_file_list='${build_xm_file_list}'
3127 build_xm_file_sub='${build_xm_file_sub}'
3128 host_xm_file_list='${host_xm_file_list}'
3129 host_xm_file_sub='${host_xm_file_sub}'
3130 lang_specs_files='${lang_specs_files}'
3131 lang_options_files='${lang_options_files}'
3132 thread_file='${thread_file}'
3133 version='${version}'
3134 local_prefix='${local_prefix}'
3135 gxx_include_dir='${gxx_include_dir}'
3136 fixincludes='${fixincludes}'
3137 build_install_headers_dir='${build_install_headers_dir}'
3139 float_format='${float_format}'
3140 use_collect2='${use_collect2}'
3141 will_use_collect2='${will_use_collect2}'
3142 maybe_use_collect2='${maybe_use_collect2}'
3143 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3144 SET_MAKE='${SET_MAKE}'
3145 build_broken_install='${build_broken_install}'
3146 md_cppflags='${md_cppflags}'
3147 target_list='${target_list}'
3149 target_overrides='${target_overrides}'
3150 host_overrides='${host_overrides}'
3151 cross_defines='${cross_defines}'
3152 cross_overrides='${cross_overrides}'
3153 build_overrides='${build_overrides}'
3154 language_fragments='${language_fragments}'
3155 language_hooks='${language_hooks}'