1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 # Initialization and defaults
25 AC_CONFIG_HEADER(config.h:config.in)
33 # Check for additional parameters
37 [ --with-gnu-ld arrange to work with GNU ld.],
43 [ --with-gnu-as arrange to work with GNU as.],
49 [ --with-stabs arrange to use stabs instead of host debug format.],
55 [ --with-elf arrange to use ELF instead of host debug format.],
59 # Specify the local prefix
60 AC_ARG_WITH(local-prefix,
61 [ --with-local-prefix=DIR specifies directory to put local include.],
62 local_prefix=$with_local_prefix,
63 local_prefix=/usr/local)
65 # Default local prefix if it is empty
66 if [[ x$local_prefix = x ]]; then
67 local_prefix=/usr/local
70 # Specify the g++ header file directory
71 AC_ARG_WITH(gxx-include-dir,
72 [ --with-gxx-include-dir=DIR
73 specifies directory to put g++ header files.],
74 gxx_include_dir=$with_gxx_include_dir,
75 gxx_include_dir='${prefix}/include/g++')
77 # Default g++ header file directory if it is empty
78 if [[ x$gxx_include_dir = x ]]; then
79 gxx_include_dir='${prefix}/include/g++'
82 # Enable use of cpplib for C.
83 AC_ARG_ENABLE(c-cpplib,
84 [ --enable-c-cpplib Use cpplib for C.],
85 if [[[ x$enable_c_cpplib != xno ]]]; then
86 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
87 extra_c_flags=-DUSE_CPPLIB=1
91 # Pass with no value to take the default
92 # Pass with a value to specify a thread package
93 AC_ARG_ENABLE(threads,
94 [ --enable-threads enable thread usage for target GCC.
95 --enable-threads=LIB use LIB thread package for target GCC.],
96 if [[[ x$enable_threads = xno ]]]; then
101 # Check if a valid thread package
102 case x${enable_threads} in
111 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
113 thread_file=$enable_threads
116 echo "$enable_threads is an unknown thread package" 1>&2
121 # Determine the host, build, and target systems
124 # Find some useful tools
132 # Find the native compiler
136 AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
138 GCC_NEED_DECLARATION(malloc)
139 GCC_NEED_DECLARATION(realloc)
140 GCC_NEED_DECLARATION(calloc)
141 GCC_NEED_DECLARATION(free)
150 build_install_headers_dir=install-headers-tar
154 host_truncate_target=
156 # Decode the host machine, then the target machine.
157 # For the host machine, we save the xm_file variable as host_xm_file;
158 # then we decode the target machine and forget everything else
159 # that came from the host machine.
160 for machine in $build $host $target; do
173 # Set this to force installation and use of collect2.
175 # Set this to override the default target model.
177 # Set this to control which fixincludes program to use.
178 fixincludes=fixincludes
179 # Set this to control how the header file directory is installed.
180 install_headers_dir=install-headers-tar
181 # Set this to a non-empty list of args to pass to cpp if the target
182 # wants its .md file passed through cpp.
184 # Set this if directory names should be truncated to 14 characters.
186 # Set this if gdb needs a dir command with `dirname $out_file`
187 gdb_needs_out_file_path=
188 # Set this if the build machine requires executables to have a
192 # Set default cpu_type, tm_file and xm_file so it can be updated in
193 # each machine entry.
194 cpu_type=`echo $machine | sed 's/-.*$//'`
228 tm_file=${cpu_type}/${cpu_type}.h
229 xm_file=${cpu_type}/xm-${cpu_type}.h
232 # Support site-specific machine types.
234 cpu_type=`echo $machine | sed -e 's/-.*//'`
235 rest=`echo $machine | sed -e "s/$cpu_type-//"`
236 xm_file=${cpu_type}/xm-$rest.h
237 tm_file=${cpu_type}/$rest.h
238 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
239 then xmake_file=${cpu_type}/x-$rest; \
242 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
243 then tmake_file=${cpu_type}/t-$rest; \
249 a29k-*-bsd* | a29k-*-sym1*)
250 tm_file="${tm_file} a29k/unix.h"
251 xm_file=a29k/xm-unix.h
252 xmake_file=a29k/x-unix
255 a29k-*-udi | a29k-*-coff)
256 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
257 tmake_file=a29k/t-a29kbare
260 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
261 tmake_file=a29k/t-vx29k
262 extra_parts="crtbegin.o crtend.o"
264 a29k-*-*) # Default a29k environment.
267 alpha*-*-linux-gnuecoff*)
268 tm_file="${tm_file} alpha/linux.h"
269 xm_file="${xm_file} alpha/xm-linux.h"
270 target_cpu_default="MASK_GAS"
273 fixincludes=Makefile.in
276 alpha*-*-linux-gnulibc1*)
277 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
278 xm_file="${xm_file} alpha/xm-linux.h"
279 target_cpu_default="MASK_GAS"
280 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
282 fixincludes=Makefile.in
284 if [[ x$enable_threads = xyes ]]; then
289 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
290 xm_file="${xm_file} alpha/xm-linux.h"
291 target_cpu_default="MASK_GAS"
292 tmake_file="t-linux alpha/t-linux"
294 fixincludes=Makefile.in
296 if [[ x$enable_threads = xyes ]]; then
300 alpha*-dec-osf[[456789]]*)
301 if [[ x$stabs = xyes ]]
303 tm_file="${tm_file} dbx.h"
305 if [[ x$gas != xyes ]]
307 extra_passes="mips-tfile mips-tdump"
310 # Some versions of OSF4 (specifically X4.0-9 296.7) have
311 # a broken tar, so we use cpio instead.
314 install_headers_dir=install-headers-cpio
318 alpha*-dec-osf[[23]]*)
319 tm_file="${tm_file} alpha/osf2or3.h"
320 if [[ x$stabs = xyes ]]
322 tm_file="${tm_file} dbx.h"
324 if [[ x$gas != xyes ]]
326 extra_passes="mips-tfile mips-tdump"
331 tm_file="${tm_file} alpha/osf12.h"
332 if [[ x$stabs = xyes ]]
334 tm_file="${tm_file} dbx.h"
336 if [[ x$gas != xyes ]]
338 extra_passes="mips-tfile mips-tdump"
343 if [[ x$stabs = xyes ]]
345 tm_file="${tm_file} dbx.h"
347 if [[ x$gas != xyes ]]
349 extra_passes="mips-tfile mips-tdump"
354 tm_file="${tm_file} alpha/win-nt.h"
355 target_cpu_default=MASK_WINDOWS_NT
356 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
358 xmake_file=winnt/x-winnt
359 extra_host_objs=oldnames.o
360 extra_gcc_objs="spawnv.o oldnames.o"
361 fixincludes=fixinc.winnt
362 if [[ x$gnu_ld != xyes ]]
364 extra_programs=ld.exe
366 if [[ x$enable_threads = xyes ]]; then
372 xm_file="${xm_file} alpha/xm-vms.h"
373 tmake_file=alpha/t-vms
374 fixincludes=Makefile.in
376 arm-*-coff* | armel-*-coff*)
378 tmake_file=arm/t-bare
380 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
381 tm_file=arm/riscix1-1.h
384 arm-*-riscix*) # Acorn RISC machine
385 if [[ x$gas = xyes ]]
387 tm_file=arm/rix-gas.h
391 xmake_file=arm/x-riscix
392 tmake_file=arm/t-riscix
395 arm-semi-aout | armel-semi-aout)
397 tmake_file=arm/t-semi
398 fixincludes=Makefile.in # There is nothing to fix
400 arm-semi-aof | armel-semi-aof)
401 tm_file=arm/semiaof.h
402 tmake_file=arm/t-semiaof
403 fixincludes=Makefile.in # There is nothing to fix
407 xm_file=arm/xm-netbsd.h
408 tmake_file=arm/t-netbsd
409 # On NetBSD, the headers are already okay.
410 fixincludes=Makefile.in
413 arm-*-linux-gnuaout*) # ARM Linux
415 xm_file=arm/xm-linux.h
417 tm_file=arm/linux-gas.h
418 tmake_file=arm/t-linux
419 fixincludes=Makefile.in
425 c1-convex-*) # Convex C1
428 fixincludes=Makefile.in
430 c2-convex-*) # Convex C2
433 fixincludes=Makefile.in
438 fixincludes=Makefile.in
443 fixincludes=Makefile.in
446 target_cpu_default=16
448 fixincludes=Makefile.in
450 clipper-intergraph-clix*)
451 tm_file="${tm_file} svr3.h clipper/clix.h"
452 xm_file=clipper/xm-clix.h
453 xmake_file=clipper/x-clix
454 extra_headers=va-clipper.h
455 extra_parts="crtbegin.o crtend.o"
456 install_headers_dir=install-headers-cpio
463 # This hasn't been upgraded to GCC 2.
464 # fx80-alliant-*) # Alliant FX/80
470 if [[ x$enable_haifa != xno ]]; then
473 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
474 xm_file=pa/xm-papro.h
478 if [[ x$enable_haifa != xno ]]; then
482 tm_file="${tm_file} pa/pa-osf.h"
484 fixincludes=Makefile.in
487 if [[ x$enable_haifa != xno ]]; then
490 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
491 xm_file=pa/xm-papro.h
495 if [[ x$enable_haifa != xno ]]; then
498 tm_file="${tm_file} pa/pa-osf.h"
500 fixincludes=Makefile.in
503 if [[ x$enable_haifa != xno ]]; then
508 fixincludes=Makefile.in
511 if [[ x$enable_haifa != xno ]]; then
515 fixincludes=Makefile.in
518 if [[ x$enable_haifa != xno ]]; then
521 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
522 xm_file=pa/xm-pahpux.h
523 xmake_file=pa/x-pa-hpux
524 if [[ x$gas = xyes ]]
526 tm_file="${tm_file} pa/gas.h"
528 install_headers_dir=install-headers-cpio
531 hppa1.0-*-hpux8.0[[0-2]]*)
532 if [[ x$enable_haifa != xno ]]; then
535 tm_file="${tm_file} pa/pa-hpux.h"
536 xm_file=pa/xm-pahpux.h
537 xmake_file=pa/x-pa-hpux
538 if [[ x$gas = xyes ]]
540 tm_file="${tm_file} pa/pa-gas.h"
542 tm_file="pa/pa-oldas.h ${tm_file}"
544 install_headers_dir=install-headers-cpio
547 hppa1.1-*-hpux8.0[[0-2]]*)
548 if [[ x$enable_haifa != xno ]]; then
552 tm_file="${tm_file} pa/pa-hpux.h"
553 xm_file=pa/xm-pahpux.h
554 xmake_file=pa/x-pa-hpux
555 if [[ x$gas = xyes ]]
557 tm_file="${tm_file} pa/pa-gas.h"
559 tm_file="pa/pa-oldas.h ${tm_file}"
561 install_headers_dir=install-headers-cpio
565 if [[ x$enable_haifa != xno ]]; then
569 tm_file="${tm_file} pa/pa-hpux.h"
570 xm_file=pa/xm-pahpux.h
571 xmake_file=pa/x-pa-hpux
572 if [[ x$gas = xyes ]]
574 tm_file="${tm_file} pa/pa-gas.h"
576 install_headers_dir=install-headers-cpio
580 if [[ x$enable_haifa != xno ]]; then
583 tm_file="${tm_file} pa/pa-hpux.h"
584 xm_file=pa/xm-pahpux.h
585 xmake_file=pa/x-pa-hpux
586 if [[ x$gas = xyes ]]
588 tm_file="${tm_file} pa/pa-gas.h"
590 install_headers_dir=install-headers-cpio
594 if [[ x$enable_haifa != xno ]]; then
598 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
599 xm_file=pa/xm-pahpux.h
600 xmake_file=pa/x-pa-hpux
601 if [[ x$gas = xyes ]]
603 tm_file="${tm_file} pa/pa-gas.h"
605 install_headers_dir=install-headers-cpio
609 if [[ x$enable_haifa != xno ]]; then
612 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
613 xm_file=pa/xm-pahpux.h
614 xmake_file=pa/x-pa-hpux
615 if [[ x$gas = xyes ]]
617 tm_file="${tm_file} pa/pa-gas.h"
619 install_headers_dir=install-headers-cpio
623 if [[ x$enable_haifa != xno ]]; then
627 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
628 xm_file=pa/xm-pahpux.h
629 xmake_file=pa/x-pa-hpux
630 if [[ x$gas = xyes ]]
632 tm_file="${tm_file} pa/pa-gas.h"
634 install_headers_dir=install-headers-cpio
638 if [[ x$enable_haifa != xno ]]; then
641 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
642 xm_file=pa/xm-pahpux.h
643 xmake_file=pa/x-pa-hpux
644 if [[ x$gas = xyes ]]
646 tm_file="${tm_file} pa/pa-gas.h"
648 install_headers_dir=install-headers-cpio
652 if [[ x$enable_haifa != xno ]]; then
656 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
657 xm_file=pa/xm-pahpux.h
658 xmake_file=pa/x-pa-hpux
659 if [[ x$gas = xyes ]]
661 tm_file="${tm_file} pa/pa-gas.h"
663 install_headers_dir=install-headers-cpio
667 if [[ x$enable_haifa != xno ]]; then
670 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
671 xm_file=pa/xm-pahpux.h
672 xmake_file=pa/x-pa-hpux
673 if [[ x$gas = xyes ]]
675 tm_file="${tm_file} pa/pa-gas.h"
677 install_headers_dir=install-headers-cpio
681 if [[ x$enable_haifa != xno ]]; then
686 fixincludes=Makefile.in
690 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
691 if [[ x$gas = xyes ]]
693 tm_file=i386/aix386.h
694 extra_parts="crtbegin.o crtend.o"
695 tmake_file=i386/t-crtstuff
697 tm_file=i386/aix386ng.h
700 xm_file=i386/xm-aix.h
701 xmake_file=i386/x-aix
703 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
704 xm_file=i386/xm-sysv4.h
705 xmake_file=i386/x-ncr3000
706 if [[ x$stabs = xyes -a x$gas = xyes ]]
708 tm_file=i386/sysv4gdb.h
712 extra_parts="crtbegin.o crtend.o"
713 tmake_file=i386/t-crtpic
717 xm_file=i386/xm-next.h
718 tmake_file=i386/t-next
719 xmake_file=i386/x-next
720 extra_objs=nextstep.o
721 if [[ x$enable_threads = xyes ]]; then
725 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
727 if [[ x$gas = xyes ]]
729 tm_file=i386/seq-gas.h
731 tm_file=i386/sequent.h
734 i[[3456]]86-sequent-ptx1*)
735 xm_file=i386/xm-sysv3.h
736 xmake_file=i386/x-sysv3
737 tm_file=i386/seq-sysv3.h
738 tmake_file=i386/t-crtstuff
739 fixincludes=fixinc.ptx
740 extra_parts="crtbegin.o crtend.o"
741 install_headers_dir=install-headers-cpio
743 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
744 xm_file=i386/xm-sysv3.h
745 xmake_file=i386/x-sysv3
746 tm_file=i386/seq2-sysv3.h
747 tmake_file=i386/t-crtstuff
748 extra_parts="crtbegin.o crtend.o"
749 fixincludes=fixinc.ptx
750 install_headers_dir=install-headers-cpio
752 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
753 xm_file=i386/xm-sysv4.h
755 tm_file=i386/ptx4-i.h
757 extra_parts="crtbegin.o crtend.o"
758 fixincludes=fixinc.ptx
759 install_headers_dir=install-headers-cpio
761 i386-sun-sunos*) # Sun i386 roadrunner
762 xm_file=i386/xm-sun.h
767 tm_file=i386/i386-aout.h
768 tmake_file=i386/t-i386bare
770 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
771 tm_file=i386/bsd386.h
772 xm_file=i386/xm-bsd386.h
773 # tmake_file=t-libc-ok
776 tm_file=i386/386bsd.h
777 xm_file=i386/xm-bsd386.h
778 # tmake_file=t-libc-ok
779 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
782 i[[3456]]86-*-freebsdelf*)
783 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
784 xm_file=i386/xm-freebsd.h
785 # On FreeBSD, the headers are already ok.
786 fixincludes=Makefile.in
787 tmake_file=i386/t-freebsd
792 i[[3456]]86-*-freebsd*)
793 tm_file=i386/freebsd.h
794 xm_file=i386/xm-freebsd.h
795 # On FreeBSD, the headers are already ok.
796 fixincludes=Makefile.in
797 tmake_file=i386/t-freebsd
799 i[[3456]]86-*-netbsd*)
800 tm_file=i386/netbsd.h
801 xm_file=i386/xm-netbsd.h
802 # On NetBSD, the headers are already okay.
803 fixincludes=Makefile.in
807 tm_file=i386/i386-coff.h
808 tmake_file=i386/t-i386bare
810 i[[3456]]86-*-isc*) # 80386 running ISC system
811 xm_file=i386/xm-isc.h
813 i[[345]]86-*-isc[[34]]*)
814 xmake_file=i386/x-isc3
817 xmake_file=i386/x-isc
820 if [[ x$gas = xyes -a x$stabs = xyes ]]
822 tm_file=i386/iscdbx.h
823 tmake_file=i386/t-svr3dbx
824 extra_parts="svr3.ifile svr3z.ifile"
826 tm_file=i386/isccoff.h
827 tmake_file=i386/t-crtstuff
828 extra_parts="crtbegin.o crtend.o"
830 install_headers_dir=install-headers-cpio
832 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running Linux
833 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
834 xmake_file=x-linux-aout
835 tmake_file="t-linux-aout i386/t-crtstuff"
836 tm_file=i386/linux-oldld.h
837 fixincludes=Makefile.in #On Linux, the headers are ok already.
840 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running Linux
841 xm_file=i386/xm-linux.h # with a.out format
842 xmake_file=x-linux-aout
843 tmake_file="t-linux-aout i386/t-crtstuff"
844 tm_file=i386/linux-aout.h
845 fixincludes=Makefile.in #On Linux, the headers are ok already.
848 i[[3456]]86-*-linux-gnulibc1)
849 xm_file=i386/xm-linux.h # Intel 80386's running Linux
850 xmake_file=x-linux # with ELF format using the
851 tm_file=i386/linux.h # Linux C library 5
852 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
853 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
854 fixincludes=Makefile.in #On Linux, the headers are ok already.
856 if [[ x$enable_threads = xyes ]]; then
860 i[[3456]]86-*-linux-gnu*) # Intel 80386's running Linux
861 xm_file=i386/xm-linux.h # with ELF format using glibc 2
862 xmake_file=x-linux # aka Linux C library 6
864 tmake_file="t-linux i386/t-crtstuff"
865 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
866 fixincludes=Makefile.in #On Linux, the headers are ok already.
868 if [[ x$enable_threads = xyes ]]; then
874 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
875 xm_file=i386/xm-go32.h
877 tmake_file=i386/t-go32
879 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
882 fixincludes=Makefile.in
886 i[[3456]]86-*-lynxos*)
887 if [[ x$gas = xyes ]]
891 tm_file=i386/lynx-ng.h
893 xm_file=i386/xm-lynx.h
894 tmake_file=i386/t-i386bare
899 # tmake_file=t-libc-ok
902 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
903 if [[ x$elf = xyes ]]
905 tm_file=i386/osfelf.h
908 tm_file=i386/osfrose.h
911 xm_file=i386/xm-osf.h
912 xmake_file=i386/x-osfrose
913 tmake_file=i386/t-osf
916 i[[345]]86-go32-rtems*)
918 xm_file=i386/xm-go32.h
919 tm_file=i386/go32-rtems.h
920 tmake_file="i386/t-go32 t-rtems"
925 tmake_file="i386/t-i386bare t-rtems"
927 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
928 xm_file=i386/xm-sco5.h
929 xmake_file=i386/x-sco5
930 fixincludes=fixinc.sco
932 tmake_file=i386/t-sco5
933 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
935 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
936 xm_file=i386/xm-sco.h
937 xmake_file=i386/x-sco4
938 fixincludes=fixinc.sco
939 install_headers_dir=install-headers-cpio
940 if [[ x$stabs = xyes ]]
942 tm_file=i386/sco4dbx.h
943 tmake_file=i386/t-svr3dbx
944 extra_parts="svr3.ifile svr3z.rfile"
947 tmake_file=i386/t-crtstuff
948 extra_parts="crtbegin.o crtend.o"
952 i[[3456]]86-*-sco*) # 80386 running SCO system
953 xm_file=i386/xm-sco.h
954 xmake_file=i386/x-sco
955 install_headers_dir=install-headers-cpio
956 if [[ x$stabs = xyes ]]
958 tm_file=i386/scodbx.h
959 tmake_file=i386/t-svr3dbx
960 extra_parts="svr3.ifile svr3z.rfile"
963 extra_parts="crtbegin.o crtend.o"
964 tmake_file=i386/t-crtstuff
968 i[[3456]]86-*-solaris2*)
969 xm_file=i386/xm-sysv4.h
970 if [[ x$stabs = xyes ]]
972 tm_file=i386/sol2dbg.h
976 tmake_file=i386/t-sol2
977 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
979 fixincludes=fixinc.svr4
980 if [[ x$enable_threads = xyes ]]; then
981 thread_file='solaris'
984 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
985 xm_file=i386/xm-sysv4.h
987 if [[ x$stabs = xyes ]]
989 tm_file="${tm_file} dbx.h"
991 tmake_file=i386/t-crtpic
993 extra_parts="crtbegin.o crtend.o"
995 i[[3456]]86-*-sysv*) # Intel 80386's running system V
996 xm_file=i386/xm-sysv3.h
997 xmake_file=i386/x-sysv3
998 if [[ x$gas = xyes ]]
1000 if [[ x$stabs = xyes ]]
1002 tm_file=i386/svr3dbx.h
1003 tmake_file=i386/t-svr3dbx
1004 extra_parts="svr3.ifile svr3z.rfile"
1006 tm_file=i386/svr3gas.h
1007 extra_parts="crtbegin.o crtend.o"
1008 tmake_file=i386/t-crtstuff
1011 tm_file=i386/sysv3.h
1012 extra_parts="crtbegin.o crtend.o"
1013 tmake_file=i386/t-crtstuff
1016 i386-*-vsta) # Intel 80386's running VSTa kernel
1017 xm_file=i386/xm-vsta.h
1019 tmake_file=i386/t-vsta
1020 xmake_file=i386/x-vsta
1022 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1023 xm_file="${xm_file} i386/xm-cygwin32.h"
1024 tmake_file=i386/t-cygwin32
1025 tm_file=i386/cygwin32.h
1026 xmake_file=i386/x-cygwin32
1028 fixincludes=Makefile.in
1029 if [[ x$enable_threads = xyes ]]; then
1034 i[[3456]]86-*-mingw32)
1035 tm_file=i386/mingw32.h
1036 xm_file="${xm_file} i386/xm-mingw32.h"
1037 tmake_file=i386/t-cygwin32
1039 xmake_file=i386/x-cygwin32
1040 fixincludes=Makefile.in
1041 if [[ x$enable_threads = xyes ]]; then
1046 i[[3456]]86-*-winnt3*)
1047 tm_file=i386/win-nt.h
1048 out_file=i386/i386.c
1049 xm_file=i386/xm-winnt.h
1050 xmake_file=winnt/x-winnt
1051 tmake_file=i386/t-winnt
1052 extra_host_objs="winnt.o oldnames.o"
1053 extra_gcc_objs="spawnv.o oldnames.o"
1054 fixincludes=fixinc.winnt
1055 if [[ x$gnu_ld != xyes ]]
1057 extra_programs=ld.exe
1059 if [[ x$enable_threads = xyes ]]; then
1063 i[[3456]]86-dg-dgux)
1064 xm_file=i386/xm-dgux.h
1065 out_file=i386/dgux.c
1067 tmake_file=i386/t-dgux
1068 xmake_file=i386/x-dgux
1069 fixincludes=fixinc.dgux
1070 install_headers_dir=install-headers-cpio
1072 i860-alliant-*) # Alliant FX/2800
1073 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1074 xm_file="${xm_file} i860/xm-fx2800.h"
1075 xmake_file=i860/x-fx2800
1076 tmake_file=i860/t-fx2800
1077 extra_parts="crtbegin.o crtend.o"
1080 tm_file="${tm_file} i860/bsd.h"
1081 if [[ x$gas = xyes ]]
1083 tm_file="${tm_file} i860/bsd-gas.h"
1088 tm_file="${tm_file} i860/mach.h"
1089 tmake_file=t-libc-ok
1091 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1092 tm_file="${tm_file} svr3.h i860/paragon.h"
1093 xm_file="${xm_file} xm-svr3.h"
1097 tm_file="${tm_file} svr3.h i860/sysv3.h"
1098 xm_file="${tm_file} xm-svr3.h"
1099 xmake_file=i860/x-sysv3
1100 extra_parts="crtbegin.o crtend.o"
1103 tm_file="${tm_file} svr4.h i860/sysv4.h"
1104 xm_file="${xm_file} xm-svr3.h"
1105 xmake_file=i860/x-sysv4
1107 extra_parts="crtbegin.o crtend.o"
1109 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1110 tm_file="${tm_file} i960/vx960.h"
1111 tmake_file=i960/t-vxworks960
1115 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1116 tmake_file=i960/t-vxworks960
1120 tm_file="${tm_file} i960/vx960.h"
1121 tmake_file=i960/t-vxworks960
1125 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1126 tmake_file=i960/t-960bare
1130 tmake_file="i960/t-960bare t-rtems"
1131 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1134 i960-*-*) # Default i960 environment.
1138 extra_parts="crtinit.o crtfini.o"
1140 m68000-convergent-sysv*)
1142 xm_file=m68k/xm-3b1.h
1144 extra_headers=math-68881.h
1146 m68000-hp-bsd*) # HP 9000/200 running BSD
1147 tm_file=m68k/hp2bsd.h
1148 xmake_file=m68k/x-hp2bsd
1150 extra_headers=math-68881.h
1152 m68000-hp-hpux*) # HP 9000 series 300
1153 xm_file=m68k/xm-hp320.h
1154 if [[ x$gas = xyes ]]
1156 xmake_file=m68k/x-hp320g
1157 tm_file=m68k/hp310g.h
1159 xmake_file=m68k/x-hp320
1160 tm_file=m68k/hp310.h
1162 install_headers_dir=install-headers-cpio
1164 extra_headers=math-68881.h
1169 extra_headers=math-68881.h
1172 tm_file=m68k/sun2o4.h
1174 extra_headers=math-68881.h
1177 xm_file=m68k/xm-3b1.h
1178 if [[ x$gas = xyes ]]
1185 extra_headers=math-68881.h
1187 m68k-apple-aux*) # Apple Macintosh running A/UX
1188 xm_file=m68k/xm-aux.h
1189 tmake_file=m68k/t-aux
1190 install_headers_dir=install-headers-cpio
1191 extra_headers=math-68881.h
1192 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1194 if [[ "$gnu_ld" = yes ]]
1196 tm_file="${tm_file} m68k/auxgld.h"
1198 tm_file="${tm_file} m68k/auxld.h"
1200 if [[ "$gas" = yes ]]
1202 tm_file="${tm_file} m68k/auxgas.h"
1204 tm_file="${tm_file} m68k/auxas.h"
1206 tm_file="${tm_file} m68k/a-ux.h"
1209 tm_file=m68k/apollo68.h
1210 xmake_file=m68k/x-apollo68
1212 extra_headers=math-68881.h
1214 m68k-altos-sysv*) # Altos 3068
1215 if [[ x$gas = xyes ]]
1217 tm_file=m68k/altos3068.h
1218 xm_file=m68k/xm-altos3068.h
1220 echo "The Altos is supported only with the GNU assembler" 1>&2
1223 extra_headers=math-68881.h
1225 m68k-bull-sysv*) # Bull DPX/2
1226 if [[ x$gas = xyes ]]
1228 if [[ x$stabs = xyes ]]
1230 tm_file=m68k/dpx2cdbx.h
1232 tm_file=m68k/dpx2g.h
1237 xm_file=m68k/xm-m68kv.h
1238 xmake_file=m68k/x-dpx2
1240 extra_headers=math-68881.h
1242 m68k-atari-sysv4*) # Atari variant of V.4.
1243 tm_file=m68k/atari.h
1244 xm_file=m68k/xm-atari.h
1246 extra_parts="crtbegin.o crtend.o"
1247 extra_headers=math-68881.h
1249 m68k-motorola-sysv*)
1250 tm_file=m68k/mot3300.h
1251 xm_file=m68k/xm-mot3300.h
1252 if [[ x$gas = xyes ]]
1254 xmake_file=m68k/x-mot3300-gas
1255 if [[ x$gnu_ld = xyes ]]
1257 tmake_file=m68k/t-mot3300-gald
1259 tmake_file=m68k/t-mot3300-gas
1263 xmake_file=m68k/x-mot3300
1264 if [[ x$gnu_ld = xyes ]]
1266 tmake_file=m68k/t-mot3300-gld
1268 tmake_file=m68k/t-mot3300
1272 gdb_needs_out_file_path=yes
1273 extra_parts="crt0.o mcrt0.o"
1274 extra_headers=math-68881.h
1276 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1277 tm_file=m68k/tower-as.h
1278 xm_file=m68k/xm-tower.h
1279 xmake_file=m68k/x-tower
1280 extra_parts="crtbegin.o crtend.o"
1281 extra_headers=math-68881.h
1284 tm_file=m68k/plexus.h
1285 xm_file=m68k/xm-plexus.h
1287 extra_headers=math-68881.h
1291 xm_file=m68k/xm-m68kv.h
1292 extra_headers=math-68881.h
1295 xm_file=m68k/xm-crds.h
1296 xmake_file=m68k/x-crds
1299 extra_headers=math-68881.h
1301 m68k-cbm-sysv4*) # Commodore variant of V.4.
1303 xm_file=m68k/xm-amix.h
1304 xmake_file=m68k/x-amix
1306 extra_parts="crtbegin.o crtend.o"
1307 extra_headers=math-68881.h
1310 tm_file=m68k/ccur-GAS.h
1311 xmake_file=m68k/x-ccur
1312 extra_headers=math-68881.h
1315 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1316 tm_file=m68k/hp3bsd44.h
1317 xmake_file=m68k/x-hp3bsd44
1319 extra_headers=math-68881.h
1321 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1322 tm_file=m68k/hp3bsd.h
1324 extra_headers=math-68881.h
1327 if [[ x$with_fp = xno ]]
1329 tm_file=m68k/isi-nfp.h
1334 extra_headers=math-68881.h
1336 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1337 xm_file=m68k/xm-hp320.h
1338 if [[ x$gas = xyes ]]
1340 xmake_file=m68k/x-hp320g
1341 tm_file=m68k/hp320g.h
1343 xmake_file=m68k/x-hp320
1344 tm_file=m68k/hpux7.h
1346 install_headers_dir=install-headers-cpio
1348 extra_headers=math-68881.h
1350 m68k-hp-hpux*) # HP 9000 series 300
1351 xm_file=m68k/xm-hp320.h
1352 if [[ x$gas = xyes ]]
1354 xmake_file=m68k/x-hp320g
1355 tm_file=m68k/hp320g.h
1357 xmake_file=m68k/x-hp320
1358 tm_file=m68k/hp320.h
1360 install_headers_dir=install-headers-cpio
1362 extra_headers=math-68881.h
1365 tm_file=m68k/sun3mach.h
1367 extra_headers=math-68881.h
1370 if [[ x$gas = xyes ]]
1372 tm_file=m68k/news3gas.h
1374 tm_file=m68k/news3.h
1377 extra_headers=math-68881.h
1379 m68k-sony-bsd* | m68k-sony-newsos*)
1380 if [[ x$gas = xyes ]]
1382 tm_file=m68k/newsgas.h
1387 extra_headers=math-68881.h
1389 m68k-next-nextstep2*)
1390 tm_file=m68k/next21.h
1391 xm_file=m68k/xm-next.h
1392 tmake_file=m68k/t-next
1393 xmake_file=m68k/x-next
1394 extra_objs=nextstep.o
1395 extra_headers=math-68881.h
1398 m68k-next-nextstep3*)
1400 xm_file=m68k/xm-next.h
1401 tmake_file=m68k/t-next
1402 xmake_file=m68k/x-next
1403 extra_objs=nextstep.o
1404 extra_headers=math-68881.h
1405 if [[ x$enable_threads = xyes ]]; then
1410 if [[ x$with_fp = xno ]]
1412 tm_file=m68k/sun3n3.h
1414 tm_file=m68k/sun3o3.h
1417 extra_headers=math-68881.h
1419 m68k-sun-sunos*) # For SunOS 4 (the default).
1420 if [[ x$with_fp = xno ]]
1422 tm_file=m68k/sun3n.h
1426 xm_file=m68k/xm-sun3.h
1428 extra_headers=math-68881.h
1431 tm_file=m68k/vxm68k.h
1432 tmake_file=m68k/t-vxworks68
1433 extra_headers=math-68881.h
1436 tmake_file=m68k/t-m68kbare
1437 tm_file="m68k/m68k-aout.h libgloss.h"
1438 extra_headers=math-68881.h
1441 tmake_file=m68k/t-m68kbare
1442 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1443 extra_headers=math-68881.h
1446 if [[ x$gas = xyes ]]
1450 tm_file=m68k/lynx-ng.h
1452 xm_file=m68k/xm-lynx.h
1454 tmake_file=m68k/t-lynx
1455 extra_headers=math-68881.h
1458 tm_file=m68k/netbsd.h
1459 xm_file=m68k/xm-netbsd.h
1460 # On NetBSD, the headers are already okay.
1461 fixincludes=Makefile.in
1464 m68k-*-sysv3*) # Motorola m68k's running system V.3
1465 xm_file=m68k/xm-m68kv.h
1466 xmake_file=m68k/x-m68kv
1467 extra_parts="crtbegin.o crtend.o"
1468 extra_headers=math-68881.h
1470 m68k-*-sysv4*) # Motorola m68k's running system V.4
1471 tm_file=m68k/m68kv4.h
1472 xm_file=m68k/xm-m68kv.h
1474 extra_parts="crtbegin.o crtend.o"
1475 extra_headers=math-68881.h
1477 m68k-*-linux-gnuaout*) # Motorola m68k's running Linux
1478 xm_file=m68k/xm-linux.h # with a.out format
1480 tm_file=m68k/linux-aout.h
1481 tmake_file="t-linux-aout m68k/t-linux-aout"
1482 fixincludes=Makefile.in #On Linux, the headers are ok already.
1483 extra_headers=math-68881.h
1486 m68k-*-linux-gnulibc1) # Motorola m68k's running Linux
1487 xm_file=m68k/xm-linux.h # with ELF format using the
1488 xmake_file=x-linux # Linux C library 5
1489 tm_file=m68k/linux.h
1490 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1491 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1492 fixincludes=Makefile.in #On Linux, the headers are ok already.
1493 extra_headers=math-68881.h
1496 m68k-*-linux-gnu*) # Motorola m68k's running Linux
1497 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1498 xmake_file=x-linux # aka the Linux C library 6.
1499 tm_file=m68k/linux.h
1500 tmake_file="t-linux m68k/t-linux"
1501 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1502 fixincludes=Makefile.in #On Linux, the headers are ok already.
1503 extra_headers=math-68881.h
1505 if [[ x$enable_threads = xyes ]]; then
1510 tmake_file=m68k/t-m68kbare
1511 tm_file=m68k/m68k-psos.h
1512 extra_headers=math-68881.h
1515 tmake_file="m68k/t-m68kbare t-rtems"
1516 tm_file=m68k/rtems.h
1517 extra_headers=math-68881.h
1523 tm_file=m88k/dguxbcs.h
1524 tmake_file=m88k/t-dguxbcs
1528 tmake_file=m88k/t-dgux
1531 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1532 xmake_file=m88k/x-dgux
1533 if [[ x$gas = xyes ]]
1535 tmake_file=m88k/t-dgux-gas
1537 fixincludes=fixinc.dgux
1539 m88k-dolphin-sysv3*)
1540 tm_file=m88k/dolph.h
1541 extra_parts="crtbegin.o crtend.o"
1542 xm_file=m88k/xm-sysv3.h
1543 xmake_file=m88k/x-dolph
1544 if [[ x$gas = xyes ]]
1546 tmake_file=m88k/t-m88k-gas
1549 m88k-tektronix-sysv3)
1550 tm_file=m88k/tekXD88.h
1551 extra_parts="crtbegin.o crtend.o"
1552 xm_file=m88k/xm-sysv3.h
1553 xmake_file=m88k/x-tekXD88
1554 if [[ x$gas = xyes ]]
1556 tmake_file=m88k/t-m88k-gas
1560 tm_file=m88k/m88k-aout.h
1563 tm_file=m88k/m88k-coff.h
1564 tmake_file=m88k/t-bug
1568 extra_parts="crtbegin.o crtend.o"
1569 if [[ x$gas = xyes ]]
1571 tmake_file=m88k/t-luna-gas
1573 tmake_file=m88k/t-luna
1577 tm_file=m88k/sysv3.h
1578 extra_parts="crtbegin.o crtend.o"
1579 xm_file=m88k/xm-sysv3.h
1580 xmake_file=m88k/x-sysv3
1581 if [[ x$gas = xyes ]]
1583 tmake_file=m88k/t-m88k-gas
1587 tm_file=m88k/sysv4.h
1588 extra_parts="crtbegin.o crtend.o"
1589 xmake_file=m88k/x-sysv4
1590 tmake_file=m88k/t-sysv4
1592 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1593 tm_file=mips/iris6.h
1594 xm_file=mips/xm-iris6.h
1595 fixincludes=fixinc.irix
1596 xmake_file=mips/x-iris6
1597 tmake_file=mips/t-iris6
1598 if [[ x$enable_threads = xyes ]]; then
1602 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1603 tm_file=mips/cross64.h
1604 xm_file=mips/xm-iris5.h
1605 fixincludes=Makefile.in
1606 xmake_file=mips/x-iris
1607 tmake_file=mips/t-cross64
1608 # See comment in mips/iris[56].h files.
1610 if [[ x$enable_threads = xyes ]]; then
1615 if [[ x$gas = xyes ]]
1617 if [[ x$stabs = xyes ]]
1619 tm_file=mips/iris5gdb.h
1621 tm_file=mips/sni-gas.h
1624 tm_file=mips/sni-svr4.h
1626 xm_file=mips/xm-sysv.h
1627 xmake_file=mips/x-sni-svr4
1628 tmake_file=mips/t-mips-gas
1629 if [[ x$gnu_ld != xyes ]]
1634 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1635 if [[ x$gas = xyes ]]
1637 tm_file=mips/iris5gas.h
1638 if [[ x$stabs = xyes ]]
1640 tm_file="${tm_file} dbx.h"
1643 tm_file=mips/iris5.h
1645 xm_file=mips/xm-iris5.h
1646 fixincludes=fixinc.irix
1647 xmake_file=mips/x-iris
1648 # mips-tfile doesn't work yet
1649 tmake_file=mips/t-mips-gas
1650 # See comment in mips/iris5.h file.
1652 if [[ x$enable_threads = xyes ]]; then
1656 mips-sgi-irix4loser*) # Mostly like a MIPS.
1657 tm_file=mips/iris4loser.h
1658 if [[ x$stabs = xyes ]]; then
1659 tm_file="${tm_file} dbx.h"
1661 xm_file=mips/xm-iris4.h
1662 xmake_file=mips/x-iris
1663 if [[ x$gas = xyes ]]
1665 tmake_file=mips/t-mips-gas
1667 extra_passes="mips-tfile mips-tdump"
1669 if [[ x$gnu_ld != xyes ]]
1673 if [[ x$enable_threads = xyes ]]; then
1677 mips-sgi-irix4*) # Mostly like a MIPS.
1678 tm_file=mips/iris4.h
1679 if [[ x$stabs = xyes ]]; then
1680 tm_file="${tm_file} dbx.h"
1682 xm_file=mips/xm-iris4.h
1683 xmake_file=mips/x-iris
1684 if [[ x$gas = xyes ]]
1686 tmake_file=mips/t-mips-gas
1688 extra_passes="mips-tfile mips-tdump"
1690 if [[ x$gnu_ld != xyes ]]
1694 if [[ x$enable_threads = xyes ]]; then
1698 mips-sgi-*) # Mostly like a MIPS.
1699 tm_file=mips/iris3.h
1700 if [[ x$stabs = xyes ]]; then
1701 tm_file="${tm_file} dbx.h"
1703 xm_file=mips/xm-iris3.h
1704 xmake_file=mips/x-iris3
1705 if [[ x$gas = xyes ]]
1707 tmake_file=mips/t-mips-gas
1709 extra_passes="mips-tfile mips-tdump"
1711 if [[ x$gnu_ld != xyes ]]
1716 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1717 tm_file=mips/osfrose.h
1718 xmake_file=mips/x-osfrose
1719 tmake_file=mips/t-osfrose
1720 extra_objs=halfpic.o
1723 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1724 tm_file=mips/dec-osf1.h
1725 if [[ x$stabs = xyes ]]; then
1726 tm_file="${tm_file} dbx.h"
1728 xmake_file=mips/x-dec-osf1
1729 if [[ x$gas = xyes ]]
1731 tmake_file=mips/t-mips-gas
1733 tmake_file=mips/t-ultrix
1734 extra_passes="mips-tfile mips-tdump"
1736 if [[ x$gnu_ld != xyes ]]
1741 mips-dec-bsd*) # Decstation running 4.4 BSD
1742 tm_file=mips/dec-bsd.h
1744 if [[ x$gas = xyes ]]
1746 tmake_file=mips/t-mips-gas
1748 tmake_file=mips/t-ultrix
1749 extra_passes="mips-tfile mips-tdump"
1751 if [[ x$gnu_ld != xyes ]]
1756 mips-dec-netbsd*) # Decstation running NetBSD
1757 tm_file=mips/netbsd.h
1758 xm_file=mips/xm-netbsd.h
1759 # On NetBSD, the headers are already okay.
1760 fixincludes=Makefile.in
1762 if [[ x$prefix = xNONE ]]; then
1763 prefix=$native_prefix
1765 prefix=$native_prefix
1767 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1768 tm_file=mips/news4.h
1769 if [[ x$stabs = xyes ]]; then
1770 tm_file="${tm_file} dbx.h"
1772 if [[ x$gas = xyes ]]
1774 tmake_file=mips/t-mips-gas
1776 extra_passes="mips-tfile mips-tdump"
1778 if [[ x$gnu_ld != xyes ]]
1782 xmake_file=mips/x-sony
1784 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1785 # That is based on svr4.
1786 # t-svr4 is not right because this system doesn't use ELF.
1787 tm_file=mips/news5.h
1788 if [[ x$stabs = xyes ]]; then
1789 tm_file="${tm_file} dbx.h"
1791 xm_file=mips/xm-news.h
1792 if [[ x$gas = xyes ]]
1794 tmake_file=mips/t-mips-gas
1796 extra_passes="mips-tfile mips-tdump"
1798 if [[ x$gnu_ld != xyes ]]
1803 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1804 tm_file=mips/svr4-t.h
1805 if [[ x$stabs = xyes ]]; then
1806 tm_file="${tm_file} dbx.h"
1808 xm_file=mips/xm-sysv4.h
1809 xmake_file=mips/x-sysv
1810 if [[ x$gas = xyes ]]
1812 tmake_file=mips/t-mips-gas
1813 extra_parts="crtbegin.o crtend.o"
1815 tmake_file=mips/t-mips
1816 extra_passes="mips-tfile mips-tdump"
1818 if [[ x$gnu_ld != xyes ]]
1823 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1824 tm_file=mips/ultrix.h
1825 if [[ x$stabs = xyes ]]; then
1826 tm_file="${tm_file} dbx.h"
1828 xmake_file=mips/x-ultrix
1829 if [[ x$gas = xyes ]]
1831 tmake_file=mips/t-mips-gas
1833 tmake_file=mips/t-ultrix
1834 extra_passes="mips-tfile mips-tdump"
1836 if [[ x$gnu_ld != xyes ]]
1841 mips-*-riscos[[56789]]bsd*)
1842 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1843 if [[ x$stabs = xyes ]]; then
1844 tm_file="${tm_file} dbx.h"
1846 if [[ x$gas = xyes ]]
1848 tmake_file=mips/t-bsd-gas
1850 tmake_file=mips/t-bsd
1851 extra_passes="mips-tfile mips-tdump"
1853 if [[ x$gnu_ld != xyes ]]
1858 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1859 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1860 if [[ x$stabs = xyes ]]; then
1861 tm_file="${tm_file} dbx.h"
1863 if [[ x$gas = xyes ]]
1865 tmake_file=mips/t-bsd-gas
1867 tmake_file=mips/t-bsd
1868 extra_passes="mips-tfile mips-tdump"
1870 if [[ x$gnu_ld != xyes ]]
1875 mips-*-riscos[[56789]]sysv4*)
1876 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1877 if [[ x$stabs = xyes ]]; then
1878 tm_file="${tm_file} dbx.h"
1880 xm_file=mips/xm-sysv4.h
1881 xmake_file=mips/x-sysv
1882 if [[ x$gas = xyes ]]
1884 tmake_file=mips/t-svr4-gas
1886 tmake_file=mips/t-svr4
1887 extra_passes="mips-tfile mips-tdump"
1889 if [[ x$gnu_ld != xyes ]]
1894 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1895 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1896 if [[ x$stabs = xyes ]]; then
1897 tm_file="${tm_file} dbx.h"
1899 xm_file=mips/xm-sysv.h
1900 xmake_file=mips/x-sysv
1901 if [[ x$gas = xyes ]]
1903 tmake_file=mips/t-svr4-gas
1905 tmake_file=mips/t-svr4
1906 extra_passes="mips-tfile mips-tdump"
1908 if [[ x$gnu_ld != xyes ]]
1913 mips-*-riscos[[56789]]sysv*)
1914 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1915 if [[ x$stabs = xyes ]]; then
1916 tm_file="${tm_file} dbx.h"
1918 xm_file=mips/xm-sysv.h
1919 xmake_file=mips/x-sysv
1920 if [[ x$gas = xyes ]]
1922 tmake_file=mips/t-svr3-gas
1924 tmake_file=mips/t-svr3
1925 extra_passes="mips-tfile mips-tdump"
1927 if [[ x$gnu_ld != xyes ]]
1932 mips-*-sysv* | mips-*-riscos*sysv*)
1933 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1934 if [[ x$stabs = xyes ]]; then
1935 tm_file="${tm_file} dbx.h"
1937 xm_file=mips/xm-sysv.h
1938 xmake_file=mips/x-sysv
1939 if [[ x$gas = xyes ]]
1941 tmake_file=mips/t-svr3-gas
1943 tmake_file=mips/t-svr3
1944 extra_passes="mips-tfile mips-tdump"
1946 if [[ x$gnu_ld != xyes ]]
1951 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1952 tm_file=mips/mips-5.h
1953 if [[ x$stabs = xyes ]]; then
1954 tm_file="${tm_file} dbx.h"
1956 if [[ x$gas = xyes ]]
1958 tmake_file=mips/t-mips-gas
1960 extra_passes="mips-tfile mips-tdump"
1962 if [[ x$gnu_ld != xyes ]]
1970 tm_file=mips/ecoffl.h
1971 if [[ x$stabs = xyes ]]; then
1972 tm_file="${tm_file} dbx.h"
1974 tmake_file=mips/t-ecoff
1977 tm_file=mips/ecoff.h
1978 if [[ x$stabs = xyes ]]; then
1979 tm_file="${tm_file} dbx.h"
1981 tmake_file=mips/t-ecoff
1984 tm_file="mips/elfl.h libgloss.h"
1985 tmake_file=mips/t-ecoff
1988 tm_file="mips/elf.h libgloss.h"
1989 tmake_file=mips/t-ecoff
1992 tm_file="mips/elfl64.h libgloss.h"
1993 tmake_file=mips/t-ecoff
1995 mips64orionel-*-elf*)
1996 tm_file="mips/elflorion.h libgloss.h"
1997 tmake_file=mips/t-ecoff
2000 tm_file="mips/elf64.h libgloss.h"
2001 tmake_file=mips/t-ecoff
2004 tm_file="mips/elforion.h libgloss.h"
2005 tmake_file=mips/t-ecoff
2007 mips64orion-*-rtems*)
2008 tm_file=mips/rtems64.h
2009 tmake_file="mips/t-ecoff t-rtems"
2011 mips-*-*) # Default MIPS RISC-OS 4.0.
2012 if [[ x$stabs = xyes ]]; then
2013 tm_file="${tm_file} dbx.h"
2015 if [[ x$gas = xyes ]]
2017 tmake_file=mips/t-mips-gas
2019 extra_passes="mips-tfile mips-tdump"
2021 if [[ x$gnu_ld != xyes ]]
2028 tm_file="mn10200/mn10200.h"
2029 if [[ x$stabs = xyes ]]
2031 tm_file="${tm_file} dbx.h"
2037 tm_file="mn10300/mn10300.h"
2038 if [[ x$stabs = xyes ]]
2040 tm_file="${tm_file} dbx.h"
2045 tm_file=ns32k/encore.h
2049 tm_file=ns32k/sequent.h
2053 tm_file=ns32k/tek6100.h
2057 tm_file=ns32k/tek6200.h
2060 # This has not been updated to GCC 2.
2062 # xm_file=ns32k/xm-genix.h
2063 # xmake_file=ns32k/x-genix
2064 # tm_file=ns32k/genix.h
2068 tm_file=ns32k/merlin.h
2072 tm_file=ns32k/pc532-mach.h
2076 tm_file=ns32k/pc532-min.h
2077 xm_file=ns32k/xm-pc532-min.h
2080 ns32k-pc532-netbsd*)
2081 tm_file=ns32k/netbsd.h
2082 xm_file=ns32k/xm-netbsd.h
2083 # On NetBSD, the headers are already okay.
2084 fixincludes=Makefile.in
2088 tm_file="${tm_file} pdp11/2bsd.h"
2094 xmake_file=pyr/x-pyr
2101 xmake_file=romp/x-mach
2104 powerpc-*-sysv* | powerpc-*-elf*)
2105 tm_file=rs6000/sysv4.h
2106 xm_file=rs6000/xm-sysv4.h
2107 extra_headers=ppc-asm.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
2117 tm_file=rs6000/eabiaix.h
2118 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2119 fixincludes=Makefile.in
2120 extra_headers=ppc-asm.h
2123 tm_file=rs6000/eabisim.h
2124 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2125 fixincludes=Makefile.in
2126 extra_headers=ppc-asm.h
2129 tm_file=rs6000/eabi.h
2130 if [[ x$gas = xyes ]]
2132 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2134 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2136 fixincludes=Makefile.in
2137 extra_headers=ppc-asm.h
2140 tm_file=rs6000/rtems.h
2141 if [[ x$gas = xyes ]]
2143 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2145 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2147 fixincludes=Makefile.in
2148 extra_headers=ppc-asm.h
2150 powerpc-*-linux-gnu*)
2151 tm_file=rs6000/linux.h
2152 xm_file=rs6000/xm-sysv4.h
2153 out_file=rs6000/rs6000.c
2154 if [[ x$gas = xyes ]]
2156 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2158 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2161 fixincludes=Makefile.in
2162 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2163 extra_headers=ppc-asm.h
2164 if [[ x$enable_threads = xyes ]]; then
2170 xm_file=rs6000/xm-sysv4.h
2171 tm_file=rs6000/vxppc.h
2172 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2173 extra_headers=ppc-asm.h
2175 powerpcle-*-sysv* | powerpcle-*-elf*)
2176 tm_file=rs6000/sysv4le.h
2177 xm_file=rs6000/xm-sysv4.h
2178 if [[ x$gas = xyes ]]
2180 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2182 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2184 xmake_file=rs6000/x-sysv4
2185 extra_headers=ppc-asm.h
2187 powerpcle-*-eabisim*)
2188 tm_file=rs6000/eabilesim.h
2189 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2190 fixincludes=Makefile.in
2191 extra_headers=ppc-asm.h
2194 tm_file=rs6000/eabile.h
2195 if [[ x$gas = xyes ]]
2197 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2199 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2201 fixincludes=Makefile.in
2202 extra_headers=ppc-asm.h
2204 powerpcle-*-winnt* )
2205 tm_file=rs6000/win-nt.h
2206 tmake_file=rs6000/t-winnt
2208 fixincludes=Makefile.in
2209 if [[ x$enable_threads = xyes ]]; then
2212 extra_headers=ppc-asm.h
2214 powerpcle-*-pe | powerpcle-*-cygwin32)
2215 tm_file=rs6000/cygwin32.h
2216 xm_file=rs6000/xm-cygwin32.h
2217 tmake_file=rs6000/t-winnt
2218 xmake_file=rs6000/x-cygwin32
2220 fixincludes=Makefile.in
2221 if [[ x$enable_threads = xyes ]]; then
2225 extra_headers=ppc-asm.h
2227 powerpcle-*-solaris2*)
2228 tm_file=rs6000/sol2.h
2229 xm_file=rs6000/xm-sysv4.h
2230 if [[ x$gas = xyes ]]
2232 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2234 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2236 xmake_file=rs6000/x-sysv4
2237 fixincludes=fixinc.svr4
2238 extra_headers=ppc-asm.h
2240 rs6000-ibm-aix3.[[01]]*)
2241 tm_file=rs6000/aix31.h
2242 xmake_file=rs6000/x-aix31
2245 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2246 tm_file=rs6000/aix3newas.h
2247 if [[ x$host != x$target ]]
2249 tmake_file=rs6000/t-xnewas
2251 tmake_file=rs6000/t-newas
2255 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2256 tm_file=rs6000/aix41.h
2257 if [[ x$host != x$target ]]
2259 tmake_file=rs6000/t-xnewas
2261 tmake_file=rs6000/t-newas
2263 xmake_file=rs6000/x-aix31
2273 tm_file=rs6000/mach.h
2274 xm_file=rs6000/xm-mach.h
2275 xmake_file=rs6000/x-mach
2279 tm_file=rs6000/lynx.h
2280 xm_file=rs6000/xm-lynx.h
2281 tmake_file=rs6000/t-rs6000
2282 xmake_file=rs6000/x-lynx
2290 tmake_file="sh/t-sh t-rtems"
2299 xm_file=sparc/xm-pbd.h
2301 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2302 tm_file=sparc/vxsparc.h
2303 tmake_file=sparc/t-vxsparc
2307 tmake_file=sparc/t-sparcbare
2308 tm_file="sparc/aout.h libgloss.h"
2311 tm_file=sparc/netbsd.h
2312 xm_file=sparc/xm-netbsd.h
2313 # On NetBSD, the headers are already okay.
2314 fixincludes=Makefile.in
2320 sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
2321 xm_file=sparc/xm-linux.h
2322 tm_file=sparc/linux-aout.h
2324 fixincludes=Makefile.in #On Linux, the headers are ok already.
2327 sparc-*-linux-gnulibc1*) # Sparc's running Linux
2328 xm_file=sparc/xm-linux.h # with ELF format using the
2329 xmake_file=x-linux # Linux C library 5.
2330 tm_file=sparc/linux.h
2331 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2332 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2333 fixincludes=Makefile.in #On Linux, the headers are ok already.
2336 sparc-*-linux-gnu*) # Sparc's running Linux
2337 xm_file=sparc/xm-linux.h # with ELF format using glibc 2
2338 xmake_file=x-linux # aka the Linux C library 6.
2339 tm_file=sparc/linux.h
2340 tmake_file="t-linux sparc/t-linux"
2341 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2342 fixincludes=Makefile.in #On Linux, the headers are ok already.
2344 if [[ x$enable_threads = xyes ]]; then
2349 if [[ x$gas = xyes ]]
2351 tm_file=sparc/lynx.h
2353 tm_file=sparc/lynx-ng.h
2355 xm_file=sparc/xm-lynx.h
2356 tmake_file=sparc/t-sunos41
2360 tmake_file="sparc/t-sparcbare t-rtems"
2361 tm_file=sparc/rtems.h
2364 tm_file=sparc/sol2.h
2365 xm_file=sparc/xm-sol2.h
2366 tmake_file=sparc/t-sol2
2367 xmake_file=sparc/x-sysv4
2368 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2369 fixincludes=fixinc.svr4
2370 if [[ x$enable_threads = xyes ]]; then
2371 thread_file='solaris'
2375 tm_file=sparc/sunos4.h
2376 tmake_file=sparc/t-sunos40
2380 tm_file=sparc/sunos4.h
2381 tmake_file=sparc/t-sunos41
2385 tm_file=sparc/sun4o3.h
2389 tm_file=sparc/sysv4.h
2390 xm_file=sparc/xm-sysv4.h
2392 xmake_file=sparc/x-sysv4
2393 extra_parts="crtbegin.o crtend.o"
2396 xm_file=sparc/xm-sol2.h
2397 tm_file=sparc/vxsim.h
2398 tmake_file=sparc/t-vxsparc
2399 xmake_file=sparc/x-sysv4
2402 tm_file="sparc/splet.h libgloss.h"
2403 tmake_file=sparc/t-splet
2406 tm_file="sparc/litecoff.h libgloss.h"
2407 tmake_file=sparc/t-sparclite
2410 tm_file="sparc/lite.h aoutos.h libgloss.h"
2411 tmake_file=sparc/t-sparclite
2414 tmake_file=sparc/t-sp64
2415 tm_file=sparc/sp64-aout.h
2418 tmake_file=sparc/t-sp64
2419 tm_file=sparc/sp64-elf.h
2420 extra_parts="crtbegin.o crtend.o"
2422 # This hasn't been upgraded to GCC 2.
2423 # tahoe-harris-*) # Harris tahoe, using COFF.
2424 # tm_file=tahoe/harris.h
2426 # tahoe-*-bsd*) # tahoe running BSD
2428 # This hasn't been upgraded to GCC 2.
2433 vax-*-bsd*) # vaxen running BSD
2437 vax-*-sysv*) # vaxen running system V
2438 tm_file="${tm_file} vax/vaxv.h"
2439 xm_file="${tm_file} vax/xm-vaxv.h"
2443 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2444 xm_file="${xm_file} xm-netbsd.h"
2445 # On NetBSD, the headers are already okay.
2446 fixincludes=Makefile.in
2450 vax-*-ultrix*) # vaxen running ultrix
2451 tm_file="${tm_file} vax/ultrix.h"
2455 vax-*-vms*) # vaxen running VMS
2456 xm_file=vax/xm-vms.h
2460 vax-*-*) # vax default entry
2464 xm_file="${xm_file} xm-svr3"
2468 echo "Configuration $machine not supported" 1>&2
2475 ;; # Existing Linux/GNU systems do not use the GNU setup.
2477 # On the GNU system, the setup is just about the same on
2478 # each different CPU. The specific machines that GNU
2479 # supports are matched above and just set $cpu_type.
2480 xm_file=${cpu_type}/xm-gnu.h
2481 tm_file=${cpu_type}/gnu.h
2482 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2483 # GNU always uses ELF.
2485 # GNU tools are the only tools.
2488 # On GNU, the headers are already okay.
2489 fixincludes=Makefile.in
2490 xmake_file=x-linux # These details are the same as Linux.
2491 tmake_file=t-gnu # These are not.
2494 fixincludes=fixinc.svr4
2495 xmake_try_sysv=x-sysv
2496 install_headers_dir=install-headers-cpio
2499 install_headers_dir=install-headers-cpio
2503 # Distinguish i[3456]86
2504 # Also, do not run mips-tfile on MIPS if using gas.
2505 # Process --with-cpu= for PowerPC/rs6000
2506 target_cpu_default2=
2509 target_cpu_default2=1
2512 target_cpu_default2=2
2515 target_cpu_default2=3
2520 target_cpu_default2="MASK_CPU_EV5|MASK_BYTE_OPS"
2523 target_cpu_default2="MASK_CPU_EV5"
2527 if [[ x$gas = xyes ]]
2529 if [[ x$target_cpu_default2 = x ]]
2531 target_cpu_default2="MASK_GAS"
2533 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2537 mips*-*-ecoff* | mips*-*-elf*)
2538 if [[ x$gas = xyes ]]
2540 if [[ x$gnu_ld = xyes ]]
2542 target_cpu_default2=20
2544 target_cpu_default2=16
2549 if [[ x$gas = xyes ]]
2551 target_cpu_default2=16
2554 powerpc*-*-* | rs6000-*-*)
2555 case "x$with_cpu" in
2559 xcommon | xpower | xpower2 | xpowerpc | xrios \
2560 | xrios1 | xrios2 | xrsc | xrsc1 \
2561 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2562 | x403 | x505 | x801 | x821 | x823 | x860)
2563 target_cpu_default2="\"$with_cpu\""
2567 echo "--with-cpu must be passed a value" 1>&2
2572 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2578 case ".$with_cpu" in
2580 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2582 .supersparc | .ultrasparc | .v7 | .v8)
2583 target_cpu_default2="TARGET_CPU_$with_cpu"
2586 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2593 if [[ x$target_cpu_default2 != x ]]
2595 if [[ x$target_cpu_default != x ]]
2597 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2599 target_cpu_default=$target_cpu_default2
2603 # No need for collect2 if we have the GNU linker.
2610 # Save data on machine being used to compile GCC in build_xm_file.
2611 # Save data on host machine in vars host_xm_file and host_xmake_file.
2612 if [[ x$pass1done = x ]]
2614 if [[ x"$xm_file" = x ]]
2615 then build_xm_file=$cpu_type/xm-$cpu_type.h
2616 else build_xm_file=$xm_file
2618 build_install_headers_dir=$install_headers_dir
2619 build_exeext=$exeext
2622 if [[ x$pass2done = x ]]
2624 if [[ x"$xm_file" = x ]]
2625 then host_xm_file=$cpu_type/xm-$cpu_type.h
2626 else host_xm_file=$xm_file
2628 if [[ x"$xmake_file" = x ]]
2629 then xmake_file=$cpu_type/x-$cpu_type
2631 host_xmake_file="$xmake_file"
2632 host_truncate_target=$truncate_target
2633 host_extra_gcc_objs=$extra_gcc_objs
2634 host_extra_objs=$extra_host_objs
2640 extra_objs="${host_extra_objs} ${extra_objs}"
2642 # Default the target-machine variables that were not explicitly set.
2643 if [[ x"$tm_file" = x ]]
2644 then tm_file=$cpu_type/$cpu_type.h; fi
2646 if [[ x$extra_headers = x ]]
2647 then extra_headers=; fi
2649 if [[ x"$xm_file" = x ]]
2650 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2652 md_file=$cpu_type/$cpu_type.md
2654 if [[ x$out_file = x ]]
2655 then out_file=$cpu_type/$cpu_type.c; fi
2657 if [[ x"$tmake_file" = x ]]
2658 then tmake_file=$cpu_type/t-$cpu_type
2661 if [[ x$float_format = x ]]
2662 then float_format=i64
2665 # Say what files are being used for the output code and MD file.
2666 echo "Using \`$srcdir/config/$out_file' to output insns."
2667 echo "Using \`$srcdir/config/$md_file' as machine description file."
2670 for f in $tm_file; do
2673 if [[ $count = ax ]]; then
2674 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2676 echo "Using the following target machine macro files:"
2677 for f in $tm_file; do
2678 echo " $srcdir/config/$f"
2683 for f in $host_xm_file; do
2686 if [[ $count = ax ]]; then
2687 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2689 echo "Using the following host machine macro files:"
2690 for f in $host_xm_file; do
2691 echo " $srcdir/config/$f"
2695 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2697 for f in $build_xm_file; do
2700 if [[ $count = ax ]]; then
2701 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2703 echo "Using the following build machine macro files:"
2704 for f in $build_xm_file; do
2705 echo " $srcdir/config/$f"
2710 if [[ x$thread_file = x ]]
2711 then thread_file='single'
2714 # Set up the header files.
2715 # $links is the list of header files to create.
2716 # $vars is the list of shell variables with file names to include.
2717 # config2.h is the old config.h. It is included by the new config.h which
2718 # created from config.in. The goal is to simplify the transition to autoconf.
2719 vars="host_xm_file tm_file xm_file build_xm_file"
2720 links="config2.h tm.h tconfig.h hconfig.h"
2723 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2726 while [[ -n "$vars" ]]
2728 # set file to car of files, files to cdr of files
2729 set $vars; var=$1; shift; vars=$*
2730 set $links; link=$1; shift; links=$*
2734 # Define TARGET_CPU_DEFAULT if the system wants one.
2735 # This substitutes for lots of *.h files.
2736 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2738 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2741 for file in `eval echo '$'$var`; do
2742 echo "#include \"$file\"" >>$link
2746 # Truncate the target if necessary
2747 if [[ x$host_truncate_target != x ]]; then
2748 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2751 # Get the version number from the toplevel
2752 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2754 # Are we using gcc as the native compiler?
2756 *linux*) # All Linux's use gcc as the native compiler.
2757 if [[ x$prefix = xNONE ]]; then
2758 prefix=$native_prefix
2763 # Get an absolute path to the GCC top-level source directory
2769 # Conditionalize the makefile for this host machine.
2770 # Make-host contains the concatenation of all host makefile fragments
2771 # [there can be more than one]. This file is built by configure.frag.
2772 host_overrides=Make-host
2773 dep_host_xmake_file=
2774 for f in .. ${host_xmake_file}
2776 if [[ -f ${srcdir}/config/$f ]]
2778 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2782 # Conditionalize the makefile for this target machine.
2783 # Make-target contains the concatenation of all host makefile fragments
2784 # [there can be more than one]. This file is built by configure.frag.
2785 target_overrides=Make-target
2787 for f in .. ${tmake_file}
2789 if [[ -f ${srcdir}/config/$f ]]
2791 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2795 # If the host doesn't support symlinks, modify CC in
2796 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2797 # Otherwise, we can use "CC=$(CC)".
2799 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2801 cc_set_by_configure="\$(CC)"
2802 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2804 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2805 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2809 out_object_file=`basename $out_file .c`.o
2812 for f in $tm_file; do
2813 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2817 for f in $host_xm_file; do
2818 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2822 for f in $build_xm_file; do
2823 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2826 # Define macro CROSS_COMPILE in compilation
2827 # if this is a cross-compiler.
2828 # Also use all.cross instead of all.internal
2829 # and add cross-make to Makefile.
2830 cross_overrides="/dev/null"
2831 if [[ x$host != x$target ]]
2833 cross_defines="CROSS=-DCROSS_COMPILE"
2834 cross_overrides="${topdir}/cross-make"
2837 # When building gcc with a cross-compiler, we need to fix a few things.
2838 # This must come after cross-make as we want all.build to override
2840 build_overrides="/dev/null"
2841 if [[ x$build != x$host ]]
2843 build_overrides="${topdir}/build-make"
2846 # Expand extra_headers to include complete path.
2847 # This substitutes for lots of t-* files.
2849 if [[ "x$extra_headers" = x ]]
2852 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2853 for file in $extra_headers;
2855 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2859 # Add a definition of USE_COLLECT2 if system wants one.
2860 # Also tell toplev.c what to do.
2861 # This substitutes for lots of t-* files.
2862 if [[ x$use_collect2 = x ]]
2867 will_use_collect2="ld"
2868 maybe_use_collect2="-DUSE_COLLECT2"
2872 # Set MD_DEPS if the real md file is in md.pre-cpp.
2873 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2874 # for line oriented comments, so we must always use a GNU cpp. If
2875 # building gcc with a cross compiler, use the cross compiler just
2876 # built. Otherwise, we can use the cpp just built.
2878 if [[ "x$md_cppflags" = x ]]
2880 md_file_sub=$srcdir/config/$md_file
2885 # If we have gas in the build tree, make a link to it.
2886 if [[ -f ../gas/Makefile ]]; then
2887 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
2890 # If we have ld in the build tree, make a link to it.
2891 if [[ -f ../ld/Makefile ]]; then
2892 # if [[ x$use_collect2 = x ]]; then
2893 # rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
2895 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
2899 # Figure out what language subdirectories are present.
2901 for lang in ${srcdir}/*/config-lang.in ..
2905 # The odd quoting in the next line works around
2906 # an apparent bug in bash 1.12 on linux.
2907 ${srcdir}/[[*]]/config-lang.in) ;;
2908 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
2912 # Make empty files to contain the specs and options for each language.
2913 # Then add #include lines to for a compiler that has specs and/or options.
2917 rm -f specs.h options.h
2918 touch specs.h options.h
2919 for subdir in . $subdirs
2921 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
2922 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
2923 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
2925 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
2926 echo "#include \"$subdir/lang-options.h\"" >>options.h
2927 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
2931 # These (without "all_") are set in each config-lang.in.
2932 # `language' must be a single word so is spelled singularly.
2938 all_outputs=Makefile
2939 # List of language makefile fragments.
2944 # Add the language fragments.
2945 # Languages are added via two mechanisms. Some information must be
2946 # recorded in makefile variables, these are defined in config-lang.in.
2947 # We accumulate them and plug them into the main Makefile.
2948 # The other mechanism is a set of hooks for each of the main targets
2949 # like `clean', `install', etc.
2951 language_fragments="Make-lang"
2952 language_hooks="Make-hooks"
2955 for s in .. $subdirs
2967 . ${srcdir}/$s/config-lang.in
2968 if [[ "x$language" = x ]]
2970 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
2973 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
2974 all_languages="$all_languages $language"
2975 if [[ "x$boot_language" = xyes ]]
2977 all_boot_languages="$all_boot_languages $language"
2979 all_compilers="$all_compilers $compilers"
2980 all_stagestuff="$all_stagestuff $stagestuff"
2981 all_diff_excludes="$all_diff_excludes $diff_excludes"
2982 all_headers="$all_headers $headers"
2983 all_outputs="$all_outputs $outputs"
2984 if [[ x$outputs = x ]]
2986 oldstyle_subdirs="$oldstyle_subdirs $s"
2988 all_lib2funcs="$all_lib2funcs $lib2funcs"
2992 # Since we can't use `::' targets, we link each language in
2993 # with a set of hooks, reached indirectly via lang.${target}.
2997 target_list="all.build all.cross start.encap rest.encap \
2999 install-normal install-common install-info install-man \
3001 mostlyclean clean distclean extraclean maintainer-clean \
3002 stage1 stage2 stage3 stage4"
3003 for t in $target_list
3006 for l in .. $all_languages
3008 if [[ $l != ".." ]]; then
3012 echo "lang.$t: $x" >> Make-hooks
3015 # If we're not building in srcdir, create .gdbinit.
3017 if [[ ! -f Makefile.in ]]; then
3018 echo "dir ." > .gdbinit
3019 echo "dir ${srcdir}" >> .gdbinit
3020 if [[ x$gdb_needs_out_file_path = xyes ]]
3022 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3024 if [[ "x$subdirs" != x ]]; then
3027 echo "dir ${srcdir}/$s" >> .gdbinit
3030 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3033 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3036 if [[ x$enable_haifa = xyes ]]; then
3037 echo "Using the Haifa scheduler."
3039 sched_cflags=-DHAIFA
3041 AC_SUBST(sched_prefix)
3042 AC_SUBST(sched_cflags)
3043 if [[ x$enable_haifa != x ]]; then
3044 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3045 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3046 if [[ -f $x ]]; then
3053 # Process the language and host/target makefile fragments.
3054 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3056 # Substitute configuration variables
3058 AC_SUBST(all_languages)
3059 AC_SUBST(all_boot_languages)
3060 AC_SUBST(all_compilers)
3061 AC_SUBST(all_lang_makefiles)
3062 AC_SUBST(all_stagestuff)
3063 AC_SUBST(all_diff_excludes)
3064 AC_SUBST(all_lib2funcs)
3065 AC_SUBST(all_headers)
3066 AC_SUBST(extra_passes)
3067 AC_SUBST(extra_programs)
3068 AC_SUBST(extra_parts)
3069 AC_SUBST(extra_c_objs)
3070 AC_SUBST(extra_c_flags)
3071 AC_SUBST(extra_objs)
3072 AC_SUBST(host_extra_gcc_objs)
3073 AC_SUBST(extra_headers_list)
3074 AC_SUBST(dep_host_xmake_file)
3075 AC_SUBST(dep_tmake_file)
3077 AC_SUBST(out_object_file)
3079 AC_SUBST(tm_file_list)
3080 AC_SUBST(build_xm_file_list)
3081 AC_SUBST(host_xm_file_list)
3082 AC_SUBST(lang_specs_files)
3083 AC_SUBST(lang_options_files)
3084 AC_SUBST(thread_file)
3086 AC_SUBST(local_prefix)
3087 AC_SUBST(gxx_include_dir)
3088 AC_SUBST(fixincludes)
3089 AC_SUBST(build_install_headers_dir)
3090 AC_SUBST(build_exeext)
3091 AC_SUBST(float_format)
3092 AC_SUBST(will_use_collect2)
3093 AC_SUBST(maybe_use_collect2)
3094 AC_SUBST(cc_set_by_configure)
3095 AC_SUBST(stage_prefix_set_by_configure)
3097 AC_SUBST_FILE(target_overrides)
3098 AC_SUBST_FILE(host_overrides)
3099 AC_SUBST(cross_defines)
3100 AC_SUBST_FILE(cross_overrides)
3101 AC_SUBST_FILE(build_overrides)
3102 AC_SUBST_FILE(language_fragments)
3103 AC_SUBST_FILE(language_hooks)
3105 # Echo that links are built
3106 if [[ x$host = x$target ]]
3114 if [[ x$host != x$build ]]
3116 str3=" on a $build system"
3119 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3124 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3126 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3128 echo " ${str2}${str3}." 1>&2
3131 # Configure the subdirectories
3132 # AC_CONFIG_SUBDIRS($subdirs)
3134 # Create the Makefile
3135 # and configure language subdirectories
3136 AC_OUTPUT($all_outputs,
3138 . $srcdir/configure.lang
3139 case x$CONFIG_HEADERS in
3140 xconfig.h:config.in)
3148 target_alias='${target_alias}'
3150 subdirs='${subdirs}'
3151 oldstyle_subdirs='${oldstyle_subdirs}'
3152 symbolic_link='${symbolic_link}'
3153 program_transform_set='${program_transform_set}'
3154 program_transform_name='${program_transform_name}'
3155 dep_host_xmake_file='${dep_host_xmake_file}'
3156 host_xmake_file='${host_xmake_file}'
3157 dep_tmake_file='${dep_tmake_file}'
3158 tmake_file='${tmake_file}'
3159 thread_file='${thread_file}'
3160 version='${version}'
3161 local_prefix='${local_prefix}'
3162 build_install_headers_dir='${build_install_headers_dir}'
3163 build_exeext='${build_exeext}'
3164 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3165 SET_MAKE='${SET_MAKE}'
3166 target_list='${target_list}'
3167 target_overrides='${target_overrides}'
3168 host_overrides='${host_overrides}'
3169 cross_defines='${cross_defines}'
3170 cross_overrides='${cross_overrides}'
3171 build_overrides='${build_overrides}'