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_PREFIX_DEFAULT(/usr/local)
28 #exec_prefix='$(prefix)'
29 local_prefix=/usr/local
35 # Check for additional parameters
39 [ --with-gnu-ld arrange to work with GNU ld.],
45 [ --with-gnu-s arrange to work with GNU as.],
51 [ --with-stabs arrange to use stabs instead of host debug format.],
57 [ --with-elf arrange to use ELF instead of host debug format.],
62 # Shell script to create proper links to machine-dependent files in
63 # preparation for compiling gcc.
65 # --local-prefix=DIR specifies directory to put local ./include in.
66 # --gxx-include-dir=DIR specifies directory to put g++ header files in.
69 # Determine the host, build, and target systems
72 # Find some useful tools
80 # Find the native compiler
94 build_install_headers_dir=install-headers-tar
100 # Decode the host machine, then the target machine.
101 # For the host machine, we save the xm_file variable as host_xm_file;
102 # then we decode the target machine and forget everything else
103 # that came from the host machine.
104 for machine in $build $host $target; do
117 # Set this to force installation and use of collect2.
119 # Set this to override the default target model.
121 # Set this to force use of install.sh.
123 # Set this to control which fixincludes program to use.
124 fixincludes=fixincludes
125 # Set this to control how the header file directory is installed.
126 install_headers_dir=install-headers-tar
127 # Set this to a non-empty list of args to pass to cpp if the target
128 # wants its .md file passed through cpp.
130 # Set this if directory names should be truncated to 14 characters.
132 # Set this if gdb needs a dir command with `dirname $out_file`
133 gdb_needs_out_file_path=
134 # Set this to the tag of the Objective-C runtime thread file to compile
135 # It may be set (in the absence of autoconf configuration) by
136 # --enable-objcthreads=posix (for instance) where it's not
137 # well defined as is the case for Linux.
139 case x${enable_objcthreads-x} in
141 echo "\`--enable-objcthreads' must be passed a value." 1>&2
144 # Set this if the build machine requires executables to have a
148 # Set default cpu_type, tm_file and xm_file so it can be updated in
149 # each machine entry.
150 cpu_type=`echo $machine | sed 's/-.*$//'`
181 tm_file=${cpu_type}/${cpu_type}.h
182 xm_file=${cpu_type}/xm-${cpu_type}.h
185 # Support site-specific machine types.
187 cpu_type=`echo $machine | sed -e 's/-.*//'`
188 rest=`echo $machine | sed -e "s/$cpu_type-//"`
189 xm_file=${cpu_type}/xm-$rest.h
190 tm_file=${cpu_type}/$rest.h
191 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
192 then xmake_file=${cpu_type}/x-$rest; \
195 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
196 then tmake_file=${cpu_type}/t-$rest; \
202 a29k-*-bsd* | a29k-*-sym1*)
203 tm_file="${tm_file} a29k/unix.h"
204 xm_file=a29k/xm-unix.h
205 xmake_file=a29k/x-unix
208 a29k-*-udi | a29k-*-coff)
209 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
210 tmake_file=a29k/t-a29kbare
213 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
214 tmake_file=a29k/t-vx29k
215 extra_parts="crtbegin.o crtend.o"
217 a29k-*-*) # Default a29k environment.
220 alpha-*-linux*ecoff*)
221 tm_file="${tm_file} alpha/linux.h"
222 xm_file="${xm_file} alpha/xm-linux.h"
223 objc_thread_file=${enable_objcthreads-single}
226 fixincludes=Makefile.in
230 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
231 xm_file="${xm_file} alpha/xm-linux.h"
234 fixincludes=Makefile.in
235 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
238 alpha-dec-osf[[23456789]]*)
239 if [[ x$stabs = xyes ]]
241 tm_file="${tm_file} dbx.h"
243 if [[ x$gas != xyes ]]
245 extra_passes="mips-tfile mips-tdump"
251 tm_file="${tm_file} alpha/osf12.h"
252 if [[ x$stabs = xyes ]]
254 tm_file="${tm_file} dbx.h"
256 if [[ x$gas != xyes ]]
258 extra_passes="mips-tfile mips-tdump"
264 if [[ x$stabs = xyes ]]
266 tm_file="${tm_file} dbx.h"
268 if [[ x$gas != xyes ]]
270 extra_passes="mips-tfile mips-tdump"
276 tm_file="${tm_file} alpha/win-nt.h"
277 target_cpu_default=64
278 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
280 xmake_file=winnt/x-winnt
281 extra_host_objs=oldnames.o
282 extra_gcc_objs="spawnv.o oldnames.o"
283 fixincludes=fixinc.winnt
284 if [[ x$gnu_ld != xyes ]]
286 extra_programs=ld.exe
288 objc_thread_file=${enable_objcthreads-win32}
292 xm_file="${xm_file} alpha/xm-vms.h"
293 tmake_file=alpha/t-vms
294 fixincludes=Makefile.in
296 arm-*-coff* | armel-*-coff*)
298 tmake_file=arm/t-bare
300 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
301 tm_file=arm/riscix1-1.h
304 arm-*-riscix*) # Acorn RISC machine
305 if [[ x$gas = xyes ]]
307 tm_file=arm/rix-gas.h
311 xmake_file=arm/x-riscix
312 tmake_file=arm/t-riscix
315 arm-semi-aout | armel-semi-aout)
317 tmake_file=arm/t-semi
318 fixincludes=Makefile.in # There is nothing to fix
320 arm-semi-aof | armel-semi-aof)
321 tm_file=arm/semiaof.h
322 tmake_file=arm/t-semiaof
323 fixincludes=Makefile.in # There is nothing to fix
325 arm-*-*) # generic version
327 c1-convex-*) # Convex C1
330 fixincludes=Makefile.in
332 c2-convex-*) # Convex C2
335 fixincludes=Makefile.in
340 fixincludes=Makefile.in
345 fixincludes=Makefile.in
348 target_cpu_default=16
350 fixincludes=Makefile.in
352 clipper-intergraph-clix*)
353 tm_file="${tm_file} svr3.h clipper/clix.h"
354 xm_file=clipper/xm-clix.h
355 xmake_file=clipper/x-clix
356 extra_headers=va-clipper.h
357 extra_parts="crtbegin.o crtend.o"
358 install_headers_dir=install-headers-cpio
366 # This hasn't been upgraded to GCC 2.
367 # fx80-alliant-*) # Alliant FX/80
373 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
374 xm_file=pa/xm-papro.h
379 tm_file="${tm_file} pa/pa-osf.h"
381 fixincludes=Makefile.in
384 tm_file="${tm_file} pa/pa-osf.h"
386 fixincludes=Makefile.in
391 fixincludes=Makefile.in
395 fixincludes=Makefile.in
398 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
399 xm_file=pa/xm-pahpux.h
400 xmake_file=pa/x-pa-hpux
401 if [[ x$gas = xyes ]]
403 tm_file="${tm_file} pa/gas.h"
406 install_headers_dir=install-headers-cpio
409 hppa1.0-*-hpux8.0[[0-2]]*)
410 tm_file="${tm_file} pa/pa-hpux.h"
411 xm_file=pa/xm-pahpux.h
412 xmake_file=pa/x-pa-hpux
413 if [[ x$gas = xyes ]]
415 tm_file="${tm_file} pa/pa-gas.h"
417 tm_file="pa/pa-oldas.h ${tm_file}"
420 install_headers_dir=install-headers-cpio
423 hppa1.1-*-hpux8.0[[0-2]]*)
425 tm_file="${tm_file} pa/pa-hpux.h"
426 xm_file=pa/xm-pahpux.h
427 xmake_file=pa/x-pa-hpux
428 if [[ x$gas = xyes ]]
430 tm_file="${tm_file} pa/pa-gas.h"
432 tm_file="pa/pa-oldas.h ${tm_file}"
435 install_headers_dir=install-headers-cpio
440 tm_file="${tm_file} pa/pa-hpux.h"
441 xm_file=pa/xm-pahpux.h
442 xmake_file=pa/x-pa-hpux
443 if [[ x$gas = xyes ]]
445 tm_file="${tm_file} pa/pa-gas.h"
448 install_headers_dir=install-headers-cpio
452 tm_file="${tm_file} pa/pa-hpux.h"
453 xm_file=pa/xm-pahpux.h
454 xmake_file=pa/x-pa-hpux
455 if [[ x$gas = xyes ]]
457 tm_file="${tm_file} pa/pa-gas.h"
460 install_headers_dir=install-headers-cpio
465 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
466 xm_file=pa/xm-pahpux.h
467 xmake_file=pa/x-pa-hpux
468 if [[ x$gas = xyes ]]
470 tm_file="${tm_file} pa/pa-gas.h"
473 install_headers_dir=install-headers-cpio
477 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
478 xm_file=pa/xm-pahpux.h
479 xmake_file=pa/x-pa-hpux
480 if [[ x$gas = xyes ]]
482 tm_file="${tm_file} pa/pa-gas.h"
485 install_headers_dir=install-headers-cpio
490 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
491 xm_file=pa/xm-pahpux.h
492 xmake_file=pa/x-pa-hpux
493 if [[ x$gas = xyes ]]
495 tm_file="${tm_file} pa/pa-gas.h"
498 install_headers_dir=install-headers-cpio
502 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
503 xm_file=pa/xm-pahpux.h
504 xmake_file=pa/x-pa-hpux
505 if [[ x$gas = xyes ]]
507 tm_file="${tm_file} pa/pa-gas.h"
510 install_headers_dir=install-headers-cpio
515 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
516 xm_file=pa/xm-pahpux.h
517 xmake_file=pa/x-pa-hpux
518 if [[ x$gas = xyes ]]
520 tm_file="${tm_file} pa/pa-gas.h"
523 install_headers_dir=install-headers-cpio
527 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
528 xm_file=pa/xm-pahpux.h
529 xmake_file=pa/x-pa-hpux
530 if [[ x$gas = xyes ]]
532 tm_file="${tm_file} pa/pa-gas.h"
535 install_headers_dir=install-headers-cpio
541 fixincludes=Makefile.in
545 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
546 if [[ x$gas = xyes ]]
548 tm_file=i386/aix386.h
549 extra_parts="crtbegin.o crtend.o"
550 tmake_file=i386/t-crtstuff
552 tm_file=i386/aix386ng.h
555 xm_file=i386/xm-aix.h
556 xmake_file=i386/x-aix
559 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
560 xm_file=i386/xm-sysv4.h
561 xmake_file=i386/x-ncr3000
562 if [[ x$stabs = xyes -a x$gas = xyes ]]
564 tm_file=i386/sysv4gdb.h
568 extra_parts="crtbegin.o crtend.o"
569 tmake_file=i386/t-crtpic
573 xm_file=i386/xm-next.h
574 tmake_file=i386/t-next
575 xmake_file=i386/x-next
576 extra_objs=nextstep.o
577 objc_thread_file=${enable_objcthreads-mach}
579 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
581 if [[ x$gas = xyes ]]
583 tm_file=i386/seq-gas.h
585 tm_file=i386/sequent.h
588 i[[3456]]86-sequent-ptx1*)
589 xm_file=i386/xm-sysv3.h
590 xmake_file=i386/x-sysv3
591 tm_file=i386/seq-sysv3.h
592 tmake_file=i386/t-crtstuff
593 fixincludes=fixinc.ptx
594 extra_parts="crtbegin.o crtend.o"
595 install_headers_dir=install-headers-cpio
598 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
599 xm_file=i386/xm-sysv3.h
600 xmake_file=i386/x-sysv3
601 tm_file=i386/seq2-sysv3.h
602 tmake_file=i386/t-crtstuff
603 extra_parts="crtbegin.o crtend.o"
604 fixincludes=fixinc.ptx
605 install_headers_dir=install-headers-cpio
608 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
609 xm_file=i386/xm-sysv4.h
611 tm_file=i386/ptx4-i.h
613 extra_parts="crtbegin.o crtend.o"
614 fixincludes=fixinc.ptx
615 install_headers_dir=install-headers-cpio
618 i386-sun-sunos*) # Sun i386 roadrunner
619 xm_file=i386/xm-sun.h
624 tm_file=i386/i386-aout.h
625 tmake_file=i386/t-i386bare
627 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
628 tm_file=i386/bsd386.h
629 xm_file=i386/xm-bsd386.h
630 # tmake_file=t-libc-ok
633 tm_file=i386/386bsd.h
634 xm_file=i386/xm-bsd386.h
635 # tmake_file=t-libc-ok
636 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
639 i[[3456]]86-*-freebsdelf*)
640 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
641 xm_file=i386/xm-freebsd.h
642 # On FreeBSD, the headers are already ok.
643 fixincludes=Makefile.in
644 tmake_file=i386/t-freebsd
649 i[[3456]]86-*-freebsd*)
650 tm_file=i386/freebsd.h
651 xm_file=i386/xm-freebsd.h
652 # On FreeBSD, the headers are already ok.
653 fixincludes=Makefile.in
654 tmake_file=i386/t-freebsd
656 i[[3456]]86-*-netbsd*)
657 tm_file=i386/netbsd.h
658 xm_file=i386/xm-netbsd.h
659 # On NetBSD, the headers are already okay.
660 fixincludes=Makefile.in
665 tm_file=i386/i386-coff.h
666 tmake_file=i386/t-i386bare
668 i[[3456]]86-*-isc*) # 80386 running ISC system
669 xm_file=i386/xm-isc.h
671 i[[345]]86-*-isc[[34]]*)
672 xmake_file=i386/x-isc3
675 xmake_file=i386/x-isc
678 if [[ x$gas = xyes -a x$stabs = xyes ]]
680 tm_file=i386/iscdbx.h
681 tmake_file=i386/t-svr3dbx
682 extra_parts="svr3.ifile svr3z.ifile"
684 tm_file=i386/isccoff.h
685 tmake_file=i386/t-crtstuff
686 extra_parts="crtbegin.o crtend.o"
688 install_headers_dir=install-headers-cpio
691 i[[3456]]86-*-linux*oldld*) # Intel 80386's running Linux
692 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
693 xmake_file=x-linux-aout
694 tmake_file="t-linux-aout i386/t-crtstuff"
695 tm_file=i386/linux-oldld.h
696 fixincludes=Makefile.in #On Linux, the headers are ok already.
699 objc_thread_file=${enable_objcthreads-single}
701 i[[3456]]86-*-linux*aout*) # Intel 80386's running Linux
702 xm_file=i386/xm-linux.h # with a.out format
703 xmake_file=x-linux-aout
704 tmake_file="t-linux-aout i386/t-crtstuff"
705 tm_file=i386/linux-aout.h
706 fixincludes=Makefile.in #On Linux, the headers are ok already.
709 objc_thread_file=${enable_objcthreads-single}
711 i[[3456]]86-*-linux*) # Intel 80386's running Linux
712 xm_file=i386/xm-linux.h # with ELF format
715 tmake_file="t-linux i386/t-crtstuff"
716 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
717 fixincludes=Makefile.in #On Linux, the headers are ok already.
720 objc_thread_file=${enable_objcthreads-single}
724 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
725 xm_file=i386/xm-go32.h
727 tmake_file=i386/t-go32
729 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
732 fixincludes=Makefile.in
736 i[[3456]]86-*-lynxos*)
737 if [[ x$gas = xyes ]]
741 tm_file=i386/lynx-ng.h
743 xm_file=i386/xm-lynx.h
744 tmake_file=i386/t-i386bare
749 # tmake_file=t-libc-ok
752 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
753 if [[ x$elf = xyes ]]
755 tm_file=i386/osfelf.h
758 tm_file=i386/osfrose.h
761 xm_file=i386/xm-osf.h
762 xmake_file=i386/x-osfrose
763 tmake_file=i386/t-osf
766 i[[345]]86-go32-rtems*)
768 xm_file=i386/xm-go32.h
769 tm_file=i386/go32-rtems.h
770 tmake_file="i386/t-go32 t-rtems"
775 tmake_file="i386/t-i386bare t-rtems"
777 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
778 xm_file=i386/xm-sco5.h
779 xmake_file=i386/x-sco5
780 fixincludes=fixinc.sco
783 tmake_file=i386/t-sco5
784 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
786 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
787 xm_file=i386/xm-sco.h
788 xmake_file=i386/x-sco4
789 fixincludes=fixinc.sco
791 install_headers_dir=install-headers-cpio
792 if [[ x$stabs = xyes ]]
794 tm_file=i386/sco4dbx.h
795 tmake_file=i386/t-svr3dbx
796 extra_parts="svr3.ifile svr3z.rfile"
799 tmake_file=i386/t-crtstuff
800 extra_parts="crtbegin.o crtend.o"
804 i[[3456]]86-*-sco*) # 80386 running SCO system
805 xm_file=i386/xm-sco.h
806 xmake_file=i386/x-sco
808 install_headers_dir=install-headers-cpio
809 if [[ x$stabs = xyes ]]
811 tm_file=i386/scodbx.h
812 tmake_file=i386/t-svr3dbx
813 extra_parts="svr3.ifile svr3z.rfile"
816 extra_parts="crtbegin.o crtend.o"
817 tmake_file=i386/t-crtstuff
821 i[[3456]]86-*-solaris2*)
822 xm_file=i386/xm-sysv4.h
823 if [[ x$stabs = xyes ]]
825 tm_file=i386/sol2gdb.h
829 tmake_file=i386/t-sol2
830 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
832 fixincludes=fixinc.svr4
834 objc_thread_file=${enable_objcthreads-solaris}
836 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
837 xm_file=i386/xm-sysv4.h
839 if [[ x$stabs = xyes ]]
841 tm_file="${tm_file} dbx.h"
843 tmake_file=i386/t-crtpic
845 extra_parts="crtbegin.o crtend.o"
847 i[[3456]]86-*-sysv*) # Intel 80386's running system V
848 xm_file=i386/xm-sysv3.h
849 xmake_file=i386/x-sysv3
850 if [[ x$gas = xyes ]]
852 if [[ x$stabs = xyes ]]
854 tm_file=i386/svr3dbx.h
855 tmake_file=i386/t-svr3dbx
856 extra_parts="svr3.ifile svr3z.rfile"
858 tm_file=i386/svr3gas.h
859 extra_parts="crtbegin.o crtend.o"
860 tmake_file=i386/t-crtstuff
864 extra_parts="crtbegin.o crtend.o"
865 tmake_file=i386/t-crtstuff
868 i386-*-vsta) # Intel 80386's running VSTa kernel
869 xm_file=i386/xm-vsta.h
871 tmake_file=i386/t-vsta
872 xmake_file=i386/x-vsta
874 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
875 xm_file="${xm_file} i386/xm-cygwin32.h"
876 tmake_file=i386/t-cygwin32
877 tm_file=i386/cygwin32.h
878 xmake_file=i386/x-cygwin32
880 fixincludes=Makefile.in
881 objc_thread_file=${enable_objcthreads-win32}
884 i[[3456]]86-*-winnt3*)
885 tm_file=i386/win-nt.h
887 xm_file=i386/xm-winnt.h
888 xmake_file=winnt/x-winnt
889 tmake_file=i386/t-winnt
890 extra_host_objs="winnt.o oldnames.o"
891 extra_gcc_objs="spawnv.o oldnames.o"
892 fixincludes=fixinc.winnt
893 if [[ x$gnu_ld != xyes ]]
895 extra_programs=ld.exe
897 objc_thread_file=${enable_objcthreads-win32}
900 xm_file=i386/xm-dgux.h
903 tmake_file=i386/t-dgux
904 xmake_file=i386/x-dgux
905 fixincludes=fixinc.dgux
906 install_headers_dir=install-headers-cpio
908 i860-alliant-*) # Alliant FX/2800
909 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
910 xm_file="${xm_file} i860/xm-fx2800.h"
911 xmake_file=i860/x-fx2800
912 tmake_file=i860/t-fx2800
913 extra_parts="crtbegin.o crtend.o"
916 tm_file="${tm_file} i860/bsd.h"
917 if [[ x$gas = xyes ]]
919 tm_file="${tm_file} i860/bsd-gas.h"
924 tm_file="${tm_file} i860/mach.h"
927 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
928 tm_file="${tm_file} svr3.h i860/paragon.h"
929 xm_file="${xm_file} xm-svr3.h"
934 tm_file="${tm_file} svr3.h i860/sysv3.h"
935 xm_file="${tm_file} xm-svr3.h"
936 xmake_file=i860/x-sysv3
937 extra_parts="crtbegin.o crtend.o"
940 tm_file="${tm_file} svr4.h i860/sysv4.h"
941 xm_file="${xm_file} xm-svr3.h"
942 xmake_file=i860/x-sysv4
944 extra_parts="crtbegin.o crtend.o"
946 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
947 tm_file="${tm_file} i960/vx960.h"
948 tmake_file=i960/t-vxworks960
952 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
953 tmake_file=i960/t-vxworks960
957 tm_file="${tm_file} i960/vx960.h"
958 tmake_file=i960/t-vxworks960
962 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
963 tmake_file=i960/t-960bare
967 tmake_file="i960/t-960bare t-rtems"
968 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
971 i960-*-*) # Default i960 environment.
974 m68000-convergent-sysv*)
976 xm_file=m68k/xm-3b1.h
978 extra_headers=math-68881.h
980 m68000-hp-bsd*) # HP 9000/200 running BSD
981 tm_file=m68k/hp2bsd.h
982 xmake_file=m68k/x-hp2bsd
984 extra_headers=math-68881.h
986 m68000-hp-hpux*) # HP 9000 series 300
987 xm_file=m68k/xm-hp320.h
988 if [[ x$gas = xyes ]]
990 xmake_file=m68k/x-hp320g
991 tm_file=m68k/hp310g.h
993 xmake_file=m68k/x-hp320
997 install_headers_dir=install-headers-cpio
999 extra_headers=math-68881.h
1004 extra_headers=math-68881.h
1007 tm_file=m68k/sun2o4.h
1009 extra_headers=math-68881.h
1012 xm_file=m68k/xm-3b1.h
1013 if [[ x$gas = xyes ]]
1020 extra_headers=math-68881.h
1022 m68k-apple-aux*) # Apple Macintosh running A/UX
1023 xm_file=m68k/xm-aux.h
1024 tmake_file=m68k/t-aux
1026 install_headers_dir=install-headers-cpio
1027 extra_headers=math-68881.h
1028 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1030 if [[ "$gnu_ld" = yes ]]
1032 tm_file="${tm_file} m68k/auxgld.h"
1034 tm_file="${tm_file} m68k/auxld.h"
1036 if [[ "$gas" = yes ]]
1038 tm_file="${tm_file} m68k/auxgas.h"
1040 tm_file="${tm_file} m68k/auxas.h"
1042 tm_file="${tm_file} m68k/a-ux.h"
1045 tm_file=m68k/apollo68.h
1046 xmake_file=m68k/x-apollo68
1048 extra_headers=math-68881.h
1050 m68k-altos-sysv*) # Altos 3068
1051 if [[ x$gas = xyes ]]
1053 tm_file=m68k/altos3068.h
1054 xm_file=m68k/xm-altos3068.h
1056 echo "The Altos is supported only with the GNU assembler" 1>&2
1059 extra_headers=math-68881.h
1061 m68k-bull-sysv*) # Bull DPX/2
1062 if [[ x$gas = xyes ]]
1064 if [[ x$stabs = xyes ]]
1066 tm_file=m68k/dpx2cdbx.h
1068 tm_file=m68k/dpx2g.h
1073 xm_file=m68k/xm-m68kv.h
1074 xmake_file=m68k/x-dpx2
1076 extra_headers=math-68881.h
1078 m68k-atari-sysv4*) # Atari variant of V.4.
1079 tm_file=m68k/atari.h
1080 xm_file=m68k/xm-atari.h
1082 extra_parts="crtbegin.o crtend.o"
1083 extra_headers=math-68881.h
1085 m68k-motorola-sysv*)
1086 tm_file=m68k/mot3300.h
1087 xm_file=m68k/xm-mot3300.h
1088 if [[ x$gas = xyes ]]
1090 xmake_file=m68k/x-mot3300-gas
1091 if [[ x$gnu_ld = xyes ]]
1093 tmake_file=m68k/t-mot3300-gald
1095 tmake_file=m68k/t-mot3300-gas
1099 xmake_file=m68k/x-mot3300
1100 if [[ x$gnu_ld = xyes ]]
1102 tmake_file=m68k/t-mot3300-gld
1104 tmake_file=m68k/t-mot3300
1108 gdb_needs_out_file_path=yes
1109 extra_parts="crt0.o mcrt0.o"
1110 extra_headers=math-68881.h
1112 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1113 tm_file=m68k/tower-as.h
1114 xm_file=m68k/xm-tower.h
1115 xmake_file=m68k/x-tower
1116 extra_parts="crtbegin.o crtend.o"
1117 extra_headers=math-68881.h
1120 tm_file=m68k/plexus.h
1121 xm_file=m68k/xm-plexus.h
1123 extra_headers=math-68881.h
1127 xm_file=m68k/xm-m68kv.h
1128 extra_headers=math-68881.h
1131 xm_file=m68k/xm-crds.h
1132 xmake_file=m68k/x-crds
1136 extra_headers=math-68881.h
1138 m68k-cbm-sysv4*) # Commodore variant of V.4.
1140 xm_file=m68k/xm-amix.h
1141 xmake_file=m68k/x-amix
1143 extra_parts="crtbegin.o crtend.o"
1144 extra_headers=math-68881.h
1147 tm_file=m68k/ccur-GAS.h
1148 xmake_file=m68k/x-ccur
1149 extra_headers=math-68881.h
1153 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1154 tm_file=m68k/hp3bsd44.h
1155 xmake_file=m68k/x-hp3bsd44
1157 extra_headers=math-68881.h
1159 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1160 tm_file=m68k/hp3bsd.h
1162 extra_headers=math-68881.h
1165 if [[ x$with_fp = xno ]]
1167 tm_file=m68k/isi-nfp.h
1172 extra_headers=math-68881.h
1174 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1175 xm_file=m68k/xm-hp320.h
1176 if [[ x$gas = xyes ]]
1178 xmake_file=m68k/x-hp320g
1179 tm_file=m68k/hp320g.h
1181 xmake_file=m68k/x-hp320
1182 tm_file=m68k/hpux7.h
1185 install_headers_dir=install-headers-cpio
1187 extra_headers=math-68881.h
1189 m68k-hp-hpux*) # HP 9000 series 300
1190 xm_file=m68k/xm-hp320.h
1191 if [[ x$gas = xyes ]]
1193 xmake_file=m68k/x-hp320g
1194 tm_file=m68k/hp320g.h
1196 xmake_file=m68k/x-hp320
1197 tm_file=m68k/hp320.h
1200 install_headers_dir=install-headers-cpio
1202 extra_headers=math-68881.h
1205 tm_file=m68k/sun3mach.h
1207 extra_headers=math-68881.h
1210 if [[ x$gas = xyes ]]
1212 tm_file=m68k/news3gas.h
1214 tm_file=m68k/news3.h
1217 extra_headers=math-68881.h
1219 m68k-sony-bsd* | m68k-sony-newsos*)
1220 if [[ x$gas = xyes ]]
1222 tm_file=m68k/newsgas.h
1227 extra_headers=math-68881.h
1229 m68k-next-nextstep2*)
1230 tm_file=m68k/next21.h
1231 xm_file=m68k/xm-next.h
1232 tmake_file=m68k/t-next
1233 xmake_file=m68k/x-next
1234 extra_objs=nextstep.o
1235 extra_headers=math-68881.h
1238 m68k-next-nextstep3*)
1240 xm_file=m68k/xm-next.h
1241 tmake_file=m68k/t-next
1242 xmake_file=m68k/x-next
1243 extra_objs=nextstep.o
1244 extra_headers=math-68881.h
1245 objc_thread_file=${enable_objcthreads-mach}
1248 if [[ x$with_fp = xno ]]
1250 tm_file=m68k/sun3n3.h
1252 tm_file=m68k/sun3o3.h
1255 extra_headers=math-68881.h
1257 m68k-sun-sunos*) # For SunOS 4 (the default).
1258 if [[ x$with_fp = xno ]]
1260 tm_file=m68k/sun3n.h
1264 xm_file=m68k/xm-sun3.h
1266 extra_headers=math-68881.h
1269 tm_file=m68k/vxm68k.h
1270 tmake_file=m68k/t-vxworks68
1271 extra_headers=math-68881.h
1274 tmake_file=m68k/t-m68kbare
1275 tm_file="m68k/m68k-aout.h libgloss.h"
1276 extra_headers=math-68881.h
1279 tmake_file=m68k/t-m68kbare
1280 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1281 extra_headers=math-68881.h
1284 if [[ x$gas = xyes ]]
1288 tm_file=m68k/lynx-ng.h
1290 xm_file=m68k/xm-lynx.h
1292 tmake_file=m68k/t-lynx
1293 extra_headers=math-68881.h
1296 tm_file=m68k/netbsd.h
1297 xm_file=m68k/xm-netbsd.h
1298 # On NetBSD, the headers are already okay.
1299 fixincludes=Makefile.in
1300 tmake_file=t-libc-ok
1303 m68k-*-sysv3*) # Motorola m68k's running system V.3
1304 xm_file=m68k/xm-m68kv.h
1305 xmake_file=m68k/x-m68kv
1306 extra_parts="crtbegin.o crtend.o"
1307 extra_headers=math-68881.h
1309 m68k-*-sysv4*) # Motorola m68k's running system V.4
1310 tm_file=m68k/m68kv4.h
1311 xm_file=m68k/xm-m68kv.h
1313 extra_parts="crtbegin.o crtend.o"
1314 extra_headers=math-68881.h
1316 m68k-*-linux*aout*) # Motorola m68k's running Linux
1317 xm_file=m68k/xm-linux.h # with a.out format
1319 tm_file=m68k/linux-aout.h
1320 tmake_file="t-linux-aout m68k/t-linux-aout"
1321 fixincludes=Makefile.in #On Linux, the headers are ok already.
1322 extra_headers=math-68881.h
1324 objc_thread_file=${enable_objcthreads-single}
1326 m68k-*-linux*) # Motorola m68k's running Linux
1327 xm_file=m68k/xm-linux.h # with ELF format
1329 tm_file=m68k/linux.h
1330 tmake_file="t-linux m68k/t-linux"
1331 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1332 fixincludes=Makefile.in #On Linux, the headers are ok already.
1333 extra_headers=math-68881.h
1335 objc_thread_file=${enable_objcthreads-single}
1338 tmake_file=m68k/t-m68kbare
1339 tm_file=m68k/m68k-psos.h
1340 extra_headers=math-68881.h
1343 tmake_file="m68k/t-m68kbare t-rtems"
1344 tm_file=m68k/rtems.h
1345 extra_headers=math-68881.h
1351 tm_file=m88k/dguxbcs.h
1352 tmake_file=m88k/t-dguxbcs
1356 tmake_file=m88k/t-dgux
1359 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1361 xmake_file=m88k/x-dgux
1362 if [[ x$gas = xyes ]]
1364 tmake_file=m88k/t-dgux-gas
1366 fixincludes=fixinc.dgux
1368 m88k-dolphin-sysv3*)
1369 tm_file=m88k/dolph.h
1370 extra_parts="crtbegin.o crtend.o"
1371 xm_file=m88k/xm-sysv3.h
1372 xmake_file=m88k/x-dolph
1373 if [[ x$gas = xyes ]]
1375 tmake_file=m88k/t-m88k-gas
1378 m88k-tektronix-sysv3)
1379 tm_file=m88k/tekXD88.h
1380 extra_parts="crtbegin.o crtend.o"
1381 xm_file=m88k/xm-sysv3.h
1382 xmake_file=m88k/x-tekXD88
1383 if [[ x$gas = xyes ]]
1385 tmake_file=m88k/t-m88k-gas
1389 tm_file=m88k/m88k-aout.h
1392 tm_file=m88k/m88k-coff.h
1393 tmake_file=m88k/t-bug
1397 extra_parts="crtbegin.o crtend.o"
1398 if [[ x$gas = xyes ]]
1400 tmake_file=m88k/t-luna-gas
1402 tmake_file=m88k/t-luna
1406 tm_file=m88k/sysv3.h
1407 extra_parts="crtbegin.o crtend.o"
1408 xm_file=m88k/xm-sysv3.h
1409 xmake_file=m88k/x-sysv3
1410 if [[ x$gas = xyes ]]
1412 tmake_file=m88k/t-m88k-gas
1416 tm_file=m88k/sysv4.h
1417 extra_parts="crtbegin.o crtend.o"
1418 xmake_file=m88k/x-sysv4
1419 tmake_file=m88k/t-sysv4
1421 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1422 tm_file=mips/iris6.h
1423 xm_file=mips/xm-iris6.h
1425 fixincludes=fixinc.irix
1426 xmake_file=mips/x-iris6
1427 tmake_file=mips/t-iris6
1428 objc_thread_file=${enable_objcthreads-irix}
1430 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1431 tm_file=mips/cross64.h
1432 xm_file=mips/xm-iris5.h
1434 fixincludes=Makefile.in
1435 xmake_file=mips/x-iris
1436 tmake_file=mips/t-cross64
1437 # See comment in mips/iris[56].h files.
1439 objc_thread_file=${enable_objcthreads-irix}
1442 if [[ x$gas = xyes ]]
1444 if [[ x$stabs = xyes ]]
1446 tm_file=mips/iris5gdb.h
1448 tm_file=mips/sni-gas.h
1451 tm_file=mips/sni-svr4.h
1453 xm_file=mips/xm-sysv.h
1454 xmake_file=mips/x-sni-svr4
1455 tmake_file=mips/t-mips-gas
1456 if [[ x$gnu_ld != xyes ]]
1462 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1463 if [[ x$gas = xyes ]]
1465 tm_file=mips/iris5gas.h
1466 if [[ x$stabs = xyes ]]
1468 tm_file="${tm_file} dbx.h"
1471 tm_file=mips/iris5.h
1473 xm_file=mips/xm-iris5.h
1475 fixincludes=fixinc.irix
1476 xmake_file=mips/x-iris
1477 # mips-tfile doesn't work yet
1478 tmake_file=mips/t-mips-gas
1479 # See comment in mips/iris5.h file.
1481 objc_thread_file=${enable_objcthreads-irix}
1483 mips-sgi-irix4loser*) # Mostly like a MIPS.
1484 tm_file=mips/iris4loser.h
1485 if [[ x$stabs = xyes ]]; then
1486 tm_file="${tm_file} dbx.h"
1488 xm_file=mips/xm-iris4.h
1490 xmake_file=mips/x-iris
1491 if [[ x$gas = xyes ]]
1493 tmake_file=mips/t-mips-gas
1495 extra_passes="mips-tfile mips-tdump"
1497 if [[ x$gnu_ld != xyes ]]
1501 objc_thread_file=${enable_objcthreads-irix}
1503 mips-sgi-irix4*) # Mostly like a MIPS.
1504 tm_file=mips/iris4.h
1505 if [[ x$stabs = xyes ]]; then
1506 tm_file="${tm_file} dbx.h"
1508 xm_file=mips/xm-iris4.h
1510 xmake_file=mips/x-iris
1511 if [[ x$gas = xyes ]]
1513 tmake_file=mips/t-mips-gas
1515 extra_passes="mips-tfile mips-tdump"
1517 if [[ x$gnu_ld != xyes ]]
1521 objc_thread_file=${enable_objcthreads-irix}
1523 mips-sgi-*) # Mostly like a MIPS.
1524 tm_file=mips/iris3.h
1525 if [[ x$stabs = xyes ]]; then
1526 tm_file="${tm_file} dbx.h"
1528 xm_file=mips/xm-iris3.h
1530 xmake_file=mips/x-iris3
1531 if [[ x$gas = xyes ]]
1533 tmake_file=mips/t-mips-gas
1535 extra_passes="mips-tfile mips-tdump"
1537 if [[ x$gnu_ld != xyes ]]
1542 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1543 tm_file=mips/osfrose.h
1544 xmake_file=mips/x-osfrose
1545 tmake_file=mips/t-osfrose
1546 extra_objs=halfpic.o
1549 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1550 tm_file=mips/dec-osf1.h
1551 if [[ x$stabs = xyes ]]; then
1552 tm_file="${tm_file} dbx.h"
1554 xmake_file=mips/x-dec-osf1
1555 if [[ x$gas = xyes ]]
1557 tmake_file=mips/t-mips-gas
1559 tmake_file=mips/t-ultrix
1560 extra_passes="mips-tfile mips-tdump"
1562 if [[ x$gnu_ld != xyes ]]
1567 mips-dec-bsd*) # Decstation running 4.4 BSD
1568 tm_file=mips/dec-bsd.h
1570 if [[ x$gas = xyes ]]
1572 tmake_file=mips/t-mips-gas
1574 tmake_file=mips/t-ultrix
1575 extra_passes="mips-tfile mips-tdump"
1577 if [[ x$gnu_ld != xyes ]]
1582 mips-dec-netbsd*) # Decstation running NetBSD
1583 tm_file=mips/netbsd.h
1584 xm_file=mips/xm-netbsd.h
1586 tmake_file=t-libc-ok
1587 fixincludes=Makefile.in
1588 prefix=$native_prefix
1590 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1591 tm_file=mips/news4.h
1592 if [[ x$stabs = xyes ]]; then
1593 tm_file="${tm_file} dbx.h"
1595 if [[ x$gas = xyes ]]
1597 tmake_file=mips/t-mips-gas
1599 extra_passes="mips-tfile mips-tdump"
1601 if [[ x$gnu_ld != xyes ]]
1605 xmake_file=mips/x-sony
1607 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1608 # That is based on svr4.
1609 # t-svr4 is not right because this system doesn't use ELF.
1610 tm_file=mips/news5.h
1611 if [[ x$stabs = xyes ]]; then
1612 tm_file="${tm_file} dbx.h"
1614 xm_file=mips/xm-news.h
1615 if [[ x$gas = xyes ]]
1617 tmake_file=mips/t-mips-gas
1619 extra_passes="mips-tfile mips-tdump"
1621 if [[ x$gnu_ld != xyes ]]
1626 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1627 tm_file=mips/svr4-t.h
1628 if [[ x$stabs = xyes ]]; then
1629 tm_file="${tm_file} dbx.h"
1631 xm_file=mips/xm-sysv4.h
1632 xmake_file=mips/x-sysv
1633 if [[ x$gas = xyes ]]
1635 tmake_file=mips/t-mips-gas
1636 extra_parts="crtbegin.o crtend.o"
1638 tmake_file=mips/t-mips
1639 extra_passes="mips-tfile mips-tdump"
1641 if [[ x$gnu_ld != xyes ]]
1647 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1648 tm_file=mips/ultrix.h
1649 if [[ x$stabs = xyes ]]; then
1650 tm_file="${tm_file} dbx.h"
1652 xmake_file=mips/x-ultrix
1653 if [[ x$gas = xyes ]]
1655 tmake_file=mips/t-mips-gas
1657 tmake_file=mips/t-ultrix
1658 extra_passes="mips-tfile mips-tdump"
1660 if [[ x$gnu_ld != xyes ]]
1665 mips-*-riscos[[56789]]bsd*)
1666 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1667 if [[ x$stabs = xyes ]]; then
1668 tm_file="${tm_file} dbx.h"
1670 if [[ x$gas = xyes ]]
1672 tmake_file=mips/t-bsd-gas
1674 tmake_file=mips/t-bsd
1675 extra_passes="mips-tfile mips-tdump"
1677 if [[ x$gnu_ld != xyes ]]
1683 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1684 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1685 if [[ x$stabs = xyes ]]; then
1686 tm_file="${tm_file} dbx.h"
1688 if [[ x$gas = xyes ]]
1690 tmake_file=mips/t-bsd-gas
1692 tmake_file=mips/t-bsd
1693 extra_passes="mips-tfile mips-tdump"
1695 if [[ x$gnu_ld != xyes ]]
1701 mips-*-riscos[[56789]]sysv4*)
1702 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1703 if [[ x$stabs = xyes ]]; then
1704 tm_file="${tm_file} dbx.h"
1706 xm_file=mips/xm-sysv4.h
1707 xmake_file=mips/x-sysv
1708 if [[ x$gas = xyes ]]
1710 tmake_file=mips/t-svr4-gas
1712 tmake_file=mips/t-svr4
1713 extra_passes="mips-tfile mips-tdump"
1715 if [[ x$gnu_ld != xyes ]]
1721 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1722 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1723 if [[ x$stabs = xyes ]]; then
1724 tm_file="${tm_file} dbx.h"
1726 xm_file=mips/xm-sysv.h
1727 xmake_file=mips/x-sysv
1728 if [[ x$gas = xyes ]]
1730 tmake_file=mips/t-svr4-gas
1732 tmake_file=mips/t-svr4
1733 extra_passes="mips-tfile mips-tdump"
1735 if [[ x$gnu_ld != xyes ]]
1741 mips-*-riscos[[56789]]sysv*)
1742 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1743 if [[ x$stabs = xyes ]]; then
1744 tm_file="${tm_file} dbx.h"
1746 xm_file=mips/xm-sysv.h
1747 xmake_file=mips/x-sysv
1748 if [[ x$gas = xyes ]]
1750 tmake_file=mips/t-svr3-gas
1752 tmake_file=mips/t-svr3
1753 extra_passes="mips-tfile mips-tdump"
1755 if [[ x$gnu_ld != xyes ]]
1761 mips-*-sysv* | mips-*-riscos*sysv*)
1762 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1763 if [[ x$stabs = xyes ]]; then
1764 tm_file="${tm_file} dbx.h"
1766 xm_file=mips/xm-sysv.h
1767 xmake_file=mips/x-sysv
1768 if [[ x$gas = xyes ]]
1770 tmake_file=mips/t-svr3-gas
1772 tmake_file=mips/t-svr3
1773 extra_passes="mips-tfile mips-tdump"
1775 if [[ x$gnu_ld != xyes ]]
1781 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1782 tm_file=mips/mips-5.h
1783 if [[ x$stabs = xyes ]]; then
1784 tm_file="${tm_file} dbx.h"
1786 if [[ x$gas = xyes ]]
1788 tmake_file=mips/t-mips-gas
1790 extra_passes="mips-tfile mips-tdump"
1792 if [[ x$gnu_ld != xyes ]]
1801 tm_file=mips/ecoffl.h
1802 if [[ x$stabs = xyes ]]; then
1803 tm_file="${tm_file} dbx.h"
1805 tmake_file=mips/t-ecoff
1808 tm_file=mips/ecoff.h
1809 if [[ x$stabs = xyes ]]; then
1810 tm_file="${tm_file} dbx.h"
1812 tmake_file=mips/t-ecoff
1816 tm_file="mips/elfl.h libgloss.h"
1817 tmake_file=mips/t-ecoff
1820 tm_file="mips/elf.h libgloss.h"
1821 tmake_file=mips/t-ecoff
1824 tm_file="mips/elfl64.h libgloss.h"
1825 tmake_file=mips/t-ecoff
1827 mips64orionel-*-elf*)
1828 tm_file="mips/elflorion.h libgloss.h"
1829 tmake_file=mips/t-ecoff
1832 tm_file="mips/elf64.h libgloss.h"
1833 tmake_file=mips/t-ecoff
1836 tm_file="mips/elforion.h libgloss.h"
1837 tmake_file=mips/t-ecoff
1839 mips64orion-*-rtems*)
1840 tm_file=mips/rtems64.h
1841 tmake_file="mips/t-ecoff t-rtems"
1843 mips-*-*) # Default MIPS RISC-OS 4.0.
1844 if [[ x$stabs = xyes ]]; then
1845 tm_file="${tm_file} dbx.h"
1847 if [[ x$gas = xyes ]]
1849 tmake_file=mips/t-mips-gas
1851 extra_passes="mips-tfile mips-tdump"
1853 if [[ x$gnu_ld != xyes ]]
1860 tm_file="mn10300/mn10300.h"
1861 if [[ x$stabs = xyes ]]
1863 tm_file="${tm_file} dbx.h"
1868 tm_file=ns32k/encore.h
1872 tm_file=ns32k/sequent.h
1876 tm_file=ns32k/tek6100.h
1881 tm_file=ns32k/tek6200.h
1885 # This has not been updated to GCC 2.
1887 # xm_file=ns32k/xm-genix.h
1888 # xmake_file=ns32k/x-genix
1889 # tm_file=ns32k/genix.h
1890 # broken_install=yes
1894 tm_file=ns32k/merlin.h
1898 tm_file=ns32k/pc532-mach.h
1902 tm_file=ns32k/pc532-min.h
1903 xm_file=ns32k/xm-pc532-min.h
1906 ns32k-pc532-netbsd*)
1907 tm_file=ns32k/netbsd.h
1908 xm_file=ns32k/xm-netbsd.h
1909 tmake_file=t-libc-ok
1910 # On NetBSD, the headers are already okay.
1911 fixincludes=Makefile.in
1915 tm_file="${tm_file} pdp11/2bsd.h"
1921 xmake_file=pyr/x-pyr
1928 xmake_file=romp/x-mach
1931 powerpc-*-sysv* | powerpc-*-elf*)
1932 tm_file=rs6000/sysv4.h
1933 xm_file=rs6000/xm-sysv4.h
1934 extra_headers=ppc-asm.h
1935 if [[ x$gas = xyes ]]
1937 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
1939 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
1941 xmake_file=rs6000/x-sysv4
1944 tm_file=rs6000/eabiaix.h
1945 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
1946 fixincludes=Makefile.in
1947 extra_headers=ppc-asm.h
1950 tm_file=rs6000/eabisim.h
1951 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
1952 fixincludes=Makefile.in
1953 extra_headers=ppc-asm.h
1956 tm_file=rs6000/eabi.h
1957 if [[ x$gas = xyes ]]
1959 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
1961 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
1963 fixincludes=Makefile.in
1964 extra_headers=ppc-asm.h
1967 tm_file=rs6000/linux.h
1968 xm_file=rs6000/xm-sysv4.h
1969 out_file=rs6000/rs6000.c
1970 if [[ x$gas = xyes ]]
1972 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
1974 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
1976 xmake_file=rs6000/x-sysv4
1977 fixincludes=Makefile.in
1978 objc_thread_file=${enable_objcthreads-single}
1979 extra_headers=ppc-asm.h
1983 xm_file=rs6000/xm-sysv4.h
1984 tm_file=rs6000/rtems.h
1985 if [[ x$gas = xyes ]]
1987 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
1989 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
1991 xmake_file=rs6000/x-sysv4
1992 extra_headers=ppc-asm.h
1996 xm_file=rs6000/xm-sysv4.h
1997 tm_file=rs6000/vxppc.h
1998 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
1999 extra_headers=ppc-asm.h
2001 powerpcle-*-sysv* | powerpcle-*-elf*)
2002 tm_file=rs6000/sysv4le.h
2003 xm_file=rs6000/xm-sysv4.h
2004 if [[ x$gas = xyes ]]
2006 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2008 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2010 xmake_file=rs6000/x-sysv4
2011 extra_headers=ppc-asm.h
2013 powerpcle-*-eabisim*)
2014 tm_file=rs6000/eabilesim.h
2015 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2016 fixincludes=Makefile.in
2017 extra_headers=ppc-asm.h
2020 tm_file=rs6000/eabile.h
2021 if [[ x$gas = xyes ]]
2023 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2025 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2027 fixincludes=Makefile.in
2028 extra_headers=ppc-asm.h
2030 powerpcle-*-winnt* )
2031 tm_file=rs6000/win-nt.h
2032 tmake_file=rs6000/t-winnt
2034 fixincludes=Makefile.in
2035 objc_thread_file=${enable_objcthreads-win32}
2036 extra_headers=ppc-asm.h
2038 powerpcle-*-pe | powerpcle-*-cygwin32)
2039 tm_file=rs6000/cygwin32.h
2040 xm_file=rs6000/xm-cygwin32.h
2041 tmake_file=rs6000/t-winnt
2042 xmake_file=rs6000/x-cygwin32
2044 fixincludes=Makefile.in
2045 objc_thread_file=${enable_objcthreads-win32}
2047 extra_headers=ppc-asm.h
2049 powerpcle-*-solaris2*)
2050 tm_file=rs6000/sol2.h
2051 xm_file=rs6000/xm-sysv4.h
2052 if [[ x$gas = xyes ]]
2054 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2056 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2058 xmake_file=rs6000/x-sysv4
2059 fixincludes=fixinc.svr4
2060 extra_headers=ppc-asm.h
2062 rs6000-ibm-aix3.[[01]]*)
2063 tm_file=rs6000/aix31.h
2064 xmake_file=rs6000/x-aix31
2067 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2068 tm_file=rs6000/aix3newas.h
2069 if [[ x$host != x$target ]]
2071 tmake_file=rs6000/t-xnewas
2073 tmake_file=rs6000/t-newas
2077 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2078 tm_file=rs6000/aix41.h
2079 if [[ x$host != x$target ]]
2081 tmake_file=rs6000/t-xnewas
2083 tmake_file=rs6000/t-newas
2085 xmake_file=rs6000/x-aix31
2095 tm_file=rs6000/mach.h
2096 xm_file=rs6000/xm-mach.h
2097 xmake_file=rs6000/x-mach
2101 tm_file=rs6000/lynx.h
2102 xm_file=rs6000/xm-lynx.h
2103 tmake_file=rs6000/t-rs6000
2104 xmake_file=rs6000/x-lynx
2116 xm_file=sparc/xm-pbd.h
2118 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2119 tm_file=sparc/vxsparc.h
2120 tmake_file=sparc/t-vxsparc
2124 tmake_file=sparc/t-sparcbare
2125 tm_file="sparc/aout.h libgloss.h"
2128 tm_file=sparc/netbsd.h
2129 xm_file=sparc/xm-netbsd.h
2130 # On NetBSD, the headers are already okay.
2131 fixincludes=Makefile.in
2132 tmake_file=t-libc-ok
2138 sparc-*-linux*aout*) # Sparc's running Linux, a.out
2139 xm_file=sparc/xm-linux.h
2140 tm_file=sparc/linux-aout.h
2142 fixincludes=Makefile.in #On Linux, the headers are ok already.
2145 objc_thread_file=${enable_objcthreads-single}
2147 sparc-*-linux*) # Sparc's running Linux, ELF
2148 xm_file=sparc/xm-linux.h
2149 tm_file=sparc/linux.h
2151 fixincludes=Makefile.in #On Linux, the headers are ok already.
2154 # Don't use it. Linux uses a slightly different one.
2155 # The real one comes with the Linux C library.
2156 #extra_parts="crtbegin.o crtend.o"
2157 objc_thread_file=${enable_objcthreads-single}
2160 if [[ x$gas = xyes ]]
2162 tm_file=sparc/lynx.h
2164 tm_file=sparc/lynx-ng.h
2166 xm_file=sparc/xm-lynx.h
2167 tmake_file=sparc/t-sunos41
2171 tmake_file="sparc/t-sparcbare t-rtems"
2172 tm_file=sparc/rtems.h
2175 tm_file=sparc/sol2.h
2176 xm_file=sparc/xm-sol2.h
2177 tmake_file=sparc/t-sol2
2178 xmake_file=sparc/x-sysv4
2179 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2180 fixincludes=fixinc.svr4
2182 objc_thread_file=${enable_objcthreads-solaris}
2185 tm_file=sparc/sunos4.h
2186 tmake_file=sparc/t-sunos40
2190 tm_file=sparc/sunos4.h
2191 tmake_file=sparc/t-sunos41
2195 tm_file=sparc/sun4o3.h
2199 tm_file=sparc/sysv4.h
2200 xm_file=sparc/xm-sysv4.h
2202 xmake_file=sparc/x-sysv4
2203 extra_parts="crtbegin.o crtend.o"
2206 xm_file=sparc/xm-sol2.h
2207 tm_file=sparc/vxsim.h
2208 tmake_file=sparc/t-vxsparc
2209 xmake_file=sparc/x-sysv4
2212 tm_file="sparc/splet.h libgloss.h"
2213 tmake_file=sparc/t-splet
2216 tm_file="sparc/litecoff.h libgloss.h"
2217 tmake_file=sparc/t-sparclite
2220 tm_file="sparc/lite.h aoutos.h libgloss.h"
2221 tmake_file=sparc/t-sparclite
2224 tmake_file=sparc/t-sp64
2225 tm_file=sparc/sp64-aout.h
2228 tmake_file=sparc/t-sp64
2229 tm_file=sparc/sp64-elf.h
2230 extra_parts="crtbegin.o crtend.o"
2232 # This hasn't been upgraded to GCC 2.
2233 # tahoe-harris-*) # Harris tahoe, using COFF.
2234 # tm_file=tahoe/harris.h
2236 # tahoe-*-bsd*) # tahoe running BSD
2238 # This hasn't been upgraded to GCC 2.
2243 vax-*-bsd*) # vaxen running BSD
2247 vax-*-sysv*) # vaxen running system V
2248 tm_file="${tm_file} vax/vaxv.h"
2249 xm_file="${tm_file} vax/xm-vaxv.h"
2253 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2254 xm_file="${xm_file} xm-netbsd.h"
2255 tmake_file=t-libc-ok
2256 # On NetBSD, the headers are already okay.
2257 fixincludes=Makefile.in
2261 vax-*-ultrix*) # vaxen running ultrix
2262 tm_file="${tm_file} vax/ultrix.h"
2266 vax-*-vms*) # vaxen running VMS
2267 xm_file=vax/xm-vms.h
2271 vax-*-*) # vax default entry
2275 xm_file="${xm_file} xm-svr3"
2279 echo "Configuration $machine not supported" 1>&2
2286 ;; # Existing Linux/GNU systems do not use the GNU setup.
2288 # On the GNU system, the setup is just about the same on
2289 # each different CPU. The specific machines that GNU
2290 # supports are matched above and just set $cpu_type.
2291 xm_file=${cpu_type}/xm-gnu.h
2292 tm_file=${cpu_type}/gnu.h
2293 extra_parts="crtbegin.o crtend.o"
2294 # GNU always uses ELF.
2296 # GNU tools are the only tools.
2299 # On GNU, the headers are already okay.
2300 fixincludes=Makefile.in
2301 xmake_file=x-linux # These details are the same as Linux.
2302 tmake_file=t-gnu # These are not.
2305 fixincludes=fixinc.svr4
2306 xmake_try_sysv=x-sysv
2308 install_headers_dir=install-headers-cpio
2312 install_headers_dir=install-headers-cpio
2316 # Distinguish i[3456]86
2317 # Also, do not run mips-tfile on MIPS if using gas.
2318 # Process --with-cpu= for PowerPC/rs6000
2319 target_cpu_default2=
2322 target_cpu_default2=1
2325 target_cpu_default2=2
2328 target_cpu_default2=3
2331 if [[ x$gas = xyes ]]
2333 target_cpu_default2=4
2336 mips*-*-ecoff* | mips*-*-elf*)
2337 if [[ x$gas = xyes ]]
2339 if [[ x$gnu_ld = xyes ]]
2341 target_cpu_default2=20
2343 target_cpu_default2=16
2348 if [[ x$gas = xyes ]]
2350 target_cpu_default2=16
2353 powerpc*-*-* | rs6000-*-*)
2354 case "x$with_cpu" in
2358 xcommon | xpower | xpower2 | xpowerpc | xrios \
2359 | xrios2 | xrsc | xrsc1 | x403 | x601 | x602 \
2360 | x603 | x603e | x604 | x620 | xrs6000)
2361 target_cpu_default2="'\"$with_cpu\"'"
2365 echo "--with-cpu must be passed a value" 1>&2
2370 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2376 case ".$with_cpu" in
2378 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2380 .supersparc | .ultrasparc | .v7 | .v8)
2381 target_cpu_default2="TARGET_CPU_$with_cpu"
2384 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2391 if [[ x$target_cpu_default2 != x ]]
2393 if [[ x$target_cpu_default != x ]]
2395 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2397 target_cpu_default=$target_cpu_default2
2401 # No need for collect2 if we have the GNU linker.
2408 # Save data on machine being used to compile GCC in build_xm_file.
2409 # Save data on host machine in vars host_xm_file and host_xmake_file.
2410 if [[ x$pass1done = x ]]
2412 if [[ x"$xm_file" = x ]]
2413 then build_xm_file=$cpu_type/xm-$cpu_type.h
2414 else build_xm_file=$xm_file
2416 build_broken_install=$broken_install
2417 build_install_headers_dir=$install_headers_dir
2418 build_exeext=$exeext
2421 if [[ x$pass2done = x ]]
2423 if [[ x"$xm_file" = x ]]
2424 then host_xm_file=$cpu_type/xm-$cpu_type.h
2425 else host_xm_file=$xm_file
2427 if [[ x"$xmake_file" = x ]]
2428 then xmake_file=$cpu_type/x-$cpu_type
2430 host_xmake_file="$xmake_file"
2431 host_truncate_target=$truncate_target
2432 host_extra_gcc_objs=$extra_gcc_objs
2433 host_extra_objs=$extra_host_objs
2439 extra_objs="${host_extra_objs} ${extra_objs}"
2441 # Default the target-machine variables that were not explicitly set.
2442 if [[ x"$tm_file" = x ]]
2443 then tm_file=$cpu_type/$cpu_type.h; fi
2445 if [[ x$extra_headers = x ]]
2446 then extra_headers=; fi
2448 if [[ x"$xm_file" = x ]]
2449 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2451 md_file=$cpu_type/$cpu_type.md
2453 if [[ x$out_file = x ]]
2454 then out_file=$cpu_type/$cpu_type.c; fi
2456 if [[ x"$tmake_file" = x ]]
2457 then tmake_file=$cpu_type/t-$cpu_type
2460 if [[ x$float_format = x ]]
2461 then float_format=i64
2464 # Say what files are being used for the output code and MD file.
2465 echo "Using \`$srcdir/config/$out_file' to output insns."
2466 echo "Using \`$srcdir/config/$md_file' as machine description file."
2469 for f in $tm_file; do
2472 if [[ $count = ax ]]; then
2473 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2475 echo "Using the following target machine macro files:"
2476 for f in $tm_file; do
2477 echo " $srcdir/config/$f"
2482 for f in $host_xm_file; do
2485 if [[ $count = ax ]]; then
2486 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2488 echo "Using the following host machine macro files:"
2489 for f in $host_xm_file; do
2490 echo " $srcdir/config/$f"
2494 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2496 for f in $build_xm_file; do
2499 if [[ $count = ax ]]; then
2500 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2502 echo "Using the following build machine macro files:"
2503 for f in $build_xm_file; do
2504 echo " $srcdir/config/$f"
2509 if [[ x$objc_thread_file = x ]]
2510 then objc_thread_file=${enable_objcthreads-single}
2512 echo "Using \`$srcdir/objc/thr-${objc_thread_file}.c' as Objective-C Runtime thread file."
2514 # Set up the header files.
2515 # $links is the list of header files to create.
2516 # $vars is the list of shell variables with file names to include.
2517 vars="host_xm_file tm_file xm_file build_xm_file"
2518 links="config.h tm.h tconfig.h hconfig.h"
2521 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2524 while [[ -n "$vars" ]]
2526 # set file to car of files, files to cdr of files
2527 set $vars; var=$1; shift; vars=$*
2528 set $links; link=$1; shift; links=$*
2532 # Define TARGET_CPU_DEFAULT if the system wants one.
2533 # This substitutes for lots of *.h files.
2534 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2536 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2539 for file in `eval echo '$'$var`; do
2540 echo "#include \"$file\"" >>$link
2544 # Truncate the target if necessary
2545 if [[ x$host_truncate_target != x ]]; then
2546 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2549 # Get the version number from the toplevel
2550 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2552 # For the current directory and all of the language subdirectories,
2553 # do the rest of the script ...
2556 for lang in ${srcdir}/*/config-lang.in ..
2560 # The odd quoting in the next line works around
2561 # an apparent bug in bash 1.12 on linux.
2562 ${srcdir}/[[*]]/config-lang.in) ;;
2563 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2567 # Are we using gcc as the native compiler?
2569 *linux*) # All Linux's use gcc as the native compiler.
2570 prefix=$native_prefix
2574 # Make empty files to contain the specs and options for each language.
2575 # Then add #include lines to for a compiler that has specs and/or options.
2579 rm -f specs.h options.h
2580 touch specs.h options.h
2581 for subdir in . $subdirs
2583 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2584 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2585 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2587 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2588 echo "#include \"$subdir/lang-options.h\"" >>options.h
2589 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2593 # These (without "all_") are set in each config-lang.in.
2594 # `language' must be a single word so is spelled singularly.
2600 # List of language makefile fragments.
2605 rm -f Make-host Make-target Make-lang Make-hooks
2610 host_overrides="Make-host"
2611 target_overrides="Make-target"
2612 language_fragments="Make-lang"
2613 language_hooks="Make-hooks"
2616 for subdir in . $subdirs
2618 oldsrcdir=$savesrcdir
2620 # Re-adjust the path
2628 srcdir=$oldsrcdir/$subdir
2637 oldsrcdir=../${oldsrcdir}
2638 srcdir=$oldsrcdir/$subdir
2643 mainsrcdir=$oldsrcdir
2645 test -d $subdir || mkdir $subdir
2648 # Create Makefile.tem from Makefile.in.
2649 # Make it set VPATH if necessary so that the sources are found.
2650 # Also change its value of srcdir.
2651 # Also create a .gdbinit file which runs the one in srcdir
2652 # and tells GDB to look there for source files.
2654 . | ./$subdir | .././$subdir)
2656 cp Makefile.in Makefile.tem
2657 chmod +w Makefile.tem
2661 echo "VPATH = ${srcdir}" \
2662 | cat - ${srcdir}/Makefile.in \
2663 | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
2665 echo "dir ." > .gdbinit
2666 echo "dir ${srcdir}" >> .gdbinit
2667 if [[ x$gdb_needs_out_file_path = xyes ]]
2669 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
2671 if [[ "x$subdirs" != x ]]; then
2674 echo "dir ${srcdir}/$s" >> .gdbinit
2677 echo "source ${srcdir}/.gdbinit" >> .gdbinit
2681 # Conditionalize the makefile for this host machine.
2682 dep_host_xmake_file=
2683 rm -f Makefile.xx Makefile.ll
2685 for f in .. ${host_xmake_file}
2687 if [[ -f ${mainsrcdir}/config/$f ]]
2689 cat ${mainsrcdir}/config/$f >> Makefile.ll
2690 if [[ x"${merged_frags}" != x ]]
2692 merged_frags="${merged_frags} and "
2694 merged_frags="${merged_frags}${f}"
2695 cat ${mainsrcdir}/config/$f >> Make-host
2696 dep_host_xmake_file="${dep_host_xmake_file} \$(srcdir)/config/$f"
2699 if [[ x"${merged_frags}" != x ]]
2701 sed -e "/####host/ r Makefile.ll" Makefile.tem > Makefile.xx
2702 echo "Merged ${merged_frags}."
2704 mv Makefile.xx Makefile.tem
2708 # Add a definition for MAKE if system wants one.
2712 (echo "$SET_MAKE"; cat Makefile.tem) >Makefile.xx
2714 mv Makefile.xx Makefile.tem
2717 # Add a definition for INSTALL if system wants one.
2718 # This substitutes for lots of x-* files.
2719 if [[ x$build_broken_install = x ]]
2723 abssrcdir=`cd ${srcdir}; pwd`
2724 sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
2726 mv Makefile.xx Makefile.tem
2729 # Some of the following don't make sense in the language makefiles,
2730 # but rather than introduce another level of nesting, we leave them
2733 # Set EXTRA_HEADERS according to extra_headers.
2734 # This substitutes for lots of t-* files.
2736 if [[ "x$extra_headers" = x ]]
2739 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2740 for file in $extra_headers;
2742 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2745 sed "s|^EXTRA_HEADERS =|EXTRA_HEADERS = ${extra_headers_list}|" Makefile.tem > Makefile.xx
2747 mv Makefile.xx Makefile.tem
2750 # Set EXTRA_PASSES according to extra_passes.
2751 # This substitutes for lots of t-* files.
2752 if [[ "x$extra_passes" = x ]]
2756 sed "s/^EXTRA_PASSES =/EXTRA_PASSES = $extra_passes/" Makefile.tem > Makefile.xx
2758 mv Makefile.xx Makefile.tem
2761 # Set EXTRA_PARTS according to extra_parts.
2762 # This substitutes for lots of t-* files.
2763 if [[ "x$extra_parts" = x ]]
2767 sed "s/^EXTRA_PARTS =/EXTRA_PARTS = $extra_parts/" Makefile.tem > Makefile.xx
2769 mv Makefile.xx Makefile.tem
2772 # Set EXTRA_PROGRAMS according to extra_programs.
2773 if [[ "x$extra_programs" = x ]]
2777 sed "s/^EXTRA_PROGRAMS =/EXTRA_PROGRAMS = $extra_programs/" Makefile.tem > Makefile.xx
2779 mv Makefile.xx Makefile.tem
2782 # Set EXTRA_OBJS according to extra_objs.
2783 # This substitutes for lots of t-* files.
2784 if [[ "x$extra_objs" = x ]]
2788 sed "s|^EXTRA_OBJS =|EXTRA_OBJS = $extra_objs|" Makefile.tem > Makefile.xx
2790 mv Makefile.xx Makefile.tem
2793 # Set EXTRA_GCC_OBJS according to host_extra_gcc_objs.
2794 # This substitutes for lots of x-* files.
2795 if [[ "x$host_extra_gcc_objs" = x ]]
2799 sed "s|^EXTRA_GCC_OBJS =|EXTRA_GCC_OBJS = $host_extra_gcc_objs|"
2800 Makefile.tem > Makefile.xx
2802 mv Makefile.xx Makefile.tem
2805 # Add a definition of USE_COLLECT2 if system wants one.
2806 # Also tell toplev.c what to do.
2807 # This substitutes for lots of t-* files.
2808 if [[ x$use_collect2 = x ]]
2813 will_use_collect2="ld"
2814 maybe_use_collect2="-DUSE_COLLECT2"
2816 (echo "USE_COLLECT2 = ld"; echo "MAYBE_USE_COLLECT2 = -DUSE_COLLECT2")\
2817 | cat - Makefile.tem > Makefile.xx
2819 mv Makefile.xx Makefile.tem
2823 # Set MD_DEPS if the real md file is in md.pre-cpp.
2824 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2825 # for line oriented comments, so we must always use a GNU cpp. If
2826 # building gcc with a cross compiler, use the cross compiler just
2827 # built. Otherwise, we can use the cpp just built.
2829 if [[ "x$md_cppflags" = x ]]
2831 md_file_sub=$srcdir/config/$md_file
2834 (if [[ x$host = x$build ]] ; then
2835 echo "MD_DEPS = $(md_file) cpp" ; echo "MD_CPP = ./cpp"
2837 echo "MD_DEPS = md.pre-cpp" ; echo "MD_CPP = \$(HOST_CC) -x c -E"
2840 echo "MD_CPPFLAGS = $md_cppflags") | \
2841 cat - Makefile.tem | sed -e "s|^MD_FILE[[ ]]*=.*|MD_FILE = md|" > Makefile.xx
2843 mv Makefile.xx Makefile.tem
2846 # If we have gas in the build tree, make a link to it.
2847 if [[ -f ../gas/Makefile ]]; then
2848 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2851 # If we have ld in the build tree, make a link to it.
2852 if [[ -f ../ld/Makefile ]]; then
2853 if [[ x$use_collect2 = x ]]; then
2854 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2856 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2860 # If using -program-transform-name, override the installation names.
2861 if [[ "x${program_transform_set}" = "xyes" ]] ; then
2862 sed -e "s/^program_transform_name[[ ]]*=.*$/program_transform_name =
2863 $program_transform_name/" \
2864 -e "s/^program_transform_cross_name[[
2865 ]]*=.*$/program_transform_cross_name = $program_transform_name/" \
2866 Makefile.tem > Makefile.xx
2868 mv Makefile.xx Makefile.tem
2871 # Conditionalize the makefile for this target machine.
2873 rm -f Makefile.xx Makefile.ll
2875 for f in .. ${tmake_file}
2877 if [[ -f ${mainsrcdir}/config/$f ]]
2879 cat ${mainsrcdir}/config/$f >> Make-target
2880 dep_tmake_file="${dep_tmake_file} \$(srcdir)/config/$f"
2881 cat ${mainsrcdir}/config/$f >> Makefile.ll
2882 if [[ x"${merged_frags}" != x ]]
2884 merged_frags="${merged_frags} and "
2886 merged_frags="${merged_frags}$f"
2889 if [[ x"${merged_frags}" != x ]]
2891 sed -e "/####target/ r Makefile.ll" Makefile.tem > Makefile.xx
2892 echo "Merged ${merged_frags}."
2894 mv Makefile.xx Makefile.tem
2898 # If this is the top level Makefile, add the language fragments.
2899 # Languages are added via two mechanisms. Some information must be
2900 # recorded in makefile variables, these are defined in config-lang.in.
2901 # We accumulate them and plug them into the main Makefile.
2902 # The other mechanism is a set of hooks for each of the main targets
2903 # like `clean', `install', etc.
2904 if [[ $subdir = . ]]
2906 rm -f Makefile.xx Makefile.ll
2908 for s in .. $subdirs
2917 . ${mainsrcdir}/$s/config-lang.in
2918 if [[ "x$language" = x ]]
2920 echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2923 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
2924 all_languages="$all_languages $language"
2925 if [[ "x$boot_language" = xyes ]]
2927 all_boot_languages="$all_boot_languages $language"
2929 all_compilers="$all_compilers $compilers"
2930 all_stagestuff="$all_stagestuff $stagestuff"
2931 all_diff_excludes="$all_diff_excludes $diff_excludes"
2932 all_headers="$all_headers $headers"
2933 all_lib2funcs="$all_lib2funcs $lib2funcs"
2935 cat ${mainsrcdir}/$s/Make-lang.in >> Make-lang
2936 cat ${mainsrcdir}/$s/Make-lang.in >> Makefile.ll
2939 sed -e "/####language fragments/ r Makefile.ll" Makefile.tem > Makefile.xx
2941 mv Makefile.xx Makefile.tem
2942 subdirs=`echo $subdirs`
2943 sed -e "s|^SUBDIRS[[ ]]*=.*$|SUBDIRS = $subdirs|" \
2944 -e "s|^LANGUAGES[[ ]]*=[[ ]]*\(.*\)$|LANGUAGES = \1 $all_languages|" \
2945 -e "s|^BOOT_LANGUAGES[[ ]]*=[[ ]]*\(.*\)$|BOOT_LANGUAGES = \1 $all_boot_languages|" \
2946 -e "s|^COMPILERS[[ ]]*=[[ ]]*\(.*\)$|COMPILERS = \1 $all_compilers|" \
2947 -e "s|^LANG_MAKEFILES[[ ]]*=.*$|LANG_MAKEFILES = $all_lang_makefiles|" \
2948 -e "s|^LANG_STAGESTUFF[[ ]]*=.*$|LANG_STAGESTUFF = $all_stagestuff|" \
2949 -e "s|^LANG_DIFF_EXCLUDES[[ ]]*=.*$|LANG_DIFF_EXCLUDES = $all_diff_excludes|" \
2950 -e "s|^LANG_EXTRA_HEADERS[[ ]]*=.*$|LANG_EXTRA_HEADERS = $all_headers|" \
2951 -e "s|^LANG_LIB2FUNCS[[ ]]*=.*$|LANG_LIB2FUNCS = $all_lib2funcs|" \
2952 Makefile.tem > Makefile.xx
2954 mv Makefile.xx Makefile.tem
2956 # Since we can't use `::' targets, we link each language in
2957 # with a set of hooks, reached indirectly via lang.${target}.
2959 target_list="all.build all.cross start.encap rest.encap \
2961 install-normal install-common install-info install-man \
2963 mostlyclean clean distclean extraclean maintainer-clean \
2964 stage1 stage2 stage3 stage4"
2966 for t in $target_list
2969 for l in .. $all_languages
2971 if [[ $l != ".." ]]; then
2975 echo "lang.$t: $x" >> Make-hooks
2976 echo "lang.$t: $x" >> Makefile.ll
2978 sed -e "/####language hooks/ r Makefile.ll" Makefile.tem > Makefile.xx
2980 mv Makefile.xx Makefile.tem
2983 # If the host doesn't support symlinks, modify CC in
2984 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2985 # Otherwise, we can use "CC=$(CC)".
2987 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2989 cc_set_by_configure="\$(CC)"
2990 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2991 sed -e 's,CC=set-by-configure,CC=$(CC),' \
2992 Makefile.tem > Makefile.xx
2993 sed -e 's,STAGE_PREFIX=set-by-configure,STAGE_PREFIX=$(STAGE_PREFIX),' \
2994 Makefile.xx > Makefile.yy
2996 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`,"
2998 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`,"
2999 sed -e "s,CC=set-by-configure,CC=\`case '\$(CC)' in *stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`," \
3000 Makefile.tem > Makefile.xx
3001 sed -e "s,STAGE_PREFIX=set-by-configure,STAGE_PREFIX=\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`," \
3002 Makefile.xx > Makefile.yy
3004 rm -f Makefile.tem Makefile.xx
3005 mv Makefile.yy Makefile.tem
3008 if [[ "x$all_languages" != x ]]
3010 # Missing space after `Merged' is intentional.
3011 echo "Merged$all_languages fragment(s)."
3014 # Otherwise, this is a language subdirectory. If the host supports
3015 # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
3016 # installation procedure can still use CC="stage1/xgcc -Bstage1/".
3017 # If the host doesn't support symlinks, FLAGS_TO_PASS has been
3018 # modified to solve the problem there.
3020 for t in stage1 stage2 stage3 stage4 include
3023 $symbolic_link ../$t $t 2>/dev/null
3027 out_object_file=`basename $out_file .c`.o
3029 if [[ $subdir = . ]]
3032 for f in $tm_file; do
3033 tm_file_list="${tm_file_sub} \$(srcdir)/config/$f"
3037 for f in $host_xm_file; do
3038 host_xm_file_list="${host_xm_file_sub} \$(srcdir)/config/$f"
3042 for f in $build_xm_file; do
3043 build_xm_file_list="${build_xm_file_sub} \$(srcdir)/config/$f"
3047 # Remove all formfeeds, since some Makes get confused by them.
3048 # Also arrange to give the variables `target', `host_xmake_file',
3049 # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
3050 # `out_file', `out_object', `md_file', `lang_specs_files',
3051 # `lang_options_files', `INSTALL_HEADERS_DIR', and `CROSS_FLOAT_H'
3052 # values in the Makefile from the values they have in this script.
3054 rm -f aux-output.c aux-output.o md
3055 # Create an empty Makefile.sed first, to work around a Nextstep 3.3 bug.
3056 echo 's|
\f||' > Makefile.sed
3058 echo 's|
\f||' > Makefile.sed
3059 echo "s|^target=.*$|target=${target}|" >> Makefile.sed
3060 echo "s|^target_alias=.*$|target_alias=${target}|" >> Makefile.sed
3061 echo "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" >> Makefile.sed
3062 echo "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" >> Makefile.sed
3063 echo "s|^version=.*$|version=${version}|" >> Makefile.sed
3064 echo "s|^version=.*$|version=${version}|" >> Makefile.sed
3065 echo "s|^out_file=.*$|out_file=${srcdir}/config/${out_file}|" >> Makefile.sed
3066 echo "s|^out_object_file=.*$|out_object_file=${out_object_file}|" >> Makefile.sed
3067 echo "s|^md_file=.*$|md_file=${md_file}|" >> Makefile.sed
3069 for f in $tm_file; do
3070 tm_file_sub="${tm_file_sub} ${srcdir}/config/$f"
3072 echo "s|^tm_file=.*$|tm_file=${tm_file_sub}|" >> Makefile.sed
3074 for f in $host_xm_file; do
3075 host_xm_file_sub="${host_xm_file_sub} ${srcdir}/config/$f"
3077 echo "s|^host_xm_file=.*$|host_xm_file=${host_xm_file_sub}|" >> Makefile.sed
3079 for f in $build_xm_file; do
3080 build_xm_file_sub="${build_xm_file_sub} ${srcdir}/config/$f"
3082 echo "s|^build_xm_file=.*$|build_xm_file=${build_xm_file_sub}|" >> Makefile.sed
3083 echo "s|^lang_specs_files=.*$|lang_specs_files=${lang_specs_files}|" >> Makefile.sed
3084 echo "s|^lang_options_files=.*$|lang_options_files=${lang_options_files}|" >> Makefile.sed
3085 echo "s|^OBJC_THREAD_FILE=.*$|OBJC_THREAD_FILE=thr-${objc_thread_file}|" >> Makefile.sed
3086 echo "s|^prefix[[ ]]*=.*|prefix = $prefix|" >> Makefile.sed
3087 echo "s|^local_prefix[[ ]]*=.*|local_prefix = $local_prefix|" >> Makefile.sed
3088 echo "s|^exec_prefix[[ ]]*=.*|exec_prefix = $exec_prefix|" >> Makefile.sed
3089 echo "s|^FIXINCLUDES[[ ]]*=.*|FIXINCLUDES = $fixincludes|" >> Makefile.sed
3090 echo "s|^INSTALL_HEADERS_DIR[[ ]]*=.*$|INSTALL_HEADERS_DIR = ${build_install_headers_dir}|" >> Makefile.sed
3091 echo "s|^exeext[[ ]]*=.*$|exeext = ${build_exeext}|" >> Makefile.sed
3092 echo "s|^CROSS_FLOAT_H[[ ]]*=.*|CROSS_FLOAT_H=\$(srcdir)/config/float-${float_format}.h|" >> Makefile.sed
3093 sed -f Makefile.sed Makefile.tem > Makefile.xx
3094 rm -f Makefile.tem Makefile.sed
3095 mv Makefile.xx Makefile.tem
3097 # Install Makefile for real, after making final changes.
3098 # Define macro CROSS_COMPILE in compilation
3099 # if this is a cross-compiler.
3100 # Also use all.cross instead of all.internal
3101 # and add cross-make to Makefile.
3102 if [[ x$host != x$target ]]
3104 cross_defines="CROSS=-DCROSS_COMPILE"
3105 cross_overrides="./cross-make"
3107 echo "CROSS=-DCROSS_COMPILE" > Makefile.xx
3108 sed -e "/####cross/ r ${mainsrcdir}/cross-make" Makefile.tem >> Makefile.xx
3110 mv Makefile.xx Makefile.tem
3113 # When building gcc with a cross-compiler, we need to fix a few things.
3114 # This must come after cross-make as we want all.build to override
3116 if [[ x$build != x$host ]]
3118 build_overrides="./build-make"
3120 echo "build= $build" > Makefile.xx
3121 echo "host= $host" >> Makefile.xx
3122 sed -e "s|objc-runtime$||" \
3123 -e "/####build/ r ${mainsrcdir}/build-make" Makefile.tem >> Makefile.xx
3125 mv Makefile.xx Makefile.tem
3129 mv Makefile.tem Makefile
3131 if [[ $subdir != . ]]
3133 echo "Created \`$subdir/Makefile'."
3137 done # end of current-dir SUBDIRS loop
3141 # Substitute configuration variables
3143 AC_SUBST(all_languages)
3144 AC_SUBST(all_boot_languages)
3145 AC_SUBST(all_compilers)
3146 AC_SUBST(all_lang_makefiles)
3147 AC_SUBST(all_stagestuff)
3148 AC_SUBST(all_diff_excludes)
3149 AC_SUBST(all_lib2funcs)
3150 AC_SUBST(all_headers)
3151 AC_SUBST(extra_passes)
3152 AC_SUBST(extra_programs)
3153 AC_SUBST(extra_parts)
3154 AC_SUBST(extra_objs)
3155 AC_SUBST(host_extra_gcc_objs)
3156 AC_SUBST(extra_headers_list)
3157 AC_SUBST(dep_host_xmake_file)
3158 AC_SUBST(dep_tmake_file)
3160 AC_SUBST(out_object_file)
3162 AC_SUBST(tm_file_list)
3163 AC_SUBST(build_xm_file_list)
3164 AC_SUBST(host_xm_file_list)
3165 AC_SUBST(lang_specs_files)
3166 AC_SUBST(lang_options_files)
3167 AC_SUBST(objc_thread_file)
3169 AC_SUBST(local_prefix)
3170 AC_SUBST(fixincludes)
3171 AC_SUBST(build_install_headers_dir)
3173 AC_SUBST(float_format)
3174 AC_SUBST(will_use_collect2)
3175 AC_SUBST(maybe_use_collect2)
3176 AC_SUBST(cc_set_by_configure)
3177 AC_SUBST(stage_prefix_set_by_configure)
3179 AC_SUBST_FILE(target_overrides)
3180 AC_SUBST_FILE(host_overrides)
3181 AC_SUBST(cross_defines)
3182 AC_SUBST_FILE(cross_overrides)
3183 AC_SUBST_FILE(build_overrides)
3184 AC_SUBST_FILE(language_fragments)
3185 AC_SUBST_FILE(language_hooks)
3187 # Echo that links are built
3188 if [[ x$host = x$target ]]
3196 if [[ x$host != x$build ]]
3198 str3=" on a $build system"
3201 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3206 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3208 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3210 echo " ${str2}${str3}." 1>&2
3213 # Configure the subdirectories
3214 # AC_CONFIG_SUBDIRS($subdirs)
3216 # Create the Makefile