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
31 # Check for additional parameters
35 [ --with-gnu-ld arrange to work with GNU ld.],
41 [ --with-gnu-as arrange to work with GNU as.],
47 [ --with-stabs arrange to use stabs instead of host debug format.],
53 [ --with-elf arrange to use ELF instead of host debug format.],
57 # Specify the local prefix
58 AC_ARG_WITH(local-prefix,
59 [ --with-local-prefix=DIR specifies directory to put local include.],
60 local_prefix=$with_local_prefix,
61 local_prefix=/usr/local)
63 # Default local prefix if it is empty
64 if [[ x$local_prefix = x ]]; then
65 local_prefix=/usr/local
68 # Specify the g++ header file directory
69 AC_ARG_WITH(gxx-include-dir,
70 [ --with-gxx-include-dir=DIR
71 specifies directory to put g++ header files.],
72 gxx_include_dir=$with_gxx_include_dir,
73 gxx_include_dir='${prefix}/include/g++')
75 # Default g++ header file directory if it is empty
76 if [[ x$gxx_include_dir = x ]]; then
77 gxx_include_dir='${prefix}/include/g++'
80 # Determine the host, build, and target systems
83 # Find some useful tools
91 # Find the native compiler
104 build_broken_install=
105 build_install_headers_dir=install-headers-tar
109 host_truncate_target=
111 # Decode the host machine, then the target machine.
112 # For the host machine, we save the xm_file variable as host_xm_file;
113 # then we decode the target machine and forget everything else
114 # that came from the host machine.
115 for machine in $build $host $target; do
128 # Set this to force installation and use of collect2.
130 # Set this to override the default target model.
132 # Set this to force use of install.sh.
134 # Set this to control which fixincludes program to use.
135 fixincludes=fixincludes
136 # Set this to control how the header file directory is installed.
137 install_headers_dir=install-headers-tar
138 # Set this to a non-empty list of args to pass to cpp if the target
139 # wants its .md file passed through cpp.
141 # Set this if directory names should be truncated to 14 characters.
143 # Set this if gdb needs a dir command with `dirname $out_file`
144 gdb_needs_out_file_path=
145 # Set this to the tag of the Objective-C runtime thread file to compile
146 # It may be set (in the absence of autoconf configuration) by
147 # --enable-objcthreads=posix (for instance) where it's not
148 # well defined as is the case for Linux.
150 case x${enable_objcthreads-x} in
152 echo "\`--enable-objcthreads' must be passed a value." 1>&2
155 # Set this if the build machine requires executables to have a
159 # Set default cpu_type, tm_file and xm_file so it can be updated in
160 # each machine entry.
161 cpu_type=`echo $machine | sed 's/-.*$//'`
192 tm_file=${cpu_type}/${cpu_type}.h
193 xm_file=${cpu_type}/xm-${cpu_type}.h
196 # Support site-specific machine types.
198 cpu_type=`echo $machine | sed -e 's/-.*//'`
199 rest=`echo $machine | sed -e "s/$cpu_type-//"`
200 xm_file=${cpu_type}/xm-$rest.h
201 tm_file=${cpu_type}/$rest.h
202 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
203 then xmake_file=${cpu_type}/x-$rest; \
206 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
207 then tmake_file=${cpu_type}/t-$rest; \
213 a29k-*-bsd* | a29k-*-sym1*)
214 tm_file="${tm_file} a29k/unix.h"
215 xm_file=a29k/xm-unix.h
216 xmake_file=a29k/x-unix
219 a29k-*-udi | a29k-*-coff)
220 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
221 tmake_file=a29k/t-a29kbare
224 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
225 tmake_file=a29k/t-vx29k
226 extra_parts="crtbegin.o crtend.o"
228 a29k-*-*) # Default a29k environment.
231 alpha-*-linux*ecoff*)
232 tm_file="${tm_file} alpha/linux.h"
233 xm_file="${xm_file} alpha/xm-linux.h"
234 objc_thread_file=${enable_objcthreads-single}
237 fixincludes=Makefile.in
241 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
242 xm_file="${xm_file} alpha/xm-linux.h"
245 fixincludes=Makefile.in
246 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
249 alpha-dec-osf[[456789]]*)
250 if [[ x$stabs = xyes ]]
252 tm_file="${tm_file} dbx.h"
254 if [[ x$gas != xyes ]]
256 extra_passes="mips-tfile mips-tdump"
260 # Some versions of OSF4 (specifically X4.0-9 296.7) have
261 # a broken tar, so we use cpio instead.
264 install_headers_dir=install-headers-cpio
268 alpha-dec-osf[[23]]*)
269 tm_file="${tm_file} alpha/osf2or3.h"
270 if [[ x$stabs = xyes ]]
272 tm_file="${tm_file} dbx.h"
274 if [[ x$gas != xyes ]]
276 extra_passes="mips-tfile mips-tdump"
282 tm_file="${tm_file} alpha/osf12.h"
283 if [[ x$stabs = xyes ]]
285 tm_file="${tm_file} dbx.h"
287 if [[ x$gas != xyes ]]
289 extra_passes="mips-tfile mips-tdump"
295 if [[ x$stabs = xyes ]]
297 tm_file="${tm_file} dbx.h"
299 if [[ x$gas != xyes ]]
301 extra_passes="mips-tfile mips-tdump"
307 tm_file="${tm_file} alpha/win-nt.h"
308 target_cpu_default=64
309 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
311 xmake_file=winnt/x-winnt
312 extra_host_objs=oldnames.o
313 extra_gcc_objs="spawnv.o oldnames.o"
314 fixincludes=fixinc.winnt
315 if [[ x$gnu_ld != xyes ]]
317 extra_programs=ld.exe
319 objc_thread_file=${enable_objcthreads-win32}
323 xm_file="${xm_file} alpha/xm-vms.h"
324 tmake_file=alpha/t-vms
325 fixincludes=Makefile.in
327 arm-*-coff* | armel-*-coff*)
329 tmake_file=arm/t-bare
331 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
332 tm_file=arm/riscix1-1.h
335 arm-*-riscix*) # Acorn RISC machine
336 if [[ x$gas = xyes ]]
338 tm_file=arm/rix-gas.h
342 xmake_file=arm/x-riscix
343 tmake_file=arm/t-riscix
346 arm-semi-aout | armel-semi-aout)
348 tmake_file=arm/t-semi
349 fixincludes=Makefile.in # There is nothing to fix
351 arm-semi-aof | armel-semi-aof)
352 tm_file=arm/semiaof.h
353 tmake_file=arm/t-semiaof
354 fixincludes=Makefile.in # There is nothing to fix
356 arm-*-linuxaout) # ARM Linux
358 xm_file=arm/xm-linux.h
360 tm_file=arm/linux-gas.h
361 tmake_file=arm/t-linux
362 fixincludes=Makefile.in
366 arm-*-*) # generic version
368 c1-convex-*) # Convex C1
371 fixincludes=Makefile.in
373 c2-convex-*) # Convex C2
376 fixincludes=Makefile.in
381 fixincludes=Makefile.in
386 fixincludes=Makefile.in
389 target_cpu_default=16
391 fixincludes=Makefile.in
393 clipper-intergraph-clix*)
394 tm_file="${tm_file} svr3.h clipper/clix.h"
395 xm_file=clipper/xm-clix.h
396 xmake_file=clipper/x-clix
397 extra_headers=va-clipper.h
398 extra_parts="crtbegin.o crtend.o"
399 install_headers_dir=install-headers-cpio
407 # This hasn't been upgraded to GCC 2.
408 # fx80-alliant-*) # Alliant FX/80
414 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
415 xm_file=pa/xm-papro.h
420 tm_file="${tm_file} pa/pa-osf.h"
422 fixincludes=Makefile.in
425 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
426 xm_file=pa/xm-papro.h
430 tm_file="${tm_file} pa/pa-osf.h"
432 fixincludes=Makefile.in
437 fixincludes=Makefile.in
441 fixincludes=Makefile.in
444 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
445 xm_file=pa/xm-pahpux.h
446 xmake_file=pa/x-pa-hpux
447 if [[ x$gas = xyes ]]
449 tm_file="${tm_file} pa/gas.h"
452 install_headers_dir=install-headers-cpio
455 hppa1.0-*-hpux8.0[[0-2]]*)
456 tm_file="${tm_file} pa/pa-hpux.h"
457 xm_file=pa/xm-pahpux.h
458 xmake_file=pa/x-pa-hpux
459 if [[ x$gas = xyes ]]
461 tm_file="${tm_file} pa/pa-gas.h"
463 tm_file="pa/pa-oldas.h ${tm_file}"
466 install_headers_dir=install-headers-cpio
469 hppa1.1-*-hpux8.0[[0-2]]*)
471 tm_file="${tm_file} pa/pa-hpux.h"
472 xm_file=pa/xm-pahpux.h
473 xmake_file=pa/x-pa-hpux
474 if [[ x$gas = xyes ]]
476 tm_file="${tm_file} pa/pa-gas.h"
478 tm_file="pa/pa-oldas.h ${tm_file}"
481 install_headers_dir=install-headers-cpio
486 tm_file="${tm_file} pa/pa-hpux.h"
487 xm_file=pa/xm-pahpux.h
488 xmake_file=pa/x-pa-hpux
489 if [[ x$gas = xyes ]]
491 tm_file="${tm_file} pa/pa-gas.h"
494 install_headers_dir=install-headers-cpio
498 tm_file="${tm_file} pa/pa-hpux.h"
499 xm_file=pa/xm-pahpux.h
500 xmake_file=pa/x-pa-hpux
501 if [[ x$gas = xyes ]]
503 tm_file="${tm_file} pa/pa-gas.h"
506 install_headers_dir=install-headers-cpio
511 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
512 xm_file=pa/xm-pahpux.h
513 xmake_file=pa/x-pa-hpux
514 if [[ x$gas = xyes ]]
516 tm_file="${tm_file} pa/pa-gas.h"
519 install_headers_dir=install-headers-cpio
523 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
524 xm_file=pa/xm-pahpux.h
525 xmake_file=pa/x-pa-hpux
526 if [[ x$gas = xyes ]]
528 tm_file="${tm_file} pa/pa-gas.h"
531 install_headers_dir=install-headers-cpio
536 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
537 xm_file=pa/xm-pahpux.h
538 xmake_file=pa/x-pa-hpux
539 if [[ x$gas = xyes ]]
541 tm_file="${tm_file} pa/pa-gas.h"
544 install_headers_dir=install-headers-cpio
548 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
549 xm_file=pa/xm-pahpux.h
550 xmake_file=pa/x-pa-hpux
551 if [[ x$gas = xyes ]]
553 tm_file="${tm_file} pa/pa-gas.h"
556 install_headers_dir=install-headers-cpio
561 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
562 xm_file=pa/xm-pahpux.h
563 xmake_file=pa/x-pa-hpux
564 if [[ x$gas = xyes ]]
566 tm_file="${tm_file} pa/pa-gas.h"
569 install_headers_dir=install-headers-cpio
573 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
574 xm_file=pa/xm-pahpux.h
575 xmake_file=pa/x-pa-hpux
576 if [[ x$gas = xyes ]]
578 tm_file="${tm_file} pa/pa-gas.h"
581 install_headers_dir=install-headers-cpio
587 fixincludes=Makefile.in
591 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
592 if [[ x$gas = xyes ]]
594 tm_file=i386/aix386.h
595 extra_parts="crtbegin.o crtend.o"
596 tmake_file=i386/t-crtstuff
598 tm_file=i386/aix386ng.h
601 xm_file=i386/xm-aix.h
602 xmake_file=i386/x-aix
605 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
606 xm_file=i386/xm-sysv4.h
607 xmake_file=i386/x-ncr3000
608 if [[ x$stabs = xyes -a x$gas = xyes ]]
610 tm_file=i386/sysv4gdb.h
614 extra_parts="crtbegin.o crtend.o"
615 tmake_file=i386/t-crtpic
619 xm_file=i386/xm-next.h
620 tmake_file=i386/t-next
621 xmake_file=i386/x-next
622 extra_objs=nextstep.o
623 objc_thread_file=${enable_objcthreads-mach}
625 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
627 if [[ x$gas = xyes ]]
629 tm_file=i386/seq-gas.h
631 tm_file=i386/sequent.h
634 i[[3456]]86-sequent-ptx1*)
635 xm_file=i386/xm-sysv3.h
636 xmake_file=i386/x-sysv3
637 tm_file=i386/seq-sysv3.h
638 tmake_file=i386/t-crtstuff
639 fixincludes=fixinc.ptx
640 extra_parts="crtbegin.o crtend.o"
641 install_headers_dir=install-headers-cpio
644 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
645 xm_file=i386/xm-sysv3.h
646 xmake_file=i386/x-sysv3
647 tm_file=i386/seq2-sysv3.h
648 tmake_file=i386/t-crtstuff
649 extra_parts="crtbegin.o crtend.o"
650 fixincludes=fixinc.ptx
651 install_headers_dir=install-headers-cpio
654 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
655 xm_file=i386/xm-sysv4.h
657 tm_file=i386/ptx4-i.h
659 extra_parts="crtbegin.o crtend.o"
660 fixincludes=fixinc.ptx
661 install_headers_dir=install-headers-cpio
664 i386-sun-sunos*) # Sun i386 roadrunner
665 xm_file=i386/xm-sun.h
670 tm_file=i386/i386-aout.h
671 tmake_file=i386/t-i386bare
673 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
674 tm_file=i386/bsd386.h
675 xm_file=i386/xm-bsd386.h
676 # tmake_file=t-libc-ok
679 tm_file=i386/386bsd.h
680 xm_file=i386/xm-bsd386.h
681 # tmake_file=t-libc-ok
682 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
685 i[[3456]]86-*-freebsdelf*)
686 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
687 xm_file=i386/xm-freebsd.h
688 # On FreeBSD, the headers are already ok.
689 fixincludes=Makefile.in
690 tmake_file=i386/t-freebsd
695 i[[3456]]86-*-freebsd*)
696 tm_file=i386/freebsd.h
697 xm_file=i386/xm-freebsd.h
698 # On FreeBSD, the headers are already ok.
699 fixincludes=Makefile.in
700 tmake_file=i386/t-freebsd
702 i[[3456]]86-*-netbsd*)
703 tm_file=i386/netbsd.h
704 xm_file=i386/xm-netbsd.h
705 # On NetBSD, the headers are already okay.
706 fixincludes=Makefile.in
710 tm_file=i386/i386-coff.h
711 tmake_file=i386/t-i386bare
713 i[[3456]]86-*-isc*) # 80386 running ISC system
714 xm_file=i386/xm-isc.h
716 i[[345]]86-*-isc[[34]]*)
717 xmake_file=i386/x-isc3
720 xmake_file=i386/x-isc
723 if [[ x$gas = xyes -a x$stabs = xyes ]]
725 tm_file=i386/iscdbx.h
726 tmake_file=i386/t-svr3dbx
727 extra_parts="svr3.ifile svr3z.ifile"
729 tm_file=i386/isccoff.h
730 tmake_file=i386/t-crtstuff
731 extra_parts="crtbegin.o crtend.o"
733 install_headers_dir=install-headers-cpio
736 i[[3456]]86-*-linux*oldld*) # Intel 80386's running Linux
737 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
738 xmake_file=x-linux-aout
739 tmake_file="t-linux-aout i386/t-crtstuff"
740 tm_file=i386/linux-oldld.h
741 fixincludes=Makefile.in #On Linux, the headers are ok already.
744 objc_thread_file=${enable_objcthreads-single}
746 i[[3456]]86-*-linux*aout*) # Intel 80386's running Linux
747 xm_file=i386/xm-linux.h # with a.out format
748 xmake_file=x-linux-aout
749 tmake_file="t-linux-aout i386/t-crtstuff"
750 tm_file=i386/linux-aout.h
751 fixincludes=Makefile.in #On Linux, the headers are ok already.
754 objc_thread_file=${enable_objcthreads-single}
756 i[[3456]]86-*-linux*) # Intel 80386's running Linux
757 xm_file=i386/xm-linux.h # with ELF format
760 tmake_file="t-linux i386/t-crtstuff"
761 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
762 fixincludes=Makefile.in #On Linux, the headers are ok already.
765 objc_thread_file=${enable_objcthreads-single}
769 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
770 xm_file=i386/xm-go32.h
772 tmake_file=i386/t-go32
774 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
777 fixincludes=Makefile.in
781 i[[3456]]86-*-lynxos*)
782 if [[ x$gas = xyes ]]
786 tm_file=i386/lynx-ng.h
788 xm_file=i386/xm-lynx.h
789 tmake_file=i386/t-i386bare
794 # tmake_file=t-libc-ok
797 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
798 if [[ x$elf = xyes ]]
800 tm_file=i386/osfelf.h
803 tm_file=i386/osfrose.h
806 xm_file=i386/xm-osf.h
807 xmake_file=i386/x-osfrose
808 tmake_file=i386/t-osf
811 i[[345]]86-go32-rtems*)
813 xm_file=i386/xm-go32.h
814 tm_file=i386/go32-rtems.h
815 tmake_file="i386/t-go32 t-rtems"
820 tmake_file="i386/t-i386bare t-rtems"
822 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
823 xm_file=i386/xm-sco5.h
824 xmake_file=i386/x-sco5
825 fixincludes=fixinc.sco
828 tmake_file=i386/t-sco5
829 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
831 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
832 xm_file=i386/xm-sco.h
833 xmake_file=i386/x-sco4
834 fixincludes=fixinc.sco
836 install_headers_dir=install-headers-cpio
837 if [[ x$stabs = xyes ]]
839 tm_file=i386/sco4dbx.h
840 tmake_file=i386/t-svr3dbx
841 extra_parts="svr3.ifile svr3z.rfile"
844 tmake_file=i386/t-crtstuff
845 extra_parts="crtbegin.o crtend.o"
849 i[[3456]]86-*-sco*) # 80386 running SCO system
850 xm_file=i386/xm-sco.h
851 xmake_file=i386/x-sco
853 install_headers_dir=install-headers-cpio
854 if [[ x$stabs = xyes ]]
856 tm_file=i386/scodbx.h
857 tmake_file=i386/t-svr3dbx
858 extra_parts="svr3.ifile svr3z.rfile"
861 extra_parts="crtbegin.o crtend.o"
862 tmake_file=i386/t-crtstuff
866 i[[3456]]86-*-solaris2*)
867 xm_file=i386/xm-sysv4.h
868 if [[ x$stabs = xyes ]]
870 tm_file=i386/sol2dbg.h
874 tmake_file=i386/t-sol2
875 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
877 fixincludes=fixinc.svr4
879 objc_thread_file=${enable_objcthreads-solaris}
881 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
882 xm_file=i386/xm-sysv4.h
884 if [[ x$stabs = xyes ]]
886 tm_file="${tm_file} dbx.h"
888 tmake_file=i386/t-crtpic
890 extra_parts="crtbegin.o crtend.o"
892 i[[3456]]86-*-sysv*) # Intel 80386's running system V
893 xm_file=i386/xm-sysv3.h
894 xmake_file=i386/x-sysv3
895 if [[ x$gas = xyes ]]
897 if [[ x$stabs = xyes ]]
899 tm_file=i386/svr3dbx.h
900 tmake_file=i386/t-svr3dbx
901 extra_parts="svr3.ifile svr3z.rfile"
903 tm_file=i386/svr3gas.h
904 extra_parts="crtbegin.o crtend.o"
905 tmake_file=i386/t-crtstuff
909 extra_parts="crtbegin.o crtend.o"
910 tmake_file=i386/t-crtstuff
913 i386-*-vsta) # Intel 80386's running VSTa kernel
914 xm_file=i386/xm-vsta.h
916 tmake_file=i386/t-vsta
917 xmake_file=i386/x-vsta
919 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
920 xm_file="${xm_file} i386/xm-cygwin32.h"
921 tmake_file=i386/t-cygwin32
922 tm_file=i386/cygwin32.h
923 xmake_file=i386/x-cygwin32
925 fixincludes=Makefile.in
926 objc_thread_file=${enable_objcthreads-win32}
929 i[[3456]]86-*-winnt3*)
930 tm_file=i386/win-nt.h
932 xm_file=i386/xm-winnt.h
933 xmake_file=winnt/x-winnt
934 tmake_file=i386/t-winnt
935 extra_host_objs="winnt.o oldnames.o"
936 extra_gcc_objs="spawnv.o oldnames.o"
937 fixincludes=fixinc.winnt
938 if [[ x$gnu_ld != xyes ]]
940 extra_programs=ld.exe
942 objc_thread_file=${enable_objcthreads-win32}
945 xm_file=i386/xm-dgux.h
948 tmake_file=i386/t-dgux
949 xmake_file=i386/x-dgux
950 fixincludes=fixinc.dgux
951 install_headers_dir=install-headers-cpio
953 i860-alliant-*) # Alliant FX/2800
954 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
955 xm_file="${xm_file} i860/xm-fx2800.h"
956 xmake_file=i860/x-fx2800
957 tmake_file=i860/t-fx2800
958 extra_parts="crtbegin.o crtend.o"
961 tm_file="${tm_file} i860/bsd.h"
962 if [[ x$gas = xyes ]]
964 tm_file="${tm_file} i860/bsd-gas.h"
969 tm_file="${tm_file} i860/mach.h"
972 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
973 tm_file="${tm_file} svr3.h i860/paragon.h"
974 xm_file="${xm_file} xm-svr3.h"
979 tm_file="${tm_file} svr3.h i860/sysv3.h"
980 xm_file="${tm_file} xm-svr3.h"
981 xmake_file=i860/x-sysv3
982 extra_parts="crtbegin.o crtend.o"
985 tm_file="${tm_file} svr4.h i860/sysv4.h"
986 xm_file="${xm_file} xm-svr3.h"
987 xmake_file=i860/x-sysv4
989 extra_parts="crtbegin.o crtend.o"
991 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
992 tm_file="${tm_file} i960/vx960.h"
993 tmake_file=i960/t-vxworks960
997 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
998 tmake_file=i960/t-vxworks960
1002 tm_file="${tm_file} i960/vx960.h"
1003 tmake_file=i960/t-vxworks960
1007 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1008 tmake_file=i960/t-960bare
1012 tmake_file="i960/t-960bare t-rtems"
1013 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1016 i960-*-*) # Default i960 environment.
1020 extra_parts="crtinit.o crtfini.o"
1022 m68000-convergent-sysv*)
1024 xm_file=m68k/xm-3b1.h
1026 extra_headers=math-68881.h
1028 m68000-hp-bsd*) # HP 9000/200 running BSD
1029 tm_file=m68k/hp2bsd.h
1030 xmake_file=m68k/x-hp2bsd
1032 extra_headers=math-68881.h
1034 m68000-hp-hpux*) # HP 9000 series 300
1035 xm_file=m68k/xm-hp320.h
1036 if [[ x$gas = xyes ]]
1038 xmake_file=m68k/x-hp320g
1039 tm_file=m68k/hp310g.h
1041 xmake_file=m68k/x-hp320
1042 tm_file=m68k/hp310.h
1045 install_headers_dir=install-headers-cpio
1047 extra_headers=math-68881.h
1052 extra_headers=math-68881.h
1055 tm_file=m68k/sun2o4.h
1057 extra_headers=math-68881.h
1060 xm_file=m68k/xm-3b1.h
1061 if [[ x$gas = xyes ]]
1068 extra_headers=math-68881.h
1070 m68k-apple-aux*) # Apple Macintosh running A/UX
1071 xm_file=m68k/xm-aux.h
1072 tmake_file=m68k/t-aux
1074 install_headers_dir=install-headers-cpio
1075 extra_headers=math-68881.h
1076 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1078 if [[ "$gnu_ld" = yes ]]
1080 tm_file="${tm_file} m68k/auxgld.h"
1082 tm_file="${tm_file} m68k/auxld.h"
1084 if [[ "$gas" = yes ]]
1086 tm_file="${tm_file} m68k/auxgas.h"
1088 tm_file="${tm_file} m68k/auxas.h"
1090 tm_file="${tm_file} m68k/a-ux.h"
1093 tm_file=m68k/apollo68.h
1094 xmake_file=m68k/x-apollo68
1096 extra_headers=math-68881.h
1098 m68k-altos-sysv*) # Altos 3068
1099 if [[ x$gas = xyes ]]
1101 tm_file=m68k/altos3068.h
1102 xm_file=m68k/xm-altos3068.h
1104 echo "The Altos is supported only with the GNU assembler" 1>&2
1107 extra_headers=math-68881.h
1109 m68k-bull-sysv*) # Bull DPX/2
1110 if [[ x$gas = xyes ]]
1112 if [[ x$stabs = xyes ]]
1114 tm_file=m68k/dpx2cdbx.h
1116 tm_file=m68k/dpx2g.h
1121 xm_file=m68k/xm-m68kv.h
1122 xmake_file=m68k/x-dpx2
1124 extra_headers=math-68881.h
1126 m68k-atari-sysv4*) # Atari variant of V.4.
1127 tm_file=m68k/atari.h
1128 xm_file=m68k/xm-atari.h
1130 extra_parts="crtbegin.o crtend.o"
1131 extra_headers=math-68881.h
1133 m68k-motorola-sysv*)
1134 tm_file=m68k/mot3300.h
1135 xm_file=m68k/xm-mot3300.h
1136 if [[ x$gas = xyes ]]
1138 xmake_file=m68k/x-mot3300-gas
1139 if [[ x$gnu_ld = xyes ]]
1141 tmake_file=m68k/t-mot3300-gald
1143 tmake_file=m68k/t-mot3300-gas
1147 xmake_file=m68k/x-mot3300
1148 if [[ x$gnu_ld = xyes ]]
1150 tmake_file=m68k/t-mot3300-gld
1152 tmake_file=m68k/t-mot3300
1156 gdb_needs_out_file_path=yes
1157 extra_parts="crt0.o mcrt0.o"
1158 extra_headers=math-68881.h
1160 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1161 tm_file=m68k/tower-as.h
1162 xm_file=m68k/xm-tower.h
1163 xmake_file=m68k/x-tower
1164 extra_parts="crtbegin.o crtend.o"
1165 extra_headers=math-68881.h
1168 tm_file=m68k/plexus.h
1169 xm_file=m68k/xm-plexus.h
1171 extra_headers=math-68881.h
1175 xm_file=m68k/xm-m68kv.h
1176 extra_headers=math-68881.h
1179 xm_file=m68k/xm-crds.h
1180 xmake_file=m68k/x-crds
1184 extra_headers=math-68881.h
1186 m68k-cbm-sysv4*) # Commodore variant of V.4.
1188 xm_file=m68k/xm-amix.h
1189 xmake_file=m68k/x-amix
1191 extra_parts="crtbegin.o crtend.o"
1192 extra_headers=math-68881.h
1195 tm_file=m68k/ccur-GAS.h
1196 xmake_file=m68k/x-ccur
1197 extra_headers=math-68881.h
1201 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1202 tm_file=m68k/hp3bsd44.h
1203 xmake_file=m68k/x-hp3bsd44
1205 extra_headers=math-68881.h
1207 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1208 tm_file=m68k/hp3bsd.h
1210 extra_headers=math-68881.h
1213 if [[ x$with_fp = xno ]]
1215 tm_file=m68k/isi-nfp.h
1220 extra_headers=math-68881.h
1222 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1223 xm_file=m68k/xm-hp320.h
1224 if [[ x$gas = xyes ]]
1226 xmake_file=m68k/x-hp320g
1227 tm_file=m68k/hp320g.h
1229 xmake_file=m68k/x-hp320
1230 tm_file=m68k/hpux7.h
1233 install_headers_dir=install-headers-cpio
1235 extra_headers=math-68881.h
1237 m68k-hp-hpux*) # HP 9000 series 300
1238 xm_file=m68k/xm-hp320.h
1239 if [[ x$gas = xyes ]]
1241 xmake_file=m68k/x-hp320g
1242 tm_file=m68k/hp320g.h
1244 xmake_file=m68k/x-hp320
1245 tm_file=m68k/hp320.h
1248 install_headers_dir=install-headers-cpio
1250 extra_headers=math-68881.h
1253 tm_file=m68k/sun3mach.h
1255 extra_headers=math-68881.h
1258 if [[ x$gas = xyes ]]
1260 tm_file=m68k/news3gas.h
1262 tm_file=m68k/news3.h
1265 extra_headers=math-68881.h
1267 m68k-sony-bsd* | m68k-sony-newsos*)
1268 if [[ x$gas = xyes ]]
1270 tm_file=m68k/newsgas.h
1275 extra_headers=math-68881.h
1277 m68k-next-nextstep2*)
1278 tm_file=m68k/next21.h
1279 xm_file=m68k/xm-next.h
1280 tmake_file=m68k/t-next
1281 xmake_file=m68k/x-next
1282 extra_objs=nextstep.o
1283 extra_headers=math-68881.h
1286 m68k-next-nextstep3*)
1288 xm_file=m68k/xm-next.h
1289 tmake_file=m68k/t-next
1290 xmake_file=m68k/x-next
1291 extra_objs=nextstep.o
1292 extra_headers=math-68881.h
1293 objc_thread_file=${enable_objcthreads-mach}
1296 if [[ x$with_fp = xno ]]
1298 tm_file=m68k/sun3n3.h
1300 tm_file=m68k/sun3o3.h
1303 extra_headers=math-68881.h
1305 m68k-sun-sunos*) # For SunOS 4 (the default).
1306 if [[ x$with_fp = xno ]]
1308 tm_file=m68k/sun3n.h
1312 xm_file=m68k/xm-sun3.h
1314 extra_headers=math-68881.h
1317 tm_file=m68k/vxm68k.h
1318 tmake_file=m68k/t-vxworks68
1319 extra_headers=math-68881.h
1322 tmake_file=m68k/t-m68kbare
1323 tm_file="m68k/m68k-aout.h libgloss.h"
1324 extra_headers=math-68881.h
1327 tmake_file=m68k/t-m68kbare
1328 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1329 extra_headers=math-68881.h
1332 if [[ x$gas = xyes ]]
1336 tm_file=m68k/lynx-ng.h
1338 xm_file=m68k/xm-lynx.h
1340 tmake_file=m68k/t-lynx
1341 extra_headers=math-68881.h
1344 tm_file=m68k/netbsd.h
1345 xm_file=m68k/xm-netbsd.h
1346 # On NetBSD, the headers are already okay.
1347 fixincludes=Makefile.in
1350 m68k-*-sysv3*) # Motorola m68k's running system V.3
1351 xm_file=m68k/xm-m68kv.h
1352 xmake_file=m68k/x-m68kv
1353 extra_parts="crtbegin.o crtend.o"
1354 extra_headers=math-68881.h
1356 m68k-*-sysv4*) # Motorola m68k's running system V.4
1357 tm_file=m68k/m68kv4.h
1358 xm_file=m68k/xm-m68kv.h
1360 extra_parts="crtbegin.o crtend.o"
1361 extra_headers=math-68881.h
1363 m68k-*-linux*aout*) # Motorola m68k's running Linux
1364 xm_file=m68k/xm-linux.h # with a.out format
1366 tm_file=m68k/linux-aout.h
1367 tmake_file="t-linux-aout m68k/t-linux-aout"
1368 fixincludes=Makefile.in #On Linux, the headers are ok already.
1369 extra_headers=math-68881.h
1371 objc_thread_file=${enable_objcthreads-single}
1373 m68k-*-linux*) # Motorola m68k's running Linux
1374 xm_file=m68k/xm-linux.h # with ELF format
1376 tm_file=m68k/linux.h
1377 tmake_file="t-linux m68k/t-linux"
1378 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1379 fixincludes=Makefile.in #On Linux, the headers are ok already.
1380 extra_headers=math-68881.h
1382 objc_thread_file=${enable_objcthreads-single}
1385 tmake_file=m68k/t-m68kbare
1386 tm_file=m68k/m68k-psos.h
1387 extra_headers=math-68881.h
1390 tmake_file="m68k/t-m68kbare t-rtems"
1391 tm_file=m68k/rtems.h
1392 extra_headers=math-68881.h
1398 tm_file=m88k/dguxbcs.h
1399 tmake_file=m88k/t-dguxbcs
1403 tmake_file=m88k/t-dgux
1406 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1408 xmake_file=m88k/x-dgux
1409 if [[ x$gas = xyes ]]
1411 tmake_file=m88k/t-dgux-gas
1413 fixincludes=fixinc.dgux
1415 m88k-dolphin-sysv3*)
1416 tm_file=m88k/dolph.h
1417 extra_parts="crtbegin.o crtend.o"
1418 xm_file=m88k/xm-sysv3.h
1419 xmake_file=m88k/x-dolph
1420 if [[ x$gas = xyes ]]
1422 tmake_file=m88k/t-m88k-gas
1425 m88k-tektronix-sysv3)
1426 tm_file=m88k/tekXD88.h
1427 extra_parts="crtbegin.o crtend.o"
1428 xm_file=m88k/xm-sysv3.h
1429 xmake_file=m88k/x-tekXD88
1430 if [[ x$gas = xyes ]]
1432 tmake_file=m88k/t-m88k-gas
1436 tm_file=m88k/m88k-aout.h
1439 tm_file=m88k/m88k-coff.h
1440 tmake_file=m88k/t-bug
1444 extra_parts="crtbegin.o crtend.o"
1445 if [[ x$gas = xyes ]]
1447 tmake_file=m88k/t-luna-gas
1449 tmake_file=m88k/t-luna
1453 tm_file=m88k/sysv3.h
1454 extra_parts="crtbegin.o crtend.o"
1455 xm_file=m88k/xm-sysv3.h
1456 xmake_file=m88k/x-sysv3
1457 if [[ x$gas = xyes ]]
1459 tmake_file=m88k/t-m88k-gas
1463 tm_file=m88k/sysv4.h
1464 extra_parts="crtbegin.o crtend.o"
1465 xmake_file=m88k/x-sysv4
1466 tmake_file=m88k/t-sysv4
1468 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1469 tm_file=mips/iris6.h
1470 xm_file=mips/xm-iris6.h
1472 fixincludes=fixinc.irix
1473 xmake_file=mips/x-iris6
1474 tmake_file=mips/t-iris6
1475 objc_thread_file=${enable_objcthreads-irix}
1477 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1478 tm_file=mips/cross64.h
1479 xm_file=mips/xm-iris5.h
1481 fixincludes=Makefile.in
1482 xmake_file=mips/x-iris
1483 tmake_file=mips/t-cross64
1484 # See comment in mips/iris[56].h files.
1486 objc_thread_file=${enable_objcthreads-irix}
1489 if [[ x$gas = xyes ]]
1491 if [[ x$stabs = xyes ]]
1493 tm_file=mips/iris5gdb.h
1495 tm_file=mips/sni-gas.h
1498 tm_file=mips/sni-svr4.h
1500 xm_file=mips/xm-sysv.h
1501 xmake_file=mips/x-sni-svr4
1502 tmake_file=mips/t-mips-gas
1503 if [[ x$gnu_ld != xyes ]]
1509 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1510 if [[ x$gas = xyes ]]
1512 tm_file=mips/iris5gas.h
1513 if [[ x$stabs = xyes ]]
1515 tm_file="${tm_file} dbx.h"
1518 tm_file=mips/iris5.h
1520 xm_file=mips/xm-iris5.h
1522 fixincludes=fixinc.irix
1523 xmake_file=mips/x-iris
1524 # mips-tfile doesn't work yet
1525 tmake_file=mips/t-mips-gas
1526 # See comment in mips/iris5.h file.
1528 objc_thread_file=${enable_objcthreads-irix}
1530 mips-sgi-irix4loser*) # Mostly like a MIPS.
1531 tm_file=mips/iris4loser.h
1532 if [[ x$stabs = xyes ]]; then
1533 tm_file="${tm_file} dbx.h"
1535 xm_file=mips/xm-iris4.h
1537 xmake_file=mips/x-iris
1538 if [[ x$gas = xyes ]]
1540 tmake_file=mips/t-mips-gas
1542 extra_passes="mips-tfile mips-tdump"
1544 if [[ x$gnu_ld != xyes ]]
1548 objc_thread_file=${enable_objcthreads-irix}
1550 mips-sgi-irix4*) # Mostly like a MIPS.
1551 tm_file=mips/iris4.h
1552 if [[ x$stabs = xyes ]]; then
1553 tm_file="${tm_file} dbx.h"
1555 xm_file=mips/xm-iris4.h
1557 xmake_file=mips/x-iris
1558 if [[ x$gas = xyes ]]
1560 tmake_file=mips/t-mips-gas
1562 extra_passes="mips-tfile mips-tdump"
1564 if [[ x$gnu_ld != xyes ]]
1568 objc_thread_file=${enable_objcthreads-irix}
1570 mips-sgi-*) # Mostly like a MIPS.
1571 tm_file=mips/iris3.h
1572 if [[ x$stabs = xyes ]]; then
1573 tm_file="${tm_file} dbx.h"
1575 xm_file=mips/xm-iris3.h
1577 xmake_file=mips/x-iris3
1578 if [[ x$gas = xyes ]]
1580 tmake_file=mips/t-mips-gas
1582 extra_passes="mips-tfile mips-tdump"
1584 if [[ x$gnu_ld != xyes ]]
1589 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1590 tm_file=mips/osfrose.h
1591 xmake_file=mips/x-osfrose
1592 tmake_file=mips/t-osfrose
1593 extra_objs=halfpic.o
1596 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1597 tm_file=mips/dec-osf1.h
1598 if [[ x$stabs = xyes ]]; then
1599 tm_file="${tm_file} dbx.h"
1601 xmake_file=mips/x-dec-osf1
1602 if [[ x$gas = xyes ]]
1604 tmake_file=mips/t-mips-gas
1606 tmake_file=mips/t-ultrix
1607 extra_passes="mips-tfile mips-tdump"
1609 if [[ x$gnu_ld != xyes ]]
1614 mips-dec-bsd*) # Decstation running 4.4 BSD
1615 tm_file=mips/dec-bsd.h
1617 if [[ x$gas = xyes ]]
1619 tmake_file=mips/t-mips-gas
1621 tmake_file=mips/t-ultrix
1622 extra_passes="mips-tfile mips-tdump"
1624 if [[ x$gnu_ld != xyes ]]
1629 mips-dec-netbsd*) # Decstation running NetBSD
1630 tm_file=mips/netbsd.h
1631 xm_file=mips/xm-netbsd.h
1632 # On NetBSD, the headers are already okay.
1633 fixincludes=Makefile.in
1635 if [[ x$prefix = xNONE ]]; then
1636 prefix=$native_prefix
1638 prefix=$native_prefix
1640 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1641 tm_file=mips/news4.h
1642 if [[ x$stabs = xyes ]]; then
1643 tm_file="${tm_file} dbx.h"
1645 if [[ x$gas = xyes ]]
1647 tmake_file=mips/t-mips-gas
1649 extra_passes="mips-tfile mips-tdump"
1651 if [[ x$gnu_ld != xyes ]]
1655 xmake_file=mips/x-sony
1657 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1658 # That is based on svr4.
1659 # t-svr4 is not right because this system doesn't use ELF.
1660 tm_file=mips/news5.h
1661 if [[ x$stabs = xyes ]]; then
1662 tm_file="${tm_file} dbx.h"
1664 xm_file=mips/xm-news.h
1665 if [[ x$gas = xyes ]]
1667 tmake_file=mips/t-mips-gas
1669 extra_passes="mips-tfile mips-tdump"
1671 if [[ x$gnu_ld != xyes ]]
1676 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1677 tm_file=mips/svr4-t.h
1678 if [[ x$stabs = xyes ]]; then
1679 tm_file="${tm_file} dbx.h"
1681 xm_file=mips/xm-sysv4.h
1682 xmake_file=mips/x-sysv
1683 if [[ x$gas = xyes ]]
1685 tmake_file=mips/t-mips-gas
1686 extra_parts="crtbegin.o crtend.o"
1688 tmake_file=mips/t-mips
1689 extra_passes="mips-tfile mips-tdump"
1691 if [[ x$gnu_ld != xyes ]]
1697 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1698 tm_file=mips/ultrix.h
1699 if [[ x$stabs = xyes ]]; then
1700 tm_file="${tm_file} dbx.h"
1702 xmake_file=mips/x-ultrix
1703 if [[ x$gas = xyes ]]
1705 tmake_file=mips/t-mips-gas
1707 tmake_file=mips/t-ultrix
1708 extra_passes="mips-tfile mips-tdump"
1710 if [[ x$gnu_ld != xyes ]]
1715 mips-*-riscos[[56789]]bsd*)
1716 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1717 if [[ x$stabs = xyes ]]; then
1718 tm_file="${tm_file} dbx.h"
1720 if [[ x$gas = xyes ]]
1722 tmake_file=mips/t-bsd-gas
1724 tmake_file=mips/t-bsd
1725 extra_passes="mips-tfile mips-tdump"
1727 if [[ x$gnu_ld != xyes ]]
1733 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1734 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1735 if [[ x$stabs = xyes ]]; then
1736 tm_file="${tm_file} dbx.h"
1738 if [[ x$gas = xyes ]]
1740 tmake_file=mips/t-bsd-gas
1742 tmake_file=mips/t-bsd
1743 extra_passes="mips-tfile mips-tdump"
1745 if [[ x$gnu_ld != xyes ]]
1751 mips-*-riscos[[56789]]sysv4*)
1752 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1753 if [[ x$stabs = xyes ]]; then
1754 tm_file="${tm_file} dbx.h"
1756 xm_file=mips/xm-sysv4.h
1757 xmake_file=mips/x-sysv
1758 if [[ x$gas = xyes ]]
1760 tmake_file=mips/t-svr4-gas
1762 tmake_file=mips/t-svr4
1763 extra_passes="mips-tfile mips-tdump"
1765 if [[ x$gnu_ld != xyes ]]
1771 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1772 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1773 if [[ x$stabs = xyes ]]; then
1774 tm_file="${tm_file} dbx.h"
1776 xm_file=mips/xm-sysv.h
1777 xmake_file=mips/x-sysv
1778 if [[ x$gas = xyes ]]
1780 tmake_file=mips/t-svr4-gas
1782 tmake_file=mips/t-svr4
1783 extra_passes="mips-tfile mips-tdump"
1785 if [[ x$gnu_ld != xyes ]]
1791 mips-*-riscos[[56789]]sysv*)
1792 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1793 if [[ x$stabs = xyes ]]; then
1794 tm_file="${tm_file} dbx.h"
1796 xm_file=mips/xm-sysv.h
1797 xmake_file=mips/x-sysv
1798 if [[ x$gas = xyes ]]
1800 tmake_file=mips/t-svr3-gas
1802 tmake_file=mips/t-svr3
1803 extra_passes="mips-tfile mips-tdump"
1805 if [[ x$gnu_ld != xyes ]]
1811 mips-*-sysv* | mips-*-riscos*sysv*)
1812 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1813 if [[ x$stabs = xyes ]]; then
1814 tm_file="${tm_file} dbx.h"
1816 xm_file=mips/xm-sysv.h
1817 xmake_file=mips/x-sysv
1818 if [[ x$gas = xyes ]]
1820 tmake_file=mips/t-svr3-gas
1822 tmake_file=mips/t-svr3
1823 extra_passes="mips-tfile mips-tdump"
1825 if [[ x$gnu_ld != xyes ]]
1831 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1832 tm_file=mips/mips-5.h
1833 if [[ x$stabs = xyes ]]; then
1834 tm_file="${tm_file} dbx.h"
1836 if [[ x$gas = xyes ]]
1838 tmake_file=mips/t-mips-gas
1840 extra_passes="mips-tfile mips-tdump"
1842 if [[ x$gnu_ld != xyes ]]
1851 tm_file=mips/ecoffl.h
1852 if [[ x$stabs = xyes ]]; then
1853 tm_file="${tm_file} dbx.h"
1855 tmake_file=mips/t-ecoff
1858 tm_file=mips/ecoff.h
1859 if [[ x$stabs = xyes ]]; then
1860 tm_file="${tm_file} dbx.h"
1862 tmake_file=mips/t-ecoff
1866 tm_file="mips/elfl.h libgloss.h"
1867 tmake_file=mips/t-ecoff
1870 tm_file="mips/elf.h libgloss.h"
1871 tmake_file=mips/t-ecoff
1874 tm_file="mips/elfl64.h libgloss.h"
1875 tmake_file=mips/t-ecoff
1877 mips64orionel-*-elf*)
1878 tm_file="mips/elflorion.h libgloss.h"
1879 tmake_file=mips/t-ecoff
1882 tm_file="mips/elf64.h libgloss.h"
1883 tmake_file=mips/t-ecoff
1886 tm_file="mips/elforion.h libgloss.h"
1887 tmake_file=mips/t-ecoff
1889 mips64orion-*-rtems*)
1890 tm_file=mips/rtems64.h
1891 tmake_file="mips/t-ecoff t-rtems"
1893 mips-*-*) # Default MIPS RISC-OS 4.0.
1894 if [[ x$stabs = xyes ]]; then
1895 tm_file="${tm_file} dbx.h"
1897 if [[ x$gas = xyes ]]
1899 tmake_file=mips/t-mips-gas
1901 extra_passes="mips-tfile mips-tdump"
1903 if [[ x$gnu_ld != xyes ]]
1910 tm_file="mn10200/mn10200.h"
1911 if [[ x$stabs = xyes ]]
1913 tm_file="${tm_file} dbx.h"
1919 tm_file="mn10300/mn10300.h"
1920 if [[ x$stabs = xyes ]]
1922 tm_file="${tm_file} dbx.h"
1927 tm_file=ns32k/encore.h
1931 tm_file=ns32k/sequent.h
1935 tm_file=ns32k/tek6100.h
1940 tm_file=ns32k/tek6200.h
1944 # This has not been updated to GCC 2.
1946 # xm_file=ns32k/xm-genix.h
1947 # xmake_file=ns32k/x-genix
1948 # tm_file=ns32k/genix.h
1949 # broken_install=yes
1953 tm_file=ns32k/merlin.h
1957 tm_file=ns32k/pc532-mach.h
1961 tm_file=ns32k/pc532-min.h
1962 xm_file=ns32k/xm-pc532-min.h
1965 ns32k-pc532-netbsd*)
1966 tm_file=ns32k/netbsd.h
1967 xm_file=ns32k/xm-netbsd.h
1968 # On NetBSD, the headers are already okay.
1969 fixincludes=Makefile.in
1973 tm_file="${tm_file} pdp11/2bsd.h"
1979 xmake_file=pyr/x-pyr
1986 xmake_file=romp/x-mach
1989 powerpc-*-sysv* | powerpc-*-elf*)
1990 tm_file=rs6000/sysv4.h
1991 xm_file=rs6000/xm-sysv4.h
1992 extra_headers=ppc-asm.h
1993 if [[ x$gas = xyes ]]
1995 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
1997 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
1999 xmake_file=rs6000/x-sysv4
2002 tm_file=rs6000/eabiaix.h
2003 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2004 fixincludes=Makefile.in
2005 extra_headers=ppc-asm.h
2008 tm_file=rs6000/eabisim.h
2009 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2010 fixincludes=Makefile.in
2011 extra_headers=ppc-asm.h
2014 tm_file=rs6000/eabi.h
2015 if [[ x$gas = xyes ]]
2017 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2019 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2021 fixincludes=Makefile.in
2022 extra_headers=ppc-asm.h
2025 tm_file=rs6000/rtems.h
2026 if [[ x$gas = xyes ]]
2028 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2030 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2032 fixincludes=Makefile.in
2033 extra_headers=ppc-asm.h
2036 tm_file=rs6000/linux.h
2037 xm_file=rs6000/xm-sysv4.h
2038 out_file=rs6000/rs6000.c
2039 if [[ x$gas = xyes ]]
2041 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2043 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2045 xmake_file=rs6000/x-sysv4
2046 fixincludes=Makefile.in
2047 objc_thread_file=${enable_objcthreads-single}
2048 extra_headers=ppc-asm.h
2052 xm_file=rs6000/xm-sysv4.h
2053 tm_file=rs6000/vxppc.h
2054 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2055 extra_headers=ppc-asm.h
2057 powerpcle-*-sysv* | powerpcle-*-elf*)
2058 tm_file=rs6000/sysv4le.h
2059 xm_file=rs6000/xm-sysv4.h
2060 if [[ x$gas = xyes ]]
2062 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2064 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2066 xmake_file=rs6000/x-sysv4
2067 extra_headers=ppc-asm.h
2069 powerpcle-*-eabisim*)
2070 tm_file=rs6000/eabilesim.h
2071 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2072 fixincludes=Makefile.in
2073 extra_headers=ppc-asm.h
2076 tm_file=rs6000/eabile.h
2077 if [[ x$gas = xyes ]]
2079 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2081 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2083 fixincludes=Makefile.in
2084 extra_headers=ppc-asm.h
2086 powerpcle-*-winnt* )
2087 tm_file=rs6000/win-nt.h
2088 tmake_file=rs6000/t-winnt
2090 fixincludes=Makefile.in
2091 objc_thread_file=${enable_objcthreads-win32}
2092 extra_headers=ppc-asm.h
2094 powerpcle-*-pe | powerpcle-*-cygwin32)
2095 tm_file=rs6000/cygwin32.h
2096 xm_file=rs6000/xm-cygwin32.h
2097 tmake_file=rs6000/t-winnt
2098 xmake_file=rs6000/x-cygwin32
2100 fixincludes=Makefile.in
2101 objc_thread_file=${enable_objcthreads-win32}
2103 extra_headers=ppc-asm.h
2105 powerpcle-*-solaris2*)
2106 tm_file=rs6000/sol2.h
2107 xm_file=rs6000/xm-sysv4.h
2108 if [[ x$gas = xyes ]]
2110 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2112 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2114 xmake_file=rs6000/x-sysv4
2115 fixincludes=fixinc.svr4
2116 extra_headers=ppc-asm.h
2118 rs6000-ibm-aix3.[[01]]*)
2119 tm_file=rs6000/aix31.h
2120 xmake_file=rs6000/x-aix31
2123 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2124 tm_file=rs6000/aix3newas.h
2125 if [[ x$host != x$target ]]
2127 tmake_file=rs6000/t-xnewas
2129 tmake_file=rs6000/t-newas
2133 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2134 tm_file=rs6000/aix41.h
2135 if [[ x$host != x$target ]]
2137 tmake_file=rs6000/t-xnewas
2139 tmake_file=rs6000/t-newas
2141 xmake_file=rs6000/x-aix31
2151 tm_file=rs6000/mach.h
2152 xm_file=rs6000/xm-mach.h
2153 xmake_file=rs6000/x-mach
2157 tm_file=rs6000/lynx.h
2158 xm_file=rs6000/xm-lynx.h
2159 tmake_file=rs6000/t-rs6000
2160 xmake_file=rs6000/x-lynx
2172 xm_file=sparc/xm-pbd.h
2174 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2175 tm_file=sparc/vxsparc.h
2176 tmake_file=sparc/t-vxsparc
2180 tmake_file=sparc/t-sparcbare
2181 tm_file="sparc/aout.h libgloss.h"
2184 tm_file=sparc/netbsd.h
2185 xm_file=sparc/xm-netbsd.h
2186 # On NetBSD, the headers are already okay.
2187 fixincludes=Makefile.in
2193 sparc-*-linux*aout*) # Sparc's running Linux, a.out
2194 xm_file=sparc/xm-linux.h
2195 tm_file=sparc/linux-aout.h
2197 fixincludes=Makefile.in #On Linux, the headers are ok already.
2200 objc_thread_file=${enable_objcthreads-single}
2202 sparc-*-linux*) # Sparc's running Linux, ELF
2203 xm_file=sparc/xm-linux.h
2204 tm_file=sparc/linux.h
2206 fixincludes=Makefile.in #On Linux, the headers are ok already.
2209 # Don't use it. Linux uses a slightly different one.
2210 # The real one comes with the Linux C library.
2211 #extra_parts="crtbegin.o crtend.o"
2212 objc_thread_file=${enable_objcthreads-single}
2215 if [[ x$gas = xyes ]]
2217 tm_file=sparc/lynx.h
2219 tm_file=sparc/lynx-ng.h
2221 xm_file=sparc/xm-lynx.h
2222 tmake_file=sparc/t-sunos41
2226 tmake_file="sparc/t-sparcbare t-rtems"
2227 tm_file=sparc/rtems.h
2230 tm_file=sparc/sol2.h
2231 xm_file=sparc/xm-sol2.h
2232 tmake_file=sparc/t-sol2
2233 xmake_file=sparc/x-sysv4
2234 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2235 fixincludes=fixinc.svr4
2237 objc_thread_file=${enable_objcthreads-solaris}
2240 tm_file=sparc/sunos4.h
2241 tmake_file=sparc/t-sunos40
2245 tm_file=sparc/sunos4.h
2246 tmake_file=sparc/t-sunos41
2250 tm_file=sparc/sun4o3.h
2254 tm_file=sparc/sysv4.h
2255 xm_file=sparc/xm-sysv4.h
2257 xmake_file=sparc/x-sysv4
2258 extra_parts="crtbegin.o crtend.o"
2261 xm_file=sparc/xm-sol2.h
2262 tm_file=sparc/vxsim.h
2263 tmake_file=sparc/t-vxsparc
2264 xmake_file=sparc/x-sysv4
2267 tm_file="sparc/splet.h libgloss.h"
2268 tmake_file=sparc/t-splet
2271 tm_file="sparc/litecoff.h libgloss.h"
2272 tmake_file=sparc/t-sparclite
2275 tm_file="sparc/lite.h aoutos.h libgloss.h"
2276 tmake_file=sparc/t-sparclite
2279 tmake_file=sparc/t-sp64
2280 tm_file=sparc/sp64-aout.h
2283 tmake_file=sparc/t-sp64
2284 tm_file=sparc/sp64-elf.h
2285 extra_parts="crtbegin.o crtend.o"
2287 # This hasn't been upgraded to GCC 2.
2288 # tahoe-harris-*) # Harris tahoe, using COFF.
2289 # tm_file=tahoe/harris.h
2291 # tahoe-*-bsd*) # tahoe running BSD
2293 # This hasn't been upgraded to GCC 2.
2298 vax-*-bsd*) # vaxen running BSD
2302 vax-*-sysv*) # vaxen running system V
2303 tm_file="${tm_file} vax/vaxv.h"
2304 xm_file="${tm_file} vax/xm-vaxv.h"
2308 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2309 xm_file="${xm_file} xm-netbsd.h"
2310 # On NetBSD, the headers are already okay.
2311 fixincludes=Makefile.in
2315 vax-*-ultrix*) # vaxen running ultrix
2316 tm_file="${tm_file} vax/ultrix.h"
2320 vax-*-vms*) # vaxen running VMS
2321 xm_file=vax/xm-vms.h
2325 vax-*-*) # vax default entry
2329 xm_file="${xm_file} xm-svr3"
2333 echo "Configuration $machine not supported" 1>&2
2340 ;; # Existing Linux/GNU systems do not use the GNU setup.
2342 # On the GNU system, the setup is just about the same on
2343 # each different CPU. The specific machines that GNU
2344 # supports are matched above and just set $cpu_type.
2345 xm_file=${cpu_type}/xm-gnu.h
2346 tm_file=${cpu_type}/gnu.h
2347 extra_parts="crtbegin.o crtend.o"
2348 # GNU always uses ELF.
2350 # GNU tools are the only tools.
2353 # On GNU, the headers are already okay.
2354 fixincludes=Makefile.in
2355 xmake_file=x-linux # These details are the same as Linux.
2356 tmake_file=t-gnu # These are not.
2359 fixincludes=fixinc.svr4
2360 xmake_try_sysv=x-sysv
2362 install_headers_dir=install-headers-cpio
2366 install_headers_dir=install-headers-cpio
2370 # Distinguish i[3456]86
2371 # Also, do not run mips-tfile on MIPS if using gas.
2372 # Process --with-cpu= for PowerPC/rs6000
2373 target_cpu_default2=
2376 target_cpu_default2=1
2379 target_cpu_default2=2
2382 target_cpu_default2=3
2385 if [[ x$gas = xyes ]]
2387 target_cpu_default2=4
2390 mips*-*-ecoff* | mips*-*-elf*)
2391 if [[ x$gas = xyes ]]
2393 if [[ x$gnu_ld = xyes ]]
2395 target_cpu_default2=20
2397 target_cpu_default2=16
2402 if [[ x$gas = xyes ]]
2404 target_cpu_default2=16
2407 powerpc*-*-* | rs6000-*-*)
2408 case "x$with_cpu" in
2412 xcommon | xpower | xpower2 | xpowerpc | xrios \
2413 | xrios1 | xrios2 | xrsc | xrsc1 \
2414 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2415 | x403 | x505 | x801 | x821 | x823 | x860)
2416 target_cpu_default2="'\"$with_cpu\"'"
2420 echo "--with-cpu must be passed a value" 1>&2
2425 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2431 case ".$with_cpu" in
2433 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2435 .supersparc | .ultrasparc | .v7 | .v8)
2436 target_cpu_default2="TARGET_CPU_$with_cpu"
2439 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2446 if [[ x$target_cpu_default2 != x ]]
2448 if [[ x$target_cpu_default != x ]]
2450 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2452 target_cpu_default=$target_cpu_default2
2456 # No need for collect2 if we have the GNU linker.
2463 # Save data on machine being used to compile GCC in build_xm_file.
2464 # Save data on host machine in vars host_xm_file and host_xmake_file.
2465 if [[ x$pass1done = x ]]
2467 if [[ x"$xm_file" = x ]]
2468 then build_xm_file=$cpu_type/xm-$cpu_type.h
2469 else build_xm_file=$xm_file
2471 build_broken_install=$broken_install
2472 build_install_headers_dir=$install_headers_dir
2473 build_exeext=$exeext
2476 if [[ x$pass2done = x ]]
2478 if [[ x"$xm_file" = x ]]
2479 then host_xm_file=$cpu_type/xm-$cpu_type.h
2480 else host_xm_file=$xm_file
2482 if [[ x"$xmake_file" = x ]]
2483 then xmake_file=$cpu_type/x-$cpu_type
2485 host_xmake_file="$xmake_file"
2486 host_truncate_target=$truncate_target
2487 host_extra_gcc_objs=$extra_gcc_objs
2488 host_extra_objs=$extra_host_objs
2494 extra_objs="${host_extra_objs} ${extra_objs}"
2496 # Default the target-machine variables that were not explicitly set.
2497 if [[ x"$tm_file" = x ]]
2498 then tm_file=$cpu_type/$cpu_type.h; fi
2500 if [[ x$extra_headers = x ]]
2501 then extra_headers=; fi
2503 if [[ x"$xm_file" = x ]]
2504 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2506 md_file=$cpu_type/$cpu_type.md
2508 if [[ x$out_file = x ]]
2509 then out_file=$cpu_type/$cpu_type.c; fi
2511 if [[ x"$tmake_file" = x ]]
2512 then tmake_file=$cpu_type/t-$cpu_type
2515 if [[ x$float_format = x ]]
2516 then float_format=i64
2519 # Say what files are being used for the output code and MD file.
2520 echo "Using \`$srcdir/config/$out_file' to output insns."
2521 echo "Using \`$srcdir/config/$md_file' as machine description file."
2524 for f in $tm_file; do
2527 if [[ $count = ax ]]; then
2528 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2530 echo "Using the following target machine macro files:"
2531 for f in $tm_file; do
2532 echo " $srcdir/config/$f"
2537 for f in $host_xm_file; do
2540 if [[ $count = ax ]]; then
2541 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2543 echo "Using the following host machine macro files:"
2544 for f in $host_xm_file; do
2545 echo " $srcdir/config/$f"
2549 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2551 for f in $build_xm_file; do
2554 if [[ $count = ax ]]; then
2555 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2557 echo "Using the following build machine macro files:"
2558 for f in $build_xm_file; do
2559 echo " $srcdir/config/$f"
2564 if [[ x$objc_thread_file = x ]]
2565 then objc_thread_file=${enable_objcthreads-single}
2567 echo "Using \`$srcdir/objc/thr-${objc_thread_file}.c' as Objective-C Runtime thread file."
2569 # Set up the header files.
2570 # $links is the list of header files to create.
2571 # $vars is the list of shell variables with file names to include.
2572 vars="host_xm_file tm_file xm_file build_xm_file"
2573 links="config.h tm.h tconfig.h hconfig.h"
2576 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2579 while [[ -n "$vars" ]]
2581 # set file to car of files, files to cdr of files
2582 set $vars; var=$1; shift; vars=$*
2583 set $links; link=$1; shift; links=$*
2587 # Define TARGET_CPU_DEFAULT if the system wants one.
2588 # This substitutes for lots of *.h files.
2589 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2591 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2594 for file in `eval echo '$'$var`; do
2595 echo "#include \"$file\"" >>$link
2599 # Truncate the target if necessary
2600 if [[ x$host_truncate_target != x ]]; then
2601 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2604 # Get the version number from the toplevel
2605 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2607 # For the current directory and all of the language subdirectories,
2608 # do the rest of the script ...
2611 for lang in ${srcdir}/*/config-lang.in ..
2615 # The odd quoting in the next line works around
2616 # an apparent bug in bash 1.12 on linux.
2617 ${srcdir}/[[*]]/config-lang.in) ;;
2618 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2622 # Are we using gcc as the native compiler?
2624 *linux*) # All Linux's use gcc as the native compiler.
2625 if [[ x$prefix = xNONE ]]; then
2626 prefix=$native_prefix
2631 # Make empty files to contain the specs and options for each language.
2632 # Then add #include lines to for a compiler that has specs and/or options.
2636 rm -f specs.h options.h
2637 touch specs.h options.h
2638 for subdir in . $subdirs
2640 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2641 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2642 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2644 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2645 echo "#include \"$subdir/lang-options.h\"" >>options.h
2646 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2650 # Get an absolute path to the GCC top-level source directory
2656 # These (without "all_") are set in each config-lang.in.
2657 # `language' must be a single word so is spelled singularly.
2663 # List of language makefile fragments.
2668 rm -f Make-host Make-target Make-hooks
2672 host_overrides="Make-host"
2673 target_overrides="Make-target"
2674 cross_overrides="/dev/null"
2675 build_overrides="/dev/null"
2676 language_fragments="Make-lang"
2677 language_hooks="Make-hooks"
2680 for subdir in . $subdirs
2682 oldsrcdir=$savesrcdir
2684 # Re-adjust the path
2692 srcdir=$oldsrcdir/$subdir
2701 oldsrcdir=../${oldsrcdir}
2702 srcdir=$oldsrcdir/$subdir
2707 mainsrcdir=$oldsrcdir
2709 test -d $subdir || mkdir $subdir
2712 # Conditionalize the makefile for this host machine.
2713 dep_host_xmake_file=
2715 for f in .. ${host_xmake_file}
2717 if [[ -f ${mainsrcdir}/config/$f ]]
2719 cat ${mainsrcdir}/config/$f >> Make-host
2720 dep_host_xmake_file="${dep_host_xmake_file} \$(srcdir)/config/$f"
2724 # Set EXTRA_HEADERS according to extra_headers.
2725 # This substitutes for lots of t-* files.
2727 if [[ "x$extra_headers" = x ]]
2730 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2731 for file in $extra_headers;
2733 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2737 # Add a definition of USE_COLLECT2 if system wants one.
2738 # Also tell toplev.c what to do.
2739 # This substitutes for lots of t-* files.
2740 if [[ x$use_collect2 = x ]]
2745 will_use_collect2="ld"
2746 maybe_use_collect2="-DUSE_COLLECT2"
2750 # Set MD_DEPS if the real md file is in md.pre-cpp.
2751 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2752 # for line oriented comments, so we must always use a GNU cpp. If
2753 # building gcc with a cross compiler, use the cross compiler just
2754 # built. Otherwise, we can use the cpp just built.
2756 if [[ "x$md_cppflags" = x ]]
2758 md_file_sub=$srcdir/config/$md_file
2763 # If we have gas in the build tree, make a link to it.
2764 if [[ -f ../gas/Makefile ]]; then
2765 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2768 # If we have ld in the build tree, make a link to it.
2769 if [[ -f ../ld/Makefile ]]; then
2770 if [[ x$use_collect2 = x ]]; then
2771 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2773 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2777 # Conditionalize the makefile for this target machine.
2780 for f in .. ${tmake_file}
2782 if [[ -f ${mainsrcdir}/config/$f ]]
2784 cat ${mainsrcdir}/config/$f >> Make-target
2785 dep_tmake_file="${dep_tmake_file} \$(srcdir)/config/$f"
2789 # If this is the top level Makefile, add the language fragments.
2790 # Languages are added via two mechanisms. Some information must be
2791 # recorded in makefile variables, these are defined in config-lang.in.
2792 # We accumulate them and plug them into the main Makefile.
2793 # The other mechanism is a set of hooks for each of the main targets
2794 # like `clean', `install', etc.
2795 if [[ $subdir = . ]]
2797 for s in .. $subdirs
2806 . ${mainsrcdir}/$s/config-lang.in
2807 if [[ "x$language" = x ]]
2809 echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2812 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
2813 all_languages="$all_languages $language"
2814 if [[ "x$boot_language" = xyes ]]
2816 all_boot_languages="$all_boot_languages $language"
2818 all_compilers="$all_compilers $compilers"
2819 all_stagestuff="$all_stagestuff $stagestuff"
2820 all_diff_excludes="$all_diff_excludes $diff_excludes"
2821 all_headers="$all_headers $headers"
2822 all_lib2funcs="$all_lib2funcs $lib2funcs"
2826 # Since we can't use `::' targets, we link each language in
2827 # with a set of hooks, reached indirectly via lang.${target}.
2829 target_list="all.build all.cross start.encap rest.encap \
2831 install-normal install-common install-info install-man \
2833 mostlyclean clean distclean extraclean maintainer-clean \
2834 stage1 stage2 stage3 stage4"
2835 for t in $target_list
2838 for l in .. $all_languages
2840 if [[ $l != ".." ]]; then
2844 echo "lang.$t: $x" >> Make-hooks
2847 # If the host doesn't support symlinks, modify CC in
2848 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2849 # Otherwise, we can use "CC=$(CC)".
2851 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2853 cc_set_by_configure="\$(CC)"
2854 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2856 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`,"
2858 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`,"
2861 # Otherwise, this is a language subdirectory. If the host supports
2862 # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
2863 # installation procedure can still use CC="stage1/xgcc -Bstage1/".
2864 # If the host doesn't support symlinks, FLAGS_TO_PASS has been
2865 # modified to solve the problem there.
2867 for t in stage1 stage2 stage3 stage4 include
2870 $symbolic_link ../$t $t 2>/dev/null
2874 out_object_file=`basename $out_file .c`.o
2876 if [[ $subdir = . ]]
2879 for f in $tm_file; do
2880 tm_file_list="${tm_file_sub} \$(srcdir)/config/$f"
2884 for f in $host_xm_file; do
2885 host_xm_file_list="${host_xm_file_sub} \$(srcdir)/config/$f"
2889 for f in $build_xm_file; do
2890 build_xm_file_list="${build_xm_file_sub} \$(srcdir)/config/$f"
2894 # Remove all formfeeds, since some Makes get confused by them.
2895 # Also arrange to give the variables `target', `host_xmake_file',
2896 # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
2897 # `out_file', `out_object', `md_file', `lang_specs_files',
2898 # `lang_options_files', `INSTALL_HEADERS_DIR', and `CROSS_FLOAT_H'
2899 # values in the Makefile from the values they have in this script.
2902 for f in $tm_file; do
2903 tm_file_sub="${tm_file_sub} ${srcdir}/config/$f"
2907 for f in $host_xm_file; do
2908 host_xm_file_sub="${host_xm_file_sub} ${srcdir}/config/$f"
2912 for f in $build_xm_file; do
2913 build_xm_file_sub="${build_xm_file_sub} ${srcdir}/config/$f"
2916 # Define macro CROSS_COMPILE in compilation
2917 # if this is a cross-compiler.
2918 # Also use all.cross instead of all.internal
2919 # and add cross-make to Makefile.
2920 if [[ x$host != x$target ]]
2922 cross_defines="CROSS=-DCROSS_COMPILE"
2923 cross_overrides="${topdir}/cross-make"
2926 # When building gcc with a cross-compiler, we need to fix a few things.
2927 # This must come after cross-make as we want all.build to override
2929 if [[ x$build != x$host ]]
2931 build_overrides="${topdir}/build-make"
2935 done # end of current-dir SUBDIRS loop
2939 # Process the language fragments
2940 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs"
2942 # Substitute configuration variables
2944 AC_SUBST(all_languages)
2945 AC_SUBST(all_boot_languages)
2946 AC_SUBST(all_compilers)
2947 AC_SUBST(all_lang_makefiles)
2948 AC_SUBST(all_stagestuff)
2949 AC_SUBST(all_diff_excludes)
2950 AC_SUBST(all_lib2funcs)
2951 AC_SUBST(all_headers)
2952 AC_SUBST(extra_passes)
2953 AC_SUBST(extra_programs)
2954 AC_SUBST(extra_parts)
2955 AC_SUBST(extra_objs)
2956 AC_SUBST(host_extra_gcc_objs)
2957 AC_SUBST(extra_headers_list)
2958 AC_SUBST(dep_host_xmake_file)
2959 AC_SUBST(dep_tmake_file)
2961 AC_SUBST(out_object_file)
2963 AC_SUBST(tm_file_list)
2964 AC_SUBST(build_xm_file_list)
2965 AC_SUBST(host_xm_file_list)
2966 AC_SUBST(lang_specs_files)
2967 AC_SUBST(lang_options_files)
2968 AC_SUBST(objc_thread_file)
2970 AC_SUBST(local_prefix)
2971 AC_SUBST(gxx_include_dir)
2972 AC_SUBST(fixincludes)
2973 AC_SUBST(build_install_headers_dir)
2975 AC_SUBST(float_format)
2976 AC_SUBST(will_use_collect2)
2977 AC_SUBST(maybe_use_collect2)
2978 AC_SUBST(cc_set_by_configure)
2979 AC_SUBST(stage_prefix_set_by_configure)
2981 AC_SUBST_FILE(target_overrides)
2982 AC_SUBST_FILE(host_overrides)
2983 AC_SUBST(cross_defines)
2984 AC_SUBST_FILE(cross_overrides)
2985 AC_SUBST_FILE(build_overrides)
2986 AC_SUBST_FILE(language_fragments)
2987 AC_SUBST_FILE(language_hooks)
2989 # Echo that links are built
2990 if [[ x$host = x$target ]]
2998 if [[ x$host != x$build ]]
3000 str3=" on a $build system"
3003 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3008 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3010 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3012 echo " ${str2}${str3}." 1>&2
3015 # Configure the subdirectories
3016 # AC_CONFIG_SUBDIRS($subdirs)
3018 # Create the Makefile
3019 # and configure language subdirectories
3021 . $srcdir/configure.lang,
3025 target_alias='${target_alias}'
3027 subdirs='${subdirs}'
3028 symbolic_link='${symbolic_link}'
3029 program_transform_set='${program_transform_set}'
3030 program_transform_name='${program_transform_name}'
3031 all_languages='${all_languages}'
3032 all_boot_languages='${all_boot_languages}'
3033 all_compilers='${all_compilers}'
3034 all_lang_makefiles='${all_lang_makefiles}'
3035 all_stagestuff='${all_stagestuff}'
3036 all_diff_excludes='${all_diff_excludes}'
3037 all_lib2funcs='${all_lib2funcs}'
3038 all_headers='${all_headers}'
3039 extra_headers='${extra_headers}'
3040 extra_passes='${extra_passes}'
3041 extra_programs='${extra_programs}'
3042 extra_parts='${extra_parts}'
3043 extra_objs='${extra_objs}'
3044 host_extra_gcc_objs='${host_extra_gcc_objs}'
3045 extra_headers_list='${extra_headers_list}'
3046 dep_host_xmake_file='${dep_host_xmake_file}'
3047 host_xmake_file='${host_xmake_file}'
3048 dep_tmake_file='${dep_tmake_file}'
3049 tmake_file='${tmake_file}'
3050 out_file='${out_file}'
3051 out_object_file='${out_object_file}'
3052 md_file='${md_file}'
3053 md_file_sub='${md_file_sub}'
3054 tm_file_list='${tm_file_list}'
3055 tm_file_sub='${tm_file_sub}'
3056 build_xm_file_list='${build_xm_file_list}'
3057 build_xm_file_sub='${build_xm_file_sub}'
3058 host_xm_file_list='${host_xm_file_list}'
3059 host_xm_file_sub='${host_xm_file_sub}'
3060 lang_specs_files='${lang_specs_files}'
3061 lang_options_files='${lang_options_files}'
3062 objc_thread_file='${objc_thread_file}'
3063 version='${version}'
3064 local_prefix='${local_prefix}'
3065 gxx_include_dir='${gxx_include_dir}'
3066 fixincludes='${fixincludes}'
3067 build_install_headers_dir='${build_install_headers_dir}'
3069 float_format='${float_format}'
3070 use_collect2='${use_collect2}'
3071 will_use_collect2='${will_use_collect2}'
3072 maybe_use_collect2='${maybe_use_collect2}'
3073 cc_set_by_configure='${cc_set_by_configure}'
3074 stage_prefix_set_by_configure='${stage_prefix_set_by_configure}'
3075 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3076 SET_MAKE='${SET_MAKE}'
3077 build_broken_install='${build_broken_install}'
3078 md_cppflags='${md_cppflags}'
3079 target_list='${target_list}'
3081 target_overrides='${target_overrides}'
3082 host_overrides='${host_overrides}'
3083 cross_defines='${cross_defines}'
3084 cross_overrides='${cross_overrides}'
3085 build_overrides='${build_overrides}'
3086 language_fragments='${language_fragments}'
3087 language_hooks='${language_hooks}'