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
133 build_broken_install=
134 build_install_headers_dir=install-headers-tar
138 host_truncate_target=
140 # Decode the host machine, then the target machine.
141 # For the host machine, we save the xm_file variable as host_xm_file;
142 # then we decode the target machine and forget everything else
143 # that came from the host machine.
144 for machine in $build $host $target; do
157 # Set this to force installation and use of collect2.
159 # Set this to override the default target model.
161 # Set this to force use of install.sh.
163 # Set this to control which fixincludes program to use.
164 fixincludes=fixincludes
165 # Set this to control how the header file directory is installed.
166 install_headers_dir=install-headers-tar
167 # Set this to a non-empty list of args to pass to cpp if the target
168 # wants its .md file passed through cpp.
170 # Set this if directory names should be truncated to 14 characters.
172 # Set this if gdb needs a dir command with `dirname $out_file`
173 gdb_needs_out_file_path=
174 # Set this if the build machine requires executables to have a
178 # Set default cpu_type, tm_file and xm_file so it can be updated in
179 # each machine entry.
180 cpu_type=`echo $machine | sed 's/-.*$//'`
211 tm_file=${cpu_type}/${cpu_type}.h
212 xm_file=${cpu_type}/xm-${cpu_type}.h
215 # Support site-specific machine types.
217 cpu_type=`echo $machine | sed -e 's/-.*//'`
218 rest=`echo $machine | sed -e "s/$cpu_type-//"`
219 xm_file=${cpu_type}/xm-$rest.h
220 tm_file=${cpu_type}/$rest.h
221 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
222 then xmake_file=${cpu_type}/x-$rest; \
225 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
226 then tmake_file=${cpu_type}/t-$rest; \
232 a29k-*-bsd* | a29k-*-sym1*)
233 tm_file="${tm_file} a29k/unix.h"
234 xm_file=a29k/xm-unix.h
235 xmake_file=a29k/x-unix
238 a29k-*-udi | a29k-*-coff)
239 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
240 tmake_file=a29k/t-a29kbare
243 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
244 tmake_file=a29k/t-vx29k
245 extra_parts="crtbegin.o crtend.o"
247 a29k-*-*) # Default a29k environment.
250 alpha-*-linux-gnuecoff*)
251 tm_file="${tm_file} alpha/linux.h"
252 xm_file="${xm_file} alpha/xm-linux.h"
255 fixincludes=Makefile.in
259 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
260 xm_file="${xm_file} alpha/xm-linux.h"
262 tmake_file="t-linux alpha/t-linux"
264 fixincludes=Makefile.in
265 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
267 if [[ x$thread_file = x ]]; then
271 alpha-dec-osf[[456789]]*)
272 if [[ x$stabs = xyes ]]
274 tm_file="${tm_file} dbx.h"
276 if [[ x$gas != xyes ]]
278 extra_passes="mips-tfile mips-tdump"
282 # Some versions of OSF4 (specifically X4.0-9 296.7) have
283 # a broken tar, so we use cpio instead.
286 install_headers_dir=install-headers-cpio
290 alpha-dec-osf[[23]]*)
291 tm_file="${tm_file} alpha/osf2or3.h"
292 if [[ x$stabs = xyes ]]
294 tm_file="${tm_file} dbx.h"
296 if [[ x$gas != xyes ]]
298 extra_passes="mips-tfile mips-tdump"
304 tm_file="${tm_file} alpha/osf12.h"
305 if [[ x$stabs = xyes ]]
307 tm_file="${tm_file} dbx.h"
309 if [[ x$gas != xyes ]]
311 extra_passes="mips-tfile mips-tdump"
317 if [[ x$stabs = xyes ]]
319 tm_file="${tm_file} dbx.h"
321 if [[ x$gas != xyes ]]
323 extra_passes="mips-tfile mips-tdump"
329 tm_file="${tm_file} alpha/win-nt.h"
330 target_cpu_default=64
331 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
333 xmake_file=winnt/x-winnt
334 extra_host_objs=oldnames.o
335 extra_gcc_objs="spawnv.o oldnames.o"
336 fixincludes=fixinc.winnt
337 if [[ x$gnu_ld != xyes ]]
339 extra_programs=ld.exe
341 if [[ x$enable_threads = xyes ]]; then
347 xm_file="${xm_file} alpha/xm-vms.h"
348 tmake_file=alpha/t-vms
349 fixincludes=Makefile.in
351 arm-*-coff* | armel-*-coff*)
353 tmake_file=arm/t-bare
355 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
356 tm_file=arm/riscix1-1.h
359 arm-*-riscix*) # Acorn RISC machine
360 if [[ x$gas = xyes ]]
362 tm_file=arm/rix-gas.h
366 xmake_file=arm/x-riscix
367 tmake_file=arm/t-riscix
370 arm-semi-aout | armel-semi-aout)
372 tmake_file=arm/t-semi
373 fixincludes=Makefile.in # There is nothing to fix
375 arm-semi-aof | armel-semi-aof)
376 tm_file=arm/semiaof.h
377 tmake_file=arm/t-semiaof
378 fixincludes=Makefile.in # There is nothing to fix
382 xm_file=arm/xm-netbsd.h
383 tmake_file=arm-t-netbsd
384 # On NetBSD, the headers are already okay.
385 fixincludes=Makefile.in
388 arm-*-linux-gnuaout*) # ARM Linux
390 xm_file=arm/xm-linux.h
392 tm_file=arm/linux-gas.h
393 tmake_file=arm/t-linux
394 fixincludes=Makefile.in
398 arm-*-*) # generic version
400 c1-convex-*) # Convex C1
403 fixincludes=Makefile.in
405 c2-convex-*) # Convex C2
408 fixincludes=Makefile.in
413 fixincludes=Makefile.in
418 fixincludes=Makefile.in
421 target_cpu_default=16
423 fixincludes=Makefile.in
425 clipper-intergraph-clix*)
426 tm_file="${tm_file} svr3.h clipper/clix.h"
427 xm_file=clipper/xm-clix.h
428 xmake_file=clipper/x-clix
429 extra_headers=va-clipper.h
430 extra_parts="crtbegin.o crtend.o"
431 install_headers_dir=install-headers-cpio
439 # This hasn't been upgraded to GCC 2.
440 # fx80-alliant-*) # Alliant FX/80
446 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
447 xm_file=pa/xm-papro.h
452 tm_file="${tm_file} pa/pa-osf.h"
454 fixincludes=Makefile.in
457 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
458 xm_file=pa/xm-papro.h
462 tm_file="${tm_file} pa/pa-osf.h"
464 fixincludes=Makefile.in
469 fixincludes=Makefile.in
473 fixincludes=Makefile.in
476 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
477 xm_file=pa/xm-pahpux.h
478 xmake_file=pa/x-pa-hpux
479 if [[ x$gas = xyes ]]
481 tm_file="${tm_file} pa/gas.h"
484 install_headers_dir=install-headers-cpio
487 hppa1.0-*-hpux8.0[[0-2]]*)
488 tm_file="${tm_file} pa/pa-hpux.h"
489 xm_file=pa/xm-pahpux.h
490 xmake_file=pa/x-pa-hpux
491 if [[ x$gas = xyes ]]
493 tm_file="${tm_file} pa/pa-gas.h"
495 tm_file="pa/pa-oldas.h ${tm_file}"
498 install_headers_dir=install-headers-cpio
501 hppa1.1-*-hpux8.0[[0-2]]*)
503 tm_file="${tm_file} pa/pa-hpux.h"
504 xm_file=pa/xm-pahpux.h
505 xmake_file=pa/x-pa-hpux
506 if [[ x$gas = xyes ]]
508 tm_file="${tm_file} pa/pa-gas.h"
510 tm_file="pa/pa-oldas.h ${tm_file}"
513 install_headers_dir=install-headers-cpio
518 tm_file="${tm_file} pa/pa-hpux.h"
519 xm_file=pa/xm-pahpux.h
520 xmake_file=pa/x-pa-hpux
521 if [[ x$gas = xyes ]]
523 tm_file="${tm_file} pa/pa-gas.h"
526 install_headers_dir=install-headers-cpio
530 tm_file="${tm_file} pa/pa-hpux.h"
531 xm_file=pa/xm-pahpux.h
532 xmake_file=pa/x-pa-hpux
533 if [[ x$gas = xyes ]]
535 tm_file="${tm_file} pa/pa-gas.h"
538 install_headers_dir=install-headers-cpio
543 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
544 xm_file=pa/xm-pahpux.h
545 xmake_file=pa/x-pa-hpux
546 if [[ x$gas = xyes ]]
548 tm_file="${tm_file} pa/pa-gas.h"
551 install_headers_dir=install-headers-cpio
555 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
556 xm_file=pa/xm-pahpux.h
557 xmake_file=pa/x-pa-hpux
558 if [[ x$gas = xyes ]]
560 tm_file="${tm_file} pa/pa-gas.h"
563 install_headers_dir=install-headers-cpio
568 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
569 xm_file=pa/xm-pahpux.h
570 xmake_file=pa/x-pa-hpux
571 if [[ x$gas = xyes ]]
573 tm_file="${tm_file} pa/pa-gas.h"
576 install_headers_dir=install-headers-cpio
580 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
581 xm_file=pa/xm-pahpux.h
582 xmake_file=pa/x-pa-hpux
583 if [[ x$gas = xyes ]]
585 tm_file="${tm_file} pa/pa-gas.h"
588 install_headers_dir=install-headers-cpio
593 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
594 xm_file=pa/xm-pahpux.h
595 xmake_file=pa/x-pa-hpux
596 if [[ x$gas = xyes ]]
598 tm_file="${tm_file} pa/pa-gas.h"
601 install_headers_dir=install-headers-cpio
605 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
606 xm_file=pa/xm-pahpux.h
607 xmake_file=pa/x-pa-hpux
608 if [[ x$gas = xyes ]]
610 tm_file="${tm_file} pa/pa-gas.h"
613 install_headers_dir=install-headers-cpio
619 fixincludes=Makefile.in
623 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
624 if [[ x$gas = xyes ]]
626 tm_file=i386/aix386.h
627 extra_parts="crtbegin.o crtend.o"
628 tmake_file=i386/t-crtstuff
630 tm_file=i386/aix386ng.h
633 xm_file=i386/xm-aix.h
634 xmake_file=i386/x-aix
637 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
638 xm_file=i386/xm-sysv4.h
639 xmake_file=i386/x-ncr3000
640 if [[ x$stabs = xyes -a x$gas = xyes ]]
642 tm_file=i386/sysv4gdb.h
646 extra_parts="crtbegin.o crtend.o"
647 tmake_file=i386/t-crtpic
651 xm_file=i386/xm-next.h
652 tmake_file=i386/t-next
653 xmake_file=i386/x-next
654 extra_objs=nextstep.o
655 if [[ x$enable_threads = xyes ]]; then
659 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
661 if [[ x$gas = xyes ]]
663 tm_file=i386/seq-gas.h
665 tm_file=i386/sequent.h
668 i[[3456]]86-sequent-ptx1*)
669 xm_file=i386/xm-sysv3.h
670 xmake_file=i386/x-sysv3
671 tm_file=i386/seq-sysv3.h
672 tmake_file=i386/t-crtstuff
673 fixincludes=fixinc.ptx
674 extra_parts="crtbegin.o crtend.o"
675 install_headers_dir=install-headers-cpio
678 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
679 xm_file=i386/xm-sysv3.h
680 xmake_file=i386/x-sysv3
681 tm_file=i386/seq2-sysv3.h
682 tmake_file=i386/t-crtstuff
683 extra_parts="crtbegin.o crtend.o"
684 fixincludes=fixinc.ptx
685 install_headers_dir=install-headers-cpio
688 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
689 xm_file=i386/xm-sysv4.h
691 tm_file=i386/ptx4-i.h
693 extra_parts="crtbegin.o crtend.o"
694 fixincludes=fixinc.ptx
695 install_headers_dir=install-headers-cpio
698 i386-sun-sunos*) # Sun i386 roadrunner
699 xm_file=i386/xm-sun.h
704 tm_file=i386/i386-aout.h
705 tmake_file=i386/t-i386bare
707 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
708 tm_file=i386/bsd386.h
709 xm_file=i386/xm-bsd386.h
710 # tmake_file=t-libc-ok
713 tm_file=i386/386bsd.h
714 xm_file=i386/xm-bsd386.h
715 # tmake_file=t-libc-ok
716 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
719 i[[3456]]86-*-freebsdelf*)
720 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
721 xm_file=i386/xm-freebsd.h
722 # On FreeBSD, the headers are already ok.
723 fixincludes=Makefile.in
724 tmake_file=i386/t-freebsd
729 i[[3456]]86-*-freebsd*)
730 tm_file=i386/freebsd.h
731 xm_file=i386/xm-freebsd.h
732 # On FreeBSD, the headers are already ok.
733 fixincludes=Makefile.in
734 tmake_file=i386/t-freebsd
736 i[[3456]]86-*-netbsd*)
737 tm_file=i386/netbsd.h
738 xm_file=i386/xm-netbsd.h
739 # On NetBSD, the headers are already okay.
740 fixincludes=Makefile.in
744 tm_file=i386/i386-coff.h
745 tmake_file=i386/t-i386bare
747 i[[3456]]86-*-isc*) # 80386 running ISC system
748 xm_file=i386/xm-isc.h
750 i[[345]]86-*-isc[[34]]*)
751 xmake_file=i386/x-isc3
754 xmake_file=i386/x-isc
757 if [[ x$gas = xyes -a x$stabs = xyes ]]
759 tm_file=i386/iscdbx.h
760 tmake_file=i386/t-svr3dbx
761 extra_parts="svr3.ifile svr3z.ifile"
763 tm_file=i386/isccoff.h
764 tmake_file=i386/t-crtstuff
765 extra_parts="crtbegin.o crtend.o"
767 install_headers_dir=install-headers-cpio
770 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
771 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
772 xmake_file=x-linux-aout
773 tmake_file="t-linux-aout i386/t-crtstuff"
774 tm_file=i386/linux-oldld.h
775 fixincludes=Makefile.in #On Linux, the headers are ok already.
779 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
780 xm_file=i386/xm-linux.h # with a.out format
781 xmake_file=x-linux-aout
782 tmake_file="t-linux-aout i386/t-crtstuff"
783 tm_file=i386/linux-aout.h
784 fixincludes=Makefile.in #On Linux, the headers are ok already.
788 i[[3456]]86-*-linux-gnulibc1)
789 xm_file=i386/xm-linux.h # Intel 80386's running Linux
790 xmake_file=x-linux # with ELF format using the
791 tm_file=i386/linux.h # Linux C library 5
792 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
793 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
794 fixincludes=Makefile.in #On Linux, the headers are ok already.
797 if [[ x$enable_threads = xyes ]]; then
801 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
802 xm_file=i386/xm-linux.h # with ELF format using glibc 2
803 xmake_file=x-linux # aka Linux C library 6
805 tmake_file="t-linux i386/t-crtstuff"
806 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
807 fixincludes=Makefile.in #On Linux, the headers are ok already.
810 if [[ x$enable_threads = xyes ]]; then
816 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
817 xm_file=i386/xm-go32.h
819 tmake_file=i386/t-go32
821 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
824 fixincludes=Makefile.in
828 i[[3456]]86-*-lynxos*)
829 if [[ x$gas = xyes ]]
833 tm_file=i386/lynx-ng.h
835 xm_file=i386/xm-lynx.h
836 tmake_file=i386/t-i386bare
841 # tmake_file=t-libc-ok
844 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
845 if [[ x$elf = xyes ]]
847 tm_file=i386/osfelf.h
850 tm_file=i386/osfrose.h
853 xm_file=i386/xm-osf.h
854 xmake_file=i386/x-osfrose
855 tmake_file=i386/t-osf
858 i[[345]]86-go32-rtems*)
860 xm_file=i386/xm-go32.h
861 tm_file=i386/go32-rtems.h
862 tmake_file="i386/t-go32 t-rtems"
867 tmake_file="i386/t-i386bare t-rtems"
869 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
870 xm_file=i386/xm-sco5.h
871 xmake_file=i386/x-sco5
872 fixincludes=fixinc.sco
875 tmake_file=i386/t-sco5
876 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
878 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
879 xm_file=i386/xm-sco.h
880 xmake_file=i386/x-sco4
881 fixincludes=fixinc.sco
883 install_headers_dir=install-headers-cpio
884 if [[ x$stabs = xyes ]]
886 tm_file=i386/sco4dbx.h
887 tmake_file=i386/t-svr3dbx
888 extra_parts="svr3.ifile svr3z.rfile"
891 tmake_file=i386/t-crtstuff
892 extra_parts="crtbegin.o crtend.o"
896 i[[3456]]86-*-sco*) # 80386 running SCO system
897 xm_file=i386/xm-sco.h
898 xmake_file=i386/x-sco
900 install_headers_dir=install-headers-cpio
901 if [[ x$stabs = xyes ]]
903 tm_file=i386/scodbx.h
904 tmake_file=i386/t-svr3dbx
905 extra_parts="svr3.ifile svr3z.rfile"
908 extra_parts="crtbegin.o crtend.o"
909 tmake_file=i386/t-crtstuff
913 i[[3456]]86-*-solaris2*)
914 xm_file=i386/xm-sysv4.h
915 if [[ x$stabs = xyes ]]
917 tm_file=i386/sol2dbg.h
921 tmake_file=i386/t-sol2
922 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
924 fixincludes=fixinc.svr4
926 if [[ x$enable_threads = xyes ]]; then
927 thread_file='solaris'
930 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
931 xm_file=i386/xm-sysv4.h
933 if [[ x$stabs = xyes ]]
935 tm_file="${tm_file} dbx.h"
937 tmake_file=i386/t-crtpic
939 extra_parts="crtbegin.o crtend.o"
941 i[[3456]]86-*-sysv*) # Intel 80386's running system V
942 xm_file=i386/xm-sysv3.h
943 xmake_file=i386/x-sysv3
944 if [[ x$gas = xyes ]]
946 if [[ x$stabs = xyes ]]
948 tm_file=i386/svr3dbx.h
949 tmake_file=i386/t-svr3dbx
950 extra_parts="svr3.ifile svr3z.rfile"
952 tm_file=i386/svr3gas.h
953 extra_parts="crtbegin.o crtend.o"
954 tmake_file=i386/t-crtstuff
958 extra_parts="crtbegin.o crtend.o"
959 tmake_file=i386/t-crtstuff
962 i386-*-vsta) # Intel 80386's running VSTa kernel
963 xm_file=i386/xm-vsta.h
965 tmake_file=i386/t-vsta
966 xmake_file=i386/x-vsta
968 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
969 xm_file="${xm_file} i386/xm-cygwin32.h"
970 tmake_file=i386/t-cygwin32
971 tm_file=i386/cygwin32.h
972 xmake_file=i386/x-cygwin32
974 fixincludes=Makefile.in
975 if [[ x$enable_threads = xyes ]]; then
980 i[[3456]]86-*-mingw32)
981 tm_file=i386/mingw32.h
982 xm_file="${xm_file} i386/xm-mingw32.h"
983 tmake_file=i386/t-cygwin32
985 xmake_file=i386/x-cygwin32
986 fixincludes=Makefile.in
987 if [[ x$enable_threads = xyes ]]; then
992 i[[3456]]86-*-winnt3*)
993 tm_file=i386/win-nt.h
995 xm_file=i386/xm-winnt.h
996 xmake_file=winnt/x-winnt
997 tmake_file=i386/t-winnt
998 extra_host_objs="winnt.o oldnames.o"
999 extra_gcc_objs="spawnv.o oldnames.o"
1000 fixincludes=fixinc.winnt
1001 if [[ x$gnu_ld != xyes ]]
1003 extra_programs=ld.exe
1005 if [[ x$enable_threads = xyes ]]; then
1009 i[[3456]]86-dg-dgux)
1010 xm_file=i386/xm-dgux.h
1011 out_file=i386/dgux.c
1013 tmake_file=i386/t-dgux
1014 xmake_file=i386/x-dgux
1015 fixincludes=fixinc.dgux
1016 install_headers_dir=install-headers-cpio
1018 i860-alliant-*) # Alliant FX/2800
1019 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1020 xm_file="${xm_file} i860/xm-fx2800.h"
1021 xmake_file=i860/x-fx2800
1022 tmake_file=i860/t-fx2800
1023 extra_parts="crtbegin.o crtend.o"
1026 tm_file="${tm_file} i860/bsd.h"
1027 if [[ x$gas = xyes ]]
1029 tm_file="${tm_file} i860/bsd-gas.h"
1034 tm_file="${tm_file} i860/mach.h"
1035 tmake_file=t-libc-ok
1037 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1038 tm_file="${tm_file} svr3.h i860/paragon.h"
1039 xm_file="${xm_file} xm-svr3.h"
1044 tm_file="${tm_file} svr3.h i860/sysv3.h"
1045 xm_file="${tm_file} xm-svr3.h"
1046 xmake_file=i860/x-sysv3
1047 extra_parts="crtbegin.o crtend.o"
1050 tm_file="${tm_file} svr4.h i860/sysv4.h"
1051 xm_file="${xm_file} xm-svr3.h"
1052 xmake_file=i860/x-sysv4
1054 extra_parts="crtbegin.o crtend.o"
1056 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1057 tm_file="${tm_file} i960/vx960.h"
1058 tmake_file=i960/t-vxworks960
1062 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1063 tmake_file=i960/t-vxworks960
1067 tm_file="${tm_file} i960/vx960.h"
1068 tmake_file=i960/t-vxworks960
1072 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1073 tmake_file=i960/t-960bare
1077 tmake_file="i960/t-960bare t-rtems"
1078 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1081 i960-*-*) # Default i960 environment.
1085 extra_parts="crtinit.o crtfini.o"
1087 m68000-convergent-sysv*)
1089 xm_file=m68k/xm-3b1.h
1091 extra_headers=math-68881.h
1093 m68000-hp-bsd*) # HP 9000/200 running BSD
1094 tm_file=m68k/hp2bsd.h
1095 xmake_file=m68k/x-hp2bsd
1097 extra_headers=math-68881.h
1099 m68000-hp-hpux*) # HP 9000 series 300
1100 xm_file=m68k/xm-hp320.h
1101 if [[ x$gas = xyes ]]
1103 xmake_file=m68k/x-hp320g
1104 tm_file=m68k/hp310g.h
1106 xmake_file=m68k/x-hp320
1107 tm_file=m68k/hp310.h
1110 install_headers_dir=install-headers-cpio
1112 extra_headers=math-68881.h
1117 extra_headers=math-68881.h
1120 tm_file=m68k/sun2o4.h
1122 extra_headers=math-68881.h
1125 xm_file=m68k/xm-3b1.h
1126 if [[ x$gas = xyes ]]
1133 extra_headers=math-68881.h
1135 m68k-apple-aux*) # Apple Macintosh running A/UX
1136 xm_file=m68k/xm-aux.h
1137 tmake_file=m68k/t-aux
1139 install_headers_dir=install-headers-cpio
1140 extra_headers=math-68881.h
1141 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1143 if [[ "$gnu_ld" = yes ]]
1145 tm_file="${tm_file} m68k/auxgld.h"
1147 tm_file="${tm_file} m68k/auxld.h"
1149 if [[ "$gas" = yes ]]
1151 tm_file="${tm_file} m68k/auxgas.h"
1153 tm_file="${tm_file} m68k/auxas.h"
1155 tm_file="${tm_file} m68k/a-ux.h"
1158 tm_file=m68k/apollo68.h
1159 xmake_file=m68k/x-apollo68
1161 extra_headers=math-68881.h
1163 m68k-altos-sysv*) # Altos 3068
1164 if [[ x$gas = xyes ]]
1166 tm_file=m68k/altos3068.h
1167 xm_file=m68k/xm-altos3068.h
1169 echo "The Altos is supported only with the GNU assembler" 1>&2
1172 extra_headers=math-68881.h
1174 m68k-bull-sysv*) # Bull DPX/2
1175 if [[ x$gas = xyes ]]
1177 if [[ x$stabs = xyes ]]
1179 tm_file=m68k/dpx2cdbx.h
1181 tm_file=m68k/dpx2g.h
1186 xm_file=m68k/xm-m68kv.h
1187 xmake_file=m68k/x-dpx2
1189 extra_headers=math-68881.h
1191 m68k-atari-sysv4*) # Atari variant of V.4.
1192 tm_file=m68k/atari.h
1193 xm_file=m68k/xm-atari.h
1195 extra_parts="crtbegin.o crtend.o"
1196 extra_headers=math-68881.h
1198 m68k-motorola-sysv*)
1199 tm_file=m68k/mot3300.h
1200 xm_file=m68k/xm-mot3300.h
1201 if [[ x$gas = xyes ]]
1203 xmake_file=m68k/x-mot3300-gas
1204 if [[ x$gnu_ld = xyes ]]
1206 tmake_file=m68k/t-mot3300-gald
1208 tmake_file=m68k/t-mot3300-gas
1212 xmake_file=m68k/x-mot3300
1213 if [[ x$gnu_ld = xyes ]]
1215 tmake_file=m68k/t-mot3300-gld
1217 tmake_file=m68k/t-mot3300
1221 gdb_needs_out_file_path=yes
1222 extra_parts="crt0.o mcrt0.o"
1223 extra_headers=math-68881.h
1225 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1226 tm_file=m68k/tower-as.h
1227 xm_file=m68k/xm-tower.h
1228 xmake_file=m68k/x-tower
1229 extra_parts="crtbegin.o crtend.o"
1230 extra_headers=math-68881.h
1233 tm_file=m68k/plexus.h
1234 xm_file=m68k/xm-plexus.h
1236 extra_headers=math-68881.h
1240 xm_file=m68k/xm-m68kv.h
1241 extra_headers=math-68881.h
1244 xm_file=m68k/xm-crds.h
1245 xmake_file=m68k/x-crds
1249 extra_headers=math-68881.h
1251 m68k-cbm-sysv4*) # Commodore variant of V.4.
1253 xm_file=m68k/xm-amix.h
1254 xmake_file=m68k/x-amix
1256 extra_parts="crtbegin.o crtend.o"
1257 extra_headers=math-68881.h
1260 tm_file=m68k/ccur-GAS.h
1261 xmake_file=m68k/x-ccur
1262 extra_headers=math-68881.h
1266 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1267 tm_file=m68k/hp3bsd44.h
1268 xmake_file=m68k/x-hp3bsd44
1270 extra_headers=math-68881.h
1272 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1273 tm_file=m68k/hp3bsd.h
1275 extra_headers=math-68881.h
1278 if [[ x$with_fp = xno ]]
1280 tm_file=m68k/isi-nfp.h
1285 extra_headers=math-68881.h
1287 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1288 xm_file=m68k/xm-hp320.h
1289 if [[ x$gas = xyes ]]
1291 xmake_file=m68k/x-hp320g
1292 tm_file=m68k/hp320g.h
1294 xmake_file=m68k/x-hp320
1295 tm_file=m68k/hpux7.h
1298 install_headers_dir=install-headers-cpio
1300 extra_headers=math-68881.h
1302 m68k-hp-hpux*) # HP 9000 series 300
1303 xm_file=m68k/xm-hp320.h
1304 if [[ x$gas = xyes ]]
1306 xmake_file=m68k/x-hp320g
1307 tm_file=m68k/hp320g.h
1309 xmake_file=m68k/x-hp320
1310 tm_file=m68k/hp320.h
1313 install_headers_dir=install-headers-cpio
1315 extra_headers=math-68881.h
1318 tm_file=m68k/sun3mach.h
1320 extra_headers=math-68881.h
1323 if [[ x$gas = xyes ]]
1325 tm_file=m68k/news3gas.h
1327 tm_file=m68k/news3.h
1330 extra_headers=math-68881.h
1332 m68k-sony-bsd* | m68k-sony-newsos*)
1333 if [[ x$gas = xyes ]]
1335 tm_file=m68k/newsgas.h
1340 extra_headers=math-68881.h
1342 m68k-next-nextstep2*)
1343 tm_file=m68k/next21.h
1344 xm_file=m68k/xm-next.h
1345 tmake_file=m68k/t-next
1346 xmake_file=m68k/x-next
1347 extra_objs=nextstep.o
1348 extra_headers=math-68881.h
1351 m68k-next-nextstep3*)
1353 xm_file=m68k/xm-next.h
1354 tmake_file=m68k/t-next
1355 xmake_file=m68k/x-next
1356 extra_objs=nextstep.o
1357 extra_headers=math-68881.h
1358 if [[ x$enable_threads = xyes ]]; then
1363 if [[ x$with_fp = xno ]]
1365 tm_file=m68k/sun3n3.h
1367 tm_file=m68k/sun3o3.h
1370 extra_headers=math-68881.h
1372 m68k-sun-sunos*) # For SunOS 4 (the default).
1373 if [[ x$with_fp = xno ]]
1375 tm_file=m68k/sun3n.h
1379 xm_file=m68k/xm-sun3.h
1381 extra_headers=math-68881.h
1384 tm_file=m68k/vxm68k.h
1385 tmake_file=m68k/t-vxworks68
1386 extra_headers=math-68881.h
1389 tmake_file=m68k/t-m68kbare
1390 tm_file="m68k/m68k-aout.h libgloss.h"
1391 extra_headers=math-68881.h
1394 tmake_file=m68k/t-m68kbare
1395 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1396 extra_headers=math-68881.h
1399 if [[ x$gas = xyes ]]
1403 tm_file=m68k/lynx-ng.h
1405 xm_file=m68k/xm-lynx.h
1407 tmake_file=m68k/t-lynx
1408 extra_headers=math-68881.h
1411 tm_file=m68k/netbsd.h
1412 xm_file=m68k/xm-netbsd.h
1413 # On NetBSD, the headers are already okay.
1414 fixincludes=Makefile.in
1417 m68k-*-sysv3*) # Motorola m68k's running system V.3
1418 xm_file=m68k/xm-m68kv.h
1419 xmake_file=m68k/x-m68kv
1420 extra_parts="crtbegin.o crtend.o"
1421 extra_headers=math-68881.h
1423 m68k-*-sysv4*) # Motorola m68k's running system V.4
1424 tm_file=m68k/m68kv4.h
1425 xm_file=m68k/xm-m68kv.h
1427 extra_parts="crtbegin.o crtend.o"
1428 extra_headers=math-68881.h
1430 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1431 xm_file=m68k/xm-linux.h # with a.out format
1433 tm_file=m68k/linux-aout.h
1434 tmake_file="t-linux-aout m68k/t-linux-aout"
1435 fixincludes=Makefile.in #On Linux, the headers are ok already.
1436 extra_headers=math-68881.h
1439 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1440 xm_file=m68k/xm-linux.h # with ELF format using the
1441 xmake_file=x-linux # Linux C library 5
1442 tm_file=m68k/linux.h
1443 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1444 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1445 fixincludes=Makefile.in #On Linux, the headers are ok already.
1446 extra_headers=math-68881.h
1449 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1450 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1451 xmake_file=x-linux # aka the Linux C library 6.
1452 tm_file=m68k/linux.h
1453 tmake_file="t-linux m68k/t-linux"
1454 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1455 fixincludes=Makefile.in #On Linux, the headers are ok already.
1456 extra_headers=math-68881.h
1458 if [[ x$thread_file = x ]]; then
1463 tmake_file=m68k/t-m68kbare
1464 tm_file=m68k/m68k-psos.h
1465 extra_headers=math-68881.h
1468 tmake_file="m68k/t-m68kbare t-rtems"
1469 tm_file=m68k/rtems.h
1470 extra_headers=math-68881.h
1476 tm_file=m88k/dguxbcs.h
1477 tmake_file=m88k/t-dguxbcs
1481 tmake_file=m88k/t-dgux
1484 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1486 xmake_file=m88k/x-dgux
1487 if [[ x$gas = xyes ]]
1489 tmake_file=m88k/t-dgux-gas
1491 fixincludes=fixinc.dgux
1493 m88k-dolphin-sysv3*)
1494 tm_file=m88k/dolph.h
1495 extra_parts="crtbegin.o crtend.o"
1496 xm_file=m88k/xm-sysv3.h
1497 xmake_file=m88k/x-dolph
1498 if [[ x$gas = xyes ]]
1500 tmake_file=m88k/t-m88k-gas
1503 m88k-tektronix-sysv3)
1504 tm_file=m88k/tekXD88.h
1505 extra_parts="crtbegin.o crtend.o"
1506 xm_file=m88k/xm-sysv3.h
1507 xmake_file=m88k/x-tekXD88
1508 if [[ x$gas = xyes ]]
1510 tmake_file=m88k/t-m88k-gas
1514 tm_file=m88k/m88k-aout.h
1517 tm_file=m88k/m88k-coff.h
1518 tmake_file=m88k/t-bug
1522 extra_parts="crtbegin.o crtend.o"
1523 if [[ x$gas = xyes ]]
1525 tmake_file=m88k/t-luna-gas
1527 tmake_file=m88k/t-luna
1531 tm_file=m88k/sysv3.h
1532 extra_parts="crtbegin.o crtend.o"
1533 xm_file=m88k/xm-sysv3.h
1534 xmake_file=m88k/x-sysv3
1535 if [[ x$gas = xyes ]]
1537 tmake_file=m88k/t-m88k-gas
1541 tm_file=m88k/sysv4.h
1542 extra_parts="crtbegin.o crtend.o"
1543 xmake_file=m88k/x-sysv4
1544 tmake_file=m88k/t-sysv4
1546 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1547 tm_file=mips/iris6.h
1548 xm_file=mips/xm-iris6.h
1550 fixincludes=fixinc.irix
1551 xmake_file=mips/x-iris6
1552 tmake_file=mips/t-iris6
1553 if [[ x$enable_threads = xyes ]]; then
1557 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1558 tm_file=mips/cross64.h
1559 xm_file=mips/xm-iris5.h
1561 fixincludes=Makefile.in
1562 xmake_file=mips/x-iris
1563 tmake_file=mips/t-cross64
1564 # See comment in mips/iris[56].h files.
1566 if [[ x$enable_threads = xyes ]]; then
1571 if [[ x$gas = xyes ]]
1573 if [[ x$stabs = xyes ]]
1575 tm_file=mips/iris5gdb.h
1577 tm_file=mips/sni-gas.h
1580 tm_file=mips/sni-svr4.h
1582 xm_file=mips/xm-sysv.h
1583 xmake_file=mips/x-sni-svr4
1584 tmake_file=mips/t-mips-gas
1585 if [[ x$gnu_ld != xyes ]]
1591 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1592 if [[ x$gas = xyes ]]
1594 tm_file=mips/iris5gas.h
1595 if [[ x$stabs = xyes ]]
1597 tm_file="${tm_file} dbx.h"
1600 tm_file=mips/iris5.h
1602 xm_file=mips/xm-iris5.h
1604 fixincludes=fixinc.irix
1605 xmake_file=mips/x-iris
1606 # mips-tfile doesn't work yet
1607 tmake_file=mips/t-mips-gas
1608 # See comment in mips/iris5.h file.
1610 if [[ x$enable_threads = xyes ]]; then
1614 mips-sgi-irix4loser*) # Mostly like a MIPS.
1615 tm_file=mips/iris4loser.h
1616 if [[ x$stabs = xyes ]]; then
1617 tm_file="${tm_file} dbx.h"
1619 xm_file=mips/xm-iris4.h
1621 xmake_file=mips/x-iris
1622 if [[ x$gas = xyes ]]
1624 tmake_file=mips/t-mips-gas
1626 extra_passes="mips-tfile mips-tdump"
1628 if [[ x$gnu_ld != xyes ]]
1632 if [[ x$enable_threads = xyes ]]; then
1636 mips-sgi-irix4*) # Mostly like a MIPS.
1637 tm_file=mips/iris4.h
1638 if [[ x$stabs = xyes ]]; then
1639 tm_file="${tm_file} dbx.h"
1641 xm_file=mips/xm-iris4.h
1643 xmake_file=mips/x-iris
1644 if [[ x$gas = xyes ]]
1646 tmake_file=mips/t-mips-gas
1648 extra_passes="mips-tfile mips-tdump"
1650 if [[ x$gnu_ld != xyes ]]
1654 if [[ x$enable_threads = xyes ]]; then
1658 mips-sgi-*) # Mostly like a MIPS.
1659 tm_file=mips/iris3.h
1660 if [[ x$stabs = xyes ]]; then
1661 tm_file="${tm_file} dbx.h"
1663 xm_file=mips/xm-iris3.h
1665 xmake_file=mips/x-iris3
1666 if [[ x$gas = xyes ]]
1668 tmake_file=mips/t-mips-gas
1670 extra_passes="mips-tfile mips-tdump"
1672 if [[ x$gnu_ld != xyes ]]
1677 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1678 tm_file=mips/osfrose.h
1679 xmake_file=mips/x-osfrose
1680 tmake_file=mips/t-osfrose
1681 extra_objs=halfpic.o
1684 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1685 tm_file=mips/dec-osf1.h
1686 if [[ x$stabs = xyes ]]; then
1687 tm_file="${tm_file} dbx.h"
1689 xmake_file=mips/x-dec-osf1
1690 if [[ x$gas = xyes ]]
1692 tmake_file=mips/t-mips-gas
1694 tmake_file=mips/t-ultrix
1695 extra_passes="mips-tfile mips-tdump"
1697 if [[ x$gnu_ld != xyes ]]
1702 mips-dec-bsd*) # Decstation running 4.4 BSD
1703 tm_file=mips/dec-bsd.h
1705 if [[ x$gas = xyes ]]
1707 tmake_file=mips/t-mips-gas
1709 tmake_file=mips/t-ultrix
1710 extra_passes="mips-tfile mips-tdump"
1712 if [[ x$gnu_ld != xyes ]]
1717 mips-dec-netbsd*) # Decstation running NetBSD
1718 tm_file=mips/netbsd.h
1719 xm_file=mips/xm-netbsd.h
1720 # On NetBSD, the headers are already okay.
1721 fixincludes=Makefile.in
1723 if [[ x$prefix = xNONE ]]; then
1724 prefix=$native_prefix
1726 prefix=$native_prefix
1728 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1729 tm_file=mips/news4.h
1730 if [[ x$stabs = xyes ]]; then
1731 tm_file="${tm_file} dbx.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 ]]
1743 xmake_file=mips/x-sony
1745 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1746 # That is based on svr4.
1747 # t-svr4 is not right because this system doesn't use ELF.
1748 tm_file=mips/news5.h
1749 if [[ x$stabs = xyes ]]; then
1750 tm_file="${tm_file} dbx.h"
1752 xm_file=mips/xm-news.h
1753 if [[ x$gas = xyes ]]
1755 tmake_file=mips/t-mips-gas
1757 extra_passes="mips-tfile mips-tdump"
1759 if [[ x$gnu_ld != xyes ]]
1764 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1765 tm_file=mips/svr4-t.h
1766 if [[ x$stabs = xyes ]]; then
1767 tm_file="${tm_file} dbx.h"
1769 xm_file=mips/xm-sysv4.h
1770 xmake_file=mips/x-sysv
1771 if [[ x$gas = xyes ]]
1773 tmake_file=mips/t-mips-gas
1774 extra_parts="crtbegin.o crtend.o"
1776 tmake_file=mips/t-mips
1777 extra_passes="mips-tfile mips-tdump"
1779 if [[ x$gnu_ld != xyes ]]
1785 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1786 tm_file=mips/ultrix.h
1787 if [[ x$stabs = xyes ]]; then
1788 tm_file="${tm_file} dbx.h"
1790 xmake_file=mips/x-ultrix
1791 if [[ x$gas = xyes ]]
1793 tmake_file=mips/t-mips-gas
1795 tmake_file=mips/t-ultrix
1796 extra_passes="mips-tfile mips-tdump"
1798 if [[ x$gnu_ld != xyes ]]
1803 mips-*-riscos[[56789]]bsd*)
1804 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1805 if [[ x$stabs = xyes ]]; then
1806 tm_file="${tm_file} dbx.h"
1808 if [[ x$gas = xyes ]]
1810 tmake_file=mips/t-bsd-gas
1812 tmake_file=mips/t-bsd
1813 extra_passes="mips-tfile mips-tdump"
1815 if [[ x$gnu_ld != xyes ]]
1821 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1822 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1823 if [[ x$stabs = xyes ]]; then
1824 tm_file="${tm_file} dbx.h"
1826 if [[ x$gas = xyes ]]
1828 tmake_file=mips/t-bsd-gas
1830 tmake_file=mips/t-bsd
1831 extra_passes="mips-tfile mips-tdump"
1833 if [[ x$gnu_ld != xyes ]]
1839 mips-*-riscos[[56789]]sysv4*)
1840 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1841 if [[ x$stabs = xyes ]]; then
1842 tm_file="${tm_file} dbx.h"
1844 xm_file=mips/xm-sysv4.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-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1860 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.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-svr4-gas
1870 tmake_file=mips/t-svr4
1871 extra_passes="mips-tfile mips-tdump"
1873 if [[ x$gnu_ld != xyes ]]
1879 mips-*-riscos[[56789]]sysv*)
1880 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.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-*-sysv* | mips-*-riscos*sysv*)
1900 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1901 if [[ x$stabs = xyes ]]; then
1902 tm_file="${tm_file} dbx.h"
1904 xm_file=mips/xm-sysv.h
1905 xmake_file=mips/x-sysv
1906 if [[ x$gas = xyes ]]
1908 tmake_file=mips/t-svr3-gas
1910 tmake_file=mips/t-svr3
1911 extra_passes="mips-tfile mips-tdump"
1913 if [[ x$gnu_ld != xyes ]]
1919 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1920 tm_file=mips/mips-5.h
1921 if [[ x$stabs = xyes ]]; then
1922 tm_file="${tm_file} dbx.h"
1924 if [[ x$gas = xyes ]]
1926 tmake_file=mips/t-mips-gas
1928 extra_passes="mips-tfile mips-tdump"
1930 if [[ x$gnu_ld != xyes ]]
1939 tm_file=mips/ecoffl.h
1940 if [[ x$stabs = xyes ]]; then
1941 tm_file="${tm_file} dbx.h"
1943 tmake_file=mips/t-ecoff
1946 tm_file=mips/ecoff.h
1947 if [[ x$stabs = xyes ]]; then
1948 tm_file="${tm_file} dbx.h"
1950 tmake_file=mips/t-ecoff
1954 tm_file="mips/elfl.h libgloss.h"
1955 tmake_file=mips/t-ecoff
1958 tm_file="mips/elf.h libgloss.h"
1959 tmake_file=mips/t-ecoff
1962 tm_file="mips/elfl64.h libgloss.h"
1963 tmake_file=mips/t-ecoff
1965 mips64orionel-*-elf*)
1966 tm_file="mips/elflorion.h libgloss.h"
1967 tmake_file=mips/t-ecoff
1970 tm_file="mips/elf64.h libgloss.h"
1971 tmake_file=mips/t-ecoff
1974 tm_file="mips/elforion.h libgloss.h"
1975 tmake_file=mips/t-ecoff
1977 mips64orion-*-rtems*)
1978 tm_file=mips/rtems64.h
1979 tmake_file="mips/t-ecoff t-rtems"
1981 mips-*-*) # Default MIPS RISC-OS 4.0.
1982 if [[ x$stabs = xyes ]]; then
1983 tm_file="${tm_file} dbx.h"
1985 if [[ x$gas = xyes ]]
1987 tmake_file=mips/t-mips-gas
1989 extra_passes="mips-tfile mips-tdump"
1991 if [[ x$gnu_ld != xyes ]]
1998 tm_file="mn10200/mn10200.h"
1999 if [[ x$stabs = xyes ]]
2001 tm_file="${tm_file} dbx.h"
2007 tm_file="mn10300/mn10300.h"
2008 if [[ x$stabs = xyes ]]
2010 tm_file="${tm_file} dbx.h"
2015 tm_file=ns32k/encore.h
2019 tm_file=ns32k/sequent.h
2023 tm_file=ns32k/tek6100.h
2028 tm_file=ns32k/tek6200.h
2032 # This has not been updated to GCC 2.
2034 # xm_file=ns32k/xm-genix.h
2035 # xmake_file=ns32k/x-genix
2036 # tm_file=ns32k/genix.h
2037 # broken_install=yes
2041 tm_file=ns32k/merlin.h
2045 tm_file=ns32k/pc532-mach.h
2049 tm_file=ns32k/pc532-min.h
2050 xm_file=ns32k/xm-pc532-min.h
2053 ns32k-pc532-netbsd*)
2054 tm_file=ns32k/netbsd.h
2055 xm_file=ns32k/xm-netbsd.h
2056 # On NetBSD, the headers are already okay.
2057 fixincludes=Makefile.in
2061 tm_file="${tm_file} pdp11/2bsd.h"
2067 xmake_file=pyr/x-pyr
2074 xmake_file=romp/x-mach
2077 powerpc-*-sysv* | powerpc-*-elf*)
2078 tm_file=rs6000/sysv4.h
2079 xm_file=rs6000/xm-sysv4.h
2080 extra_headers=ppc-asm.h
2081 if [[ x$gas = xyes ]]
2083 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2085 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2087 xmake_file=rs6000/x-sysv4
2090 tm_file=rs6000/eabiaix.h
2091 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2092 fixincludes=Makefile.in
2093 extra_headers=ppc-asm.h
2096 tm_file=rs6000/eabisim.h
2097 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2098 fixincludes=Makefile.in
2099 extra_headers=ppc-asm.h
2102 tm_file=rs6000/eabi.h
2103 if [[ x$gas = xyes ]]
2105 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2107 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2109 fixincludes=Makefile.in
2110 extra_headers=ppc-asm.h
2113 tm_file=rs6000/rtems.h
2114 if [[ x$gas = xyes ]]
2116 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2118 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2120 fixincludes=Makefile.in
2121 extra_headers=ppc-asm.h
2123 powerpc-*-linux-gnu*)
2124 tm_file=rs6000/linux.h
2125 xm_file=rs6000/xm-sysv4.h
2126 out_file=rs6000/rs6000.c
2127 if [[ x$gas = xyes ]]
2129 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2131 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2134 fixincludes=Makefile.in
2135 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2136 extra_headers=ppc-asm.h
2137 if [[ x$thread_file = x ]]; then
2143 xm_file=rs6000/xm-sysv4.h
2144 tm_file=rs6000/vxppc.h
2145 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2146 extra_headers=ppc-asm.h
2148 powerpcle-*-sysv* | powerpcle-*-elf*)
2149 tm_file=rs6000/sysv4le.h
2150 xm_file=rs6000/xm-sysv4.h
2151 if [[ x$gas = xyes ]]
2153 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2155 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2157 xmake_file=rs6000/x-sysv4
2158 extra_headers=ppc-asm.h
2160 powerpcle-*-eabisim*)
2161 tm_file=rs6000/eabilesim.h
2162 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2163 fixincludes=Makefile.in
2164 extra_headers=ppc-asm.h
2167 tm_file=rs6000/eabile.h
2168 if [[ x$gas = xyes ]]
2170 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2172 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2174 fixincludes=Makefile.in
2175 extra_headers=ppc-asm.h
2177 powerpcle-*-winnt* )
2178 tm_file=rs6000/win-nt.h
2179 tmake_file=rs6000/t-winnt
2181 fixincludes=Makefile.in
2182 if [[ x$enable_threads = xyes ]]; then
2185 extra_headers=ppc-asm.h
2187 powerpcle-*-pe | powerpcle-*-cygwin32)
2188 tm_file=rs6000/cygwin32.h
2189 xm_file=rs6000/xm-cygwin32.h
2190 tmake_file=rs6000/t-winnt
2191 xmake_file=rs6000/x-cygwin32
2193 fixincludes=Makefile.in
2194 if [[ x$enable_threads = xyes ]]; then
2198 extra_headers=ppc-asm.h
2200 powerpcle-*-solaris2*)
2201 tm_file=rs6000/sol2.h
2202 xm_file=rs6000/xm-sysv4.h
2203 if [[ x$gas = xyes ]]
2205 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2207 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2209 xmake_file=rs6000/x-sysv4
2210 fixincludes=fixinc.svr4
2211 extra_headers=ppc-asm.h
2213 rs6000-ibm-aix3.[[01]]*)
2214 tm_file=rs6000/aix31.h
2215 xmake_file=rs6000/x-aix31
2218 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2219 tm_file=rs6000/aix3newas.h
2220 if [[ x$host != x$target ]]
2222 tmake_file=rs6000/t-xnewas
2224 tmake_file=rs6000/t-newas
2228 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2229 tm_file=rs6000/aix41.h
2230 if [[ x$host != x$target ]]
2232 tmake_file=rs6000/t-xnewas
2234 tmake_file=rs6000/t-newas
2236 xmake_file=rs6000/x-aix31
2246 tm_file=rs6000/mach.h
2247 xm_file=rs6000/xm-mach.h
2248 xmake_file=rs6000/x-mach
2252 tm_file=rs6000/lynx.h
2253 xm_file=rs6000/xm-lynx.h
2254 tmake_file=rs6000/t-rs6000
2255 xmake_file=rs6000/x-lynx
2267 xm_file=sparc/xm-pbd.h
2269 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2270 tm_file=sparc/vxsparc.h
2271 tmake_file=sparc/t-vxsparc
2275 tmake_file=sparc/t-sparcbare
2276 tm_file="sparc/aout.h libgloss.h"
2279 tm_file=sparc/netbsd.h
2280 xm_file=sparc/xm-netbsd.h
2281 # On NetBSD, the headers are already okay.
2282 fixincludes=Makefile.in
2288 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2289 xm_file=sparc/xm-linux.h
2290 tm_file=sparc/linux-aout.h
2292 fixincludes=Makefile.in #On Linux, the headers are ok already.
2296 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2297 xm_file=sparc/xm-linux.h # with ELF format using the
2298 xmake_file=x-linux # Linux C library 5.
2299 tm_file=sparc/linux.h
2300 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2301 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2302 fixincludes=Makefile.in #On Linux, the headers are ok already.
2306 sparc-*-linux-gnu*) # Sparc's running Linux
2307 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2308 xmake_file=x-linux # aka the Linux C library 6.
2309 tm_file=sparc/linux.h
2310 tmake_file="t-linux sparc/t-linux"
2311 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2312 fixincludes=Makefile.in #On Linux, the headers are ok already.
2315 if [[ x$thread_file = x ]]; then
2320 if [[ x$gas = xyes ]]
2322 tm_file=sparc/lynx.h
2324 tm_file=sparc/lynx-ng.h
2326 xm_file=sparc/xm-lynx.h
2327 tmake_file=sparc/t-sunos41
2331 tmake_file="sparc/t-sparcbare t-rtems"
2332 tm_file=sparc/rtems.h
2335 tm_file=sparc/sol2.h
2336 xm_file=sparc/xm-sol2.h
2337 tmake_file=sparc/t-sol2
2338 xmake_file=sparc/x-sysv4
2339 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2340 fixincludes=fixinc.svr4
2342 if [[ x$enable_threads = xyes ]]; then
2343 thread_file='solaris'
2347 tm_file=sparc/sunos4.h
2348 tmake_file=sparc/t-sunos40
2352 tm_file=sparc/sunos4.h
2353 tmake_file=sparc/t-sunos41
2357 tm_file=sparc/sun4o3.h
2361 tm_file=sparc/sysv4.h
2362 xm_file=sparc/xm-sysv4.h
2364 xmake_file=sparc/x-sysv4
2365 extra_parts="crtbegin.o crtend.o"
2368 xm_file=sparc/xm-sol2.h
2369 tm_file=sparc/vxsim.h
2370 tmake_file=sparc/t-vxsparc
2371 xmake_file=sparc/x-sysv4
2374 tm_file="sparc/splet.h libgloss.h"
2375 tmake_file=sparc/t-splet
2378 tm_file="sparc/litecoff.h libgloss.h"
2379 tmake_file=sparc/t-sparclite
2382 tm_file="sparc/lite.h aoutos.h libgloss.h"
2383 tmake_file=sparc/t-sparclite
2386 tmake_file=sparc/t-sp64
2387 tm_file=sparc/sp64-aout.h
2390 tmake_file=sparc/t-sp64
2391 tm_file=sparc/sp64-elf.h
2392 extra_parts="crtbegin.o crtend.o"
2394 # This hasn't been upgraded to GCC 2.
2395 # tahoe-harris-*) # Harris tahoe, using COFF.
2396 # tm_file=tahoe/harris.h
2398 # tahoe-*-bsd*) # tahoe running BSD
2400 # This hasn't been upgraded to GCC 2.
2405 vax-*-bsd*) # vaxen running BSD
2409 vax-*-sysv*) # vaxen running system V
2410 tm_file="${tm_file} vax/vaxv.h"
2411 xm_file="${tm_file} vax/xm-vaxv.h"
2415 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2416 xm_file="${xm_file} xm-netbsd.h"
2417 # On NetBSD, the headers are already okay.
2418 fixincludes=Makefile.in
2422 vax-*-ultrix*) # vaxen running ultrix
2423 tm_file="${tm_file} vax/ultrix.h"
2427 vax-*-vms*) # vaxen running VMS
2428 xm_file=vax/xm-vms.h
2432 vax-*-*) # vax default entry
2436 xm_file="${xm_file} xm-svr3"
2440 echo "Configuration $machine not supported" 1>&2
2447 ;; # Existing Linux/GNU systems do not use the GNU setup.
2449 # On the GNU system, the setup is just about the same on
2450 # each different CPU. The specific machines that GNU
2451 # supports are matched above and just set $cpu_type.
2452 xm_file=${cpu_type}/xm-gnu.h
2453 tm_file=${cpu_type}/gnu.h
2454 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2455 # GNU always uses ELF.
2457 # GNU tools are the only tools.
2460 # On GNU, the headers are already okay.
2461 fixincludes=Makefile.in
2462 xmake_file=x-linux # These details are the same as Linux.
2463 tmake_file=t-gnu # These are not.
2466 fixincludes=fixinc.svr4
2467 xmake_try_sysv=x-sysv
2469 install_headers_dir=install-headers-cpio
2473 install_headers_dir=install-headers-cpio
2477 # Distinguish i[3456]86
2478 # Also, do not run mips-tfile on MIPS if using gas.
2479 # Process --with-cpu= for PowerPC/rs6000
2480 target_cpu_default2=
2483 target_cpu_default2=1
2486 target_cpu_default2=2
2489 target_cpu_default2=3
2492 if [[ x$gas = xyes ]]
2494 target_cpu_default2=4
2497 mips*-*-ecoff* | mips*-*-elf*)
2498 if [[ x$gas = xyes ]]
2500 if [[ x$gnu_ld = xyes ]]
2502 target_cpu_default2=20
2504 target_cpu_default2=16
2509 if [[ x$gas = xyes ]]
2511 target_cpu_default2=16
2514 powerpc*-*-* | rs6000-*-*)
2515 case "x$with_cpu" in
2519 xcommon | xpower | xpower2 | xpowerpc | xrios \
2520 | xrios1 | xrios2 | xrsc | xrsc1 \
2521 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2522 | x403 | x505 | x801 | x821 | x823 | x860)
2523 target_cpu_default2="'\"$with_cpu\"'"
2527 echo "--with-cpu must be passed a value" 1>&2
2532 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2538 case ".$with_cpu" in
2540 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2542 .supersparc | .ultrasparc | .v7 | .v8)
2543 target_cpu_default2="TARGET_CPU_$with_cpu"
2546 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2553 if [[ x$target_cpu_default2 != x ]]
2555 if [[ x$target_cpu_default != x ]]
2557 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2559 target_cpu_default=$target_cpu_default2
2563 # No need for collect2 if we have the GNU linker.
2570 # Save data on machine being used to compile GCC in build_xm_file.
2571 # Save data on host machine in vars host_xm_file and host_xmake_file.
2572 if [[ x$pass1done = x ]]
2574 if [[ x"$xm_file" = x ]]
2575 then build_xm_file=$cpu_type/xm-$cpu_type.h
2576 else build_xm_file=$xm_file
2578 build_broken_install=$broken_install
2579 build_install_headers_dir=$install_headers_dir
2580 build_exeext=$exeext
2583 if [[ x$pass2done = x ]]
2585 if [[ x"$xm_file" = x ]]
2586 then host_xm_file=$cpu_type/xm-$cpu_type.h
2587 else host_xm_file=$xm_file
2589 if [[ x"$xmake_file" = x ]]
2590 then xmake_file=$cpu_type/x-$cpu_type
2592 host_xmake_file="$xmake_file"
2593 host_truncate_target=$truncate_target
2594 host_extra_gcc_objs=$extra_gcc_objs
2595 host_extra_objs=$extra_host_objs
2601 extra_objs="${host_extra_objs} ${extra_objs}"
2603 # Default the target-machine variables that were not explicitly set.
2604 if [[ x"$tm_file" = x ]]
2605 then tm_file=$cpu_type/$cpu_type.h; fi
2607 if [[ x$extra_headers = x ]]
2608 then extra_headers=; fi
2610 if [[ x"$xm_file" = x ]]
2611 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2613 md_file=$cpu_type/$cpu_type.md
2615 if [[ x$out_file = x ]]
2616 then out_file=$cpu_type/$cpu_type.c; fi
2618 if [[ x"$tmake_file" = x ]]
2619 then tmake_file=$cpu_type/t-$cpu_type
2622 if [[ x$float_format = x ]]
2623 then float_format=i64
2626 # Say what files are being used for the output code and MD file.
2627 echo "Using \`$srcdir/config/$out_file' to output insns."
2628 echo "Using \`$srcdir/config/$md_file' as machine description file."
2631 for f in $tm_file; do
2634 if [[ $count = ax ]]; then
2635 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2637 echo "Using the following target machine macro files:"
2638 for f in $tm_file; do
2639 echo " $srcdir/config/$f"
2644 for f in $host_xm_file; do
2647 if [[ $count = ax ]]; then
2648 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2650 echo "Using the following host machine macro files:"
2651 for f in $host_xm_file; do
2652 echo " $srcdir/config/$f"
2656 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2658 for f in $build_xm_file; do
2661 if [[ $count = ax ]]; then
2662 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2664 echo "Using the following build machine macro files:"
2665 for f in $build_xm_file; do
2666 echo " $srcdir/config/$f"
2671 if [[ x$thread_file = x ]]
2672 then thread_file='single'
2675 # Set up the header files.
2676 # $links is the list of header files to create.
2677 # $vars is the list of shell variables with file names to include.
2678 vars="host_xm_file tm_file xm_file build_xm_file"
2679 links="config.h tm.h tconfig.h hconfig.h"
2682 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2685 while [[ -n "$vars" ]]
2687 # set file to car of files, files to cdr of files
2688 set $vars; var=$1; shift; vars=$*
2689 set $links; link=$1; shift; links=$*
2693 # Define TARGET_CPU_DEFAULT if the system wants one.
2694 # This substitutes for lots of *.h files.
2695 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2697 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2700 for file in `eval echo '$'$var`; do
2701 echo "#include \"$file\"" >>$link
2705 # Truncate the target if necessary
2706 if [[ x$host_truncate_target != x ]]; then
2707 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2710 # Get the version number from the toplevel
2711 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2713 # For the current directory and all of the language subdirectories,
2714 # do the rest of the script ...
2717 for lang in ${srcdir}/*/config-lang.in ..
2721 # The odd quoting in the next line works around
2722 # an apparent bug in bash 1.12 on linux.
2723 ${srcdir}/[[*]]/config-lang.in) ;;
2724 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2728 # Are we using gcc as the native compiler?
2730 *linux*) # All Linux's use gcc as the native compiler.
2731 if [[ x$prefix = xNONE ]]; then
2732 prefix=$native_prefix
2737 # Make empty files to contain the specs and options for each language.
2738 # Then add #include lines to for a compiler that has specs and/or options.
2742 rm -f specs.h options.h
2743 touch specs.h options.h
2744 for subdir in . $subdirs
2746 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2747 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2748 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2750 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2751 echo "#include \"$subdir/lang-options.h\"" >>options.h
2752 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2756 # Get an absolute path to the GCC top-level source directory
2762 # These (without "all_") are set in each config-lang.in.
2763 # `language' must be a single word so is spelled singularly.
2769 # List of language makefile fragments.
2774 host_overrides="Make-host"
2775 target_overrides="Make-target"
2776 cross_overrides="/dev/null"
2777 build_overrides="/dev/null"
2778 language_fragments="Make-lang"
2779 language_hooks="Make-hooks"
2782 for subdir in . $subdirs
2784 oldsrcdir=$savesrcdir
2786 # Re-adjust the path
2794 srcdir=$oldsrcdir/$subdir
2803 oldsrcdir=../${oldsrcdir}
2804 srcdir=$oldsrcdir/$subdir
2809 mainsrcdir=$oldsrcdir
2811 test -d $subdir || mkdir $subdir
2814 rm -f Make-host Make-target Make-hooks
2818 # Conditionalize the makefile for this host machine.
2819 dep_host_xmake_file=
2821 for f in .. ${host_xmake_file}
2823 if [[ -f ${mainsrcdir}/config/$f ]]
2825 cat ${mainsrcdir}/config/$f >> Make-host
2826 dep_host_xmake_file="${dep_host_xmake_file} \$(srcdir)/config/$f"
2830 # Set EXTRA_HEADERS according to extra_headers.
2831 # This substitutes for lots of t-* files.
2833 if [[ "x$extra_headers" = x ]]
2836 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2837 for file in $extra_headers;
2839 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2843 # Add a definition of USE_COLLECT2 if system wants one.
2844 # Also tell toplev.c what to do.
2845 # This substitutes for lots of t-* files.
2846 if [[ x$use_collect2 = x ]]
2851 will_use_collect2="ld"
2852 maybe_use_collect2="-DUSE_COLLECT2"
2856 # Set MD_DEPS if the real md file is in md.pre-cpp.
2857 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2858 # for line oriented comments, so we must always use a GNU cpp. If
2859 # building gcc with a cross compiler, use the cross compiler just
2860 # built. Otherwise, we can use the cpp just built.
2862 if [[ "x$md_cppflags" = x ]]
2864 md_file_sub=$srcdir/config/$md_file
2869 # If we have gas in the build tree, make a link to it.
2870 if [[ -f ../gas/Makefile ]]; then
2871 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2874 # If we have ld in the build tree, make a link to it.
2875 if [[ -f ../ld/Makefile ]]; then
2876 if [[ x$use_collect2 = x ]]; then
2877 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2879 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2883 # Conditionalize the makefile for this target machine.
2886 for f in .. ${tmake_file}
2888 if [[ -f ${mainsrcdir}/config/$f ]]
2890 cat ${mainsrcdir}/config/$f >> Make-target
2891 dep_tmake_file="${dep_tmake_file} \$(srcdir)/config/$f"
2895 # If this is the top level Makefile, add the language fragments.
2896 # Languages are added via two mechanisms. Some information must be
2897 # recorded in makefile variables, these are defined in config-lang.in.
2898 # We accumulate them and plug them into the main Makefile.
2899 # The other mechanism is a set of hooks for each of the main targets
2900 # like `clean', `install', etc.
2901 if [[ $subdir = . ]]
2903 for s in .. $subdirs
2914 . ${mainsrcdir}/$s/config-lang.in
2915 if [[ "x$language" = x ]]
2917 echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2920 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
2921 all_languages="$all_languages $language"
2922 if [[ "x$boot_language" = xyes ]]
2924 all_boot_languages="$all_boot_languages $language"
2926 all_compilers="$all_compilers $compilers"
2927 all_stagestuff="$all_stagestuff $stagestuff"
2928 all_diff_excludes="$all_diff_excludes $diff_excludes"
2929 all_headers="$all_headers $headers"
2930 all_lib2funcs="$all_lib2funcs $lib2funcs"
2934 # Since we can't use `::' targets, we link each language in
2935 # with a set of hooks, reached indirectly via lang.${target}.
2937 target_list="all.build all.cross start.encap rest.encap \
2939 install-normal install-common install-info install-man \
2941 mostlyclean clean distclean extraclean maintainer-clean \
2942 stage1 stage2 stage3 stage4"
2943 for t in $target_list
2946 for l in .. $all_languages
2948 if [[ $l != ".." ]]; then
2952 echo "lang.$t: $x" >> Make-hooks
2955 # If the host doesn't support symlinks, modify CC in
2956 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2957 # Otherwise, we can use "CC=$(CC)".
2959 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2961 cc_set_by_configure="\$(CC)"
2962 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2964 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2966 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2969 # Otherwise, this is a language subdirectory. If the host supports
2970 # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
2971 # installation procedure can still use CC="stage1/xgcc -Bstage1/".
2972 # If the host doesn't support symlinks, FLAGS_TO_PASS has been
2973 # modified to solve the problem there.
2975 for t in stage1 stage2 stage3 stage4 include
2978 $symbolic_link ../$t $t 2>/dev/null
2982 out_object_file=`basename $out_file .c`.o
2984 if [[ $subdir = . ]]
2987 for f in $tm_file; do
2988 tm_file_list="${tm_file_sub} \$(srcdir)/config/$f"
2992 for f in $host_xm_file; do
2993 host_xm_file_list="${host_xm_file_sub} \$(srcdir)/config/$f"
2997 for f in $build_xm_file; do
2998 build_xm_file_list="${build_xm_file_sub} \$(srcdir)/config/$f"
3002 # Remove all formfeeds, since some Makes get confused by them.
3003 # Also arrange to give the variables `target', `host_xmake_file',
3004 # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
3005 # `out_file', `out_object', `md_file', `lang_specs_files',
3006 # `lang_options_files', `INSTALL_HEADERS_DIR', and `CROSS_FLOAT_H'
3007 # values in the Makefile from the values they have in this script.
3010 for f in $tm_file; do
3011 tm_file_sub="${tm_file_sub} ${srcdir}/config/$f"
3015 for f in $host_xm_file; do
3016 host_xm_file_sub="${host_xm_file_sub} ${srcdir}/config/$f"
3020 for f in $build_xm_file; do
3021 build_xm_file_sub="${build_xm_file_sub} ${srcdir}/config/$f"
3024 # Define macro CROSS_COMPILE in compilation
3025 # if this is a cross-compiler.
3026 # Also use all.cross instead of all.internal
3027 # and add cross-make to Makefile.
3028 if [[ x$host != x$target ]]
3030 cross_defines="CROSS=-DCROSS_COMPILE"
3031 cross_overrides="${topdir}/cross-make"
3034 # When building gcc with a cross-compiler, we need to fix a few things.
3035 # This must come after cross-make as we want all.build to override
3037 if [[ x$build != x$host ]]
3039 build_overrides="${topdir}/build-make"
3043 done # end of current-dir SUBDIRS loop
3047 # Process the language fragments
3048 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs"
3050 # Substitute configuration variables
3052 AC_SUBST(all_languages)
3053 AC_SUBST(all_boot_languages)
3054 AC_SUBST(all_compilers)
3055 AC_SUBST(all_lang_makefiles)
3056 AC_SUBST(all_stagestuff)
3057 AC_SUBST(all_diff_excludes)
3058 AC_SUBST(all_lib2funcs)
3059 AC_SUBST(all_headers)
3060 AC_SUBST(extra_passes)
3061 AC_SUBST(extra_programs)
3062 AC_SUBST(extra_parts)
3063 AC_SUBST(extra_objs)
3064 AC_SUBST(host_extra_gcc_objs)
3065 AC_SUBST(extra_headers_list)
3066 AC_SUBST(dep_host_xmake_file)
3067 AC_SUBST(dep_tmake_file)
3069 AC_SUBST(out_object_file)
3071 AC_SUBST(tm_file_list)
3072 AC_SUBST(build_xm_file_list)
3073 AC_SUBST(host_xm_file_list)
3074 AC_SUBST(lang_specs_files)
3075 AC_SUBST(lang_options_files)
3076 AC_SUBST(thread_file)
3078 AC_SUBST(local_prefix)
3079 AC_SUBST(gxx_include_dir)
3080 AC_SUBST(fixincludes)
3081 AC_SUBST(build_install_headers_dir)
3082 AC_SUBST(build_exeext)
3083 AC_SUBST(float_format)
3084 AC_SUBST(will_use_collect2)
3085 AC_SUBST(maybe_use_collect2)
3086 AC_SUBST(cc_set_by_configure)
3087 AC_SUBST(stage_prefix_set_by_configure)
3089 AC_SUBST_FILE(target_overrides)
3090 AC_SUBST_FILE(host_overrides)
3091 AC_SUBST(cross_defines)
3092 AC_SUBST_FILE(cross_overrides)
3093 AC_SUBST_FILE(build_overrides)
3094 AC_SUBST_FILE(language_fragments)
3095 AC_SUBST_FILE(language_hooks)
3097 # Echo that links are built
3098 if [[ x$host = x$target ]]
3106 if [[ x$host != x$build ]]
3108 str3=" on a $build system"
3111 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3116 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3118 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3120 echo " ${str2}${str3}." 1>&2
3123 # Configure the subdirectories
3124 # AC_CONFIG_SUBDIRS($subdirs)
3126 # Create the Makefile
3127 # and configure language subdirectories
3129 . $srcdir/configure.lang,
3133 target_alias='${target_alias}'
3135 subdirs='${subdirs}'
3136 symbolic_link='${symbolic_link}'
3137 program_transform_set='${program_transform_set}'
3138 program_transform_name='${program_transform_name}'
3139 all_languages='${all_languages}'
3140 all_boot_languages='${all_boot_languages}'
3141 all_compilers='${all_compilers}'
3142 all_lang_makefiles='${all_lang_makefiles}'
3143 all_stagestuff='${all_stagestuff}'
3144 all_diff_excludes='${all_diff_excludes}'
3145 all_lib2funcs='${all_lib2funcs}'
3146 all_headers='${all_headers}'
3147 extra_headers='${extra_headers}'
3148 extra_passes='${extra_passes}'
3149 extra_programs='${extra_programs}'
3150 extra_parts='${extra_parts}'
3151 extra_objs='${extra_objs}'
3152 host_extra_gcc_objs='${host_extra_gcc_objs}'
3153 extra_headers_list='${extra_headers_list}'
3154 dep_host_xmake_file='${dep_host_xmake_file}'
3155 host_xmake_file='${host_xmake_file}'
3156 dep_tmake_file='${dep_tmake_file}'
3157 tmake_file='${tmake_file}'
3158 out_file='${out_file}'
3159 out_object_file='${out_object_file}'
3160 md_file='${md_file}'
3161 md_file_sub='${md_file_sub}'
3162 tm_file_list='${tm_file_list}'
3163 tm_file_sub='${tm_file_sub}'
3164 build_xm_file_list='${build_xm_file_list}'
3165 build_xm_file_sub='${build_xm_file_sub}'
3166 host_xm_file_list='${host_xm_file_list}'
3167 host_xm_file_sub='${host_xm_file_sub}'
3168 lang_specs_files='${lang_specs_files}'
3169 lang_options_files='${lang_options_files}'
3170 thread_file='${thread_file}'
3171 version='${version}'
3172 local_prefix='${local_prefix}'
3173 gxx_include_dir='${gxx_include_dir}'
3174 fixincludes='${fixincludes}'
3175 build_install_headers_dir='${build_install_headers_dir}'
3176 build_exeext='${build_exeext}'
3177 float_format='${float_format}'
3178 use_collect2='${use_collect2}'
3179 will_use_collect2='${will_use_collect2}'
3180 maybe_use_collect2='${maybe_use_collect2}'
3181 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3182 SET_MAKE='${SET_MAKE}'
3183 build_broken_install='${build_broken_install}'
3184 md_cppflags='${md_cppflags}'
3185 target_list='${target_list}'
3187 target_overrides='${target_overrides}'
3188 host_overrides='${host_overrides}'
3189 cross_defines='${cross_defines}'
3190 cross_overrides='${cross_overrides}'
3191 build_overrides='${build_overrides}'
3192 language_fragments='${language_fragments}'
3193 language_hooks='${language_hooks}'