1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 # Initialization and defaults
25 AC_CONFIG_HEADER(config.h:config.in)
33 # Check for additional parameters
37 [ --with-gnu-ld arrange to work with GNU ld.],
43 [ --with-gnu-as arrange to work with GNU as.],
49 [ --with-stabs arrange to use stabs instead of host debug format.],
55 [ --with-elf arrange to use ELF instead of host debug format.],
59 # Specify the local prefix
60 AC_ARG_WITH(local-prefix,
61 [ --with-local-prefix=DIR specifies directory to put local include.],
62 local_prefix=$with_local_prefix,
63 local_prefix=/usr/local)
65 # Default local prefix if it is empty
66 if [[ x$local_prefix = x ]]; then
67 local_prefix=/usr/local
70 # Specify the g++ header file directory
71 AC_ARG_WITH(gxx-include-dir,
72 [ --with-gxx-include-dir=DIR
73 specifies directory to put g++ header files.],
74 gxx_include_dir=$with_gxx_include_dir,
75 gxx_include_dir='${prefix}/include/g++')
77 # Default g++ header file directory if it is empty
78 if [[ x$gxx_include_dir = x ]]; then
79 gxx_include_dir='${prefix}/include/g++'
83 # Pass with no value to take the default
84 # Pass with a value to specify a thread package
85 AC_ARG_ENABLE(threads,
86 [ --enable-threads enable thread usage for target GCC.
87 --enable-threads=LIB use LIB thread package for target GCC.],
88 if [[[ x$enable_threads = xno ]]]; then
93 # Check if a valid thread package
94 case x${enable_threads} in
103 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
105 thread_file=$enable_threads
108 echo "$enable_threads is an unknown thread package" 1>&2
113 # Determine the host, build, and target systems
116 # Find some useful tools
124 # Find the native compiler
128 AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
130 GCC_NEED_DECLARATION(malloc)
131 GCC_NEED_DECLARATION(realloc)
132 GCC_NEED_DECLARATION(free)
141 build_broken_install=
142 build_install_headers_dir=install-headers-tar
146 host_truncate_target=
148 # Decode the host machine, then the target machine.
149 # For the host machine, we save the xm_file variable as host_xm_file;
150 # then we decode the target machine and forget everything else
151 # that came from the host machine.
152 for machine in $build $host $target; do
165 # Set this to force installation and use of collect2.
167 # Set this to override the default target model.
169 # Set this to force use of install.sh.
171 # Set this to control which fixincludes program to use.
172 fixincludes=fixincludes
173 # Set this to control how the header file directory is installed.
174 install_headers_dir=install-headers-tar
175 # Set this to a non-empty list of args to pass to cpp if the target
176 # wants its .md file passed through cpp.
178 # Set this if directory names should be truncated to 14 characters.
180 # Set this if gdb needs a dir command with `dirname $out_file`
181 gdb_needs_out_file_path=
182 # Set this if the build machine requires executables to have a
186 # Set default cpu_type, tm_file and xm_file so it can be updated in
187 # each machine entry.
188 cpu_type=`echo $machine | sed 's/-.*$//'`
222 tm_file=${cpu_type}/${cpu_type}.h
223 xm_file=${cpu_type}/xm-${cpu_type}.h
226 # Support site-specific machine types.
228 cpu_type=`echo $machine | sed -e 's/-.*//'`
229 rest=`echo $machine | sed -e "s/$cpu_type-//"`
230 xm_file=${cpu_type}/xm-$rest.h
231 tm_file=${cpu_type}/$rest.h
232 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
233 then xmake_file=${cpu_type}/x-$rest; \
236 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
237 then tmake_file=${cpu_type}/t-$rest; \
243 a29k-*-bsd* | a29k-*-sym1*)
244 tm_file="${tm_file} a29k/unix.h"
245 xm_file=a29k/xm-unix.h
246 xmake_file=a29k/x-unix
249 a29k-*-udi | a29k-*-coff)
250 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
251 tmake_file=a29k/t-a29kbare
254 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
255 tmake_file=a29k/t-vx29k
256 extra_parts="crtbegin.o crtend.o"
258 a29k-*-*) # Default a29k environment.
261 alpha*-*-linux-gnuecoff*)
262 tm_file="${tm_file} alpha/linux.h"
263 xm_file="${xm_file} alpha/xm-linux.h"
264 target_cpu_default="MASK_GAS"
267 fixincludes=Makefile.in
271 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
272 xm_file="${xm_file} alpha/xm-linux.h"
273 target_cpu_default="MASK_GAS"
275 tmake_file="t-linux alpha/t-linux"
277 fixincludes=Makefile.in
278 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
280 if [[ x$thread_file = x ]]; then
284 alpha*-dec-osf[[456789]]*)
285 if [[ x$stabs = xyes ]]
287 tm_file="${tm_file} dbx.h"
289 if [[ x$gas != xyes ]]
291 extra_passes="mips-tfile mips-tdump"
295 # Some versions of OSF4 (specifically X4.0-9 296.7) have
296 # a broken tar, so we use cpio instead.
299 install_headers_dir=install-headers-cpio
303 alpha*-dec-osf[[23]]*)
304 tm_file="${tm_file} alpha/osf2or3.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 tm_file="${tm_file} alpha/osf12.h"
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 if [[ x$stabs = xyes ]]
332 tm_file="${tm_file} dbx.h"
334 if [[ x$gas != xyes ]]
336 extra_passes="mips-tfile mips-tdump"
342 tm_file="${tm_file} alpha/win-nt.h"
343 target_cpu_default=MASK_WINDOWS_NT
344 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
346 xmake_file=winnt/x-winnt
347 extra_host_objs=oldnames.o
348 extra_gcc_objs="spawnv.o oldnames.o"
349 fixincludes=fixinc.winnt
350 if [[ x$gnu_ld != xyes ]]
352 extra_programs=ld.exe
354 if [[ x$enable_threads = xyes ]]; then
360 xm_file="${xm_file} alpha/xm-vms.h"
361 tmake_file=alpha/t-vms
362 fixincludes=Makefile.in
364 arm-*-coff* | armel-*-coff*)
366 tmake_file=arm/t-bare
368 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
369 tm_file=arm/riscix1-1.h
372 arm-*-riscix*) # Acorn RISC machine
373 if [[ x$gas = xyes ]]
375 tm_file=arm/rix-gas.h
379 xmake_file=arm/x-riscix
380 tmake_file=arm/t-riscix
383 arm-semi-aout | armel-semi-aout)
385 tmake_file=arm/t-semi
386 fixincludes=Makefile.in # There is nothing to fix
388 arm-semi-aof | armel-semi-aof)
389 tm_file=arm/semiaof.h
390 tmake_file=arm/t-semiaof
391 fixincludes=Makefile.in # There is nothing to fix
395 xm_file=arm/xm-netbsd.h
396 tmake_file=arm/t-netbsd
397 # On NetBSD, the headers are already okay.
398 fixincludes=Makefile.in
401 arm-*-linux-gnuaout*) # ARM Linux
403 xm_file=arm/xm-linux.h
405 tm_file=arm/linux-gas.h
406 tmake_file=arm/t-linux
407 fixincludes=Makefile.in
411 arm-*-*) # generic version
413 c1-convex-*) # Convex C1
416 fixincludes=Makefile.in
418 c2-convex-*) # Convex C2
421 fixincludes=Makefile.in
426 fixincludes=Makefile.in
431 fixincludes=Makefile.in
434 target_cpu_default=16
436 fixincludes=Makefile.in
438 clipper-intergraph-clix*)
439 tm_file="${tm_file} svr3.h clipper/clix.h"
440 xm_file=clipper/xm-clix.h
441 xmake_file=clipper/x-clix
442 extra_headers=va-clipper.h
443 extra_parts="crtbegin.o crtend.o"
444 install_headers_dir=install-headers-cpio
452 # This hasn't been upgraded to GCC 2.
453 # fx80-alliant-*) # Alliant FX/80
459 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
460 xm_file=pa/xm-papro.h
465 tm_file="${tm_file} pa/pa-osf.h"
467 fixincludes=Makefile.in
470 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
471 xm_file=pa/xm-papro.h
475 tm_file="${tm_file} pa/pa-osf.h"
477 fixincludes=Makefile.in
482 fixincludes=Makefile.in
486 fixincludes=Makefile.in
489 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
490 xm_file=pa/xm-pahpux.h
491 xmake_file=pa/x-pa-hpux
492 if [[ x$gas = xyes ]]
494 tm_file="${tm_file} pa/gas.h"
497 install_headers_dir=install-headers-cpio
500 hppa1.0-*-hpux8.0[[0-2]]*)
501 tm_file="${tm_file} pa/pa-hpux.h"
502 xm_file=pa/xm-pahpux.h
503 xmake_file=pa/x-pa-hpux
504 if [[ x$gas = xyes ]]
506 tm_file="${tm_file} pa/pa-gas.h"
508 tm_file="pa/pa-oldas.h ${tm_file}"
511 install_headers_dir=install-headers-cpio
514 hppa1.1-*-hpux8.0[[0-2]]*)
516 tm_file="${tm_file} pa/pa-hpux.h"
517 xm_file=pa/xm-pahpux.h
518 xmake_file=pa/x-pa-hpux
519 if [[ x$gas = xyes ]]
521 tm_file="${tm_file} pa/pa-gas.h"
523 tm_file="pa/pa-oldas.h ${tm_file}"
526 install_headers_dir=install-headers-cpio
531 tm_file="${tm_file} pa/pa-hpux.h"
532 xm_file=pa/xm-pahpux.h
533 xmake_file=pa/x-pa-hpux
534 if [[ x$gas = xyes ]]
536 tm_file="${tm_file} pa/pa-gas.h"
539 install_headers_dir=install-headers-cpio
543 tm_file="${tm_file} pa/pa-hpux.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
556 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
557 xm_file=pa/xm-pahpux.h
558 xmake_file=pa/x-pa-hpux
559 if [[ x$gas = xyes ]]
561 tm_file="${tm_file} pa/pa-gas.h"
564 install_headers_dir=install-headers-cpio
568 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.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
581 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
582 xm_file=pa/xm-pahpux.h
583 xmake_file=pa/x-pa-hpux
584 if [[ x$gas = xyes ]]
586 tm_file="${tm_file} pa/pa-gas.h"
589 install_headers_dir=install-headers-cpio
593 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.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
606 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
607 xm_file=pa/xm-pahpux.h
608 xmake_file=pa/x-pa-hpux
609 if [[ x$gas = xyes ]]
611 tm_file="${tm_file} pa/pa-gas.h"
614 install_headers_dir=install-headers-cpio
618 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
619 xm_file=pa/xm-pahpux.h
620 xmake_file=pa/x-pa-hpux
621 if [[ x$gas = xyes ]]
623 tm_file="${tm_file} pa/pa-gas.h"
626 install_headers_dir=install-headers-cpio
632 fixincludes=Makefile.in
636 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
637 if [[ x$gas = xyes ]]
639 tm_file=i386/aix386.h
640 extra_parts="crtbegin.o crtend.o"
641 tmake_file=i386/t-crtstuff
643 tm_file=i386/aix386ng.h
646 xm_file=i386/xm-aix.h
647 xmake_file=i386/x-aix
650 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
651 xm_file=i386/xm-sysv4.h
652 xmake_file=i386/x-ncr3000
653 if [[ x$stabs = xyes -a x$gas = xyes ]]
655 tm_file=i386/sysv4gdb.h
659 extra_parts="crtbegin.o crtend.o"
660 tmake_file=i386/t-crtpic
664 xm_file=i386/xm-next.h
665 tmake_file=i386/t-next
666 xmake_file=i386/x-next
667 extra_objs=nextstep.o
668 if [[ x$enable_threads = xyes ]]; then
672 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
674 if [[ x$gas = xyes ]]
676 tm_file=i386/seq-gas.h
678 tm_file=i386/sequent.h
681 i[[3456]]86-sequent-ptx1*)
682 xm_file=i386/xm-sysv3.h
683 xmake_file=i386/x-sysv3
684 tm_file=i386/seq-sysv3.h
685 tmake_file=i386/t-crtstuff
686 fixincludes=fixinc.ptx
687 extra_parts="crtbegin.o crtend.o"
688 install_headers_dir=install-headers-cpio
691 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
692 xm_file=i386/xm-sysv3.h
693 xmake_file=i386/x-sysv3
694 tm_file=i386/seq2-sysv3.h
695 tmake_file=i386/t-crtstuff
696 extra_parts="crtbegin.o crtend.o"
697 fixincludes=fixinc.ptx
698 install_headers_dir=install-headers-cpio
701 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
702 xm_file=i386/xm-sysv4.h
704 tm_file=i386/ptx4-i.h
706 extra_parts="crtbegin.o crtend.o"
707 fixincludes=fixinc.ptx
708 install_headers_dir=install-headers-cpio
711 i386-sun-sunos*) # Sun i386 roadrunner
712 xm_file=i386/xm-sun.h
717 tm_file=i386/i386-aout.h
718 tmake_file=i386/t-i386bare
720 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
721 tm_file=i386/bsd386.h
722 xm_file=i386/xm-bsd386.h
723 # tmake_file=t-libc-ok
726 tm_file=i386/386bsd.h
727 xm_file=i386/xm-bsd386.h
728 # tmake_file=t-libc-ok
729 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
732 i[[3456]]86-*-freebsdelf*)
733 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
734 xm_file=i386/xm-freebsd.h
735 # On FreeBSD, the headers are already ok.
736 fixincludes=Makefile.in
737 tmake_file=i386/t-freebsd
742 i[[3456]]86-*-freebsd*)
743 tm_file=i386/freebsd.h
744 xm_file=i386/xm-freebsd.h
745 # On FreeBSD, the headers are already ok.
746 fixincludes=Makefile.in
747 tmake_file=i386/t-freebsd
749 i[[3456]]86-*-netbsd*)
750 tm_file=i386/netbsd.h
751 xm_file=i386/xm-netbsd.h
752 # On NetBSD, the headers are already okay.
753 fixincludes=Makefile.in
757 tm_file=i386/i386-coff.h
758 tmake_file=i386/t-i386bare
760 i[[3456]]86-*-isc*) # 80386 running ISC system
761 xm_file=i386/xm-isc.h
763 i[[345]]86-*-isc[[34]]*)
764 xmake_file=i386/x-isc3
767 xmake_file=i386/x-isc
770 if [[ x$gas = xyes -a x$stabs = xyes ]]
772 tm_file=i386/iscdbx.h
773 tmake_file=i386/t-svr3dbx
774 extra_parts="svr3.ifile svr3z.ifile"
776 tm_file=i386/isccoff.h
777 tmake_file=i386/t-crtstuff
778 extra_parts="crtbegin.o crtend.o"
780 install_headers_dir=install-headers-cpio
783 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
784 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
785 xmake_file=x-linux-aout
786 tmake_file="t-linux-aout i386/t-crtstuff"
787 tm_file=i386/linux-oldld.h
788 fixincludes=Makefile.in #On Linux, the headers are ok already.
792 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
793 xm_file=i386/xm-linux.h # with a.out format
794 xmake_file=x-linux-aout
795 tmake_file="t-linux-aout i386/t-crtstuff"
796 tm_file=i386/linux-aout.h
797 fixincludes=Makefile.in #On Linux, the headers are ok already.
801 i[[3456]]86-*-linux-gnulibc1)
802 xm_file=i386/xm-linux.h # Intel 80386's running Linux
803 xmake_file=x-linux # with ELF format using the
804 tm_file=i386/linux.h # Linux C library 5
805 tmake_file="t-linux t-linux-gnulibc1 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
814 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
815 xm_file=i386/xm-linux.h # with ELF format using glibc 2
816 xmake_file=x-linux # aka Linux C library 6
818 tmake_file="t-linux i386/t-crtstuff"
819 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
820 fixincludes=Makefile.in #On Linux, the headers are ok already.
823 if [[ x$enable_threads = xyes ]]; then
829 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
830 xm_file=i386/xm-go32.h
832 tmake_file=i386/t-go32
834 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
837 fixincludes=Makefile.in
841 i[[3456]]86-*-lynxos*)
842 if [[ x$gas = xyes ]]
846 tm_file=i386/lynx-ng.h
848 xm_file=i386/xm-lynx.h
849 tmake_file=i386/t-i386bare
854 # tmake_file=t-libc-ok
857 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
858 if [[ x$elf = xyes ]]
860 tm_file=i386/osfelf.h
863 tm_file=i386/osfrose.h
866 xm_file=i386/xm-osf.h
867 xmake_file=i386/x-osfrose
868 tmake_file=i386/t-osf
871 i[[345]]86-go32-rtems*)
873 xm_file=i386/xm-go32.h
874 tm_file=i386/go32-rtems.h
875 tmake_file="i386/t-go32 t-rtems"
880 tmake_file="i386/t-i386bare t-rtems"
882 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
883 xm_file=i386/xm-sco5.h
884 xmake_file=i386/x-sco5
885 fixincludes=fixinc.sco
888 tmake_file=i386/t-sco5
889 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
891 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
892 xm_file=i386/xm-sco.h
893 xmake_file=i386/x-sco4
894 fixincludes=fixinc.sco
896 install_headers_dir=install-headers-cpio
897 if [[ x$stabs = xyes ]]
899 tm_file=i386/sco4dbx.h
900 tmake_file=i386/t-svr3dbx
901 extra_parts="svr3.ifile svr3z.rfile"
904 tmake_file=i386/t-crtstuff
905 extra_parts="crtbegin.o crtend.o"
909 i[[3456]]86-*-sco*) # 80386 running SCO system
910 xm_file=i386/xm-sco.h
911 xmake_file=i386/x-sco
913 install_headers_dir=install-headers-cpio
914 if [[ x$stabs = xyes ]]
916 tm_file=i386/scodbx.h
917 tmake_file=i386/t-svr3dbx
918 extra_parts="svr3.ifile svr3z.rfile"
921 extra_parts="crtbegin.o crtend.o"
922 tmake_file=i386/t-crtstuff
926 i[[3456]]86-*-solaris2*)
927 xm_file=i386/xm-sysv4.h
928 if [[ x$stabs = xyes ]]
930 tm_file=i386/sol2dbg.h
934 tmake_file=i386/t-sol2
935 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
937 fixincludes=fixinc.svr4
939 if [[ x$enable_threads = xyes ]]; then
940 thread_file='solaris'
943 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
944 xm_file=i386/xm-sysv4.h
946 if [[ x$stabs = xyes ]]
948 tm_file="${tm_file} dbx.h"
950 tmake_file=i386/t-crtpic
952 extra_parts="crtbegin.o crtend.o"
954 i[[3456]]86-*-sysv*) # Intel 80386's running system V
955 xm_file=i386/xm-sysv3.h
956 xmake_file=i386/x-sysv3
957 if [[ x$gas = xyes ]]
959 if [[ x$stabs = xyes ]]
961 tm_file=i386/svr3dbx.h
962 tmake_file=i386/t-svr3dbx
963 extra_parts="svr3.ifile svr3z.rfile"
965 tm_file=i386/svr3gas.h
966 extra_parts="crtbegin.o crtend.o"
967 tmake_file=i386/t-crtstuff
971 extra_parts="crtbegin.o crtend.o"
972 tmake_file=i386/t-crtstuff
975 i386-*-vsta) # Intel 80386's running VSTa kernel
976 xm_file=i386/xm-vsta.h
978 tmake_file=i386/t-vsta
979 xmake_file=i386/x-vsta
981 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
982 xm_file="${xm_file} i386/xm-cygwin32.h"
983 tmake_file=i386/t-cygwin32
984 tm_file=i386/cygwin32.h
985 xmake_file=i386/x-cygwin32
987 fixincludes=Makefile.in
988 if [[ x$enable_threads = xyes ]]; then
993 i[[3456]]86-*-mingw32)
994 tm_file=i386/mingw32.h
995 xm_file="${xm_file} i386/xm-mingw32.h"
996 tmake_file=i386/t-cygwin32
998 xmake_file=i386/x-cygwin32
999 fixincludes=Makefile.in
1000 if [[ x$enable_threads = xyes ]]; then
1005 i[[3456]]86-*-winnt3*)
1006 tm_file=i386/win-nt.h
1007 out_file=i386/i386.c
1008 xm_file=i386/xm-winnt.h
1009 xmake_file=winnt/x-winnt
1010 tmake_file=i386/t-winnt
1011 extra_host_objs="winnt.o oldnames.o"
1012 extra_gcc_objs="spawnv.o oldnames.o"
1013 fixincludes=fixinc.winnt
1014 if [[ x$gnu_ld != xyes ]]
1016 extra_programs=ld.exe
1018 if [[ x$enable_threads = xyes ]]; then
1022 i[[3456]]86-dg-dgux)
1023 xm_file=i386/xm-dgux.h
1024 out_file=i386/dgux.c
1026 tmake_file=i386/t-dgux
1027 xmake_file=i386/x-dgux
1028 fixincludes=fixinc.dgux
1029 install_headers_dir=install-headers-cpio
1031 i860-alliant-*) # Alliant FX/2800
1032 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1033 xm_file="${xm_file} i860/xm-fx2800.h"
1034 xmake_file=i860/x-fx2800
1035 tmake_file=i860/t-fx2800
1036 extra_parts="crtbegin.o crtend.o"
1039 tm_file="${tm_file} i860/bsd.h"
1040 if [[ x$gas = xyes ]]
1042 tm_file="${tm_file} i860/bsd-gas.h"
1047 tm_file="${tm_file} i860/mach.h"
1048 tmake_file=t-libc-ok
1050 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1051 tm_file="${tm_file} svr3.h i860/paragon.h"
1052 xm_file="${xm_file} xm-svr3.h"
1057 tm_file="${tm_file} svr3.h i860/sysv3.h"
1058 xm_file="${tm_file} xm-svr3.h"
1059 xmake_file=i860/x-sysv3
1060 extra_parts="crtbegin.o crtend.o"
1063 tm_file="${tm_file} svr4.h i860/sysv4.h"
1064 xm_file="${xm_file} xm-svr3.h"
1065 xmake_file=i860/x-sysv4
1067 extra_parts="crtbegin.o crtend.o"
1069 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1070 tm_file="${tm_file} i960/vx960.h"
1071 tmake_file=i960/t-vxworks960
1075 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1076 tmake_file=i960/t-vxworks960
1080 tm_file="${tm_file} i960/vx960.h"
1081 tmake_file=i960/t-vxworks960
1085 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1086 tmake_file=i960/t-960bare
1090 tmake_file="i960/t-960bare t-rtems"
1091 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1094 i960-*-*) # Default i960 environment.
1098 extra_parts="crtinit.o crtfini.o"
1100 m68000-convergent-sysv*)
1102 xm_file=m68k/xm-3b1.h
1104 extra_headers=math-68881.h
1106 m68000-hp-bsd*) # HP 9000/200 running BSD
1107 tm_file=m68k/hp2bsd.h
1108 xmake_file=m68k/x-hp2bsd
1110 extra_headers=math-68881.h
1112 m68000-hp-hpux*) # HP 9000 series 300
1113 xm_file=m68k/xm-hp320.h
1114 if [[ x$gas = xyes ]]
1116 xmake_file=m68k/x-hp320g
1117 tm_file=m68k/hp310g.h
1119 xmake_file=m68k/x-hp320
1120 tm_file=m68k/hp310.h
1123 install_headers_dir=install-headers-cpio
1125 extra_headers=math-68881.h
1130 extra_headers=math-68881.h
1133 tm_file=m68k/sun2o4.h
1135 extra_headers=math-68881.h
1138 xm_file=m68k/xm-3b1.h
1139 if [[ x$gas = xyes ]]
1146 extra_headers=math-68881.h
1148 m68k-apple-aux*) # Apple Macintosh running A/UX
1149 xm_file=m68k/xm-aux.h
1150 tmake_file=m68k/t-aux
1152 install_headers_dir=install-headers-cpio
1153 extra_headers=math-68881.h
1154 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1156 if [[ "$gnu_ld" = yes ]]
1158 tm_file="${tm_file} m68k/auxgld.h"
1160 tm_file="${tm_file} m68k/auxld.h"
1162 if [[ "$gas" = yes ]]
1164 tm_file="${tm_file} m68k/auxgas.h"
1166 tm_file="${tm_file} m68k/auxas.h"
1168 tm_file="${tm_file} m68k/a-ux.h"
1171 tm_file=m68k/apollo68.h
1172 xmake_file=m68k/x-apollo68
1174 extra_headers=math-68881.h
1176 m68k-altos-sysv*) # Altos 3068
1177 if [[ x$gas = xyes ]]
1179 tm_file=m68k/altos3068.h
1180 xm_file=m68k/xm-altos3068.h
1182 echo "The Altos is supported only with the GNU assembler" 1>&2
1185 extra_headers=math-68881.h
1187 m68k-bull-sysv*) # Bull DPX/2
1188 if [[ x$gas = xyes ]]
1190 if [[ x$stabs = xyes ]]
1192 tm_file=m68k/dpx2cdbx.h
1194 tm_file=m68k/dpx2g.h
1199 xm_file=m68k/xm-m68kv.h
1200 xmake_file=m68k/x-dpx2
1202 extra_headers=math-68881.h
1204 m68k-atari-sysv4*) # Atari variant of V.4.
1205 tm_file=m68k/atari.h
1206 xm_file=m68k/xm-atari.h
1208 extra_parts="crtbegin.o crtend.o"
1209 extra_headers=math-68881.h
1211 m68k-motorola-sysv*)
1212 tm_file=m68k/mot3300.h
1213 xm_file=m68k/xm-mot3300.h
1214 if [[ x$gas = xyes ]]
1216 xmake_file=m68k/x-mot3300-gas
1217 if [[ x$gnu_ld = xyes ]]
1219 tmake_file=m68k/t-mot3300-gald
1221 tmake_file=m68k/t-mot3300-gas
1225 xmake_file=m68k/x-mot3300
1226 if [[ x$gnu_ld = xyes ]]
1228 tmake_file=m68k/t-mot3300-gld
1230 tmake_file=m68k/t-mot3300
1234 gdb_needs_out_file_path=yes
1235 extra_parts="crt0.o mcrt0.o"
1236 extra_headers=math-68881.h
1238 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1239 tm_file=m68k/tower-as.h
1240 xm_file=m68k/xm-tower.h
1241 xmake_file=m68k/x-tower
1242 extra_parts="crtbegin.o crtend.o"
1243 extra_headers=math-68881.h
1246 tm_file=m68k/plexus.h
1247 xm_file=m68k/xm-plexus.h
1249 extra_headers=math-68881.h
1253 xm_file=m68k/xm-m68kv.h
1254 extra_headers=math-68881.h
1257 xm_file=m68k/xm-crds.h
1258 xmake_file=m68k/x-crds
1262 extra_headers=math-68881.h
1264 m68k-cbm-sysv4*) # Commodore variant of V.4.
1266 xm_file=m68k/xm-amix.h
1267 xmake_file=m68k/x-amix
1269 extra_parts="crtbegin.o crtend.o"
1270 extra_headers=math-68881.h
1273 tm_file=m68k/ccur-GAS.h
1274 xmake_file=m68k/x-ccur
1275 extra_headers=math-68881.h
1279 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1280 tm_file=m68k/hp3bsd44.h
1281 xmake_file=m68k/x-hp3bsd44
1283 extra_headers=math-68881.h
1285 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1286 tm_file=m68k/hp3bsd.h
1288 extra_headers=math-68881.h
1291 if [[ x$with_fp = xno ]]
1293 tm_file=m68k/isi-nfp.h
1298 extra_headers=math-68881.h
1300 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1301 xm_file=m68k/xm-hp320.h
1302 if [[ x$gas = xyes ]]
1304 xmake_file=m68k/x-hp320g
1305 tm_file=m68k/hp320g.h
1307 xmake_file=m68k/x-hp320
1308 tm_file=m68k/hpux7.h
1311 install_headers_dir=install-headers-cpio
1313 extra_headers=math-68881.h
1315 m68k-hp-hpux*) # HP 9000 series 300
1316 xm_file=m68k/xm-hp320.h
1317 if [[ x$gas = xyes ]]
1319 xmake_file=m68k/x-hp320g
1320 tm_file=m68k/hp320g.h
1322 xmake_file=m68k/x-hp320
1323 tm_file=m68k/hp320.h
1326 install_headers_dir=install-headers-cpio
1328 extra_headers=math-68881.h
1331 tm_file=m68k/sun3mach.h
1333 extra_headers=math-68881.h
1336 if [[ x$gas = xyes ]]
1338 tm_file=m68k/news3gas.h
1340 tm_file=m68k/news3.h
1343 extra_headers=math-68881.h
1345 m68k-sony-bsd* | m68k-sony-newsos*)
1346 if [[ x$gas = xyes ]]
1348 tm_file=m68k/newsgas.h
1353 extra_headers=math-68881.h
1355 m68k-next-nextstep2*)
1356 tm_file=m68k/next21.h
1357 xm_file=m68k/xm-next.h
1358 tmake_file=m68k/t-next
1359 xmake_file=m68k/x-next
1360 extra_objs=nextstep.o
1361 extra_headers=math-68881.h
1364 m68k-next-nextstep3*)
1366 xm_file=m68k/xm-next.h
1367 tmake_file=m68k/t-next
1368 xmake_file=m68k/x-next
1369 extra_objs=nextstep.o
1370 extra_headers=math-68881.h
1371 if [[ x$enable_threads = xyes ]]; then
1376 if [[ x$with_fp = xno ]]
1378 tm_file=m68k/sun3n3.h
1380 tm_file=m68k/sun3o3.h
1383 extra_headers=math-68881.h
1385 m68k-sun-sunos*) # For SunOS 4 (the default).
1386 if [[ x$with_fp = xno ]]
1388 tm_file=m68k/sun3n.h
1392 xm_file=m68k/xm-sun3.h
1394 extra_headers=math-68881.h
1397 tm_file=m68k/vxm68k.h
1398 tmake_file=m68k/t-vxworks68
1399 extra_headers=math-68881.h
1402 tmake_file=m68k/t-m68kbare
1403 tm_file="m68k/m68k-aout.h libgloss.h"
1404 extra_headers=math-68881.h
1407 tmake_file=m68k/t-m68kbare
1408 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1409 extra_headers=math-68881.h
1412 if [[ x$gas = xyes ]]
1416 tm_file=m68k/lynx-ng.h
1418 xm_file=m68k/xm-lynx.h
1420 tmake_file=m68k/t-lynx
1421 extra_headers=math-68881.h
1424 tm_file=m68k/netbsd.h
1425 xm_file=m68k/xm-netbsd.h
1426 # On NetBSD, the headers are already okay.
1427 fixincludes=Makefile.in
1430 m68k-*-sysv3*) # Motorola m68k's running system V.3
1431 xm_file=m68k/xm-m68kv.h
1432 xmake_file=m68k/x-m68kv
1433 extra_parts="crtbegin.o crtend.o"
1434 extra_headers=math-68881.h
1436 m68k-*-sysv4*) # Motorola m68k's running system V.4
1437 tm_file=m68k/m68kv4.h
1438 xm_file=m68k/xm-m68kv.h
1440 extra_parts="crtbegin.o crtend.o"
1441 extra_headers=math-68881.h
1443 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1444 xm_file=m68k/xm-linux.h # with a.out format
1446 tm_file=m68k/linux-aout.h
1447 tmake_file="t-linux-aout m68k/t-linux-aout"
1448 fixincludes=Makefile.in #On Linux, the headers are ok already.
1449 extra_headers=math-68881.h
1452 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1453 xm_file=m68k/xm-linux.h # with ELF format using the
1454 xmake_file=x-linux # Linux C library 5
1455 tm_file=m68k/linux.h
1456 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1457 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1458 fixincludes=Makefile.in #On Linux, the headers are ok already.
1459 extra_headers=math-68881.h
1462 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1463 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1464 xmake_file=x-linux # aka the Linux C library 6.
1465 tm_file=m68k/linux.h
1466 tmake_file="t-linux m68k/t-linux"
1467 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1468 fixincludes=Makefile.in #On Linux, the headers are ok already.
1469 extra_headers=math-68881.h
1471 if [[ x$thread_file = x ]]; then
1476 tmake_file=m68k/t-m68kbare
1477 tm_file=m68k/m68k-psos.h
1478 extra_headers=math-68881.h
1481 tmake_file="m68k/t-m68kbare t-rtems"
1482 tm_file=m68k/rtems.h
1483 extra_headers=math-68881.h
1489 tm_file=m88k/dguxbcs.h
1490 tmake_file=m88k/t-dguxbcs
1494 tmake_file=m88k/t-dgux
1497 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1499 xmake_file=m88k/x-dgux
1500 if [[ x$gas = xyes ]]
1502 tmake_file=m88k/t-dgux-gas
1504 fixincludes=fixinc.dgux
1506 m88k-dolphin-sysv3*)
1507 tm_file=m88k/dolph.h
1508 extra_parts="crtbegin.o crtend.o"
1509 xm_file=m88k/xm-sysv3.h
1510 xmake_file=m88k/x-dolph
1511 if [[ x$gas = xyes ]]
1513 tmake_file=m88k/t-m88k-gas
1516 m88k-tektronix-sysv3)
1517 tm_file=m88k/tekXD88.h
1518 extra_parts="crtbegin.o crtend.o"
1519 xm_file=m88k/xm-sysv3.h
1520 xmake_file=m88k/x-tekXD88
1521 if [[ x$gas = xyes ]]
1523 tmake_file=m88k/t-m88k-gas
1527 tm_file=m88k/m88k-aout.h
1530 tm_file=m88k/m88k-coff.h
1531 tmake_file=m88k/t-bug
1535 extra_parts="crtbegin.o crtend.o"
1536 if [[ x$gas = xyes ]]
1538 tmake_file=m88k/t-luna-gas
1540 tmake_file=m88k/t-luna
1544 tm_file=m88k/sysv3.h
1545 extra_parts="crtbegin.o crtend.o"
1546 xm_file=m88k/xm-sysv3.h
1547 xmake_file=m88k/x-sysv3
1548 if [[ x$gas = xyes ]]
1550 tmake_file=m88k/t-m88k-gas
1554 tm_file=m88k/sysv4.h
1555 extra_parts="crtbegin.o crtend.o"
1556 xmake_file=m88k/x-sysv4
1557 tmake_file=m88k/t-sysv4
1559 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1560 tm_file=mips/iris6.h
1561 xm_file=mips/xm-iris6.h
1563 fixincludes=fixinc.irix
1564 xmake_file=mips/x-iris6
1565 tmake_file=mips/t-iris6
1566 if [[ x$enable_threads = xyes ]]; then
1570 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1571 tm_file=mips/cross64.h
1572 xm_file=mips/xm-iris5.h
1574 fixincludes=Makefile.in
1575 xmake_file=mips/x-iris
1576 tmake_file=mips/t-cross64
1577 # See comment in mips/iris[56].h files.
1579 if [[ x$enable_threads = xyes ]]; then
1584 if [[ x$gas = xyes ]]
1586 if [[ x$stabs = xyes ]]
1588 tm_file=mips/iris5gdb.h
1590 tm_file=mips/sni-gas.h
1593 tm_file=mips/sni-svr4.h
1595 xm_file=mips/xm-sysv.h
1596 xmake_file=mips/x-sni-svr4
1597 tmake_file=mips/t-mips-gas
1598 if [[ x$gnu_ld != xyes ]]
1604 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1605 if [[ x$gas = xyes ]]
1607 tm_file=mips/iris5gas.h
1608 if [[ x$stabs = xyes ]]
1610 tm_file="${tm_file} dbx.h"
1613 tm_file=mips/iris5.h
1615 xm_file=mips/xm-iris5.h
1617 fixincludes=fixinc.irix
1618 xmake_file=mips/x-iris
1619 # mips-tfile doesn't work yet
1620 tmake_file=mips/t-mips-gas
1621 # See comment in mips/iris5.h file.
1623 if [[ x$enable_threads = xyes ]]; then
1627 mips-sgi-irix4loser*) # Mostly like a MIPS.
1628 tm_file=mips/iris4loser.h
1629 if [[ x$stabs = xyes ]]; then
1630 tm_file="${tm_file} dbx.h"
1632 xm_file=mips/xm-iris4.h
1634 xmake_file=mips/x-iris
1635 if [[ x$gas = xyes ]]
1637 tmake_file=mips/t-mips-gas
1639 extra_passes="mips-tfile mips-tdump"
1641 if [[ x$gnu_ld != xyes ]]
1645 if [[ x$enable_threads = xyes ]]; then
1649 mips-sgi-irix4*) # Mostly like a MIPS.
1650 tm_file=mips/iris4.h
1651 if [[ x$stabs = xyes ]]; then
1652 tm_file="${tm_file} dbx.h"
1654 xm_file=mips/xm-iris4.h
1656 xmake_file=mips/x-iris
1657 if [[ x$gas = xyes ]]
1659 tmake_file=mips/t-mips-gas
1661 extra_passes="mips-tfile mips-tdump"
1663 if [[ x$gnu_ld != xyes ]]
1667 if [[ x$enable_threads = xyes ]]; then
1671 mips-sgi-*) # Mostly like a MIPS.
1672 tm_file=mips/iris3.h
1673 if [[ x$stabs = xyes ]]; then
1674 tm_file="${tm_file} dbx.h"
1676 xm_file=mips/xm-iris3.h
1678 xmake_file=mips/x-iris3
1679 if [[ x$gas = xyes ]]
1681 tmake_file=mips/t-mips-gas
1683 extra_passes="mips-tfile mips-tdump"
1685 if [[ x$gnu_ld != xyes ]]
1690 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1691 tm_file=mips/osfrose.h
1692 xmake_file=mips/x-osfrose
1693 tmake_file=mips/t-osfrose
1694 extra_objs=halfpic.o
1697 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1698 tm_file=mips/dec-osf1.h
1699 if [[ x$stabs = xyes ]]; then
1700 tm_file="${tm_file} dbx.h"
1702 xmake_file=mips/x-dec-osf1
1703 if [[ x$gas = xyes ]]
1705 tmake_file=mips/t-mips-gas
1707 tmake_file=mips/t-ultrix
1708 extra_passes="mips-tfile mips-tdump"
1710 if [[ x$gnu_ld != xyes ]]
1715 mips-dec-bsd*) # Decstation running 4.4 BSD
1716 tm_file=mips/dec-bsd.h
1718 if [[ x$gas = xyes ]]
1720 tmake_file=mips/t-mips-gas
1722 tmake_file=mips/t-ultrix
1723 extra_passes="mips-tfile mips-tdump"
1725 if [[ x$gnu_ld != xyes ]]
1730 mips-dec-netbsd*) # Decstation running NetBSD
1731 tm_file=mips/netbsd.h
1732 xm_file=mips/xm-netbsd.h
1733 # On NetBSD, the headers are already okay.
1734 fixincludes=Makefile.in
1736 if [[ x$prefix = xNONE ]]; then
1737 prefix=$native_prefix
1739 prefix=$native_prefix
1741 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1742 tm_file=mips/news4.h
1743 if [[ x$stabs = xyes ]]; then
1744 tm_file="${tm_file} dbx.h"
1746 if [[ x$gas = xyes ]]
1748 tmake_file=mips/t-mips-gas
1750 extra_passes="mips-tfile mips-tdump"
1752 if [[ x$gnu_ld != xyes ]]
1756 xmake_file=mips/x-sony
1758 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1759 # That is based on svr4.
1760 # t-svr4 is not right because this system doesn't use ELF.
1761 tm_file=mips/news5.h
1762 if [[ x$stabs = xyes ]]; then
1763 tm_file="${tm_file} dbx.h"
1765 xm_file=mips/xm-news.h
1766 if [[ x$gas = xyes ]]
1768 tmake_file=mips/t-mips-gas
1770 extra_passes="mips-tfile mips-tdump"
1772 if [[ x$gnu_ld != xyes ]]
1777 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1778 tm_file=mips/svr4-t.h
1779 if [[ x$stabs = xyes ]]; then
1780 tm_file="${tm_file} dbx.h"
1782 xm_file=mips/xm-sysv4.h
1783 xmake_file=mips/x-sysv
1784 if [[ x$gas = xyes ]]
1786 tmake_file=mips/t-mips-gas
1787 extra_parts="crtbegin.o crtend.o"
1789 tmake_file=mips/t-mips
1790 extra_passes="mips-tfile mips-tdump"
1792 if [[ x$gnu_ld != xyes ]]
1798 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1799 tm_file=mips/ultrix.h
1800 if [[ x$stabs = xyes ]]; then
1801 tm_file="${tm_file} dbx.h"
1803 xmake_file=mips/x-ultrix
1804 if [[ x$gas = xyes ]]
1806 tmake_file=mips/t-mips-gas
1808 tmake_file=mips/t-ultrix
1809 extra_passes="mips-tfile mips-tdump"
1811 if [[ x$gnu_ld != xyes ]]
1816 mips-*-riscos[[56789]]bsd*)
1817 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1818 if [[ x$stabs = xyes ]]; then
1819 tm_file="${tm_file} dbx.h"
1821 if [[ x$gas = xyes ]]
1823 tmake_file=mips/t-bsd-gas
1825 tmake_file=mips/t-bsd
1826 extra_passes="mips-tfile mips-tdump"
1828 if [[ x$gnu_ld != xyes ]]
1834 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1835 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1836 if [[ x$stabs = xyes ]]; then
1837 tm_file="${tm_file} dbx.h"
1839 if [[ x$gas = xyes ]]
1841 tmake_file=mips/t-bsd-gas
1843 tmake_file=mips/t-bsd
1844 extra_passes="mips-tfile mips-tdump"
1846 if [[ x$gnu_ld != xyes ]]
1852 mips-*-riscos[[56789]]sysv4*)
1853 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1854 if [[ x$stabs = xyes ]]; then
1855 tm_file="${tm_file} dbx.h"
1857 xm_file=mips/xm-sysv4.h
1858 xmake_file=mips/x-sysv
1859 if [[ x$gas = xyes ]]
1861 tmake_file=mips/t-svr4-gas
1863 tmake_file=mips/t-svr4
1864 extra_passes="mips-tfile mips-tdump"
1866 if [[ x$gnu_ld != xyes ]]
1872 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1873 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1874 if [[ x$stabs = xyes ]]; then
1875 tm_file="${tm_file} dbx.h"
1877 xm_file=mips/xm-sysv.h
1878 xmake_file=mips/x-sysv
1879 if [[ x$gas = xyes ]]
1881 tmake_file=mips/t-svr4-gas
1883 tmake_file=mips/t-svr4
1884 extra_passes="mips-tfile mips-tdump"
1886 if [[ x$gnu_ld != xyes ]]
1892 mips-*-riscos[[56789]]sysv*)
1893 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1894 if [[ x$stabs = xyes ]]; then
1895 tm_file="${tm_file} dbx.h"
1897 xm_file=mips/xm-sysv.h
1898 xmake_file=mips/x-sysv
1899 if [[ x$gas = xyes ]]
1901 tmake_file=mips/t-svr3-gas
1903 tmake_file=mips/t-svr3
1904 extra_passes="mips-tfile mips-tdump"
1906 if [[ x$gnu_ld != xyes ]]
1912 mips-*-sysv* | mips-*-riscos*sysv*)
1913 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1914 if [[ x$stabs = xyes ]]; then
1915 tm_file="${tm_file} dbx.h"
1917 xm_file=mips/xm-sysv.h
1918 xmake_file=mips/x-sysv
1919 if [[ x$gas = xyes ]]
1921 tmake_file=mips/t-svr3-gas
1923 tmake_file=mips/t-svr3
1924 extra_passes="mips-tfile mips-tdump"
1926 if [[ x$gnu_ld != xyes ]]
1932 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1933 tm_file=mips/mips-5.h
1934 if [[ x$stabs = xyes ]]; then
1935 tm_file="${tm_file} dbx.h"
1937 if [[ x$gas = xyes ]]
1939 tmake_file=mips/t-mips-gas
1941 extra_passes="mips-tfile mips-tdump"
1943 if [[ x$gnu_ld != xyes ]]
1952 tm_file=mips/ecoffl.h
1953 if [[ x$stabs = xyes ]]; then
1954 tm_file="${tm_file} dbx.h"
1956 tmake_file=mips/t-ecoff
1959 tm_file=mips/ecoff.h
1960 if [[ x$stabs = xyes ]]; then
1961 tm_file="${tm_file} dbx.h"
1963 tmake_file=mips/t-ecoff
1967 tm_file="mips/elfl.h libgloss.h"
1968 tmake_file=mips/t-ecoff
1971 tm_file="mips/elf.h libgloss.h"
1972 tmake_file=mips/t-ecoff
1975 tm_file="mips/elfl64.h libgloss.h"
1976 tmake_file=mips/t-ecoff
1978 mips64orionel-*-elf*)
1979 tm_file="mips/elflorion.h libgloss.h"
1980 tmake_file=mips/t-ecoff
1983 tm_file="mips/elf64.h libgloss.h"
1984 tmake_file=mips/t-ecoff
1987 tm_file="mips/elforion.h libgloss.h"
1988 tmake_file=mips/t-ecoff
1990 mips64orion-*-rtems*)
1991 tm_file=mips/rtems64.h
1992 tmake_file="mips/t-ecoff t-rtems"
1994 mips-*-*) # Default MIPS RISC-OS 4.0.
1995 if [[ x$stabs = xyes ]]; then
1996 tm_file="${tm_file} dbx.h"
1998 if [[ x$gas = xyes ]]
2000 tmake_file=mips/t-mips-gas
2002 extra_passes="mips-tfile mips-tdump"
2004 if [[ x$gnu_ld != xyes ]]
2011 tm_file="mn10200/mn10200.h"
2012 if [[ x$stabs = xyes ]]
2014 tm_file="${tm_file} dbx.h"
2020 tm_file="mn10300/mn10300.h"
2021 if [[ x$stabs = xyes ]]
2023 tm_file="${tm_file} dbx.h"
2028 tm_file=ns32k/encore.h
2032 tm_file=ns32k/sequent.h
2036 tm_file=ns32k/tek6100.h
2041 tm_file=ns32k/tek6200.h
2045 # This has not been updated to GCC 2.
2047 # xm_file=ns32k/xm-genix.h
2048 # xmake_file=ns32k/x-genix
2049 # tm_file=ns32k/genix.h
2050 # broken_install=yes
2054 tm_file=ns32k/merlin.h
2058 tm_file=ns32k/pc532-mach.h
2062 tm_file=ns32k/pc532-min.h
2063 xm_file=ns32k/xm-pc532-min.h
2066 ns32k-pc532-netbsd*)
2067 tm_file=ns32k/netbsd.h
2068 xm_file=ns32k/xm-netbsd.h
2069 # On NetBSD, the headers are already okay.
2070 fixincludes=Makefile.in
2074 tm_file="${tm_file} pdp11/2bsd.h"
2080 xmake_file=pyr/x-pyr
2087 xmake_file=romp/x-mach
2090 powerpc-*-sysv* | powerpc-*-elf*)
2091 tm_file=rs6000/sysv4.h
2092 xm_file=rs6000/xm-sysv4.h
2093 extra_headers=ppc-asm.h
2094 if [[ x$gas = xyes ]]
2096 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2098 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2100 xmake_file=rs6000/x-sysv4
2103 tm_file=rs6000/eabiaix.h
2104 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2105 fixincludes=Makefile.in
2106 extra_headers=ppc-asm.h
2109 tm_file=rs6000/eabisim.h
2110 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2111 fixincludes=Makefile.in
2112 extra_headers=ppc-asm.h
2115 tm_file=rs6000/eabi.h
2116 if [[ x$gas = xyes ]]
2118 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2120 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2122 fixincludes=Makefile.in
2123 extra_headers=ppc-asm.h
2126 tm_file=rs6000/rtems.h
2127 if [[ x$gas = xyes ]]
2129 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2131 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2133 fixincludes=Makefile.in
2134 extra_headers=ppc-asm.h
2136 powerpc-*-linux-gnu*)
2137 tm_file=rs6000/linux.h
2138 xm_file=rs6000/xm-sysv4.h
2139 out_file=rs6000/rs6000.c
2140 if [[ x$gas = xyes ]]
2142 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2144 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2147 fixincludes=Makefile.in
2148 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2149 extra_headers=ppc-asm.h
2150 if [[ x$thread_file = x ]]; then
2156 xm_file=rs6000/xm-sysv4.h
2157 tm_file=rs6000/vxppc.h
2158 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2159 extra_headers=ppc-asm.h
2161 powerpcle-*-sysv* | powerpcle-*-elf*)
2162 tm_file=rs6000/sysv4le.h
2163 xm_file=rs6000/xm-sysv4.h
2164 if [[ x$gas = xyes ]]
2166 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2168 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2170 xmake_file=rs6000/x-sysv4
2171 extra_headers=ppc-asm.h
2173 powerpcle-*-eabisim*)
2174 tm_file=rs6000/eabilesim.h
2175 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2176 fixincludes=Makefile.in
2177 extra_headers=ppc-asm.h
2180 tm_file=rs6000/eabile.h
2181 if [[ x$gas = xyes ]]
2183 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2185 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2187 fixincludes=Makefile.in
2188 extra_headers=ppc-asm.h
2190 powerpcle-*-winnt* )
2191 tm_file=rs6000/win-nt.h
2192 tmake_file=rs6000/t-winnt
2194 fixincludes=Makefile.in
2195 if [[ x$enable_threads = xyes ]]; then
2198 extra_headers=ppc-asm.h
2200 powerpcle-*-pe | powerpcle-*-cygwin32)
2201 tm_file=rs6000/cygwin32.h
2202 xm_file=rs6000/xm-cygwin32.h
2203 tmake_file=rs6000/t-winnt
2204 xmake_file=rs6000/x-cygwin32
2206 fixincludes=Makefile.in
2207 if [[ x$enable_threads = xyes ]]; then
2211 extra_headers=ppc-asm.h
2213 powerpcle-*-solaris2*)
2214 tm_file=rs6000/sol2.h
2215 xm_file=rs6000/xm-sysv4.h
2216 if [[ x$gas = xyes ]]
2218 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2220 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2222 xmake_file=rs6000/x-sysv4
2223 fixincludes=fixinc.svr4
2224 extra_headers=ppc-asm.h
2226 rs6000-ibm-aix3.[[01]]*)
2227 tm_file=rs6000/aix31.h
2228 xmake_file=rs6000/x-aix31
2231 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2232 tm_file=rs6000/aix3newas.h
2233 if [[ x$host != x$target ]]
2235 tmake_file=rs6000/t-xnewas
2237 tmake_file=rs6000/t-newas
2241 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2242 tm_file=rs6000/aix41.h
2243 if [[ x$host != x$target ]]
2245 tmake_file=rs6000/t-xnewas
2247 tmake_file=rs6000/t-newas
2249 xmake_file=rs6000/x-aix31
2259 tm_file=rs6000/mach.h
2260 xm_file=rs6000/xm-mach.h
2261 xmake_file=rs6000/x-mach
2265 tm_file=rs6000/lynx.h
2266 xm_file=rs6000/xm-lynx.h
2267 tmake_file=rs6000/t-rs6000
2268 xmake_file=rs6000/x-lynx
2280 xm_file=sparc/xm-pbd.h
2282 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2283 tm_file=sparc/vxsparc.h
2284 tmake_file=sparc/t-vxsparc
2288 tmake_file=sparc/t-sparcbare
2289 tm_file="sparc/aout.h libgloss.h"
2292 tm_file=sparc/netbsd.h
2293 xm_file=sparc/xm-netbsd.h
2294 # On NetBSD, the headers are already okay.
2295 fixincludes=Makefile.in
2301 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2302 xm_file=sparc/xm-linux.h
2303 tm_file=sparc/linux-aout.h
2305 fixincludes=Makefile.in #On Linux, the headers are ok already.
2309 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2310 xm_file=sparc/xm-linux.h # with ELF format using the
2311 xmake_file=x-linux # Linux C library 5.
2312 tm_file=sparc/linux.h
2313 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2314 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2315 fixincludes=Makefile.in #On Linux, the headers are ok already.
2319 sparc-*-linux-gnu*) # Sparc's running Linux
2320 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2321 xmake_file=x-linux # aka the Linux C library 6.
2322 tm_file=sparc/linux.h
2323 tmake_file="t-linux sparc/t-linux"
2324 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2325 fixincludes=Makefile.in #On Linux, the headers are ok already.
2328 if [[ x$thread_file = x ]]; then
2333 if [[ x$gas = xyes ]]
2335 tm_file=sparc/lynx.h
2337 tm_file=sparc/lynx-ng.h
2339 xm_file=sparc/xm-lynx.h
2340 tmake_file=sparc/t-sunos41
2344 tmake_file="sparc/t-sparcbare t-rtems"
2345 tm_file=sparc/rtems.h
2348 tm_file=sparc/sol2.h
2349 xm_file=sparc/xm-sol2.h
2350 tmake_file=sparc/t-sol2
2351 xmake_file=sparc/x-sysv4
2352 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2353 fixincludes=fixinc.svr4
2355 if [[ x$enable_threads = xyes ]]; then
2356 thread_file='solaris'
2360 tm_file=sparc/sunos4.h
2361 tmake_file=sparc/t-sunos40
2365 tm_file=sparc/sunos4.h
2366 tmake_file=sparc/t-sunos41
2370 tm_file=sparc/sun4o3.h
2374 tm_file=sparc/sysv4.h
2375 xm_file=sparc/xm-sysv4.h
2377 xmake_file=sparc/x-sysv4
2378 extra_parts="crtbegin.o crtend.o"
2381 xm_file=sparc/xm-sol2.h
2382 tm_file=sparc/vxsim.h
2383 tmake_file=sparc/t-vxsparc
2384 xmake_file=sparc/x-sysv4
2387 tm_file="sparc/splet.h libgloss.h"
2388 tmake_file=sparc/t-splet
2391 tm_file="sparc/litecoff.h libgloss.h"
2392 tmake_file=sparc/t-sparclite
2395 tm_file="sparc/lite.h aoutos.h libgloss.h"
2396 tmake_file=sparc/t-sparclite
2399 tmake_file=sparc/t-sp64
2400 tm_file=sparc/sp64-aout.h
2403 tmake_file=sparc/t-sp64
2404 tm_file=sparc/sp64-elf.h
2405 extra_parts="crtbegin.o crtend.o"
2407 # This hasn't been upgraded to GCC 2.
2408 # tahoe-harris-*) # Harris tahoe, using COFF.
2409 # tm_file=tahoe/harris.h
2411 # tahoe-*-bsd*) # tahoe running BSD
2413 # This hasn't been upgraded to GCC 2.
2418 vax-*-bsd*) # vaxen running BSD
2422 vax-*-sysv*) # vaxen running system V
2423 tm_file="${tm_file} vax/vaxv.h"
2424 xm_file="${tm_file} vax/xm-vaxv.h"
2428 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2429 xm_file="${xm_file} xm-netbsd.h"
2430 # On NetBSD, the headers are already okay.
2431 fixincludes=Makefile.in
2435 vax-*-ultrix*) # vaxen running ultrix
2436 tm_file="${tm_file} vax/ultrix.h"
2440 vax-*-vms*) # vaxen running VMS
2441 xm_file=vax/xm-vms.h
2445 vax-*-*) # vax default entry
2449 xm_file="${xm_file} xm-svr3"
2453 echo "Configuration $machine not supported" 1>&2
2460 ;; # Existing Linux/GNU systems do not use the GNU setup.
2462 # On the GNU system, the setup is just about the same on
2463 # each different CPU. The specific machines that GNU
2464 # supports are matched above and just set $cpu_type.
2465 xm_file=${cpu_type}/xm-gnu.h
2466 tm_file=${cpu_type}/gnu.h
2467 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2468 # GNU always uses ELF.
2470 # GNU tools are the only tools.
2473 # On GNU, the headers are already okay.
2474 fixincludes=Makefile.in
2475 xmake_file=x-linux # These details are the same as Linux.
2476 tmake_file=t-gnu # These are not.
2479 fixincludes=fixinc.svr4
2480 xmake_try_sysv=x-sysv
2482 install_headers_dir=install-headers-cpio
2486 install_headers_dir=install-headers-cpio
2490 # Distinguish i[3456]86
2491 # Also, do not run mips-tfile on MIPS if using gas.
2492 # Process --with-cpu= for PowerPC/rs6000
2493 target_cpu_default2=
2496 target_cpu_default2=1
2499 target_cpu_default2=2
2502 target_cpu_default2=3
2507 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2510 target_cpu_default2="MASK_CPU_EV5"
2514 if [[ x$gas = xyes ]]
2516 if [[ x$target_cpu_default2 = x ]]
2518 target_cpu_default2="MASK_GAS"
2520 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2524 mips*-*-ecoff* | mips*-*-elf*)
2525 if [[ x$gas = xyes ]]
2527 if [[ x$gnu_ld = xyes ]]
2529 target_cpu_default2=20
2531 target_cpu_default2=16
2536 if [[ x$gas = xyes ]]
2538 target_cpu_default2=16
2541 powerpc*-*-* | rs6000-*-*)
2542 case "x$with_cpu" in
2546 xcommon | xpower | xpower2 | xpowerpc | xrios \
2547 | xrios1 | xrios2 | xrsc | xrsc1 \
2548 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2549 | x403 | x505 | x801 | x821 | x823 | x860)
2550 target_cpu_default2="'\"$with_cpu\"'"
2554 echo "--with-cpu must be passed a value" 1>&2
2559 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2565 case ".$with_cpu" in
2567 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2569 .supersparc | .ultrasparc | .v7 | .v8)
2570 target_cpu_default2="TARGET_CPU_$with_cpu"
2573 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2580 if [[ x$target_cpu_default2 != x ]]
2582 if [[ x$target_cpu_default != x ]]
2584 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2586 target_cpu_default=$target_cpu_default2
2590 # No need for collect2 if we have the GNU linker.
2597 # Save data on machine being used to compile GCC in build_xm_file.
2598 # Save data on host machine in vars host_xm_file and host_xmake_file.
2599 if [[ x$pass1done = x ]]
2601 if [[ x"$xm_file" = x ]]
2602 then build_xm_file=$cpu_type/xm-$cpu_type.h
2603 else build_xm_file=$xm_file
2605 build_broken_install=$broken_install
2606 build_install_headers_dir=$install_headers_dir
2607 build_exeext=$exeext
2610 if [[ x$pass2done = x ]]
2612 if [[ x"$xm_file" = x ]]
2613 then host_xm_file=$cpu_type/xm-$cpu_type.h
2614 else host_xm_file=$xm_file
2616 if [[ x"$xmake_file" = x ]]
2617 then xmake_file=$cpu_type/x-$cpu_type
2619 host_xmake_file="$xmake_file"
2620 host_truncate_target=$truncate_target
2621 host_extra_gcc_objs=$extra_gcc_objs
2622 host_extra_objs=$extra_host_objs
2628 extra_objs="${host_extra_objs} ${extra_objs}"
2630 # Default the target-machine variables that were not explicitly set.
2631 if [[ x"$tm_file" = x ]]
2632 then tm_file=$cpu_type/$cpu_type.h; fi
2634 if [[ x$extra_headers = x ]]
2635 then extra_headers=; fi
2637 if [[ x"$xm_file" = x ]]
2638 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2640 md_file=$cpu_type/$cpu_type.md
2642 if [[ x$out_file = x ]]
2643 then out_file=$cpu_type/$cpu_type.c; fi
2645 if [[ x"$tmake_file" = x ]]
2646 then tmake_file=$cpu_type/t-$cpu_type
2649 if [[ x$float_format = x ]]
2650 then float_format=i64
2653 # Say what files are being used for the output code and MD file.
2654 echo "Using \`$srcdir/config/$out_file' to output insns."
2655 echo "Using \`$srcdir/config/$md_file' as machine description file."
2658 for f in $tm_file; do
2661 if [[ $count = ax ]]; then
2662 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2664 echo "Using the following target machine macro files:"
2665 for f in $tm_file; do
2666 echo " $srcdir/config/$f"
2671 for f in $host_xm_file; do
2674 if [[ $count = ax ]]; then
2675 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2677 echo "Using the following host machine macro files:"
2678 for f in $host_xm_file; do
2679 echo " $srcdir/config/$f"
2683 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2685 for f in $build_xm_file; do
2688 if [[ $count = ax ]]; then
2689 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2691 echo "Using the following build machine macro files:"
2692 for f in $build_xm_file; do
2693 echo " $srcdir/config/$f"
2698 if [[ x$thread_file = x ]]
2699 then thread_file='single'
2702 # Set up the header files.
2703 # $links is the list of header files to create.
2704 # $vars is the list of shell variables with file names to include.
2705 # config2.h is the old config.h. It is included by the new config.h which
2706 # created from config.in. The goal is to simplify the transition to autoconf.
2707 vars="host_xm_file tm_file xm_file build_xm_file"
2708 links="config2.h tm.h tconfig.h hconfig.h"
2711 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2714 while [[ -n "$vars" ]]
2716 # set file to car of files, files to cdr of files
2717 set $vars; var=$1; shift; vars=$*
2718 set $links; link=$1; shift; links=$*
2722 # Define TARGET_CPU_DEFAULT if the system wants one.
2723 # This substitutes for lots of *.h files.
2724 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2726 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2729 for file in `eval echo '$'$var`; do
2730 echo "#include \"$file\"" >>$link
2734 # Truncate the target if necessary
2735 if [[ x$host_truncate_target != x ]]; then
2736 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2739 # Get the version number from the toplevel
2740 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2742 # Are we using gcc as the native compiler?
2744 *linux*) # All Linux's use gcc as the native compiler.
2745 if [[ x$prefix = xNONE ]]; then
2746 prefix=$native_prefix
2751 # Get an absolute path to the GCC top-level source directory
2757 # Conditionalize the makefile for this host machine.
2758 # Make-host contains the concatenation of all host makefile fragments
2759 # [there can be more than one]. This file is built by configure.frag.
2760 host_overrides=Make-host
2761 dep_host_xmake_file=
2762 for f in .. ${host_xmake_file}
2764 if [[ -f ${srcdir}/config/$f ]]
2766 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2770 # Conditionalize the makefile for this target machine.
2771 # Make-target contains the concatenation of all host makefile fragments
2772 # [there can be more than one]. This file is built by configure.frag.
2773 target_overrides=Make-target
2775 for f in .. ${tmake_file}
2777 if [[ -f ${srcdir}/config/$f ]]
2779 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2783 # If the host doesn't support symlinks, modify CC in
2784 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2785 # Otherwise, we can use "CC=$(CC)".
2787 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2789 cc_set_by_configure="\$(CC)"
2790 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2792 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2793 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2797 out_object_file=`basename $out_file .c`.o
2800 for f in $tm_file; do
2801 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2805 for f in $host_xm_file; do
2806 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2810 for f in $build_xm_file; do
2811 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2814 # Define macro CROSS_COMPILE in compilation
2815 # if this is a cross-compiler.
2816 # Also use all.cross instead of all.internal
2817 # and add cross-make to Makefile.
2818 cross_overrides="/dev/null"
2819 if [[ x$host != x$target ]]
2821 cross_defines="CROSS=-DCROSS_COMPILE"
2822 cross_overrides="${topdir}/cross-make"
2825 # When building gcc with a cross-compiler, we need to fix a few things.
2826 # This must come after cross-make as we want all.build to override
2828 build_overrides="/dev/null"
2829 if [[ x$build != x$host ]]
2831 build_overrides="${topdir}/build-make"
2834 # Expand extra_headers to include complete path.
2835 # This substitutes for lots of t-* files.
2837 if [[ "x$extra_headers" = x ]]
2840 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2841 for file in $extra_headers;
2843 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2847 # Add a definition of USE_COLLECT2 if system wants one.
2848 # Also tell toplev.c what to do.
2849 # This substitutes for lots of t-* files.
2850 if [[ x$use_collect2 = x ]]
2855 will_use_collect2="ld"
2856 maybe_use_collect2="-DUSE_COLLECT2"
2860 # Set MD_DEPS if the real md file is in md.pre-cpp.
2861 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2862 # for line oriented comments, so we must always use a GNU cpp. If
2863 # building gcc with a cross compiler, use the cross compiler just
2864 # built. Otherwise, we can use the cpp just built.
2866 if [[ "x$md_cppflags" = x ]]
2868 md_file_sub=$srcdir/config/$md_file
2873 # If we have gas in the build tree, make a link to it.
2874 if [[ -f ../gas/Makefile ]]; then
2875 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2878 # If we have ld in the build tree, make a link to it.
2879 if [[ -f ../ld/Makefile ]]; then
2880 if [[ x$use_collect2 = x ]]; then
2881 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2883 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2887 # Figure out what language subdirectories are present.
2889 for lang in ${srcdir}/*/config-lang.in ..
2893 # The odd quoting in the next line works around
2894 # an apparent bug in bash 1.12 on linux.
2895 ${srcdir}/[[*]]/config-lang.in) ;;
2896 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2900 # Make empty files to contain the specs and options for each language.
2901 # Then add #include lines to for a compiler that has specs and/or options.
2905 rm -f specs.h options.h
2906 touch specs.h options.h
2907 for subdir in . $subdirs
2909 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2910 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2911 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2913 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2914 echo "#include \"$subdir/lang-options.h\"" >>options.h
2915 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2919 # These (without "all_") are set in each config-lang.in.
2920 # `language' must be a single word so is spelled singularly.
2926 # List of language makefile fragments.
2931 # Add the language fragments.
2932 # Languages are added via two mechanisms. Some information must be
2933 # recorded in makefile variables, these are defined in config-lang.in.
2934 # We accumulate them and plug them into the main Makefile.
2935 # The other mechanism is a set of hooks for each of the main targets
2936 # like `clean', `install', etc.
2938 language_fragments="Make-lang"
2939 language_hooks="Make-hooks"
2941 for s in .. $subdirs
2952 . ${srcdir}/$s/config-lang.in
2953 if [[ "x$language" = x ]]
2955 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2958 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2959 all_languages="$all_languages $language"
2960 if [[ "x$boot_language" = xyes ]]
2962 all_boot_languages="$all_boot_languages $language"
2964 all_compilers="$all_compilers $compilers"
2965 all_stagestuff="$all_stagestuff $stagestuff"
2966 all_diff_excludes="$all_diff_excludes $diff_excludes"
2967 all_headers="$all_headers $headers"
2968 all_lib2funcs="$all_lib2funcs $lib2funcs"
2972 # Since we can't use `::' targets, we link each language in
2973 # with a set of hooks, reached indirectly via lang.${target}.
2977 target_list="all.build all.cross start.encap rest.encap \
2979 install-normal install-common install-info install-man \
2981 mostlyclean clean distclean extraclean maintainer-clean \
2982 stage1 stage2 stage3 stage4"
2983 for t in $target_list
2986 for l in .. $all_languages
2988 if [[ $l != ".." ]]; then
2992 echo "lang.$t: $x" >> Make-hooks
2995 # Process the language and host/target makefile fragments.
2996 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
2998 # Substitute configuration variables
3000 AC_SUBST(all_languages)
3001 AC_SUBST(all_boot_languages)
3002 AC_SUBST(all_compilers)
3003 AC_SUBST(all_lang_makefiles)
3004 AC_SUBST(all_stagestuff)
3005 AC_SUBST(all_diff_excludes)
3006 AC_SUBST(all_lib2funcs)
3007 AC_SUBST(all_headers)
3008 AC_SUBST(extra_passes)
3009 AC_SUBST(extra_programs)
3010 AC_SUBST(extra_parts)
3011 AC_SUBST(extra_objs)
3012 AC_SUBST(host_extra_gcc_objs)
3013 AC_SUBST(extra_headers_list)
3014 AC_SUBST(dep_host_xmake_file)
3015 AC_SUBST(dep_tmake_file)
3017 AC_SUBST(out_object_file)
3019 AC_SUBST(tm_file_list)
3020 AC_SUBST(build_xm_file_list)
3021 AC_SUBST(host_xm_file_list)
3022 AC_SUBST(lang_specs_files)
3023 AC_SUBST(lang_options_files)
3024 AC_SUBST(thread_file)
3026 AC_SUBST(local_prefix)
3027 AC_SUBST(gxx_include_dir)
3028 AC_SUBST(fixincludes)
3029 AC_SUBST(build_install_headers_dir)
3030 AC_SUBST(build_exeext)
3031 AC_SUBST(float_format)
3032 AC_SUBST(will_use_collect2)
3033 AC_SUBST(maybe_use_collect2)
3034 AC_SUBST(cc_set_by_configure)
3035 AC_SUBST(stage_prefix_set_by_configure)
3037 AC_SUBST_FILE(target_overrides)
3038 AC_SUBST_FILE(host_overrides)
3039 AC_SUBST(cross_defines)
3040 AC_SUBST_FILE(cross_overrides)
3041 AC_SUBST_FILE(build_overrides)
3042 AC_SUBST_FILE(language_fragments)
3043 AC_SUBST_FILE(language_hooks)
3045 # Echo that links are built
3046 if [[ x$host = x$target ]]
3054 if [[ x$host != x$build ]]
3056 str3=" on a $build system"
3059 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3064 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3066 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3068 echo " ${str2}${str3}." 1>&2
3071 # Configure the subdirectories
3072 # AC_CONFIG_SUBDIRS($subdirs)
3074 # Create the Makefile
3075 # and configure language subdirectories
3078 . $srcdir/configure.lang
3079 case x$CONFIG_HEADERS in
3080 xconfig.h:config.in)
3088 target_alias='${target_alias}'
3090 subdirs='${subdirs}'
3091 symbolic_link='${symbolic_link}'
3092 program_transform_set='${program_transform_set}'
3093 program_transform_name='${program_transform_name}'
3094 dep_host_xmake_file='${dep_host_xmake_file}'
3095 host_xmake_file='${host_xmake_file}'
3096 dep_tmake_file='${dep_tmake_file}'
3097 tmake_file='${tmake_file}'
3098 thread_file='${thread_file}'
3099 version='${version}'
3100 local_prefix='${local_prefix}'
3101 build_install_headers_dir='${build_install_headers_dir}'
3102 build_exeext='${build_exeext}'
3103 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3104 SET_MAKE='${SET_MAKE}'
3105 build_broken_install='${build_broken_install}'
3106 target_list='${target_list}'
3107 target_overrides='${target_overrides}'
3108 host_overrides='${host_overrides}'
3109 cross_defines='${cross_defines}'
3110 cross_overrides='${cross_overrides}'
3111 build_overrides='${build_overrides}'