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++'
83 # Pass with no value to take the default
84 # Pass with a value to specify a thread package
85 AC_ARG_ENABLE(threads,
86 [ --enable-threads enable thread usage for target GCC.
87 --enable-threads=LIB use LIB thread package for target GCC.],
88 if [[[ x$enable_threads = xno ]]]; then
93 # Check if a valid thread package
94 case x${enable_threads} in
103 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
105 thread_file=$enable_threads
108 echo "$enable_threads is an unknown thread package" 1>&2
113 # Determine the host, build, and target systems
116 # Find some useful tools
124 # Find the native compiler
128 AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
130 GCC_NEED_DECLARATION(malloc)
131 GCC_NEED_DECLARATION(realloc)
132 GCC_NEED_DECLARATION(free)
141 build_broken_install=
142 build_install_headers_dir=install-headers-tar
146 host_truncate_target=
148 # Decode the host machine, then the target machine.
149 # For the host machine, we save the xm_file variable as host_xm_file;
150 # then we decode the target machine and forget everything else
151 # that came from the host machine.
152 for machine in $build $host $target; do
165 # Set this to force installation and use of collect2.
167 # Set this to override the default target model.
169 # Set this to force use of install.sh.
171 # Set this to control which fixincludes program to use.
172 fixincludes=fixincludes
173 # Set this to control how the header file directory is installed.
174 install_headers_dir=install-headers-tar
175 # Set this to a non-empty list of args to pass to cpp if the target
176 # wants its .md file passed through cpp.
178 # Set this if directory names should be truncated to 14 characters.
180 # Set this if gdb needs a dir command with `dirname $out_file`
181 gdb_needs_out_file_path=
182 # Set this if the build machine requires executables to have a
186 # Set default cpu_type, tm_file and xm_file so it can be updated in
187 # each machine entry.
188 cpu_type=`echo $machine | sed 's/-.*$//'`
222 tm_file=${cpu_type}/${cpu_type}.h
223 xm_file=${cpu_type}/xm-${cpu_type}.h
226 # Support site-specific machine types.
228 cpu_type=`echo $machine | sed -e 's/-.*//'`
229 rest=`echo $machine | sed -e "s/$cpu_type-//"`
230 xm_file=${cpu_type}/xm-$rest.h
231 tm_file=${cpu_type}/$rest.h
232 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
233 then xmake_file=${cpu_type}/x-$rest; \
236 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
237 then tmake_file=${cpu_type}/t-$rest; \
243 a29k-*-bsd* | a29k-*-sym1*)
244 tm_file="${tm_file} a29k/unix.h"
245 xm_file=a29k/xm-unix.h
246 xmake_file=a29k/x-unix
249 a29k-*-udi | a29k-*-coff)
250 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
251 tmake_file=a29k/t-a29kbare
254 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
255 tmake_file=a29k/t-vx29k
256 extra_parts="crtbegin.o crtend.o"
258 a29k-*-*) # Default a29k environment.
261 alpha*-*-linux-gnuecoff*)
262 tm_file="${tm_file} alpha/linux.h"
263 xm_file="${xm_file} alpha/xm-linux.h"
264 target_cpu_default=MASK_GAS
266 fixincludes=Makefile.in
270 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
271 xm_file="${xm_file} alpha/xm-linux.h"
272 target_cpu_default=MASK_GAS
273 tmake_file="t-linux alpha/t-linux"
275 fixincludes=Makefile.in
276 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
278 if [[ x$thread_file = x ]]; then
282 alpha*-dec-osf[[456789]]*)
283 if [[ x$stabs = xyes ]]
285 tm_file="${tm_file} dbx.h"
287 if [[ x$gas != xyes ]]
289 extra_passes="mips-tfile mips-tdump"
293 # Some versions of OSF4 (specifically X4.0-9 296.7) have
294 # a broken tar, so we use cpio instead.
297 install_headers_dir=install-headers-cpio
301 alpha*-dec-osf[[23]]*)
302 tm_file="${tm_file} alpha/osf2or3.h"
303 if [[ x$stabs = xyes ]]
305 tm_file="${tm_file} dbx.h"
307 if [[ x$gas != xyes ]]
309 extra_passes="mips-tfile mips-tdump"
315 tm_file="${tm_file} alpha/osf12.h"
316 if [[ x$stabs = xyes ]]
318 tm_file="${tm_file} dbx.h"
320 if [[ x$gas != xyes ]]
322 extra_passes="mips-tfile mips-tdump"
328 if [[ x$stabs = xyes ]]
330 tm_file="${tm_file} dbx.h"
332 if [[ x$gas != xyes ]]
334 extra_passes="mips-tfile mips-tdump"
340 tm_file="${tm_file} alpha/win-nt.h"
341 target_cpu_default=MASK_WINDOWS_NT
342 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
344 xmake_file=winnt/x-winnt
345 extra_host_objs=oldnames.o
346 extra_gcc_objs="spawnv.o oldnames.o"
347 fixincludes=fixinc.winnt
348 if [[ x$gnu_ld != xyes ]]
350 extra_programs=ld.exe
352 if [[ x$enable_threads = xyes ]]; then
358 xm_file="${xm_file} alpha/xm-vms.h"
359 tmake_file=alpha/t-vms
360 fixincludes=Makefile.in
362 arm-*-coff* | armel-*-coff*)
364 tmake_file=arm/t-bare
366 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
367 tm_file=arm/riscix1-1.h
370 arm-*-riscix*) # Acorn RISC machine
371 if [[ x$gas = xyes ]]
373 tm_file=arm/rix-gas.h
377 xmake_file=arm/x-riscix
378 tmake_file=arm/t-riscix
381 arm-semi-aout | armel-semi-aout)
383 tmake_file=arm/t-semi
384 fixincludes=Makefile.in # There is nothing to fix
386 arm-semi-aof | armel-semi-aof)
387 tm_file=arm/semiaof.h
388 tmake_file=arm/t-semiaof
389 fixincludes=Makefile.in # There is nothing to fix
393 xm_file=arm/xm-netbsd.h
394 tmake_file=arm-t-netbsd
395 # On NetBSD, the headers are already okay.
396 fixincludes=Makefile.in
399 arm-*-linux-gnuaout*) # ARM Linux
401 xm_file=arm/xm-linux.h
403 tm_file=arm/linux-gas.h
404 tmake_file=arm/t-linux
405 fixincludes=Makefile.in
409 arm-*-*) # generic version
411 c1-convex-*) # Convex C1
414 fixincludes=Makefile.in
416 c2-convex-*) # Convex C2
419 fixincludes=Makefile.in
424 fixincludes=Makefile.in
429 fixincludes=Makefile.in
432 target_cpu_default=16
434 fixincludes=Makefile.in
436 clipper-intergraph-clix*)
437 tm_file="${tm_file} svr3.h clipper/clix.h"
438 xm_file=clipper/xm-clix.h
439 xmake_file=clipper/x-clix
440 extra_headers=va-clipper.h
441 extra_parts="crtbegin.o crtend.o"
442 install_headers_dir=install-headers-cpio
450 # This hasn't been upgraded to GCC 2.
451 # fx80-alliant-*) # Alliant FX/80
457 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
458 xm_file=pa/xm-papro.h
463 tm_file="${tm_file} pa/pa-osf.h"
465 fixincludes=Makefile.in
468 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
469 xm_file=pa/xm-papro.h
473 tm_file="${tm_file} pa/pa-osf.h"
475 fixincludes=Makefile.in
480 fixincludes=Makefile.in
484 fixincludes=Makefile.in
487 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
488 xm_file=pa/xm-pahpux.h
489 xmake_file=pa/x-pa-hpux
490 if [[ x$gas = xyes ]]
492 tm_file="${tm_file} pa/gas.h"
495 install_headers_dir=install-headers-cpio
498 hppa1.0-*-hpux8.0[[0-2]]*)
499 tm_file="${tm_file} pa/pa-hpux.h"
500 xm_file=pa/xm-pahpux.h
501 xmake_file=pa/x-pa-hpux
502 if [[ x$gas = xyes ]]
504 tm_file="${tm_file} pa/pa-gas.h"
506 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}"
524 install_headers_dir=install-headers-cpio
529 tm_file="${tm_file} pa/pa-hpux.h"
530 xm_file=pa/xm-pahpux.h
531 xmake_file=pa/x-pa-hpux
532 if [[ x$gas = xyes ]]
534 tm_file="${tm_file} pa/pa-gas.h"
537 install_headers_dir=install-headers-cpio
541 tm_file="${tm_file} pa/pa-hpux.h"
542 xm_file=pa/xm-pahpux.h
543 xmake_file=pa/x-pa-hpux
544 if [[ x$gas = xyes ]]
546 tm_file="${tm_file} pa/pa-gas.h"
549 install_headers_dir=install-headers-cpio
554 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
555 xm_file=pa/xm-pahpux.h
556 xmake_file=pa/x-pa-hpux
557 if [[ x$gas = xyes ]]
559 tm_file="${tm_file} pa/pa-gas.h"
562 install_headers_dir=install-headers-cpio
566 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
567 xm_file=pa/xm-pahpux.h
568 xmake_file=pa/x-pa-hpux
569 if [[ x$gas = xyes ]]
571 tm_file="${tm_file} pa/pa-gas.h"
574 install_headers_dir=install-headers-cpio
579 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
580 xm_file=pa/xm-pahpux.h
581 xmake_file=pa/x-pa-hpux
582 if [[ x$gas = xyes ]]
584 tm_file="${tm_file} pa/pa-gas.h"
587 install_headers_dir=install-headers-cpio
591 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
592 xm_file=pa/xm-pahpux.h
593 xmake_file=pa/x-pa-hpux
594 if [[ x$gas = xyes ]]
596 tm_file="${tm_file} pa/pa-gas.h"
599 install_headers_dir=install-headers-cpio
604 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
605 xm_file=pa/xm-pahpux.h
606 xmake_file=pa/x-pa-hpux
607 if [[ x$gas = xyes ]]
609 tm_file="${tm_file} pa/pa-gas.h"
612 install_headers_dir=install-headers-cpio
616 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
617 xm_file=pa/xm-pahpux.h
618 xmake_file=pa/x-pa-hpux
619 if [[ x$gas = xyes ]]
621 tm_file="${tm_file} pa/pa-gas.h"
624 install_headers_dir=install-headers-cpio
630 fixincludes=Makefile.in
634 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
635 if [[ x$gas = xyes ]]
637 tm_file=i386/aix386.h
638 extra_parts="crtbegin.o crtend.o"
639 tmake_file=i386/t-crtstuff
641 tm_file=i386/aix386ng.h
644 xm_file=i386/xm-aix.h
645 xmake_file=i386/x-aix
648 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
649 xm_file=i386/xm-sysv4.h
650 xmake_file=i386/x-ncr3000
651 if [[ x$stabs = xyes -a x$gas = xyes ]]
653 tm_file=i386/sysv4gdb.h
657 extra_parts="crtbegin.o crtend.o"
658 tmake_file=i386/t-crtpic
662 xm_file=i386/xm-next.h
663 tmake_file=i386/t-next
664 xmake_file=i386/x-next
665 extra_objs=nextstep.o
666 if [[ x$enable_threads = xyes ]]; then
670 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
672 if [[ x$gas = xyes ]]
674 tm_file=i386/seq-gas.h
676 tm_file=i386/sequent.h
679 i[[3456]]86-sequent-ptx1*)
680 xm_file=i386/xm-sysv3.h
681 xmake_file=i386/x-sysv3
682 tm_file=i386/seq-sysv3.h
683 tmake_file=i386/t-crtstuff
684 fixincludes=fixinc.ptx
685 extra_parts="crtbegin.o crtend.o"
686 install_headers_dir=install-headers-cpio
689 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
690 xm_file=i386/xm-sysv3.h
691 xmake_file=i386/x-sysv3
692 tm_file=i386/seq2-sysv3.h
693 tmake_file=i386/t-crtstuff
694 extra_parts="crtbegin.o crtend.o"
695 fixincludes=fixinc.ptx
696 install_headers_dir=install-headers-cpio
699 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
700 xm_file=i386/xm-sysv4.h
702 tm_file=i386/ptx4-i.h
704 extra_parts="crtbegin.o crtend.o"
705 fixincludes=fixinc.ptx
706 install_headers_dir=install-headers-cpio
709 i386-sun-sunos*) # Sun i386 roadrunner
710 xm_file=i386/xm-sun.h
715 tm_file=i386/i386-aout.h
716 tmake_file=i386/t-i386bare
718 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
719 tm_file=i386/bsd386.h
720 xm_file=i386/xm-bsd386.h
721 # tmake_file=t-libc-ok
724 tm_file=i386/386bsd.h
725 xm_file=i386/xm-bsd386.h
726 # tmake_file=t-libc-ok
727 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
730 i[[3456]]86-*-freebsdelf*)
731 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
732 xm_file=i386/xm-freebsd.h
733 # On FreeBSD, the headers are already ok.
734 fixincludes=Makefile.in
735 tmake_file=i386/t-freebsd
740 i[[3456]]86-*-freebsd*)
741 tm_file=i386/freebsd.h
742 xm_file=i386/xm-freebsd.h
743 # On FreeBSD, the headers are already ok.
744 fixincludes=Makefile.in
745 tmake_file=i386/t-freebsd
747 i[[3456]]86-*-netbsd*)
748 tm_file=i386/netbsd.h
749 xm_file=i386/xm-netbsd.h
750 # On NetBSD, the headers are already okay.
751 fixincludes=Makefile.in
755 tm_file=i386/i386-coff.h
756 tmake_file=i386/t-i386bare
758 i[[3456]]86-*-isc*) # 80386 running ISC system
759 xm_file=i386/xm-isc.h
761 i[[345]]86-*-isc[[34]]*)
762 xmake_file=i386/x-isc3
765 xmake_file=i386/x-isc
768 if [[ x$gas = xyes -a x$stabs = xyes ]]
770 tm_file=i386/iscdbx.h
771 tmake_file=i386/t-svr3dbx
772 extra_parts="svr3.ifile svr3z.ifile"
774 tm_file=i386/isccoff.h
775 tmake_file=i386/t-crtstuff
776 extra_parts="crtbegin.o crtend.o"
778 install_headers_dir=install-headers-cpio
781 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
782 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
783 xmake_file=x-linux-aout
784 tmake_file="t-linux-aout i386/t-crtstuff"
785 tm_file=i386/linux-oldld.h
786 fixincludes=Makefile.in #On Linux, the headers are ok already.
790 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
791 xm_file=i386/xm-linux.h # with a.out format
792 xmake_file=x-linux-aout
793 tmake_file="t-linux-aout i386/t-crtstuff"
794 tm_file=i386/linux-aout.h
795 fixincludes=Makefile.in #On Linux, the headers are ok already.
799 i[[3456]]86-*-linux-gnulibc1)
800 xm_file=i386/xm-linux.h # Intel 80386's running Linux
801 xmake_file=x-linux # with ELF format using the
802 tm_file=i386/linux.h # Linux C library 5
803 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
804 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
805 fixincludes=Makefile.in #On Linux, the headers are ok already.
808 if [[ x$enable_threads = xyes ]]; then
812 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
813 xm_file=i386/xm-linux.h # with ELF format using glibc 2
814 xmake_file=x-linux # aka Linux C library 6
816 tmake_file="t-linux i386/t-crtstuff"
817 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
818 fixincludes=Makefile.in #On Linux, the headers are ok already.
821 if [[ x$enable_threads = xyes ]]; then
827 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
828 xm_file=i386/xm-go32.h
830 tmake_file=i386/t-go32
832 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
835 fixincludes=Makefile.in
839 i[[3456]]86-*-lynxos*)
840 if [[ x$gas = xyes ]]
844 tm_file=i386/lynx-ng.h
846 xm_file=i386/xm-lynx.h
847 tmake_file=i386/t-i386bare
852 # tmake_file=t-libc-ok
855 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
856 if [[ x$elf = xyes ]]
858 tm_file=i386/osfelf.h
861 tm_file=i386/osfrose.h
864 xm_file=i386/xm-osf.h
865 xmake_file=i386/x-osfrose
866 tmake_file=i386/t-osf
869 i[[345]]86-go32-rtems*)
871 xm_file=i386/xm-go32.h
872 tm_file=i386/go32-rtems.h
873 tmake_file="i386/t-go32 t-rtems"
878 tmake_file="i386/t-i386bare t-rtems"
880 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
881 xm_file=i386/xm-sco5.h
882 xmake_file=i386/x-sco5
883 fixincludes=fixinc.sco
886 tmake_file=i386/t-sco5
887 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
889 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
890 xm_file=i386/xm-sco.h
891 xmake_file=i386/x-sco4
892 fixincludes=fixinc.sco
894 install_headers_dir=install-headers-cpio
895 if [[ x$stabs = xyes ]]
897 tm_file=i386/sco4dbx.h
898 tmake_file=i386/t-svr3dbx
899 extra_parts="svr3.ifile svr3z.rfile"
902 tmake_file=i386/t-crtstuff
903 extra_parts="crtbegin.o crtend.o"
907 i[[3456]]86-*-sco*) # 80386 running SCO system
908 xm_file=i386/xm-sco.h
909 xmake_file=i386/x-sco
911 install_headers_dir=install-headers-cpio
912 if [[ x$stabs = xyes ]]
914 tm_file=i386/scodbx.h
915 tmake_file=i386/t-svr3dbx
916 extra_parts="svr3.ifile svr3z.rfile"
919 extra_parts="crtbegin.o crtend.o"
920 tmake_file=i386/t-crtstuff
924 i[[3456]]86-*-solaris2*)
925 xm_file=i386/xm-sysv4.h
926 if [[ x$stabs = xyes ]]
928 tm_file=i386/sol2dbg.h
932 tmake_file=i386/t-sol2
933 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
935 fixincludes=fixinc.svr4
937 if [[ x$enable_threads = xyes ]]; then
938 thread_file='solaris'
941 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
942 xm_file=i386/xm-sysv4.h
944 if [[ x$stabs = xyes ]]
946 tm_file="${tm_file} dbx.h"
948 tmake_file=i386/t-crtpic
950 extra_parts="crtbegin.o crtend.o"
952 i[[3456]]86-*-sysv*) # Intel 80386's running system V
953 xm_file=i386/xm-sysv3.h
954 xmake_file=i386/x-sysv3
955 if [[ x$gas = xyes ]]
957 if [[ x$stabs = xyes ]]
959 tm_file=i386/svr3dbx.h
960 tmake_file=i386/t-svr3dbx
961 extra_parts="svr3.ifile svr3z.rfile"
963 tm_file=i386/svr3gas.h
964 extra_parts="crtbegin.o crtend.o"
965 tmake_file=i386/t-crtstuff
969 extra_parts="crtbegin.o crtend.o"
970 tmake_file=i386/t-crtstuff
973 i386-*-vsta) # Intel 80386's running VSTa kernel
974 xm_file=i386/xm-vsta.h
976 tmake_file=i386/t-vsta
977 xmake_file=i386/x-vsta
979 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
980 xm_file="${xm_file} i386/xm-cygwin32.h"
981 tmake_file=i386/t-cygwin32
982 tm_file=i386/cygwin32.h
983 xmake_file=i386/x-cygwin32
985 fixincludes=Makefile.in
986 if [[ x$enable_threads = xyes ]]; then
991 i[[3456]]86-*-mingw32)
992 tm_file=i386/mingw32.h
993 xm_file="${xm_file} i386/xm-mingw32.h"
994 tmake_file=i386/t-cygwin32
996 xmake_file=i386/x-cygwin32
997 fixincludes=Makefile.in
998 if [[ x$enable_threads = xyes ]]; then
1003 i[[3456]]86-*-winnt3*)
1004 tm_file=i386/win-nt.h
1005 out_file=i386/i386.c
1006 xm_file=i386/xm-winnt.h
1007 xmake_file=winnt/x-winnt
1008 tmake_file=i386/t-winnt
1009 extra_host_objs="winnt.o oldnames.o"
1010 extra_gcc_objs="spawnv.o oldnames.o"
1011 fixincludes=fixinc.winnt
1012 if [[ x$gnu_ld != xyes ]]
1014 extra_programs=ld.exe
1016 if [[ x$enable_threads = xyes ]]; then
1020 i[[3456]]86-dg-dgux)
1021 xm_file=i386/xm-dgux.h
1022 out_file=i386/dgux.c
1024 tmake_file=i386/t-dgux
1025 xmake_file=i386/x-dgux
1026 fixincludes=fixinc.dgux
1027 install_headers_dir=install-headers-cpio
1029 i860-alliant-*) # Alliant FX/2800
1030 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1031 xm_file="${xm_file} i860/xm-fx2800.h"
1032 xmake_file=i860/x-fx2800
1033 tmake_file=i860/t-fx2800
1034 extra_parts="crtbegin.o crtend.o"
1037 tm_file="${tm_file} i860/bsd.h"
1038 if [[ x$gas = xyes ]]
1040 tm_file="${tm_file} i860/bsd-gas.h"
1045 tm_file="${tm_file} i860/mach.h"
1046 tmake_file=t-libc-ok
1048 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1049 tm_file="${tm_file} svr3.h i860/paragon.h"
1050 xm_file="${xm_file} xm-svr3.h"
1055 tm_file="${tm_file} svr3.h i860/sysv3.h"
1056 xm_file="${tm_file} xm-svr3.h"
1057 xmake_file=i860/x-sysv3
1058 extra_parts="crtbegin.o crtend.o"
1061 tm_file="${tm_file} svr4.h i860/sysv4.h"
1062 xm_file="${xm_file} xm-svr3.h"
1063 xmake_file=i860/x-sysv4
1065 extra_parts="crtbegin.o crtend.o"
1067 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1068 tm_file="${tm_file} i960/vx960.h"
1069 tmake_file=i960/t-vxworks960
1073 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1074 tmake_file=i960/t-vxworks960
1078 tm_file="${tm_file} i960/vx960.h"
1079 tmake_file=i960/t-vxworks960
1083 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1084 tmake_file=i960/t-960bare
1088 tmake_file="i960/t-960bare t-rtems"
1089 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1092 i960-*-*) # Default i960 environment.
1096 extra_parts="crtinit.o crtfini.o"
1098 m68000-convergent-sysv*)
1100 xm_file=m68k/xm-3b1.h
1102 extra_headers=math-68881.h
1104 m68000-hp-bsd*) # HP 9000/200 running BSD
1105 tm_file=m68k/hp2bsd.h
1106 xmake_file=m68k/x-hp2bsd
1108 extra_headers=math-68881.h
1110 m68000-hp-hpux*) # HP 9000 series 300
1111 xm_file=m68k/xm-hp320.h
1112 if [[ x$gas = xyes ]]
1114 xmake_file=m68k/x-hp320g
1115 tm_file=m68k/hp310g.h
1117 xmake_file=m68k/x-hp320
1118 tm_file=m68k/hp310.h
1121 install_headers_dir=install-headers-cpio
1123 extra_headers=math-68881.h
1128 extra_headers=math-68881.h
1131 tm_file=m68k/sun2o4.h
1133 extra_headers=math-68881.h
1136 xm_file=m68k/xm-3b1.h
1137 if [[ x$gas = xyes ]]
1144 extra_headers=math-68881.h
1146 m68k-apple-aux*) # Apple Macintosh running A/UX
1147 xm_file=m68k/xm-aux.h
1148 tmake_file=m68k/t-aux
1150 install_headers_dir=install-headers-cpio
1151 extra_headers=math-68881.h
1152 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1154 if [[ "$gnu_ld" = yes ]]
1156 tm_file="${tm_file} m68k/auxgld.h"
1158 tm_file="${tm_file} m68k/auxld.h"
1160 if [[ "$gas" = yes ]]
1162 tm_file="${tm_file} m68k/auxgas.h"
1164 tm_file="${tm_file} m68k/auxas.h"
1166 tm_file="${tm_file} m68k/a-ux.h"
1169 tm_file=m68k/apollo68.h
1170 xmake_file=m68k/x-apollo68
1172 extra_headers=math-68881.h
1174 m68k-altos-sysv*) # Altos 3068
1175 if [[ x$gas = xyes ]]
1177 tm_file=m68k/altos3068.h
1178 xm_file=m68k/xm-altos3068.h
1180 echo "The Altos is supported only with the GNU assembler" 1>&2
1183 extra_headers=math-68881.h
1185 m68k-bull-sysv*) # Bull DPX/2
1186 if [[ x$gas = xyes ]]
1188 if [[ x$stabs = xyes ]]
1190 tm_file=m68k/dpx2cdbx.h
1192 tm_file=m68k/dpx2g.h
1197 xm_file=m68k/xm-m68kv.h
1198 xmake_file=m68k/x-dpx2
1200 extra_headers=math-68881.h
1202 m68k-atari-sysv4*) # Atari variant of V.4.
1203 tm_file=m68k/atari.h
1204 xm_file=m68k/xm-atari.h
1206 extra_parts="crtbegin.o crtend.o"
1207 extra_headers=math-68881.h
1209 m68k-motorola-sysv*)
1210 tm_file=m68k/mot3300.h
1211 xm_file=m68k/xm-mot3300.h
1212 if [[ x$gas = xyes ]]
1214 xmake_file=m68k/x-mot3300-gas
1215 if [[ x$gnu_ld = xyes ]]
1217 tmake_file=m68k/t-mot3300-gald
1219 tmake_file=m68k/t-mot3300-gas
1223 xmake_file=m68k/x-mot3300
1224 if [[ x$gnu_ld = xyes ]]
1226 tmake_file=m68k/t-mot3300-gld
1228 tmake_file=m68k/t-mot3300
1232 gdb_needs_out_file_path=yes
1233 extra_parts="crt0.o mcrt0.o"
1234 extra_headers=math-68881.h
1236 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1237 tm_file=m68k/tower-as.h
1238 xm_file=m68k/xm-tower.h
1239 xmake_file=m68k/x-tower
1240 extra_parts="crtbegin.o crtend.o"
1241 extra_headers=math-68881.h
1244 tm_file=m68k/plexus.h
1245 xm_file=m68k/xm-plexus.h
1247 extra_headers=math-68881.h
1251 xm_file=m68k/xm-m68kv.h
1252 extra_headers=math-68881.h
1255 xm_file=m68k/xm-crds.h
1256 xmake_file=m68k/x-crds
1260 extra_headers=math-68881.h
1262 m68k-cbm-sysv4*) # Commodore variant of V.4.
1264 xm_file=m68k/xm-amix.h
1265 xmake_file=m68k/x-amix
1267 extra_parts="crtbegin.o crtend.o"
1268 extra_headers=math-68881.h
1271 tm_file=m68k/ccur-GAS.h
1272 xmake_file=m68k/x-ccur
1273 extra_headers=math-68881.h
1277 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1278 tm_file=m68k/hp3bsd44.h
1279 xmake_file=m68k/x-hp3bsd44
1281 extra_headers=math-68881.h
1283 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1284 tm_file=m68k/hp3bsd.h
1286 extra_headers=math-68881.h
1289 if [[ x$with_fp = xno ]]
1291 tm_file=m68k/isi-nfp.h
1296 extra_headers=math-68881.h
1298 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1299 xm_file=m68k/xm-hp320.h
1300 if [[ x$gas = xyes ]]
1302 xmake_file=m68k/x-hp320g
1303 tm_file=m68k/hp320g.h
1305 xmake_file=m68k/x-hp320
1306 tm_file=m68k/hpux7.h
1309 install_headers_dir=install-headers-cpio
1311 extra_headers=math-68881.h
1313 m68k-hp-hpux*) # HP 9000 series 300
1314 xm_file=m68k/xm-hp320.h
1315 if [[ x$gas = xyes ]]
1317 xmake_file=m68k/x-hp320g
1318 tm_file=m68k/hp320g.h
1320 xmake_file=m68k/x-hp320
1321 tm_file=m68k/hp320.h
1324 install_headers_dir=install-headers-cpio
1326 extra_headers=math-68881.h
1329 tm_file=m68k/sun3mach.h
1331 extra_headers=math-68881.h
1334 if [[ x$gas = xyes ]]
1336 tm_file=m68k/news3gas.h
1338 tm_file=m68k/news3.h
1341 extra_headers=math-68881.h
1343 m68k-sony-bsd* | m68k-sony-newsos*)
1344 if [[ x$gas = xyes ]]
1346 tm_file=m68k/newsgas.h
1351 extra_headers=math-68881.h
1353 m68k-next-nextstep2*)
1354 tm_file=m68k/next21.h
1355 xm_file=m68k/xm-next.h
1356 tmake_file=m68k/t-next
1357 xmake_file=m68k/x-next
1358 extra_objs=nextstep.o
1359 extra_headers=math-68881.h
1362 m68k-next-nextstep3*)
1364 xm_file=m68k/xm-next.h
1365 tmake_file=m68k/t-next
1366 xmake_file=m68k/x-next
1367 extra_objs=nextstep.o
1368 extra_headers=math-68881.h
1369 if [[ x$enable_threads = xyes ]]; then
1374 if [[ x$with_fp = xno ]]
1376 tm_file=m68k/sun3n3.h
1378 tm_file=m68k/sun3o3.h
1381 extra_headers=math-68881.h
1383 m68k-sun-sunos*) # For SunOS 4 (the default).
1384 if [[ x$with_fp = xno ]]
1386 tm_file=m68k/sun3n.h
1390 xm_file=m68k/xm-sun3.h
1392 extra_headers=math-68881.h
1395 tm_file=m68k/vxm68k.h
1396 tmake_file=m68k/t-vxworks68
1397 extra_headers=math-68881.h
1400 tmake_file=m68k/t-m68kbare
1401 tm_file="m68k/m68k-aout.h libgloss.h"
1402 extra_headers=math-68881.h
1405 tmake_file=m68k/t-m68kbare
1406 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1407 extra_headers=math-68881.h
1410 if [[ x$gas = xyes ]]
1414 tm_file=m68k/lynx-ng.h
1416 xm_file=m68k/xm-lynx.h
1418 tmake_file=m68k/t-lynx
1419 extra_headers=math-68881.h
1422 tm_file=m68k/netbsd.h
1423 xm_file=m68k/xm-netbsd.h
1424 # On NetBSD, the headers are already okay.
1425 fixincludes=Makefile.in
1428 m68k-*-sysv3*) # Motorola m68k's running system V.3
1429 xm_file=m68k/xm-m68kv.h
1430 xmake_file=m68k/x-m68kv
1431 extra_parts="crtbegin.o crtend.o"
1432 extra_headers=math-68881.h
1434 m68k-*-sysv4*) # Motorola m68k's running system V.4
1435 tm_file=m68k/m68kv4.h
1436 xm_file=m68k/xm-m68kv.h
1438 extra_parts="crtbegin.o crtend.o"
1439 extra_headers=math-68881.h
1441 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1442 xm_file=m68k/xm-linux.h # with a.out format
1444 tm_file=m68k/linux-aout.h
1445 tmake_file="t-linux-aout m68k/t-linux-aout"
1446 fixincludes=Makefile.in #On Linux, the headers are ok already.
1447 extra_headers=math-68881.h
1450 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1451 xm_file=m68k/xm-linux.h # with ELF format using the
1452 xmake_file=x-linux # Linux C library 5
1453 tm_file=m68k/linux.h
1454 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1455 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1456 fixincludes=Makefile.in #On Linux, the headers are ok already.
1457 extra_headers=math-68881.h
1460 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1461 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1462 xmake_file=x-linux # aka the Linux C library 6.
1463 tm_file=m68k/linux.h
1464 tmake_file="t-linux m68k/t-linux"
1465 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1466 fixincludes=Makefile.in #On Linux, the headers are ok already.
1467 extra_headers=math-68881.h
1469 if [[ x$thread_file = x ]]; then
1474 tmake_file=m68k/t-m68kbare
1475 tm_file=m68k/m68k-psos.h
1476 extra_headers=math-68881.h
1479 tmake_file="m68k/t-m68kbare t-rtems"
1480 tm_file=m68k/rtems.h
1481 extra_headers=math-68881.h
1487 tm_file=m88k/dguxbcs.h
1488 tmake_file=m88k/t-dguxbcs
1492 tmake_file=m88k/t-dgux
1495 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1497 xmake_file=m88k/x-dgux
1498 if [[ x$gas = xyes ]]
1500 tmake_file=m88k/t-dgux-gas
1502 fixincludes=fixinc.dgux
1504 m88k-dolphin-sysv3*)
1505 tm_file=m88k/dolph.h
1506 extra_parts="crtbegin.o crtend.o"
1507 xm_file=m88k/xm-sysv3.h
1508 xmake_file=m88k/x-dolph
1509 if [[ x$gas = xyes ]]
1511 tmake_file=m88k/t-m88k-gas
1514 m88k-tektronix-sysv3)
1515 tm_file=m88k/tekXD88.h
1516 extra_parts="crtbegin.o crtend.o"
1517 xm_file=m88k/xm-sysv3.h
1518 xmake_file=m88k/x-tekXD88
1519 if [[ x$gas = xyes ]]
1521 tmake_file=m88k/t-m88k-gas
1525 tm_file=m88k/m88k-aout.h
1528 tm_file=m88k/m88k-coff.h
1529 tmake_file=m88k/t-bug
1533 extra_parts="crtbegin.o crtend.o"
1534 if [[ x$gas = xyes ]]
1536 tmake_file=m88k/t-luna-gas
1538 tmake_file=m88k/t-luna
1542 tm_file=m88k/sysv3.h
1543 extra_parts="crtbegin.o crtend.o"
1544 xm_file=m88k/xm-sysv3.h
1545 xmake_file=m88k/x-sysv3
1546 if [[ x$gas = xyes ]]
1548 tmake_file=m88k/t-m88k-gas
1552 tm_file=m88k/sysv4.h
1553 extra_parts="crtbegin.o crtend.o"
1554 xmake_file=m88k/x-sysv4
1555 tmake_file=m88k/t-sysv4
1557 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1558 tm_file=mips/iris6.h
1559 xm_file=mips/xm-iris6.h
1561 fixincludes=fixinc.irix
1562 xmake_file=mips/x-iris6
1563 tmake_file=mips/t-iris6
1564 if [[ x$enable_threads = xyes ]]; then
1568 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1569 tm_file=mips/cross64.h
1570 xm_file=mips/xm-iris5.h
1572 fixincludes=Makefile.in
1573 xmake_file=mips/x-iris
1574 tmake_file=mips/t-cross64
1575 # See comment in mips/iris[56].h files.
1577 if [[ x$enable_threads = xyes ]]; then
1582 if [[ x$gas = xyes ]]
1584 if [[ x$stabs = xyes ]]
1586 tm_file=mips/iris5gdb.h
1588 tm_file=mips/sni-gas.h
1591 tm_file=mips/sni-svr4.h
1593 xm_file=mips/xm-sysv.h
1594 xmake_file=mips/x-sni-svr4
1595 tmake_file=mips/t-mips-gas
1596 if [[ x$gnu_ld != xyes ]]
1602 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1603 if [[ x$gas = xyes ]]
1605 tm_file=mips/iris5gas.h
1606 if [[ x$stabs = xyes ]]
1608 tm_file="${tm_file} dbx.h"
1611 tm_file=mips/iris5.h
1613 xm_file=mips/xm-iris5.h
1615 fixincludes=fixinc.irix
1616 xmake_file=mips/x-iris
1617 # mips-tfile doesn't work yet
1618 tmake_file=mips/t-mips-gas
1619 # See comment in mips/iris5.h file.
1621 if [[ x$enable_threads = xyes ]]; then
1625 mips-sgi-irix4loser*) # Mostly like a MIPS.
1626 tm_file=mips/iris4loser.h
1627 if [[ x$stabs = xyes ]]; then
1628 tm_file="${tm_file} dbx.h"
1630 xm_file=mips/xm-iris4.h
1632 xmake_file=mips/x-iris
1633 if [[ x$gas = xyes ]]
1635 tmake_file=mips/t-mips-gas
1637 extra_passes="mips-tfile mips-tdump"
1639 if [[ x$gnu_ld != xyes ]]
1643 if [[ x$enable_threads = xyes ]]; then
1647 mips-sgi-irix4*) # Mostly like a MIPS.
1648 tm_file=mips/iris4.h
1649 if [[ x$stabs = xyes ]]; then
1650 tm_file="${tm_file} dbx.h"
1652 xm_file=mips/xm-iris4.h
1654 xmake_file=mips/x-iris
1655 if [[ x$gas = xyes ]]
1657 tmake_file=mips/t-mips-gas
1659 extra_passes="mips-tfile mips-tdump"
1661 if [[ x$gnu_ld != xyes ]]
1665 if [[ x$enable_threads = xyes ]]; then
1669 mips-sgi-*) # Mostly like a MIPS.
1670 tm_file=mips/iris3.h
1671 if [[ x$stabs = xyes ]]; then
1672 tm_file="${tm_file} dbx.h"
1674 xm_file=mips/xm-iris3.h
1676 xmake_file=mips/x-iris3
1677 if [[ x$gas = xyes ]]
1679 tmake_file=mips/t-mips-gas
1681 extra_passes="mips-tfile mips-tdump"
1683 if [[ x$gnu_ld != xyes ]]
1688 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1689 tm_file=mips/osfrose.h
1690 xmake_file=mips/x-osfrose
1691 tmake_file=mips/t-osfrose
1692 extra_objs=halfpic.o
1695 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1696 tm_file=mips/dec-osf1.h
1697 if [[ x$stabs = xyes ]]; then
1698 tm_file="${tm_file} dbx.h"
1700 xmake_file=mips/x-dec-osf1
1701 if [[ x$gas = xyes ]]
1703 tmake_file=mips/t-mips-gas
1705 tmake_file=mips/t-ultrix
1706 extra_passes="mips-tfile mips-tdump"
1708 if [[ x$gnu_ld != xyes ]]
1713 mips-dec-bsd*) # Decstation running 4.4 BSD
1714 tm_file=mips/dec-bsd.h
1716 if [[ x$gas = xyes ]]
1718 tmake_file=mips/t-mips-gas
1720 tmake_file=mips/t-ultrix
1721 extra_passes="mips-tfile mips-tdump"
1723 if [[ x$gnu_ld != xyes ]]
1728 mips-dec-netbsd*) # Decstation running NetBSD
1729 tm_file=mips/netbsd.h
1730 xm_file=mips/xm-netbsd.h
1731 # On NetBSD, the headers are already okay.
1732 fixincludes=Makefile.in
1734 if [[ x$prefix = xNONE ]]; then
1735 prefix=$native_prefix
1737 prefix=$native_prefix
1739 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1740 tm_file=mips/news4.h
1741 if [[ x$stabs = xyes ]]; then
1742 tm_file="${tm_file} dbx.h"
1744 if [[ x$gas = xyes ]]
1746 tmake_file=mips/t-mips-gas
1748 extra_passes="mips-tfile mips-tdump"
1750 if [[ x$gnu_ld != xyes ]]
1754 xmake_file=mips/x-sony
1756 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1757 # That is based on svr4.
1758 # t-svr4 is not right because this system doesn't use ELF.
1759 tm_file=mips/news5.h
1760 if [[ x$stabs = xyes ]]; then
1761 tm_file="${tm_file} dbx.h"
1763 xm_file=mips/xm-news.h
1764 if [[ x$gas = xyes ]]
1766 tmake_file=mips/t-mips-gas
1768 extra_passes="mips-tfile mips-tdump"
1770 if [[ x$gnu_ld != xyes ]]
1775 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1776 tm_file=mips/svr4-t.h
1777 if [[ x$stabs = xyes ]]; then
1778 tm_file="${tm_file} dbx.h"
1780 xm_file=mips/xm-sysv4.h
1781 xmake_file=mips/x-sysv
1782 if [[ x$gas = xyes ]]
1784 tmake_file=mips/t-mips-gas
1785 extra_parts="crtbegin.o crtend.o"
1787 tmake_file=mips/t-mips
1788 extra_passes="mips-tfile mips-tdump"
1790 if [[ x$gnu_ld != xyes ]]
1796 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1797 tm_file=mips/ultrix.h
1798 if [[ x$stabs = xyes ]]; then
1799 tm_file="${tm_file} dbx.h"
1801 xmake_file=mips/x-ultrix
1802 if [[ x$gas = xyes ]]
1804 tmake_file=mips/t-mips-gas
1806 tmake_file=mips/t-ultrix
1807 extra_passes="mips-tfile mips-tdump"
1809 if [[ x$gnu_ld != xyes ]]
1814 mips-*-riscos[[56789]]bsd*)
1815 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1816 if [[ x$stabs = xyes ]]; then
1817 tm_file="${tm_file} dbx.h"
1819 if [[ x$gas = xyes ]]
1821 tmake_file=mips/t-bsd-gas
1823 tmake_file=mips/t-bsd
1824 extra_passes="mips-tfile mips-tdump"
1826 if [[ x$gnu_ld != xyes ]]
1832 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1833 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1834 if [[ x$stabs = xyes ]]; then
1835 tm_file="${tm_file} dbx.h"
1837 if [[ x$gas = xyes ]]
1839 tmake_file=mips/t-bsd-gas
1841 tmake_file=mips/t-bsd
1842 extra_passes="mips-tfile mips-tdump"
1844 if [[ x$gnu_ld != xyes ]]
1850 mips-*-riscos[[56789]]sysv4*)
1851 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1852 if [[ x$stabs = xyes ]]; then
1853 tm_file="${tm_file} dbx.h"
1855 xm_file=mips/xm-sysv4.h
1856 xmake_file=mips/x-sysv
1857 if [[ x$gas = xyes ]]
1859 tmake_file=mips/t-svr4-gas
1861 tmake_file=mips/t-svr4
1862 extra_passes="mips-tfile mips-tdump"
1864 if [[ x$gnu_ld != xyes ]]
1870 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1871 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1872 if [[ x$stabs = xyes ]]; then
1873 tm_file="${tm_file} dbx.h"
1875 xm_file=mips/xm-sysv.h
1876 xmake_file=mips/x-sysv
1877 if [[ x$gas = xyes ]]
1879 tmake_file=mips/t-svr4-gas
1881 tmake_file=mips/t-svr4
1882 extra_passes="mips-tfile mips-tdump"
1884 if [[ x$gnu_ld != xyes ]]
1890 mips-*-riscos[[56789]]sysv*)
1891 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1892 if [[ x$stabs = xyes ]]; then
1893 tm_file="${tm_file} dbx.h"
1895 xm_file=mips/xm-sysv.h
1896 xmake_file=mips/x-sysv
1897 if [[ x$gas = xyes ]]
1899 tmake_file=mips/t-svr3-gas
1901 tmake_file=mips/t-svr3
1902 extra_passes="mips-tfile mips-tdump"
1904 if [[ x$gnu_ld != xyes ]]
1910 mips-*-sysv* | mips-*-riscos*sysv*)
1911 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1912 if [[ x$stabs = xyes ]]; then
1913 tm_file="${tm_file} dbx.h"
1915 xm_file=mips/xm-sysv.h
1916 xmake_file=mips/x-sysv
1917 if [[ x$gas = xyes ]]
1919 tmake_file=mips/t-svr3-gas
1921 tmake_file=mips/t-svr3
1922 extra_passes="mips-tfile mips-tdump"
1924 if [[ x$gnu_ld != xyes ]]
1930 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1931 tm_file=mips/mips-5.h
1932 if [[ x$stabs = xyes ]]; then
1933 tm_file="${tm_file} dbx.h"
1935 if [[ x$gas = xyes ]]
1937 tmake_file=mips/t-mips-gas
1939 extra_passes="mips-tfile mips-tdump"
1941 if [[ x$gnu_ld != xyes ]]
1950 tm_file=mips/ecoffl.h
1951 if [[ x$stabs = xyes ]]; then
1952 tm_file="${tm_file} dbx.h"
1954 tmake_file=mips/t-ecoff
1957 tm_file=mips/ecoff.h
1958 if [[ x$stabs = xyes ]]; then
1959 tm_file="${tm_file} dbx.h"
1961 tmake_file=mips/t-ecoff
1965 tm_file="mips/elfl.h libgloss.h"
1966 tmake_file=mips/t-ecoff
1969 tm_file="mips/elf.h libgloss.h"
1970 tmake_file=mips/t-ecoff
1973 tm_file="mips/elfl64.h libgloss.h"
1974 tmake_file=mips/t-ecoff
1976 mips64orionel-*-elf*)
1977 tm_file="mips/elflorion.h libgloss.h"
1978 tmake_file=mips/t-ecoff
1981 tm_file="mips/elf64.h libgloss.h"
1982 tmake_file=mips/t-ecoff
1985 tm_file="mips/elforion.h libgloss.h"
1986 tmake_file=mips/t-ecoff
1988 mips64orion-*-rtems*)
1989 tm_file=mips/rtems64.h
1990 tmake_file="mips/t-ecoff t-rtems"
1992 mips-*-*) # Default MIPS RISC-OS 4.0.
1993 if [[ x$stabs = xyes ]]; then
1994 tm_file="${tm_file} dbx.h"
1996 if [[ x$gas = xyes ]]
1998 tmake_file=mips/t-mips-gas
2000 extra_passes="mips-tfile mips-tdump"
2002 if [[ x$gnu_ld != xyes ]]
2009 tm_file="mn10200/mn10200.h"
2010 if [[ x$stabs = xyes ]]
2012 tm_file="${tm_file} dbx.h"
2018 tm_file="mn10300/mn10300.h"
2019 if [[ x$stabs = xyes ]]
2021 tm_file="${tm_file} dbx.h"
2026 tm_file=ns32k/encore.h
2030 tm_file=ns32k/sequent.h
2034 tm_file=ns32k/tek6100.h
2039 tm_file=ns32k/tek6200.h
2043 # This has not been updated to GCC 2.
2045 # xm_file=ns32k/xm-genix.h
2046 # xmake_file=ns32k/x-genix
2047 # tm_file=ns32k/genix.h
2048 # broken_install=yes
2052 tm_file=ns32k/merlin.h
2056 tm_file=ns32k/pc532-mach.h
2060 tm_file=ns32k/pc532-min.h
2061 xm_file=ns32k/xm-pc532-min.h
2064 ns32k-pc532-netbsd*)
2065 tm_file=ns32k/netbsd.h
2066 xm_file=ns32k/xm-netbsd.h
2067 # On NetBSD, the headers are already okay.
2068 fixincludes=Makefile.in
2072 tm_file="${tm_file} pdp11/2bsd.h"
2078 xmake_file=pyr/x-pyr
2085 xmake_file=romp/x-mach
2088 powerpc-*-sysv* | powerpc-*-elf*)
2089 tm_file=rs6000/sysv4.h
2090 xm_file=rs6000/xm-sysv4.h
2091 extra_headers=ppc-asm.h
2092 if [[ x$gas = xyes ]]
2094 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2096 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2098 xmake_file=rs6000/x-sysv4
2101 tm_file=rs6000/eabiaix.h
2102 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2103 fixincludes=Makefile.in
2104 extra_headers=ppc-asm.h
2107 tm_file=rs6000/eabisim.h
2108 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2109 fixincludes=Makefile.in
2110 extra_headers=ppc-asm.h
2113 tm_file=rs6000/eabi.h
2114 if [[ x$gas = xyes ]]
2116 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2118 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2120 fixincludes=Makefile.in
2121 extra_headers=ppc-asm.h
2124 tm_file=rs6000/rtems.h
2125 if [[ x$gas = xyes ]]
2127 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2129 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2131 fixincludes=Makefile.in
2132 extra_headers=ppc-asm.h
2134 powerpc-*-linux-gnu*)
2135 tm_file=rs6000/linux.h
2136 xm_file=rs6000/xm-sysv4.h
2137 out_file=rs6000/rs6000.c
2138 if [[ x$gas = xyes ]]
2140 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2142 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2145 fixincludes=Makefile.in
2146 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2147 extra_headers=ppc-asm.h
2148 if [[ x$thread_file = x ]]; then
2154 xm_file=rs6000/xm-sysv4.h
2155 tm_file=rs6000/vxppc.h
2156 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2157 extra_headers=ppc-asm.h
2159 powerpcle-*-sysv* | powerpcle-*-elf*)
2160 tm_file=rs6000/sysv4le.h
2161 xm_file=rs6000/xm-sysv4.h
2162 if [[ x$gas = xyes ]]
2164 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2166 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2168 xmake_file=rs6000/x-sysv4
2169 extra_headers=ppc-asm.h
2171 powerpcle-*-eabisim*)
2172 tm_file=rs6000/eabilesim.h
2173 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2174 fixincludes=Makefile.in
2175 extra_headers=ppc-asm.h
2178 tm_file=rs6000/eabile.h
2179 if [[ x$gas = xyes ]]
2181 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2183 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2185 fixincludes=Makefile.in
2186 extra_headers=ppc-asm.h
2188 powerpcle-*-winnt* )
2189 tm_file=rs6000/win-nt.h
2190 tmake_file=rs6000/t-winnt
2192 fixincludes=Makefile.in
2193 if [[ x$enable_threads = xyes ]]; then
2196 extra_headers=ppc-asm.h
2198 powerpcle-*-pe | powerpcle-*-cygwin32)
2199 tm_file=rs6000/cygwin32.h
2200 xm_file=rs6000/xm-cygwin32.h
2201 tmake_file=rs6000/t-winnt
2202 xmake_file=rs6000/x-cygwin32
2204 fixincludes=Makefile.in
2205 if [[ x$enable_threads = xyes ]]; then
2209 extra_headers=ppc-asm.h
2211 powerpcle-*-solaris2*)
2212 tm_file=rs6000/sol2.h
2213 xm_file=rs6000/xm-sysv4.h
2214 if [[ x$gas = xyes ]]
2216 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2218 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2220 xmake_file=rs6000/x-sysv4
2221 fixincludes=fixinc.svr4
2222 extra_headers=ppc-asm.h
2224 rs6000-ibm-aix3.[[01]]*)
2225 tm_file=rs6000/aix31.h
2226 xmake_file=rs6000/x-aix31
2229 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2230 tm_file=rs6000/aix3newas.h
2231 if [[ x$host != x$target ]]
2233 tmake_file=rs6000/t-xnewas
2235 tmake_file=rs6000/t-newas
2239 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2240 tm_file=rs6000/aix41.h
2241 if [[ x$host != x$target ]]
2243 tmake_file=rs6000/t-xnewas
2245 tmake_file=rs6000/t-newas
2247 xmake_file=rs6000/x-aix31
2257 tm_file=rs6000/mach.h
2258 xm_file=rs6000/xm-mach.h
2259 xmake_file=rs6000/x-mach
2263 tm_file=rs6000/lynx.h
2264 xm_file=rs6000/xm-lynx.h
2265 tmake_file=rs6000/t-rs6000
2266 xmake_file=rs6000/x-lynx
2278 xm_file=sparc/xm-pbd.h
2280 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2281 tm_file=sparc/vxsparc.h
2282 tmake_file=sparc/t-vxsparc
2286 tmake_file=sparc/t-sparcbare
2287 tm_file="sparc/aout.h libgloss.h"
2290 tm_file=sparc/netbsd.h
2291 xm_file=sparc/xm-netbsd.h
2292 # On NetBSD, the headers are already okay.
2293 fixincludes=Makefile.in
2299 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2300 xm_file=sparc/xm-linux.h
2301 tm_file=sparc/linux-aout.h
2303 fixincludes=Makefile.in #On Linux, the headers are ok already.
2307 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2308 xm_file=sparc/xm-linux.h # with ELF format using the
2309 xmake_file=x-linux # Linux C library 5.
2310 tm_file=sparc/linux.h
2311 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2312 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2313 fixincludes=Makefile.in #On Linux, the headers are ok already.
2317 sparc-*-linux-gnu*) # Sparc's running Linux
2318 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2319 xmake_file=x-linux # aka the Linux C library 6.
2320 tm_file=sparc/linux.h
2321 tmake_file="t-linux sparc/t-linux"
2322 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2323 fixincludes=Makefile.in #On Linux, the headers are ok already.
2326 if [[ x$thread_file = x ]]; then
2331 if [[ x$gas = xyes ]]
2333 tm_file=sparc/lynx.h
2335 tm_file=sparc/lynx-ng.h
2337 xm_file=sparc/xm-lynx.h
2338 tmake_file=sparc/t-sunos41
2342 tmake_file="sparc/t-sparcbare t-rtems"
2343 tm_file=sparc/rtems.h
2346 tm_file=sparc/sol2.h
2347 xm_file=sparc/xm-sol2.h
2348 tmake_file=sparc/t-sol2
2349 xmake_file=sparc/x-sysv4
2350 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2351 fixincludes=fixinc.svr4
2353 if [[ x$enable_threads = xyes ]]; then
2354 thread_file='solaris'
2358 tm_file=sparc/sunos4.h
2359 tmake_file=sparc/t-sunos40
2363 tm_file=sparc/sunos4.h
2364 tmake_file=sparc/t-sunos41
2368 tm_file=sparc/sun4o3.h
2372 tm_file=sparc/sysv4.h
2373 xm_file=sparc/xm-sysv4.h
2375 xmake_file=sparc/x-sysv4
2376 extra_parts="crtbegin.o crtend.o"
2379 xm_file=sparc/xm-sol2.h
2380 tm_file=sparc/vxsim.h
2381 tmake_file=sparc/t-vxsparc
2382 xmake_file=sparc/x-sysv4
2385 tm_file="sparc/splet.h libgloss.h"
2386 tmake_file=sparc/t-splet
2389 tm_file="sparc/litecoff.h libgloss.h"
2390 tmake_file=sparc/t-sparclite
2393 tm_file="sparc/lite.h aoutos.h libgloss.h"
2394 tmake_file=sparc/t-sparclite
2397 tmake_file=sparc/t-sp64
2398 tm_file=sparc/sp64-aout.h
2401 tmake_file=sparc/t-sp64
2402 tm_file=sparc/sp64-elf.h
2403 extra_parts="crtbegin.o crtend.o"
2405 # This hasn't been upgraded to GCC 2.
2406 # tahoe-harris-*) # Harris tahoe, using COFF.
2407 # tm_file=tahoe/harris.h
2409 # tahoe-*-bsd*) # tahoe running BSD
2411 # This hasn't been upgraded to GCC 2.
2416 vax-*-bsd*) # vaxen running BSD
2420 vax-*-sysv*) # vaxen running system V
2421 tm_file="${tm_file} vax/vaxv.h"
2422 xm_file="${tm_file} vax/xm-vaxv.h"
2426 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2427 xm_file="${xm_file} xm-netbsd.h"
2428 # On NetBSD, the headers are already okay.
2429 fixincludes=Makefile.in
2433 vax-*-ultrix*) # vaxen running ultrix
2434 tm_file="${tm_file} vax/ultrix.h"
2438 vax-*-vms*) # vaxen running VMS
2439 xm_file=vax/xm-vms.h
2443 vax-*-*) # vax default entry
2447 xm_file="${xm_file} xm-svr3"
2451 echo "Configuration $machine not supported" 1>&2
2458 ;; # Existing Linux/GNU systems do not use the GNU setup.
2460 # On the GNU system, the setup is just about the same on
2461 # each different CPU. The specific machines that GNU
2462 # supports are matched above and just set $cpu_type.
2463 xm_file=${cpu_type}/xm-gnu.h
2464 tm_file=${cpu_type}/gnu.h
2465 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2466 # GNU always uses ELF.
2468 # GNU tools are the only tools.
2471 # On GNU, the headers are already okay.
2472 fixincludes=Makefile.in
2473 xmake_file=x-linux # These details are the same as Linux.
2474 tmake_file=t-gnu # These are not.
2477 fixincludes=fixinc.svr4
2478 xmake_try_sysv=x-sysv
2480 install_headers_dir=install-headers-cpio
2484 install_headers_dir=install-headers-cpio
2488 # Distinguish i[3456]86
2489 # Also, do not run mips-tfile on MIPS if using gas.
2490 # Process --with-cpu= for PowerPC/rs6000
2491 target_cpu_default2=
2494 target_cpu_default2=1
2497 target_cpu_default2=2
2500 target_cpu_default2=3
2505 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2508 target_cpu_default2="MASK_CPU_EV5"
2512 if [[ x$gas = xyes ]]
2514 if [[ x$target_cpu_default2 = x ]]
2516 target_cpu_default2=MASK_GAS
2518 target_cpu_default2=${target_cpu_default2}|MASK_GAS
2522 mips*-*-ecoff* | mips*-*-elf*)
2523 if [[ x$gas = xyes ]]
2525 if [[ x$gnu_ld = xyes ]]
2527 target_cpu_default2=20
2529 target_cpu_default2=16
2534 if [[ x$gas = xyes ]]
2536 target_cpu_default2=16
2539 powerpc*-*-* | rs6000-*-*)
2540 case "x$with_cpu" in
2544 xcommon | xpower | xpower2 | xpowerpc | xrios \
2545 | xrios1 | xrios2 | xrsc | xrsc1 \
2546 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2547 | x403 | x505 | x801 | x821 | x823 | x860)
2548 target_cpu_default2="'\"$with_cpu\"'"
2552 echo "--with-cpu must be passed a value" 1>&2
2557 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2563 case ".$with_cpu" in
2565 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2567 .supersparc | .ultrasparc | .v7 | .v8)
2568 target_cpu_default2="TARGET_CPU_$with_cpu"
2571 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2578 if [[ x$target_cpu_default2 != x ]]
2580 if [[ x$target_cpu_default != x ]]
2582 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2584 target_cpu_default=$target_cpu_default2
2588 # No need for collect2 if we have the GNU linker.
2595 # Save data on machine being used to compile GCC in build_xm_file.
2596 # Save data on host machine in vars host_xm_file and host_xmake_file.
2597 if [[ x$pass1done = x ]]
2599 if [[ x"$xm_file" = x ]]
2600 then build_xm_file=$cpu_type/xm-$cpu_type.h
2601 else build_xm_file=$xm_file
2603 build_broken_install=$broken_install
2604 build_install_headers_dir=$install_headers_dir
2605 build_exeext=$exeext
2608 if [[ x$pass2done = x ]]
2610 if [[ x"$xm_file" = x ]]
2611 then host_xm_file=$cpu_type/xm-$cpu_type.h
2612 else host_xm_file=$xm_file
2614 if [[ x"$xmake_file" = x ]]
2615 then xmake_file=$cpu_type/x-$cpu_type
2617 host_xmake_file="$xmake_file"
2618 host_truncate_target=$truncate_target
2619 host_extra_gcc_objs=$extra_gcc_objs
2620 host_extra_objs=$extra_host_objs
2626 extra_objs="${host_extra_objs} ${extra_objs}"
2628 # Default the target-machine variables that were not explicitly set.
2629 if [[ x"$tm_file" = x ]]
2630 then tm_file=$cpu_type/$cpu_type.h; fi
2632 if [[ x$extra_headers = x ]]
2633 then extra_headers=; fi
2635 if [[ x"$xm_file" = x ]]
2636 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2638 md_file=$cpu_type/$cpu_type.md
2640 if [[ x$out_file = x ]]
2641 then out_file=$cpu_type/$cpu_type.c; fi
2643 if [[ x"$tmake_file" = x ]]
2644 then tmake_file=$cpu_type/t-$cpu_type
2647 if [[ x$float_format = x ]]
2648 then float_format=i64
2651 # Say what files are being used for the output code and MD file.
2652 echo "Using \`$srcdir/config/$out_file' to output insns."
2653 echo "Using \`$srcdir/config/$md_file' as machine description file."
2656 for f in $tm_file; do
2659 if [[ $count = ax ]]; then
2660 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2662 echo "Using the following target machine macro files:"
2663 for f in $tm_file; do
2664 echo " $srcdir/config/$f"
2669 for f in $host_xm_file; do
2672 if [[ $count = ax ]]; then
2673 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2675 echo "Using the following host machine macro files:"
2676 for f in $host_xm_file; do
2677 echo " $srcdir/config/$f"
2681 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2683 for f in $build_xm_file; do
2686 if [[ $count = ax ]]; then
2687 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2689 echo "Using the following build machine macro files:"
2690 for f in $build_xm_file; do
2691 echo " $srcdir/config/$f"
2696 if [[ x$thread_file = x ]]
2697 then thread_file='single'
2700 # Set up the header files.
2701 # $links is the list of header files to create.
2702 # $vars is the list of shell variables with file names to include.
2703 # config2.h is the old config.h. It is included by the new config.h which
2704 # created from config.in. The goal is to simplify the transition to autoconf.
2705 vars="host_xm_file tm_file xm_file build_xm_file"
2706 links="config2.h tm.h tconfig.h hconfig.h"
2709 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2712 while [[ -n "$vars" ]]
2714 # set file to car of files, files to cdr of files
2715 set $vars; var=$1; shift; vars=$*
2716 set $links; link=$1; shift; links=$*
2720 # Define TARGET_CPU_DEFAULT if the system wants one.
2721 # This substitutes for lots of *.h files.
2722 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2724 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2727 for file in `eval echo '$'$var`; do
2728 echo "#include \"$file\"" >>$link
2732 # Truncate the target if necessary
2733 if [[ x$host_truncate_target != x ]]; then
2734 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2737 # Get the version number from the toplevel
2738 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2740 # Are we using gcc as the native compiler?
2742 *linux*) # All Linux's use gcc as the native compiler.
2743 if [[ x$prefix = xNONE ]]; then
2744 prefix=$native_prefix
2749 # Get an absolute path to the GCC top-level source directory
2755 # Conditionalize the makefile for this host machine.
2756 # Make-host contains the concatenation of all host makefile fragments
2757 # [there can be more than one]. This file is built by configure.frag.
2758 host_overrides=Make-host
2759 dep_host_xmake_file=
2760 for f in .. ${host_xmake_file}
2762 if [[ -f ${srcdir}/config/$f ]]
2764 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2768 # Conditionalize the makefile for this target machine.
2769 # Make-target contains the concatenation of all host makefile fragments
2770 # [there can be more than one]. This file is built by configure.frag.
2771 target_overrides=Make-target
2773 for f in .. ${tmake_file}
2775 if [[ -f ${srcdir}/config/$f ]]
2777 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2781 # If the host doesn't support symlinks, modify CC in
2782 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2783 # Otherwise, we can use "CC=$(CC)".
2785 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2787 cc_set_by_configure="\$(CC)"
2788 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2790 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2791 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2795 out_object_file=`basename $out_file .c`.o
2798 for f in $tm_file; do
2799 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2803 for f in $host_xm_file; do
2804 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2808 for f in $build_xm_file; do
2809 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2812 # Define macro CROSS_COMPILE in compilation
2813 # if this is a cross-compiler.
2814 # Also use all.cross instead of all.internal
2815 # and add cross-make to Makefile.
2816 cross_overrides="/dev/null"
2817 if [[ x$host != x$target ]]
2819 cross_defines="CROSS=-DCROSS_COMPILE"
2820 cross_overrides="${topdir}/cross-make"
2823 # When building gcc with a cross-compiler, we need to fix a few things.
2824 # This must come after cross-make as we want all.build to override
2826 build_overrides="/dev/null"
2827 if [[ x$build != x$host ]]
2829 build_overrides="${topdir}/build-make"
2832 # Expand extra_headers to include complete path.
2833 # This substitutes for lots of t-* files.
2835 if [[ "x$extra_headers" = x ]]
2838 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2839 for file in $extra_headers;
2841 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2845 # Add a definition of USE_COLLECT2 if system wants one.
2846 # Also tell toplev.c what to do.
2847 # This substitutes for lots of t-* files.
2848 if [[ x$use_collect2 = x ]]
2853 will_use_collect2="ld"
2854 maybe_use_collect2="-DUSE_COLLECT2"
2858 # Set MD_DEPS if the real md file is in md.pre-cpp.
2859 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2860 # for line oriented comments, so we must always use a GNU cpp. If
2861 # building gcc with a cross compiler, use the cross compiler just
2862 # built. Otherwise, we can use the cpp just built.
2864 if [[ "x$md_cppflags" = x ]]
2866 md_file_sub=$srcdir/config/$md_file
2871 # If we have gas in the build tree, make a link to it.
2872 if [[ -f ../gas/Makefile ]]; then
2873 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2876 # If we have ld in the build tree, make a link to it.
2877 if [[ -f ../ld/Makefile ]]; then
2878 if [[ x$use_collect2 = x ]]; then
2879 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2881 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2885 # Figure out what language subdirectories are present.
2887 for lang in ${srcdir}/*/config-lang.in ..
2891 # The odd quoting in the next line works around
2892 # an apparent bug in bash 1.12 on linux.
2893 ${srcdir}/[[*]]/config-lang.in) ;;
2894 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2898 # Make empty files to contain the specs and options for each language.
2899 # Then add #include lines to for a compiler that has specs and/or options.
2903 rm -f specs.h options.h
2904 touch specs.h options.h
2905 for subdir in . $subdirs
2907 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2908 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2909 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2911 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2912 echo "#include \"$subdir/lang-options.h\"" >>options.h
2913 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2917 # These (without "all_") are set in each config-lang.in.
2918 # `language' must be a single word so is spelled singularly.
2924 # List of language makefile fragments.
2929 # Add the language fragments.
2930 # Languages are added via two mechanisms. Some information must be
2931 # recorded in makefile variables, these are defined in config-lang.in.
2932 # We accumulate them and plug them into the main Makefile.
2933 # The other mechanism is a set of hooks for each of the main targets
2934 # like `clean', `install', etc.
2936 language_fragments="Make-lang"
2937 language_hooks="Make-hooks"
2939 for s in .. $subdirs
2950 . ${srcdir}/$s/config-lang.in
2951 if [[ "x$language" = x ]]
2953 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2956 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2957 all_languages="$all_languages $language"
2958 if [[ "x$boot_language" = xyes ]]
2960 all_boot_languages="$all_boot_languages $language"
2962 all_compilers="$all_compilers $compilers"
2963 all_stagestuff="$all_stagestuff $stagestuff"
2964 all_diff_excludes="$all_diff_excludes $diff_excludes"
2965 all_headers="$all_headers $headers"
2966 all_lib2funcs="$all_lib2funcs $lib2funcs"
2970 # Since we can't use `::' targets, we link each language in
2971 # with a set of hooks, reached indirectly via lang.${target}.
2975 target_list="all.build all.cross start.encap rest.encap \
2977 install-normal install-common install-info install-man \
2979 mostlyclean clean distclean extraclean maintainer-clean \
2980 stage1 stage2 stage3 stage4"
2981 for t in $target_list
2984 for l in .. $all_languages
2986 if [[ $l != ".." ]]; then
2990 echo "lang.$t: $x" >> Make-hooks
2993 # Process the language and host/target makefile fragments.
2994 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
2996 # Substitute configuration variables
2998 AC_SUBST(all_languages)
2999 AC_SUBST(all_boot_languages)
3000 AC_SUBST(all_compilers)
3001 AC_SUBST(all_lang_makefiles)
3002 AC_SUBST(all_stagestuff)
3003 AC_SUBST(all_diff_excludes)
3004 AC_SUBST(all_lib2funcs)
3005 AC_SUBST(all_headers)
3006 AC_SUBST(extra_passes)
3007 AC_SUBST(extra_programs)
3008 AC_SUBST(extra_parts)
3009 AC_SUBST(extra_objs)
3010 AC_SUBST(host_extra_gcc_objs)
3011 AC_SUBST(extra_headers_list)
3012 AC_SUBST(dep_host_xmake_file)
3013 AC_SUBST(dep_tmake_file)
3015 AC_SUBST(out_object_file)
3017 AC_SUBST(tm_file_list)
3018 AC_SUBST(build_xm_file_list)
3019 AC_SUBST(host_xm_file_list)
3020 AC_SUBST(lang_specs_files)
3021 AC_SUBST(lang_options_files)
3022 AC_SUBST(thread_file)
3024 AC_SUBST(local_prefix)
3025 AC_SUBST(gxx_include_dir)
3026 AC_SUBST(fixincludes)
3027 AC_SUBST(build_install_headers_dir)
3028 AC_SUBST(build_exeext)
3029 AC_SUBST(float_format)
3030 AC_SUBST(will_use_collect2)
3031 AC_SUBST(maybe_use_collect2)
3032 AC_SUBST(cc_set_by_configure)
3033 AC_SUBST(stage_prefix_set_by_configure)
3035 AC_SUBST_FILE(target_overrides)
3036 AC_SUBST_FILE(host_overrides)
3037 AC_SUBST(cross_defines)
3038 AC_SUBST_FILE(cross_overrides)
3039 AC_SUBST_FILE(build_overrides)
3040 AC_SUBST_FILE(language_fragments)
3041 AC_SUBST_FILE(language_hooks)
3043 # Echo that links are built
3044 if [[ x$host = x$target ]]
3052 if [[ x$host != x$build ]]
3054 str3=" on a $build system"
3057 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3062 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3064 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3066 echo " ${str2}${str3}." 1>&2
3069 # Configure the subdirectories
3070 # AC_CONFIG_SUBDIRS($subdirs)
3072 # Create the Makefile
3073 # and configure language subdirectories
3076 . $srcdir/configure.lang
3077 case x$CONFIG_HEADERS in
3078 xconfig.h:config.in)
3086 target_alias='${target_alias}'
3088 subdirs='${subdirs}'
3089 symbolic_link='${symbolic_link}'
3090 program_transform_set='${program_transform_set}'
3091 program_transform_name='${program_transform_name}'
3092 dep_host_xmake_file='${dep_host_xmake_file}'
3093 host_xmake_file='${host_xmake_file}'
3094 dep_tmake_file='${dep_tmake_file}'
3095 tmake_file='${tmake_file}'
3096 thread_file='${thread_file}'
3097 version='${version}'
3098 local_prefix='${local_prefix}'
3099 build_install_headers_dir='${build_install_headers_dir}'
3100 build_exeext='${build_exeext}'
3101 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3102 SET_MAKE='${SET_MAKE}'
3103 build_broken_install='${build_broken_install}'
3104 target_list='${target_list}'
3105 target_overrides='${target_overrides}'
3106 host_overrides='${host_overrides}'
3107 cross_defines='${cross_defines}'
3108 cross_overrides='${cross_overrides}'
3109 build_overrides='${build_overrides}'