1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 # Initialization and defaults
25 AC_CONFIG_HEADER(config.h:config.in)
33 # Check for additional parameters
37 [ --with-gnu-ld arrange to work with GNU ld.],
43 [ --with-gnu-as arrange to work with GNU as.],
49 [ --with-stabs arrange to use stabs instead of host debug format.],
55 [ --with-elf arrange to use ELF instead of host debug format.],
59 # Specify the local prefix
60 AC_ARG_WITH(local-prefix,
61 [ --with-local-prefix=DIR specifies directory to put local include.],
62 local_prefix=$with_local_prefix,
63 local_prefix=/usr/local)
65 # Default local prefix if it is empty
66 if [[ x$local_prefix = x ]]; then
67 local_prefix=/usr/local
70 # Specify the g++ header file directory
71 AC_ARG_WITH(gxx-include-dir,
72 [ --with-gxx-include-dir=DIR
73 specifies directory to put g++ header files.],
74 gxx_include_dir=$with_gxx_include_dir,
75 gxx_include_dir='${prefix}/include/g++')
77 # Default g++ header file directory if it is empty
78 if [[ x$gxx_include_dir = x ]]; then
79 gxx_include_dir='${prefix}/include/g++'
82 # Enable use of cpplib for C.
83 AC_ARG_ENABLE(c-cpplib,
84 [ --enable-c-cpplib Use cpplib for C.],
85 if [[[ x$enable_c_cpplib != xno ]]]; then
86 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
87 extra_c_flags=-DUSE_CPPLIB=1
91 # Pass with no value to take the default
92 # Pass with a value to specify a thread package
93 AC_ARG_ENABLE(threads,
94 [ --enable-threads enable thread usage for target GCC.
95 --enable-threads=LIB use LIB thread package for target GCC.],
96 if [[[ x$enable_threads = xno ]]]; then
101 # Check if a valid thread package
102 case x${enable_threads} in
111 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
113 thread_file=$enable_threads
116 echo "$enable_threads is an unknown thread package" 1>&2
121 # Determine the host, build, and target systems
124 # 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)
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)
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.
417 fixincludes=Makefile.in
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.
793 fixincludes=Makefile.in
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.
803 fixincludes=Makefile.in
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.
810 fixincludes=Makefile.in
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.
1468 fixincludes=Makefile.in
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.
1767 fixincludes=Makefile.in
1769 if [[ x$prefix = xNONE ]]; then
1770 prefix=$native_prefix
1772 prefix=$native_prefix
1774 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1775 tm_file=mips/news4.h
1776 if [[ x$stabs = xyes ]]; then
1777 tm_file="${tm_file} dbx.h"
1779 if [[ x$gas = xyes ]]
1781 tmake_file=mips/t-mips-gas
1783 extra_passes="mips-tfile mips-tdump"
1785 if [[ x$gnu_ld != xyes ]]
1789 xmake_file=mips/x-sony
1791 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1792 # That is based on svr4.
1793 # t-svr4 is not right because this system doesn't use ELF.
1794 tm_file=mips/news5.h
1795 if [[ x$stabs = xyes ]]; then
1796 tm_file="${tm_file} dbx.h"
1798 xm_file=mips/xm-news.h
1799 if [[ x$gas = xyes ]]
1801 tmake_file=mips/t-mips-gas
1803 extra_passes="mips-tfile mips-tdump"
1805 if [[ x$gnu_ld != xyes ]]
1810 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1811 tm_file=mips/svr4-t.h
1812 if [[ x$stabs = xyes ]]; then
1813 tm_file="${tm_file} dbx.h"
1815 xm_file=mips/xm-sysv4.h
1816 xmake_file=mips/x-sysv
1817 if [[ x$gas = xyes ]]
1819 tmake_file=mips/t-mips-gas
1820 extra_parts="crtbegin.o crtend.o"
1822 tmake_file=mips/t-mips
1823 extra_passes="mips-tfile mips-tdump"
1825 if [[ x$gnu_ld != xyes ]]
1830 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1831 tm_file=mips/ultrix.h
1832 if [[ x$stabs = xyes ]]; then
1833 tm_file="${tm_file} dbx.h"
1835 xmake_file=mips/x-ultrix
1836 if [[ x$gas = xyes ]]
1838 tmake_file=mips/t-mips-gas
1840 tmake_file=mips/t-ultrix
1841 extra_passes="mips-tfile mips-tdump"
1843 if [[ x$gnu_ld != xyes ]]
1848 mips-*-riscos[[56789]]bsd*)
1849 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1850 if [[ x$stabs = xyes ]]; then
1851 tm_file="${tm_file} dbx.h"
1853 if [[ x$gas = xyes ]]
1855 tmake_file=mips/t-bsd-gas
1857 tmake_file=mips/t-bsd
1858 extra_passes="mips-tfile mips-tdump"
1860 if [[ x$gnu_ld != xyes ]]
1865 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1866 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1867 if [[ x$stabs = xyes ]]; then
1868 tm_file="${tm_file} dbx.h"
1870 if [[ x$gas = xyes ]]
1872 tmake_file=mips/t-bsd-gas
1874 tmake_file=mips/t-bsd
1875 extra_passes="mips-tfile mips-tdump"
1877 if [[ x$gnu_ld != xyes ]]
1882 mips-*-riscos[[56789]]sysv4*)
1883 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1884 if [[ x$stabs = xyes ]]; then
1885 tm_file="${tm_file} dbx.h"
1887 xm_file=mips/xm-sysv4.h
1888 xmake_file=mips/x-sysv
1889 if [[ x$gas = xyes ]]
1891 tmake_file=mips/t-svr4-gas
1893 tmake_file=mips/t-svr4
1894 extra_passes="mips-tfile mips-tdump"
1896 if [[ x$gnu_ld != xyes ]]
1901 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1902 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1903 if [[ x$stabs = xyes ]]; then
1904 tm_file="${tm_file} dbx.h"
1906 xm_file=mips/xm-sysv.h
1907 xmake_file=mips/x-sysv
1908 if [[ x$gas = xyes ]]
1910 tmake_file=mips/t-svr4-gas
1912 tmake_file=mips/t-svr4
1913 extra_passes="mips-tfile mips-tdump"
1915 if [[ x$gnu_ld != xyes ]]
1920 mips-*-riscos[[56789]]sysv*)
1921 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1922 if [[ x$stabs = xyes ]]; then
1923 tm_file="${tm_file} dbx.h"
1925 xm_file=mips/xm-sysv.h
1926 xmake_file=mips/x-sysv
1927 if [[ x$gas = xyes ]]
1929 tmake_file=mips/t-svr3-gas
1931 tmake_file=mips/t-svr3
1932 extra_passes="mips-tfile mips-tdump"
1934 if [[ x$gnu_ld != xyes ]]
1939 mips-*-sysv* | mips-*-riscos*sysv*)
1940 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1941 if [[ x$stabs = xyes ]]; then
1942 tm_file="${tm_file} dbx.h"
1944 xm_file=mips/xm-sysv.h
1945 xmake_file=mips/x-sysv
1946 if [[ x$gas = xyes ]]
1948 tmake_file=mips/t-svr3-gas
1950 tmake_file=mips/t-svr3
1951 extra_passes="mips-tfile mips-tdump"
1953 if [[ x$gnu_ld != xyes ]]
1958 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1959 tm_file=mips/mips-5.h
1960 if [[ x$stabs = xyes ]]; then
1961 tm_file="${tm_file} dbx.h"
1963 if [[ x$gas = xyes ]]
1965 tmake_file=mips/t-mips-gas
1967 extra_passes="mips-tfile mips-tdump"
1969 if [[ x$gnu_ld != xyes ]]
1977 tm_file=mips/ecoffl.h
1978 if [[ x$stabs = xyes ]]; then
1979 tm_file="${tm_file} dbx.h"
1981 tmake_file=mips/t-ecoff
1984 tm_file=mips/ecoff.h
1985 if [[ x$stabs = xyes ]]; then
1986 tm_file="${tm_file} dbx.h"
1988 tmake_file=mips/t-ecoff
1991 tm_file="mips/elfl.h libgloss.h"
1992 tmake_file=mips/t-ecoff
1995 tm_file="mips/elf.h libgloss.h"
1996 tmake_file=mips/t-ecoff
1999 tm_file="mips/elfl64.h libgloss.h"
2000 tmake_file=mips/t-ecoff
2002 mips64orionel-*-elf*)
2003 tm_file="mips/elflorion.h libgloss.h"
2004 tmake_file=mips/t-ecoff
2007 tm_file="mips/elf64.h libgloss.h"
2008 tmake_file=mips/t-ecoff
2011 tm_file="mips/elforion.h libgloss.h"
2012 tmake_file=mips/t-ecoff
2014 mips64orion-*-rtems*)
2015 tm_file=mips/rtems64.h
2016 tmake_file="mips/t-ecoff t-rtems"
2018 mips-*-*) # Default MIPS RISC-OS 4.0.
2019 if [[ x$stabs = xyes ]]; then
2020 tm_file="${tm_file} dbx.h"
2022 if [[ x$gas = xyes ]]
2024 tmake_file=mips/t-mips-gas
2026 extra_passes="mips-tfile mips-tdump"
2028 if [[ x$gnu_ld != xyes ]]
2035 tm_file="mn10200/mn10200.h"
2036 if [[ x$stabs = xyes ]]
2038 tm_file="${tm_file} dbx.h"
2044 tm_file="mn10300/mn10300.h"
2045 if [[ x$stabs = xyes ]]
2047 tm_file="${tm_file} dbx.h"
2052 tm_file=ns32k/encore.h
2056 tm_file=ns32k/sequent.h
2060 tm_file=ns32k/tek6100.h
2064 tm_file=ns32k/tek6200.h
2067 # This has not been updated to GCC 2.
2069 # xm_file=ns32k/xm-genix.h
2070 # xmake_file=ns32k/x-genix
2071 # tm_file=ns32k/genix.h
2075 tm_file=ns32k/merlin.h
2079 tm_file=ns32k/pc532-mach.h
2083 tm_file=ns32k/pc532-min.h
2084 xm_file=ns32k/xm-pc532-min.h
2087 ns32k-pc532-netbsd*)
2088 tm_file=ns32k/netbsd.h
2089 xm_file=ns32k/xm-netbsd.h
2090 # On NetBSD, the headers are already okay.
2091 fixincludes=Makefile.in
2095 tm_file="${tm_file} pdp11/2bsd.h"
2101 xmake_file=pyr/x-pyr
2108 xmake_file=romp/x-mach
2111 powerpc-*-sysv* | powerpc-*-elf*)
2112 tm_file=rs6000/sysv4.h
2113 xm_file=rs6000/xm-sysv4.h
2114 extra_headers=ppc-asm.h
2115 if [[ x$gas = xyes ]]
2117 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2119 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2121 xmake_file=rs6000/x-sysv4
2124 tm_file=rs6000/eabiaix.h
2125 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2126 fixincludes=Makefile.in
2127 extra_headers=ppc-asm.h
2130 tm_file=rs6000/eabisim.h
2131 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2132 fixincludes=Makefile.in
2133 extra_headers=ppc-asm.h
2136 tm_file=rs6000/eabi.h
2137 if [[ x$gas = xyes ]]
2139 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2141 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2143 fixincludes=Makefile.in
2144 extra_headers=ppc-asm.h
2147 tm_file=rs6000/rtems.h
2148 if [[ x$gas = xyes ]]
2150 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2152 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2154 fixincludes=Makefile.in
2155 extra_headers=ppc-asm.h
2157 powerpc-*-linux-gnu*)
2158 tm_file=rs6000/linux.h
2159 xm_file=rs6000/xm-sysv4.h
2160 out_file=rs6000/rs6000.c
2161 if [[ x$gas = xyes ]]
2163 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2165 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2168 fixincludes=Makefile.in
2169 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2170 extra_headers=ppc-asm.h
2171 if [[ x$enable_threads = xyes ]]; then
2177 xm_file=rs6000/xm-sysv4.h
2178 tm_file=rs6000/vxppc.h
2179 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2180 extra_headers=ppc-asm.h
2182 powerpcle-*-sysv* | powerpcle-*-elf*)
2183 tm_file=rs6000/sysv4le.h
2184 xm_file=rs6000/xm-sysv4.h
2185 if [[ x$gas = xyes ]]
2187 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2189 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2191 xmake_file=rs6000/x-sysv4
2192 extra_headers=ppc-asm.h
2194 powerpcle-*-eabisim*)
2195 tm_file=rs6000/eabilesim.h
2196 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2197 fixincludes=Makefile.in
2198 extra_headers=ppc-asm.h
2201 tm_file=rs6000/eabile.h
2202 if [[ x$gas = xyes ]]
2204 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2206 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2208 fixincludes=Makefile.in
2209 extra_headers=ppc-asm.h
2211 powerpcle-*-winnt* )
2212 tm_file=rs6000/win-nt.h
2213 tmake_file=rs6000/t-winnt
2215 fixincludes=Makefile.in
2216 if [[ x$enable_threads = xyes ]]; then
2219 extra_headers=ppc-asm.h
2221 powerpcle-*-pe | powerpcle-*-cygwin32)
2222 tm_file=rs6000/cygwin32.h
2223 xm_file=rs6000/xm-cygwin32.h
2224 tmake_file=rs6000/t-winnt
2225 xmake_file=rs6000/x-cygwin32
2227 fixincludes=Makefile.in
2228 if [[ x$enable_threads = xyes ]]; then
2232 extra_headers=ppc-asm.h
2234 powerpcle-*-solaris2*)
2235 tm_file=rs6000/sol2.h
2236 xm_file=rs6000/xm-sysv4.h
2237 if [[ x$gas = xyes ]]
2239 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2241 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2243 xmake_file=rs6000/x-sysv4
2244 fixincludes=fixinc.svr4
2245 extra_headers=ppc-asm.h
2247 rs6000-ibm-aix3.[[01]]*)
2248 tm_file=rs6000/aix31.h
2249 xmake_file=rs6000/x-aix31
2252 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2253 tm_file=rs6000/aix3newas.h
2254 if [[ x$host != x$target ]]
2256 tmake_file=rs6000/t-xnewas
2258 tmake_file=rs6000/t-newas
2262 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2263 tm_file=rs6000/aix41.h
2264 if [[ x$host != x$target ]]
2266 tmake_file=rs6000/t-xnewas
2268 tmake_file=rs6000/t-newas
2270 xmake_file=rs6000/x-aix31
2280 tm_file=rs6000/mach.h
2281 xm_file=rs6000/xm-mach.h
2282 xmake_file=rs6000/x-mach
2286 tm_file=rs6000/lynx.h
2287 xm_file=rs6000/xm-lynx.h
2288 tmake_file=rs6000/t-rs6000
2289 xmake_file=rs6000/x-lynx
2297 tmake_file="sh/t-sh t-rtems"
2306 xm_file=sparc/xm-pbd.h
2308 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2309 tm_file=sparc/vxsparc.h
2310 tmake_file=sparc/t-vxsparc
2314 tmake_file=sparc/t-sparcbare
2315 tm_file="sparc/aout.h libgloss.h"
2318 tm_file=sparc/netbsd.h
2319 xm_file=sparc/xm-netbsd.h
2320 # On NetBSD, the headers are already okay.
2321 fixincludes=Makefile.in
2327 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2328 xm_file=sparc/xm-linux.h
2329 tm_file=sparc/linux-aout.h
2331 fixincludes=Makefile.in #On Linux, the headers are ok already.
2334 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2335 xm_file=sparc/xm-linux.h # with ELF format using the
2336 xmake_file=x-linux # Linux C library 5.
2337 tm_file=sparc/linux.h
2338 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2339 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2340 fixincludes=Makefile.in #On Linux, the headers are ok already.
2343 sparc-*-linux-gnu*) # Sparc's running Linux
2344 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2345 xmake_file=x-linux # aka the Linux C library 6.
2346 tm_file=sparc/linux.h
2347 tmake_file="t-linux sparc/t-linux"
2348 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2349 fixincludes=Makefile.in #On Linux, the headers are ok already.
2351 if [[ x$enable_threads = xyes ]]; then
2356 if [[ x$gas = xyes ]]
2358 tm_file=sparc/lynx.h
2360 tm_file=sparc/lynx-ng.h
2362 xm_file=sparc/xm-lynx.h
2363 tmake_file=sparc/t-sunos41
2367 tmake_file="sparc/t-sparcbare t-rtems"
2368 tm_file=sparc/rtems.h
2371 tm_file=sparc/sol2.h
2372 xm_file=sparc/xm-sol2.h
2373 tmake_file=sparc/t-sol2
2374 xmake_file=sparc/x-sysv4
2375 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2376 fixincludes=fixinc.svr4
2377 if [[ x$enable_threads = xyes ]]; then
2378 thread_file='solaris'
2382 tm_file=sparc/sunos4.h
2383 tmake_file=sparc/t-sunos40
2387 tm_file=sparc/sunos4.h
2388 tmake_file=sparc/t-sunos41
2392 tm_file=sparc/sun4o3.h
2396 tm_file=sparc/sysv4.h
2397 xm_file=sparc/xm-sysv4.h
2399 xmake_file=sparc/x-sysv4
2400 extra_parts="crtbegin.o crtend.o"
2403 xm_file=sparc/xm-sol2.h
2404 tm_file=sparc/vxsim.h
2405 tmake_file=sparc/t-vxsparc
2406 xmake_file=sparc/x-sysv4
2409 tm_file="sparc/splet.h libgloss.h"
2410 tmake_file=sparc/t-splet
2413 tm_file="sparc/litecoff.h libgloss.h"
2414 tmake_file=sparc/t-sparclite
2417 tm_file="sparc/lite.h aoutos.h libgloss.h"
2418 tmake_file=sparc/t-sparclite
2421 tmake_file=sparc/t-sp64
2422 tm_file=sparc/sp64-aout.h
2425 tmake_file=sparc/t-sp64
2426 tm_file=sparc/sp64-elf.h
2427 extra_parts="crtbegin.o crtend.o"
2429 # This hasn't been upgraded to GCC 2.
2430 # tahoe-harris-*) # Harris tahoe, using COFF.
2431 # tm_file=tahoe/harris.h
2433 # tahoe-*-bsd*) # tahoe running BSD
2435 # This hasn't been upgraded to GCC 2.
2442 tm_file="v850/v850.h"
2443 xm_file="v850/xm-v850.h"
2444 if [[ x$stabs = xyes ]]
2446 tm_file="${tm_file} dbx.h"
2450 vax-*-bsd*) # vaxen running BSD
2454 vax-*-sysv*) # vaxen running system V
2455 tm_file="${tm_file} vax/vaxv.h"
2456 xm_file="${tm_file} vax/xm-vaxv.h"
2460 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2461 xm_file="${xm_file} xm-netbsd.h"
2462 # On NetBSD, the headers are already okay.
2463 fixincludes=Makefile.in
2467 vax-*-ultrix*) # vaxen running ultrix
2468 tm_file="${tm_file} vax/ultrix.h"
2472 vax-*-vms*) # vaxen running VMS
2473 xm_file=vax/xm-vms.h
2477 vax-*-*) # vax default entry
2481 xm_file="${xm_file} xm-svr3"
2485 echo "Configuration $machine not supported" 1>&2
2492 ;; # Existing Linux/GNU systems do not use the GNU setup.
2494 # On the GNU system, the setup is just about the same on
2495 # each different CPU. The specific machines that GNU
2496 # supports are matched above and just set $cpu_type.
2497 xm_file=${cpu_type}/xm-gnu.h
2498 tm_file=${cpu_type}/gnu.h
2499 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2500 # GNU always uses ELF.
2502 # GNU tools are the only tools.
2505 # On GNU, the headers are already okay.
2506 fixincludes=Makefile.in
2507 xmake_file=x-linux # These details are the same as Linux.
2508 tmake_file=t-gnu # These are not.
2511 fixincludes=fixinc.svr4
2512 xmake_try_sysv=x-sysv
2513 install_headers_dir=install-headers-cpio
2516 install_headers_dir=install-headers-cpio
2520 # Distinguish i[3456]86
2521 # Also, do not run mips-tfile on MIPS if using gas.
2522 # Process --with-cpu= for PowerPC/rs6000
2523 target_cpu_default2=
2526 target_cpu_default2=1
2529 target_cpu_default2=2
2532 target_cpu_default2=3
2537 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2540 target_cpu_default2="MASK_CPU_EV5"
2544 if [[ x$gas = xyes ]]
2546 if [[ x$target_cpu_default2 = x ]]
2548 target_cpu_default2="MASK_GAS"
2550 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2554 mips*-*-ecoff* | mips*-*-elf*)
2555 if [[ x$gas = xyes ]]
2557 if [[ x$gnu_ld = xyes ]]
2559 target_cpu_default2=20
2561 target_cpu_default2=16
2566 if [[ x$gas = xyes ]]
2568 target_cpu_default2=16
2571 powerpc*-*-* | rs6000-*-*)
2572 case "x$with_cpu" in
2576 xcommon | xpower | xpower2 | xpowerpc | xrios \
2577 | xrios1 | xrios2 | xrsc | xrsc1 \
2578 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2579 | x403 | x505 | x801 | x821 | x823 | x860)
2580 target_cpu_default2="\"$with_cpu\""
2584 echo "--with-cpu must be passed a value" 1>&2
2589 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2595 case ".$with_cpu" in
2597 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2599 .supersparc | .ultrasparc | .v7 | .v8)
2600 target_cpu_default2="TARGET_CPU_$with_cpu"
2603 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2610 if [[ x$target_cpu_default2 != x ]]
2612 if [[ x$target_cpu_default != x ]]
2614 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2616 target_cpu_default=$target_cpu_default2
2620 # No need for collect2 if we have the GNU linker.
2627 # Save data on machine being used to compile GCC in build_xm_file.
2628 # Save data on host machine in vars host_xm_file and host_xmake_file.
2629 if [[ x$pass1done = x ]]
2631 if [[ x"$xm_file" = x ]]
2632 then build_xm_file=$cpu_type/xm-$cpu_type.h
2633 else build_xm_file=$xm_file
2635 build_install_headers_dir=$install_headers_dir
2636 build_exeext=$exeext
2639 if [[ x$pass2done = x ]]
2641 if [[ x"$xm_file" = x ]]
2642 then host_xm_file=$cpu_type/xm-$cpu_type.h
2643 else host_xm_file=$xm_file
2645 if [[ x"$xmake_file" = x ]]
2646 then xmake_file=$cpu_type/x-$cpu_type
2648 host_xmake_file="$xmake_file"
2649 host_truncate_target=$truncate_target
2650 host_extra_gcc_objs=$extra_gcc_objs
2651 host_extra_objs=$extra_host_objs
2657 extra_objs="${host_extra_objs} ${extra_objs}"
2659 # Default the target-machine variables that were not explicitly set.
2660 if [[ x"$tm_file" = x ]]
2661 then tm_file=$cpu_type/$cpu_type.h; fi
2663 if [[ x$extra_headers = x ]]
2664 then extra_headers=; fi
2666 if [[ x"$xm_file" = x ]]
2667 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2669 md_file=$cpu_type/$cpu_type.md
2671 if [[ x$out_file = x ]]
2672 then out_file=$cpu_type/$cpu_type.c; fi
2674 if [[ x"$tmake_file" = x ]]
2675 then tmake_file=$cpu_type/t-$cpu_type
2678 if [[ x$float_format = x ]]
2679 then float_format=i64
2682 # Say what files are being used for the output code and MD file.
2683 echo "Using \`$srcdir/config/$out_file' to output insns."
2684 echo "Using \`$srcdir/config/$md_file' as machine description file."
2687 for f in $tm_file; do
2690 if [[ $count = ax ]]; then
2691 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2693 echo "Using the following target machine macro files:"
2694 for f in $tm_file; do
2695 echo " $srcdir/config/$f"
2700 for f in $host_xm_file; do
2703 if [[ $count = ax ]]; then
2704 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2706 echo "Using the following host machine macro files:"
2707 for f in $host_xm_file; do
2708 echo " $srcdir/config/$f"
2712 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2714 for f in $build_xm_file; do
2717 if [[ $count = ax ]]; then
2718 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2720 echo "Using the following build machine macro files:"
2721 for f in $build_xm_file; do
2722 echo " $srcdir/config/$f"
2727 if [[ x$thread_file = x ]]
2728 then thread_file='single'
2731 # Set up the header files.
2732 # $links is the list of header files to create.
2733 # $vars is the list of shell variables with file names to include.
2734 # config2.h is the old config.h. It is included by the new config.h which
2735 # created from config.in. The goal is to simplify the transition to autoconf.
2736 vars="host_xm_file tm_file xm_file build_xm_file"
2737 links="config2.h tm.h tconfig.h hconfig.h"
2740 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2743 while [[ -n "$vars" ]]
2745 # set file to car of files, files to cdr of files
2746 set $vars; var=$1; shift; vars=$*
2747 set $links; link=$1; shift; links=$*
2751 # Define TARGET_CPU_DEFAULT if the system wants one.
2752 # This substitutes for lots of *.h files.
2753 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2755 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2758 for file in `eval echo '$'$var`; do
2759 echo "#include \"$file\"" >>$link
2763 # Truncate the target if necessary
2764 if [[ x$host_truncate_target != x ]]; then
2765 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2768 # Get the version number from the toplevel
2769 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2771 # Are we using gcc as the native compiler?
2773 *linux*) # All Linux's use gcc as the native compiler.
2774 if [[ x$prefix = xNONE ]]; then
2775 prefix=$native_prefix
2780 # Get an absolute path to the GCC top-level source directory
2786 # Conditionalize the makefile for this host machine.
2787 # Make-host contains the concatenation of all host makefile fragments
2788 # [there can be more than one]. This file is built by configure.frag.
2789 host_overrides=Make-host
2790 dep_host_xmake_file=
2791 for f in .. ${host_xmake_file}
2793 if [[ -f ${srcdir}/config/$f ]]
2795 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2799 # Conditionalize the makefile for this target machine.
2800 # Make-target contains the concatenation of all host makefile fragments
2801 # [there can be more than one]. This file is built by configure.frag.
2802 target_overrides=Make-target
2804 for f in .. ${tmake_file}
2806 if [[ -f ${srcdir}/config/$f ]]
2808 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2812 # If the host doesn't support symlinks, modify CC in
2813 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2814 # Otherwise, we can use "CC=$(CC)".
2816 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2818 cc_set_by_configure="\$(CC)"
2819 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2821 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2822 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2826 out_object_file=`basename $out_file .c`.o
2829 for f in $tm_file; do
2830 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2834 for f in $host_xm_file; do
2835 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2839 for f in $build_xm_file; do
2840 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2843 # Define macro CROSS_COMPILE in compilation
2844 # if this is a cross-compiler.
2845 # Also use all.cross instead of all.internal
2846 # and add cross-make to Makefile.
2847 cross_overrides="/dev/null"
2848 if [[ x$host != x$target ]]
2850 cross_defines="CROSS=-DCROSS_COMPILE"
2851 cross_overrides="${topdir}/cross-make"
2854 # When building gcc with a cross-compiler, we need to fix a few things.
2855 # This must come after cross-make as we want all.build to override
2857 build_overrides="/dev/null"
2858 if [[ x$build != x$host ]]
2860 build_overrides="${topdir}/build-make"
2863 # Expand extra_headers to include complete path.
2864 # This substitutes for lots of t-* files.
2866 if [[ "x$extra_headers" = x ]]
2869 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2870 for file in $extra_headers;
2872 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2876 # Add a definition of USE_COLLECT2 if system wants one.
2877 # Also tell toplev.c what to do.
2878 # This substitutes for lots of t-* files.
2879 if [[ x$use_collect2 = x ]]
2884 will_use_collect2="ld"
2885 maybe_use_collect2="-DUSE_COLLECT2"
2889 # Set MD_DEPS if the real md file is in md.pre-cpp.
2890 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2891 # for line oriented comments, so we must always use a GNU cpp. If
2892 # building gcc with a cross compiler, use the cross compiler just
2893 # built. Otherwise, we can use the cpp just built.
2895 if [[ "x$md_cppflags" = x ]]
2897 md_file_sub=$srcdir/config/$md_file
2902 # If we have gas in the build tree, make a link to it.
2903 if [[ -f ../gas/Makefile ]]; then
2904 rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null
2907 # If we have ld in the build tree, make a link to it.
2908 if [[ -f ../ld/Makefile ]]; then
2909 # if [[ x$use_collect2 = x ]]; then
2910 # rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null
2912 rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null
2916 # Figure out what language subdirectories are present.
2918 for lang in ${srcdir}/*/config-lang.in ..
2922 # The odd quoting in the next line works around
2923 # an apparent bug in bash 1.12 on linux.
2924 ${srcdir}/[[*]]/config-lang.in) ;;
2925 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2929 # Make empty files to contain the specs and options for each language.
2930 # Then add #include lines to for a compiler that has specs and/or options.
2934 rm -f specs.h options.h
2935 touch specs.h options.h
2936 for subdir in . $subdirs
2938 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2939 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2940 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2942 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2943 echo "#include \"$subdir/lang-options.h\"" >>options.h
2944 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2948 # These (without "all_") are set in each config-lang.in.
2949 # `language' must be a single word so is spelled singularly.
2955 all_outputs=Makefile
2956 # List of language makefile fragments.
2961 # Add the language fragments.
2962 # Languages are added via two mechanisms. Some information must be
2963 # recorded in makefile variables, these are defined in config-lang.in.
2964 # We accumulate them and plug them into the main Makefile.
2965 # The other mechanism is a set of hooks for each of the main targets
2966 # like `clean', `install', etc.
2968 language_fragments="Make-lang"
2969 language_hooks="Make-hooks"
2972 for s in .. $subdirs
2984 . ${srcdir}/$s/config-lang.in
2985 if [[ "x$language" = x ]]
2987 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2990 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2991 all_languages="$all_languages $language"
2992 if [[ "x$boot_language" = xyes ]]
2994 all_boot_languages="$all_boot_languages $language"
2996 all_compilers="$all_compilers $compilers"
2997 all_stagestuff="$all_stagestuff $stagestuff"
2998 all_diff_excludes="$all_diff_excludes $diff_excludes"
2999 all_headers="$all_headers $headers"
3000 all_outputs="$all_outputs $outputs"
3001 if [[ x$outputs = x ]]
3003 oldstyle_subdirs="$oldstyle_subdirs $s"
3005 all_lib2funcs="$all_lib2funcs $lib2funcs"
3009 # Since we can't use `::' targets, we link each language in
3010 # with a set of hooks, reached indirectly via lang.${target}.
3014 target_list="all.build all.cross start.encap rest.encap \
3016 install-normal install-common install-info install-man \
3018 mostlyclean clean distclean extraclean maintainer-clean \
3019 stage1 stage2 stage3 stage4"
3020 for t in $target_list
3023 for l in .. $all_languages
3025 if [[ $l != ".." ]]; then
3029 echo "lang.$t: $x" >> Make-hooks
3032 # If we're not building in srcdir, create .gdbinit.
3034 if [[ ! -f Makefile.in ]]; then
3035 echo "dir ." > .gdbinit
3036 echo "dir ${srcdir}" >> .gdbinit
3037 if [[ x$gdb_needs_out_file_path = xyes ]]
3039 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3041 if [[ "x$subdirs" != x ]]; then
3044 echo "dir ${srcdir}/$s" >> .gdbinit
3047 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3050 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3053 if [[ x$enable_haifa = xyes ]]; then
3054 echo "Using the Haifa scheduler."
3056 sched_cflags=-DHAIFA
3058 AC_SUBST(sched_prefix)
3059 AC_SUBST(sched_cflags)
3060 if [[ x$enable_haifa != x ]]; then
3061 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3062 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3063 if [[ -f $x ]]; then
3070 # Process the language and host/target makefile fragments.
3071 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3073 # Substitute configuration variables
3075 AC_SUBST(all_languages)
3076 AC_SUBST(all_boot_languages)
3077 AC_SUBST(all_compilers)
3078 AC_SUBST(all_lang_makefiles)
3079 AC_SUBST(all_stagestuff)
3080 AC_SUBST(all_diff_excludes)
3081 AC_SUBST(all_lib2funcs)
3082 AC_SUBST(all_headers)
3083 AC_SUBST(extra_passes)
3084 AC_SUBST(extra_programs)
3085 AC_SUBST(extra_parts)
3086 AC_SUBST(extra_c_objs)
3087 AC_SUBST(extra_c_flags)
3088 AC_SUBST(extra_objs)
3089 AC_SUBST(host_extra_gcc_objs)
3090 AC_SUBST(extra_headers_list)
3091 AC_SUBST(dep_host_xmake_file)
3092 AC_SUBST(dep_tmake_file)
3094 AC_SUBST(out_object_file)
3096 AC_SUBST(tm_file_list)
3097 AC_SUBST(build_xm_file_list)
3098 AC_SUBST(host_xm_file_list)
3099 AC_SUBST(lang_specs_files)
3100 AC_SUBST(lang_options_files)
3101 AC_SUBST(thread_file)
3103 AC_SUBST(local_prefix)
3104 AC_SUBST(gxx_include_dir)
3105 AC_SUBST(fixincludes)
3106 AC_SUBST(build_install_headers_dir)
3107 AC_SUBST(build_exeext)
3108 AC_SUBST(float_format)
3109 AC_SUBST(will_use_collect2)
3110 AC_SUBST(maybe_use_collect2)
3111 AC_SUBST(cc_set_by_configure)
3112 AC_SUBST(stage_prefix_set_by_configure)
3114 AC_SUBST_FILE(target_overrides)
3115 AC_SUBST_FILE(host_overrides)
3116 AC_SUBST(cross_defines)
3117 AC_SUBST_FILE(cross_overrides)
3118 AC_SUBST_FILE(build_overrides)
3119 AC_SUBST_FILE(language_fragments)
3120 AC_SUBST_FILE(language_hooks)
3122 # Echo that links are built
3123 if [[ x$host = x$target ]]
3131 if [[ x$host != x$build ]]
3133 str3=" on a $build system"
3136 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3141 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3143 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3145 echo " ${str2}${str3}." 1>&2
3148 # Configure the subdirectories
3149 # AC_CONFIG_SUBDIRS($subdirs)
3151 # Create the Makefile
3152 # and configure language subdirectories
3153 AC_OUTPUT($all_outputs,
3155 . $srcdir/configure.lang
3156 case x$CONFIG_HEADERS in
3157 xconfig.h:config.in)
3165 target_alias='${target_alias}'
3167 subdirs='${subdirs}'
3168 oldstyle_subdirs='${oldstyle_subdirs}'
3169 symbolic_link='${symbolic_link}'
3170 program_transform_set='${program_transform_set}'
3171 program_transform_name='${program_transform_name}'
3172 dep_host_xmake_file='${dep_host_xmake_file}'
3173 host_xmake_file='${host_xmake_file}'
3174 dep_tmake_file='${dep_tmake_file}'
3175 tmake_file='${tmake_file}'
3176 thread_file='${thread_file}'
3177 version='${version}'
3178 local_prefix='${local_prefix}'
3179 build_install_headers_dir='${build_install_headers_dir}'
3180 build_exeext='${build_exeext}'
3181 out_file='${out_file}'
3182 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3183 SET_MAKE='${SET_MAKE}'
3184 target_list='${target_list}'
3185 target_overrides='${target_overrides}'
3186 host_overrides='${host_overrides}'
3187 cross_defines='${cross_defines}'
3188 cross_overrides='${cross_overrides}'
3189 build_overrides='${build_overrides}'