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)
32 # Check for additional parameters
36 [ --with-gnu-ld arrange to work with GNU ld.],
42 [ --with-gnu-as arrange to work with GNU as.],
48 [ --with-stabs arrange to use stabs instead of host debug format.],
54 [ --with-elf arrange to use ELF instead of host debug format.],
58 # Specify the local prefix
59 AC_ARG_WITH(local-prefix,
60 [ --with-local-prefix=DIR specifies directory to put local include.],
61 local_prefix=$with_local_prefix,
62 local_prefix=/usr/local)
64 # Default local prefix if it is empty
65 if [[ x$local_prefix = x ]]; then
66 local_prefix=/usr/local
69 # Specify the g++ header file directory
70 AC_ARG_WITH(gxx-include-dir,
71 [ --with-gxx-include-dir=DIR
72 specifies directory to put g++ header files.],
73 gxx_include_dir=$with_gxx_include_dir,
74 gxx_include_dir='${prefix}/include/g++')
76 # Default g++ header file directory if it is empty
77 if [[ x$gxx_include_dir = x ]]; then
78 gxx_include_dir='${prefix}/include/g++'
81 # Enable use of cpplib for C.
82 AC_ARG_ENABLE(c-cpplib,
83 [ --enable-c-cpplib Use cpplib for C.],
84 if [[[ x$enable_c_cpplib != xno ]]]; then
85 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
86 extra_c_flags=-DUSE_CPPLIB=1
90 # Pass with no value to take the default
91 # Pass with a value to specify a thread package
92 AC_ARG_ENABLE(threads,
93 [ --enable-threads enable thread usage for target GCC.
94 --enable-threads=LIB use LIB thread package for target GCC.],
95 if [[[ x$enable_threads = xno ]]]; then
100 # Check if a valid thread package
101 case x${enable_threads} in
110 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
112 thread_file=$enable_threads
115 echo "$enable_threads is an unknown thread package" 1>&2
120 # Determine the host, build, and target systems
123 # Find some useful tools
132 # Find the native compiler
136 AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h)
138 GCC_NEED_DECLARATION(malloc)
139 GCC_NEED_DECLARATION(realloc)
140 GCC_NEED_DECLARATION(calloc)
141 GCC_NEED_DECLARATION(free)
145 AC_CHECK_FUNCS(strerror strtoul bsearch)
154 build_install_headers_dir=install-headers-tar
158 host_truncate_target=
160 # Decode the host machine, then the target machine.
161 # For the host machine, we save the xm_file variable as host_xm_file;
162 # then we decode the target machine and forget everything else
163 # that came from the host machine.
164 for machine in $build $host $target; do
177 # Set this to force installation and use of collect2.
179 # Set this to override the default target model.
181 # Set this to control which fixincludes program to use.
182 fixincludes=fixincludes
183 # Set this to control how the header file directory is installed.
184 install_headers_dir=install-headers-tar
185 # Set this to a non-empty list of args to pass to cpp if the target
186 # wants its .md file passed through cpp.
188 # Set this if directory names should be truncated to 14 characters.
190 # Set this if gdb needs a dir command with `dirname $out_file`
191 gdb_needs_out_file_path=
192 # Set this if the build machine requires executables to have a
196 # Set default cpu_type, tm_file and xm_file so it can be updated in
197 # each machine entry.
198 cpu_type=`echo $machine | sed 's/-.*$//'`
232 tm_file=${cpu_type}/${cpu_type}.h
233 xm_file=${cpu_type}/xm-${cpu_type}.h
236 # Support site-specific machine types.
238 cpu_type=`echo $machine | sed -e 's/-.*//'`
239 rest=`echo $machine | sed -e "s/$cpu_type-//"`
240 xm_file=${cpu_type}/xm-$rest.h
241 tm_file=${cpu_type}/$rest.h
242 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
243 then xmake_file=${cpu_type}/x-$rest; \
246 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
247 then tmake_file=${cpu_type}/t-$rest; \
253 a29k-*-bsd* | a29k-*-sym1*)
254 tm_file="${tm_file} a29k/unix.h"
255 xm_file=a29k/xm-unix.h
256 xmake_file=a29k/x-unix
259 a29k-*-udi | a29k-*-coff)
260 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
261 tmake_file=a29k/t-a29kbare
264 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
265 tmake_file=a29k/t-vx29k
266 extra_parts="crtbegin.o crtend.o"
268 a29k-*-*) # Default a29k environment.
271 alpha*-*-linux-gnuecoff*)
272 tm_file="${tm_file} alpha/linux.h"
273 xm_file="${xm_file} alpha/xm-linux.h"
274 target_cpu_default="MASK_GAS"
277 fixincludes=Makefile.in
280 alpha*-*-linux-gnulibc1*)
281 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
282 xm_file="${xm_file} alpha/xm-linux.h"
283 target_cpu_default="MASK_GAS"
284 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
286 fixincludes=Makefile.in
288 if [[ x$enable_threads = xyes ]]; then
293 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
294 xm_file="${xm_file} alpha/xm-linux.h"
295 target_cpu_default="MASK_GAS"
296 tmake_file="t-linux alpha/t-linux"
298 fixincludes=Makefile.in
300 if [[ x$enable_threads = xyes ]]; then
304 alpha*-dec-osf[[456789]]*)
305 if [[ x$stabs = xyes ]]
307 tm_file="${tm_file} dbx.h"
309 if [[ x$gas != xyes ]]
311 extra_passes="mips-tfile mips-tdump"
314 # Some versions of OSF4 (specifically X4.0-9 296.7) have
315 # a broken tar, so we use cpio instead.
318 install_headers_dir=install-headers-cpio
322 alpha*-dec-osf[[23]]*)
323 tm_file="${tm_file} alpha/osf2or3.h"
324 if [[ x$stabs = xyes ]]
326 tm_file="${tm_file} dbx.h"
328 if [[ x$gas != xyes ]]
330 extra_passes="mips-tfile mips-tdump"
335 tm_file="${tm_file} alpha/osf12.h"
336 if [[ x$stabs = xyes ]]
338 tm_file="${tm_file} dbx.h"
340 if [[ x$gas != xyes ]]
342 extra_passes="mips-tfile mips-tdump"
347 if [[ x$stabs = xyes ]]
349 tm_file="${tm_file} dbx.h"
351 if [[ x$gas != xyes ]]
353 extra_passes="mips-tfile mips-tdump"
358 tm_file="${tm_file} alpha/win-nt.h"
359 target_cpu_default=MASK_WINDOWS_NT
360 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
362 xmake_file=winnt/x-winnt
363 extra_host_objs=oldnames.o
364 extra_gcc_objs="spawnv.o oldnames.o"
365 fixincludes=fixinc.winnt
366 if [[ x$gnu_ld != xyes ]]
368 extra_programs=ld.exe
370 if [[ x$enable_threads = xyes ]]; then
376 xm_file="${xm_file} alpha/xm-vms.h"
377 tmake_file=alpha/t-vms
378 fixincludes=Makefile.in
381 extra_parts="crtinit.o crtfini.o"
383 arm-*-coff* | armel-*-coff*)
385 tmake_file=arm/t-bare
387 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
388 tm_file=arm/riscix1-1.h
391 arm-*-riscix*) # Acorn RISC machine
392 if [[ x$gas = xyes ]]
394 tm_file=arm/rix-gas.h
398 xmake_file=arm/x-riscix
399 tmake_file=arm/t-riscix
402 arm-semi-aout | armel-semi-aout)
404 tmake_file=arm/t-semi
405 fixincludes=Makefile.in # There is nothing to fix
407 arm-semi-aof | armel-semi-aof)
408 tm_file=arm/semiaof.h
409 tmake_file=arm/t-semiaof
410 fixincludes=Makefile.in # There is nothing to fix
414 xm_file=arm/xm-netbsd.h
415 tmake_file=arm/t-netbsd
416 # On NetBSD, the headers are already okay, except for math.h.
417 fixincludes=fixinc.math
420 arm-*-linux-gnuaout*) # ARM Linux
422 xm_file=arm/xm-linux.h
424 tm_file=arm/linux-gas.h
425 tmake_file=arm/t-linux
426 fixincludes=Makefile.in
432 c1-convex-*) # Convex C1
435 fixincludes=Makefile.in
437 c2-convex-*) # Convex C2
440 fixincludes=Makefile.in
445 fixincludes=Makefile.in
450 fixincludes=Makefile.in
453 target_cpu_default=16
455 fixincludes=Makefile.in
457 clipper-intergraph-clix*)
458 tm_file="${tm_file} svr3.h clipper/clix.h"
459 xm_file=clipper/xm-clix.h
460 xmake_file=clipper/x-clix
461 extra_headers=va-clipper.h
462 extra_parts="crtbegin.o crtend.o"
463 install_headers_dir=install-headers-cpio
470 # This hasn't been upgraded to GCC 2.
471 # fx80-alliant-*) # Alliant FX/80
477 if [[ x$enable_haifa != xno ]]; then
480 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
481 xm_file=pa/xm-papro.h
485 if [[ x$enable_haifa != xno ]]; then
489 tm_file="${tm_file} pa/pa-osf.h"
491 fixincludes=Makefile.in
494 if [[ x$enable_haifa != xno ]]; then
497 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
498 xm_file=pa/xm-papro.h
502 if [[ x$enable_haifa != xno ]]; then
505 tm_file="${tm_file} pa/pa-osf.h"
507 fixincludes=Makefile.in
510 if [[ x$enable_haifa != xno ]]; then
515 fixincludes=Makefile.in
518 if [[ x$enable_haifa != xno ]]; then
522 fixincludes=Makefile.in
525 if [[ x$enable_haifa != xno ]]; then
528 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
529 xm_file=pa/xm-pahpux.h
530 xmake_file=pa/x-pa-hpux
531 if [[ x$gas = xyes ]]
533 tm_file="${tm_file} pa/gas.h"
535 install_headers_dir=install-headers-cpio
538 hppa1.0-*-hpux8.0[[0-2]]*)
539 if [[ x$enable_haifa != xno ]]; then
542 tm_file="${tm_file} pa/pa-hpux.h"
543 xm_file=pa/xm-pahpux.h
544 xmake_file=pa/x-pa-hpux
545 if [[ x$gas = xyes ]]
547 tm_file="${tm_file} pa/pa-gas.h"
549 tm_file="pa/pa-oldas.h ${tm_file}"
551 install_headers_dir=install-headers-cpio
554 hppa1.1-*-hpux8.0[[0-2]]*)
555 if [[ x$enable_haifa != xno ]]; then
559 tm_file="${tm_file} pa/pa-hpux.h"
560 xm_file=pa/xm-pahpux.h
561 xmake_file=pa/x-pa-hpux
562 if [[ x$gas = xyes ]]
564 tm_file="${tm_file} pa/pa-gas.h"
566 tm_file="pa/pa-oldas.h ${tm_file}"
568 install_headers_dir=install-headers-cpio
572 if [[ x$enable_haifa != xno ]]; then
576 tm_file="${tm_file} pa/pa-hpux.h"
577 xm_file=pa/xm-pahpux.h
578 xmake_file=pa/x-pa-hpux
579 if [[ x$gas = xyes ]]
581 tm_file="${tm_file} pa/pa-gas.h"
583 install_headers_dir=install-headers-cpio
587 if [[ x$enable_haifa != xno ]]; then
590 tm_file="${tm_file} pa/pa-hpux.h"
591 xm_file=pa/xm-pahpux.h
592 xmake_file=pa/x-pa-hpux
593 if [[ x$gas = xyes ]]
595 tm_file="${tm_file} pa/pa-gas.h"
597 install_headers_dir=install-headers-cpio
601 if [[ x$enable_haifa != xno ]]; then
605 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
606 xm_file=pa/xm-pahpux.h
607 xmake_file=pa/x-pa-hpux
608 if [[ x$gas = xyes ]]
610 tm_file="${tm_file} pa/pa-gas.h"
612 install_headers_dir=install-headers-cpio
616 if [[ x$enable_haifa != xno ]]; then
619 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
620 xm_file=pa/xm-pahpux.h
621 xmake_file=pa/x-pa-hpux
622 if [[ x$gas = xyes ]]
624 tm_file="${tm_file} pa/pa-gas.h"
626 install_headers_dir=install-headers-cpio
630 if [[ x$enable_haifa != xno ]]; then
634 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
635 xm_file=pa/xm-pahpux.h
636 xmake_file=pa/x-pa-hpux
637 if [[ x$gas = xyes ]]
639 tm_file="${tm_file} pa/pa-gas.h"
641 install_headers_dir=install-headers-cpio
645 if [[ x$enable_haifa != xno ]]; then
648 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
649 xm_file=pa/xm-pahpux.h
650 xmake_file=pa/x-pa-hpux
651 if [[ x$gas = xyes ]]
653 tm_file="${tm_file} pa/pa-gas.h"
655 install_headers_dir=install-headers-cpio
659 if [[ x$enable_haifa != xno ]]; then
663 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
664 xm_file=pa/xm-pahpux.h
665 xmake_file=pa/x-pa-hpux
666 if [[ x$gas = xyes ]]
668 tm_file="${tm_file} pa/pa-gas.h"
670 install_headers_dir=install-headers-cpio
674 if [[ x$enable_haifa != xno ]]; then
677 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
678 xm_file=pa/xm-pahpux.h
679 xmake_file=pa/x-pa-hpux
680 if [[ x$gas = xyes ]]
682 tm_file="${tm_file} pa/pa-gas.h"
684 install_headers_dir=install-headers-cpio
688 if [[ x$enable_haifa != xno ]]; then
693 fixincludes=Makefile.in
697 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
698 if [[ x$gas = xyes ]]
700 tm_file=i386/aix386.h
701 extra_parts="crtbegin.o crtend.o"
702 tmake_file=i386/t-crtstuff
704 tm_file=i386/aix386ng.h
707 xm_file=i386/xm-aix.h
708 xmake_file=i386/x-aix
710 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
711 xm_file=i386/xm-sysv4.h
712 xmake_file=i386/x-ncr3000
713 if [[ x$stabs = xyes -a x$gas = xyes ]]
715 tm_file=i386/sysv4gdb.h
719 extra_parts="crtbegin.o crtend.o"
720 tmake_file=i386/t-crtpic
724 xm_file=i386/xm-next.h
725 tmake_file=i386/t-next
726 xmake_file=i386/x-next
727 extra_objs=nextstep.o
728 if [[ x$enable_threads = xyes ]]; then
732 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
734 if [[ x$gas = xyes ]]
736 tm_file=i386/seq-gas.h
738 tm_file=i386/sequent.h
741 i[[3456]]86-sequent-ptx1*)
742 xm_file=i386/xm-sysv3.h
743 xmake_file=i386/x-sysv3
744 tm_file=i386/seq-sysv3.h
745 tmake_file=i386/t-crtstuff
746 fixincludes=fixinc.ptx
747 extra_parts="crtbegin.o crtend.o"
748 install_headers_dir=install-headers-cpio
750 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
751 xm_file=i386/xm-sysv3.h
752 xmake_file=i386/x-sysv3
753 tm_file=i386/seq2-sysv3.h
754 tmake_file=i386/t-crtstuff
755 extra_parts="crtbegin.o crtend.o"
756 fixincludes=fixinc.ptx
757 install_headers_dir=install-headers-cpio
759 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
760 xm_file=i386/xm-sysv4.h
762 tm_file=i386/ptx4-i.h
764 extra_parts="crtbegin.o crtend.o"
765 fixincludes=fixinc.ptx
766 install_headers_dir=install-headers-cpio
768 i386-sun-sunos*) # Sun i386 roadrunner
769 xm_file=i386/xm-sun.h
774 tm_file=i386/i386-aout.h
775 tmake_file=i386/t-i386bare
777 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
778 tm_file=i386/bsd386.h
779 xm_file=i386/xm-bsd386.h
780 # tmake_file=t-libc-ok
783 tm_file=i386/386bsd.h
784 xm_file=i386/xm-bsd386.h
785 # tmake_file=t-libc-ok
786 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
789 i[[3456]]86-*-freebsdelf*)
790 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
791 xm_file=i386/xm-freebsd.h
792 # On FreeBSD, the headers are already ok, except for math.h.
793 fixincludes=fixinc.math
794 tmake_file=i386/t-freebsd
799 i[[3456]]86-*-freebsd*)
800 tm_file=i386/freebsd.h
801 xm_file=i386/xm-freebsd.h
802 # On FreeBSD, the headers are already ok, except for math.h.
803 fixincludes=fixinc.math
804 tmake_file=i386/t-freebsd
806 i[[3456]]86-*-netbsd*)
807 tm_file=i386/netbsd.h
808 xm_file=i386/xm-netbsd.h
809 # On NetBSD, the headers are already okay, except for math.h.
810 fixincludes=fixinc.math
814 tm_file=i386/i386-coff.h
815 tmake_file=i386/t-i386bare
817 i[[3456]]86-*-isc*) # 80386 running ISC system
818 xm_file=i386/xm-isc.h
820 i[[345]]86-*-isc[[34]]*)
821 xmake_file=i386/x-isc3
824 xmake_file=i386/x-isc
827 if [[ x$gas = xyes -a x$stabs = xyes ]]
829 tm_file=i386/iscdbx.h
830 tmake_file=i386/t-svr3dbx
831 extra_parts="svr3.ifile svr3z.ifile"
833 tm_file=i386/isccoff.h
834 tmake_file=i386/t-crtstuff
835 extra_parts="crtbegin.o crtend.o"
837 install_headers_dir=install-headers-cpio
839 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
840 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
841 xmake_file=x-linux-aout
842 tmake_file="t-linux-aout i386/t-crtstuff"
843 tm_file=i386/linux-oldld.h
844 fixincludes=Makefile.in #On Linux, the headers are ok already.
847 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
848 xm_file=i386/xm-linux.h # with a.out format
849 xmake_file=x-linux-aout
850 tmake_file="t-linux-aout i386/t-crtstuff"
851 tm_file=i386/linux-aout.h
852 fixincludes=Makefile.in #On Linux, the headers are ok already.
855 i[[3456]]86-*-linux-gnulibc1)
856 xm_file=i386/xm-linux.h # Intel 80386's running Linux
857 xmake_file=x-linux # with ELF format using the
858 tm_file=i386/linux.h # Linux C library 5
859 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
860 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
861 fixincludes=Makefile.in #On Linux, the headers are ok already.
863 if [[ x$enable_threads = xyes ]]; then
867 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
868 xm_file=i386/xm-linux.h # with ELF format using glibc 2
869 xmake_file=x-linux # aka Linux C library 6
871 tmake_file="t-linux i386/t-crtstuff"
872 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
873 fixincludes=Makefile.in #On Linux, the headers are ok already.
875 if [[ x$enable_threads = xyes ]]; then
881 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
882 xm_file=i386/xm-go32.h
884 tmake_file=i386/t-go32
886 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
889 fixincludes=Makefile.in
893 i[[3456]]86-*-lynxos*)
894 if [[ x$gas = xyes ]]
898 tm_file=i386/lynx-ng.h
900 xm_file=i386/xm-lynx.h
901 tmake_file=i386/t-i386bare
906 # tmake_file=t-libc-ok
909 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
910 if [[ x$elf = xyes ]]
912 tm_file=i386/osfelf.h
915 tm_file=i386/osfrose.h
918 xm_file=i386/xm-osf.h
919 xmake_file=i386/x-osfrose
920 tmake_file=i386/t-osf
923 i[[345]]86-go32-rtems*)
925 xm_file=i386/xm-go32.h
926 tm_file=i386/go32-rtems.h
927 tmake_file="i386/t-go32 t-rtems"
932 tmake_file="i386/t-i386bare t-rtems"
934 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
935 xm_file=i386/xm-sco5.h
936 xmake_file=i386/x-sco5
937 fixincludes=fixinc.sco
939 tmake_file=i386/t-sco5
940 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
942 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
943 xm_file=i386/xm-sco.h
944 xmake_file=i386/x-sco4
945 fixincludes=fixinc.sco
946 install_headers_dir=install-headers-cpio
947 if [[ x$stabs = xyes ]]
949 tm_file=i386/sco4dbx.h
950 tmake_file=i386/t-svr3dbx
951 extra_parts="svr3.ifile svr3z.rfile"
954 tmake_file=i386/t-crtstuff
955 extra_parts="crtbegin.o crtend.o"
959 i[[3456]]86-*-sco*) # 80386 running SCO system
960 xm_file=i386/xm-sco.h
961 xmake_file=i386/x-sco
962 install_headers_dir=install-headers-cpio
963 if [[ x$stabs = xyes ]]
965 tm_file=i386/scodbx.h
966 tmake_file=i386/t-svr3dbx
967 extra_parts="svr3.ifile svr3z.rfile"
970 extra_parts="crtbegin.o crtend.o"
971 tmake_file=i386/t-crtstuff
975 i[[3456]]86-*-solaris2*)
976 xm_file=i386/xm-sysv4.h
977 if [[ x$stabs = xyes ]]
979 tm_file=i386/sol2dbg.h
983 tmake_file=i386/t-sol2
984 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
986 fixincludes=fixinc.svr4
987 if [[ x$enable_threads = xyes ]]; then
988 thread_file='solaris'
991 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
992 xm_file=i386/xm-sysv4.h
994 if [[ x$stabs = xyes ]]
996 tm_file="${tm_file} dbx.h"
998 tmake_file=i386/t-crtpic
1000 extra_parts="crtbegin.o crtend.o"
1002 i[[3456]]86-*-sysv*) # Intel 80386's running system V
1003 xm_file=i386/xm-sysv3.h
1004 xmake_file=i386/x-sysv3
1005 if [[ x$gas = xyes ]]
1007 if [[ x$stabs = xyes ]]
1009 tm_file=i386/svr3dbx.h
1010 tmake_file=i386/t-svr3dbx
1011 extra_parts="svr3.ifile svr3z.rfile"
1013 tm_file=i386/svr3gas.h
1014 extra_parts="crtbegin.o crtend.o"
1015 tmake_file=i386/t-crtstuff
1018 tm_file=i386/sysv3.h
1019 extra_parts="crtbegin.o crtend.o"
1020 tmake_file=i386/t-crtstuff
1023 i386-*-vsta) # Intel 80386's running VSTa kernel
1024 xm_file=i386/xm-vsta.h
1026 tmake_file=i386/t-vsta
1027 xmake_file=i386/x-vsta
1029 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1030 xm_file="${xm_file} i386/xm-cygwin32.h"
1031 tmake_file=i386/t-cygwin32
1032 tm_file=i386/cygwin32.h
1033 xmake_file=i386/x-cygwin32
1035 fixincludes=Makefile.in
1036 if [[ x$enable_threads = xyes ]]; then
1041 i[[3456]]86-*-mingw32)
1042 tm_file=i386/mingw32.h
1043 xm_file="${xm_file} i386/xm-mingw32.h"
1044 tmake_file=i386/t-cygwin32
1046 xmake_file=i386/x-cygwin32
1047 fixincludes=Makefile.in
1048 if [[ x$enable_threads = xyes ]]; then
1053 i[[3456]]86-*-winnt3*)
1054 tm_file=i386/win-nt.h
1055 out_file=i386/i386.c
1056 xm_file=i386/xm-winnt.h
1057 xmake_file=winnt/x-winnt
1058 tmake_file=i386/t-winnt
1059 extra_host_objs="winnt.o oldnames.o"
1060 extra_gcc_objs="spawnv.o oldnames.o"
1061 fixincludes=fixinc.winnt
1062 if [[ x$gnu_ld != xyes ]]
1064 extra_programs=ld.exe
1066 if [[ x$enable_threads = xyes ]]; then
1070 i[[3456]]86-dg-dgux)
1071 xm_file=i386/xm-dgux.h
1072 out_file=i386/dgux.c
1074 tmake_file=i386/t-dgux
1075 xmake_file=i386/x-dgux
1076 fixincludes=fixinc.dgux
1077 install_headers_dir=install-headers-cpio
1079 i860-alliant-*) # Alliant FX/2800
1080 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1081 xm_file="${xm_file} i860/xm-fx2800.h"
1082 xmake_file=i860/x-fx2800
1083 tmake_file=i860/t-fx2800
1084 extra_parts="crtbegin.o crtend.o"
1087 tm_file="${tm_file} i860/bsd.h"
1088 if [[ x$gas = xyes ]]
1090 tm_file="${tm_file} i860/bsd-gas.h"
1095 tm_file="${tm_file} i860/mach.h"
1096 tmake_file=t-libc-ok
1098 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1099 tm_file="${tm_file} svr3.h i860/paragon.h"
1100 xm_file="${xm_file} xm-svr3.h"
1104 tm_file="${tm_file} svr3.h i860/sysv3.h"
1105 xm_file="${tm_file} xm-svr3.h"
1106 xmake_file=i860/x-sysv3
1107 extra_parts="crtbegin.o crtend.o"
1110 tm_file="${tm_file} svr4.h i860/sysv4.h"
1111 xm_file="${xm_file} xm-svr3.h"
1112 xmake_file=i860/x-sysv4
1114 extra_parts="crtbegin.o crtend.o"
1116 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1117 tm_file="${tm_file} i960/vx960.h"
1118 tmake_file=i960/t-vxworks960
1122 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1123 tmake_file=i960/t-vxworks960
1127 tm_file="${tm_file} i960/vx960.h"
1128 tmake_file=i960/t-vxworks960
1132 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1133 tmake_file=i960/t-960bare
1137 tmake_file="i960/t-960bare t-rtems"
1138 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1141 i960-*-*) # Default i960 environment.
1145 extra_parts="crtinit.o crtfini.o"
1147 m68000-convergent-sysv*)
1149 xm_file=m68k/xm-3b1.h
1151 extra_headers=math-68881.h
1153 m68000-hp-bsd*) # HP 9000/200 running BSD
1154 tm_file=m68k/hp2bsd.h
1155 xmake_file=m68k/x-hp2bsd
1157 extra_headers=math-68881.h
1159 m68000-hp-hpux*) # HP 9000 series 300
1160 xm_file=m68k/xm-hp320.h
1161 if [[ x$gas = xyes ]]
1163 xmake_file=m68k/x-hp320g
1164 tm_file=m68k/hp310g.h
1166 xmake_file=m68k/x-hp320
1167 tm_file=m68k/hp310.h
1169 install_headers_dir=install-headers-cpio
1171 extra_headers=math-68881.h
1176 extra_headers=math-68881.h
1179 tm_file=m68k/sun2o4.h
1181 extra_headers=math-68881.h
1184 xm_file=m68k/xm-3b1.h
1185 if [[ x$gas = xyes ]]
1192 extra_headers=math-68881.h
1194 m68k-apple-aux*) # Apple Macintosh running A/UX
1195 xm_file=m68k/xm-aux.h
1196 tmake_file=m68k/t-aux
1197 install_headers_dir=install-headers-cpio
1198 extra_headers=math-68881.h
1199 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1201 if [[ "$gnu_ld" = yes ]]
1203 tm_file="${tm_file} m68k/auxgld.h"
1205 tm_file="${tm_file} m68k/auxld.h"
1207 if [[ "$gas" = yes ]]
1209 tm_file="${tm_file} m68k/auxgas.h"
1211 tm_file="${tm_file} m68k/auxas.h"
1213 tm_file="${tm_file} m68k/a-ux.h"
1216 tm_file=m68k/apollo68.h
1217 xmake_file=m68k/x-apollo68
1219 extra_headers=math-68881.h
1221 m68k-altos-sysv*) # Altos 3068
1222 if [[ x$gas = xyes ]]
1224 tm_file=m68k/altos3068.h
1225 xm_file=m68k/xm-altos3068.h
1227 echo "The Altos is supported only with the GNU assembler" 1>&2
1230 extra_headers=math-68881.h
1232 m68k-bull-sysv*) # Bull DPX/2
1233 if [[ x$gas = xyes ]]
1235 if [[ x$stabs = xyes ]]
1237 tm_file=m68k/dpx2cdbx.h
1239 tm_file=m68k/dpx2g.h
1244 xm_file=m68k/xm-m68kv.h
1245 xmake_file=m68k/x-dpx2
1247 extra_headers=math-68881.h
1249 m68k-atari-sysv4*) # Atari variant of V.4.
1250 tm_file=m68k/atari.h
1251 xm_file=m68k/xm-atari.h
1253 extra_parts="crtbegin.o crtend.o"
1254 extra_headers=math-68881.h
1256 m68k-motorola-sysv*)
1257 tm_file=m68k/mot3300.h
1258 xm_file=m68k/xm-mot3300.h
1259 if [[ x$gas = xyes ]]
1261 xmake_file=m68k/x-mot3300-gas
1262 if [[ x$gnu_ld = xyes ]]
1264 tmake_file=m68k/t-mot3300-gald
1266 tmake_file=m68k/t-mot3300-gas
1270 xmake_file=m68k/x-mot3300
1271 if [[ x$gnu_ld = xyes ]]
1273 tmake_file=m68k/t-mot3300-gld
1275 tmake_file=m68k/t-mot3300
1279 gdb_needs_out_file_path=yes
1280 extra_parts="crt0.o mcrt0.o"
1281 extra_headers=math-68881.h
1283 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1284 tm_file=m68k/tower-as.h
1285 xm_file=m68k/xm-tower.h
1286 xmake_file=m68k/x-tower
1287 extra_parts="crtbegin.o crtend.o"
1288 extra_headers=math-68881.h
1291 tm_file=m68k/plexus.h
1292 xm_file=m68k/xm-plexus.h
1294 extra_headers=math-68881.h
1298 xm_file=m68k/xm-m68kv.h
1299 extra_headers=math-68881.h
1302 xm_file=m68k/xm-crds.h
1303 xmake_file=m68k/x-crds
1306 extra_headers=math-68881.h
1308 m68k-cbm-sysv4*) # Commodore variant of V.4.
1310 xm_file=m68k/xm-amix.h
1311 xmake_file=m68k/x-amix
1313 extra_parts="crtbegin.o crtend.o"
1314 extra_headers=math-68881.h
1317 tm_file=m68k/ccur-GAS.h
1318 xmake_file=m68k/x-ccur
1319 extra_headers=math-68881.h
1322 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1323 tm_file=m68k/hp3bsd44.h
1324 xmake_file=m68k/x-hp3bsd44
1326 extra_headers=math-68881.h
1328 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1329 tm_file=m68k/hp3bsd.h
1331 extra_headers=math-68881.h
1334 if [[ x$with_fp = xno ]]
1336 tm_file=m68k/isi-nfp.h
1341 extra_headers=math-68881.h
1343 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1344 xm_file=m68k/xm-hp320.h
1345 if [[ x$gas = xyes ]]
1347 xmake_file=m68k/x-hp320g
1348 tm_file=m68k/hp320g.h
1350 xmake_file=m68k/x-hp320
1351 tm_file=m68k/hpux7.h
1353 install_headers_dir=install-headers-cpio
1355 extra_headers=math-68881.h
1357 m68k-hp-hpux*) # HP 9000 series 300
1358 xm_file=m68k/xm-hp320.h
1359 if [[ x$gas = xyes ]]
1361 xmake_file=m68k/x-hp320g
1362 tm_file=m68k/hp320g.h
1364 xmake_file=m68k/x-hp320
1365 tm_file=m68k/hp320.h
1367 install_headers_dir=install-headers-cpio
1369 extra_headers=math-68881.h
1372 tm_file=m68k/sun3mach.h
1374 extra_headers=math-68881.h
1377 if [[ x$gas = xyes ]]
1379 tm_file=m68k/news3gas.h
1381 tm_file=m68k/news3.h
1384 extra_headers=math-68881.h
1386 m68k-sony-bsd* | m68k-sony-newsos*)
1387 if [[ x$gas = xyes ]]
1389 tm_file=m68k/newsgas.h
1394 extra_headers=math-68881.h
1396 m68k-next-nextstep2*)
1397 tm_file=m68k/next21.h
1398 xm_file=m68k/xm-next.h
1399 tmake_file=m68k/t-next
1400 xmake_file=m68k/x-next
1401 extra_objs=nextstep.o
1402 extra_headers=math-68881.h
1405 m68k-next-nextstep3*)
1407 xm_file=m68k/xm-next.h
1408 tmake_file=m68k/t-next
1409 xmake_file=m68k/x-next
1410 extra_objs=nextstep.o
1411 extra_headers=math-68881.h
1412 if [[ x$enable_threads = xyes ]]; then
1417 if [[ x$with_fp = xno ]]
1419 tm_file=m68k/sun3n3.h
1421 tm_file=m68k/sun3o3.h
1424 extra_headers=math-68881.h
1426 m68k-sun-sunos*) # For SunOS 4 (the default).
1427 if [[ x$with_fp = xno ]]
1429 tm_file=m68k/sun3n.h
1433 xm_file=m68k/xm-sun3.h
1435 extra_headers=math-68881.h
1438 tm_file=m68k/vxm68k.h
1439 tmake_file=m68k/t-vxworks68
1440 extra_headers=math-68881.h
1443 tmake_file=m68k/t-m68kbare
1444 tm_file="m68k/m68k-aout.h libgloss.h"
1445 extra_headers=math-68881.h
1448 tmake_file=m68k/t-m68kbare
1449 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1450 extra_headers=math-68881.h
1453 if [[ x$gas = xyes ]]
1457 tm_file=m68k/lynx-ng.h
1459 xm_file=m68k/xm-lynx.h
1461 tmake_file=m68k/t-lynx
1462 extra_headers=math-68881.h
1465 tm_file=m68k/netbsd.h
1466 xm_file=m68k/xm-netbsd.h
1467 # On NetBSD, the headers are already okay, except for math.h.
1468 fixincludes=fixinc.math
1471 m68k-*-sysv3*) # Motorola m68k's running system V.3
1472 xm_file=m68k/xm-m68kv.h
1473 xmake_file=m68k/x-m68kv
1474 extra_parts="crtbegin.o crtend.o"
1475 extra_headers=math-68881.h
1477 m68k-*-sysv4*) # Motorola m68k's running system V.4
1478 tm_file=m68k/m68kv4.h
1479 xm_file=m68k/xm-m68kv.h
1481 extra_parts="crtbegin.o crtend.o"
1482 extra_headers=math-68881.h
1484 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1485 xm_file=m68k/xm-linux.h # with a.out format
1487 tm_file=m68k/linux-aout.h
1488 tmake_file="t-linux-aout m68k/t-linux-aout"
1489 fixincludes=Makefile.in #On Linux, the headers are ok already.
1490 extra_headers=math-68881.h
1493 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1494 xm_file=m68k/xm-linux.h # with ELF format using the
1495 xmake_file=x-linux # Linux C library 5
1496 tm_file=m68k/linux.h
1497 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1498 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1499 fixincludes=Makefile.in #On Linux, the headers are ok already.
1500 extra_headers=math-68881.h
1503 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1504 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1505 xmake_file=x-linux # aka the Linux C library 6.
1506 tm_file=m68k/linux.h
1507 tmake_file="t-linux m68k/t-linux"
1508 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1509 fixincludes=Makefile.in #On Linux, the headers are ok already.
1510 extra_headers=math-68881.h
1512 if [[ x$enable_threads = xyes ]]; then
1517 tmake_file=m68k/t-m68kbare
1518 tm_file=m68k/m68k-psos.h
1519 extra_headers=math-68881.h
1522 tmake_file="m68k/t-m68kbare t-rtems"
1523 tm_file=m68k/rtems.h
1524 extra_headers=math-68881.h
1530 tm_file=m88k/dguxbcs.h
1531 tmake_file=m88k/t-dguxbcs
1535 tmake_file=m88k/t-dgux
1538 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1539 xmake_file=m88k/x-dgux
1540 if [[ x$gas = xyes ]]
1542 tmake_file=m88k/t-dgux-gas
1544 fixincludes=fixinc.dgux
1546 m88k-dolphin-sysv3*)
1547 tm_file=m88k/dolph.h
1548 extra_parts="crtbegin.o crtend.o"
1549 xm_file=m88k/xm-sysv3.h
1550 xmake_file=m88k/x-dolph
1551 if [[ x$gas = xyes ]]
1553 tmake_file=m88k/t-m88k-gas
1556 m88k-tektronix-sysv3)
1557 tm_file=m88k/tekXD88.h
1558 extra_parts="crtbegin.o crtend.o"
1559 xm_file=m88k/xm-sysv3.h
1560 xmake_file=m88k/x-tekXD88
1561 if [[ x$gas = xyes ]]
1563 tmake_file=m88k/t-m88k-gas
1567 tm_file=m88k/m88k-aout.h
1570 tm_file=m88k/m88k-coff.h
1571 tmake_file=m88k/t-bug
1575 extra_parts="crtbegin.o crtend.o"
1576 if [[ x$gas = xyes ]]
1578 tmake_file=m88k/t-luna-gas
1580 tmake_file=m88k/t-luna
1584 tm_file=m88k/sysv3.h
1585 extra_parts="crtbegin.o crtend.o"
1586 xm_file=m88k/xm-sysv3.h
1587 xmake_file=m88k/x-sysv3
1588 if [[ x$gas = xyes ]]
1590 tmake_file=m88k/t-m88k-gas
1594 tm_file=m88k/sysv4.h
1595 extra_parts="crtbegin.o crtend.o"
1596 xmake_file=m88k/x-sysv4
1597 tmake_file=m88k/t-sysv4
1599 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1600 tm_file=mips/iris6.h
1601 xm_file=mips/xm-iris6.h
1602 fixincludes=fixinc.irix
1603 xmake_file=mips/x-iris6
1604 tmake_file=mips/t-iris6
1605 if [[ x$enable_threads = xyes ]]; then
1609 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1610 tm_file=mips/cross64.h
1611 xm_file=mips/xm-iris5.h
1612 fixincludes=Makefile.in
1613 xmake_file=mips/x-iris
1614 tmake_file=mips/t-cross64
1615 # See comment in mips/iris[56].h files.
1617 if [[ x$enable_threads = xyes ]]; then
1622 if [[ x$gas = xyes ]]
1624 if [[ x$stabs = xyes ]]
1626 tm_file=mips/iris5gdb.h
1628 tm_file=mips/sni-gas.h
1631 tm_file=mips/sni-svr4.h
1633 xm_file=mips/xm-sysv.h
1634 xmake_file=mips/x-sni-svr4
1635 tmake_file=mips/t-mips-gas
1636 if [[ x$gnu_ld != xyes ]]
1641 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1642 if [[ x$gas = xyes ]]
1644 tm_file=mips/iris5gas.h
1645 if [[ x$stabs = xyes ]]
1647 tm_file="${tm_file} dbx.h"
1650 tm_file=mips/iris5.h
1652 xm_file=mips/xm-iris5.h
1653 fixincludes=fixinc.irix
1654 xmake_file=mips/x-iris
1655 # mips-tfile doesn't work yet
1656 tmake_file=mips/t-mips-gas
1657 # See comment in mips/iris5.h file.
1659 if [[ x$enable_threads = xyes ]]; then
1663 mips-sgi-irix4loser*) # Mostly like a MIPS.
1664 tm_file=mips/iris4loser.h
1665 if [[ x$stabs = xyes ]]; then
1666 tm_file="${tm_file} dbx.h"
1668 xm_file=mips/xm-iris4.h
1669 xmake_file=mips/x-iris
1670 if [[ x$gas = xyes ]]
1672 tmake_file=mips/t-mips-gas
1674 extra_passes="mips-tfile mips-tdump"
1676 if [[ x$gnu_ld != xyes ]]
1680 if [[ x$enable_threads = xyes ]]; then
1684 mips-sgi-irix4*) # Mostly like a MIPS.
1685 tm_file=mips/iris4.h
1686 if [[ x$stabs = xyes ]]; then
1687 tm_file="${tm_file} dbx.h"
1689 xm_file=mips/xm-iris4.h
1690 xmake_file=mips/x-iris
1691 if [[ x$gas = xyes ]]
1693 tmake_file=mips/t-mips-gas
1695 extra_passes="mips-tfile mips-tdump"
1697 if [[ x$gnu_ld != xyes ]]
1701 if [[ x$enable_threads = xyes ]]; then
1705 mips-sgi-*) # Mostly like a MIPS.
1706 tm_file=mips/iris3.h
1707 if [[ x$stabs = xyes ]]; then
1708 tm_file="${tm_file} dbx.h"
1710 xm_file=mips/xm-iris3.h
1711 xmake_file=mips/x-iris3
1712 if [[ x$gas = xyes ]]
1714 tmake_file=mips/t-mips-gas
1716 extra_passes="mips-tfile mips-tdump"
1718 if [[ x$gnu_ld != xyes ]]
1723 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1724 tm_file=mips/osfrose.h
1725 xmake_file=mips/x-osfrose
1726 tmake_file=mips/t-osfrose
1727 extra_objs=halfpic.o
1730 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1731 tm_file=mips/dec-osf1.h
1732 if [[ x$stabs = xyes ]]; then
1733 tm_file="${tm_file} dbx.h"
1735 xmake_file=mips/x-dec-osf1
1736 if [[ x$gas = xyes ]]
1738 tmake_file=mips/t-mips-gas
1740 tmake_file=mips/t-ultrix
1741 extra_passes="mips-tfile mips-tdump"
1743 if [[ x$gnu_ld != xyes ]]
1748 mips-dec-bsd*) # Decstation running 4.4 BSD
1749 tm_file=mips/dec-bsd.h
1751 if [[ x$gas = xyes ]]
1753 tmake_file=mips/t-mips-gas
1755 tmake_file=mips/t-ultrix
1756 extra_passes="mips-tfile mips-tdump"
1758 if [[ x$gnu_ld != xyes ]]
1763 mips-dec-netbsd*) # Decstation running NetBSD
1764 tm_file=mips/netbsd.h
1765 xm_file=mips/xm-netbsd.h
1766 # On NetBSD, the headers are already okay, except for math.h.
1767 fixincludes=fixinc.math
1770 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1771 tm_file=mips/news4.h
1772 if [[ x$stabs = xyes ]]; then
1773 tm_file="${tm_file} dbx.h"
1775 if [[ x$gas = xyes ]]
1777 tmake_file=mips/t-mips-gas
1779 extra_passes="mips-tfile mips-tdump"
1781 if [[ x$gnu_ld != xyes ]]
1785 xmake_file=mips/x-sony
1787 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1788 # That is based on svr4.
1789 # t-svr4 is not right because this system doesn't use ELF.
1790 tm_file=mips/news5.h
1791 if [[ x$stabs = xyes ]]; then
1792 tm_file="${tm_file} dbx.h"
1794 xm_file=mips/xm-news.h
1795 if [[ x$gas = xyes ]]
1797 tmake_file=mips/t-mips-gas
1799 extra_passes="mips-tfile mips-tdump"
1801 if [[ x$gnu_ld != xyes ]]
1806 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1807 tm_file=mips/svr4-t.h
1808 if [[ x$stabs = xyes ]]; then
1809 tm_file="${tm_file} dbx.h"
1811 xm_file=mips/xm-sysv4.h
1812 xmake_file=mips/x-sysv
1813 if [[ x$gas = xyes ]]
1815 tmake_file=mips/t-mips-gas
1816 extra_parts="crtbegin.o crtend.o"
1818 tmake_file=mips/t-mips
1819 extra_passes="mips-tfile mips-tdump"
1821 if [[ x$gnu_ld != xyes ]]
1826 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1827 tm_file=mips/ultrix.h
1828 if [[ x$stabs = xyes ]]; then
1829 tm_file="${tm_file} dbx.h"
1831 xmake_file=mips/x-ultrix
1832 if [[ x$gas = xyes ]]
1834 tmake_file=mips/t-mips-gas
1836 tmake_file=mips/t-ultrix
1837 extra_passes="mips-tfile mips-tdump"
1839 if [[ x$gnu_ld != xyes ]]
1844 mips-*-riscos[[56789]]bsd*)
1845 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1846 if [[ x$stabs = xyes ]]; then
1847 tm_file="${tm_file} dbx.h"
1849 if [[ x$gas = xyes ]]
1851 tmake_file=mips/t-bsd-gas
1853 tmake_file=mips/t-bsd
1854 extra_passes="mips-tfile mips-tdump"
1856 if [[ x$gnu_ld != xyes ]]
1861 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1862 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1863 if [[ x$stabs = xyes ]]; then
1864 tm_file="${tm_file} dbx.h"
1866 if [[ x$gas = xyes ]]
1868 tmake_file=mips/t-bsd-gas
1870 tmake_file=mips/t-bsd
1871 extra_passes="mips-tfile mips-tdump"
1873 if [[ x$gnu_ld != xyes ]]
1878 mips-*-riscos[[56789]]sysv4*)
1879 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1880 if [[ x$stabs = xyes ]]; then
1881 tm_file="${tm_file} dbx.h"
1883 xm_file=mips/xm-sysv4.h
1884 xmake_file=mips/x-sysv
1885 if [[ x$gas = xyes ]]
1887 tmake_file=mips/t-svr4-gas
1889 tmake_file=mips/t-svr4
1890 extra_passes="mips-tfile mips-tdump"
1892 if [[ x$gnu_ld != xyes ]]
1897 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1898 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1899 if [[ x$stabs = xyes ]]; then
1900 tm_file="${tm_file} dbx.h"
1902 xm_file=mips/xm-sysv.h
1903 xmake_file=mips/x-sysv
1904 if [[ x$gas = xyes ]]
1906 tmake_file=mips/t-svr4-gas
1908 tmake_file=mips/t-svr4
1909 extra_passes="mips-tfile mips-tdump"
1911 if [[ x$gnu_ld != xyes ]]
1916 mips-*-riscos[[56789]]sysv*)
1917 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1918 if [[ x$stabs = xyes ]]; then
1919 tm_file="${tm_file} dbx.h"
1921 xm_file=mips/xm-sysv.h
1922 xmake_file=mips/x-sysv
1923 if [[ x$gas = xyes ]]
1925 tmake_file=mips/t-svr3-gas
1927 tmake_file=mips/t-svr3
1928 extra_passes="mips-tfile mips-tdump"
1930 if [[ x$gnu_ld != xyes ]]
1935 mips-*-sysv* | mips-*-riscos*sysv*)
1936 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1937 if [[ x$stabs = xyes ]]; then
1938 tm_file="${tm_file} dbx.h"
1940 xm_file=mips/xm-sysv.h
1941 xmake_file=mips/x-sysv
1942 if [[ x$gas = xyes ]]
1944 tmake_file=mips/t-svr3-gas
1946 tmake_file=mips/t-svr3
1947 extra_passes="mips-tfile mips-tdump"
1949 if [[ x$gnu_ld != xyes ]]
1954 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1955 tm_file=mips/mips-5.h
1956 if [[ x$stabs = xyes ]]; then
1957 tm_file="${tm_file} dbx.h"
1959 if [[ x$gas = xyes ]]
1961 tmake_file=mips/t-mips-gas
1963 extra_passes="mips-tfile mips-tdump"
1965 if [[ x$gnu_ld != xyes ]]
1973 tm_file=mips/ecoffl.h
1974 if [[ x$stabs = xyes ]]; then
1975 tm_file="${tm_file} dbx.h"
1977 tmake_file=mips/t-ecoff
1980 tm_file=mips/ecoff.h
1981 if [[ x$stabs = xyes ]]; then
1982 tm_file="${tm_file} dbx.h"
1984 tmake_file=mips/t-ecoff
1987 tm_file="mips/elfl.h libgloss.h"
1988 tmake_file=mips/t-ecoff
1991 tm_file="mips/elf.h libgloss.h"
1992 tmake_file=mips/t-ecoff
1995 tm_file="mips/elfl64.h libgloss.h"
1996 tmake_file=mips/t-ecoff
1998 mips64orionel-*-elf*)
1999 tm_file="mips/elflorion.h libgloss.h"
2000 tmake_file=mips/t-ecoff
2003 tm_file="mips/elf64.h libgloss.h"
2004 tmake_file=mips/t-ecoff
2007 tm_file="mips/elforion.h libgloss.h"
2008 tmake_file=mips/t-ecoff
2010 mips64orion-*-rtems*)
2011 tm_file=mips/rtems64.h
2012 tmake_file="mips/t-ecoff t-rtems"
2014 mips-*-*) # Default MIPS RISC-OS 4.0.
2015 if [[ x$stabs = xyes ]]; then
2016 tm_file="${tm_file} dbx.h"
2018 if [[ x$gas = xyes ]]
2020 tmake_file=mips/t-mips-gas
2022 extra_passes="mips-tfile mips-tdump"
2024 if [[ x$gnu_ld != xyes ]]
2031 tm_file="mn10200/mn10200.h"
2032 if [[ x$stabs = xyes ]]
2034 tm_file="${tm_file} dbx.h"
2040 tm_file="mn10300/mn10300.h"
2041 if [[ x$stabs = xyes ]]
2043 tm_file="${tm_file} dbx.h"
2048 tm_file=ns32k/encore.h
2052 tm_file=ns32k/sequent.h
2056 tm_file=ns32k/tek6100.h
2060 tm_file=ns32k/tek6200.h
2063 # This has not been updated to GCC 2.
2065 # xm_file=ns32k/xm-genix.h
2066 # xmake_file=ns32k/x-genix
2067 # tm_file=ns32k/genix.h
2071 tm_file=ns32k/merlin.h
2075 tm_file=ns32k/pc532-mach.h
2079 tm_file=ns32k/pc532-min.h
2080 xm_file=ns32k/xm-pc532-min.h
2083 ns32k-pc532-netbsd*)
2084 tm_file=ns32k/netbsd.h
2085 xm_file=ns32k/xm-netbsd.h
2086 # On NetBSD, the headers are already okay, except for math.h.
2087 fixincludes=fixinc.math
2091 tm_file="${tm_file} pdp11/2bsd.h"
2097 xmake_file=pyr/x-pyr
2104 xmake_file=romp/x-mach
2107 powerpc-*-sysv* | powerpc-*-elf*)
2108 tm_file=rs6000/sysv4.h
2109 xm_file=rs6000/xm-sysv4.h
2110 extra_headers=ppc-asm.h
2111 if [[ x$gas = xyes ]]
2113 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2115 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2117 xmake_file=rs6000/x-sysv4
2120 tm_file=rs6000/eabiaix.h
2121 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2122 fixincludes=Makefile.in
2123 extra_headers=ppc-asm.h
2126 tm_file=rs6000/eabisim.h
2127 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2128 fixincludes=Makefile.in
2129 extra_headers=ppc-asm.h
2132 tm_file=rs6000/eabi.h
2133 if [[ x$gas = xyes ]]
2135 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2137 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2139 fixincludes=Makefile.in
2140 extra_headers=ppc-asm.h
2143 tm_file=rs6000/rtems.h
2144 if [[ x$gas = xyes ]]
2146 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2148 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2150 fixincludes=Makefile.in
2151 extra_headers=ppc-asm.h
2153 powerpc-*-linux-gnu*)
2154 tm_file=rs6000/linux.h
2155 xm_file=rs6000/xm-sysv4.h
2156 out_file=rs6000/rs6000.c
2157 if [[ x$gas = xyes ]]
2159 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2161 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2164 fixincludes=Makefile.in
2165 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2166 extra_headers=ppc-asm.h
2167 if [[ x$enable_threads = xyes ]]; then
2173 xm_file=rs6000/xm-sysv4.h
2174 tm_file=rs6000/vxppc.h
2175 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2176 extra_headers=ppc-asm.h
2178 powerpcle-*-sysv* | powerpcle-*-elf*)
2179 tm_file=rs6000/sysv4le.h
2180 xm_file=rs6000/xm-sysv4.h
2181 if [[ x$gas = xyes ]]
2183 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2185 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2187 xmake_file=rs6000/x-sysv4
2188 extra_headers=ppc-asm.h
2190 powerpcle-*-eabisim*)
2191 tm_file=rs6000/eabilesim.h
2192 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2193 fixincludes=Makefile.in
2194 extra_headers=ppc-asm.h
2197 tm_file=rs6000/eabile.h
2198 if [[ x$gas = xyes ]]
2200 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2202 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2204 fixincludes=Makefile.in
2205 extra_headers=ppc-asm.h
2207 powerpcle-*-winnt* )
2208 tm_file=rs6000/win-nt.h
2209 tmake_file=rs6000/t-winnt
2211 fixincludes=Makefile.in
2212 if [[ x$enable_threads = xyes ]]; then
2215 extra_headers=ppc-asm.h
2217 powerpcle-*-pe | powerpcle-*-cygwin32)
2218 tm_file=rs6000/cygwin32.h
2219 xm_file=rs6000/xm-cygwin32.h
2220 tmake_file=rs6000/t-winnt
2221 xmake_file=rs6000/x-cygwin32
2223 fixincludes=Makefile.in
2224 if [[ x$enable_threads = xyes ]]; then
2228 extra_headers=ppc-asm.h
2230 powerpcle-*-solaris2*)
2231 tm_file=rs6000/sol2.h
2232 xm_file=rs6000/xm-sysv4.h
2233 if [[ x$gas = xyes ]]
2235 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2237 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2239 xmake_file=rs6000/x-sysv4
2240 fixincludes=fixinc.svr4
2241 extra_headers=ppc-asm.h
2243 rs6000-ibm-aix3.[[01]]*)
2244 tm_file=rs6000/aix31.h
2245 xmake_file=rs6000/x-aix31
2248 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2249 tm_file=rs6000/aix3newas.h
2250 if [[ x$host != x$target ]]
2252 tmake_file=rs6000/t-xnewas
2254 tmake_file=rs6000/t-newas
2258 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2259 tm_file=rs6000/aix41.h
2260 if [[ x$host != x$target ]]
2262 tmake_file=rs6000/t-xnewas
2264 tmake_file=rs6000/t-newas
2266 xmake_file=rs6000/x-aix31
2276 tm_file=rs6000/mach.h
2277 xm_file=rs6000/xm-mach.h
2278 xmake_file=rs6000/x-mach
2282 tm_file=rs6000/lynx.h
2283 xm_file=rs6000/xm-lynx.h
2284 tmake_file=rs6000/t-rs6000
2285 xmake_file=rs6000/x-lynx
2293 tmake_file="sh/t-sh t-rtems"
2302 xm_file=sparc/xm-pbd.h
2304 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2305 tm_file=sparc/vxsparc.h
2306 tmake_file=sparc/t-vxsparc
2310 tmake_file=sparc/t-sparcbare
2311 tm_file="sparc/aout.h libgloss.h"
2314 tm_file=sparc/netbsd.h
2315 xm_file=sparc/xm-netbsd.h
2316 # On NetBSD, the headers are already okay, except for math.h.
2317 fixincludes=fixinc.math
2323 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2324 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2325 tm_file=sparc/linux-aout.h
2327 fixincludes=Makefile.in #On Linux, the headers are ok already.
2330 sparc-*-linux-gnulibc1*) # Sparc's running Linux, libc5
2331 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2333 tm_file=sparc/linux.h
2334 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2335 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2336 fixincludes=Makefile.in #On Linux, the headers are ok already.
2339 sparc-*-linux-gnu*) # Sparc's running Linux, libc6
2340 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2342 tm_file=sparc/linux.h
2343 tmake_file="t-linux sparc/t-linux"
2344 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2345 fixincludes=Makefile.in #On Linux, the headers are ok already.
2347 if [[ x$enable_threads = xyes ]]; then
2352 if [[ x$gas = xyes ]]
2354 tm_file=sparc/lynx.h
2356 tm_file=sparc/lynx-ng.h
2358 xm_file=sparc/xm-lynx.h
2359 tmake_file=sparc/t-sunos41
2363 tmake_file="sparc/t-sparcbare t-rtems"
2364 tm_file=sparc/rtems.h
2367 tm_file=sparc/sol2.h
2368 xm_file=sparc/xm-sol2.h
2369 tmake_file=sparc/t-sol2
2370 xmake_file=sparc/x-sysv4
2371 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2372 fixincludes=fixinc.svr4
2373 if [[ x$enable_threads = xyes ]]; then
2374 thread_file='solaris'
2378 tm_file=sparc/sunos4.h
2379 tmake_file=sparc/t-sunos40
2383 tm_file=sparc/sunos4.h
2384 tmake_file=sparc/t-sunos41
2386 if [[ x$gas = xyes ]]; then
2387 tm_file="${tm_file} sparc/sun4gas.h"
2391 tm_file=sparc/sun4o3.h
2395 tm_file=sparc/sysv4.h
2396 xm_file=sparc/xm-sysv4.h
2398 xmake_file=sparc/x-sysv4
2399 extra_parts="crtbegin.o crtend.o"
2402 xm_file=sparc/xm-sol2.h
2403 tm_file=sparc/vxsim.h
2404 tmake_file=sparc/t-vxsparc
2405 xmake_file=sparc/x-sysv4
2408 tm_file="sparc/splet.h libgloss.h"
2409 tmake_file=sparc/t-splet
2412 tm_file="sparc/litecoff.h libgloss.h"
2413 tmake_file=sparc/t-sparclite
2416 tm_file="sparc/lite.h aoutos.h libgloss.h"
2417 tmake_file=sparc/t-sparclite
2420 tmake_file=sparc/t-sp64
2421 tm_file=sparc/sp64-aout.h
2424 tmake_file=sparc/t-sp64
2425 tm_file=sparc/sp64-elf.h
2426 extra_parts="crtbegin.o crtend.o"
2428 sparc64-*-linux*) # 64-bit Sparc's running Linux
2429 tmake_file=sparc/t-sp64
2430 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2431 tm_file=sparc/linux64.h
2433 fixincludes=Makefile.in # On Linux, the headers are ok already.
2436 # This hasn't been upgraded to GCC 2.
2437 # tahoe-harris-*) # Harris tahoe, using COFF.
2438 # tm_file=tahoe/harris.h
2440 # tahoe-*-bsd*) # tahoe running BSD
2442 # This hasn't been upgraded to GCC 2.
2449 tm_file="v850/v850.h"
2450 xm_file="v850/xm-v850.h"
2451 if [[ x$stabs = xyes ]]
2453 tm_file="${tm_file} dbx.h"
2457 vax-*-bsd*) # vaxen running BSD
2461 vax-*-sysv*) # vaxen running system V
2462 tm_file="${tm_file} vax/vaxv.h"
2463 xm_file="${tm_file} vax/xm-vaxv.h"
2467 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2468 xm_file="${xm_file} xm-netbsd.h"
2469 # On NetBSD, the headers are already okay, except for math.h.
2470 fixincludes=fixinc.math
2474 vax-*-ultrix*) # vaxen running ultrix
2475 tm_file="${tm_file} vax/ultrix.h"
2479 vax-*-vms*) # vaxen running VMS
2480 xm_file=vax/xm-vms.h
2484 vax-*-*) # vax default entry
2488 xm_file="${xm_file} xm-svr3"
2492 echo "Configuration $machine not supported" 1>&2
2499 ;; # Existing Linux/GNU systems do not use the GNU setup.
2501 # On the GNU system, the setup is just about the same on
2502 # each different CPU. The specific machines that GNU
2503 # supports are matched above and just set $cpu_type.
2504 xm_file=${cpu_type}/xm-gnu.h
2505 tm_file=${cpu_type}/gnu.h
2506 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2507 # GNU always uses ELF.
2509 # GNU tools are the only tools.
2512 # On GNU, the headers are already okay.
2513 fixincludes=Makefile.in
2514 xmake_file=x-linux # These details are the same as Linux.
2515 tmake_file=t-gnu # These are not.
2518 fixincludes=fixinc.svr4
2519 xmake_try_sysv=x-sysv
2520 install_headers_dir=install-headers-cpio
2523 install_headers_dir=install-headers-cpio
2527 # Distinguish i[3456]86
2528 # Also, do not run mips-tfile on MIPS if using gas.
2529 # Process --with-cpu= for PowerPC/rs6000
2530 target_cpu_default2=
2533 target_cpu_default2=1
2536 target_cpu_default2=2
2539 target_cpu_default2=3
2544 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2547 target_cpu_default2="MASK_CPU_EV5"
2551 if [[ x$gas = xyes ]]
2553 if [[ x$target_cpu_default2 = x ]]
2555 target_cpu_default2="MASK_GAS"
2557 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2561 mips*-*-ecoff* | mips*-*-elf*)
2562 if [[ x$gas = xyes ]]
2564 if [[ x$gnu_ld = xyes ]]
2566 target_cpu_default2=20
2568 target_cpu_default2=16
2573 if [[ x$gas = xyes ]]
2575 target_cpu_default2=16
2578 powerpc*-*-* | rs6000-*-*)
2579 case "x$with_cpu" in
2583 xcommon | xpower | xpower2 | xpowerpc | xrios \
2584 | xrios1 | xrios2 | xrsc | xrsc1 \
2585 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2586 | x403 | x505 | x801 | x821 | x823 | x860)
2587 target_cpu_default2="\"$with_cpu\""
2591 echo "--with-cpu must be passed a value" 1>&2
2596 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2602 case ".$with_cpu" in
2604 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2606 .supersparc | .ultrasparc | .v7 | .v8)
2607 target_cpu_default2="TARGET_CPU_$with_cpu"
2610 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2617 if [[ x$target_cpu_default2 != x ]]
2619 if [[ x$target_cpu_default != x ]]
2621 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2623 target_cpu_default=$target_cpu_default2
2627 # No need for collect2 if we have the GNU linker.
2634 # Save data on machine being used to compile GCC in build_xm_file.
2635 # Save data on host machine in vars host_xm_file and host_xmake_file.
2636 if [[ x$pass1done = x ]]
2638 if [[ x"$xm_file" = x ]]
2639 then build_xm_file=$cpu_type/xm-$cpu_type.h
2640 else build_xm_file=$xm_file
2642 build_install_headers_dir=$install_headers_dir
2643 build_exeext=$exeext
2646 if [[ x$pass2done = x ]]
2648 if [[ x"$xm_file" = x ]]
2649 then host_xm_file=$cpu_type/xm-$cpu_type.h
2650 else host_xm_file=$xm_file
2652 if [[ x"$xmake_file" = x ]]
2653 then xmake_file=$cpu_type/x-$cpu_type
2655 host_xmake_file="$xmake_file"
2656 host_truncate_target=$truncate_target
2657 host_extra_gcc_objs=$extra_gcc_objs
2658 host_extra_objs=$extra_host_objs
2664 extra_objs="${host_extra_objs} ${extra_objs}"
2666 # Default the target-machine variables that were not explicitly set.
2667 if [[ x"$tm_file" = x ]]
2668 then tm_file=$cpu_type/$cpu_type.h; fi
2670 if [[ x$extra_headers = x ]]
2671 then extra_headers=; fi
2673 if [[ x"$xm_file" = x ]]
2674 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2676 md_file=$cpu_type/$cpu_type.md
2678 if [[ x$out_file = x ]]
2679 then out_file=$cpu_type/$cpu_type.c; fi
2681 if [[ x"$tmake_file" = x ]]
2682 then tmake_file=$cpu_type/t-$cpu_type
2685 if [[ x$float_format = x ]]
2686 then float_format=i64
2689 # Say what files are being used for the output code and MD file.
2690 echo "Using \`$srcdir/config/$out_file' to output insns."
2691 echo "Using \`$srcdir/config/$md_file' as machine description file."
2694 for f in $tm_file; do
2697 if [[ $count = ax ]]; then
2698 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2700 echo "Using the following target machine macro files:"
2701 for f in $tm_file; do
2702 echo " $srcdir/config/$f"
2707 for f in $host_xm_file; do
2710 if [[ $count = ax ]]; then
2711 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2713 echo "Using the following host machine macro files:"
2714 for f in $host_xm_file; do
2715 echo " $srcdir/config/$f"
2719 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2721 for f in $build_xm_file; do
2724 if [[ $count = ax ]]; then
2725 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2727 echo "Using the following build machine macro files:"
2728 for f in $build_xm_file; do
2729 echo " $srcdir/config/$f"
2734 if [[ x$thread_file = x ]]
2735 then thread_file='single'
2738 # Set up the header files.
2739 # $links is the list of header files to create.
2740 # $vars is the list of shell variables with file names to include.
2741 # config2.h is the old config.h. It is included by the new config.h which
2742 # created from config.in. The goal is to simplify the transition to autoconf.
2743 vars="host_xm_file tm_file xm_file build_xm_file"
2744 links="config2.h tm.h tconfig.h hconfig.h"
2747 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2750 while [[ -n "$vars" ]]
2752 # set file to car of files, files to cdr of files
2753 set $vars; var=$1; shift; vars=$*
2754 set $links; link=$1; shift; links=$*
2758 # Define TARGET_CPU_DEFAULT if the system wants one.
2759 # This substitutes for lots of *.h files.
2760 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2762 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2765 for file in `eval echo '$'$var`; do
2766 echo "#include \"$file\"" >>$link
2770 # Truncate the target if necessary
2771 if [[ x$host_truncate_target != x ]]; then
2772 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2775 # Get the version number from the toplevel
2776 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2778 # Get an absolute path to the GCC top-level source directory
2784 # Conditionalize the makefile for this host machine.
2785 # Make-host contains the concatenation of all host makefile fragments
2786 # [there can be more than one]. This file is built by configure.frag.
2787 host_overrides=Make-host
2788 dep_host_xmake_file=
2789 for f in .. ${host_xmake_file}
2791 if [[ -f ${srcdir}/config/$f ]]
2793 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2797 # Conditionalize the makefile for this target machine.
2798 # Make-target contains the concatenation of all host makefile fragments
2799 # [there can be more than one]. This file is built by configure.frag.
2800 target_overrides=Make-target
2802 for f in .. ${tmake_file}
2804 if [[ -f ${srcdir}/config/$f ]]
2806 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2810 # If the host doesn't support symlinks, modify CC in
2811 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2812 # Otherwise, we can use "CC=$(CC)".
2814 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2816 cc_set_by_configure="\$(CC)"
2817 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2819 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2820 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2824 out_object_file=`basename $out_file .c`.o
2827 for f in $tm_file; do
2828 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2832 for f in $host_xm_file; do
2833 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2837 for f in $build_xm_file; do
2838 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2841 # Define macro CROSS_COMPILE in compilation
2842 # if this is a cross-compiler.
2843 # Also use all.cross instead of all.internal
2844 # and add cross-make to Makefile.
2845 cross_overrides="/dev/null"
2846 if [[ x$host != x$target ]]
2848 cross_defines="CROSS=-DCROSS_COMPILE"
2849 cross_overrides="${topdir}/cross-make"
2852 # When building gcc with a cross-compiler, we need to fix a few things.
2853 # This must come after cross-make as we want all.build to override
2855 build_overrides="/dev/null"
2856 if [[ x$build != x$host ]]
2858 build_overrides="${topdir}/build-make"
2861 # Expand extra_headers to include complete path.
2862 # This substitutes for lots of t-* files.
2864 if [[ "x$extra_headers" = x ]]
2867 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2868 for file in $extra_headers;
2870 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2874 # Add a definition of USE_COLLECT2 if system wants one.
2875 # Also tell toplev.c what to do.
2876 # This substitutes for lots of t-* files.
2877 if [[ x$use_collect2 = x ]]
2882 will_use_collect2="ld"
2883 maybe_use_collect2="-DUSE_COLLECT2"
2887 # Set MD_DEPS if the real md file is in md.pre-cpp.
2888 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2889 # for line oriented comments, so we must always use a GNU cpp. If
2890 # building gcc with a cross compiler, use the cross compiler just
2891 # built. Otherwise, we can use the cpp just built.
2893 if [[ "x$md_cppflags" = x ]]
2895 md_file_sub=$srcdir/config/$md_file
2900 # If we have gas in the build tree, make a link to it.
2901 if [[ -f ../gas/Makefile ]]; then
2902 rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null
2905 # If we have ld in the build tree, make a link to it.
2906 if [[ -f ../ld/Makefile ]]; then
2907 # if [[ x$use_collect2 = x ]]; then
2908 # rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null
2910 rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null
2914 # Figure out what language subdirectories are present.
2916 for lang in ${srcdir}/*/config-lang.in ..
2920 # The odd quoting in the next line works around
2921 # an apparent bug in bash 1.12 on linux.
2922 ${srcdir}/[[*]]/config-lang.in) ;;
2923 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2927 # Make empty files to contain the specs and options for each language.
2928 # Then add #include lines to for a compiler that has specs and/or options.
2932 rm -f specs.h options.h
2933 touch specs.h options.h
2934 for subdir in . $subdirs
2936 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2937 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2938 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2940 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2941 echo "#include \"$subdir/lang-options.h\"" >>options.h
2942 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2946 # These (without "all_") are set in each config-lang.in.
2947 # `language' must be a single word so is spelled singularly.
2953 all_outputs=Makefile
2954 # List of language makefile fragments.
2959 # Add the language fragments.
2960 # Languages are added via two mechanisms. Some information must be
2961 # recorded in makefile variables, these are defined in config-lang.in.
2962 # We accumulate them and plug them into the main Makefile.
2963 # The other mechanism is a set of hooks for each of the main targets
2964 # like `clean', `install', etc.
2966 language_fragments="Make-lang"
2967 language_hooks="Make-hooks"
2970 for s in .. $subdirs
2982 . ${srcdir}/$s/config-lang.in
2983 if [[ "x$language" = x ]]
2985 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2988 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2989 all_languages="$all_languages $language"
2990 if [[ "x$boot_language" = xyes ]]
2992 all_boot_languages="$all_boot_languages $language"
2994 all_compilers="$all_compilers $compilers"
2995 all_stagestuff="$all_stagestuff $stagestuff"
2996 all_diff_excludes="$all_diff_excludes $diff_excludes"
2997 all_headers="$all_headers $headers"
2998 all_outputs="$all_outputs $outputs"
2999 if [[ x$outputs = x ]]
3001 oldstyle_subdirs="$oldstyle_subdirs $s"
3003 all_lib2funcs="$all_lib2funcs $lib2funcs"
3007 # Since we can't use `::' targets, we link each language in
3008 # with a set of hooks, reached indirectly via lang.${target}.
3012 target_list="all.build all.cross start.encap rest.encap \
3014 install-normal install-common install-info install-man \
3016 mostlyclean clean distclean extraclean maintainer-clean \
3017 stage1 stage2 stage3 stage4"
3018 for t in $target_list
3021 for l in .. $all_languages
3023 if [[ $l != ".." ]]; then
3027 echo "lang.$t: $x" >> Make-hooks
3030 # If we're not building in srcdir, create .gdbinit.
3032 if [[ ! -f Makefile.in ]]; then
3033 echo "dir ." > .gdbinit
3034 echo "dir ${srcdir}" >> .gdbinit
3035 if [[ x$gdb_needs_out_file_path = xyes ]]
3037 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3039 if [[ "x$subdirs" != x ]]; then
3042 echo "dir ${srcdir}/$s" >> .gdbinit
3045 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3048 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3051 if [[ x$enable_haifa = xyes ]]; then
3052 echo "Using the Haifa scheduler."
3054 sched_cflags=-DHAIFA
3056 AC_SUBST(sched_prefix)
3057 AC_SUBST(sched_cflags)
3058 if [[ x$enable_haifa != x ]]; then
3059 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3060 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3061 if [[ -f $x ]]; then
3068 # Process the language and host/target makefile fragments.
3069 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3071 # Substitute configuration variables
3073 AC_SUBST(all_languages)
3074 AC_SUBST(all_boot_languages)
3075 AC_SUBST(all_compilers)
3076 AC_SUBST(all_lang_makefiles)
3077 AC_SUBST(all_stagestuff)
3078 AC_SUBST(all_diff_excludes)
3079 AC_SUBST(all_lib2funcs)
3080 AC_SUBST(all_headers)
3081 AC_SUBST(extra_passes)
3082 AC_SUBST(extra_programs)
3083 AC_SUBST(extra_parts)
3084 AC_SUBST(extra_c_objs)
3085 AC_SUBST(extra_c_flags)
3086 AC_SUBST(extra_objs)
3087 AC_SUBST(host_extra_gcc_objs)
3088 AC_SUBST(extra_headers_list)
3089 AC_SUBST(dep_host_xmake_file)
3090 AC_SUBST(dep_tmake_file)
3092 AC_SUBST(out_object_file)
3094 AC_SUBST(tm_file_list)
3095 AC_SUBST(build_xm_file_list)
3096 AC_SUBST(host_xm_file_list)
3097 AC_SUBST(lang_specs_files)
3098 AC_SUBST(lang_options_files)
3099 AC_SUBST(thread_file)
3101 AC_SUBST(local_prefix)
3102 AC_SUBST(gxx_include_dir)
3103 AC_SUBST(fixincludes)
3104 AC_SUBST(build_install_headers_dir)
3105 AC_SUBST(build_exeext)
3106 AC_SUBST(float_format)
3107 AC_SUBST(will_use_collect2)
3108 AC_SUBST(maybe_use_collect2)
3109 AC_SUBST(cc_set_by_configure)
3110 AC_SUBST(stage_prefix_set_by_configure)
3112 AC_SUBST_FILE(target_overrides)
3113 AC_SUBST_FILE(host_overrides)
3114 AC_SUBST(cross_defines)
3115 AC_SUBST_FILE(cross_overrides)
3116 AC_SUBST_FILE(build_overrides)
3117 AC_SUBST_FILE(language_fragments)
3118 AC_SUBST_FILE(language_hooks)
3120 # Echo that links are built
3121 if [[ x$host = x$target ]]
3129 if [[ x$host != x$build ]]
3131 str3=" on a $build system"
3134 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3139 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3141 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3143 echo " ${str2}${str3}." 1>&2
3146 # Configure the subdirectories
3147 # AC_CONFIG_SUBDIRS($subdirs)
3149 # Create the Makefile
3150 # and configure language subdirectories
3151 AC_OUTPUT($all_outputs,
3153 . $srcdir/configure.lang
3154 case x$CONFIG_HEADERS in
3155 xconfig.h:config.in)
3158 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3159 # bootstrapping and the installation procedure can still use
3160 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3161 # FLAGS_TO_PASS has been modified to solve the problem there.
3162 # This is virtually a duplicate of what happens in configure.lang; we do
3163 # an extra check to make sure this only happens if ln -s can be used.
3164 if [[ "$symbolic_link" = "ln -s" ]]; then
3165 for d in .. ${subdirs} ; do
3166 if [[ $d != .. ]]; then
3169 for t in stage1 stage2 stage3 stage4 include
3172 $symbolic_link ../$t $t 2>/dev/null
3183 target_alias='${target_alias}'
3185 subdirs='${subdirs}'
3186 oldstyle_subdirs='${oldstyle_subdirs}'
3187 symbolic_link='${symbolic_link}'
3188 program_transform_set='${program_transform_set}'
3189 program_transform_name='${program_transform_name}'
3190 dep_host_xmake_file='${dep_host_xmake_file}'
3191 host_xmake_file='${host_xmake_file}'
3192 dep_tmake_file='${dep_tmake_file}'
3193 tmake_file='${tmake_file}'
3194 thread_file='${thread_file}'
3195 version='${version}'
3196 local_prefix='${local_prefix}'
3197 build_install_headers_dir='${build_install_headers_dir}'
3198 build_exeext='${build_exeext}'
3199 out_file='${out_file}'
3200 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3201 SET_MAKE='${SET_MAKE}'
3202 target_list='${target_list}'
3203 target_overrides='${target_overrides}'
3204 host_overrides='${host_overrides}'
3205 cross_defines='${cross_defines}'
3206 cross_overrides='${cross_overrides}'
3207 build_overrides='${build_overrides}'