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)
152 build_install_headers_dir=install-headers-tar
156 host_truncate_target=
158 # Decode the host machine, then the target machine.
159 # For the host machine, we save the xm_file variable as host_xm_file;
160 # then we decode the target machine and forget everything else
161 # that came from the host machine.
162 for machine in $build $host $target; do
175 # Set this to force installation and use of collect2.
177 # Set this to override the default target model.
179 # Set this to control which fixincludes program to use.
180 fixincludes=fixincludes
181 # Set this to control how the header file directory is installed.
182 install_headers_dir=install-headers-tar
183 # Set this to a non-empty list of args to pass to cpp if the target
184 # wants its .md file passed through cpp.
186 # Set this if directory names should be truncated to 14 characters.
188 # Set this if gdb needs a dir command with `dirname $out_file`
189 gdb_needs_out_file_path=
190 # Set this if the build machine requires executables to have a
194 # Set default cpu_type, tm_file and xm_file so it can be updated in
195 # each machine entry.
196 cpu_type=`echo $machine | sed 's/-.*$//'`
230 tm_file=${cpu_type}/${cpu_type}.h
231 xm_file=${cpu_type}/xm-${cpu_type}.h
234 # Support site-specific machine types.
236 cpu_type=`echo $machine | sed -e 's/-.*//'`
237 rest=`echo $machine | sed -e "s/$cpu_type-//"`
238 xm_file=${cpu_type}/xm-$rest.h
239 tm_file=${cpu_type}/$rest.h
240 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
241 then xmake_file=${cpu_type}/x-$rest; \
244 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
245 then tmake_file=${cpu_type}/t-$rest; \
251 a29k-*-bsd* | a29k-*-sym1*)
252 tm_file="${tm_file} a29k/unix.h"
253 xm_file=a29k/xm-unix.h
254 xmake_file=a29k/x-unix
257 a29k-*-udi | a29k-*-coff)
258 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
259 tmake_file=a29k/t-a29kbare
262 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
263 tmake_file=a29k/t-vx29k
264 extra_parts="crtbegin.o crtend.o"
266 a29k-*-*) # Default a29k environment.
269 alpha*-*-linux-gnuecoff*)
270 tm_file="${tm_file} alpha/linux.h"
271 xm_file="${xm_file} alpha/xm-linux.h"
272 target_cpu_default="MASK_GAS"
275 fixincludes=Makefile.in
278 alpha*-*-linux-gnulibc1*)
279 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
280 xm_file="${xm_file} alpha/xm-linux.h"
281 target_cpu_default="MASK_GAS"
282 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
284 fixincludes=Makefile.in
286 if [[ x$enable_threads = xyes ]]; then
291 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
292 xm_file="${xm_file} alpha/xm-linux.h"
293 target_cpu_default="MASK_GAS"
294 tmake_file="t-linux alpha/t-linux"
296 fixincludes=Makefile.in
298 if [[ x$enable_threads = xyes ]]; then
302 alpha*-dec-osf[[456789]]*)
303 if [[ x$stabs = xyes ]]
305 tm_file="${tm_file} dbx.h"
307 if [[ x$gas != xyes ]]
309 extra_passes="mips-tfile mips-tdump"
312 # Some versions of OSF4 (specifically X4.0-9 296.7) have
313 # a broken tar, so we use cpio instead.
316 install_headers_dir=install-headers-cpio
320 alpha*-dec-osf[[23]]*)
321 tm_file="${tm_file} alpha/osf2or3.h"
322 if [[ x$stabs = xyes ]]
324 tm_file="${tm_file} dbx.h"
326 if [[ x$gas != xyes ]]
328 extra_passes="mips-tfile mips-tdump"
333 tm_file="${tm_file} alpha/osf12.h"
334 if [[ x$stabs = xyes ]]
336 tm_file="${tm_file} dbx.h"
338 if [[ x$gas != xyes ]]
340 extra_passes="mips-tfile mips-tdump"
345 if [[ x$stabs = xyes ]]
347 tm_file="${tm_file} dbx.h"
349 if [[ x$gas != xyes ]]
351 extra_passes="mips-tfile mips-tdump"
356 tm_file="${tm_file} alpha/win-nt.h"
357 target_cpu_default=MASK_WINDOWS_NT
358 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
360 xmake_file=winnt/x-winnt
361 extra_host_objs=oldnames.o
362 extra_gcc_objs="spawnv.o oldnames.o"
363 fixincludes=fixinc.winnt
364 if [[ x$gnu_ld != xyes ]]
366 extra_programs=ld.exe
368 if [[ x$enable_threads = xyes ]]; then
374 xm_file="${xm_file} alpha/xm-vms.h"
375 tmake_file=alpha/t-vms
376 fixincludes=Makefile.in
378 arm-*-coff* | armel-*-coff*)
380 tmake_file=arm/t-bare
382 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
383 tm_file=arm/riscix1-1.h
386 arm-*-riscix*) # Acorn RISC machine
387 if [[ x$gas = xyes ]]
389 tm_file=arm/rix-gas.h
393 xmake_file=arm/x-riscix
394 tmake_file=arm/t-riscix
397 arm-semi-aout | armel-semi-aout)
399 tmake_file=arm/t-semi
400 fixincludes=Makefile.in # There is nothing to fix
402 arm-semi-aof | armel-semi-aof)
403 tm_file=arm/semiaof.h
404 tmake_file=arm/t-semiaof
405 fixincludes=Makefile.in # There is nothing to fix
409 xm_file=arm/xm-netbsd.h
410 tmake_file=arm/t-netbsd
411 # On NetBSD, the headers are already okay.
412 fixincludes=Makefile.in
415 arm-*-linux-gnuaout*) # ARM Linux
417 xm_file=arm/xm-linux.h
419 tm_file=arm/linux-gas.h
420 tmake_file=arm/t-linux
421 fixincludes=Makefile.in
427 c1-convex-*) # Convex C1
430 fixincludes=Makefile.in
432 c2-convex-*) # Convex C2
435 fixincludes=Makefile.in
440 fixincludes=Makefile.in
445 fixincludes=Makefile.in
448 target_cpu_default=16
450 fixincludes=Makefile.in
452 clipper-intergraph-clix*)
453 tm_file="${tm_file} svr3.h clipper/clix.h"
454 xm_file=clipper/xm-clix.h
455 xmake_file=clipper/x-clix
456 extra_headers=va-clipper.h
457 extra_parts="crtbegin.o crtend.o"
458 install_headers_dir=install-headers-cpio
465 # This hasn't been upgraded to GCC 2.
466 # fx80-alliant-*) # Alliant FX/80
472 if [[ x$enable_haifa != xno ]]; then
475 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
476 xm_file=pa/xm-papro.h
480 if [[ x$enable_haifa != xno ]]; then
484 tm_file="${tm_file} pa/pa-osf.h"
486 fixincludes=Makefile.in
489 if [[ x$enable_haifa != xno ]]; then
492 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
493 xm_file=pa/xm-papro.h
497 if [[ x$enable_haifa != xno ]]; then
500 tm_file="${tm_file} pa/pa-osf.h"
502 fixincludes=Makefile.in
505 if [[ x$enable_haifa != xno ]]; then
510 fixincludes=Makefile.in
513 if [[ x$enable_haifa != xno ]]; then
517 fixincludes=Makefile.in
520 if [[ x$enable_haifa != xno ]]; then
523 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
524 xm_file=pa/xm-pahpux.h
525 xmake_file=pa/x-pa-hpux
526 if [[ x$gas = xyes ]]
528 tm_file="${tm_file} pa/gas.h"
530 install_headers_dir=install-headers-cpio
533 hppa1.0-*-hpux8.0[[0-2]]*)
534 if [[ x$enable_haifa != xno ]]; then
537 tm_file="${tm_file} pa/pa-hpux.h"
538 xm_file=pa/xm-pahpux.h
539 xmake_file=pa/x-pa-hpux
540 if [[ x$gas = xyes ]]
542 tm_file="${tm_file} pa/pa-gas.h"
544 tm_file="pa/pa-oldas.h ${tm_file}"
546 install_headers_dir=install-headers-cpio
549 hppa1.1-*-hpux8.0[[0-2]]*)
550 if [[ x$enable_haifa != xno ]]; then
554 tm_file="${tm_file} pa/pa-hpux.h"
555 xm_file=pa/xm-pahpux.h
556 xmake_file=pa/x-pa-hpux
557 if [[ x$gas = xyes ]]
559 tm_file="${tm_file} pa/pa-gas.h"
561 tm_file="pa/pa-oldas.h ${tm_file}"
563 install_headers_dir=install-headers-cpio
567 if [[ x$enable_haifa != xno ]]; then
571 tm_file="${tm_file} pa/pa-hpux.h"
572 xm_file=pa/xm-pahpux.h
573 xmake_file=pa/x-pa-hpux
574 if [[ x$gas = xyes ]]
576 tm_file="${tm_file} pa/pa-gas.h"
578 install_headers_dir=install-headers-cpio
582 if [[ x$enable_haifa != xno ]]; then
585 tm_file="${tm_file} pa/pa-hpux.h"
586 xm_file=pa/xm-pahpux.h
587 xmake_file=pa/x-pa-hpux
588 if [[ x$gas = xyes ]]
590 tm_file="${tm_file} pa/pa-gas.h"
592 install_headers_dir=install-headers-cpio
596 if [[ x$enable_haifa != xno ]]; then
600 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
601 xm_file=pa/xm-pahpux.h
602 xmake_file=pa/x-pa-hpux
603 if [[ x$gas = xyes ]]
605 tm_file="${tm_file} pa/pa-gas.h"
607 install_headers_dir=install-headers-cpio
611 if [[ x$enable_haifa != xno ]]; then
614 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
615 xm_file=pa/xm-pahpux.h
616 xmake_file=pa/x-pa-hpux
617 if [[ x$gas = xyes ]]
619 tm_file="${tm_file} pa/pa-gas.h"
621 install_headers_dir=install-headers-cpio
625 if [[ x$enable_haifa != xno ]]; then
629 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
630 xm_file=pa/xm-pahpux.h
631 xmake_file=pa/x-pa-hpux
632 if [[ x$gas = xyes ]]
634 tm_file="${tm_file} pa/pa-gas.h"
636 install_headers_dir=install-headers-cpio
640 if [[ x$enable_haifa != xno ]]; then
643 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
644 xm_file=pa/xm-pahpux.h
645 xmake_file=pa/x-pa-hpux
646 if [[ x$gas = xyes ]]
648 tm_file="${tm_file} pa/pa-gas.h"
650 install_headers_dir=install-headers-cpio
654 if [[ x$enable_haifa != xno ]]; then
658 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
659 xm_file=pa/xm-pahpux.h
660 xmake_file=pa/x-pa-hpux
661 if [[ x$gas = xyes ]]
663 tm_file="${tm_file} pa/pa-gas.h"
665 install_headers_dir=install-headers-cpio
669 if [[ x$enable_haifa != xno ]]; then
672 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
673 xm_file=pa/xm-pahpux.h
674 xmake_file=pa/x-pa-hpux
675 if [[ x$gas = xyes ]]
677 tm_file="${tm_file} pa/pa-gas.h"
679 install_headers_dir=install-headers-cpio
683 if [[ x$enable_haifa != xno ]]; then
688 fixincludes=Makefile.in
692 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
693 if [[ x$gas = xyes ]]
695 tm_file=i386/aix386.h
696 extra_parts="crtbegin.o crtend.o"
697 tmake_file=i386/t-crtstuff
699 tm_file=i386/aix386ng.h
702 xm_file=i386/xm-aix.h
703 xmake_file=i386/x-aix
705 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
706 xm_file=i386/xm-sysv4.h
707 xmake_file=i386/x-ncr3000
708 if [[ x$stabs = xyes -a x$gas = xyes ]]
710 tm_file=i386/sysv4gdb.h
714 extra_parts="crtbegin.o crtend.o"
715 tmake_file=i386/t-crtpic
719 xm_file=i386/xm-next.h
720 tmake_file=i386/t-next
721 xmake_file=i386/x-next
722 extra_objs=nextstep.o
723 if [[ x$enable_threads = xyes ]]; then
727 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
729 if [[ x$gas = xyes ]]
731 tm_file=i386/seq-gas.h
733 tm_file=i386/sequent.h
736 i[[3456]]86-sequent-ptx1*)
737 xm_file=i386/xm-sysv3.h
738 xmake_file=i386/x-sysv3
739 tm_file=i386/seq-sysv3.h
740 tmake_file=i386/t-crtstuff
741 fixincludes=fixinc.ptx
742 extra_parts="crtbegin.o crtend.o"
743 install_headers_dir=install-headers-cpio
745 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
746 xm_file=i386/xm-sysv3.h
747 xmake_file=i386/x-sysv3
748 tm_file=i386/seq2-sysv3.h
749 tmake_file=i386/t-crtstuff
750 extra_parts="crtbegin.o crtend.o"
751 fixincludes=fixinc.ptx
752 install_headers_dir=install-headers-cpio
754 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
755 xm_file=i386/xm-sysv4.h
757 tm_file=i386/ptx4-i.h
759 extra_parts="crtbegin.o crtend.o"
760 fixincludes=fixinc.ptx
761 install_headers_dir=install-headers-cpio
763 i386-sun-sunos*) # Sun i386 roadrunner
764 xm_file=i386/xm-sun.h
769 tm_file=i386/i386-aout.h
770 tmake_file=i386/t-i386bare
772 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
773 tm_file=i386/bsd386.h
774 xm_file=i386/xm-bsd386.h
775 # tmake_file=t-libc-ok
778 tm_file=i386/386bsd.h
779 xm_file=i386/xm-bsd386.h
780 # tmake_file=t-libc-ok
781 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
784 i[[3456]]86-*-freebsdelf*)
785 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
786 xm_file=i386/xm-freebsd.h
787 # On FreeBSD, the headers are already ok.
788 fixincludes=Makefile.in
789 tmake_file=i386/t-freebsd
794 i[[3456]]86-*-freebsd*)
795 tm_file=i386/freebsd.h
796 xm_file=i386/xm-freebsd.h
797 # On FreeBSD, the headers are already ok.
798 fixincludes=Makefile.in
799 tmake_file=i386/t-freebsd
801 i[[3456]]86-*-netbsd*)
802 tm_file=i386/netbsd.h
803 xm_file=i386/xm-netbsd.h
804 # On NetBSD, the headers are already okay.
805 fixincludes=Makefile.in
809 tm_file=i386/i386-coff.h
810 tmake_file=i386/t-i386bare
812 i[[3456]]86-*-isc*) # 80386 running ISC system
813 xm_file=i386/xm-isc.h
815 i[[345]]86-*-isc[[34]]*)
816 xmake_file=i386/x-isc3
819 xmake_file=i386/x-isc
822 if [[ x$gas = xyes -a x$stabs = xyes ]]
824 tm_file=i386/iscdbx.h
825 tmake_file=i386/t-svr3dbx
826 extra_parts="svr3.ifile svr3z.ifile"
828 tm_file=i386/isccoff.h
829 tmake_file=i386/t-crtstuff
830 extra_parts="crtbegin.o crtend.o"
832 install_headers_dir=install-headers-cpio
834 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
835 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
836 xmake_file=x-linux-aout
837 tmake_file="t-linux-aout i386/t-crtstuff"
838 tm_file=i386/linux-oldld.h
839 fixincludes=Makefile.in #On Linux, the headers are ok already.
842 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
843 xm_file=i386/xm-linux.h # with a.out format
844 xmake_file=x-linux-aout
845 tmake_file="t-linux-aout i386/t-crtstuff"
846 tm_file=i386/linux-aout.h
847 fixincludes=Makefile.in #On Linux, the headers are ok already.
850 i[[3456]]86-*-linux-gnulibc1)
851 xm_file=i386/xm-linux.h # Intel 80386's running Linux
852 xmake_file=x-linux # with ELF format using the
853 tm_file=i386/linux.h # Linux C library 5
854 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
855 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
856 fixincludes=Makefile.in #On Linux, the headers are ok already.
858 if [[ x$enable_threads = xyes ]]; then
862 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
863 xm_file=i386/xm-linux.h # with ELF format using glibc 2
864 xmake_file=x-linux # aka Linux C library 6
866 tmake_file="t-linux i386/t-crtstuff"
867 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
868 fixincludes=Makefile.in #On Linux, the headers are ok already.
870 if [[ x$enable_threads = xyes ]]; then
876 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
877 xm_file=i386/xm-go32.h
879 tmake_file=i386/t-go32
881 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
884 fixincludes=Makefile.in
888 i[[3456]]86-*-lynxos*)
889 if [[ x$gas = xyes ]]
893 tm_file=i386/lynx-ng.h
895 xm_file=i386/xm-lynx.h
896 tmake_file=i386/t-i386bare
901 # tmake_file=t-libc-ok
904 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
905 if [[ x$elf = xyes ]]
907 tm_file=i386/osfelf.h
910 tm_file=i386/osfrose.h
913 xm_file=i386/xm-osf.h
914 xmake_file=i386/x-osfrose
915 tmake_file=i386/t-osf
918 i[[345]]86-go32-rtems*)
920 xm_file=i386/xm-go32.h
921 tm_file=i386/go32-rtems.h
922 tmake_file="i386/t-go32 t-rtems"
927 tmake_file="i386/t-i386bare t-rtems"
929 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
930 xm_file=i386/xm-sco5.h
931 xmake_file=i386/x-sco5
932 fixincludes=fixinc.sco
934 tmake_file=i386/t-sco5
935 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
937 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
938 xm_file=i386/xm-sco.h
939 xmake_file=i386/x-sco4
940 fixincludes=fixinc.sco
941 install_headers_dir=install-headers-cpio
942 if [[ x$stabs = xyes ]]
944 tm_file=i386/sco4dbx.h
945 tmake_file=i386/t-svr3dbx
946 extra_parts="svr3.ifile svr3z.rfile"
949 tmake_file=i386/t-crtstuff
950 extra_parts="crtbegin.o crtend.o"
954 i[[3456]]86-*-sco*) # 80386 running SCO system
955 xm_file=i386/xm-sco.h
956 xmake_file=i386/x-sco
957 install_headers_dir=install-headers-cpio
958 if [[ x$stabs = xyes ]]
960 tm_file=i386/scodbx.h
961 tmake_file=i386/t-svr3dbx
962 extra_parts="svr3.ifile svr3z.rfile"
965 extra_parts="crtbegin.o crtend.o"
966 tmake_file=i386/t-crtstuff
970 i[[3456]]86-*-solaris2*)
971 xm_file=i386/xm-sysv4.h
972 if [[ x$stabs = xyes ]]
974 tm_file=i386/sol2dbg.h
978 tmake_file=i386/t-sol2
979 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
981 fixincludes=fixinc.svr4
982 if [[ x$enable_threads = xyes ]]; then
983 thread_file='solaris'
986 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
987 xm_file=i386/xm-sysv4.h
989 if [[ x$stabs = xyes ]]
991 tm_file="${tm_file} dbx.h"
993 tmake_file=i386/t-crtpic
995 extra_parts="crtbegin.o crtend.o"
997 i[[3456]]86-*-sysv*) # Intel 80386's running system V
998 xm_file=i386/xm-sysv3.h
999 xmake_file=i386/x-sysv3
1000 if [[ x$gas = xyes ]]
1002 if [[ x$stabs = xyes ]]
1004 tm_file=i386/svr3dbx.h
1005 tmake_file=i386/t-svr3dbx
1006 extra_parts="svr3.ifile svr3z.rfile"
1008 tm_file=i386/svr3gas.h
1009 extra_parts="crtbegin.o crtend.o"
1010 tmake_file=i386/t-crtstuff
1013 tm_file=i386/sysv3.h
1014 extra_parts="crtbegin.o crtend.o"
1015 tmake_file=i386/t-crtstuff
1018 i386-*-vsta) # Intel 80386's running VSTa kernel
1019 xm_file=i386/xm-vsta.h
1021 tmake_file=i386/t-vsta
1022 xmake_file=i386/x-vsta
1024 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1025 xm_file="${xm_file} i386/xm-cygwin32.h"
1026 tmake_file=i386/t-cygwin32
1027 tm_file=i386/cygwin32.h
1028 xmake_file=i386/x-cygwin32
1030 fixincludes=Makefile.in
1031 if [[ x$enable_threads = xyes ]]; then
1036 i[[3456]]86-*-mingw32)
1037 tm_file=i386/mingw32.h
1038 xm_file="${xm_file} i386/xm-mingw32.h"
1039 tmake_file=i386/t-cygwin32
1041 xmake_file=i386/x-cygwin32
1042 fixincludes=Makefile.in
1043 if [[ x$enable_threads = xyes ]]; then
1048 i[[3456]]86-*-winnt3*)
1049 tm_file=i386/win-nt.h
1050 out_file=i386/i386.c
1051 xm_file=i386/xm-winnt.h
1052 xmake_file=winnt/x-winnt
1053 tmake_file=i386/t-winnt
1054 extra_host_objs="winnt.o oldnames.o"
1055 extra_gcc_objs="spawnv.o oldnames.o"
1056 fixincludes=fixinc.winnt
1057 if [[ x$gnu_ld != xyes ]]
1059 extra_programs=ld.exe
1061 if [[ x$enable_threads = xyes ]]; then
1065 i[[3456]]86-dg-dgux)
1066 xm_file=i386/xm-dgux.h
1067 out_file=i386/dgux.c
1069 tmake_file=i386/t-dgux
1070 xmake_file=i386/x-dgux
1071 fixincludes=fixinc.dgux
1072 install_headers_dir=install-headers-cpio
1074 i860-alliant-*) # Alliant FX/2800
1075 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1076 xm_file="${xm_file} i860/xm-fx2800.h"
1077 xmake_file=i860/x-fx2800
1078 tmake_file=i860/t-fx2800
1079 extra_parts="crtbegin.o crtend.o"
1082 tm_file="${tm_file} i860/bsd.h"
1083 if [[ x$gas = xyes ]]
1085 tm_file="${tm_file} i860/bsd-gas.h"
1090 tm_file="${tm_file} i860/mach.h"
1091 tmake_file=t-libc-ok
1093 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1094 tm_file="${tm_file} svr3.h i860/paragon.h"
1095 xm_file="${xm_file} xm-svr3.h"
1099 tm_file="${tm_file} svr3.h i860/sysv3.h"
1100 xm_file="${tm_file} xm-svr3.h"
1101 xmake_file=i860/x-sysv3
1102 extra_parts="crtbegin.o crtend.o"
1105 tm_file="${tm_file} svr4.h i860/sysv4.h"
1106 xm_file="${xm_file} xm-svr3.h"
1107 xmake_file=i860/x-sysv4
1109 extra_parts="crtbegin.o crtend.o"
1111 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1112 tm_file="${tm_file} i960/vx960.h"
1113 tmake_file=i960/t-vxworks960
1117 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1118 tmake_file=i960/t-vxworks960
1122 tm_file="${tm_file} i960/vx960.h"
1123 tmake_file=i960/t-vxworks960
1127 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1128 tmake_file=i960/t-960bare
1132 tmake_file="i960/t-960bare t-rtems"
1133 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1136 i960-*-*) # Default i960 environment.
1140 extra_parts="crtinit.o crtfini.o"
1142 m68000-convergent-sysv*)
1144 xm_file=m68k/xm-3b1.h
1146 extra_headers=math-68881.h
1148 m68000-hp-bsd*) # HP 9000/200 running BSD
1149 tm_file=m68k/hp2bsd.h
1150 xmake_file=m68k/x-hp2bsd
1152 extra_headers=math-68881.h
1154 m68000-hp-hpux*) # HP 9000 series 300
1155 xm_file=m68k/xm-hp320.h
1156 if [[ x$gas = xyes ]]
1158 xmake_file=m68k/x-hp320g
1159 tm_file=m68k/hp310g.h
1161 xmake_file=m68k/x-hp320
1162 tm_file=m68k/hp310.h
1164 install_headers_dir=install-headers-cpio
1166 extra_headers=math-68881.h
1171 extra_headers=math-68881.h
1174 tm_file=m68k/sun2o4.h
1176 extra_headers=math-68881.h
1179 xm_file=m68k/xm-3b1.h
1180 if [[ x$gas = xyes ]]
1187 extra_headers=math-68881.h
1189 m68k-apple-aux*) # Apple Macintosh running A/UX
1190 xm_file=m68k/xm-aux.h
1191 tmake_file=m68k/t-aux
1192 install_headers_dir=install-headers-cpio
1193 extra_headers=math-68881.h
1194 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1196 if [[ "$gnu_ld" = yes ]]
1198 tm_file="${tm_file} m68k/auxgld.h"
1200 tm_file="${tm_file} m68k/auxld.h"
1202 if [[ "$gas" = yes ]]
1204 tm_file="${tm_file} m68k/auxgas.h"
1206 tm_file="${tm_file} m68k/auxas.h"
1208 tm_file="${tm_file} m68k/a-ux.h"
1211 tm_file=m68k/apollo68.h
1212 xmake_file=m68k/x-apollo68
1214 extra_headers=math-68881.h
1216 m68k-altos-sysv*) # Altos 3068
1217 if [[ x$gas = xyes ]]
1219 tm_file=m68k/altos3068.h
1220 xm_file=m68k/xm-altos3068.h
1222 echo "The Altos is supported only with the GNU assembler" 1>&2
1225 extra_headers=math-68881.h
1227 m68k-bull-sysv*) # Bull DPX/2
1228 if [[ x$gas = xyes ]]
1230 if [[ x$stabs = xyes ]]
1232 tm_file=m68k/dpx2cdbx.h
1234 tm_file=m68k/dpx2g.h
1239 xm_file=m68k/xm-m68kv.h
1240 xmake_file=m68k/x-dpx2
1242 extra_headers=math-68881.h
1244 m68k-atari-sysv4*) # Atari variant of V.4.
1245 tm_file=m68k/atari.h
1246 xm_file=m68k/xm-atari.h
1248 extra_parts="crtbegin.o crtend.o"
1249 extra_headers=math-68881.h
1251 m68k-motorola-sysv*)
1252 tm_file=m68k/mot3300.h
1253 xm_file=m68k/xm-mot3300.h
1254 if [[ x$gas = xyes ]]
1256 xmake_file=m68k/x-mot3300-gas
1257 if [[ x$gnu_ld = xyes ]]
1259 tmake_file=m68k/t-mot3300-gald
1261 tmake_file=m68k/t-mot3300-gas
1265 xmake_file=m68k/x-mot3300
1266 if [[ x$gnu_ld = xyes ]]
1268 tmake_file=m68k/t-mot3300-gld
1270 tmake_file=m68k/t-mot3300
1274 gdb_needs_out_file_path=yes
1275 extra_parts="crt0.o mcrt0.o"
1276 extra_headers=math-68881.h
1278 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1279 tm_file=m68k/tower-as.h
1280 xm_file=m68k/xm-tower.h
1281 xmake_file=m68k/x-tower
1282 extra_parts="crtbegin.o crtend.o"
1283 extra_headers=math-68881.h
1286 tm_file=m68k/plexus.h
1287 xm_file=m68k/xm-plexus.h
1289 extra_headers=math-68881.h
1293 xm_file=m68k/xm-m68kv.h
1294 extra_headers=math-68881.h
1297 xm_file=m68k/xm-crds.h
1298 xmake_file=m68k/x-crds
1301 extra_headers=math-68881.h
1303 m68k-cbm-sysv4*) # Commodore variant of V.4.
1305 xm_file=m68k/xm-amix.h
1306 xmake_file=m68k/x-amix
1308 extra_parts="crtbegin.o crtend.o"
1309 extra_headers=math-68881.h
1312 tm_file=m68k/ccur-GAS.h
1313 xmake_file=m68k/x-ccur
1314 extra_headers=math-68881.h
1317 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1318 tm_file=m68k/hp3bsd44.h
1319 xmake_file=m68k/x-hp3bsd44
1321 extra_headers=math-68881.h
1323 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1324 tm_file=m68k/hp3bsd.h
1326 extra_headers=math-68881.h
1329 if [[ x$with_fp = xno ]]
1331 tm_file=m68k/isi-nfp.h
1336 extra_headers=math-68881.h
1338 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1339 xm_file=m68k/xm-hp320.h
1340 if [[ x$gas = xyes ]]
1342 xmake_file=m68k/x-hp320g
1343 tm_file=m68k/hp320g.h
1345 xmake_file=m68k/x-hp320
1346 tm_file=m68k/hpux7.h
1348 install_headers_dir=install-headers-cpio
1350 extra_headers=math-68881.h
1352 m68k-hp-hpux*) # HP 9000 series 300
1353 xm_file=m68k/xm-hp320.h
1354 if [[ x$gas = xyes ]]
1356 xmake_file=m68k/x-hp320g
1357 tm_file=m68k/hp320g.h
1359 xmake_file=m68k/x-hp320
1360 tm_file=m68k/hp320.h
1362 install_headers_dir=install-headers-cpio
1364 extra_headers=math-68881.h
1367 tm_file=m68k/sun3mach.h
1369 extra_headers=math-68881.h
1372 if [[ x$gas = xyes ]]
1374 tm_file=m68k/news3gas.h
1376 tm_file=m68k/news3.h
1379 extra_headers=math-68881.h
1381 m68k-sony-bsd* | m68k-sony-newsos*)
1382 if [[ x$gas = xyes ]]
1384 tm_file=m68k/newsgas.h
1389 extra_headers=math-68881.h
1391 m68k-next-nextstep2*)
1392 tm_file=m68k/next21.h
1393 xm_file=m68k/xm-next.h
1394 tmake_file=m68k/t-next
1395 xmake_file=m68k/x-next
1396 extra_objs=nextstep.o
1397 extra_headers=math-68881.h
1400 m68k-next-nextstep3*)
1402 xm_file=m68k/xm-next.h
1403 tmake_file=m68k/t-next
1404 xmake_file=m68k/x-next
1405 extra_objs=nextstep.o
1406 extra_headers=math-68881.h
1407 if [[ x$enable_threads = xyes ]]; then
1412 if [[ x$with_fp = xno ]]
1414 tm_file=m68k/sun3n3.h
1416 tm_file=m68k/sun3o3.h
1419 extra_headers=math-68881.h
1421 m68k-sun-sunos*) # For SunOS 4 (the default).
1422 if [[ x$with_fp = xno ]]
1424 tm_file=m68k/sun3n.h
1428 xm_file=m68k/xm-sun3.h
1430 extra_headers=math-68881.h
1433 tm_file=m68k/vxm68k.h
1434 tmake_file=m68k/t-vxworks68
1435 extra_headers=math-68881.h
1438 tmake_file=m68k/t-m68kbare
1439 tm_file="m68k/m68k-aout.h libgloss.h"
1440 extra_headers=math-68881.h
1443 tmake_file=m68k/t-m68kbare
1444 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1445 extra_headers=math-68881.h
1448 if [[ x$gas = xyes ]]
1452 tm_file=m68k/lynx-ng.h
1454 xm_file=m68k/xm-lynx.h
1456 tmake_file=m68k/t-lynx
1457 extra_headers=math-68881.h
1460 tm_file=m68k/netbsd.h
1461 xm_file=m68k/xm-netbsd.h
1462 # On NetBSD, the headers are already okay.
1463 fixincludes=Makefile.in
1466 m68k-*-sysv3*) # Motorola m68k's running system V.3
1467 xm_file=m68k/xm-m68kv.h
1468 xmake_file=m68k/x-m68kv
1469 extra_parts="crtbegin.o crtend.o"
1470 extra_headers=math-68881.h
1472 m68k-*-sysv4*) # Motorola m68k's running system V.4
1473 tm_file=m68k/m68kv4.h
1474 xm_file=m68k/xm-m68kv.h
1476 extra_parts="crtbegin.o crtend.o"
1477 extra_headers=math-68881.h
1479 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1480 xm_file=m68k/xm-linux.h # with a.out format
1482 tm_file=m68k/linux-aout.h
1483 tmake_file="t-linux-aout m68k/t-linux-aout"
1484 fixincludes=Makefile.in #On Linux, the headers are ok already.
1485 extra_headers=math-68881.h
1488 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1489 xm_file=m68k/xm-linux.h # with ELF format using the
1490 xmake_file=x-linux # Linux C library 5
1491 tm_file=m68k/linux.h
1492 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1493 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1494 fixincludes=Makefile.in #On Linux, the headers are ok already.
1495 extra_headers=math-68881.h
1498 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1499 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1500 xmake_file=x-linux # aka the Linux C library 6.
1501 tm_file=m68k/linux.h
1502 tmake_file="t-linux m68k/t-linux"
1503 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1504 fixincludes=Makefile.in #On Linux, the headers are ok already.
1505 extra_headers=math-68881.h
1507 if [[ x$enable_threads = xyes ]]; then
1512 tmake_file=m68k/t-m68kbare
1513 tm_file=m68k/m68k-psos.h
1514 extra_headers=math-68881.h
1517 tmake_file="m68k/t-m68kbare t-rtems"
1518 tm_file=m68k/rtems.h
1519 extra_headers=math-68881.h
1525 tm_file=m88k/dguxbcs.h
1526 tmake_file=m88k/t-dguxbcs
1530 tmake_file=m88k/t-dgux
1533 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1534 xmake_file=m88k/x-dgux
1535 if [[ x$gas = xyes ]]
1537 tmake_file=m88k/t-dgux-gas
1539 fixincludes=fixinc.dgux
1541 m88k-dolphin-sysv3*)
1542 tm_file=m88k/dolph.h
1543 extra_parts="crtbegin.o crtend.o"
1544 xm_file=m88k/xm-sysv3.h
1545 xmake_file=m88k/x-dolph
1546 if [[ x$gas = xyes ]]
1548 tmake_file=m88k/t-m88k-gas
1551 m88k-tektronix-sysv3)
1552 tm_file=m88k/tekXD88.h
1553 extra_parts="crtbegin.o crtend.o"
1554 xm_file=m88k/xm-sysv3.h
1555 xmake_file=m88k/x-tekXD88
1556 if [[ x$gas = xyes ]]
1558 tmake_file=m88k/t-m88k-gas
1562 tm_file=m88k/m88k-aout.h
1565 tm_file=m88k/m88k-coff.h
1566 tmake_file=m88k/t-bug
1570 extra_parts="crtbegin.o crtend.o"
1571 if [[ x$gas = xyes ]]
1573 tmake_file=m88k/t-luna-gas
1575 tmake_file=m88k/t-luna
1579 tm_file=m88k/sysv3.h
1580 extra_parts="crtbegin.o crtend.o"
1581 xm_file=m88k/xm-sysv3.h
1582 xmake_file=m88k/x-sysv3
1583 if [[ x$gas = xyes ]]
1585 tmake_file=m88k/t-m88k-gas
1589 tm_file=m88k/sysv4.h
1590 extra_parts="crtbegin.o crtend.o"
1591 xmake_file=m88k/x-sysv4
1592 tmake_file=m88k/t-sysv4
1594 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1595 tm_file=mips/iris6.h
1596 xm_file=mips/xm-iris6.h
1597 fixincludes=fixinc.irix
1598 xmake_file=mips/x-iris6
1599 tmake_file=mips/t-iris6
1600 if [[ x$enable_threads = xyes ]]; then
1604 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1605 tm_file=mips/cross64.h
1606 xm_file=mips/xm-iris5.h
1607 fixincludes=Makefile.in
1608 xmake_file=mips/x-iris
1609 tmake_file=mips/t-cross64
1610 # See comment in mips/iris[56].h files.
1612 if [[ x$enable_threads = xyes ]]; then
1617 if [[ x$gas = xyes ]]
1619 if [[ x$stabs = xyes ]]
1621 tm_file=mips/iris5gdb.h
1623 tm_file=mips/sni-gas.h
1626 tm_file=mips/sni-svr4.h
1628 xm_file=mips/xm-sysv.h
1629 xmake_file=mips/x-sni-svr4
1630 tmake_file=mips/t-mips-gas
1631 if [[ x$gnu_ld != xyes ]]
1636 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1637 if [[ x$gas = xyes ]]
1639 tm_file=mips/iris5gas.h
1640 if [[ x$stabs = xyes ]]
1642 tm_file="${tm_file} dbx.h"
1645 tm_file=mips/iris5.h
1647 xm_file=mips/xm-iris5.h
1648 fixincludes=fixinc.irix
1649 xmake_file=mips/x-iris
1650 # mips-tfile doesn't work yet
1651 tmake_file=mips/t-mips-gas
1652 # See comment in mips/iris5.h file.
1654 if [[ x$enable_threads = xyes ]]; then
1658 mips-sgi-irix4loser*) # Mostly like a MIPS.
1659 tm_file=mips/iris4loser.h
1660 if [[ x$stabs = xyes ]]; then
1661 tm_file="${tm_file} dbx.h"
1663 xm_file=mips/xm-iris4.h
1664 xmake_file=mips/x-iris
1665 if [[ x$gas = xyes ]]
1667 tmake_file=mips/t-mips-gas
1669 extra_passes="mips-tfile mips-tdump"
1671 if [[ x$gnu_ld != xyes ]]
1675 if [[ x$enable_threads = xyes ]]; then
1679 mips-sgi-irix4*) # Mostly like a MIPS.
1680 tm_file=mips/iris4.h
1681 if [[ x$stabs = xyes ]]; then
1682 tm_file="${tm_file} dbx.h"
1684 xm_file=mips/xm-iris4.h
1685 xmake_file=mips/x-iris
1686 if [[ x$gas = xyes ]]
1688 tmake_file=mips/t-mips-gas
1690 extra_passes="mips-tfile mips-tdump"
1692 if [[ x$gnu_ld != xyes ]]
1696 if [[ x$enable_threads = xyes ]]; then
1700 mips-sgi-*) # Mostly like a MIPS.
1701 tm_file=mips/iris3.h
1702 if [[ x$stabs = xyes ]]; then
1703 tm_file="${tm_file} dbx.h"
1705 xm_file=mips/xm-iris3.h
1706 xmake_file=mips/x-iris3
1707 if [[ x$gas = xyes ]]
1709 tmake_file=mips/t-mips-gas
1711 extra_passes="mips-tfile mips-tdump"
1713 if [[ x$gnu_ld != xyes ]]
1718 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1719 tm_file=mips/osfrose.h
1720 xmake_file=mips/x-osfrose
1721 tmake_file=mips/t-osfrose
1722 extra_objs=halfpic.o
1725 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1726 tm_file=mips/dec-osf1.h
1727 if [[ x$stabs = xyes ]]; then
1728 tm_file="${tm_file} dbx.h"
1730 xmake_file=mips/x-dec-osf1
1731 if [[ x$gas = xyes ]]
1733 tmake_file=mips/t-mips-gas
1735 tmake_file=mips/t-ultrix
1736 extra_passes="mips-tfile mips-tdump"
1738 if [[ x$gnu_ld != xyes ]]
1743 mips-dec-bsd*) # Decstation running 4.4 BSD
1744 tm_file=mips/dec-bsd.h
1746 if [[ x$gas = xyes ]]
1748 tmake_file=mips/t-mips-gas
1750 tmake_file=mips/t-ultrix
1751 extra_passes="mips-tfile mips-tdump"
1753 if [[ x$gnu_ld != xyes ]]
1758 mips-dec-netbsd*) # Decstation running NetBSD
1759 tm_file=mips/netbsd.h
1760 xm_file=mips/xm-netbsd.h
1761 # On NetBSD, the headers are already okay.
1762 fixincludes=Makefile.in
1764 if [[ x$prefix = xNONE ]]; then
1765 prefix=$native_prefix
1767 prefix=$native_prefix
1769 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1770 tm_file=mips/news4.h
1771 if [[ x$stabs = xyes ]]; then
1772 tm_file="${tm_file} dbx.h"
1774 if [[ x$gas = xyes ]]
1776 tmake_file=mips/t-mips-gas
1778 extra_passes="mips-tfile mips-tdump"
1780 if [[ x$gnu_ld != xyes ]]
1784 xmake_file=mips/x-sony
1786 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1787 # That is based on svr4.
1788 # t-svr4 is not right because this system doesn't use ELF.
1789 tm_file=mips/news5.h
1790 if [[ x$stabs = xyes ]]; then
1791 tm_file="${tm_file} dbx.h"
1793 xm_file=mips/xm-news.h
1794 if [[ x$gas = xyes ]]
1796 tmake_file=mips/t-mips-gas
1798 extra_passes="mips-tfile mips-tdump"
1800 if [[ x$gnu_ld != xyes ]]
1805 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1806 tm_file=mips/svr4-t.h
1807 if [[ x$stabs = xyes ]]; then
1808 tm_file="${tm_file} dbx.h"
1810 xm_file=mips/xm-sysv4.h
1811 xmake_file=mips/x-sysv
1812 if [[ x$gas = xyes ]]
1814 tmake_file=mips/t-mips-gas
1815 extra_parts="crtbegin.o crtend.o"
1817 tmake_file=mips/t-mips
1818 extra_passes="mips-tfile mips-tdump"
1820 if [[ x$gnu_ld != xyes ]]
1825 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1826 tm_file=mips/ultrix.h
1827 if [[ x$stabs = xyes ]]; then
1828 tm_file="${tm_file} dbx.h"
1830 xmake_file=mips/x-ultrix
1831 if [[ x$gas = xyes ]]
1833 tmake_file=mips/t-mips-gas
1835 tmake_file=mips/t-ultrix
1836 extra_passes="mips-tfile mips-tdump"
1838 if [[ x$gnu_ld != xyes ]]
1843 mips-*-riscos[[56789]]bsd*)
1844 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1845 if [[ x$stabs = xyes ]]; then
1846 tm_file="${tm_file} dbx.h"
1848 if [[ x$gas = xyes ]]
1850 tmake_file=mips/t-bsd-gas
1852 tmake_file=mips/t-bsd
1853 extra_passes="mips-tfile mips-tdump"
1855 if [[ x$gnu_ld != xyes ]]
1860 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1861 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1862 if [[ x$stabs = xyes ]]; then
1863 tm_file="${tm_file} dbx.h"
1865 if [[ x$gas = xyes ]]
1867 tmake_file=mips/t-bsd-gas
1869 tmake_file=mips/t-bsd
1870 extra_passes="mips-tfile mips-tdump"
1872 if [[ x$gnu_ld != xyes ]]
1877 mips-*-riscos[[56789]]sysv4*)
1878 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1879 if [[ x$stabs = xyes ]]; then
1880 tm_file="${tm_file} dbx.h"
1882 xm_file=mips/xm-sysv4.h
1883 xmake_file=mips/x-sysv
1884 if [[ x$gas = xyes ]]
1886 tmake_file=mips/t-svr4-gas
1888 tmake_file=mips/t-svr4
1889 extra_passes="mips-tfile mips-tdump"
1891 if [[ x$gnu_ld != xyes ]]
1896 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1897 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1898 if [[ x$stabs = xyes ]]; then
1899 tm_file="${tm_file} dbx.h"
1901 xm_file=mips/xm-sysv.h
1902 xmake_file=mips/x-sysv
1903 if [[ x$gas = xyes ]]
1905 tmake_file=mips/t-svr4-gas
1907 tmake_file=mips/t-svr4
1908 extra_passes="mips-tfile mips-tdump"
1910 if [[ x$gnu_ld != xyes ]]
1915 mips-*-riscos[[56789]]sysv*)
1916 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1917 if [[ x$stabs = xyes ]]; then
1918 tm_file="${tm_file} dbx.h"
1920 xm_file=mips/xm-sysv.h
1921 xmake_file=mips/x-sysv
1922 if [[ x$gas = xyes ]]
1924 tmake_file=mips/t-svr3-gas
1926 tmake_file=mips/t-svr3
1927 extra_passes="mips-tfile mips-tdump"
1929 if [[ x$gnu_ld != xyes ]]
1934 mips-*-sysv* | mips-*-riscos*sysv*)
1935 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1936 if [[ x$stabs = xyes ]]; then
1937 tm_file="${tm_file} dbx.h"
1939 xm_file=mips/xm-sysv.h
1940 xmake_file=mips/x-sysv
1941 if [[ x$gas = xyes ]]
1943 tmake_file=mips/t-svr3-gas
1945 tmake_file=mips/t-svr3
1946 extra_passes="mips-tfile mips-tdump"
1948 if [[ x$gnu_ld != xyes ]]
1953 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1954 tm_file=mips/mips-5.h
1955 if [[ x$stabs = xyes ]]; then
1956 tm_file="${tm_file} dbx.h"
1958 if [[ x$gas = xyes ]]
1960 tmake_file=mips/t-mips-gas
1962 extra_passes="mips-tfile mips-tdump"
1964 if [[ x$gnu_ld != xyes ]]
1972 tm_file=mips/ecoffl.h
1973 if [[ x$stabs = xyes ]]; then
1974 tm_file="${tm_file} dbx.h"
1976 tmake_file=mips/t-ecoff
1979 tm_file=mips/ecoff.h
1980 if [[ x$stabs = xyes ]]; then
1981 tm_file="${tm_file} dbx.h"
1983 tmake_file=mips/t-ecoff
1986 tm_file="mips/elfl.h libgloss.h"
1987 tmake_file=mips/t-ecoff
1990 tm_file="mips/elf.h libgloss.h"
1991 tmake_file=mips/t-ecoff
1994 tm_file="mips/elfl64.h libgloss.h"
1995 tmake_file=mips/t-ecoff
1997 mips64orionel-*-elf*)
1998 tm_file="mips/elflorion.h libgloss.h"
1999 tmake_file=mips/t-ecoff
2002 tm_file="mips/elf64.h libgloss.h"
2003 tmake_file=mips/t-ecoff
2006 tm_file="mips/elforion.h libgloss.h"
2007 tmake_file=mips/t-ecoff
2009 mips64orion-*-rtems*)
2010 tm_file=mips/rtems64.h
2011 tmake_file="mips/t-ecoff t-rtems"
2013 mips-*-*) # Default MIPS RISC-OS 4.0.
2014 if [[ x$stabs = xyes ]]; then
2015 tm_file="${tm_file} dbx.h"
2017 if [[ x$gas = xyes ]]
2019 tmake_file=mips/t-mips-gas
2021 extra_passes="mips-tfile mips-tdump"
2023 if [[ x$gnu_ld != xyes ]]
2030 tm_file="mn10200/mn10200.h"
2031 if [[ x$stabs = xyes ]]
2033 tm_file="${tm_file} dbx.h"
2039 tm_file="mn10300/mn10300.h"
2040 if [[ x$stabs = xyes ]]
2042 tm_file="${tm_file} dbx.h"
2047 tm_file=ns32k/encore.h
2051 tm_file=ns32k/sequent.h
2055 tm_file=ns32k/tek6100.h
2059 tm_file=ns32k/tek6200.h
2062 # This has not been updated to GCC 2.
2064 # xm_file=ns32k/xm-genix.h
2065 # xmake_file=ns32k/x-genix
2066 # tm_file=ns32k/genix.h
2070 tm_file=ns32k/merlin.h
2074 tm_file=ns32k/pc532-mach.h
2078 tm_file=ns32k/pc532-min.h
2079 xm_file=ns32k/xm-pc532-min.h
2082 ns32k-pc532-netbsd*)
2083 tm_file=ns32k/netbsd.h
2084 xm_file=ns32k/xm-netbsd.h
2085 # On NetBSD, the headers are already okay.
2086 fixincludes=Makefile.in
2090 tm_file="${tm_file} pdp11/2bsd.h"
2096 xmake_file=pyr/x-pyr
2103 xmake_file=romp/x-mach
2106 powerpc-*-sysv* | powerpc-*-elf*)
2107 tm_file=rs6000/sysv4.h
2108 xm_file=rs6000/xm-sysv4.h
2109 extra_headers=ppc-asm.h
2110 if [[ x$gas = xyes ]]
2112 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2114 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2116 xmake_file=rs6000/x-sysv4
2119 tm_file=rs6000/eabiaix.h
2120 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2121 fixincludes=Makefile.in
2122 extra_headers=ppc-asm.h
2125 tm_file=rs6000/eabisim.h
2126 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2127 fixincludes=Makefile.in
2128 extra_headers=ppc-asm.h
2131 tm_file=rs6000/eabi.h
2132 if [[ x$gas = xyes ]]
2134 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2136 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2138 fixincludes=Makefile.in
2139 extra_headers=ppc-asm.h
2142 tm_file=rs6000/rtems.h
2143 if [[ x$gas = xyes ]]
2145 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2147 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2149 fixincludes=Makefile.in
2150 extra_headers=ppc-asm.h
2152 powerpc-*-linux-gnu*)
2153 tm_file=rs6000/linux.h
2154 xm_file=rs6000/xm-sysv4.h
2155 out_file=rs6000/rs6000.c
2156 if [[ x$gas = xyes ]]
2158 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2160 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2163 fixincludes=Makefile.in
2164 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2165 extra_headers=ppc-asm.h
2166 if [[ x$enable_threads = xyes ]]; then
2172 xm_file=rs6000/xm-sysv4.h
2173 tm_file=rs6000/vxppc.h
2174 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2175 extra_headers=ppc-asm.h
2177 powerpcle-*-sysv* | powerpcle-*-elf*)
2178 tm_file=rs6000/sysv4le.h
2179 xm_file=rs6000/xm-sysv4.h
2180 if [[ x$gas = xyes ]]
2182 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2184 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2186 xmake_file=rs6000/x-sysv4
2187 extra_headers=ppc-asm.h
2189 powerpcle-*-eabisim*)
2190 tm_file=rs6000/eabilesim.h
2191 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2192 fixincludes=Makefile.in
2193 extra_headers=ppc-asm.h
2196 tm_file=rs6000/eabile.h
2197 if [[ x$gas = xyes ]]
2199 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2201 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2203 fixincludes=Makefile.in
2204 extra_headers=ppc-asm.h
2206 powerpcle-*-winnt* )
2207 tm_file=rs6000/win-nt.h
2208 tmake_file=rs6000/t-winnt
2210 fixincludes=Makefile.in
2211 if [[ x$enable_threads = xyes ]]; then
2214 extra_headers=ppc-asm.h
2216 powerpcle-*-pe | powerpcle-*-cygwin32)
2217 tm_file=rs6000/cygwin32.h
2218 xm_file=rs6000/xm-cygwin32.h
2219 tmake_file=rs6000/t-winnt
2220 xmake_file=rs6000/x-cygwin32
2222 fixincludes=Makefile.in
2223 if [[ x$enable_threads = xyes ]]; then
2227 extra_headers=ppc-asm.h
2229 powerpcle-*-solaris2*)
2230 tm_file=rs6000/sol2.h
2231 xm_file=rs6000/xm-sysv4.h
2232 if [[ x$gas = xyes ]]
2234 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2236 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2238 xmake_file=rs6000/x-sysv4
2239 fixincludes=fixinc.svr4
2240 extra_headers=ppc-asm.h
2242 rs6000-ibm-aix3.[[01]]*)
2243 tm_file=rs6000/aix31.h
2244 xmake_file=rs6000/x-aix31
2247 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2248 tm_file=rs6000/aix3newas.h
2249 if [[ x$host != x$target ]]
2251 tmake_file=rs6000/t-xnewas
2253 tmake_file=rs6000/t-newas
2257 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2258 tm_file=rs6000/aix41.h
2259 if [[ x$host != x$target ]]
2261 tmake_file=rs6000/t-xnewas
2263 tmake_file=rs6000/t-newas
2265 xmake_file=rs6000/x-aix31
2275 tm_file=rs6000/mach.h
2276 xm_file=rs6000/xm-mach.h
2277 xmake_file=rs6000/x-mach
2281 tm_file=rs6000/lynx.h
2282 xm_file=rs6000/xm-lynx.h
2283 tmake_file=rs6000/t-rs6000
2284 xmake_file=rs6000/x-lynx
2292 tmake_file="sh/t-sh t-rtems"
2301 xm_file=sparc/xm-pbd.h
2303 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2304 tm_file=sparc/vxsparc.h
2305 tmake_file=sparc/t-vxsparc
2309 tmake_file=sparc/t-sparcbare
2310 tm_file="sparc/aout.h libgloss.h"
2313 tm_file=sparc/netbsd.h
2314 xm_file=sparc/xm-netbsd.h
2315 # On NetBSD, the headers are already okay.
2316 fixincludes=Makefile.in
2322 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2323 xm_file=sparc/xm-linux.h
2324 tm_file=sparc/linux-aout.h
2326 fixincludes=Makefile.in #On Linux, the headers are ok already.
2329 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2330 xm_file=sparc/xm-linux.h # with ELF format using the
2331 xmake_file=x-linux # Linux C library 5.
2332 tm_file=sparc/linux.h
2333 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2334 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2335 fixincludes=Makefile.in #On Linux, the headers are ok already.
2338 sparc-*-linux-gnu*) # Sparc's running Linux
2339 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2340 xmake_file=x-linux # aka the Linux C library 6.
2341 tm_file=sparc/linux.h
2342 tmake_file="t-linux sparc/t-linux"
2343 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2344 fixincludes=Makefile.in #On Linux, the headers are ok already.
2346 if [[ x$enable_threads = xyes ]]; then
2351 if [[ x$gas = xyes ]]
2353 tm_file=sparc/lynx.h
2355 tm_file=sparc/lynx-ng.h
2357 xm_file=sparc/xm-lynx.h
2358 tmake_file=sparc/t-sunos41
2362 tmake_file="sparc/t-sparcbare t-rtems"
2363 tm_file=sparc/rtems.h
2366 tm_file=sparc/sol2.h
2367 xm_file=sparc/xm-sol2.h
2368 tmake_file=sparc/t-sol2
2369 xmake_file=sparc/x-sysv4
2370 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2371 fixincludes=fixinc.svr4
2372 if [[ x$enable_threads = xyes ]]; then
2373 thread_file='solaris'
2377 tm_file=sparc/sunos4.h
2378 tmake_file=sparc/t-sunos40
2382 tm_file=sparc/sunos4.h
2383 tmake_file=sparc/t-sunos41
2387 tm_file=sparc/sun4o3.h
2391 tm_file=sparc/sysv4.h
2392 xm_file=sparc/xm-sysv4.h
2394 xmake_file=sparc/x-sysv4
2395 extra_parts="crtbegin.o crtend.o"
2398 xm_file=sparc/xm-sol2.h
2399 tm_file=sparc/vxsim.h
2400 tmake_file=sparc/t-vxsparc
2401 xmake_file=sparc/x-sysv4
2404 tm_file="sparc/splet.h libgloss.h"
2405 tmake_file=sparc/t-splet
2408 tm_file="sparc/litecoff.h libgloss.h"
2409 tmake_file=sparc/t-sparclite
2412 tm_file="sparc/lite.h aoutos.h libgloss.h"
2413 tmake_file=sparc/t-sparclite
2416 tmake_file=sparc/t-sp64
2417 tm_file=sparc/sp64-aout.h
2420 tmake_file=sparc/t-sp64
2421 tm_file=sparc/sp64-elf.h
2422 extra_parts="crtbegin.o crtend.o"
2424 # This hasn't been upgraded to GCC 2.
2425 # tahoe-harris-*) # Harris tahoe, using COFF.
2426 # tm_file=tahoe/harris.h
2428 # tahoe-*-bsd*) # tahoe running BSD
2430 # This hasn't been upgraded to GCC 2.
2435 vax-*-bsd*) # vaxen running BSD
2439 vax-*-sysv*) # vaxen running system V
2440 tm_file="${tm_file} vax/vaxv.h"
2441 xm_file="${tm_file} vax/xm-vaxv.h"
2445 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2446 xm_file="${xm_file} xm-netbsd.h"
2447 # On NetBSD, the headers are already okay.
2448 fixincludes=Makefile.in
2452 vax-*-ultrix*) # vaxen running ultrix
2453 tm_file="${tm_file} vax/ultrix.h"
2457 vax-*-vms*) # vaxen running VMS
2458 xm_file=vax/xm-vms.h
2462 vax-*-*) # vax default entry
2466 xm_file="${xm_file} xm-svr3"
2470 echo "Configuration $machine not supported" 1>&2
2477 ;; # Existing Linux/GNU systems do not use the GNU setup.
2479 # On the GNU system, the setup is just about the same on
2480 # each different CPU. The specific machines that GNU
2481 # supports are matched above and just set $cpu_type.
2482 xm_file=${cpu_type}/xm-gnu.h
2483 tm_file=${cpu_type}/gnu.h
2484 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2485 # GNU always uses ELF.
2487 # GNU tools are the only tools.
2490 # On GNU, the headers are already okay.
2491 fixincludes=Makefile.in
2492 xmake_file=x-linux # These details are the same as Linux.
2493 tmake_file=t-gnu # These are not.
2496 fixincludes=fixinc.svr4
2497 xmake_try_sysv=x-sysv
2498 install_headers_dir=install-headers-cpio
2501 install_headers_dir=install-headers-cpio
2505 # Distinguish i[3456]86
2506 # Also, do not run mips-tfile on MIPS if using gas.
2507 # Process --with-cpu= for PowerPC/rs6000
2508 target_cpu_default2=
2511 target_cpu_default2=1
2514 target_cpu_default2=2
2517 target_cpu_default2=3
2522 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2525 target_cpu_default2="MASK_CPU_EV5"
2529 if [[ x$gas = xyes ]]
2531 if [[ x$target_cpu_default2 = x ]]
2533 target_cpu_default2="MASK_GAS"
2535 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2539 mips*-*-ecoff* | mips*-*-elf*)
2540 if [[ x$gas = xyes ]]
2542 if [[ x$gnu_ld = xyes ]]
2544 target_cpu_default2=20
2546 target_cpu_default2=16
2551 if [[ x$gas = xyes ]]
2553 target_cpu_default2=16
2556 powerpc*-*-* | rs6000-*-*)
2557 case "x$with_cpu" in
2561 xcommon | xpower | xpower2 | xpowerpc | xrios \
2562 | xrios1 | xrios2 | xrsc | xrsc1 \
2563 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2564 | x403 | x505 | x801 | x821 | x823 | x860)
2565 target_cpu_default2="\"$with_cpu\""
2569 echo "--with-cpu must be passed a value" 1>&2
2574 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2580 case ".$with_cpu" in
2582 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2584 .supersparc | .ultrasparc | .v7 | .v8)
2585 target_cpu_default2="TARGET_CPU_$with_cpu"
2588 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2595 if [[ x$target_cpu_default2 != x ]]
2597 if [[ x$target_cpu_default != x ]]
2599 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2601 target_cpu_default=$target_cpu_default2
2605 # No need for collect2 if we have the GNU linker.
2612 # Save data on machine being used to compile GCC in build_xm_file.
2613 # Save data on host machine in vars host_xm_file and host_xmake_file.
2614 if [[ x$pass1done = x ]]
2616 if [[ x"$xm_file" = x ]]
2617 then build_xm_file=$cpu_type/xm-$cpu_type.h
2618 else build_xm_file=$xm_file
2620 build_install_headers_dir=$install_headers_dir
2621 build_exeext=$exeext
2624 if [[ x$pass2done = x ]]
2626 if [[ x"$xm_file" = x ]]
2627 then host_xm_file=$cpu_type/xm-$cpu_type.h
2628 else host_xm_file=$xm_file
2630 if [[ x"$xmake_file" = x ]]
2631 then xmake_file=$cpu_type/x-$cpu_type
2633 host_xmake_file="$xmake_file"
2634 host_truncate_target=$truncate_target
2635 host_extra_gcc_objs=$extra_gcc_objs
2636 host_extra_objs=$extra_host_objs
2642 extra_objs="${host_extra_objs} ${extra_objs}"
2644 # Default the target-machine variables that were not explicitly set.
2645 if [[ x"$tm_file" = x ]]
2646 then tm_file=$cpu_type/$cpu_type.h; fi
2648 if [[ x$extra_headers = x ]]
2649 then extra_headers=; fi
2651 if [[ x"$xm_file" = x ]]
2652 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2654 md_file=$cpu_type/$cpu_type.md
2656 if [[ x$out_file = x ]]
2657 then out_file=$cpu_type/$cpu_type.c; fi
2659 if [[ x"$tmake_file" = x ]]
2660 then tmake_file=$cpu_type/t-$cpu_type
2663 if [[ x$float_format = x ]]
2664 then float_format=i64
2667 # Say what files are being used for the output code and MD file.
2668 echo "Using \`$srcdir/config/$out_file' to output insns."
2669 echo "Using \`$srcdir/config/$md_file' as machine description file."
2672 for f in $tm_file; do
2675 if [[ $count = ax ]]; then
2676 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2678 echo "Using the following target machine macro files:"
2679 for f in $tm_file; do
2680 echo " $srcdir/config/$f"
2685 for f in $host_xm_file; do
2688 if [[ $count = ax ]]; then
2689 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2691 echo "Using the following host machine macro files:"
2692 for f in $host_xm_file; do
2693 echo " $srcdir/config/$f"
2697 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2699 for f in $build_xm_file; do
2702 if [[ $count = ax ]]; then
2703 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2705 echo "Using the following build machine macro files:"
2706 for f in $build_xm_file; do
2707 echo " $srcdir/config/$f"
2712 if [[ x$thread_file = x ]]
2713 then thread_file='single'
2716 # Set up the header files.
2717 # $links is the list of header files to create.
2718 # $vars is the list of shell variables with file names to include.
2719 # config2.h is the old config.h. It is included by the new config.h which
2720 # created from config.in. The goal is to simplify the transition to autoconf.
2721 vars="host_xm_file tm_file xm_file build_xm_file"
2722 links="config2.h tm.h tconfig.h hconfig.h"
2725 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2728 while [[ -n "$vars" ]]
2730 # set file to car of files, files to cdr of files
2731 set $vars; var=$1; shift; vars=$*
2732 set $links; link=$1; shift; links=$*
2736 # Define TARGET_CPU_DEFAULT if the system wants one.
2737 # This substitutes for lots of *.h files.
2738 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2740 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2743 for file in `eval echo '$'$var`; do
2744 echo "#include \"$file\"" >>$link
2748 # Truncate the target if necessary
2749 if [[ x$host_truncate_target != x ]]; then
2750 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2753 # Get the version number from the toplevel
2754 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2756 # Are we using gcc as the native compiler?
2758 *linux*) # All Linux's use gcc as the native compiler.
2759 if [[ x$prefix = xNONE ]]; then
2760 prefix=$native_prefix
2765 # Get an absolute path to the GCC top-level source directory
2771 # Conditionalize the makefile for this host machine.
2772 # Make-host contains the concatenation of all host makefile fragments
2773 # [there can be more than one]. This file is built by configure.frag.
2774 host_overrides=Make-host
2775 dep_host_xmake_file=
2776 for f in .. ${host_xmake_file}
2778 if [[ -f ${srcdir}/config/$f ]]
2780 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2784 # Conditionalize the makefile for this target machine.
2785 # Make-target contains the concatenation of all host makefile fragments
2786 # [there can be more than one]. This file is built by configure.frag.
2787 target_overrides=Make-target
2789 for f in .. ${tmake_file}
2791 if [[ -f ${srcdir}/config/$f ]]
2793 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2797 # If the host doesn't support symlinks, modify CC in
2798 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2799 # Otherwise, we can use "CC=$(CC)".
2801 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2803 cc_set_by_configure="\$(CC)"
2804 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2806 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2807 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2811 out_object_file=`basename $out_file .c`.o
2814 for f in $tm_file; do
2815 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2819 for f in $host_xm_file; do
2820 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2824 for f in $build_xm_file; do
2825 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2828 # Define macro CROSS_COMPILE in compilation
2829 # if this is a cross-compiler.
2830 # Also use all.cross instead of all.internal
2831 # and add cross-make to Makefile.
2832 cross_overrides="/dev/null"
2833 if [[ x$host != x$target ]]
2835 cross_defines="CROSS=-DCROSS_COMPILE"
2836 cross_overrides="${topdir}/cross-make"
2839 # When building gcc with a cross-compiler, we need to fix a few things.
2840 # This must come after cross-make as we want all.build to override
2842 build_overrides="/dev/null"
2843 if [[ x$build != x$host ]]
2845 build_overrides="${topdir}/build-make"
2848 # Expand extra_headers to include complete path.
2849 # This substitutes for lots of t-* files.
2851 if [[ "x$extra_headers" = x ]]
2854 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2855 for file in $extra_headers;
2857 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2861 # Add a definition of USE_COLLECT2 if system wants one.
2862 # Also tell toplev.c what to do.
2863 # This substitutes for lots of t-* files.
2864 if [[ x$use_collect2 = x ]]
2869 will_use_collect2="ld"
2870 maybe_use_collect2="-DUSE_COLLECT2"
2874 # Set MD_DEPS if the real md file is in md.pre-cpp.
2875 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2876 # for line oriented comments, so we must always use a GNU cpp. If
2877 # building gcc with a cross compiler, use the cross compiler just
2878 # built. Otherwise, we can use the cpp just built.
2880 if [[ "x$md_cppflags" = x ]]
2882 md_file_sub=$srcdir/config/$md_file
2887 # If we have gas in the build tree, make a link to it.
2888 if [[ -f ../gas/Makefile ]]; then
2889 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2892 # If we have ld in the build tree, make a link to it.
2893 if [[ -f ../ld/Makefile ]]; then
2894 # if [[ x$use_collect2 = x ]]; then
2895 # rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2897 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2901 # Figure out what language subdirectories are present.
2903 for lang in ${srcdir}/*/config-lang.in ..
2907 # The odd quoting in the next line works around
2908 # an apparent bug in bash 1.12 on linux.
2909 ${srcdir}/[[*]]/config-lang.in) ;;
2910 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2914 # Make empty files to contain the specs and options for each language.
2915 # Then add #include lines to for a compiler that has specs and/or options.
2919 rm -f specs.h options.h
2920 touch specs.h options.h
2921 for subdir in . $subdirs
2923 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2924 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2925 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2927 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2928 echo "#include \"$subdir/lang-options.h\"" >>options.h
2929 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2933 # These (without "all_") are set in each config-lang.in.
2934 # `language' must be a single word so is spelled singularly.
2940 all_outputs=Makefile
2941 # List of language makefile fragments.
2946 # Add the language fragments.
2947 # Languages are added via two mechanisms. Some information must be
2948 # recorded in makefile variables, these are defined in config-lang.in.
2949 # We accumulate them and plug them into the main Makefile.
2950 # The other mechanism is a set of hooks for each of the main targets
2951 # like `clean', `install', etc.
2953 language_fragments="Make-lang"
2954 language_hooks="Make-hooks"
2957 for s in .. $subdirs
2969 . ${srcdir}/$s/config-lang.in
2970 if [[ "x$language" = x ]]
2972 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2975 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2976 all_languages="$all_languages $language"
2977 if [[ "x$boot_language" = xyes ]]
2979 all_boot_languages="$all_boot_languages $language"
2981 all_compilers="$all_compilers $compilers"
2982 all_stagestuff="$all_stagestuff $stagestuff"
2983 all_diff_excludes="$all_diff_excludes $diff_excludes"
2984 all_headers="$all_headers $headers"
2985 all_outputs="$all_outputs $outputs"
2986 if [[ x$outputs = x ]]
2988 oldstyle_subdirs="$oldstyle_subdirs $s"
2990 all_lib2funcs="$all_lib2funcs $lib2funcs"
2994 # Since we can't use `::' targets, we link each language in
2995 # with a set of hooks, reached indirectly via lang.${target}.
2999 target_list="all.build all.cross start.encap rest.encap \
3001 install-normal install-common install-info install-man \
3003 mostlyclean clean distclean extraclean maintainer-clean \
3004 stage1 stage2 stage3 stage4"
3005 for t in $target_list
3008 for l in .. $all_languages
3010 if [[ $l != ".." ]]; then
3014 echo "lang.$t: $x" >> Make-hooks
3017 # If we're not building in srcdir, create .gdbinit.
3019 if [[ ! -f Makefile.in ]]; then
3020 echo "dir ." > .gdbinit
3021 echo "dir ${srcdir}" >> .gdbinit
3022 if [[ x$gdb_needs_out_file_path = xyes ]]
3024 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3026 if [[ "x$subdirs" != x ]]; then
3029 echo "dir ${srcdir}/$s" >> .gdbinit
3032 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3035 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3038 if [[ x$enable_haifa = xyes ]]; then
3039 echo "Using the Haifa scheduler."
3041 sched_cflags=-DHAIFA
3043 AC_SUBST(sched_prefix)
3044 AC_SUBST(sched_cflags)
3045 if [[ x$enable_haifa != x ]]; then
3046 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3047 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3048 if [[ -f $x ]]; then
3055 # Process the language and host/target makefile fragments.
3056 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3058 # Substitute configuration variables
3060 AC_SUBST(all_languages)
3061 AC_SUBST(all_boot_languages)
3062 AC_SUBST(all_compilers)
3063 AC_SUBST(all_lang_makefiles)
3064 AC_SUBST(all_stagestuff)
3065 AC_SUBST(all_diff_excludes)
3066 AC_SUBST(all_lib2funcs)
3067 AC_SUBST(all_headers)
3068 AC_SUBST(extra_passes)
3069 AC_SUBST(extra_programs)
3070 AC_SUBST(extra_parts)
3071 AC_SUBST(extra_c_objs)
3072 AC_SUBST(extra_c_flags)
3073 AC_SUBST(extra_objs)
3074 AC_SUBST(host_extra_gcc_objs)
3075 AC_SUBST(extra_headers_list)
3076 AC_SUBST(dep_host_xmake_file)
3077 AC_SUBST(dep_tmake_file)
3079 AC_SUBST(out_object_file)
3081 AC_SUBST(tm_file_list)
3082 AC_SUBST(build_xm_file_list)
3083 AC_SUBST(host_xm_file_list)
3084 AC_SUBST(lang_specs_files)
3085 AC_SUBST(lang_options_files)
3086 AC_SUBST(thread_file)
3088 AC_SUBST(local_prefix)
3089 AC_SUBST(gxx_include_dir)
3090 AC_SUBST(fixincludes)
3091 AC_SUBST(build_install_headers_dir)
3092 AC_SUBST(build_exeext)
3093 AC_SUBST(float_format)
3094 AC_SUBST(will_use_collect2)
3095 AC_SUBST(maybe_use_collect2)
3096 AC_SUBST(cc_set_by_configure)
3097 AC_SUBST(stage_prefix_set_by_configure)
3099 AC_SUBST_FILE(target_overrides)
3100 AC_SUBST_FILE(host_overrides)
3101 AC_SUBST(cross_defines)
3102 AC_SUBST_FILE(cross_overrides)
3103 AC_SUBST_FILE(build_overrides)
3104 AC_SUBST_FILE(language_fragments)
3105 AC_SUBST_FILE(language_hooks)
3107 # Echo that links are built
3108 if [[ x$host = x$target ]]
3116 if [[ x$host != x$build ]]
3118 str3=" on a $build system"
3121 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3126 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3128 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3130 echo " ${str2}${str3}." 1>&2
3133 # Configure the subdirectories
3134 # AC_CONFIG_SUBDIRS($subdirs)
3136 # Create the Makefile
3137 # and configure language subdirectories
3138 AC_OUTPUT($all_outputs,
3140 . $srcdir/configure.lang
3141 case x$CONFIG_HEADERS in
3142 xconfig.h:config.in)
3150 target_alias='${target_alias}'
3152 subdirs='${subdirs}'
3153 oldstyle_subdirs='${oldstyle_subdirs}'
3154 symbolic_link='${symbolic_link}'
3155 program_transform_set='${program_transform_set}'
3156 program_transform_name='${program_transform_name}'
3157 dep_host_xmake_file='${dep_host_xmake_file}'
3158 host_xmake_file='${host_xmake_file}'
3159 dep_tmake_file='${dep_tmake_file}'
3160 tmake_file='${tmake_file}'
3161 thread_file='${thread_file}'
3162 version='${version}'
3163 local_prefix='${local_prefix}'
3164 build_install_headers_dir='${build_install_headers_dir}'
3165 build_exeext='${build_exeext}'
3166 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3167 SET_MAKE='${SET_MAKE}'
3168 target_list='${target_list}'
3169 target_overrides='${target_overrides}'
3170 host_overrides='${host_overrides}'
3171 cross_defines='${cross_defines}'
3172 cross_overrides='${cross_overrides}'
3173 build_overrides='${build_overrides}'