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(free)
149 build_broken_install=
150 build_install_headers_dir=install-headers-tar
154 host_truncate_target=
156 # Decode the host machine, then the target machine.
157 # For the host machine, we save the xm_file variable as host_xm_file;
158 # then we decode the target machine and forget everything else
159 # that came from the host machine.
160 for machine in $build $host $target; do
173 # Set this to force installation and use of collect2.
175 # Set this to override the default target model.
177 # Set this to force use of install.sh.
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
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"
283 tmake_file="t-linux alpha/t-linux"
285 fixincludes=Makefile.in
286 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
288 if [[ x$enable_threads = xyes ]]; then
292 alpha*-dec-osf[[456789]]*)
293 if [[ x$stabs = xyes ]]
295 tm_file="${tm_file} dbx.h"
297 if [[ x$gas != xyes ]]
299 extra_passes="mips-tfile mips-tdump"
303 # Some versions of OSF4 (specifically X4.0-9 296.7) have
304 # a broken tar, so we use cpio instead.
307 install_headers_dir=install-headers-cpio
311 alpha*-dec-osf[[23]]*)
312 tm_file="${tm_file} alpha/osf2or3.h"
313 if [[ x$stabs = xyes ]]
315 tm_file="${tm_file} dbx.h"
317 if [[ x$gas != xyes ]]
319 extra_passes="mips-tfile mips-tdump"
325 tm_file="${tm_file} alpha/osf12.h"
326 if [[ x$stabs = xyes ]]
328 tm_file="${tm_file} dbx.h"
330 if [[ x$gas != xyes ]]
332 extra_passes="mips-tfile mips-tdump"
338 if [[ x$stabs = xyes ]]
340 tm_file="${tm_file} dbx.h"
342 if [[ x$gas != xyes ]]
344 extra_passes="mips-tfile mips-tdump"
350 tm_file="${tm_file} alpha/win-nt.h"
351 target_cpu_default=MASK_WINDOWS_NT
352 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
354 xmake_file=winnt/x-winnt
355 extra_host_objs=oldnames.o
356 extra_gcc_objs="spawnv.o oldnames.o"
357 fixincludes=fixinc.winnt
358 if [[ x$gnu_ld != xyes ]]
360 extra_programs=ld.exe
362 if [[ x$enable_threads = xyes ]]; then
368 xm_file="${xm_file} alpha/xm-vms.h"
369 tmake_file=alpha/t-vms
370 fixincludes=Makefile.in
372 arm-*-coff* | armel-*-coff*)
374 tmake_file=arm/t-bare
376 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
377 tm_file=arm/riscix1-1.h
380 arm-*-riscix*) # Acorn RISC machine
381 if [[ x$gas = xyes ]]
383 tm_file=arm/rix-gas.h
387 xmake_file=arm/x-riscix
388 tmake_file=arm/t-riscix
391 arm-semi-aout | armel-semi-aout)
393 tmake_file=arm/t-semi
394 fixincludes=Makefile.in # There is nothing to fix
396 arm-semi-aof | armel-semi-aof)
397 tm_file=arm/semiaof.h
398 tmake_file=arm/t-semiaof
399 fixincludes=Makefile.in # There is nothing to fix
403 xm_file=arm/xm-netbsd.h
404 tmake_file=arm/t-netbsd
405 # On NetBSD, the headers are already okay.
406 fixincludes=Makefile.in
409 arm-*-linux-gnuaout*) # ARM Linux
411 xm_file=arm/xm-linux.h
413 tm_file=arm/linux-gas.h
414 tmake_file=arm/t-linux
415 fixincludes=Makefile.in
422 c1-convex-*) # Convex C1
425 fixincludes=Makefile.in
427 c2-convex-*) # Convex C2
430 fixincludes=Makefile.in
435 fixincludes=Makefile.in
440 fixincludes=Makefile.in
443 target_cpu_default=16
445 fixincludes=Makefile.in
447 clipper-intergraph-clix*)
448 tm_file="${tm_file} svr3.h clipper/clix.h"
449 xm_file=clipper/xm-clix.h
450 xmake_file=clipper/x-clix
451 extra_headers=va-clipper.h
452 extra_parts="crtbegin.o crtend.o"
453 install_headers_dir=install-headers-cpio
461 # This hasn't been upgraded to GCC 2.
462 # fx80-alliant-*) # Alliant FX/80
468 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
469 xm_file=pa/xm-papro.h
474 tm_file="${tm_file} pa/pa-osf.h"
476 fixincludes=Makefile.in
479 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
480 xm_file=pa/xm-papro.h
484 tm_file="${tm_file} pa/pa-osf.h"
486 fixincludes=Makefile.in
491 fixincludes=Makefile.in
495 fixincludes=Makefile.in
498 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
499 xm_file=pa/xm-pahpux.h
500 xmake_file=pa/x-pa-hpux
501 if [[ x$gas = xyes ]]
503 tm_file="${tm_file} pa/gas.h"
506 install_headers_dir=install-headers-cpio
509 hppa1.0-*-hpux8.0[[0-2]]*)
510 tm_file="${tm_file} pa/pa-hpux.h"
511 xm_file=pa/xm-pahpux.h
512 xmake_file=pa/x-pa-hpux
513 if [[ x$gas = xyes ]]
515 tm_file="${tm_file} pa/pa-gas.h"
517 tm_file="pa/pa-oldas.h ${tm_file}"
520 install_headers_dir=install-headers-cpio
523 hppa1.1-*-hpux8.0[[0-2]]*)
525 tm_file="${tm_file} pa/pa-hpux.h"
526 xm_file=pa/xm-pahpux.h
527 xmake_file=pa/x-pa-hpux
528 if [[ x$gas = xyes ]]
530 tm_file="${tm_file} pa/pa-gas.h"
532 tm_file="pa/pa-oldas.h ${tm_file}"
535 install_headers_dir=install-headers-cpio
540 tm_file="${tm_file} pa/pa-hpux.h"
541 xm_file=pa/xm-pahpux.h
542 xmake_file=pa/x-pa-hpux
543 if [[ x$gas = xyes ]]
545 tm_file="${tm_file} pa/pa-gas.h"
548 install_headers_dir=install-headers-cpio
552 tm_file="${tm_file} pa/pa-hpux.h"
553 xm_file=pa/xm-pahpux.h
554 xmake_file=pa/x-pa-hpux
555 if [[ x$gas = xyes ]]
557 tm_file="${tm_file} pa/pa-gas.h"
560 install_headers_dir=install-headers-cpio
565 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
566 xm_file=pa/xm-pahpux.h
567 xmake_file=pa/x-pa-hpux
568 if [[ x$gas = xyes ]]
570 tm_file="${tm_file} pa/pa-gas.h"
573 install_headers_dir=install-headers-cpio
577 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
578 xm_file=pa/xm-pahpux.h
579 xmake_file=pa/x-pa-hpux
580 if [[ x$gas = xyes ]]
582 tm_file="${tm_file} pa/pa-gas.h"
585 install_headers_dir=install-headers-cpio
590 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.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"
598 install_headers_dir=install-headers-cpio
602 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
603 xm_file=pa/xm-pahpux.h
604 xmake_file=pa/x-pa-hpux
605 if [[ x$gas = xyes ]]
607 tm_file="${tm_file} pa/pa-gas.h"
610 install_headers_dir=install-headers-cpio
615 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
616 xm_file=pa/xm-pahpux.h
617 xmake_file=pa/x-pa-hpux
618 if [[ x$gas = xyes ]]
620 tm_file="${tm_file} pa/pa-gas.h"
623 install_headers_dir=install-headers-cpio
627 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
628 xm_file=pa/xm-pahpux.h
629 xmake_file=pa/x-pa-hpux
630 if [[ x$gas = xyes ]]
632 tm_file="${tm_file} pa/pa-gas.h"
635 install_headers_dir=install-headers-cpio
641 fixincludes=Makefile.in
645 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
646 if [[ x$gas = xyes ]]
648 tm_file=i386/aix386.h
649 extra_parts="crtbegin.o crtend.o"
650 tmake_file=i386/t-crtstuff
652 tm_file=i386/aix386ng.h
655 xm_file=i386/xm-aix.h
656 xmake_file=i386/x-aix
659 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
660 xm_file=i386/xm-sysv4.h
661 xmake_file=i386/x-ncr3000
662 if [[ x$stabs = xyes -a x$gas = xyes ]]
664 tm_file=i386/sysv4gdb.h
668 extra_parts="crtbegin.o crtend.o"
669 tmake_file=i386/t-crtpic
673 xm_file=i386/xm-next.h
674 tmake_file=i386/t-next
675 xmake_file=i386/x-next
676 extra_objs=nextstep.o
677 if [[ x$enable_threads = xyes ]]; then
681 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
683 if [[ x$gas = xyes ]]
685 tm_file=i386/seq-gas.h
687 tm_file=i386/sequent.h
690 i[[3456]]86-sequent-ptx1*)
691 xm_file=i386/xm-sysv3.h
692 xmake_file=i386/x-sysv3
693 tm_file=i386/seq-sysv3.h
694 tmake_file=i386/t-crtstuff
695 fixincludes=fixinc.ptx
696 extra_parts="crtbegin.o crtend.o"
697 install_headers_dir=install-headers-cpio
700 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
701 xm_file=i386/xm-sysv3.h
702 xmake_file=i386/x-sysv3
703 tm_file=i386/seq2-sysv3.h
704 tmake_file=i386/t-crtstuff
705 extra_parts="crtbegin.o crtend.o"
706 fixincludes=fixinc.ptx
707 install_headers_dir=install-headers-cpio
710 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
711 xm_file=i386/xm-sysv4.h
713 tm_file=i386/ptx4-i.h
715 extra_parts="crtbegin.o crtend.o"
716 fixincludes=fixinc.ptx
717 install_headers_dir=install-headers-cpio
720 i386-sun-sunos*) # Sun i386 roadrunner
721 xm_file=i386/xm-sun.h
726 tm_file=i386/i386-aout.h
727 tmake_file=i386/t-i386bare
729 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
730 tm_file=i386/bsd386.h
731 xm_file=i386/xm-bsd386.h
732 # tmake_file=t-libc-ok
735 tm_file=i386/386bsd.h
736 xm_file=i386/xm-bsd386.h
737 # tmake_file=t-libc-ok
738 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
741 i[[3456]]86-*-freebsdelf*)
742 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
743 xm_file=i386/xm-freebsd.h
744 # On FreeBSD, the headers are already ok.
745 fixincludes=Makefile.in
746 tmake_file=i386/t-freebsd
751 i[[3456]]86-*-freebsd*)
752 tm_file=i386/freebsd.h
753 xm_file=i386/xm-freebsd.h
754 # On FreeBSD, the headers are already ok.
755 fixincludes=Makefile.in
756 tmake_file=i386/t-freebsd
758 i[[3456]]86-*-netbsd*)
759 tm_file=i386/netbsd.h
760 xm_file=i386/xm-netbsd.h
761 # On NetBSD, the headers are already okay.
762 fixincludes=Makefile.in
766 tm_file=i386/i386-coff.h
767 tmake_file=i386/t-i386bare
769 i[[3456]]86-*-isc*) # 80386 running ISC system
770 xm_file=i386/xm-isc.h
772 i[[345]]86-*-isc[[34]]*)
773 xmake_file=i386/x-isc3
776 xmake_file=i386/x-isc
779 if [[ x$gas = xyes -a x$stabs = xyes ]]
781 tm_file=i386/iscdbx.h
782 tmake_file=i386/t-svr3dbx
783 extra_parts="svr3.ifile svr3z.ifile"
785 tm_file=i386/isccoff.h
786 tmake_file=i386/t-crtstuff
787 extra_parts="crtbegin.o crtend.o"
789 install_headers_dir=install-headers-cpio
792 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
793 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
794 xmake_file=x-linux-aout
795 tmake_file="t-linux-aout i386/t-crtstuff"
796 tm_file=i386/linux-oldld.h
797 fixincludes=Makefile.in #On Linux, the headers are ok already.
801 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
802 xm_file=i386/xm-linux.h # with a.out format
803 xmake_file=x-linux-aout
804 tmake_file="t-linux-aout i386/t-crtstuff"
805 tm_file=i386/linux-aout.h
806 fixincludes=Makefile.in #On Linux, the headers are ok already.
810 i[[3456]]86-*-linux-gnulibc1)
811 xm_file=i386/xm-linux.h # Intel 80386's running Linux
812 xmake_file=x-linux # with ELF format using the
813 tm_file=i386/linux.h # Linux C library 5
814 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
815 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
816 fixincludes=Makefile.in #On Linux, the headers are ok already.
819 if [[ x$enable_threads = xyes ]]; then
823 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
824 xm_file=i386/xm-linux.h # with ELF format using glibc 2
825 xmake_file=x-linux # aka Linux C library 6
827 tmake_file="t-linux i386/t-crtstuff"
828 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
829 fixincludes=Makefile.in #On Linux, the headers are ok already.
832 if [[ x$enable_threads = xyes ]]; then
838 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
839 xm_file=i386/xm-go32.h
841 tmake_file=i386/t-go32
843 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
846 fixincludes=Makefile.in
850 i[[3456]]86-*-lynxos*)
851 if [[ x$gas = xyes ]]
855 tm_file=i386/lynx-ng.h
857 xm_file=i386/xm-lynx.h
858 tmake_file=i386/t-i386bare
863 # tmake_file=t-libc-ok
866 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
867 if [[ x$elf = xyes ]]
869 tm_file=i386/osfelf.h
872 tm_file=i386/osfrose.h
875 xm_file=i386/xm-osf.h
876 xmake_file=i386/x-osfrose
877 tmake_file=i386/t-osf
880 i[[345]]86-go32-rtems*)
882 xm_file=i386/xm-go32.h
883 tm_file=i386/go32-rtems.h
884 tmake_file="i386/t-go32 t-rtems"
889 tmake_file="i386/t-i386bare t-rtems"
891 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
892 xm_file=i386/xm-sco5.h
893 xmake_file=i386/x-sco5
894 fixincludes=fixinc.sco
897 tmake_file=i386/t-sco5
898 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
900 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
901 xm_file=i386/xm-sco.h
902 xmake_file=i386/x-sco4
903 fixincludes=fixinc.sco
905 install_headers_dir=install-headers-cpio
906 if [[ x$stabs = xyes ]]
908 tm_file=i386/sco4dbx.h
909 tmake_file=i386/t-svr3dbx
910 extra_parts="svr3.ifile svr3z.rfile"
913 tmake_file=i386/t-crtstuff
914 extra_parts="crtbegin.o crtend.o"
918 i[[3456]]86-*-sco*) # 80386 running SCO system
919 xm_file=i386/xm-sco.h
920 xmake_file=i386/x-sco
922 install_headers_dir=install-headers-cpio
923 if [[ x$stabs = xyes ]]
925 tm_file=i386/scodbx.h
926 tmake_file=i386/t-svr3dbx
927 extra_parts="svr3.ifile svr3z.rfile"
930 extra_parts="crtbegin.o crtend.o"
931 tmake_file=i386/t-crtstuff
935 i[[3456]]86-*-solaris2*)
936 xm_file=i386/xm-sysv4.h
937 if [[ x$stabs = xyes ]]
939 tm_file=i386/sol2dbg.h
943 tmake_file=i386/t-sol2
944 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
946 fixincludes=fixinc.svr4
948 if [[ x$enable_threads = xyes ]]; then
949 thread_file='solaris'
952 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
953 xm_file=i386/xm-sysv4.h
955 if [[ x$stabs = xyes ]]
957 tm_file="${tm_file} dbx.h"
959 tmake_file=i386/t-crtpic
961 extra_parts="crtbegin.o crtend.o"
963 i[[3456]]86-*-sysv*) # Intel 80386's running system V
964 xm_file=i386/xm-sysv3.h
965 xmake_file=i386/x-sysv3
966 if [[ x$gas = xyes ]]
968 if [[ x$stabs = xyes ]]
970 tm_file=i386/svr3dbx.h
971 tmake_file=i386/t-svr3dbx
972 extra_parts="svr3.ifile svr3z.rfile"
974 tm_file=i386/svr3gas.h
975 extra_parts="crtbegin.o crtend.o"
976 tmake_file=i386/t-crtstuff
980 extra_parts="crtbegin.o crtend.o"
981 tmake_file=i386/t-crtstuff
984 i386-*-vsta) # Intel 80386's running VSTa kernel
985 xm_file=i386/xm-vsta.h
987 tmake_file=i386/t-vsta
988 xmake_file=i386/x-vsta
990 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
991 xm_file="${xm_file} i386/xm-cygwin32.h"
992 tmake_file=i386/t-cygwin32
993 tm_file=i386/cygwin32.h
994 xmake_file=i386/x-cygwin32
996 fixincludes=Makefile.in
997 if [[ x$enable_threads = xyes ]]; then
1002 i[[3456]]86-*-mingw32)
1003 tm_file=i386/mingw32.h
1004 xm_file="${xm_file} i386/xm-mingw32.h"
1005 tmake_file=i386/t-cygwin32
1007 xmake_file=i386/x-cygwin32
1008 fixincludes=Makefile.in
1009 if [[ x$enable_threads = xyes ]]; then
1014 i[[3456]]86-*-winnt3*)
1015 tm_file=i386/win-nt.h
1016 out_file=i386/i386.c
1017 xm_file=i386/xm-winnt.h
1018 xmake_file=winnt/x-winnt
1019 tmake_file=i386/t-winnt
1020 extra_host_objs="winnt.o oldnames.o"
1021 extra_gcc_objs="spawnv.o oldnames.o"
1022 fixincludes=fixinc.winnt
1023 if [[ x$gnu_ld != xyes ]]
1025 extra_programs=ld.exe
1027 if [[ x$enable_threads = xyes ]]; then
1031 i[[3456]]86-dg-dgux)
1032 xm_file=i386/xm-dgux.h
1033 out_file=i386/dgux.c
1035 tmake_file=i386/t-dgux
1036 xmake_file=i386/x-dgux
1037 fixincludes=fixinc.dgux
1038 install_headers_dir=install-headers-cpio
1040 i860-alliant-*) # Alliant FX/2800
1041 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1042 xm_file="${xm_file} i860/xm-fx2800.h"
1043 xmake_file=i860/x-fx2800
1044 tmake_file=i860/t-fx2800
1045 extra_parts="crtbegin.o crtend.o"
1048 tm_file="${tm_file} i860/bsd.h"
1049 if [[ x$gas = xyes ]]
1051 tm_file="${tm_file} i860/bsd-gas.h"
1056 tm_file="${tm_file} i860/mach.h"
1057 tmake_file=t-libc-ok
1059 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1060 tm_file="${tm_file} svr3.h i860/paragon.h"
1061 xm_file="${xm_file} xm-svr3.h"
1066 tm_file="${tm_file} svr3.h i860/sysv3.h"
1067 xm_file="${tm_file} xm-svr3.h"
1068 xmake_file=i860/x-sysv3
1069 extra_parts="crtbegin.o crtend.o"
1072 tm_file="${tm_file} svr4.h i860/sysv4.h"
1073 xm_file="${xm_file} xm-svr3.h"
1074 xmake_file=i860/x-sysv4
1076 extra_parts="crtbegin.o crtend.o"
1078 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1079 tm_file="${tm_file} i960/vx960.h"
1080 tmake_file=i960/t-vxworks960
1084 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1085 tmake_file=i960/t-vxworks960
1089 tm_file="${tm_file} i960/vx960.h"
1090 tmake_file=i960/t-vxworks960
1094 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1095 tmake_file=i960/t-960bare
1099 tmake_file="i960/t-960bare t-rtems"
1100 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1103 i960-*-*) # Default i960 environment.
1107 extra_parts="crtinit.o crtfini.o"
1109 m68000-convergent-sysv*)
1111 xm_file=m68k/xm-3b1.h
1113 extra_headers=math-68881.h
1115 m68000-hp-bsd*) # HP 9000/200 running BSD
1116 tm_file=m68k/hp2bsd.h
1117 xmake_file=m68k/x-hp2bsd
1119 extra_headers=math-68881.h
1121 m68000-hp-hpux*) # HP 9000 series 300
1122 xm_file=m68k/xm-hp320.h
1123 if [[ x$gas = xyes ]]
1125 xmake_file=m68k/x-hp320g
1126 tm_file=m68k/hp310g.h
1128 xmake_file=m68k/x-hp320
1129 tm_file=m68k/hp310.h
1132 install_headers_dir=install-headers-cpio
1134 extra_headers=math-68881.h
1139 extra_headers=math-68881.h
1142 tm_file=m68k/sun2o4.h
1144 extra_headers=math-68881.h
1147 xm_file=m68k/xm-3b1.h
1148 if [[ x$gas = xyes ]]
1155 extra_headers=math-68881.h
1157 m68k-apple-aux*) # Apple Macintosh running A/UX
1158 xm_file=m68k/xm-aux.h
1159 tmake_file=m68k/t-aux
1161 install_headers_dir=install-headers-cpio
1162 extra_headers=math-68881.h
1163 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1165 if [[ "$gnu_ld" = yes ]]
1167 tm_file="${tm_file} m68k/auxgld.h"
1169 tm_file="${tm_file} m68k/auxld.h"
1171 if [[ "$gas" = yes ]]
1173 tm_file="${tm_file} m68k/auxgas.h"
1175 tm_file="${tm_file} m68k/auxas.h"
1177 tm_file="${tm_file} m68k/a-ux.h"
1180 tm_file=m68k/apollo68.h
1181 xmake_file=m68k/x-apollo68
1183 extra_headers=math-68881.h
1185 m68k-altos-sysv*) # Altos 3068
1186 if [[ x$gas = xyes ]]
1188 tm_file=m68k/altos3068.h
1189 xm_file=m68k/xm-altos3068.h
1191 echo "The Altos is supported only with the GNU assembler" 1>&2
1194 extra_headers=math-68881.h
1196 m68k-bull-sysv*) # Bull DPX/2
1197 if [[ x$gas = xyes ]]
1199 if [[ x$stabs = xyes ]]
1201 tm_file=m68k/dpx2cdbx.h
1203 tm_file=m68k/dpx2g.h
1208 xm_file=m68k/xm-m68kv.h
1209 xmake_file=m68k/x-dpx2
1211 extra_headers=math-68881.h
1213 m68k-atari-sysv4*) # Atari variant of V.4.
1214 tm_file=m68k/atari.h
1215 xm_file=m68k/xm-atari.h
1217 extra_parts="crtbegin.o crtend.o"
1218 extra_headers=math-68881.h
1220 m68k-motorola-sysv*)
1221 tm_file=m68k/mot3300.h
1222 xm_file=m68k/xm-mot3300.h
1223 if [[ x$gas = xyes ]]
1225 xmake_file=m68k/x-mot3300-gas
1226 if [[ x$gnu_ld = xyes ]]
1228 tmake_file=m68k/t-mot3300-gald
1230 tmake_file=m68k/t-mot3300-gas
1234 xmake_file=m68k/x-mot3300
1235 if [[ x$gnu_ld = xyes ]]
1237 tmake_file=m68k/t-mot3300-gld
1239 tmake_file=m68k/t-mot3300
1243 gdb_needs_out_file_path=yes
1244 extra_parts="crt0.o mcrt0.o"
1245 extra_headers=math-68881.h
1247 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1248 tm_file=m68k/tower-as.h
1249 xm_file=m68k/xm-tower.h
1250 xmake_file=m68k/x-tower
1251 extra_parts="crtbegin.o crtend.o"
1252 extra_headers=math-68881.h
1255 tm_file=m68k/plexus.h
1256 xm_file=m68k/xm-plexus.h
1258 extra_headers=math-68881.h
1262 xm_file=m68k/xm-m68kv.h
1263 extra_headers=math-68881.h
1266 xm_file=m68k/xm-crds.h
1267 xmake_file=m68k/x-crds
1271 extra_headers=math-68881.h
1273 m68k-cbm-sysv4*) # Commodore variant of V.4.
1275 xm_file=m68k/xm-amix.h
1276 xmake_file=m68k/x-amix
1278 extra_parts="crtbegin.o crtend.o"
1279 extra_headers=math-68881.h
1282 tm_file=m68k/ccur-GAS.h
1283 xmake_file=m68k/x-ccur
1284 extra_headers=math-68881.h
1288 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1289 tm_file=m68k/hp3bsd44.h
1290 xmake_file=m68k/x-hp3bsd44
1292 extra_headers=math-68881.h
1294 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1295 tm_file=m68k/hp3bsd.h
1297 extra_headers=math-68881.h
1300 if [[ x$with_fp = xno ]]
1302 tm_file=m68k/isi-nfp.h
1307 extra_headers=math-68881.h
1309 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1310 xm_file=m68k/xm-hp320.h
1311 if [[ x$gas = xyes ]]
1313 xmake_file=m68k/x-hp320g
1314 tm_file=m68k/hp320g.h
1316 xmake_file=m68k/x-hp320
1317 tm_file=m68k/hpux7.h
1320 install_headers_dir=install-headers-cpio
1322 extra_headers=math-68881.h
1324 m68k-hp-hpux*) # HP 9000 series 300
1325 xm_file=m68k/xm-hp320.h
1326 if [[ x$gas = xyes ]]
1328 xmake_file=m68k/x-hp320g
1329 tm_file=m68k/hp320g.h
1331 xmake_file=m68k/x-hp320
1332 tm_file=m68k/hp320.h
1335 install_headers_dir=install-headers-cpio
1337 extra_headers=math-68881.h
1340 tm_file=m68k/sun3mach.h
1342 extra_headers=math-68881.h
1345 if [[ x$gas = xyes ]]
1347 tm_file=m68k/news3gas.h
1349 tm_file=m68k/news3.h
1352 extra_headers=math-68881.h
1354 m68k-sony-bsd* | m68k-sony-newsos*)
1355 if [[ x$gas = xyes ]]
1357 tm_file=m68k/newsgas.h
1362 extra_headers=math-68881.h
1364 m68k-next-nextstep2*)
1365 tm_file=m68k/next21.h
1366 xm_file=m68k/xm-next.h
1367 tmake_file=m68k/t-next
1368 xmake_file=m68k/x-next
1369 extra_objs=nextstep.o
1370 extra_headers=math-68881.h
1373 m68k-next-nextstep3*)
1375 xm_file=m68k/xm-next.h
1376 tmake_file=m68k/t-next
1377 xmake_file=m68k/x-next
1378 extra_objs=nextstep.o
1379 extra_headers=math-68881.h
1380 if [[ x$enable_threads = xyes ]]; then
1385 if [[ x$with_fp = xno ]]
1387 tm_file=m68k/sun3n3.h
1389 tm_file=m68k/sun3o3.h
1392 extra_headers=math-68881.h
1394 m68k-sun-sunos*) # For SunOS 4 (the default).
1395 if [[ x$with_fp = xno ]]
1397 tm_file=m68k/sun3n.h
1401 xm_file=m68k/xm-sun3.h
1403 extra_headers=math-68881.h
1406 tm_file=m68k/vxm68k.h
1407 tmake_file=m68k/t-vxworks68
1408 extra_headers=math-68881.h
1411 tmake_file=m68k/t-m68kbare
1412 tm_file="m68k/m68k-aout.h libgloss.h"
1413 extra_headers=math-68881.h
1416 tmake_file=m68k/t-m68kbare
1417 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1418 extra_headers=math-68881.h
1421 if [[ x$gas = xyes ]]
1425 tm_file=m68k/lynx-ng.h
1427 xm_file=m68k/xm-lynx.h
1429 tmake_file=m68k/t-lynx
1430 extra_headers=math-68881.h
1433 tm_file=m68k/netbsd.h
1434 xm_file=m68k/xm-netbsd.h
1435 # On NetBSD, the headers are already okay.
1436 fixincludes=Makefile.in
1439 m68k-*-sysv3*) # Motorola m68k's running system V.3
1440 xm_file=m68k/xm-m68kv.h
1441 xmake_file=m68k/x-m68kv
1442 extra_parts="crtbegin.o crtend.o"
1443 extra_headers=math-68881.h
1445 m68k-*-sysv4*) # Motorola m68k's running system V.4
1446 tm_file=m68k/m68kv4.h
1447 xm_file=m68k/xm-m68kv.h
1449 extra_parts="crtbegin.o crtend.o"
1450 extra_headers=math-68881.h
1452 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1453 xm_file=m68k/xm-linux.h # with a.out format
1455 tm_file=m68k/linux-aout.h
1456 tmake_file="t-linux-aout m68k/t-linux-aout"
1457 fixincludes=Makefile.in #On Linux, the headers are ok already.
1458 extra_headers=math-68881.h
1461 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1462 xm_file=m68k/xm-linux.h # with ELF format using the
1463 xmake_file=x-linux # Linux C library 5
1464 tm_file=m68k/linux.h
1465 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1466 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1467 fixincludes=Makefile.in #On Linux, the headers are ok already.
1468 extra_headers=math-68881.h
1471 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1472 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1473 xmake_file=x-linux # aka the Linux C library 6.
1474 tm_file=m68k/linux.h
1475 tmake_file="t-linux m68k/t-linux"
1476 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1477 fixincludes=Makefile.in #On Linux, the headers are ok already.
1478 extra_headers=math-68881.h
1480 if [[ x$enable_threads = xyes ]]; then
1485 tmake_file=m68k/t-m68kbare
1486 tm_file=m68k/m68k-psos.h
1487 extra_headers=math-68881.h
1490 tmake_file="m68k/t-m68kbare t-rtems"
1491 tm_file=m68k/rtems.h
1492 extra_headers=math-68881.h
1498 tm_file=m88k/dguxbcs.h
1499 tmake_file=m88k/t-dguxbcs
1503 tmake_file=m88k/t-dgux
1506 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1508 xmake_file=m88k/x-dgux
1509 if [[ x$gas = xyes ]]
1511 tmake_file=m88k/t-dgux-gas
1513 fixincludes=fixinc.dgux
1515 m88k-dolphin-sysv3*)
1516 tm_file=m88k/dolph.h
1517 extra_parts="crtbegin.o crtend.o"
1518 xm_file=m88k/xm-sysv3.h
1519 xmake_file=m88k/x-dolph
1520 if [[ x$gas = xyes ]]
1522 tmake_file=m88k/t-m88k-gas
1525 m88k-tektronix-sysv3)
1526 tm_file=m88k/tekXD88.h
1527 extra_parts="crtbegin.o crtend.o"
1528 xm_file=m88k/xm-sysv3.h
1529 xmake_file=m88k/x-tekXD88
1530 if [[ x$gas = xyes ]]
1532 tmake_file=m88k/t-m88k-gas
1536 tm_file=m88k/m88k-aout.h
1539 tm_file=m88k/m88k-coff.h
1540 tmake_file=m88k/t-bug
1544 extra_parts="crtbegin.o crtend.o"
1545 if [[ x$gas = xyes ]]
1547 tmake_file=m88k/t-luna-gas
1549 tmake_file=m88k/t-luna
1553 tm_file=m88k/sysv3.h
1554 extra_parts="crtbegin.o crtend.o"
1555 xm_file=m88k/xm-sysv3.h
1556 xmake_file=m88k/x-sysv3
1557 if [[ x$gas = xyes ]]
1559 tmake_file=m88k/t-m88k-gas
1563 tm_file=m88k/sysv4.h
1564 extra_parts="crtbegin.o crtend.o"
1565 xmake_file=m88k/x-sysv4
1566 tmake_file=m88k/t-sysv4
1568 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1569 tm_file=mips/iris6.h
1570 xm_file=mips/xm-iris6.h
1572 fixincludes=fixinc.irix
1573 xmake_file=mips/x-iris6
1574 tmake_file=mips/t-iris6
1575 if [[ x$enable_threads = xyes ]]; then
1579 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1580 tm_file=mips/cross64.h
1581 xm_file=mips/xm-iris5.h
1583 fixincludes=Makefile.in
1584 xmake_file=mips/x-iris
1585 tmake_file=mips/t-cross64
1586 # See comment in mips/iris[56].h files.
1588 if [[ x$enable_threads = xyes ]]; then
1593 if [[ x$gas = xyes ]]
1595 if [[ x$stabs = xyes ]]
1597 tm_file=mips/iris5gdb.h
1599 tm_file=mips/sni-gas.h
1602 tm_file=mips/sni-svr4.h
1604 xm_file=mips/xm-sysv.h
1605 xmake_file=mips/x-sni-svr4
1606 tmake_file=mips/t-mips-gas
1607 if [[ x$gnu_ld != xyes ]]
1613 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1614 if [[ x$gas = xyes ]]
1616 tm_file=mips/iris5gas.h
1617 if [[ x$stabs = xyes ]]
1619 tm_file="${tm_file} dbx.h"
1622 tm_file=mips/iris5.h
1624 xm_file=mips/xm-iris5.h
1626 fixincludes=fixinc.irix
1627 xmake_file=mips/x-iris
1628 # mips-tfile doesn't work yet
1629 tmake_file=mips/t-mips-gas
1630 # See comment in mips/iris5.h file.
1632 if [[ x$enable_threads = xyes ]]; then
1636 mips-sgi-irix4loser*) # Mostly like a MIPS.
1637 tm_file=mips/iris4loser.h
1638 if [[ x$stabs = xyes ]]; then
1639 tm_file="${tm_file} dbx.h"
1641 xm_file=mips/xm-iris4.h
1643 xmake_file=mips/x-iris
1644 if [[ x$gas = xyes ]]
1646 tmake_file=mips/t-mips-gas
1648 extra_passes="mips-tfile mips-tdump"
1650 if [[ x$gnu_ld != xyes ]]
1654 if [[ x$enable_threads = xyes ]]; then
1658 mips-sgi-irix4*) # Mostly like a MIPS.
1659 tm_file=mips/iris4.h
1660 if [[ x$stabs = xyes ]]; then
1661 tm_file="${tm_file} dbx.h"
1663 xm_file=mips/xm-iris4.h
1665 xmake_file=mips/x-iris
1666 if [[ x$gas = xyes ]]
1668 tmake_file=mips/t-mips-gas
1670 extra_passes="mips-tfile mips-tdump"
1672 if [[ x$gnu_ld != xyes ]]
1676 if [[ x$enable_threads = xyes ]]; then
1680 mips-sgi-*) # Mostly like a MIPS.
1681 tm_file=mips/iris3.h
1682 if [[ x$stabs = xyes ]]; then
1683 tm_file="${tm_file} dbx.h"
1685 xm_file=mips/xm-iris3.h
1687 xmake_file=mips/x-iris3
1688 if [[ x$gas = xyes ]]
1690 tmake_file=mips/t-mips-gas
1692 extra_passes="mips-tfile mips-tdump"
1694 if [[ x$gnu_ld != xyes ]]
1699 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1700 tm_file=mips/osfrose.h
1701 xmake_file=mips/x-osfrose
1702 tmake_file=mips/t-osfrose
1703 extra_objs=halfpic.o
1706 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1707 tm_file=mips/dec-osf1.h
1708 if [[ x$stabs = xyes ]]; then
1709 tm_file="${tm_file} dbx.h"
1711 xmake_file=mips/x-dec-osf1
1712 if [[ x$gas = xyes ]]
1714 tmake_file=mips/t-mips-gas
1716 tmake_file=mips/t-ultrix
1717 extra_passes="mips-tfile mips-tdump"
1719 if [[ x$gnu_ld != xyes ]]
1724 mips-dec-bsd*) # Decstation running 4.4 BSD
1725 tm_file=mips/dec-bsd.h
1727 if [[ x$gas = xyes ]]
1729 tmake_file=mips/t-mips-gas
1731 tmake_file=mips/t-ultrix
1732 extra_passes="mips-tfile mips-tdump"
1734 if [[ x$gnu_ld != xyes ]]
1739 mips-dec-netbsd*) # Decstation running NetBSD
1740 tm_file=mips/netbsd.h
1741 xm_file=mips/xm-netbsd.h
1742 # On NetBSD, the headers are already okay.
1743 fixincludes=Makefile.in
1745 if [[ x$prefix = xNONE ]]; then
1746 prefix=$native_prefix
1748 prefix=$native_prefix
1750 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1751 tm_file=mips/news4.h
1752 if [[ x$stabs = xyes ]]; then
1753 tm_file="${tm_file} dbx.h"
1755 if [[ x$gas = xyes ]]
1757 tmake_file=mips/t-mips-gas
1759 extra_passes="mips-tfile mips-tdump"
1761 if [[ x$gnu_ld != xyes ]]
1765 xmake_file=mips/x-sony
1767 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1768 # That is based on svr4.
1769 # t-svr4 is not right because this system doesn't use ELF.
1770 tm_file=mips/news5.h
1771 if [[ x$stabs = xyes ]]; then
1772 tm_file="${tm_file} dbx.h"
1774 xm_file=mips/xm-news.h
1775 if [[ x$gas = xyes ]]
1777 tmake_file=mips/t-mips-gas
1779 extra_passes="mips-tfile mips-tdump"
1781 if [[ x$gnu_ld != xyes ]]
1786 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1787 tm_file=mips/svr4-t.h
1788 if [[ x$stabs = xyes ]]; then
1789 tm_file="${tm_file} dbx.h"
1791 xm_file=mips/xm-sysv4.h
1792 xmake_file=mips/x-sysv
1793 if [[ x$gas = xyes ]]
1795 tmake_file=mips/t-mips-gas
1796 extra_parts="crtbegin.o crtend.o"
1798 tmake_file=mips/t-mips
1799 extra_passes="mips-tfile mips-tdump"
1801 if [[ x$gnu_ld != xyes ]]
1807 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1808 tm_file=mips/ultrix.h
1809 if [[ x$stabs = xyes ]]; then
1810 tm_file="${tm_file} dbx.h"
1812 xmake_file=mips/x-ultrix
1813 if [[ x$gas = xyes ]]
1815 tmake_file=mips/t-mips-gas
1817 tmake_file=mips/t-ultrix
1818 extra_passes="mips-tfile mips-tdump"
1820 if [[ x$gnu_ld != xyes ]]
1825 mips-*-riscos[[56789]]bsd*)
1826 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1827 if [[ x$stabs = xyes ]]; then
1828 tm_file="${tm_file} dbx.h"
1830 if [[ x$gas = xyes ]]
1832 tmake_file=mips/t-bsd-gas
1834 tmake_file=mips/t-bsd
1835 extra_passes="mips-tfile mips-tdump"
1837 if [[ x$gnu_ld != xyes ]]
1843 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1844 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.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 ]]
1861 mips-*-riscos[[56789]]sysv4*)
1862 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1863 if [[ x$stabs = xyes ]]; then
1864 tm_file="${tm_file} dbx.h"
1866 xm_file=mips/xm-sysv4.h
1867 xmake_file=mips/x-sysv
1868 if [[ x$gas = xyes ]]
1870 tmake_file=mips/t-svr4-gas
1872 tmake_file=mips/t-svr4
1873 extra_passes="mips-tfile mips-tdump"
1875 if [[ x$gnu_ld != xyes ]]
1881 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1882 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1883 if [[ x$stabs = xyes ]]; then
1884 tm_file="${tm_file} dbx.h"
1886 xm_file=mips/xm-sysv.h
1887 xmake_file=mips/x-sysv
1888 if [[ x$gas = xyes ]]
1890 tmake_file=mips/t-svr4-gas
1892 tmake_file=mips/t-svr4
1893 extra_passes="mips-tfile mips-tdump"
1895 if [[ x$gnu_ld != xyes ]]
1901 mips-*-riscos[[56789]]sysv*)
1902 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.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-svr3-gas
1912 tmake_file=mips/t-svr3
1913 extra_passes="mips-tfile mips-tdump"
1915 if [[ x$gnu_ld != xyes ]]
1921 mips-*-sysv* | mips-*-riscos*sysv*)
1922 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1923 if [[ x$stabs = xyes ]]; then
1924 tm_file="${tm_file} dbx.h"
1926 xm_file=mips/xm-sysv.h
1927 xmake_file=mips/x-sysv
1928 if [[ x$gas = xyes ]]
1930 tmake_file=mips/t-svr3-gas
1932 tmake_file=mips/t-svr3
1933 extra_passes="mips-tfile mips-tdump"
1935 if [[ x$gnu_ld != xyes ]]
1941 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1942 tm_file=mips/mips-5.h
1943 if [[ x$stabs = xyes ]]; then
1944 tm_file="${tm_file} dbx.h"
1946 if [[ x$gas = xyes ]]
1948 tmake_file=mips/t-mips-gas
1950 extra_passes="mips-tfile mips-tdump"
1952 if [[ x$gnu_ld != xyes ]]
1961 tm_file=mips/ecoffl.h
1962 if [[ x$stabs = xyes ]]; then
1963 tm_file="${tm_file} dbx.h"
1965 tmake_file=mips/t-ecoff
1968 tm_file=mips/ecoff.h
1969 if [[ x$stabs = xyes ]]; then
1970 tm_file="${tm_file} dbx.h"
1972 tmake_file=mips/t-ecoff
1976 tm_file="mips/elfl.h libgloss.h"
1977 tmake_file=mips/t-ecoff
1980 tm_file="mips/elf.h libgloss.h"
1981 tmake_file=mips/t-ecoff
1984 tm_file="mips/elfl64.h libgloss.h"
1985 tmake_file=mips/t-ecoff
1987 mips64orionel-*-elf*)
1988 tm_file="mips/elflorion.h libgloss.h"
1989 tmake_file=mips/t-ecoff
1992 tm_file="mips/elf64.h libgloss.h"
1993 tmake_file=mips/t-ecoff
1996 tm_file="mips/elforion.h libgloss.h"
1997 tmake_file=mips/t-ecoff
1999 mips64orion-*-rtems*)
2000 tm_file=mips/rtems64.h
2001 tmake_file="mips/t-ecoff t-rtems"
2003 mips-*-*) # Default MIPS RISC-OS 4.0.
2004 if [[ x$stabs = xyes ]]; then
2005 tm_file="${tm_file} dbx.h"
2007 if [[ x$gas = xyes ]]
2009 tmake_file=mips/t-mips-gas
2011 extra_passes="mips-tfile mips-tdump"
2013 if [[ x$gnu_ld != xyes ]]
2020 tm_file="mn10200/mn10200.h"
2021 if [[ x$stabs = xyes ]]
2023 tm_file="${tm_file} dbx.h"
2029 tm_file="mn10300/mn10300.h"
2030 if [[ x$stabs = xyes ]]
2032 tm_file="${tm_file} dbx.h"
2037 tm_file=ns32k/encore.h
2041 tm_file=ns32k/sequent.h
2045 tm_file=ns32k/tek6100.h
2050 tm_file=ns32k/tek6200.h
2054 # This has not been updated to GCC 2.
2056 # xm_file=ns32k/xm-genix.h
2057 # xmake_file=ns32k/x-genix
2058 # tm_file=ns32k/genix.h
2059 # broken_install=yes
2063 tm_file=ns32k/merlin.h
2067 tm_file=ns32k/pc532-mach.h
2071 tm_file=ns32k/pc532-min.h
2072 xm_file=ns32k/xm-pc532-min.h
2075 ns32k-pc532-netbsd*)
2076 tm_file=ns32k/netbsd.h
2077 xm_file=ns32k/xm-netbsd.h
2078 # On NetBSD, the headers are already okay.
2079 fixincludes=Makefile.in
2083 tm_file="${tm_file} pdp11/2bsd.h"
2089 xmake_file=pyr/x-pyr
2096 xmake_file=romp/x-mach
2099 powerpc-*-sysv* | powerpc-*-elf*)
2100 tm_file=rs6000/sysv4.h
2101 xm_file=rs6000/xm-sysv4.h
2102 extra_headers=ppc-asm.h
2103 if [[ x$gas = xyes ]]
2105 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2107 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2109 xmake_file=rs6000/x-sysv4
2112 tm_file=rs6000/eabiaix.h
2113 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2114 fixincludes=Makefile.in
2115 extra_headers=ppc-asm.h
2118 tm_file=rs6000/eabisim.h
2119 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2120 fixincludes=Makefile.in
2121 extra_headers=ppc-asm.h
2124 tm_file=rs6000/eabi.h
2125 if [[ x$gas = xyes ]]
2127 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2129 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2131 fixincludes=Makefile.in
2132 extra_headers=ppc-asm.h
2135 tm_file=rs6000/rtems.h
2136 if [[ x$gas = xyes ]]
2138 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2140 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2142 fixincludes=Makefile.in
2143 extra_headers=ppc-asm.h
2145 powerpc-*-linux-gnu*)
2146 tm_file=rs6000/linux.h
2147 xm_file=rs6000/xm-sysv4.h
2148 out_file=rs6000/rs6000.c
2149 if [[ x$gas = xyes ]]
2151 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2153 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2156 fixincludes=Makefile.in
2157 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2158 extra_headers=ppc-asm.h
2159 if [[ x$enable_threads = xyes ]]; then
2165 xm_file=rs6000/xm-sysv4.h
2166 tm_file=rs6000/vxppc.h
2167 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2168 extra_headers=ppc-asm.h
2170 powerpcle-*-sysv* | powerpcle-*-elf*)
2171 tm_file=rs6000/sysv4le.h
2172 xm_file=rs6000/xm-sysv4.h
2173 if [[ x$gas = xyes ]]
2175 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2177 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2179 xmake_file=rs6000/x-sysv4
2180 extra_headers=ppc-asm.h
2182 powerpcle-*-eabisim*)
2183 tm_file=rs6000/eabilesim.h
2184 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2185 fixincludes=Makefile.in
2186 extra_headers=ppc-asm.h
2189 tm_file=rs6000/eabile.h
2190 if [[ x$gas = xyes ]]
2192 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2194 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2196 fixincludes=Makefile.in
2197 extra_headers=ppc-asm.h
2199 powerpcle-*-winnt* )
2200 tm_file=rs6000/win-nt.h
2201 tmake_file=rs6000/t-winnt
2203 fixincludes=Makefile.in
2204 if [[ x$enable_threads = xyes ]]; then
2207 extra_headers=ppc-asm.h
2209 powerpcle-*-pe | powerpcle-*-cygwin32)
2210 tm_file=rs6000/cygwin32.h
2211 xm_file=rs6000/xm-cygwin32.h
2212 tmake_file=rs6000/t-winnt
2213 xmake_file=rs6000/x-cygwin32
2215 fixincludes=Makefile.in
2216 if [[ x$enable_threads = xyes ]]; then
2220 extra_headers=ppc-asm.h
2222 powerpcle-*-solaris2*)
2223 tm_file=rs6000/sol2.h
2224 xm_file=rs6000/xm-sysv4.h
2225 if [[ x$gas = xyes ]]
2227 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2229 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2231 xmake_file=rs6000/x-sysv4
2232 fixincludes=fixinc.svr4
2233 extra_headers=ppc-asm.h
2235 rs6000-ibm-aix3.[[01]]*)
2236 tm_file=rs6000/aix31.h
2237 xmake_file=rs6000/x-aix31
2240 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2241 tm_file=rs6000/aix3newas.h
2242 if [[ x$host != x$target ]]
2244 tmake_file=rs6000/t-xnewas
2246 tmake_file=rs6000/t-newas
2250 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2251 tm_file=rs6000/aix41.h
2252 if [[ x$host != x$target ]]
2254 tmake_file=rs6000/t-xnewas
2256 tmake_file=rs6000/t-newas
2258 xmake_file=rs6000/x-aix31
2268 tm_file=rs6000/mach.h
2269 xm_file=rs6000/xm-mach.h
2270 xmake_file=rs6000/x-mach
2274 tm_file=rs6000/lynx.h
2275 xm_file=rs6000/xm-lynx.h
2276 tmake_file=rs6000/t-rs6000
2277 xmake_file=rs6000/x-lynx
2289 xm_file=sparc/xm-pbd.h
2291 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2292 tm_file=sparc/vxsparc.h
2293 tmake_file=sparc/t-vxsparc
2297 tmake_file=sparc/t-sparcbare
2298 tm_file="sparc/aout.h libgloss.h"
2301 tm_file=sparc/netbsd.h
2302 xm_file=sparc/xm-netbsd.h
2303 # On NetBSD, the headers are already okay.
2304 fixincludes=Makefile.in
2310 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2311 xm_file=sparc/xm-linux.h
2312 tm_file=sparc/linux-aout.h
2314 fixincludes=Makefile.in #On Linux, the headers are ok already.
2318 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2319 xm_file=sparc/xm-linux.h # with ELF format using the
2320 xmake_file=x-linux # Linux C library 5.
2321 tm_file=sparc/linux.h
2322 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2323 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2324 fixincludes=Makefile.in #On Linux, the headers are ok already.
2328 sparc-*-linux-gnu*) # Sparc's running Linux
2329 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2330 xmake_file=x-linux # aka the Linux C library 6.
2331 tm_file=sparc/linux.h
2332 tmake_file="t-linux sparc/t-linux"
2333 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2334 fixincludes=Makefile.in #On Linux, the headers are ok already.
2337 if [[ x$enable_threads = xyes ]]; then
2342 if [[ x$gas = xyes ]]
2344 tm_file=sparc/lynx.h
2346 tm_file=sparc/lynx-ng.h
2348 xm_file=sparc/xm-lynx.h
2349 tmake_file=sparc/t-sunos41
2353 tmake_file="sparc/t-sparcbare t-rtems"
2354 tm_file=sparc/rtems.h
2357 tm_file=sparc/sol2.h
2358 xm_file=sparc/xm-sol2.h
2359 tmake_file=sparc/t-sol2
2360 xmake_file=sparc/x-sysv4
2361 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2362 fixincludes=fixinc.svr4
2364 if [[ x$enable_threads = xyes ]]; then
2365 thread_file='solaris'
2369 tm_file=sparc/sunos4.h
2370 tmake_file=sparc/t-sunos40
2374 tm_file=sparc/sunos4.h
2375 tmake_file=sparc/t-sunos41
2379 tm_file=sparc/sun4o3.h
2383 tm_file=sparc/sysv4.h
2384 xm_file=sparc/xm-sysv4.h
2386 xmake_file=sparc/x-sysv4
2387 extra_parts="crtbegin.o crtend.o"
2390 xm_file=sparc/xm-sol2.h
2391 tm_file=sparc/vxsim.h
2392 tmake_file=sparc/t-vxsparc
2393 xmake_file=sparc/x-sysv4
2396 tm_file="sparc/splet.h libgloss.h"
2397 tmake_file=sparc/t-splet
2400 tm_file="sparc/litecoff.h libgloss.h"
2401 tmake_file=sparc/t-sparclite
2404 tm_file="sparc/lite.h aoutos.h libgloss.h"
2405 tmake_file=sparc/t-sparclite
2408 tmake_file=sparc/t-sp64
2409 tm_file=sparc/sp64-aout.h
2412 tmake_file=sparc/t-sp64
2413 tm_file=sparc/sp64-elf.h
2414 extra_parts="crtbegin.o crtend.o"
2416 # This hasn't been upgraded to GCC 2.
2417 # tahoe-harris-*) # Harris tahoe, using COFF.
2418 # tm_file=tahoe/harris.h
2420 # tahoe-*-bsd*) # tahoe running BSD
2422 # This hasn't been upgraded to GCC 2.
2427 vax-*-bsd*) # vaxen running BSD
2431 vax-*-sysv*) # vaxen running system V
2432 tm_file="${tm_file} vax/vaxv.h"
2433 xm_file="${tm_file} vax/xm-vaxv.h"
2437 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2438 xm_file="${xm_file} xm-netbsd.h"
2439 # On NetBSD, the headers are already okay.
2440 fixincludes=Makefile.in
2444 vax-*-ultrix*) # vaxen running ultrix
2445 tm_file="${tm_file} vax/ultrix.h"
2449 vax-*-vms*) # vaxen running VMS
2450 xm_file=vax/xm-vms.h
2454 vax-*-*) # vax default entry
2458 xm_file="${xm_file} xm-svr3"
2462 echo "Configuration $machine not supported" 1>&2
2469 ;; # Existing Linux/GNU systems do not use the GNU setup.
2471 # On the GNU system, the setup is just about the same on
2472 # each different CPU. The specific machines that GNU
2473 # supports are matched above and just set $cpu_type.
2474 xm_file=${cpu_type}/xm-gnu.h
2475 tm_file=${cpu_type}/gnu.h
2476 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2477 # GNU always uses ELF.
2479 # GNU tools are the only tools.
2482 # On GNU, the headers are already okay.
2483 fixincludes=Makefile.in
2484 xmake_file=x-linux # These details are the same as Linux.
2485 tmake_file=t-gnu # These are not.
2488 fixincludes=fixinc.svr4
2489 xmake_try_sysv=x-sysv
2491 install_headers_dir=install-headers-cpio
2495 install_headers_dir=install-headers-cpio
2499 # Distinguish i[3456]86
2500 # Also, do not run mips-tfile on MIPS if using gas.
2501 # Process --with-cpu= for PowerPC/rs6000
2502 target_cpu_default2=
2505 target_cpu_default2=1
2508 target_cpu_default2=2
2511 target_cpu_default2=3
2516 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2519 target_cpu_default2="MASK_CPU_EV5"
2523 if [[ x$gas = xyes ]]
2525 if [[ x$target_cpu_default2 = x ]]
2527 target_cpu_default2="MASK_GAS"
2529 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2533 mips*-*-ecoff* | mips*-*-elf*)
2534 if [[ x$gas = xyes ]]
2536 if [[ x$gnu_ld = xyes ]]
2538 target_cpu_default2=20
2540 target_cpu_default2=16
2545 if [[ x$gas = xyes ]]
2547 target_cpu_default2=16
2550 powerpc*-*-* | rs6000-*-*)
2551 case "x$with_cpu" in
2555 xcommon | xpower | xpower2 | xpowerpc | xrios \
2556 | xrios1 | xrios2 | xrsc | xrsc1 \
2557 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2558 | x403 | x505 | x801 | x821 | x823 | x860)
2559 target_cpu_default2="'\"$with_cpu\"'"
2563 echo "--with-cpu must be passed a value" 1>&2
2568 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2574 case ".$with_cpu" in
2576 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2578 .supersparc | .ultrasparc | .v7 | .v8)
2579 target_cpu_default2="TARGET_CPU_$with_cpu"
2582 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2589 if [[ x$target_cpu_default2 != x ]]
2591 if [[ x$target_cpu_default != x ]]
2593 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2595 target_cpu_default=$target_cpu_default2
2599 # No need for collect2 if we have the GNU linker.
2606 # Save data on machine being used to compile GCC in build_xm_file.
2607 # Save data on host machine in vars host_xm_file and host_xmake_file.
2608 if [[ x$pass1done = x ]]
2610 if [[ x"$xm_file" = x ]]
2611 then build_xm_file=$cpu_type/xm-$cpu_type.h
2612 else build_xm_file=$xm_file
2614 build_broken_install=$broken_install
2615 build_install_headers_dir=$install_headers_dir
2616 build_exeext=$exeext
2619 if [[ x$pass2done = x ]]
2621 if [[ x"$xm_file" = x ]]
2622 then host_xm_file=$cpu_type/xm-$cpu_type.h
2623 else host_xm_file=$xm_file
2625 if [[ x"$xmake_file" = x ]]
2626 then xmake_file=$cpu_type/x-$cpu_type
2628 host_xmake_file="$xmake_file"
2629 host_truncate_target=$truncate_target
2630 host_extra_gcc_objs=$extra_gcc_objs
2631 host_extra_objs=$extra_host_objs
2637 extra_objs="${host_extra_objs} ${extra_objs}"
2639 # Default the target-machine variables that were not explicitly set.
2640 if [[ x"$tm_file" = x ]]
2641 then tm_file=$cpu_type/$cpu_type.h; fi
2643 if [[ x$extra_headers = x ]]
2644 then extra_headers=; fi
2646 if [[ x"$xm_file" = x ]]
2647 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2649 md_file=$cpu_type/$cpu_type.md
2651 if [[ x$out_file = x ]]
2652 then out_file=$cpu_type/$cpu_type.c; fi
2654 if [[ x"$tmake_file" = x ]]
2655 then tmake_file=$cpu_type/t-$cpu_type
2658 if [[ x$float_format = x ]]
2659 then float_format=i64
2662 # Say what files are being used for the output code and MD file.
2663 echo "Using \`$srcdir/config/$out_file' to output insns."
2664 echo "Using \`$srcdir/config/$md_file' as machine description file."
2667 for f in $tm_file; do
2670 if [[ $count = ax ]]; then
2671 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2673 echo "Using the following target machine macro files:"
2674 for f in $tm_file; do
2675 echo " $srcdir/config/$f"
2680 for f in $host_xm_file; do
2683 if [[ $count = ax ]]; then
2684 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2686 echo "Using the following host machine macro files:"
2687 for f in $host_xm_file; do
2688 echo " $srcdir/config/$f"
2692 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2694 for f in $build_xm_file; do
2697 if [[ $count = ax ]]; then
2698 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2700 echo "Using the following build machine macro files:"
2701 for f in $build_xm_file; do
2702 echo " $srcdir/config/$f"
2707 if [[ x$thread_file = x ]]
2708 then thread_file='single'
2711 # Set up the header files.
2712 # $links is the list of header files to create.
2713 # $vars is the list of shell variables with file names to include.
2714 # config2.h is the old config.h. It is included by the new config.h which
2715 # created from config.in. The goal is to simplify the transition to autoconf.
2716 vars="host_xm_file tm_file xm_file build_xm_file"
2717 links="config2.h tm.h tconfig.h hconfig.h"
2720 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2723 while [[ -n "$vars" ]]
2725 # set file to car of files, files to cdr of files
2726 set $vars; var=$1; shift; vars=$*
2727 set $links; link=$1; shift; links=$*
2731 # Define TARGET_CPU_DEFAULT if the system wants one.
2732 # This substitutes for lots of *.h files.
2733 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2735 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2738 for file in `eval echo '$'$var`; do
2739 echo "#include \"$file\"" >>$link
2743 # Truncate the target if necessary
2744 if [[ x$host_truncate_target != x ]]; then
2745 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2748 # Get the version number from the toplevel
2749 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2751 # Are we using gcc as the native compiler?
2753 *linux*) # All Linux's use gcc as the native compiler.
2754 if [[ x$prefix = xNONE ]]; then
2755 prefix=$native_prefix
2760 # Get an absolute path to the GCC top-level source directory
2766 # Conditionalize the makefile for this host machine.
2767 # Make-host contains the concatenation of all host makefile fragments
2768 # [there can be more than one]. This file is built by configure.frag.
2769 host_overrides=Make-host
2770 dep_host_xmake_file=
2771 for f in .. ${host_xmake_file}
2773 if [[ -f ${srcdir}/config/$f ]]
2775 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2779 # Conditionalize the makefile for this target machine.
2780 # Make-target contains the concatenation of all host makefile fragments
2781 # [there can be more than one]. This file is built by configure.frag.
2782 target_overrides=Make-target
2784 for f in .. ${tmake_file}
2786 if [[ -f ${srcdir}/config/$f ]]
2788 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2792 # If the host doesn't support symlinks, modify CC in
2793 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2794 # Otherwise, we can use "CC=$(CC)".
2796 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2798 cc_set_by_configure="\$(CC)"
2799 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2801 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2802 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2806 out_object_file=`basename $out_file .c`.o
2809 for f in $tm_file; do
2810 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2814 for f in $host_xm_file; do
2815 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2819 for f in $build_xm_file; do
2820 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2823 # Define macro CROSS_COMPILE in compilation
2824 # if this is a cross-compiler.
2825 # Also use all.cross instead of all.internal
2826 # and add cross-make to Makefile.
2827 cross_overrides="/dev/null"
2828 if [[ x$host != x$target ]]
2830 cross_defines="CROSS=-DCROSS_COMPILE"
2831 cross_overrides="${topdir}/cross-make"
2834 # When building gcc with a cross-compiler, we need to fix a few things.
2835 # This must come after cross-make as we want all.build to override
2837 build_overrides="/dev/null"
2838 if [[ x$build != x$host ]]
2840 build_overrides="${topdir}/build-make"
2843 # Expand extra_headers to include complete path.
2844 # This substitutes for lots of t-* files.
2846 if [[ "x$extra_headers" = x ]]
2849 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2850 for file in $extra_headers;
2852 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2856 # Add a definition of USE_COLLECT2 if system wants one.
2857 # Also tell toplev.c what to do.
2858 # This substitutes for lots of t-* files.
2859 if [[ x$use_collect2 = x ]]
2864 will_use_collect2="ld"
2865 maybe_use_collect2="-DUSE_COLLECT2"
2869 # Set MD_DEPS if the real md file is in md.pre-cpp.
2870 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2871 # for line oriented comments, so we must always use a GNU cpp. If
2872 # building gcc with a cross compiler, use the cross compiler just
2873 # built. Otherwise, we can use the cpp just built.
2875 if [[ "x$md_cppflags" = x ]]
2877 md_file_sub=$srcdir/config/$md_file
2882 # If we have gas in the build tree, make a link to it.
2883 if [[ -f ../gas/Makefile ]]; then
2884 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2887 # If we have ld in the build tree, make a link to it.
2888 if [[ -f ../ld/Makefile ]]; then
2889 # if [[ x$use_collect2 = x ]]; then
2890 # rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2892 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2896 # Figure out what language subdirectories are present.
2898 for lang in ${srcdir}/*/config-lang.in ..
2902 # The odd quoting in the next line works around
2903 # an apparent bug in bash 1.12 on linux.
2904 ${srcdir}/[[*]]/config-lang.in) ;;
2905 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2909 # Make empty files to contain the specs and options for each language.
2910 # Then add #include lines to for a compiler that has specs and/or options.
2914 rm -f specs.h options.h
2915 touch specs.h options.h
2916 for subdir in . $subdirs
2918 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2919 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2920 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2922 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2923 echo "#include \"$subdir/lang-options.h\"" >>options.h
2924 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2928 # These (without "all_") are set in each config-lang.in.
2929 # `language' must be a single word so is spelled singularly.
2935 all_outputs=Makefile
2936 # List of language makefile fragments.
2941 # Add the language fragments.
2942 # Languages are added via two mechanisms. Some information must be
2943 # recorded in makefile variables, these are defined in config-lang.in.
2944 # We accumulate them and plug them into the main Makefile.
2945 # The other mechanism is a set of hooks for each of the main targets
2946 # like `clean', `install', etc.
2948 language_fragments="Make-lang"
2949 language_hooks="Make-hooks"
2952 for s in .. $subdirs
2964 . ${srcdir}/$s/config-lang.in
2965 if [[ "x$language" = x ]]
2967 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2970 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2971 all_languages="$all_languages $language"
2972 if [[ "x$boot_language" = xyes ]]
2974 all_boot_languages="$all_boot_languages $language"
2976 all_compilers="$all_compilers $compilers"
2977 all_stagestuff="$all_stagestuff $stagestuff"
2978 all_diff_excludes="$all_diff_excludes $diff_excludes"
2979 all_headers="$all_headers $headers"
2980 all_outputs="$all_outputs $outputs"
2981 if [[ x$outputs = x ]]
2983 oldstyle_subdirs="$oldstyle_subdirs $s"
2985 all_lib2funcs="$all_lib2funcs $lib2funcs"
2989 # Since we can't use `::' targets, we link each language in
2990 # with a set of hooks, reached indirectly via lang.${target}.
2994 target_list="all.build all.cross start.encap rest.encap \
2996 install-normal install-common install-info install-man \
2998 mostlyclean clean distclean extraclean maintainer-clean \
2999 stage1 stage2 stage3 stage4"
3000 for t in $target_list
3003 for l in .. $all_languages
3005 if [[ $l != ".." ]]; then
3009 echo "lang.$t: $x" >> Make-hooks
3012 # If we're not building in srcdir, create .gdbinit.
3014 if [[ ! -f Makefile.in ]]; then
3015 echo "dir ." > .gdbinit
3016 echo "dir ${srcdir}" >> .gdbinit
3017 if [[ x$gdb_needs_out_file_path = xyes ]]
3019 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3021 if [[ "x$subdirs" != x ]]; then
3024 echo "dir ${srcdir}/$s" >> .gdbinit
3027 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3030 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3033 if [[ x$enable_haifa = xyes ]]; then
3034 echo "Using the Haifa scheduler."
3036 sched_cflags=-DHAIFA
3038 AC_SUBST(sched_prefix)
3039 AC_SUBST(sched_cflags)
3040 if [[ x$enable_haifa != x ]]; then
3041 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3042 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3050 # Process the language and host/target makefile fragments.
3051 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3053 # Substitute configuration variables
3055 AC_SUBST(all_languages)
3056 AC_SUBST(all_boot_languages)
3057 AC_SUBST(all_compilers)
3058 AC_SUBST(all_lang_makefiles)
3059 AC_SUBST(all_stagestuff)
3060 AC_SUBST(all_diff_excludes)
3061 AC_SUBST(all_lib2funcs)
3062 AC_SUBST(all_headers)
3063 AC_SUBST(extra_passes)
3064 AC_SUBST(extra_programs)
3065 AC_SUBST(extra_parts)
3066 AC_SUBST(extra_c_objs)
3067 AC_SUBST(extra_c_flags)
3068 AC_SUBST(extra_objs)
3069 AC_SUBST(host_extra_gcc_objs)
3070 AC_SUBST(extra_headers_list)
3071 AC_SUBST(dep_host_xmake_file)
3072 AC_SUBST(dep_tmake_file)
3074 AC_SUBST(out_object_file)
3076 AC_SUBST(tm_file_list)
3077 AC_SUBST(build_xm_file_list)
3078 AC_SUBST(host_xm_file_list)
3079 AC_SUBST(lang_specs_files)
3080 AC_SUBST(lang_options_files)
3081 AC_SUBST(thread_file)
3083 AC_SUBST(local_prefix)
3084 AC_SUBST(gxx_include_dir)
3085 AC_SUBST(fixincludes)
3086 AC_SUBST(build_install_headers_dir)
3087 AC_SUBST(build_exeext)
3088 AC_SUBST(float_format)
3089 AC_SUBST(will_use_collect2)
3090 AC_SUBST(maybe_use_collect2)
3091 AC_SUBST(cc_set_by_configure)
3092 AC_SUBST(stage_prefix_set_by_configure)
3094 AC_SUBST_FILE(target_overrides)
3095 AC_SUBST_FILE(host_overrides)
3096 AC_SUBST(cross_defines)
3097 AC_SUBST_FILE(cross_overrides)
3098 AC_SUBST_FILE(build_overrides)
3099 AC_SUBST_FILE(language_fragments)
3100 AC_SUBST_FILE(language_hooks)
3102 # Echo that links are built
3103 if [[ x$host = x$target ]]
3111 if [[ x$host != x$build ]]
3113 str3=" on a $build system"
3116 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3121 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3123 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3125 echo " ${str2}${str3}." 1>&2
3128 # Configure the subdirectories
3129 # AC_CONFIG_SUBDIRS($subdirs)
3131 # Create the Makefile
3132 # and configure language subdirectories
3133 AC_OUTPUT($all_outputs,
3135 . $srcdir/configure.lang
3136 case x$CONFIG_HEADERS in
3137 xconfig.h:config.in)
3145 target_alias='${target_alias}'
3147 subdirs='${subdirs}'
3148 oldstyle_subdirs='${oldstyle_subdirs}'
3149 symbolic_link='${symbolic_link}'
3150 program_transform_set='${program_transform_set}'
3151 program_transform_name='${program_transform_name}'
3152 dep_host_xmake_file='${dep_host_xmake_file}'
3153 host_xmake_file='${host_xmake_file}'
3154 dep_tmake_file='${dep_tmake_file}'
3155 tmake_file='${tmake_file}'
3156 thread_file='${thread_file}'
3157 version='${version}'
3158 local_prefix='${local_prefix}'
3159 build_install_headers_dir='${build_install_headers_dir}'
3160 build_exeext='${build_exeext}'
3161 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3162 SET_MAKE='${SET_MAKE}'
3163 build_broken_install='${build_broken_install}'
3164 target_list='${target_list}'
3165 target_overrides='${target_overrides}'
3166 host_overrides='${host_overrides}'
3167 cross_defines='${cross_defines}'
3168 cross_overrides='${cross_overrides}'
3169 build_overrides='${build_overrides}'