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_install_headers_dir=install-headers-tar
153 host_truncate_target=
155 # Decode the host machine, then the target machine.
156 # For the host machine, we save the xm_file variable as host_xm_file;
157 # then we decode the target machine and forget everything else
158 # that came from the host machine.
159 for machine in $build $host $target; do
172 # Set this to force installation and use of collect2.
174 # Set this to override the default target model.
176 # Set this to control which fixincludes program to use.
177 fixincludes=fixincludes
178 # Set this to control how the header file directory is installed.
179 install_headers_dir=install-headers-tar
180 # Set this to a non-empty list of args to pass to cpp if the target
181 # wants its .md file passed through cpp.
183 # Set this if directory names should be truncated to 14 characters.
185 # Set this if gdb needs a dir command with `dirname $out_file`
186 gdb_needs_out_file_path=
187 # Set this if the build machine requires executables to have a
191 # Set default cpu_type, tm_file and xm_file so it can be updated in
192 # each machine entry.
193 cpu_type=`echo $machine | sed 's/-.*$//'`
227 tm_file=${cpu_type}/${cpu_type}.h
228 xm_file=${cpu_type}/xm-${cpu_type}.h
231 # Support site-specific machine types.
233 cpu_type=`echo $machine | sed -e 's/-.*//'`
234 rest=`echo $machine | sed -e "s/$cpu_type-//"`
235 xm_file=${cpu_type}/xm-$rest.h
236 tm_file=${cpu_type}/$rest.h
237 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
238 then xmake_file=${cpu_type}/x-$rest; \
241 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
242 then tmake_file=${cpu_type}/t-$rest; \
248 a29k-*-bsd* | a29k-*-sym1*)
249 tm_file="${tm_file} a29k/unix.h"
250 xm_file=a29k/xm-unix.h
251 xmake_file=a29k/x-unix
254 a29k-*-udi | a29k-*-coff)
255 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
256 tmake_file=a29k/t-a29kbare
259 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
260 tmake_file=a29k/t-vx29k
261 extra_parts="crtbegin.o crtend.o"
263 a29k-*-*) # Default a29k environment.
266 alpha*-*-linux-gnuecoff*)
267 tm_file="${tm_file} alpha/linux.h"
268 xm_file="${xm_file} alpha/xm-linux.h"
269 target_cpu_default="MASK_GAS"
272 fixincludes=Makefile.in
276 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
277 xm_file="${xm_file} alpha/xm-linux.h"
278 target_cpu_default="MASK_GAS"
280 tmake_file="t-linux alpha/t-linux"
282 fixincludes=Makefile.in
283 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
285 if [[ x$enable_threads = xyes ]]; then
289 alpha*-dec-osf[[456789]]*)
290 if [[ x$stabs = xyes ]]
292 tm_file="${tm_file} dbx.h"
294 if [[ x$gas != xyes ]]
296 extra_passes="mips-tfile mips-tdump"
299 # Some versions of OSF4 (specifically X4.0-9 296.7) have
300 # a broken tar, so we use cpio instead.
303 install_headers_dir=install-headers-cpio
307 alpha*-dec-osf[[23]]*)
308 tm_file="${tm_file} alpha/osf2or3.h"
309 if [[ x$stabs = xyes ]]
311 tm_file="${tm_file} dbx.h"
313 if [[ x$gas != xyes ]]
315 extra_passes="mips-tfile mips-tdump"
320 tm_file="${tm_file} alpha/osf12.h"
321 if [[ x$stabs = xyes ]]
323 tm_file="${tm_file} dbx.h"
325 if [[ x$gas != xyes ]]
327 extra_passes="mips-tfile mips-tdump"
332 if [[ x$stabs = xyes ]]
334 tm_file="${tm_file} dbx.h"
336 if [[ x$gas != xyes ]]
338 extra_passes="mips-tfile mips-tdump"
343 tm_file="${tm_file} alpha/win-nt.h"
344 target_cpu_default=MASK_WINDOWS_NT
345 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
347 xmake_file=winnt/x-winnt
348 extra_host_objs=oldnames.o
349 extra_gcc_objs="spawnv.o oldnames.o"
350 fixincludes=fixinc.winnt
351 if [[ x$gnu_ld != xyes ]]
353 extra_programs=ld.exe
355 if [[ x$enable_threads = xyes ]]; then
361 xm_file="${xm_file} alpha/xm-vms.h"
362 tmake_file=alpha/t-vms
363 fixincludes=Makefile.in
365 arm-*-coff* | armel-*-coff*)
367 tmake_file=arm/t-bare
369 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
370 tm_file=arm/riscix1-1.h
373 arm-*-riscix*) # Acorn RISC machine
374 if [[ x$gas = xyes ]]
376 tm_file=arm/rix-gas.h
380 xmake_file=arm/x-riscix
381 tmake_file=arm/t-riscix
384 arm-semi-aout | armel-semi-aout)
386 tmake_file=arm/t-semi
387 fixincludes=Makefile.in # There is nothing to fix
389 arm-semi-aof | armel-semi-aof)
390 tm_file=arm/semiaof.h
391 tmake_file=arm/t-semiaof
392 fixincludes=Makefile.in # There is nothing to fix
396 xm_file=arm/xm-netbsd.h
397 tmake_file=arm/t-netbsd
398 # On NetBSD, the headers are already okay.
399 fixincludes=Makefile.in
402 arm-*-linux-gnuaout*) # ARM Linux
404 xm_file=arm/xm-linux.h
406 tm_file=arm/linux-gas.h
407 tmake_file=arm/t-linux
408 fixincludes=Makefile.in
414 c1-convex-*) # Convex C1
417 fixincludes=Makefile.in
419 c2-convex-*) # Convex C2
422 fixincludes=Makefile.in
427 fixincludes=Makefile.in
432 fixincludes=Makefile.in
435 target_cpu_default=16
437 fixincludes=Makefile.in
439 clipper-intergraph-clix*)
440 tm_file="${tm_file} svr3.h clipper/clix.h"
441 xm_file=clipper/xm-clix.h
442 xmake_file=clipper/x-clix
443 extra_headers=va-clipper.h
444 extra_parts="crtbegin.o crtend.o"
445 install_headers_dir=install-headers-cpio
452 # This hasn't been upgraded to GCC 2.
453 # fx80-alliant-*) # Alliant FX/80
459 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
460 xm_file=pa/xm-papro.h
465 tm_file="${tm_file} pa/pa-osf.h"
467 fixincludes=Makefile.in
470 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
471 xm_file=pa/xm-papro.h
475 tm_file="${tm_file} pa/pa-osf.h"
477 fixincludes=Makefile.in
482 fixincludes=Makefile.in
486 fixincludes=Makefile.in
489 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
490 xm_file=pa/xm-pahpux.h
491 xmake_file=pa/x-pa-hpux
492 if [[ x$gas = xyes ]]
494 tm_file="${tm_file} pa/gas.h"
496 install_headers_dir=install-headers-cpio
499 hppa1.0-*-hpux8.0[[0-2]]*)
500 tm_file="${tm_file} pa/pa-hpux.h"
501 xm_file=pa/xm-pahpux.h
502 xmake_file=pa/x-pa-hpux
503 if [[ x$gas = xyes ]]
505 tm_file="${tm_file} pa/pa-gas.h"
507 tm_file="pa/pa-oldas.h ${tm_file}"
509 install_headers_dir=install-headers-cpio
512 hppa1.1-*-hpux8.0[[0-2]]*)
514 tm_file="${tm_file} pa/pa-hpux.h"
515 xm_file=pa/xm-pahpux.h
516 xmake_file=pa/x-pa-hpux
517 if [[ x$gas = xyes ]]
519 tm_file="${tm_file} pa/pa-gas.h"
521 tm_file="pa/pa-oldas.h ${tm_file}"
523 install_headers_dir=install-headers-cpio
528 tm_file="${tm_file} pa/pa-hpux.h"
529 xm_file=pa/xm-pahpux.h
530 xmake_file=pa/x-pa-hpux
531 if [[ x$gas = xyes ]]
533 tm_file="${tm_file} pa/pa-gas.h"
535 install_headers_dir=install-headers-cpio
539 tm_file="${tm_file} pa/pa-hpux.h"
540 xm_file=pa/xm-pahpux.h
541 xmake_file=pa/x-pa-hpux
542 if [[ x$gas = xyes ]]
544 tm_file="${tm_file} pa/pa-gas.h"
546 install_headers_dir=install-headers-cpio
551 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
552 xm_file=pa/xm-pahpux.h
553 xmake_file=pa/x-pa-hpux
554 if [[ x$gas = xyes ]]
556 tm_file="${tm_file} pa/pa-gas.h"
558 install_headers_dir=install-headers-cpio
562 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
563 xm_file=pa/xm-pahpux.h
564 xmake_file=pa/x-pa-hpux
565 if [[ x$gas = xyes ]]
567 tm_file="${tm_file} pa/pa-gas.h"
569 install_headers_dir=install-headers-cpio
574 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
575 xm_file=pa/xm-pahpux.h
576 xmake_file=pa/x-pa-hpux
577 if [[ x$gas = xyes ]]
579 tm_file="${tm_file} pa/pa-gas.h"
581 install_headers_dir=install-headers-cpio
585 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.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
597 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
598 xm_file=pa/xm-pahpux.h
599 xmake_file=pa/x-pa-hpux
600 if [[ x$gas = xyes ]]
602 tm_file="${tm_file} pa/pa-gas.h"
604 install_headers_dir=install-headers-cpio
608 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
609 xm_file=pa/xm-pahpux.h
610 xmake_file=pa/x-pa-hpux
611 if [[ x$gas = xyes ]]
613 tm_file="${tm_file} pa/pa-gas.h"
615 install_headers_dir=install-headers-cpio
621 fixincludes=Makefile.in
625 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
626 if [[ x$gas = xyes ]]
628 tm_file=i386/aix386.h
629 extra_parts="crtbegin.o crtend.o"
630 tmake_file=i386/t-crtstuff
632 tm_file=i386/aix386ng.h
635 xm_file=i386/xm-aix.h
636 xmake_file=i386/x-aix
638 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
639 xm_file=i386/xm-sysv4.h
640 xmake_file=i386/x-ncr3000
641 if [[ x$stabs = xyes -a x$gas = xyes ]]
643 tm_file=i386/sysv4gdb.h
647 extra_parts="crtbegin.o crtend.o"
648 tmake_file=i386/t-crtpic
652 xm_file=i386/xm-next.h
653 tmake_file=i386/t-next
654 xmake_file=i386/x-next
655 extra_objs=nextstep.o
656 if [[ x$enable_threads = xyes ]]; then
660 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
662 if [[ x$gas = xyes ]]
664 tm_file=i386/seq-gas.h
666 tm_file=i386/sequent.h
669 i[[3456]]86-sequent-ptx1*)
670 xm_file=i386/xm-sysv3.h
671 xmake_file=i386/x-sysv3
672 tm_file=i386/seq-sysv3.h
673 tmake_file=i386/t-crtstuff
674 fixincludes=fixinc.ptx
675 extra_parts="crtbegin.o crtend.o"
676 install_headers_dir=install-headers-cpio
678 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
679 xm_file=i386/xm-sysv3.h
680 xmake_file=i386/x-sysv3
681 tm_file=i386/seq2-sysv3.h
682 tmake_file=i386/t-crtstuff
683 extra_parts="crtbegin.o crtend.o"
684 fixincludes=fixinc.ptx
685 install_headers_dir=install-headers-cpio
687 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
688 xm_file=i386/xm-sysv4.h
690 tm_file=i386/ptx4-i.h
692 extra_parts="crtbegin.o crtend.o"
693 fixincludes=fixinc.ptx
694 install_headers_dir=install-headers-cpio
696 i386-sun-sunos*) # Sun i386 roadrunner
697 xm_file=i386/xm-sun.h
702 tm_file=i386/i386-aout.h
703 tmake_file=i386/t-i386bare
705 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
706 tm_file=i386/bsd386.h
707 xm_file=i386/xm-bsd386.h
708 # tmake_file=t-libc-ok
711 tm_file=i386/386bsd.h
712 xm_file=i386/xm-bsd386.h
713 # tmake_file=t-libc-ok
714 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
717 i[[3456]]86-*-freebsdelf*)
718 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
719 xm_file=i386/xm-freebsd.h
720 # On FreeBSD, the headers are already ok.
721 fixincludes=Makefile.in
722 tmake_file=i386/t-freebsd
727 i[[3456]]86-*-freebsd*)
728 tm_file=i386/freebsd.h
729 xm_file=i386/xm-freebsd.h
730 # On FreeBSD, the headers are already ok.
731 fixincludes=Makefile.in
732 tmake_file=i386/t-freebsd
734 i[[3456]]86-*-netbsd*)
735 tm_file=i386/netbsd.h
736 xm_file=i386/xm-netbsd.h
737 # On NetBSD, the headers are already okay.
738 fixincludes=Makefile.in
742 tm_file=i386/i386-coff.h
743 tmake_file=i386/t-i386bare
745 i[[3456]]86-*-isc*) # 80386 running ISC system
746 xm_file=i386/xm-isc.h
748 i[[345]]86-*-isc[[34]]*)
749 xmake_file=i386/x-isc3
752 xmake_file=i386/x-isc
755 if [[ x$gas = xyes -a x$stabs = xyes ]]
757 tm_file=i386/iscdbx.h
758 tmake_file=i386/t-svr3dbx
759 extra_parts="svr3.ifile svr3z.ifile"
761 tm_file=i386/isccoff.h
762 tmake_file=i386/t-crtstuff
763 extra_parts="crtbegin.o crtend.o"
765 install_headers_dir=install-headers-cpio
767 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
768 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
769 xmake_file=x-linux-aout
770 tmake_file="t-linux-aout i386/t-crtstuff"
771 tm_file=i386/linux-oldld.h
772 fixincludes=Makefile.in #On Linux, the headers are ok already.
775 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
776 xm_file=i386/xm-linux.h # with a.out format
777 xmake_file=x-linux-aout
778 tmake_file="t-linux-aout i386/t-crtstuff"
779 tm_file=i386/linux-aout.h
780 fixincludes=Makefile.in #On Linux, the headers are ok already.
783 i[[3456]]86-*-linux-gnulibc1)
784 xm_file=i386/xm-linux.h # Intel 80386's running Linux
785 xmake_file=x-linux # with ELF format using the
786 tm_file=i386/linux.h # Linux C library 5
787 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
788 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
789 fixincludes=Makefile.in #On Linux, the headers are ok already.
791 if [[ x$enable_threads = xyes ]]; then
795 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
796 xm_file=i386/xm-linux.h # with ELF format using glibc 2
797 xmake_file=x-linux # aka Linux C library 6
799 tmake_file="t-linux i386/t-crtstuff"
800 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
801 fixincludes=Makefile.in #On Linux, the headers are ok already.
803 if [[ x$enable_threads = xyes ]]; then
809 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
810 xm_file=i386/xm-go32.h
812 tmake_file=i386/t-go32
814 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
817 fixincludes=Makefile.in
821 i[[3456]]86-*-lynxos*)
822 if [[ x$gas = xyes ]]
826 tm_file=i386/lynx-ng.h
828 xm_file=i386/xm-lynx.h
829 tmake_file=i386/t-i386bare
834 # tmake_file=t-libc-ok
837 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
838 if [[ x$elf = xyes ]]
840 tm_file=i386/osfelf.h
843 tm_file=i386/osfrose.h
846 xm_file=i386/xm-osf.h
847 xmake_file=i386/x-osfrose
848 tmake_file=i386/t-osf
851 i[[345]]86-go32-rtems*)
853 xm_file=i386/xm-go32.h
854 tm_file=i386/go32-rtems.h
855 tmake_file="i386/t-go32 t-rtems"
860 tmake_file="i386/t-i386bare t-rtems"
862 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
863 xm_file=i386/xm-sco5.h
864 xmake_file=i386/x-sco5
865 fixincludes=fixinc.sco
867 tmake_file=i386/t-sco5
868 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
870 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
871 xm_file=i386/xm-sco.h
872 xmake_file=i386/x-sco4
873 fixincludes=fixinc.sco
874 install_headers_dir=install-headers-cpio
875 if [[ x$stabs = xyes ]]
877 tm_file=i386/sco4dbx.h
878 tmake_file=i386/t-svr3dbx
879 extra_parts="svr3.ifile svr3z.rfile"
882 tmake_file=i386/t-crtstuff
883 extra_parts="crtbegin.o crtend.o"
887 i[[3456]]86-*-sco*) # 80386 running SCO system
888 xm_file=i386/xm-sco.h
889 xmake_file=i386/x-sco
890 install_headers_dir=install-headers-cpio
891 if [[ x$stabs = xyes ]]
893 tm_file=i386/scodbx.h
894 tmake_file=i386/t-svr3dbx
895 extra_parts="svr3.ifile svr3z.rfile"
898 extra_parts="crtbegin.o crtend.o"
899 tmake_file=i386/t-crtstuff
903 i[[3456]]86-*-solaris2*)
904 xm_file=i386/xm-sysv4.h
905 if [[ x$stabs = xyes ]]
907 tm_file=i386/sol2dbg.h
911 tmake_file=i386/t-sol2
912 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
914 fixincludes=fixinc.svr4
915 if [[ x$enable_threads = xyes ]]; then
916 thread_file='solaris'
919 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
920 xm_file=i386/xm-sysv4.h
922 if [[ x$stabs = xyes ]]
924 tm_file="${tm_file} dbx.h"
926 tmake_file=i386/t-crtpic
928 extra_parts="crtbegin.o crtend.o"
930 i[[3456]]86-*-sysv*) # Intel 80386's running system V
931 xm_file=i386/xm-sysv3.h
932 xmake_file=i386/x-sysv3
933 if [[ x$gas = xyes ]]
935 if [[ x$stabs = xyes ]]
937 tm_file=i386/svr3dbx.h
938 tmake_file=i386/t-svr3dbx
939 extra_parts="svr3.ifile svr3z.rfile"
941 tm_file=i386/svr3gas.h
942 extra_parts="crtbegin.o crtend.o"
943 tmake_file=i386/t-crtstuff
947 extra_parts="crtbegin.o crtend.o"
948 tmake_file=i386/t-crtstuff
951 i386-*-vsta) # Intel 80386's running VSTa kernel
952 xm_file=i386/xm-vsta.h
954 tmake_file=i386/t-vsta
955 xmake_file=i386/x-vsta
957 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
958 xm_file="${xm_file} i386/xm-cygwin32.h"
959 tmake_file=i386/t-cygwin32
960 tm_file=i386/cygwin32.h
961 xmake_file=i386/x-cygwin32
963 fixincludes=Makefile.in
964 if [[ x$enable_threads = xyes ]]; then
969 i[[3456]]86-*-mingw32)
970 tm_file=i386/mingw32.h
971 xm_file="${xm_file} i386/xm-mingw32.h"
972 tmake_file=i386/t-cygwin32
974 xmake_file=i386/x-cygwin32
975 fixincludes=Makefile.in
976 if [[ x$enable_threads = xyes ]]; then
981 i[[3456]]86-*-winnt3*)
982 tm_file=i386/win-nt.h
984 xm_file=i386/xm-winnt.h
985 xmake_file=winnt/x-winnt
986 tmake_file=i386/t-winnt
987 extra_host_objs="winnt.o oldnames.o"
988 extra_gcc_objs="spawnv.o oldnames.o"
989 fixincludes=fixinc.winnt
990 if [[ x$gnu_ld != xyes ]]
992 extra_programs=ld.exe
994 if [[ x$enable_threads = xyes ]]; then
999 xm_file=i386/xm-dgux.h
1000 out_file=i386/dgux.c
1002 tmake_file=i386/t-dgux
1003 xmake_file=i386/x-dgux
1004 fixincludes=fixinc.dgux
1005 install_headers_dir=install-headers-cpio
1007 i860-alliant-*) # Alliant FX/2800
1008 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1009 xm_file="${xm_file} i860/xm-fx2800.h"
1010 xmake_file=i860/x-fx2800
1011 tmake_file=i860/t-fx2800
1012 extra_parts="crtbegin.o crtend.o"
1015 tm_file="${tm_file} i860/bsd.h"
1016 if [[ x$gas = xyes ]]
1018 tm_file="${tm_file} i860/bsd-gas.h"
1023 tm_file="${tm_file} i860/mach.h"
1024 tmake_file=t-libc-ok
1026 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1027 tm_file="${tm_file} svr3.h i860/paragon.h"
1028 xm_file="${xm_file} xm-svr3.h"
1032 tm_file="${tm_file} svr3.h i860/sysv3.h"
1033 xm_file="${tm_file} xm-svr3.h"
1034 xmake_file=i860/x-sysv3
1035 extra_parts="crtbegin.o crtend.o"
1038 tm_file="${tm_file} svr4.h i860/sysv4.h"
1039 xm_file="${xm_file} xm-svr3.h"
1040 xmake_file=i860/x-sysv4
1042 extra_parts="crtbegin.o crtend.o"
1044 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1045 tm_file="${tm_file} i960/vx960.h"
1046 tmake_file=i960/t-vxworks960
1050 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1051 tmake_file=i960/t-vxworks960
1055 tm_file="${tm_file} i960/vx960.h"
1056 tmake_file=i960/t-vxworks960
1060 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1061 tmake_file=i960/t-960bare
1065 tmake_file="i960/t-960bare t-rtems"
1066 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1069 i960-*-*) # Default i960 environment.
1073 extra_parts="crtinit.o crtfini.o"
1075 m68000-convergent-sysv*)
1077 xm_file=m68k/xm-3b1.h
1079 extra_headers=math-68881.h
1081 m68000-hp-bsd*) # HP 9000/200 running BSD
1082 tm_file=m68k/hp2bsd.h
1083 xmake_file=m68k/x-hp2bsd
1085 extra_headers=math-68881.h
1087 m68000-hp-hpux*) # HP 9000 series 300
1088 xm_file=m68k/xm-hp320.h
1089 if [[ x$gas = xyes ]]
1091 xmake_file=m68k/x-hp320g
1092 tm_file=m68k/hp310g.h
1094 xmake_file=m68k/x-hp320
1095 tm_file=m68k/hp310.h
1097 install_headers_dir=install-headers-cpio
1099 extra_headers=math-68881.h
1104 extra_headers=math-68881.h
1107 tm_file=m68k/sun2o4.h
1109 extra_headers=math-68881.h
1112 xm_file=m68k/xm-3b1.h
1113 if [[ x$gas = xyes ]]
1120 extra_headers=math-68881.h
1122 m68k-apple-aux*) # Apple Macintosh running A/UX
1123 xm_file=m68k/xm-aux.h
1124 tmake_file=m68k/t-aux
1125 install_headers_dir=install-headers-cpio
1126 extra_headers=math-68881.h
1127 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1129 if [[ "$gnu_ld" = yes ]]
1131 tm_file="${tm_file} m68k/auxgld.h"
1133 tm_file="${tm_file} m68k/auxld.h"
1135 if [[ "$gas" = yes ]]
1137 tm_file="${tm_file} m68k/auxgas.h"
1139 tm_file="${tm_file} m68k/auxas.h"
1141 tm_file="${tm_file} m68k/a-ux.h"
1144 tm_file=m68k/apollo68.h
1145 xmake_file=m68k/x-apollo68
1147 extra_headers=math-68881.h
1149 m68k-altos-sysv*) # Altos 3068
1150 if [[ x$gas = xyes ]]
1152 tm_file=m68k/altos3068.h
1153 xm_file=m68k/xm-altos3068.h
1155 echo "The Altos is supported only with the GNU assembler" 1>&2
1158 extra_headers=math-68881.h
1160 m68k-bull-sysv*) # Bull DPX/2
1161 if [[ x$gas = xyes ]]
1163 if [[ x$stabs = xyes ]]
1165 tm_file=m68k/dpx2cdbx.h
1167 tm_file=m68k/dpx2g.h
1172 xm_file=m68k/xm-m68kv.h
1173 xmake_file=m68k/x-dpx2
1175 extra_headers=math-68881.h
1177 m68k-atari-sysv4*) # Atari variant of V.4.
1178 tm_file=m68k/atari.h
1179 xm_file=m68k/xm-atari.h
1181 extra_parts="crtbegin.o crtend.o"
1182 extra_headers=math-68881.h
1184 m68k-motorola-sysv*)
1185 tm_file=m68k/mot3300.h
1186 xm_file=m68k/xm-mot3300.h
1187 if [[ x$gas = xyes ]]
1189 xmake_file=m68k/x-mot3300-gas
1190 if [[ x$gnu_ld = xyes ]]
1192 tmake_file=m68k/t-mot3300-gald
1194 tmake_file=m68k/t-mot3300-gas
1198 xmake_file=m68k/x-mot3300
1199 if [[ x$gnu_ld = xyes ]]
1201 tmake_file=m68k/t-mot3300-gld
1203 tmake_file=m68k/t-mot3300
1207 gdb_needs_out_file_path=yes
1208 extra_parts="crt0.o mcrt0.o"
1209 extra_headers=math-68881.h
1211 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1212 tm_file=m68k/tower-as.h
1213 xm_file=m68k/xm-tower.h
1214 xmake_file=m68k/x-tower
1215 extra_parts="crtbegin.o crtend.o"
1216 extra_headers=math-68881.h
1219 tm_file=m68k/plexus.h
1220 xm_file=m68k/xm-plexus.h
1222 extra_headers=math-68881.h
1226 xm_file=m68k/xm-m68kv.h
1227 extra_headers=math-68881.h
1230 xm_file=m68k/xm-crds.h
1231 xmake_file=m68k/x-crds
1234 extra_headers=math-68881.h
1236 m68k-cbm-sysv4*) # Commodore variant of V.4.
1238 xm_file=m68k/xm-amix.h
1239 xmake_file=m68k/x-amix
1241 extra_parts="crtbegin.o crtend.o"
1242 extra_headers=math-68881.h
1245 tm_file=m68k/ccur-GAS.h
1246 xmake_file=m68k/x-ccur
1247 extra_headers=math-68881.h
1250 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1251 tm_file=m68k/hp3bsd44.h
1252 xmake_file=m68k/x-hp3bsd44
1254 extra_headers=math-68881.h
1256 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1257 tm_file=m68k/hp3bsd.h
1259 extra_headers=math-68881.h
1262 if [[ x$with_fp = xno ]]
1264 tm_file=m68k/isi-nfp.h
1269 extra_headers=math-68881.h
1271 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1272 xm_file=m68k/xm-hp320.h
1273 if [[ x$gas = xyes ]]
1275 xmake_file=m68k/x-hp320g
1276 tm_file=m68k/hp320g.h
1278 xmake_file=m68k/x-hp320
1279 tm_file=m68k/hpux7.h
1281 install_headers_dir=install-headers-cpio
1283 extra_headers=math-68881.h
1285 m68k-hp-hpux*) # HP 9000 series 300
1286 xm_file=m68k/xm-hp320.h
1287 if [[ x$gas = xyes ]]
1289 xmake_file=m68k/x-hp320g
1290 tm_file=m68k/hp320g.h
1292 xmake_file=m68k/x-hp320
1293 tm_file=m68k/hp320.h
1295 install_headers_dir=install-headers-cpio
1297 extra_headers=math-68881.h
1300 tm_file=m68k/sun3mach.h
1302 extra_headers=math-68881.h
1305 if [[ x$gas = xyes ]]
1307 tm_file=m68k/news3gas.h
1309 tm_file=m68k/news3.h
1312 extra_headers=math-68881.h
1314 m68k-sony-bsd* | m68k-sony-newsos*)
1315 if [[ x$gas = xyes ]]
1317 tm_file=m68k/newsgas.h
1322 extra_headers=math-68881.h
1324 m68k-next-nextstep2*)
1325 tm_file=m68k/next21.h
1326 xm_file=m68k/xm-next.h
1327 tmake_file=m68k/t-next
1328 xmake_file=m68k/x-next
1329 extra_objs=nextstep.o
1330 extra_headers=math-68881.h
1333 m68k-next-nextstep3*)
1335 xm_file=m68k/xm-next.h
1336 tmake_file=m68k/t-next
1337 xmake_file=m68k/x-next
1338 extra_objs=nextstep.o
1339 extra_headers=math-68881.h
1340 if [[ x$enable_threads = xyes ]]; then
1345 if [[ x$with_fp = xno ]]
1347 tm_file=m68k/sun3n3.h
1349 tm_file=m68k/sun3o3.h
1352 extra_headers=math-68881.h
1354 m68k-sun-sunos*) # For SunOS 4 (the default).
1355 if [[ x$with_fp = xno ]]
1357 tm_file=m68k/sun3n.h
1361 xm_file=m68k/xm-sun3.h
1363 extra_headers=math-68881.h
1366 tm_file=m68k/vxm68k.h
1367 tmake_file=m68k/t-vxworks68
1368 extra_headers=math-68881.h
1371 tmake_file=m68k/t-m68kbare
1372 tm_file="m68k/m68k-aout.h libgloss.h"
1373 extra_headers=math-68881.h
1376 tmake_file=m68k/t-m68kbare
1377 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1378 extra_headers=math-68881.h
1381 if [[ x$gas = xyes ]]
1385 tm_file=m68k/lynx-ng.h
1387 xm_file=m68k/xm-lynx.h
1389 tmake_file=m68k/t-lynx
1390 extra_headers=math-68881.h
1393 tm_file=m68k/netbsd.h
1394 xm_file=m68k/xm-netbsd.h
1395 # On NetBSD, the headers are already okay.
1396 fixincludes=Makefile.in
1399 m68k-*-sysv3*) # Motorola m68k's running system V.3
1400 xm_file=m68k/xm-m68kv.h
1401 xmake_file=m68k/x-m68kv
1402 extra_parts="crtbegin.o crtend.o"
1403 extra_headers=math-68881.h
1405 m68k-*-sysv4*) # Motorola m68k's running system V.4
1406 tm_file=m68k/m68kv4.h
1407 xm_file=m68k/xm-m68kv.h
1409 extra_parts="crtbegin.o crtend.o"
1410 extra_headers=math-68881.h
1412 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1413 xm_file=m68k/xm-linux.h # with a.out format
1415 tm_file=m68k/linux-aout.h
1416 tmake_file="t-linux-aout m68k/t-linux-aout"
1417 fixincludes=Makefile.in #On Linux, the headers are ok already.
1418 extra_headers=math-68881.h
1421 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1422 xm_file=m68k/xm-linux.h # with ELF format using the
1423 xmake_file=x-linux # Linux C library 5
1424 tm_file=m68k/linux.h
1425 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1426 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1427 fixincludes=Makefile.in #On Linux, the headers are ok already.
1428 extra_headers=math-68881.h
1431 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1432 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1433 xmake_file=x-linux # aka the Linux C library 6.
1434 tm_file=m68k/linux.h
1435 tmake_file="t-linux m68k/t-linux"
1436 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1437 fixincludes=Makefile.in #On Linux, the headers are ok already.
1438 extra_headers=math-68881.h
1440 if [[ x$enable_threads = xyes ]]; then
1445 tmake_file=m68k/t-m68kbare
1446 tm_file=m68k/m68k-psos.h
1447 extra_headers=math-68881.h
1450 tmake_file="m68k/t-m68kbare t-rtems"
1451 tm_file=m68k/rtems.h
1452 extra_headers=math-68881.h
1458 tm_file=m88k/dguxbcs.h
1459 tmake_file=m88k/t-dguxbcs
1463 tmake_file=m88k/t-dgux
1466 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1467 xmake_file=m88k/x-dgux
1468 if [[ x$gas = xyes ]]
1470 tmake_file=m88k/t-dgux-gas
1472 fixincludes=fixinc.dgux
1474 m88k-dolphin-sysv3*)
1475 tm_file=m88k/dolph.h
1476 extra_parts="crtbegin.o crtend.o"
1477 xm_file=m88k/xm-sysv3.h
1478 xmake_file=m88k/x-dolph
1479 if [[ x$gas = xyes ]]
1481 tmake_file=m88k/t-m88k-gas
1484 m88k-tektronix-sysv3)
1485 tm_file=m88k/tekXD88.h
1486 extra_parts="crtbegin.o crtend.o"
1487 xm_file=m88k/xm-sysv3.h
1488 xmake_file=m88k/x-tekXD88
1489 if [[ x$gas = xyes ]]
1491 tmake_file=m88k/t-m88k-gas
1495 tm_file=m88k/m88k-aout.h
1498 tm_file=m88k/m88k-coff.h
1499 tmake_file=m88k/t-bug
1503 extra_parts="crtbegin.o crtend.o"
1504 if [[ x$gas = xyes ]]
1506 tmake_file=m88k/t-luna-gas
1508 tmake_file=m88k/t-luna
1512 tm_file=m88k/sysv3.h
1513 extra_parts="crtbegin.o crtend.o"
1514 xm_file=m88k/xm-sysv3.h
1515 xmake_file=m88k/x-sysv3
1516 if [[ x$gas = xyes ]]
1518 tmake_file=m88k/t-m88k-gas
1522 tm_file=m88k/sysv4.h
1523 extra_parts="crtbegin.o crtend.o"
1524 xmake_file=m88k/x-sysv4
1525 tmake_file=m88k/t-sysv4
1527 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1528 tm_file=mips/iris6.h
1529 xm_file=mips/xm-iris6.h
1530 fixincludes=fixinc.irix
1531 xmake_file=mips/x-iris6
1532 tmake_file=mips/t-iris6
1533 if [[ x$enable_threads = xyes ]]; then
1537 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1538 tm_file=mips/cross64.h
1539 xm_file=mips/xm-iris5.h
1540 fixincludes=Makefile.in
1541 xmake_file=mips/x-iris
1542 tmake_file=mips/t-cross64
1543 # See comment in mips/iris[56].h files.
1545 if [[ x$enable_threads = xyes ]]; then
1550 if [[ x$gas = xyes ]]
1552 if [[ x$stabs = xyes ]]
1554 tm_file=mips/iris5gdb.h
1556 tm_file=mips/sni-gas.h
1559 tm_file=mips/sni-svr4.h
1561 xm_file=mips/xm-sysv.h
1562 xmake_file=mips/x-sni-svr4
1563 tmake_file=mips/t-mips-gas
1564 if [[ x$gnu_ld != xyes ]]
1569 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1570 if [[ x$gas = xyes ]]
1572 tm_file=mips/iris5gas.h
1573 if [[ x$stabs = xyes ]]
1575 tm_file="${tm_file} dbx.h"
1578 tm_file=mips/iris5.h
1580 xm_file=mips/xm-iris5.h
1581 fixincludes=fixinc.irix
1582 xmake_file=mips/x-iris
1583 # mips-tfile doesn't work yet
1584 tmake_file=mips/t-mips-gas
1585 # See comment in mips/iris5.h file.
1587 if [[ x$enable_threads = xyes ]]; then
1591 mips-sgi-irix4loser*) # Mostly like a MIPS.
1592 tm_file=mips/iris4loser.h
1593 if [[ x$stabs = xyes ]]; then
1594 tm_file="${tm_file} dbx.h"
1596 xm_file=mips/xm-iris4.h
1597 xmake_file=mips/x-iris
1598 if [[ x$gas = xyes ]]
1600 tmake_file=mips/t-mips-gas
1602 extra_passes="mips-tfile mips-tdump"
1604 if [[ x$gnu_ld != xyes ]]
1608 if [[ x$enable_threads = xyes ]]; then
1612 mips-sgi-irix4*) # Mostly like a MIPS.
1613 tm_file=mips/iris4.h
1614 if [[ x$stabs = xyes ]]; then
1615 tm_file="${tm_file} dbx.h"
1617 xm_file=mips/xm-iris4.h
1618 xmake_file=mips/x-iris
1619 if [[ x$gas = xyes ]]
1621 tmake_file=mips/t-mips-gas
1623 extra_passes="mips-tfile mips-tdump"
1625 if [[ x$gnu_ld != xyes ]]
1629 if [[ x$enable_threads = xyes ]]; then
1633 mips-sgi-*) # Mostly like a MIPS.
1634 tm_file=mips/iris3.h
1635 if [[ x$stabs = xyes ]]; then
1636 tm_file="${tm_file} dbx.h"
1638 xm_file=mips/xm-iris3.h
1639 xmake_file=mips/x-iris3
1640 if [[ x$gas = xyes ]]
1642 tmake_file=mips/t-mips-gas
1644 extra_passes="mips-tfile mips-tdump"
1646 if [[ x$gnu_ld != xyes ]]
1651 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1652 tm_file=mips/osfrose.h
1653 xmake_file=mips/x-osfrose
1654 tmake_file=mips/t-osfrose
1655 extra_objs=halfpic.o
1658 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1659 tm_file=mips/dec-osf1.h
1660 if [[ x$stabs = xyes ]]; then
1661 tm_file="${tm_file} dbx.h"
1663 xmake_file=mips/x-dec-osf1
1664 if [[ x$gas = xyes ]]
1666 tmake_file=mips/t-mips-gas
1668 tmake_file=mips/t-ultrix
1669 extra_passes="mips-tfile mips-tdump"
1671 if [[ x$gnu_ld != xyes ]]
1676 mips-dec-bsd*) # Decstation running 4.4 BSD
1677 tm_file=mips/dec-bsd.h
1679 if [[ x$gas = xyes ]]
1681 tmake_file=mips/t-mips-gas
1683 tmake_file=mips/t-ultrix
1684 extra_passes="mips-tfile mips-tdump"
1686 if [[ x$gnu_ld != xyes ]]
1691 mips-dec-netbsd*) # Decstation running NetBSD
1692 tm_file=mips/netbsd.h
1693 xm_file=mips/xm-netbsd.h
1694 # On NetBSD, the headers are already okay.
1695 fixincludes=Makefile.in
1697 if [[ x$prefix = xNONE ]]; then
1698 prefix=$native_prefix
1700 prefix=$native_prefix
1702 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1703 tm_file=mips/news4.h
1704 if [[ x$stabs = xyes ]]; then
1705 tm_file="${tm_file} dbx.h"
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 ]]
1717 xmake_file=mips/x-sony
1719 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1720 # That is based on svr4.
1721 # t-svr4 is not right because this system doesn't use ELF.
1722 tm_file=mips/news5.h
1723 if [[ x$stabs = xyes ]]; then
1724 tm_file="${tm_file} dbx.h"
1726 xm_file=mips/xm-news.h
1727 if [[ x$gas = xyes ]]
1729 tmake_file=mips/t-mips-gas
1731 extra_passes="mips-tfile mips-tdump"
1733 if [[ x$gnu_ld != xyes ]]
1738 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1739 tm_file=mips/svr4-t.h
1740 if [[ x$stabs = xyes ]]; then
1741 tm_file="${tm_file} dbx.h"
1743 xm_file=mips/xm-sysv4.h
1744 xmake_file=mips/x-sysv
1745 if [[ x$gas = xyes ]]
1747 tmake_file=mips/t-mips-gas
1748 extra_parts="crtbegin.o crtend.o"
1750 tmake_file=mips/t-mips
1751 extra_passes="mips-tfile mips-tdump"
1753 if [[ x$gnu_ld != xyes ]]
1758 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1759 tm_file=mips/ultrix.h
1760 if [[ x$stabs = xyes ]]; then
1761 tm_file="${tm_file} dbx.h"
1763 xmake_file=mips/x-ultrix
1764 if [[ x$gas = xyes ]]
1766 tmake_file=mips/t-mips-gas
1768 tmake_file=mips/t-ultrix
1769 extra_passes="mips-tfile mips-tdump"
1771 if [[ x$gnu_ld != xyes ]]
1776 mips-*-riscos[[56789]]bsd*)
1777 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1778 if [[ x$stabs = xyes ]]; then
1779 tm_file="${tm_file} dbx.h"
1781 if [[ x$gas = xyes ]]
1783 tmake_file=mips/t-bsd-gas
1785 tmake_file=mips/t-bsd
1786 extra_passes="mips-tfile mips-tdump"
1788 if [[ x$gnu_ld != xyes ]]
1793 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1794 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1795 if [[ x$stabs = xyes ]]; then
1796 tm_file="${tm_file} dbx.h"
1798 if [[ x$gas = xyes ]]
1800 tmake_file=mips/t-bsd-gas
1802 tmake_file=mips/t-bsd
1803 extra_passes="mips-tfile mips-tdump"
1805 if [[ x$gnu_ld != xyes ]]
1810 mips-*-riscos[[56789]]sysv4*)
1811 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1812 if [[ x$stabs = xyes ]]; then
1813 tm_file="${tm_file} dbx.h"
1815 xm_file=mips/xm-sysv4.h
1816 xmake_file=mips/x-sysv
1817 if [[ x$gas = xyes ]]
1819 tmake_file=mips/t-svr4-gas
1821 tmake_file=mips/t-svr4
1822 extra_passes="mips-tfile mips-tdump"
1824 if [[ x$gnu_ld != xyes ]]
1829 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1830 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1831 if [[ x$stabs = xyes ]]; then
1832 tm_file="${tm_file} dbx.h"
1834 xm_file=mips/xm-sysv.h
1835 xmake_file=mips/x-sysv
1836 if [[ x$gas = xyes ]]
1838 tmake_file=mips/t-svr4-gas
1840 tmake_file=mips/t-svr4
1841 extra_passes="mips-tfile mips-tdump"
1843 if [[ x$gnu_ld != xyes ]]
1848 mips-*-riscos[[56789]]sysv*)
1849 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1850 if [[ x$stabs = xyes ]]; then
1851 tm_file="${tm_file} dbx.h"
1853 xm_file=mips/xm-sysv.h
1854 xmake_file=mips/x-sysv
1855 if [[ x$gas = xyes ]]
1857 tmake_file=mips/t-svr3-gas
1859 tmake_file=mips/t-svr3
1860 extra_passes="mips-tfile mips-tdump"
1862 if [[ x$gnu_ld != xyes ]]
1867 mips-*-sysv* | mips-*-riscos*sysv*)
1868 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1869 if [[ x$stabs = xyes ]]; then
1870 tm_file="${tm_file} dbx.h"
1872 xm_file=mips/xm-sysv.h
1873 xmake_file=mips/x-sysv
1874 if [[ x$gas = xyes ]]
1876 tmake_file=mips/t-svr3-gas
1878 tmake_file=mips/t-svr3
1879 extra_passes="mips-tfile mips-tdump"
1881 if [[ x$gnu_ld != xyes ]]
1886 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1887 tm_file=mips/mips-5.h
1888 if [[ x$stabs = xyes ]]; then
1889 tm_file="${tm_file} dbx.h"
1891 if [[ x$gas = xyes ]]
1893 tmake_file=mips/t-mips-gas
1895 extra_passes="mips-tfile mips-tdump"
1897 if [[ x$gnu_ld != xyes ]]
1905 tm_file=mips/ecoffl.h
1906 if [[ x$stabs = xyes ]]; then
1907 tm_file="${tm_file} dbx.h"
1909 tmake_file=mips/t-ecoff
1912 tm_file=mips/ecoff.h
1913 if [[ x$stabs = xyes ]]; then
1914 tm_file="${tm_file} dbx.h"
1916 tmake_file=mips/t-ecoff
1919 tm_file="mips/elfl.h libgloss.h"
1920 tmake_file=mips/t-ecoff
1923 tm_file="mips/elf.h libgloss.h"
1924 tmake_file=mips/t-ecoff
1927 tm_file="mips/elfl64.h libgloss.h"
1928 tmake_file=mips/t-ecoff
1930 mips64orionel-*-elf*)
1931 tm_file="mips/elflorion.h libgloss.h"
1932 tmake_file=mips/t-ecoff
1935 tm_file="mips/elf64.h libgloss.h"
1936 tmake_file=mips/t-ecoff
1939 tm_file="mips/elforion.h libgloss.h"
1940 tmake_file=mips/t-ecoff
1942 mips64orion-*-rtems*)
1943 tm_file=mips/rtems64.h
1944 tmake_file="mips/t-ecoff t-rtems"
1946 mips-*-*) # Default MIPS RISC-OS 4.0.
1947 if [[ x$stabs = xyes ]]; then
1948 tm_file="${tm_file} dbx.h"
1950 if [[ x$gas = xyes ]]
1952 tmake_file=mips/t-mips-gas
1954 extra_passes="mips-tfile mips-tdump"
1956 if [[ x$gnu_ld != xyes ]]
1963 tm_file="mn10200/mn10200.h"
1964 if [[ x$stabs = xyes ]]
1966 tm_file="${tm_file} dbx.h"
1972 tm_file="mn10300/mn10300.h"
1973 if [[ x$stabs = xyes ]]
1975 tm_file="${tm_file} dbx.h"
1980 tm_file=ns32k/encore.h
1984 tm_file=ns32k/sequent.h
1988 tm_file=ns32k/tek6100.h
1992 tm_file=ns32k/tek6200.h
1995 # This has not been updated to GCC 2.
1997 # xm_file=ns32k/xm-genix.h
1998 # xmake_file=ns32k/x-genix
1999 # tm_file=ns32k/genix.h
2003 tm_file=ns32k/merlin.h
2007 tm_file=ns32k/pc532-mach.h
2011 tm_file=ns32k/pc532-min.h
2012 xm_file=ns32k/xm-pc532-min.h
2015 ns32k-pc532-netbsd*)
2016 tm_file=ns32k/netbsd.h
2017 xm_file=ns32k/xm-netbsd.h
2018 # On NetBSD, the headers are already okay.
2019 fixincludes=Makefile.in
2023 tm_file="${tm_file} pdp11/2bsd.h"
2029 xmake_file=pyr/x-pyr
2036 xmake_file=romp/x-mach
2039 powerpc-*-sysv* | powerpc-*-elf*)
2040 tm_file=rs6000/sysv4.h
2041 xm_file=rs6000/xm-sysv4.h
2042 extra_headers=ppc-asm.h
2043 if [[ x$gas = xyes ]]
2045 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2047 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2049 xmake_file=rs6000/x-sysv4
2052 tm_file=rs6000/eabiaix.h
2053 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2054 fixincludes=Makefile.in
2055 extra_headers=ppc-asm.h
2058 tm_file=rs6000/eabisim.h
2059 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2060 fixincludes=Makefile.in
2061 extra_headers=ppc-asm.h
2064 tm_file=rs6000/eabi.h
2065 if [[ x$gas = xyes ]]
2067 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2069 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2071 fixincludes=Makefile.in
2072 extra_headers=ppc-asm.h
2075 tm_file=rs6000/rtems.h
2076 if [[ x$gas = xyes ]]
2078 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2080 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2082 fixincludes=Makefile.in
2083 extra_headers=ppc-asm.h
2085 powerpc-*-linux-gnu*)
2086 tm_file=rs6000/linux.h
2087 xm_file=rs6000/xm-sysv4.h
2088 out_file=rs6000/rs6000.c
2089 if [[ x$gas = xyes ]]
2091 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2093 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2096 fixincludes=Makefile.in
2097 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2098 extra_headers=ppc-asm.h
2099 if [[ x$enable_threads = xyes ]]; then
2105 xm_file=rs6000/xm-sysv4.h
2106 tm_file=rs6000/vxppc.h
2107 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2108 extra_headers=ppc-asm.h
2110 powerpcle-*-sysv* | powerpcle-*-elf*)
2111 tm_file=rs6000/sysv4le.h
2112 xm_file=rs6000/xm-sysv4.h
2113 if [[ x$gas = xyes ]]
2115 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2117 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2119 xmake_file=rs6000/x-sysv4
2120 extra_headers=ppc-asm.h
2122 powerpcle-*-eabisim*)
2123 tm_file=rs6000/eabilesim.h
2124 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2125 fixincludes=Makefile.in
2126 extra_headers=ppc-asm.h
2129 tm_file=rs6000/eabile.h
2130 if [[ x$gas = xyes ]]
2132 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2134 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2136 fixincludes=Makefile.in
2137 extra_headers=ppc-asm.h
2139 powerpcle-*-winnt* )
2140 tm_file=rs6000/win-nt.h
2141 tmake_file=rs6000/t-winnt
2143 fixincludes=Makefile.in
2144 if [[ x$enable_threads = xyes ]]; then
2147 extra_headers=ppc-asm.h
2149 powerpcle-*-pe | powerpcle-*-cygwin32)
2150 tm_file=rs6000/cygwin32.h
2151 xm_file=rs6000/xm-cygwin32.h
2152 tmake_file=rs6000/t-winnt
2153 xmake_file=rs6000/x-cygwin32
2155 fixincludes=Makefile.in
2156 if [[ x$enable_threads = xyes ]]; then
2160 extra_headers=ppc-asm.h
2162 powerpcle-*-solaris2*)
2163 tm_file=rs6000/sol2.h
2164 xm_file=rs6000/xm-sysv4.h
2165 if [[ x$gas = xyes ]]
2167 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2169 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2171 xmake_file=rs6000/x-sysv4
2172 fixincludes=fixinc.svr4
2173 extra_headers=ppc-asm.h
2175 rs6000-ibm-aix3.[[01]]*)
2176 tm_file=rs6000/aix31.h
2177 xmake_file=rs6000/x-aix31
2180 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2181 tm_file=rs6000/aix3newas.h
2182 if [[ x$host != x$target ]]
2184 tmake_file=rs6000/t-xnewas
2186 tmake_file=rs6000/t-newas
2190 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2191 tm_file=rs6000/aix41.h
2192 if [[ x$host != x$target ]]
2194 tmake_file=rs6000/t-xnewas
2196 tmake_file=rs6000/t-newas
2198 xmake_file=rs6000/x-aix31
2208 tm_file=rs6000/mach.h
2209 xm_file=rs6000/xm-mach.h
2210 xmake_file=rs6000/x-mach
2214 tm_file=rs6000/lynx.h
2215 xm_file=rs6000/xm-lynx.h
2216 tmake_file=rs6000/t-rs6000
2217 xmake_file=rs6000/x-lynx
2229 xm_file=sparc/xm-pbd.h
2231 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2232 tm_file=sparc/vxsparc.h
2233 tmake_file=sparc/t-vxsparc
2237 tmake_file=sparc/t-sparcbare
2238 tm_file="sparc/aout.h libgloss.h"
2241 tm_file=sparc/netbsd.h
2242 xm_file=sparc/xm-netbsd.h
2243 # On NetBSD, the headers are already okay.
2244 fixincludes=Makefile.in
2250 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2251 xm_file=sparc/xm-linux.h
2252 tm_file=sparc/linux-aout.h
2254 fixincludes=Makefile.in #On Linux, the headers are ok already.
2257 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2258 xm_file=sparc/xm-linux.h # with ELF format using the
2259 xmake_file=x-linux # Linux C library 5.
2260 tm_file=sparc/linux.h
2261 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2262 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2263 fixincludes=Makefile.in #On Linux, the headers are ok already.
2266 sparc-*-linux-gnu*) # Sparc's running Linux
2267 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2268 xmake_file=x-linux # aka the Linux C library 6.
2269 tm_file=sparc/linux.h
2270 tmake_file="t-linux sparc/t-linux"
2271 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2272 fixincludes=Makefile.in #On Linux, the headers are ok already.
2274 if [[ x$enable_threads = xyes ]]; then
2279 if [[ x$gas = xyes ]]
2281 tm_file=sparc/lynx.h
2283 tm_file=sparc/lynx-ng.h
2285 xm_file=sparc/xm-lynx.h
2286 tmake_file=sparc/t-sunos41
2290 tmake_file="sparc/t-sparcbare t-rtems"
2291 tm_file=sparc/rtems.h
2294 tm_file=sparc/sol2.h
2295 xm_file=sparc/xm-sol2.h
2296 tmake_file=sparc/t-sol2
2297 xmake_file=sparc/x-sysv4
2298 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2299 fixincludes=fixinc.svr4
2300 if [[ x$enable_threads = xyes ]]; then
2301 thread_file='solaris'
2305 tm_file=sparc/sunos4.h
2306 tmake_file=sparc/t-sunos40
2310 tm_file=sparc/sunos4.h
2311 tmake_file=sparc/t-sunos41
2315 tm_file=sparc/sun4o3.h
2319 tm_file=sparc/sysv4.h
2320 xm_file=sparc/xm-sysv4.h
2322 xmake_file=sparc/x-sysv4
2323 extra_parts="crtbegin.o crtend.o"
2326 xm_file=sparc/xm-sol2.h
2327 tm_file=sparc/vxsim.h
2328 tmake_file=sparc/t-vxsparc
2329 xmake_file=sparc/x-sysv4
2332 tm_file="sparc/splet.h libgloss.h"
2333 tmake_file=sparc/t-splet
2336 tm_file="sparc/litecoff.h libgloss.h"
2337 tmake_file=sparc/t-sparclite
2340 tm_file="sparc/lite.h aoutos.h libgloss.h"
2341 tmake_file=sparc/t-sparclite
2344 tmake_file=sparc/t-sp64
2345 tm_file=sparc/sp64-aout.h
2348 tmake_file=sparc/t-sp64
2349 tm_file=sparc/sp64-elf.h
2350 extra_parts="crtbegin.o crtend.o"
2352 # This hasn't been upgraded to GCC 2.
2353 # tahoe-harris-*) # Harris tahoe, using COFF.
2354 # tm_file=tahoe/harris.h
2356 # tahoe-*-bsd*) # tahoe running BSD
2358 # This hasn't been upgraded to GCC 2.
2363 vax-*-bsd*) # vaxen running BSD
2367 vax-*-sysv*) # vaxen running system V
2368 tm_file="${tm_file} vax/vaxv.h"
2369 xm_file="${tm_file} vax/xm-vaxv.h"
2373 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2374 xm_file="${xm_file} xm-netbsd.h"
2375 # On NetBSD, the headers are already okay.
2376 fixincludes=Makefile.in
2380 vax-*-ultrix*) # vaxen running ultrix
2381 tm_file="${tm_file} vax/ultrix.h"
2385 vax-*-vms*) # vaxen running VMS
2386 xm_file=vax/xm-vms.h
2390 vax-*-*) # vax default entry
2394 xm_file="${xm_file} xm-svr3"
2398 echo "Configuration $machine not supported" 1>&2
2405 ;; # Existing Linux/GNU systems do not use the GNU setup.
2407 # On the GNU system, the setup is just about the same on
2408 # each different CPU. The specific machines that GNU
2409 # supports are matched above and just set $cpu_type.
2410 xm_file=${cpu_type}/xm-gnu.h
2411 tm_file=${cpu_type}/gnu.h
2412 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2413 # GNU always uses ELF.
2415 # GNU tools are the only tools.
2418 # On GNU, the headers are already okay.
2419 fixincludes=Makefile.in
2420 xmake_file=x-linux # These details are the same as Linux.
2421 tmake_file=t-gnu # These are not.
2424 fixincludes=fixinc.svr4
2425 xmake_try_sysv=x-sysv
2426 install_headers_dir=install-headers-cpio
2429 install_headers_dir=install-headers-cpio
2433 # Distinguish i[3456]86
2434 # Also, do not run mips-tfile on MIPS if using gas.
2435 # Process --with-cpu= for PowerPC/rs6000
2436 target_cpu_default2=
2439 target_cpu_default2=1
2442 target_cpu_default2=2
2445 target_cpu_default2=3
2450 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2453 target_cpu_default2="MASK_CPU_EV5"
2457 if [[ x$gas = xyes ]]
2459 if [[ x$target_cpu_default2 = x ]]
2461 target_cpu_default2="MASK_GAS"
2463 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2467 mips*-*-ecoff* | mips*-*-elf*)
2468 if [[ x$gas = xyes ]]
2470 if [[ x$gnu_ld = xyes ]]
2472 target_cpu_default2=20
2474 target_cpu_default2=16
2479 if [[ x$gas = xyes ]]
2481 target_cpu_default2=16
2484 powerpc*-*-* | rs6000-*-*)
2485 case "x$with_cpu" in
2489 xcommon | xpower | xpower2 | xpowerpc | xrios \
2490 | xrios1 | xrios2 | xrsc | xrsc1 \
2491 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2492 | x403 | x505 | x801 | x821 | x823 | x860)
2493 target_cpu_default2="'\"$with_cpu\"'"
2497 echo "--with-cpu must be passed a value" 1>&2
2502 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2508 case ".$with_cpu" in
2510 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2512 .supersparc | .ultrasparc | .v7 | .v8)
2513 target_cpu_default2="TARGET_CPU_$with_cpu"
2516 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2523 if [[ x$target_cpu_default2 != x ]]
2525 if [[ x$target_cpu_default != x ]]
2527 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2529 target_cpu_default=$target_cpu_default2
2533 # No need for collect2 if we have the GNU linker.
2540 # Save data on machine being used to compile GCC in build_xm_file.
2541 # Save data on host machine in vars host_xm_file and host_xmake_file.
2542 if [[ x$pass1done = x ]]
2544 if [[ x"$xm_file" = x ]]
2545 then build_xm_file=$cpu_type/xm-$cpu_type.h
2546 else build_xm_file=$xm_file
2548 build_install_headers_dir=$install_headers_dir
2549 build_exeext=$exeext
2552 if [[ x$pass2done = x ]]
2554 if [[ x"$xm_file" = x ]]
2555 then host_xm_file=$cpu_type/xm-$cpu_type.h
2556 else host_xm_file=$xm_file
2558 if [[ x"$xmake_file" = x ]]
2559 then xmake_file=$cpu_type/x-$cpu_type
2561 host_xmake_file="$xmake_file"
2562 host_truncate_target=$truncate_target
2563 host_extra_gcc_objs=$extra_gcc_objs
2564 host_extra_objs=$extra_host_objs
2570 extra_objs="${host_extra_objs} ${extra_objs}"
2572 # Default the target-machine variables that were not explicitly set.
2573 if [[ x"$tm_file" = x ]]
2574 then tm_file=$cpu_type/$cpu_type.h; fi
2576 if [[ x$extra_headers = x ]]
2577 then extra_headers=; fi
2579 if [[ x"$xm_file" = x ]]
2580 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2582 md_file=$cpu_type/$cpu_type.md
2584 if [[ x$out_file = x ]]
2585 then out_file=$cpu_type/$cpu_type.c; fi
2587 if [[ x"$tmake_file" = x ]]
2588 then tmake_file=$cpu_type/t-$cpu_type
2591 if [[ x$float_format = x ]]
2592 then float_format=i64
2595 # Say what files are being used for the output code and MD file.
2596 echo "Using \`$srcdir/config/$out_file' to output insns."
2597 echo "Using \`$srcdir/config/$md_file' as machine description file."
2600 for f in $tm_file; do
2603 if [[ $count = ax ]]; then
2604 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2606 echo "Using the following target machine macro files:"
2607 for f in $tm_file; do
2608 echo " $srcdir/config/$f"
2613 for f in $host_xm_file; do
2616 if [[ $count = ax ]]; then
2617 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2619 echo "Using the following host machine macro files:"
2620 for f in $host_xm_file; do
2621 echo " $srcdir/config/$f"
2625 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2627 for f in $build_xm_file; do
2630 if [[ $count = ax ]]; then
2631 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2633 echo "Using the following build machine macro files:"
2634 for f in $build_xm_file; do
2635 echo " $srcdir/config/$f"
2640 if [[ x$thread_file = x ]]
2641 then thread_file='single'
2644 # Set up the header files.
2645 # $links is the list of header files to create.
2646 # $vars is the list of shell variables with file names to include.
2647 # config2.h is the old config.h. It is included by the new config.h which
2648 # created from config.in. The goal is to simplify the transition to autoconf.
2649 vars="host_xm_file tm_file xm_file build_xm_file"
2650 links="config2.h tm.h tconfig.h hconfig.h"
2653 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2656 while [[ -n "$vars" ]]
2658 # set file to car of files, files to cdr of files
2659 set $vars; var=$1; shift; vars=$*
2660 set $links; link=$1; shift; links=$*
2664 # Define TARGET_CPU_DEFAULT if the system wants one.
2665 # This substitutes for lots of *.h files.
2666 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2668 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2671 for file in `eval echo '$'$var`; do
2672 echo "#include \"$file\"" >>$link
2676 # Truncate the target if necessary
2677 if [[ x$host_truncate_target != x ]]; then
2678 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2681 # Get the version number from the toplevel
2682 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2684 # Are we using gcc as the native compiler?
2686 *linux*) # All Linux's use gcc as the native compiler.
2687 if [[ x$prefix = xNONE ]]; then
2688 prefix=$native_prefix
2693 # Get an absolute path to the GCC top-level source directory
2699 # Conditionalize the makefile for this host machine.
2700 # Make-host contains the concatenation of all host makefile fragments
2701 # [there can be more than one]. This file is built by configure.frag.
2702 host_overrides=Make-host
2703 dep_host_xmake_file=
2704 for f in .. ${host_xmake_file}
2706 if [[ -f ${srcdir}/config/$f ]]
2708 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2712 # Conditionalize the makefile for this target machine.
2713 # Make-target contains the concatenation of all host makefile fragments
2714 # [there can be more than one]. This file is built by configure.frag.
2715 target_overrides=Make-target
2717 for f in .. ${tmake_file}
2719 if [[ -f ${srcdir}/config/$f ]]
2721 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2725 # If the host doesn't support symlinks, modify CC in
2726 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2727 # Otherwise, we can use "CC=$(CC)".
2729 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2731 cc_set_by_configure="\$(CC)"
2732 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2734 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2735 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2739 out_object_file=`basename $out_file .c`.o
2742 for f in $tm_file; do
2743 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2747 for f in $host_xm_file; do
2748 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2752 for f in $build_xm_file; do
2753 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2756 # Define macro CROSS_COMPILE in compilation
2757 # if this is a cross-compiler.
2758 # Also use all.cross instead of all.internal
2759 # and add cross-make to Makefile.
2760 cross_overrides="/dev/null"
2761 if [[ x$host != x$target ]]
2763 cross_defines="CROSS=-DCROSS_COMPILE"
2764 cross_overrides="${topdir}/cross-make"
2767 # When building gcc with a cross-compiler, we need to fix a few things.
2768 # This must come after cross-make as we want all.build to override
2770 build_overrides="/dev/null"
2771 if [[ x$build != x$host ]]
2773 build_overrides="${topdir}/build-make"
2776 # Expand extra_headers to include complete path.
2777 # This substitutes for lots of t-* files.
2779 if [[ "x$extra_headers" = x ]]
2782 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2783 for file in $extra_headers;
2785 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2789 # Add a definition of USE_COLLECT2 if system wants one.
2790 # Also tell toplev.c what to do.
2791 # This substitutes for lots of t-* files.
2792 if [[ x$use_collect2 = x ]]
2797 will_use_collect2="ld"
2798 maybe_use_collect2="-DUSE_COLLECT2"
2802 # Set MD_DEPS if the real md file is in md.pre-cpp.
2803 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2804 # for line oriented comments, so we must always use a GNU cpp. If
2805 # building gcc with a cross compiler, use the cross compiler just
2806 # built. Otherwise, we can use the cpp just built.
2808 if [[ "x$md_cppflags" = x ]]
2810 md_file_sub=$srcdir/config/$md_file
2815 # If we have gas in the build tree, make a link to it.
2816 if [[ -f ../gas/Makefile ]]; then
2817 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2820 # If we have ld in the build tree, make a link to it.
2821 if [[ -f ../ld/Makefile ]]; then
2822 # if [[ x$use_collect2 = x ]]; then
2823 # rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2825 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2829 # Figure out what language subdirectories are present.
2831 for lang in ${srcdir}/*/config-lang.in ..
2835 # The odd quoting in the next line works around
2836 # an apparent bug in bash 1.12 on linux.
2837 ${srcdir}/[[*]]/config-lang.in) ;;
2838 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2842 # Make empty files to contain the specs and options for each language.
2843 # Then add #include lines to for a compiler that has specs and/or options.
2847 rm -f specs.h options.h
2848 touch specs.h options.h
2849 for subdir in . $subdirs
2851 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2852 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2853 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2855 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2856 echo "#include \"$subdir/lang-options.h\"" >>options.h
2857 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2861 # These (without "all_") are set in each config-lang.in.
2862 # `language' must be a single word so is spelled singularly.
2868 all_outputs=Makefile
2869 # List of language makefile fragments.
2874 # Add the language fragments.
2875 # Languages are added via two mechanisms. Some information must be
2876 # recorded in makefile variables, these are defined in config-lang.in.
2877 # We accumulate them and plug them into the main Makefile.
2878 # The other mechanism is a set of hooks for each of the main targets
2879 # like `clean', `install', etc.
2881 language_fragments="Make-lang"
2882 language_hooks="Make-hooks"
2885 for s in .. $subdirs
2897 . ${srcdir}/$s/config-lang.in
2898 if [[ "x$language" = x ]]
2900 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2903 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2904 all_languages="$all_languages $language"
2905 if [[ "x$boot_language" = xyes ]]
2907 all_boot_languages="$all_boot_languages $language"
2909 all_compilers="$all_compilers $compilers"
2910 all_stagestuff="$all_stagestuff $stagestuff"
2911 all_diff_excludes="$all_diff_excludes $diff_excludes"
2912 all_headers="$all_headers $headers"
2913 all_outputs="$all_outputs $outputs"
2914 if [[ x$outputs = x ]]
2916 oldstyle_subdirs="$oldstyle_subdirs $s"
2918 all_lib2funcs="$all_lib2funcs $lib2funcs"
2922 # Since we can't use `::' targets, we link each language in
2923 # with a set of hooks, reached indirectly via lang.${target}.
2927 target_list="all.build all.cross start.encap rest.encap \
2929 install-normal install-common install-info install-man \
2931 mostlyclean clean distclean extraclean maintainer-clean \
2932 stage1 stage2 stage3 stage4"
2933 for t in $target_list
2936 for l in .. $all_languages
2938 if [[ $l != ".." ]]; then
2942 echo "lang.$t: $x" >> Make-hooks
2945 # If we're not building in srcdir, create .gdbinit.
2947 if [[ ! -f Makefile.in ]]; then
2948 echo "dir ." > .gdbinit
2949 echo "dir ${srcdir}" >> .gdbinit
2950 if [[ x$gdb_needs_out_file_path = xyes ]]
2952 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
2954 if [[ "x$subdirs" != x ]]; then
2957 echo "dir ${srcdir}/$s" >> .gdbinit
2960 echo "source ${srcdir}/.gdbinit" >> .gdbinit
2963 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
2966 if [[ x$enable_haifa = xyes ]]; then
2967 echo "Using the Haifa scheduler."
2969 sched_cflags=-DHAIFA
2971 AC_SUBST(sched_prefix)
2972 AC_SUBST(sched_cflags)
2973 if [[ x$enable_haifa != x ]]; then
2974 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
2975 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
2976 if [[ -f $x ]]; then
2983 # Process the language and host/target makefile fragments.
2984 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
2986 # Substitute configuration variables
2988 AC_SUBST(all_languages)
2989 AC_SUBST(all_boot_languages)
2990 AC_SUBST(all_compilers)
2991 AC_SUBST(all_lang_makefiles)
2992 AC_SUBST(all_stagestuff)
2993 AC_SUBST(all_diff_excludes)
2994 AC_SUBST(all_lib2funcs)
2995 AC_SUBST(all_headers)
2996 AC_SUBST(extra_passes)
2997 AC_SUBST(extra_programs)
2998 AC_SUBST(extra_parts)
2999 AC_SUBST(extra_c_objs)
3000 AC_SUBST(extra_c_flags)
3001 AC_SUBST(extra_objs)
3002 AC_SUBST(host_extra_gcc_objs)
3003 AC_SUBST(extra_headers_list)
3004 AC_SUBST(dep_host_xmake_file)
3005 AC_SUBST(dep_tmake_file)
3007 AC_SUBST(out_object_file)
3009 AC_SUBST(tm_file_list)
3010 AC_SUBST(build_xm_file_list)
3011 AC_SUBST(host_xm_file_list)
3012 AC_SUBST(lang_specs_files)
3013 AC_SUBST(lang_options_files)
3014 AC_SUBST(thread_file)
3016 AC_SUBST(local_prefix)
3017 AC_SUBST(gxx_include_dir)
3018 AC_SUBST(fixincludes)
3019 AC_SUBST(build_install_headers_dir)
3020 AC_SUBST(build_exeext)
3021 AC_SUBST(float_format)
3022 AC_SUBST(will_use_collect2)
3023 AC_SUBST(maybe_use_collect2)
3024 AC_SUBST(cc_set_by_configure)
3025 AC_SUBST(stage_prefix_set_by_configure)
3027 AC_SUBST_FILE(target_overrides)
3028 AC_SUBST_FILE(host_overrides)
3029 AC_SUBST(cross_defines)
3030 AC_SUBST_FILE(cross_overrides)
3031 AC_SUBST_FILE(build_overrides)
3032 AC_SUBST_FILE(language_fragments)
3033 AC_SUBST_FILE(language_hooks)
3035 # Echo that links are built
3036 if [[ x$host = x$target ]]
3044 if [[ x$host != x$build ]]
3046 str3=" on a $build system"
3049 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3054 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3056 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3058 echo " ${str2}${str3}." 1>&2
3061 # Configure the subdirectories
3062 # AC_CONFIG_SUBDIRS($subdirs)
3064 # Create the Makefile
3065 # and configure language subdirectories
3066 AC_OUTPUT($all_outputs,
3068 . $srcdir/configure.lang
3069 case x$CONFIG_HEADERS in
3070 xconfig.h:config.in)
3078 target_alias='${target_alias}'
3080 subdirs='${subdirs}'
3081 oldstyle_subdirs='${oldstyle_subdirs}'
3082 symbolic_link='${symbolic_link}'
3083 program_transform_set='${program_transform_set}'
3084 program_transform_name='${program_transform_name}'
3085 dep_host_xmake_file='${dep_host_xmake_file}'
3086 host_xmake_file='${host_xmake_file}'
3087 dep_tmake_file='${dep_tmake_file}'
3088 tmake_file='${tmake_file}'
3089 thread_file='${thread_file}'
3090 version='${version}'
3091 local_prefix='${local_prefix}'
3092 build_install_headers_dir='${build_install_headers_dir}'
3093 build_exeext='${build_exeext}'
3094 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3095 SET_MAKE='${SET_MAKE}'
3096 target_list='${target_list}'
3097 target_overrides='${target_overrides}'
3098 host_overrides='${host_overrides}'
3099 cross_defines='${cross_defines}'
3100 cross_overrides='${cross_overrides}'
3101 build_overrides='${build_overrides}'