1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 # Initialization and defaults
31 # Check for additional parameters
35 [ --with-gnu-ld arrange to work with GNU ld.],
41 [ --with-gnu-as arrange to work with GNU as.],
47 [ --with-stabs arrange to use stabs instead of host debug format.],
53 [ --with-elf arrange to use ELF instead of host debug format.],
57 # Specify the local prefix
58 AC_ARG_WITH(local-prefix,
59 [ --with-local-prefix=DIR specifies directory to put local include.],
60 local_prefix=$with_local_prefix,
61 local_prefix=/usr/local)
63 # Default local prefix if it is empty
64 if [[ x$local_prefix = x ]]; then
65 local_prefix=/usr/local
68 # Specify the g++ header file directory
69 AC_ARG_WITH(gxx-include-dir,
70 [ --with-gxx-include-dir=DIR
71 specifies directory to put g++ header files.],
72 gxx_include_dir=$with_gxx_include_dir,
73 gxx_include_dir='${prefix}/include/g++')
75 # Default g++ header file directory if it is empty
76 if [[ x$gxx_include_dir = x ]]; then
77 gxx_include_dir='${prefix}/include/g++'
81 # Pass with no value to take the default
82 # Pass with a value to specify a thread package
83 AC_ARG_ENABLE(threads,
84 [ --enable-threads enable thread usage for target GCC.
85 --enable-threads=LIB use LIB thread package for target GCC.],
86 if [[[ x$enable_threads = xno ]]]; then
91 # Check if a valid thread package
92 case x${enable_threads} in
101 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
103 thread_file=$enable_threads
106 echo "$enable_threads is an unknown thread package" 1>&2
111 # Determine the host, build, and target systems
114 # Find some useful tools
122 # Find the native compiler
135 build_broken_install=
136 build_install_headers_dir=install-headers-tar
140 host_truncate_target=
142 # Decode the host machine, then the target machine.
143 # For the host machine, we save the xm_file variable as host_xm_file;
144 # then we decode the target machine and forget everything else
145 # that came from the host machine.
146 for machine in $build $host $target; do
159 # Set this to force installation and use of collect2.
161 # Set this to override the default target model.
163 # Set this to force use of install.sh.
165 # Set this to control which fixincludes program to use.
166 fixincludes=fixincludes
167 # Set this to control how the header file directory is installed.
168 install_headers_dir=install-headers-tar
169 # Set this to a non-empty list of args to pass to cpp if the target
170 # wants its .md file passed through cpp.
172 # Set this if directory names should be truncated to 14 characters.
174 # Set this if gdb needs a dir command with `dirname $out_file`
175 gdb_needs_out_file_path=
176 # Set this if the build machine requires executables to have a
180 # Set default cpu_type, tm_file and xm_file so it can be updated in
181 # each machine entry.
182 cpu_type=`echo $machine | sed 's/-.*$//'`
213 tm_file=${cpu_type}/${cpu_type}.h
214 xm_file=${cpu_type}/xm-${cpu_type}.h
217 # Support site-specific machine types.
219 cpu_type=`echo $machine | sed -e 's/-.*//'`
220 rest=`echo $machine | sed -e "s/$cpu_type-//"`
221 xm_file=${cpu_type}/xm-$rest.h
222 tm_file=${cpu_type}/$rest.h
223 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
224 then xmake_file=${cpu_type}/x-$rest; \
227 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
228 then tmake_file=${cpu_type}/t-$rest; \
234 a29k-*-bsd* | a29k-*-sym1*)
235 tm_file="${tm_file} a29k/unix.h"
236 xm_file=a29k/xm-unix.h
237 xmake_file=a29k/x-unix
240 a29k-*-udi | a29k-*-coff)
241 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
242 tmake_file=a29k/t-a29kbare
245 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
246 tmake_file=a29k/t-vx29k
247 extra_parts="crtbegin.o crtend.o"
249 a29k-*-*) # Default a29k environment.
252 alpha-*-linux-gnuecoff*)
253 tm_file="${tm_file} alpha/linux.h"
254 xm_file="${xm_file} alpha/xm-linux.h"
257 fixincludes=Makefile.in
261 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
262 xm_file="${xm_file} alpha/xm-linux.h"
265 fixincludes=Makefile.in
266 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
269 alpha-dec-osf[[456789]]*)
270 if [[ x$stabs = xyes ]]
272 tm_file="${tm_file} dbx.h"
274 if [[ x$gas != xyes ]]
276 extra_passes="mips-tfile mips-tdump"
280 # Some versions of OSF4 (specifically X4.0-9 296.7) have
281 # a broken tar, so we use cpio instead.
284 install_headers_dir=install-headers-cpio
288 alpha-dec-osf[[23]]*)
289 tm_file="${tm_file} alpha/osf2or3.h"
290 if [[ x$stabs = xyes ]]
292 tm_file="${tm_file} dbx.h"
294 if [[ x$gas != xyes ]]
296 extra_passes="mips-tfile mips-tdump"
302 tm_file="${tm_file} alpha/osf12.h"
303 if [[ x$stabs = xyes ]]
305 tm_file="${tm_file} dbx.h"
307 if [[ x$gas != xyes ]]
309 extra_passes="mips-tfile mips-tdump"
315 if [[ x$stabs = xyes ]]
317 tm_file="${tm_file} dbx.h"
319 if [[ x$gas != xyes ]]
321 extra_passes="mips-tfile mips-tdump"
327 tm_file="${tm_file} alpha/win-nt.h"
328 target_cpu_default=64
329 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
331 xmake_file=winnt/x-winnt
332 extra_host_objs=oldnames.o
333 extra_gcc_objs="spawnv.o oldnames.o"
334 fixincludes=fixinc.winnt
335 if [[ x$gnu_ld != xyes ]]
337 extra_programs=ld.exe
339 if [[ x$thread_file = x ]]; then
345 xm_file="${xm_file} alpha/xm-vms.h"
346 tmake_file=alpha/t-vms
347 fixincludes=Makefile.in
349 arm-*-coff* | armel-*-coff*)
351 tmake_file=arm/t-bare
353 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
354 tm_file=arm/riscix1-1.h
357 arm-*-riscix*) # Acorn RISC machine
358 if [[ x$gas = xyes ]]
360 tm_file=arm/rix-gas.h
364 xmake_file=arm/x-riscix
365 tmake_file=arm/t-riscix
368 arm-semi-aout | armel-semi-aout)
370 tmake_file=arm/t-semi
371 fixincludes=Makefile.in # There is nothing to fix
373 arm-semi-aof | armel-semi-aof)
374 tm_file=arm/semiaof.h
375 tmake_file=arm/t-semiaof
376 fixincludes=Makefile.in # There is nothing to fix
378 arm-*-linux-gnuaout*) # ARM Linux
380 xm_file=arm/xm-linux.h
382 tm_file=arm/linux-gas.h
383 tmake_file=arm/t-linux
384 fixincludes=Makefile.in
388 arm-*-*) # generic version
390 c1-convex-*) # Convex C1
393 fixincludes=Makefile.in
395 c2-convex-*) # Convex C2
398 fixincludes=Makefile.in
403 fixincludes=Makefile.in
408 fixincludes=Makefile.in
411 target_cpu_default=16
413 fixincludes=Makefile.in
415 clipper-intergraph-clix*)
416 tm_file="${tm_file} svr3.h clipper/clix.h"
417 xm_file=clipper/xm-clix.h
418 xmake_file=clipper/x-clix
419 extra_headers=va-clipper.h
420 extra_parts="crtbegin.o crtend.o"
421 install_headers_dir=install-headers-cpio
429 # This hasn't been upgraded to GCC 2.
430 # fx80-alliant-*) # Alliant FX/80
436 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
437 xm_file=pa/xm-papro.h
442 tm_file="${tm_file} pa/pa-osf.h"
444 fixincludes=Makefile.in
447 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
448 xm_file=pa/xm-papro.h
452 tm_file="${tm_file} pa/pa-osf.h"
454 fixincludes=Makefile.in
459 fixincludes=Makefile.in
463 fixincludes=Makefile.in
466 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
467 xm_file=pa/xm-pahpux.h
468 xmake_file=pa/x-pa-hpux
469 if [[ x$gas = xyes ]]
471 tm_file="${tm_file} pa/gas.h"
474 install_headers_dir=install-headers-cpio
477 hppa1.0-*-hpux8.0[[0-2]]*)
478 tm_file="${tm_file} pa/pa-hpux.h"
479 xm_file=pa/xm-pahpux.h
480 xmake_file=pa/x-pa-hpux
481 if [[ x$gas = xyes ]]
483 tm_file="${tm_file} pa/pa-gas.h"
485 tm_file="pa/pa-oldas.h ${tm_file}"
488 install_headers_dir=install-headers-cpio
491 hppa1.1-*-hpux8.0[[0-2]]*)
493 tm_file="${tm_file} pa/pa-hpux.h"
494 xm_file=pa/xm-pahpux.h
495 xmake_file=pa/x-pa-hpux
496 if [[ x$gas = xyes ]]
498 tm_file="${tm_file} pa/pa-gas.h"
500 tm_file="pa/pa-oldas.h ${tm_file}"
503 install_headers_dir=install-headers-cpio
508 tm_file="${tm_file} pa/pa-hpux.h"
509 xm_file=pa/xm-pahpux.h
510 xmake_file=pa/x-pa-hpux
511 if [[ x$gas = xyes ]]
513 tm_file="${tm_file} pa/pa-gas.h"
516 install_headers_dir=install-headers-cpio
520 tm_file="${tm_file} pa/pa-hpux.h"
521 xm_file=pa/xm-pahpux.h
522 xmake_file=pa/x-pa-hpux
523 if [[ x$gas = xyes ]]
525 tm_file="${tm_file} pa/pa-gas.h"
528 install_headers_dir=install-headers-cpio
533 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
534 xm_file=pa/xm-pahpux.h
535 xmake_file=pa/x-pa-hpux
536 if [[ x$gas = xyes ]]
538 tm_file="${tm_file} pa/pa-gas.h"
541 install_headers_dir=install-headers-cpio
545 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
546 xm_file=pa/xm-pahpux.h
547 xmake_file=pa/x-pa-hpux
548 if [[ x$gas = xyes ]]
550 tm_file="${tm_file} pa/pa-gas.h"
553 install_headers_dir=install-headers-cpio
558 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
559 xm_file=pa/xm-pahpux.h
560 xmake_file=pa/x-pa-hpux
561 if [[ x$gas = xyes ]]
563 tm_file="${tm_file} pa/pa-gas.h"
566 install_headers_dir=install-headers-cpio
570 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
571 xm_file=pa/xm-pahpux.h
572 xmake_file=pa/x-pa-hpux
573 if [[ x$gas = xyes ]]
575 tm_file="${tm_file} pa/pa-gas.h"
578 install_headers_dir=install-headers-cpio
583 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
584 xm_file=pa/xm-pahpux.h
585 xmake_file=pa/x-pa-hpux
586 if [[ x$gas = xyes ]]
588 tm_file="${tm_file} pa/pa-gas.h"
591 install_headers_dir=install-headers-cpio
595 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
596 xm_file=pa/xm-pahpux.h
597 xmake_file=pa/x-pa-hpux
598 if [[ x$gas = xyes ]]
600 tm_file="${tm_file} pa/pa-gas.h"
603 install_headers_dir=install-headers-cpio
609 fixincludes=Makefile.in
613 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
614 if [[ x$gas = xyes ]]
616 tm_file=i386/aix386.h
617 extra_parts="crtbegin.o crtend.o"
618 tmake_file=i386/t-crtstuff
620 tm_file=i386/aix386ng.h
623 xm_file=i386/xm-aix.h
624 xmake_file=i386/x-aix
627 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
628 xm_file=i386/xm-sysv4.h
629 xmake_file=i386/x-ncr3000
630 if [[ x$stabs = xyes -a x$gas = xyes ]]
632 tm_file=i386/sysv4gdb.h
636 extra_parts="crtbegin.o crtend.o"
637 tmake_file=i386/t-crtpic
641 xm_file=i386/xm-next.h
642 tmake_file=i386/t-next
643 xmake_file=i386/x-next
644 extra_objs=nextstep.o
645 if [[ x$thread_file = x ]]; then
649 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
651 if [[ x$gas = xyes ]]
653 tm_file=i386/seq-gas.h
655 tm_file=i386/sequent.h
658 i[[3456]]86-sequent-ptx1*)
659 xm_file=i386/xm-sysv3.h
660 xmake_file=i386/x-sysv3
661 tm_file=i386/seq-sysv3.h
662 tmake_file=i386/t-crtstuff
663 fixincludes=fixinc.ptx
664 extra_parts="crtbegin.o crtend.o"
665 install_headers_dir=install-headers-cpio
668 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
669 xm_file=i386/xm-sysv3.h
670 xmake_file=i386/x-sysv3
671 tm_file=i386/seq2-sysv3.h
672 tmake_file=i386/t-crtstuff
673 extra_parts="crtbegin.o crtend.o"
674 fixincludes=fixinc.ptx
675 install_headers_dir=install-headers-cpio
678 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
679 xm_file=i386/xm-sysv4.h
681 tm_file=i386/ptx4-i.h
683 extra_parts="crtbegin.o crtend.o"
684 fixincludes=fixinc.ptx
685 install_headers_dir=install-headers-cpio
688 i386-sun-sunos*) # Sun i386 roadrunner
689 xm_file=i386/xm-sun.h
694 tm_file=i386/i386-aout.h
695 tmake_file=i386/t-i386bare
697 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
698 tm_file=i386/bsd386.h
699 xm_file=i386/xm-bsd386.h
700 # tmake_file=t-libc-ok
703 tm_file=i386/386bsd.h
704 xm_file=i386/xm-bsd386.h
705 # tmake_file=t-libc-ok
706 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
709 i[[3456]]86-*-freebsdelf*)
710 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
711 xm_file=i386/xm-freebsd.h
712 # On FreeBSD, the headers are already ok.
713 fixincludes=Makefile.in
714 tmake_file=i386/t-freebsd
719 i[[3456]]86-*-freebsd*)
720 tm_file=i386/freebsd.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
726 i[[3456]]86-*-netbsd*)
727 tm_file=i386/netbsd.h
728 xm_file=i386/xm-netbsd.h
729 # On NetBSD, the headers are already okay.
730 fixincludes=Makefile.in
734 tm_file=i386/i386-coff.h
735 tmake_file=i386/t-i386bare
737 i[[3456]]86-*-isc*) # 80386 running ISC system
738 xm_file=i386/xm-isc.h
740 i[[345]]86-*-isc[[34]]*)
741 xmake_file=i386/x-isc3
744 xmake_file=i386/x-isc
747 if [[ x$gas = xyes -a x$stabs = xyes ]]
749 tm_file=i386/iscdbx.h
750 tmake_file=i386/t-svr3dbx
751 extra_parts="svr3.ifile svr3z.ifile"
753 tm_file=i386/isccoff.h
754 tmake_file=i386/t-crtstuff
755 extra_parts="crtbegin.o crtend.o"
757 install_headers_dir=install-headers-cpio
760 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
761 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
762 xmake_file=x-linux-aout
763 tmake_file="t-linux-aout i386/t-crtstuff"
764 tm_file=i386/linux-oldld.h
765 fixincludes=Makefile.in #On Linux, the headers are ok already.
769 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
770 xm_file=i386/xm-linux.h # with a.out format
771 xmake_file=x-linux-aout
772 tmake_file="t-linux-aout i386/t-crtstuff"
773 tm_file=i386/linux-aout.h
774 fixincludes=Makefile.in #On Linux, the headers are ok already.
778 i[[3456]]86-*-linux-gnulibc1)
779 xm_file=i386/xm-linux.h # Intel 80386's running Linux
780 xmake_file=x-linux # with ELF format using the
781 tm_file=i386/linux.h # Linux C library 5
782 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
783 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
784 fixincludes=Makefile.in #On Linux, the headers are ok already.
787 if [[ x$thread_file = x ]]; then
791 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
792 xm_file=i386/xm-linux.h # with ELF format using glibc 2
793 xmake_file=x-linux # aka Linux C library 6
795 tmake_file="t-linux i386/t-crtstuff"
796 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
797 fixincludes=Makefile.in #On Linux, the headers are ok already.
800 if [[ x$thread_file = x ]]; then
806 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
807 xm_file=i386/xm-go32.h
809 tmake_file=i386/t-go32
811 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
814 fixincludes=Makefile.in
818 i[[3456]]86-*-lynxos*)
819 if [[ x$gas = xyes ]]
823 tm_file=i386/lynx-ng.h
825 xm_file=i386/xm-lynx.h
826 tmake_file=i386/t-i386bare
831 # tmake_file=t-libc-ok
834 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
835 if [[ x$elf = xyes ]]
837 tm_file=i386/osfelf.h
840 tm_file=i386/osfrose.h
843 xm_file=i386/xm-osf.h
844 xmake_file=i386/x-osfrose
845 tmake_file=i386/t-osf
848 i[[345]]86-go32-rtems*)
850 xm_file=i386/xm-go32.h
851 tm_file=i386/go32-rtems.h
852 tmake_file="i386/t-go32 t-rtems"
857 tmake_file="i386/t-i386bare t-rtems"
859 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
860 xm_file=i386/xm-sco5.h
861 xmake_file=i386/x-sco5
862 fixincludes=fixinc.sco
865 tmake_file=i386/t-sco5
866 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
868 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
869 xm_file=i386/xm-sco.h
870 xmake_file=i386/x-sco4
871 fixincludes=fixinc.sco
873 install_headers_dir=install-headers-cpio
874 if [[ x$stabs = xyes ]]
876 tm_file=i386/sco4dbx.h
877 tmake_file=i386/t-svr3dbx
878 extra_parts="svr3.ifile svr3z.rfile"
881 tmake_file=i386/t-crtstuff
882 extra_parts="crtbegin.o crtend.o"
886 i[[3456]]86-*-sco*) # 80386 running SCO system
887 xm_file=i386/xm-sco.h
888 xmake_file=i386/x-sco
890 install_headers_dir=install-headers-cpio
891 if [[ x$stabs = xyes ]]
893 tm_file=i386/scodbx.h
894 tmake_file=i386/t-svr3dbx
895 extra_parts="svr3.ifile svr3z.rfile"
898 extra_parts="crtbegin.o crtend.o"
899 tmake_file=i386/t-crtstuff
903 i[[3456]]86-*-solaris2*)
904 xm_file=i386/xm-sysv4.h
905 if [[ x$stabs = xyes ]]
907 tm_file=i386/sol2dbg.h
911 tmake_file=i386/t-sol2
912 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
914 fixincludes=fixinc.svr4
916 if [[ x$thread_file = x ]]; then
917 thread_file='solaris'
920 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
921 xm_file=i386/xm-sysv4.h
923 if [[ x$stabs = xyes ]]
925 tm_file="${tm_file} dbx.h"
927 tmake_file=i386/t-crtpic
929 extra_parts="crtbegin.o crtend.o"
931 i[[3456]]86-*-sysv*) # Intel 80386's running system V
932 xm_file=i386/xm-sysv3.h
933 xmake_file=i386/x-sysv3
934 if [[ x$gas = xyes ]]
936 if [[ x$stabs = xyes ]]
938 tm_file=i386/svr3dbx.h
939 tmake_file=i386/t-svr3dbx
940 extra_parts="svr3.ifile svr3z.rfile"
942 tm_file=i386/svr3gas.h
943 extra_parts="crtbegin.o crtend.o"
944 tmake_file=i386/t-crtstuff
948 extra_parts="crtbegin.o crtend.o"
949 tmake_file=i386/t-crtstuff
952 i386-*-vsta) # Intel 80386's running VSTa kernel
953 xm_file=i386/xm-vsta.h
955 tmake_file=i386/t-vsta
956 xmake_file=i386/x-vsta
958 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
959 xm_file="${xm_file} i386/xm-cygwin32.h"
960 tmake_file=i386/t-cygwin32
961 tm_file=i386/cygwin32.h
962 xmake_file=i386/x-cygwin32
964 fixincludes=Makefile.in
965 if [[ x$thread_file = x ]]; then
970 i[[3456]]86-*-mingw32)
971 tm_file=i386/mingw32.h
972 xm_file="${xm_file} i386/xm-mingw32.h"
973 tmake_file=i386/t-cygwin32
975 xmake_file=i386/x-cygwin32
976 fixincludes=Makefile.in
977 if [[ x$thread_file = x ]]; then
982 i[[3456]]86-*-winnt3*)
983 tm_file=i386/win-nt.h
985 xm_file=i386/xm-winnt.h
986 xmake_file=winnt/x-winnt
987 tmake_file=i386/t-winnt
988 extra_host_objs="winnt.o oldnames.o"
989 extra_gcc_objs="spawnv.o oldnames.o"
990 fixincludes=fixinc.winnt
991 if [[ x$gnu_ld != xyes ]]
993 extra_programs=ld.exe
995 if [[ x$thread_file = x ]]; then
1000 xm_file=i386/xm-dgux.h
1001 out_file=i386/dgux.c
1003 tmake_file=i386/t-dgux
1004 xmake_file=i386/x-dgux
1005 fixincludes=fixinc.dgux
1006 install_headers_dir=install-headers-cpio
1008 i860-alliant-*) # Alliant FX/2800
1009 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1010 xm_file="${xm_file} i860/xm-fx2800.h"
1011 xmake_file=i860/x-fx2800
1012 tmake_file=i860/t-fx2800
1013 extra_parts="crtbegin.o crtend.o"
1016 tm_file="${tm_file} i860/bsd.h"
1017 if [[ x$gas = xyes ]]
1019 tm_file="${tm_file} i860/bsd-gas.h"
1024 tm_file="${tm_file} i860/mach.h"
1025 tmake_file=t-libc-ok
1027 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1028 tm_file="${tm_file} svr3.h i860/paragon.h"
1029 xm_file="${xm_file} xm-svr3.h"
1034 tm_file="${tm_file} svr3.h i860/sysv3.h"
1035 xm_file="${tm_file} xm-svr3.h"
1036 xmake_file=i860/x-sysv3
1037 extra_parts="crtbegin.o crtend.o"
1040 tm_file="${tm_file} svr4.h i860/sysv4.h"
1041 xm_file="${xm_file} xm-svr3.h"
1042 xmake_file=i860/x-sysv4
1044 extra_parts="crtbegin.o crtend.o"
1046 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1047 tm_file="${tm_file} i960/vx960.h"
1048 tmake_file=i960/t-vxworks960
1052 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1053 tmake_file=i960/t-vxworks960
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 libgloss.h"
1063 tmake_file=i960/t-960bare
1067 tmake_file="i960/t-960bare t-rtems"
1068 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1071 i960-*-*) # Default i960 environment.
1075 extra_parts="crtinit.o crtfini.o"
1077 m68000-convergent-sysv*)
1079 xm_file=m68k/xm-3b1.h
1081 extra_headers=math-68881.h
1083 m68000-hp-bsd*) # HP 9000/200 running BSD
1084 tm_file=m68k/hp2bsd.h
1085 xmake_file=m68k/x-hp2bsd
1087 extra_headers=math-68881.h
1089 m68000-hp-hpux*) # HP 9000 series 300
1090 xm_file=m68k/xm-hp320.h
1091 if [[ x$gas = xyes ]]
1093 xmake_file=m68k/x-hp320g
1094 tm_file=m68k/hp310g.h
1096 xmake_file=m68k/x-hp320
1097 tm_file=m68k/hp310.h
1100 install_headers_dir=install-headers-cpio
1102 extra_headers=math-68881.h
1107 extra_headers=math-68881.h
1110 tm_file=m68k/sun2o4.h
1112 extra_headers=math-68881.h
1115 xm_file=m68k/xm-3b1.h
1116 if [[ x$gas = xyes ]]
1123 extra_headers=math-68881.h
1125 m68k-apple-aux*) # Apple Macintosh running A/UX
1126 xm_file=m68k/xm-aux.h
1127 tmake_file=m68k/t-aux
1129 install_headers_dir=install-headers-cpio
1130 extra_headers=math-68881.h
1131 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1133 if [[ "$gnu_ld" = yes ]]
1135 tm_file="${tm_file} m68k/auxgld.h"
1137 tm_file="${tm_file} m68k/auxld.h"
1139 if [[ "$gas" = yes ]]
1141 tm_file="${tm_file} m68k/auxgas.h"
1143 tm_file="${tm_file} m68k/auxas.h"
1145 tm_file="${tm_file} m68k/a-ux.h"
1148 tm_file=m68k/apollo68.h
1149 xmake_file=m68k/x-apollo68
1151 extra_headers=math-68881.h
1153 m68k-altos-sysv*) # Altos 3068
1154 if [[ x$gas = xyes ]]
1156 tm_file=m68k/altos3068.h
1157 xm_file=m68k/xm-altos3068.h
1159 echo "The Altos is supported only with the GNU assembler" 1>&2
1162 extra_headers=math-68881.h
1164 m68k-bull-sysv*) # Bull DPX/2
1165 if [[ x$gas = xyes ]]
1167 if [[ x$stabs = xyes ]]
1169 tm_file=m68k/dpx2cdbx.h
1171 tm_file=m68k/dpx2g.h
1176 xm_file=m68k/xm-m68kv.h
1177 xmake_file=m68k/x-dpx2
1179 extra_headers=math-68881.h
1181 m68k-atari-sysv4*) # Atari variant of V.4.
1182 tm_file=m68k/atari.h
1183 xm_file=m68k/xm-atari.h
1185 extra_parts="crtbegin.o crtend.o"
1186 extra_headers=math-68881.h
1188 m68k-motorola-sysv*)
1189 tm_file=m68k/mot3300.h
1190 xm_file=m68k/xm-mot3300.h
1191 if [[ x$gas = xyes ]]
1193 xmake_file=m68k/x-mot3300-gas
1194 if [[ x$gnu_ld = xyes ]]
1196 tmake_file=m68k/t-mot3300-gald
1198 tmake_file=m68k/t-mot3300-gas
1202 xmake_file=m68k/x-mot3300
1203 if [[ x$gnu_ld = xyes ]]
1205 tmake_file=m68k/t-mot3300-gld
1207 tmake_file=m68k/t-mot3300
1211 gdb_needs_out_file_path=yes
1212 extra_parts="crt0.o mcrt0.o"
1213 extra_headers=math-68881.h
1215 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1216 tm_file=m68k/tower-as.h
1217 xm_file=m68k/xm-tower.h
1218 xmake_file=m68k/x-tower
1219 extra_parts="crtbegin.o crtend.o"
1220 extra_headers=math-68881.h
1223 tm_file=m68k/plexus.h
1224 xm_file=m68k/xm-plexus.h
1226 extra_headers=math-68881.h
1230 xm_file=m68k/xm-m68kv.h
1231 extra_headers=math-68881.h
1234 xm_file=m68k/xm-crds.h
1235 xmake_file=m68k/x-crds
1239 extra_headers=math-68881.h
1241 m68k-cbm-sysv4*) # Commodore variant of V.4.
1243 xm_file=m68k/xm-amix.h
1244 xmake_file=m68k/x-amix
1246 extra_parts="crtbegin.o crtend.o"
1247 extra_headers=math-68881.h
1250 tm_file=m68k/ccur-GAS.h
1251 xmake_file=m68k/x-ccur
1252 extra_headers=math-68881.h
1256 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1257 tm_file=m68k/hp3bsd44.h
1258 xmake_file=m68k/x-hp3bsd44
1260 extra_headers=math-68881.h
1262 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1263 tm_file=m68k/hp3bsd.h
1265 extra_headers=math-68881.h
1268 if [[ x$with_fp = xno ]]
1270 tm_file=m68k/isi-nfp.h
1275 extra_headers=math-68881.h
1277 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1278 xm_file=m68k/xm-hp320.h
1279 if [[ x$gas = xyes ]]
1281 xmake_file=m68k/x-hp320g
1282 tm_file=m68k/hp320g.h
1284 xmake_file=m68k/x-hp320
1285 tm_file=m68k/hpux7.h
1288 install_headers_dir=install-headers-cpio
1290 extra_headers=math-68881.h
1292 m68k-hp-hpux*) # HP 9000 series 300
1293 xm_file=m68k/xm-hp320.h
1294 if [[ x$gas = xyes ]]
1296 xmake_file=m68k/x-hp320g
1297 tm_file=m68k/hp320g.h
1299 xmake_file=m68k/x-hp320
1300 tm_file=m68k/hp320.h
1303 install_headers_dir=install-headers-cpio
1305 extra_headers=math-68881.h
1308 tm_file=m68k/sun3mach.h
1310 extra_headers=math-68881.h
1313 if [[ x$gas = xyes ]]
1315 tm_file=m68k/news3gas.h
1317 tm_file=m68k/news3.h
1320 extra_headers=math-68881.h
1322 m68k-sony-bsd* | m68k-sony-newsos*)
1323 if [[ x$gas = xyes ]]
1325 tm_file=m68k/newsgas.h
1330 extra_headers=math-68881.h
1332 m68k-next-nextstep2*)
1333 tm_file=m68k/next21.h
1334 xm_file=m68k/xm-next.h
1335 tmake_file=m68k/t-next
1336 xmake_file=m68k/x-next
1337 extra_objs=nextstep.o
1338 extra_headers=math-68881.h
1341 m68k-next-nextstep3*)
1343 xm_file=m68k/xm-next.h
1344 tmake_file=m68k/t-next
1345 xmake_file=m68k/x-next
1346 extra_objs=nextstep.o
1347 extra_headers=math-68881.h
1348 if [[ x$thread_file = x ]]; then
1353 if [[ x$with_fp = xno ]]
1355 tm_file=m68k/sun3n3.h
1357 tm_file=m68k/sun3o3.h
1360 extra_headers=math-68881.h
1362 m68k-sun-sunos*) # For SunOS 4 (the default).
1363 if [[ x$with_fp = xno ]]
1365 tm_file=m68k/sun3n.h
1369 xm_file=m68k/xm-sun3.h
1371 extra_headers=math-68881.h
1374 tm_file=m68k/vxm68k.h
1375 tmake_file=m68k/t-vxworks68
1376 extra_headers=math-68881.h
1379 tmake_file=m68k/t-m68kbare
1380 tm_file="m68k/m68k-aout.h libgloss.h"
1381 extra_headers=math-68881.h
1384 tmake_file=m68k/t-m68kbare
1385 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1386 extra_headers=math-68881.h
1389 if [[ x$gas = xyes ]]
1393 tm_file=m68k/lynx-ng.h
1395 xm_file=m68k/xm-lynx.h
1397 tmake_file=m68k/t-lynx
1398 extra_headers=math-68881.h
1401 tm_file=m68k/netbsd.h
1402 xm_file=m68k/xm-netbsd.h
1403 # On NetBSD, the headers are already okay.
1404 fixincludes=Makefile.in
1407 m68k-*-sysv3*) # Motorola m68k's running system V.3
1408 xm_file=m68k/xm-m68kv.h
1409 xmake_file=m68k/x-m68kv
1410 extra_parts="crtbegin.o crtend.o"
1411 extra_headers=math-68881.h
1413 m68k-*-sysv4*) # Motorola m68k's running system V.4
1414 tm_file=m68k/m68kv4.h
1415 xm_file=m68k/xm-m68kv.h
1417 extra_parts="crtbegin.o crtend.o"
1418 extra_headers=math-68881.h
1420 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1421 xm_file=m68k/xm-linux.h # with a.out format
1423 tm_file=m68k/linux-aout.h
1424 tmake_file="t-linux-aout m68k/t-linux-aout"
1425 fixincludes=Makefile.in #On Linux, the headers are ok already.
1426 extra_headers=math-68881.h
1429 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1430 xm_file=m68k/xm-linux.h # with ELF format
1432 tm_file=m68k/linux.h
1433 tmake_file="t-linux m68k/t-linux"
1434 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1435 fixincludes=Makefile.in #On Linux, the headers are ok already.
1436 extra_headers=math-68881.h
1440 tmake_file=m68k/t-m68kbare
1441 tm_file=m68k/m68k-psos.h
1442 extra_headers=math-68881.h
1445 tmake_file="m68k/t-m68kbare t-rtems"
1446 tm_file=m68k/rtems.h
1447 extra_headers=math-68881.h
1453 tm_file=m88k/dguxbcs.h
1454 tmake_file=m88k/t-dguxbcs
1458 tmake_file=m88k/t-dgux
1461 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1463 xmake_file=m88k/x-dgux
1464 if [[ x$gas = xyes ]]
1466 tmake_file=m88k/t-dgux-gas
1468 fixincludes=fixinc.dgux
1470 m88k-dolphin-sysv3*)
1471 tm_file=m88k/dolph.h
1472 extra_parts="crtbegin.o crtend.o"
1473 xm_file=m88k/xm-sysv3.h
1474 xmake_file=m88k/x-dolph
1475 if [[ x$gas = xyes ]]
1477 tmake_file=m88k/t-m88k-gas
1480 m88k-tektronix-sysv3)
1481 tm_file=m88k/tekXD88.h
1482 extra_parts="crtbegin.o crtend.o"
1483 xm_file=m88k/xm-sysv3.h
1484 xmake_file=m88k/x-tekXD88
1485 if [[ x$gas = xyes ]]
1487 tmake_file=m88k/t-m88k-gas
1491 tm_file=m88k/m88k-aout.h
1494 tm_file=m88k/m88k-coff.h
1495 tmake_file=m88k/t-bug
1499 extra_parts="crtbegin.o crtend.o"
1500 if [[ x$gas = xyes ]]
1502 tmake_file=m88k/t-luna-gas
1504 tmake_file=m88k/t-luna
1508 tm_file=m88k/sysv3.h
1509 extra_parts="crtbegin.o crtend.o"
1510 xm_file=m88k/xm-sysv3.h
1511 xmake_file=m88k/x-sysv3
1512 if [[ x$gas = xyes ]]
1514 tmake_file=m88k/t-m88k-gas
1518 tm_file=m88k/sysv4.h
1519 extra_parts="crtbegin.o crtend.o"
1520 xmake_file=m88k/x-sysv4
1521 tmake_file=m88k/t-sysv4
1523 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1524 tm_file=mips/iris6.h
1525 xm_file=mips/xm-iris6.h
1527 fixincludes=fixinc.irix
1528 xmake_file=mips/x-iris6
1529 tmake_file=mips/t-iris6
1530 if [[ x$thread_file = x ]]; then
1534 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1535 tm_file=mips/cross64.h
1536 xm_file=mips/xm-iris5.h
1538 fixincludes=Makefile.in
1539 xmake_file=mips/x-iris
1540 tmake_file=mips/t-cross64
1541 # See comment in mips/iris[56].h files.
1543 if [[ x$thread_file = x ]]; then
1548 if [[ x$gas = xyes ]]
1550 if [[ x$stabs = xyes ]]
1552 tm_file=mips/iris5gdb.h
1554 tm_file=mips/sni-gas.h
1557 tm_file=mips/sni-svr4.h
1559 xm_file=mips/xm-sysv.h
1560 xmake_file=mips/x-sni-svr4
1561 tmake_file=mips/t-mips-gas
1562 if [[ x$gnu_ld != xyes ]]
1568 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1569 if [[ x$gas = xyes ]]
1571 tm_file=mips/iris5gas.h
1572 if [[ x$stabs = xyes ]]
1574 tm_file="${tm_file} dbx.h"
1577 tm_file=mips/iris5.h
1579 xm_file=mips/xm-iris5.h
1581 fixincludes=fixinc.irix
1582 xmake_file=mips/x-iris
1583 # mips-tfile doesn't work yet
1584 tmake_file=mips/t-mips-gas
1585 # See comment in mips/iris5.h file.
1587 if [[ x$thread_file = x ]]; then
1591 mips-sgi-irix4loser*) # Mostly like a MIPS.
1592 tm_file=mips/iris4loser.h
1593 if [[ x$stabs = xyes ]]; then
1594 tm_file="${tm_file} dbx.h"
1596 xm_file=mips/xm-iris4.h
1598 xmake_file=mips/x-iris
1599 if [[ x$gas = xyes ]]
1601 tmake_file=mips/t-mips-gas
1603 extra_passes="mips-tfile mips-tdump"
1605 if [[ x$gnu_ld != xyes ]]
1609 if [[ x$thread_file = x ]]; then
1613 mips-sgi-irix4*) # Mostly like a MIPS.
1614 tm_file=mips/iris4.h
1615 if [[ x$stabs = xyes ]]; then
1616 tm_file="${tm_file} dbx.h"
1618 xm_file=mips/xm-iris4.h
1620 xmake_file=mips/x-iris
1621 if [[ x$gas = xyes ]]
1623 tmake_file=mips/t-mips-gas
1625 extra_passes="mips-tfile mips-tdump"
1627 if [[ x$gnu_ld != xyes ]]
1631 if [[ x$thread_file = x ]]; then
1635 mips-sgi-*) # Mostly like a MIPS.
1636 tm_file=mips/iris3.h
1637 if [[ x$stabs = xyes ]]; then
1638 tm_file="${tm_file} dbx.h"
1640 xm_file=mips/xm-iris3.h
1642 xmake_file=mips/x-iris3
1643 if [[ x$gas = xyes ]]
1645 tmake_file=mips/t-mips-gas
1647 extra_passes="mips-tfile mips-tdump"
1649 if [[ x$gnu_ld != xyes ]]
1654 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1655 tm_file=mips/osfrose.h
1656 xmake_file=mips/x-osfrose
1657 tmake_file=mips/t-osfrose
1658 extra_objs=halfpic.o
1661 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1662 tm_file=mips/dec-osf1.h
1663 if [[ x$stabs = xyes ]]; then
1664 tm_file="${tm_file} dbx.h"
1666 xmake_file=mips/x-dec-osf1
1667 if [[ x$gas = xyes ]]
1669 tmake_file=mips/t-mips-gas
1671 tmake_file=mips/t-ultrix
1672 extra_passes="mips-tfile mips-tdump"
1674 if [[ x$gnu_ld != xyes ]]
1679 mips-dec-bsd*) # Decstation running 4.4 BSD
1680 tm_file=mips/dec-bsd.h
1682 if [[ x$gas = xyes ]]
1684 tmake_file=mips/t-mips-gas
1686 tmake_file=mips/t-ultrix
1687 extra_passes="mips-tfile mips-tdump"
1689 if [[ x$gnu_ld != xyes ]]
1694 mips-dec-netbsd*) # Decstation running NetBSD
1695 tm_file=mips/netbsd.h
1696 xm_file=mips/xm-netbsd.h
1697 # On NetBSD, the headers are already okay.
1698 fixincludes=Makefile.in
1700 if [[ x$prefix = xNONE ]]; then
1701 prefix=$native_prefix
1703 prefix=$native_prefix
1705 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1706 tm_file=mips/news4.h
1707 if [[ x$stabs = xyes ]]; then
1708 tm_file="${tm_file} dbx.h"
1710 if [[ x$gas = xyes ]]
1712 tmake_file=mips/t-mips-gas
1714 extra_passes="mips-tfile mips-tdump"
1716 if [[ x$gnu_ld != xyes ]]
1720 xmake_file=mips/x-sony
1722 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1723 # That is based on svr4.
1724 # t-svr4 is not right because this system doesn't use ELF.
1725 tm_file=mips/news5.h
1726 if [[ x$stabs = xyes ]]; then
1727 tm_file="${tm_file} dbx.h"
1729 xm_file=mips/xm-news.h
1730 if [[ x$gas = xyes ]]
1732 tmake_file=mips/t-mips-gas
1734 extra_passes="mips-tfile mips-tdump"
1736 if [[ x$gnu_ld != xyes ]]
1741 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1742 tm_file=mips/svr4-t.h
1743 if [[ x$stabs = xyes ]]; then
1744 tm_file="${tm_file} dbx.h"
1746 xm_file=mips/xm-sysv4.h
1747 xmake_file=mips/x-sysv
1748 if [[ x$gas = xyes ]]
1750 tmake_file=mips/t-mips-gas
1751 extra_parts="crtbegin.o crtend.o"
1753 tmake_file=mips/t-mips
1754 extra_passes="mips-tfile mips-tdump"
1756 if [[ x$gnu_ld != xyes ]]
1762 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1763 tm_file=mips/ultrix.h
1764 if [[ x$stabs = xyes ]]; then
1765 tm_file="${tm_file} dbx.h"
1767 xmake_file=mips/x-ultrix
1768 if [[ x$gas = xyes ]]
1770 tmake_file=mips/t-mips-gas
1772 tmake_file=mips/t-ultrix
1773 extra_passes="mips-tfile mips-tdump"
1775 if [[ x$gnu_ld != xyes ]]
1780 mips-*-riscos[[56789]]bsd*)
1781 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1782 if [[ x$stabs = xyes ]]; then
1783 tm_file="${tm_file} dbx.h"
1785 if [[ x$gas = xyes ]]
1787 tmake_file=mips/t-bsd-gas
1789 tmake_file=mips/t-bsd
1790 extra_passes="mips-tfile mips-tdump"
1792 if [[ x$gnu_ld != xyes ]]
1798 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1799 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1800 if [[ x$stabs = xyes ]]; then
1801 tm_file="${tm_file} dbx.h"
1803 if [[ x$gas = xyes ]]
1805 tmake_file=mips/t-bsd-gas
1807 tmake_file=mips/t-bsd
1808 extra_passes="mips-tfile mips-tdump"
1810 if [[ x$gnu_ld != xyes ]]
1816 mips-*-riscos[[56789]]sysv4*)
1817 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1818 if [[ x$stabs = xyes ]]; then
1819 tm_file="${tm_file} dbx.h"
1821 xm_file=mips/xm-sysv4.h
1822 xmake_file=mips/x-sysv
1823 if [[ x$gas = xyes ]]
1825 tmake_file=mips/t-svr4-gas
1827 tmake_file=mips/t-svr4
1828 extra_passes="mips-tfile mips-tdump"
1830 if [[ x$gnu_ld != xyes ]]
1836 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1837 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1838 if [[ x$stabs = xyes ]]; then
1839 tm_file="${tm_file} dbx.h"
1841 xm_file=mips/xm-sysv.h
1842 xmake_file=mips/x-sysv
1843 if [[ x$gas = xyes ]]
1845 tmake_file=mips/t-svr4-gas
1847 tmake_file=mips/t-svr4
1848 extra_passes="mips-tfile mips-tdump"
1850 if [[ x$gnu_ld != xyes ]]
1856 mips-*-riscos[[56789]]sysv*)
1857 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1858 if [[ x$stabs = xyes ]]; then
1859 tm_file="${tm_file} dbx.h"
1861 xm_file=mips/xm-sysv.h
1862 xmake_file=mips/x-sysv
1863 if [[ x$gas = xyes ]]
1865 tmake_file=mips/t-svr3-gas
1867 tmake_file=mips/t-svr3
1868 extra_passes="mips-tfile mips-tdump"
1870 if [[ x$gnu_ld != xyes ]]
1876 mips-*-sysv* | mips-*-riscos*sysv*)
1877 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1878 if [[ x$stabs = xyes ]]; then
1879 tm_file="${tm_file} dbx.h"
1881 xm_file=mips/xm-sysv.h
1882 xmake_file=mips/x-sysv
1883 if [[ x$gas = xyes ]]
1885 tmake_file=mips/t-svr3-gas
1887 tmake_file=mips/t-svr3
1888 extra_passes="mips-tfile mips-tdump"
1890 if [[ x$gnu_ld != xyes ]]
1896 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1897 tm_file=mips/mips-5.h
1898 if [[ x$stabs = xyes ]]; then
1899 tm_file="${tm_file} dbx.h"
1901 if [[ x$gas = xyes ]]
1903 tmake_file=mips/t-mips-gas
1905 extra_passes="mips-tfile mips-tdump"
1907 if [[ x$gnu_ld != xyes ]]
1916 tm_file=mips/ecoffl.h
1917 if [[ x$stabs = xyes ]]; then
1918 tm_file="${tm_file} dbx.h"
1920 tmake_file=mips/t-ecoff
1923 tm_file=mips/ecoff.h
1924 if [[ x$stabs = xyes ]]; then
1925 tm_file="${tm_file} dbx.h"
1927 tmake_file=mips/t-ecoff
1931 tm_file="mips/elfl.h libgloss.h"
1932 tmake_file=mips/t-ecoff
1935 tm_file="mips/elf.h libgloss.h"
1936 tmake_file=mips/t-ecoff
1939 tm_file="mips/elfl64.h libgloss.h"
1940 tmake_file=mips/t-ecoff
1942 mips64orionel-*-elf*)
1943 tm_file="mips/elflorion.h libgloss.h"
1944 tmake_file=mips/t-ecoff
1947 tm_file="mips/elf64.h libgloss.h"
1948 tmake_file=mips/t-ecoff
1951 tm_file="mips/elforion.h libgloss.h"
1952 tmake_file=mips/t-ecoff
1954 mips64orion-*-rtems*)
1955 tm_file=mips/rtems64.h
1956 tmake_file="mips/t-ecoff t-rtems"
1958 mips-*-*) # Default MIPS RISC-OS 4.0.
1959 if [[ x$stabs = xyes ]]; then
1960 tm_file="${tm_file} dbx.h"
1962 if [[ x$gas = xyes ]]
1964 tmake_file=mips/t-mips-gas
1966 extra_passes="mips-tfile mips-tdump"
1968 if [[ x$gnu_ld != xyes ]]
1975 tm_file="mn10200/mn10200.h"
1976 if [[ x$stabs = xyes ]]
1978 tm_file="${tm_file} dbx.h"
1984 tm_file="mn10300/mn10300.h"
1985 if [[ x$stabs = xyes ]]
1987 tm_file="${tm_file} dbx.h"
1992 tm_file=ns32k/encore.h
1996 tm_file=ns32k/sequent.h
2000 tm_file=ns32k/tek6100.h
2005 tm_file=ns32k/tek6200.h
2009 # This has not been updated to GCC 2.
2011 # xm_file=ns32k/xm-genix.h
2012 # xmake_file=ns32k/x-genix
2013 # tm_file=ns32k/genix.h
2014 # broken_install=yes
2018 tm_file=ns32k/merlin.h
2022 tm_file=ns32k/pc532-mach.h
2026 tm_file=ns32k/pc532-min.h
2027 xm_file=ns32k/xm-pc532-min.h
2030 ns32k-pc532-netbsd*)
2031 tm_file=ns32k/netbsd.h
2032 xm_file=ns32k/xm-netbsd.h
2033 # On NetBSD, the headers are already okay.
2034 fixincludes=Makefile.in
2038 tm_file="${tm_file} pdp11/2bsd.h"
2044 xmake_file=pyr/x-pyr
2051 xmake_file=romp/x-mach
2054 powerpc-*-sysv* | powerpc-*-elf*)
2055 tm_file=rs6000/sysv4.h
2056 xm_file=rs6000/xm-sysv4.h
2057 extra_headers=ppc-asm.h
2058 if [[ x$gas = xyes ]]
2060 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2062 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2064 xmake_file=rs6000/x-sysv4
2067 tm_file=rs6000/eabiaix.h
2068 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2069 fixincludes=Makefile.in
2070 extra_headers=ppc-asm.h
2073 tm_file=rs6000/eabisim.h
2074 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2075 fixincludes=Makefile.in
2076 extra_headers=ppc-asm.h
2079 tm_file=rs6000/eabi.h
2080 if [[ x$gas = xyes ]]
2082 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2084 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2086 fixincludes=Makefile.in
2087 extra_headers=ppc-asm.h
2090 tm_file=rs6000/rtems.h
2091 if [[ x$gas = xyes ]]
2093 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2095 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2097 fixincludes=Makefile.in
2098 extra_headers=ppc-asm.h
2100 powerpc-*-linux-gnu*)
2101 tm_file=rs6000/linux.h
2102 xm_file=rs6000/xm-sysv4.h
2103 out_file=rs6000/rs6000.c
2104 if [[ x$gas = xyes ]]
2106 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2108 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2110 xmake_file=rs6000/x-sysv4
2111 fixincludes=Makefile.in
2112 extra_headers=ppc-asm.h
2116 xm_file=rs6000/xm-sysv4.h
2117 tm_file=rs6000/vxppc.h
2118 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2119 extra_headers=ppc-asm.h
2121 powerpcle-*-sysv* | powerpcle-*-elf*)
2122 tm_file=rs6000/sysv4le.h
2123 xm_file=rs6000/xm-sysv4.h
2124 if [[ x$gas = xyes ]]
2126 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2128 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2130 xmake_file=rs6000/x-sysv4
2131 extra_headers=ppc-asm.h
2133 powerpcle-*-eabisim*)
2134 tm_file=rs6000/eabilesim.h
2135 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2136 fixincludes=Makefile.in
2137 extra_headers=ppc-asm.h
2140 tm_file=rs6000/eabile.h
2141 if [[ x$gas = xyes ]]
2143 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2145 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2147 fixincludes=Makefile.in
2148 extra_headers=ppc-asm.h
2150 powerpcle-*-winnt* )
2151 tm_file=rs6000/win-nt.h
2152 tmake_file=rs6000/t-winnt
2154 fixincludes=Makefile.in
2155 if [[ x$thread_file = x ]]; then
2158 extra_headers=ppc-asm.h
2160 powerpcle-*-pe | powerpcle-*-cygwin32)
2161 tm_file=rs6000/cygwin32.h
2162 xm_file=rs6000/xm-cygwin32.h
2163 tmake_file=rs6000/t-winnt
2164 xmake_file=rs6000/x-cygwin32
2166 fixincludes=Makefile.in
2167 if [[ x$thread_file = x ]]; then
2171 extra_headers=ppc-asm.h
2173 powerpcle-*-solaris2*)
2174 tm_file=rs6000/sol2.h
2175 xm_file=rs6000/xm-sysv4.h
2176 if [[ x$gas = xyes ]]
2178 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2180 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2182 xmake_file=rs6000/x-sysv4
2183 fixincludes=fixinc.svr4
2184 extra_headers=ppc-asm.h
2186 rs6000-ibm-aix3.[[01]]*)
2187 tm_file=rs6000/aix31.h
2188 xmake_file=rs6000/x-aix31
2191 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2192 tm_file=rs6000/aix3newas.h
2193 if [[ x$host != x$target ]]
2195 tmake_file=rs6000/t-xnewas
2197 tmake_file=rs6000/t-newas
2201 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2202 tm_file=rs6000/aix41.h
2203 if [[ x$host != x$target ]]
2205 tmake_file=rs6000/t-xnewas
2207 tmake_file=rs6000/t-newas
2209 xmake_file=rs6000/x-aix31
2219 tm_file=rs6000/mach.h
2220 xm_file=rs6000/xm-mach.h
2221 xmake_file=rs6000/x-mach
2225 tm_file=rs6000/lynx.h
2226 xm_file=rs6000/xm-lynx.h
2227 tmake_file=rs6000/t-rs6000
2228 xmake_file=rs6000/x-lynx
2240 xm_file=sparc/xm-pbd.h
2242 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2243 tm_file=sparc/vxsparc.h
2244 tmake_file=sparc/t-vxsparc
2248 tmake_file=sparc/t-sparcbare
2249 tm_file="sparc/aout.h libgloss.h"
2252 tm_file=sparc/netbsd.h
2253 xm_file=sparc/xm-netbsd.h
2254 # On NetBSD, the headers are already okay.
2255 fixincludes=Makefile.in
2261 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2262 xm_file=sparc/xm-linux.h
2263 tm_file=sparc/linux-aout.h
2265 fixincludes=Makefile.in #On Linux, the headers are ok already.
2269 sparc-*-linux-gnu*) # Sparc's running Linux, ELF
2270 xm_file=sparc/xm-linux.h
2271 tm_file=sparc/linux.h
2273 fixincludes=Makefile.in #On Linux, the headers are ok already.
2276 # Don't use it. Linux uses a slightly different one.
2277 # The real one comes with the Linux C library.
2278 #extra_parts="crtbegin.o crtend.o"
2281 if [[ x$gas = xyes ]]
2283 tm_file=sparc/lynx.h
2285 tm_file=sparc/lynx-ng.h
2287 xm_file=sparc/xm-lynx.h
2288 tmake_file=sparc/t-sunos41
2292 tmake_file="sparc/t-sparcbare t-rtems"
2293 tm_file=sparc/rtems.h
2296 tm_file=sparc/sol2.h
2297 xm_file=sparc/xm-sol2.h
2298 tmake_file=sparc/t-sol2
2299 xmake_file=sparc/x-sysv4
2300 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2301 fixincludes=fixinc.svr4
2303 if [[ x$thread_file = x ]]; then
2304 thread_file='solaris'
2308 tm_file=sparc/sunos4.h
2309 tmake_file=sparc/t-sunos40
2313 tm_file=sparc/sunos4.h
2314 tmake_file=sparc/t-sunos41
2318 tm_file=sparc/sun4o3.h
2322 tm_file=sparc/sysv4.h
2323 xm_file=sparc/xm-sysv4.h
2325 xmake_file=sparc/x-sysv4
2326 extra_parts="crtbegin.o crtend.o"
2329 xm_file=sparc/xm-sol2.h
2330 tm_file=sparc/vxsim.h
2331 tmake_file=sparc/t-vxsparc
2332 xmake_file=sparc/x-sysv4
2335 tm_file="sparc/splet.h libgloss.h"
2336 tmake_file=sparc/t-splet
2339 tm_file="sparc/litecoff.h libgloss.h"
2340 tmake_file=sparc/t-sparclite
2343 tm_file="sparc/lite.h aoutos.h libgloss.h"
2344 tmake_file=sparc/t-sparclite
2347 tmake_file=sparc/t-sp64
2348 tm_file=sparc/sp64-aout.h
2351 tmake_file=sparc/t-sp64
2352 tm_file=sparc/sp64-elf.h
2353 extra_parts="crtbegin.o crtend.o"
2355 # This hasn't been upgraded to GCC 2.
2356 # tahoe-harris-*) # Harris tahoe, using COFF.
2357 # tm_file=tahoe/harris.h
2359 # tahoe-*-bsd*) # tahoe running BSD
2361 # This hasn't been upgraded to GCC 2.
2366 vax-*-bsd*) # vaxen running BSD
2370 vax-*-sysv*) # vaxen running system V
2371 tm_file="${tm_file} vax/vaxv.h"
2372 xm_file="${tm_file} vax/xm-vaxv.h"
2376 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2377 xm_file="${xm_file} xm-netbsd.h"
2378 # On NetBSD, the headers are already okay.
2379 fixincludes=Makefile.in
2383 vax-*-ultrix*) # vaxen running ultrix
2384 tm_file="${tm_file} vax/ultrix.h"
2388 vax-*-vms*) # vaxen running VMS
2389 xm_file=vax/xm-vms.h
2393 vax-*-*) # vax default entry
2397 xm_file="${xm_file} xm-svr3"
2401 echo "Configuration $machine not supported" 1>&2
2408 ;; # Existing Linux/GNU systems do not use the GNU setup.
2410 # On the GNU system, the setup is just about the same on
2411 # each different CPU. The specific machines that GNU
2412 # supports are matched above and just set $cpu_type.
2413 xm_file=${cpu_type}/xm-gnu.h
2414 tm_file=${cpu_type}/gnu.h
2415 extra_parts="crtbegin.o crtend.o"
2416 # GNU always uses ELF.
2418 # GNU tools are the only tools.
2421 # On GNU, the headers are already okay.
2422 fixincludes=Makefile.in
2423 xmake_file=x-linux # These details are the same as Linux.
2424 tmake_file=t-gnu # These are not.
2427 fixincludes=fixinc.svr4
2428 xmake_try_sysv=x-sysv
2430 install_headers_dir=install-headers-cpio
2434 install_headers_dir=install-headers-cpio
2438 # Distinguish i[3456]86
2439 # Also, do not run mips-tfile on MIPS if using gas.
2440 # Process --with-cpu= for PowerPC/rs6000
2441 target_cpu_default2=
2444 target_cpu_default2=1
2447 target_cpu_default2=2
2450 target_cpu_default2=3
2453 if [[ x$gas = xyes ]]
2455 target_cpu_default2=4
2458 mips*-*-ecoff* | mips*-*-elf*)
2459 if [[ x$gas = xyes ]]
2461 if [[ x$gnu_ld = xyes ]]
2463 target_cpu_default2=20
2465 target_cpu_default2=16
2470 if [[ x$gas = xyes ]]
2472 target_cpu_default2=16
2475 powerpc*-*-* | rs6000-*-*)
2476 case "x$with_cpu" in
2480 xcommon | xpower | xpower2 | xpowerpc | xrios \
2481 | xrios1 | xrios2 | xrsc | xrsc1 \
2482 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2483 | x403 | x505 | x801 | x821 | x823 | x860)
2484 target_cpu_default2="'\"$with_cpu\"'"
2488 echo "--with-cpu must be passed a value" 1>&2
2493 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2499 case ".$with_cpu" in
2501 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2503 .supersparc | .ultrasparc | .v7 | .v8)
2504 target_cpu_default2="TARGET_CPU_$with_cpu"
2507 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2514 if [[ x$target_cpu_default2 != x ]]
2516 if [[ x$target_cpu_default != x ]]
2518 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2520 target_cpu_default=$target_cpu_default2
2524 # No need for collect2 if we have the GNU linker.
2531 # Save data on machine being used to compile GCC in build_xm_file.
2532 # Save data on host machine in vars host_xm_file and host_xmake_file.
2533 if [[ x$pass1done = x ]]
2535 if [[ x"$xm_file" = x ]]
2536 then build_xm_file=$cpu_type/xm-$cpu_type.h
2537 else build_xm_file=$xm_file
2539 build_broken_install=$broken_install
2540 build_install_headers_dir=$install_headers_dir
2541 build_exeext=$exeext
2544 if [[ x$pass2done = x ]]
2546 if [[ x"$xm_file" = x ]]
2547 then host_xm_file=$cpu_type/xm-$cpu_type.h
2548 else host_xm_file=$xm_file
2550 if [[ x"$xmake_file" = x ]]
2551 then xmake_file=$cpu_type/x-$cpu_type
2553 host_xmake_file="$xmake_file"
2554 host_truncate_target=$truncate_target
2555 host_extra_gcc_objs=$extra_gcc_objs
2556 host_extra_objs=$extra_host_objs
2562 extra_objs="${host_extra_objs} ${extra_objs}"
2564 # Default the target-machine variables that were not explicitly set.
2565 if [[ x"$tm_file" = x ]]
2566 then tm_file=$cpu_type/$cpu_type.h; fi
2568 if [[ x$extra_headers = x ]]
2569 then extra_headers=; fi
2571 if [[ x"$xm_file" = x ]]
2572 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2574 md_file=$cpu_type/$cpu_type.md
2576 if [[ x$out_file = x ]]
2577 then out_file=$cpu_type/$cpu_type.c; fi
2579 if [[ x"$tmake_file" = x ]]
2580 then tmake_file=$cpu_type/t-$cpu_type
2583 if [[ x$float_format = x ]]
2584 then float_format=i64
2587 # Say what files are being used for the output code and MD file.
2588 echo "Using \`$srcdir/config/$out_file' to output insns."
2589 echo "Using \`$srcdir/config/$md_file' as machine description file."
2592 for f in $tm_file; do
2595 if [[ $count = ax ]]; then
2596 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2598 echo "Using the following target machine macro files:"
2599 for f in $tm_file; do
2600 echo " $srcdir/config/$f"
2605 for f in $host_xm_file; do
2608 if [[ $count = ax ]]; then
2609 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2611 echo "Using the following host machine macro files:"
2612 for f in $host_xm_file; do
2613 echo " $srcdir/config/$f"
2617 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2619 for f in $build_xm_file; do
2622 if [[ $count = ax ]]; then
2623 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2625 echo "Using the following build machine macro files:"
2626 for f in $build_xm_file; do
2627 echo " $srcdir/config/$f"
2632 if [[ x$thread_file = x ]]
2633 then thread_file='single'
2636 # Set up the header files.
2637 # $links is the list of header files to create.
2638 # $vars is the list of shell variables with file names to include.
2639 vars="host_xm_file tm_file xm_file build_xm_file"
2640 links="config.h tm.h tconfig.h hconfig.h"
2643 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2646 while [[ -n "$vars" ]]
2648 # set file to car of files, files to cdr of files
2649 set $vars; var=$1; shift; vars=$*
2650 set $links; link=$1; shift; links=$*
2654 # Define TARGET_CPU_DEFAULT if the system wants one.
2655 # This substitutes for lots of *.h files.
2656 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2658 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2661 for file in `eval echo '$'$var`; do
2662 echo "#include \"$file\"" >>$link
2666 # Truncate the target if necessary
2667 if [[ x$host_truncate_target != x ]]; then
2668 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2671 # Get the version number from the toplevel
2672 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2674 # For the current directory and all of the language subdirectories,
2675 # do the rest of the script ...
2678 for lang in ${srcdir}/*/config-lang.in ..
2682 # The odd quoting in the next line works around
2683 # an apparent bug in bash 1.12 on linux.
2684 ${srcdir}/[[*]]/config-lang.in) ;;
2685 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2689 # Are we using gcc as the native compiler?
2691 *linux*) # All Linux's use gcc as the native compiler.
2692 if [[ x$prefix = xNONE ]]; then
2693 prefix=$native_prefix
2698 # Make empty files to contain the specs and options for each language.
2699 # Then add #include lines to for a compiler that has specs and/or options.
2703 rm -f specs.h options.h
2704 touch specs.h options.h
2705 for subdir in . $subdirs
2707 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2708 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2709 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2711 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2712 echo "#include \"$subdir/lang-options.h\"" >>options.h
2713 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2717 # Get an absolute path to the GCC top-level source directory
2723 # These (without "all_") are set in each config-lang.in.
2724 # `language' must be a single word so is spelled singularly.
2730 # List of language makefile fragments.
2735 host_overrides="Make-host"
2736 target_overrides="Make-target"
2737 cross_overrides="/dev/null"
2738 build_overrides="/dev/null"
2739 language_fragments="Make-lang"
2740 language_hooks="Make-hooks"
2743 for subdir in . $subdirs
2745 oldsrcdir=$savesrcdir
2747 # Re-adjust the path
2755 srcdir=$oldsrcdir/$subdir
2764 oldsrcdir=../${oldsrcdir}
2765 srcdir=$oldsrcdir/$subdir
2770 mainsrcdir=$oldsrcdir
2772 test -d $subdir || mkdir $subdir
2775 rm -f Make-host Make-target Make-hooks
2779 # Conditionalize the makefile for this host machine.
2780 dep_host_xmake_file=
2782 for f in .. ${host_xmake_file}
2784 if [[ -f ${mainsrcdir}/config/$f ]]
2786 cat ${mainsrcdir}/config/$f >> Make-host
2787 dep_host_xmake_file="${dep_host_xmake_file} \$(srcdir)/config/$f"
2791 # Set EXTRA_HEADERS according to extra_headers.
2792 # This substitutes for lots of t-* files.
2794 if [[ "x$extra_headers" = x ]]
2797 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2798 for file in $extra_headers;
2800 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2804 # Add a definition of USE_COLLECT2 if system wants one.
2805 # Also tell toplev.c what to do.
2806 # This substitutes for lots of t-* files.
2807 if [[ x$use_collect2 = x ]]
2812 will_use_collect2="ld"
2813 maybe_use_collect2="-DUSE_COLLECT2"
2817 # Set MD_DEPS if the real md file is in md.pre-cpp.
2818 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2819 # for line oriented comments, so we must always use a GNU cpp. If
2820 # building gcc with a cross compiler, use the cross compiler just
2821 # built. Otherwise, we can use the cpp just built.
2823 if [[ "x$md_cppflags" = x ]]
2825 md_file_sub=$srcdir/config/$md_file
2830 # If we have gas in the build tree, make a link to it.
2831 if [[ -f ../gas/Makefile ]]; then
2832 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2835 # If we have ld in the build tree, make a link to it.
2836 if [[ -f ../ld/Makefile ]]; then
2837 if [[ x$use_collect2 = x ]]; then
2838 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2840 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2844 # Conditionalize the makefile for this target machine.
2847 for f in .. ${tmake_file}
2849 if [[ -f ${mainsrcdir}/config/$f ]]
2851 cat ${mainsrcdir}/config/$f >> Make-target
2852 dep_tmake_file="${dep_tmake_file} \$(srcdir)/config/$f"
2856 # If this is the top level Makefile, add the language fragments.
2857 # Languages are added via two mechanisms. Some information must be
2858 # recorded in makefile variables, these are defined in config-lang.in.
2859 # We accumulate them and plug them into the main Makefile.
2860 # The other mechanism is a set of hooks for each of the main targets
2861 # like `clean', `install', etc.
2862 if [[ $subdir = . ]]
2864 for s in .. $subdirs
2873 . ${mainsrcdir}/$s/config-lang.in
2874 if [[ "x$language" = x ]]
2876 echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2879 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
2880 all_languages="$all_languages $language"
2881 if [[ "x$boot_language" = xyes ]]
2883 all_boot_languages="$all_boot_languages $language"
2885 all_compilers="$all_compilers $compilers"
2886 all_stagestuff="$all_stagestuff $stagestuff"
2887 all_diff_excludes="$all_diff_excludes $diff_excludes"
2888 all_headers="$all_headers $headers"
2889 all_lib2funcs="$all_lib2funcs $lib2funcs"
2893 # Since we can't use `::' targets, we link each language in
2894 # with a set of hooks, reached indirectly via lang.${target}.
2896 target_list="all.build all.cross start.encap rest.encap \
2898 install-normal install-common install-info install-man \
2900 mostlyclean clean distclean extraclean maintainer-clean \
2901 stage1 stage2 stage3 stage4"
2902 for t in $target_list
2905 for l in .. $all_languages
2907 if [[ $l != ".." ]]; then
2911 echo "lang.$t: $x" >> Make-hooks
2914 # If the host doesn't support symlinks, modify CC in
2915 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2916 # Otherwise, we can use "CC=$(CC)".
2918 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2920 cc_set_by_configure="\$(CC)"
2921 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2923 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2925 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2928 # Otherwise, this is a language subdirectory. If the host supports
2929 # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
2930 # installation procedure can still use CC="stage1/xgcc -Bstage1/".
2931 # If the host doesn't support symlinks, FLAGS_TO_PASS has been
2932 # modified to solve the problem there.
2934 for t in stage1 stage2 stage3 stage4 include
2937 $symbolic_link ../$t $t 2>/dev/null
2941 out_object_file=`basename $out_file .c`.o
2943 if [[ $subdir = . ]]
2946 for f in $tm_file; do
2947 tm_file_list="${tm_file_sub} \$(srcdir)/config/$f"
2951 for f in $host_xm_file; do
2952 host_xm_file_list="${host_xm_file_sub} \$(srcdir)/config/$f"
2956 for f in $build_xm_file; do
2957 build_xm_file_list="${build_xm_file_sub} \$(srcdir)/config/$f"
2961 # Remove all formfeeds, since some Makes get confused by them.
2962 # Also arrange to give the variables `target', `host_xmake_file',
2963 # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
2964 # `out_file', `out_object', `md_file', `lang_specs_files',
2965 # `lang_options_files', `INSTALL_HEADERS_DIR', and `CROSS_FLOAT_H'
2966 # values in the Makefile from the values they have in this script.
2969 for f in $tm_file; do
2970 tm_file_sub="${tm_file_sub} ${srcdir}/config/$f"
2974 for f in $host_xm_file; do
2975 host_xm_file_sub="${host_xm_file_sub} ${srcdir}/config/$f"
2979 for f in $build_xm_file; do
2980 build_xm_file_sub="${build_xm_file_sub} ${srcdir}/config/$f"
2983 # Define macro CROSS_COMPILE in compilation
2984 # if this is a cross-compiler.
2985 # Also use all.cross instead of all.internal
2986 # and add cross-make to Makefile.
2987 if [[ x$host != x$target ]]
2989 cross_defines="CROSS=-DCROSS_COMPILE"
2990 cross_overrides="${topdir}/cross-make"
2993 # When building gcc with a cross-compiler, we need to fix a few things.
2994 # This must come after cross-make as we want all.build to override
2996 if [[ x$build != x$host ]]
2998 build_overrides="${topdir}/build-make"
3002 done # end of current-dir SUBDIRS loop
3006 # Process the language fragments
3007 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs"
3009 # Substitute configuration variables
3011 AC_SUBST(all_languages)
3012 AC_SUBST(all_boot_languages)
3013 AC_SUBST(all_compilers)
3014 AC_SUBST(all_lang_makefiles)
3015 AC_SUBST(all_stagestuff)
3016 AC_SUBST(all_diff_excludes)
3017 AC_SUBST(all_lib2funcs)
3018 AC_SUBST(all_headers)
3019 AC_SUBST(extra_passes)
3020 AC_SUBST(extra_programs)
3021 AC_SUBST(extra_parts)
3022 AC_SUBST(extra_objs)
3023 AC_SUBST(host_extra_gcc_objs)
3024 AC_SUBST(extra_headers_list)
3025 AC_SUBST(dep_host_xmake_file)
3026 AC_SUBST(dep_tmake_file)
3028 AC_SUBST(out_object_file)
3030 AC_SUBST(tm_file_list)
3031 AC_SUBST(build_xm_file_list)
3032 AC_SUBST(host_xm_file_list)
3033 AC_SUBST(lang_specs_files)
3034 AC_SUBST(lang_options_files)
3035 AC_SUBST(thread_file)
3037 AC_SUBST(local_prefix)
3038 AC_SUBST(gxx_include_dir)
3039 AC_SUBST(fixincludes)
3040 AC_SUBST(build_install_headers_dir)
3042 AC_SUBST(float_format)
3043 AC_SUBST(will_use_collect2)
3044 AC_SUBST(maybe_use_collect2)
3045 AC_SUBST(cc_set_by_configure)
3046 AC_SUBST(stage_prefix_set_by_configure)
3048 AC_SUBST_FILE(target_overrides)
3049 AC_SUBST_FILE(host_overrides)
3050 AC_SUBST(cross_defines)
3051 AC_SUBST_FILE(cross_overrides)
3052 AC_SUBST_FILE(build_overrides)
3053 AC_SUBST_FILE(language_fragments)
3054 AC_SUBST_FILE(language_hooks)
3056 # Echo that links are built
3057 if [[ x$host = x$target ]]
3065 if [[ x$host != x$build ]]
3067 str3=" on a $build system"
3070 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3075 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3077 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3079 echo " ${str2}${str3}." 1>&2
3082 # Configure the subdirectories
3083 # AC_CONFIG_SUBDIRS($subdirs)
3085 # Create the Makefile
3086 # and configure language subdirectories
3088 . $srcdir/configure.lang,
3092 target_alias='${target_alias}'
3094 subdirs='${subdirs}'
3095 symbolic_link='${symbolic_link}'
3096 program_transform_set='${program_transform_set}'
3097 program_transform_name='${program_transform_name}'
3098 all_languages='${all_languages}'
3099 all_boot_languages='${all_boot_languages}'
3100 all_compilers='${all_compilers}'
3101 all_lang_makefiles='${all_lang_makefiles}'
3102 all_stagestuff='${all_stagestuff}'
3103 all_diff_excludes='${all_diff_excludes}'
3104 all_lib2funcs='${all_lib2funcs}'
3105 all_headers='${all_headers}'
3106 extra_headers='${extra_headers}'
3107 extra_passes='${extra_passes}'
3108 extra_programs='${extra_programs}'
3109 extra_parts='${extra_parts}'
3110 extra_objs='${extra_objs}'
3111 host_extra_gcc_objs='${host_extra_gcc_objs}'
3112 extra_headers_list='${extra_headers_list}'
3113 dep_host_xmake_file='${dep_host_xmake_file}'
3114 host_xmake_file='${host_xmake_file}'
3115 dep_tmake_file='${dep_tmake_file}'
3116 tmake_file='${tmake_file}'
3117 out_file='${out_file}'
3118 out_object_file='${out_object_file}'
3119 md_file='${md_file}'
3120 md_file_sub='${md_file_sub}'
3121 tm_file_list='${tm_file_list}'
3122 tm_file_sub='${tm_file_sub}'
3123 build_xm_file_list='${build_xm_file_list}'
3124 build_xm_file_sub='${build_xm_file_sub}'
3125 host_xm_file_list='${host_xm_file_list}'
3126 host_xm_file_sub='${host_xm_file_sub}'
3127 lang_specs_files='${lang_specs_files}'
3128 lang_options_files='${lang_options_files}'
3129 thread_file='${thread_file}'
3130 version='${version}'
3131 local_prefix='${local_prefix}'
3132 gxx_include_dir='${gxx_include_dir}'
3133 fixincludes='${fixincludes}'
3134 build_install_headers_dir='${build_install_headers_dir}'
3136 float_format='${float_format}'
3137 use_collect2='${use_collect2}'
3138 will_use_collect2='${will_use_collect2}'
3139 maybe_use_collect2='${maybe_use_collect2}'
3140 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3141 SET_MAKE='${SET_MAKE}'
3142 build_broken_install='${build_broken_install}'
3143 md_cppflags='${md_cppflags}'
3144 target_list='${target_list}'
3146 target_overrides='${target_overrides}'
3147 host_overrides='${host_overrides}'
3148 cross_defines='${cross_defines}'
3149 cross_overrides='${cross_overrides}'
3150 build_overrides='${build_overrides}'
3151 language_fragments='${language_fragments}'
3152 language_hooks='${language_hooks}'