1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997, 1998 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(auto-config.h:config.in)
32 # Check for additional parameters
36 [ --with-gnu-ld arrange to work with GNU ld.],
42 [ --with-gnu-as arrange to work with GNU as.],
48 [ --with-stabs arrange to use stabs instead of host debug format.],
54 [ --with-elf arrange to use ELF instead of host debug format.],
58 # Specify the local prefix
59 AC_ARG_WITH(local-prefix,
60 [ --with-local-prefix=DIR specifies directory to put local include.],
61 local_prefix=$with_local_prefix,
62 local_prefix=/usr/local)
64 # Default local prefix if it is empty
65 if [[ x$local_prefix = x ]]; then
66 local_prefix=/usr/local
69 # Specify the g++ header file directory
70 AC_ARG_WITH(gxx-include-dir,
71 [ --with-gxx-include-dir=DIR
72 specifies directory to put g++ header files.],
73 gxx_include_dir=$with_gxx_include_dir,
74 gxx_include_dir='${prefix}/include/g++')
76 # Default g++ header file directory if it is empty
77 if [[ x$gxx_include_dir = x ]]; then
78 gxx_include_dir='${prefix}/include/g++'
81 # Enable use of cpplib for C.
82 AC_ARG_ENABLE(c-cpplib,
83 [ --enable-c-cpplib Use cpplib for C.],
84 if [[[ x$enable_c_cpplib != xno ]]]; then
85 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
86 extra_c_flags=-DUSE_CPPLIB=1
89 # Enable Haifa scheduler.
91 [ --enable-haifa Use the experimental scheduler.
92 --disable-haifa Don't use the experimental scheduler for the
93 targets which normally enable it.])
96 # Pass with no value to take the default
97 # Pass with a value to specify a thread package
98 AC_ARG_ENABLE(threads,
99 [ --enable-threads enable thread usage for target GCC.
100 --enable-threads=LIB use LIB thread package for target GCC.],
101 if [[[ x$enable_threads = xno ]]]; then
106 # Check if a valid thread package
107 case x${enable_threads} in
116 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
117 xsolaris | xwin32 | xdce)
118 thread_file=$enable_threads
121 echo "$enable_threads is an unknown thread package" 1>&2
126 # Determine the host, build, and target systems
129 # Find the native compiler
133 # Find some useful tools
142 # Find the native compiler
148 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h)
150 # Check for thread headers.
151 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
152 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
154 # See if the system preprocessor understands the ANSI C preprocessor
155 # stringification operator.
156 AC_MSG_CHECKING(whether cpp understands the stringify operator)
157 AC_CACHE_VAL(gcc_cv_c_have_stringify,
160 char *test = S(foo);],
161 gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
162 AC_MSG_RESULT($gcc_cv_c_have_stringify)
163 if test $gcc_cv_c_have_stringify = yes; then
164 AC_DEFINE(HAVE_CPP_STRINGIFY)
167 # Use <inttypes.h> only if it exists,
168 # doesn't clash with <sys/types.h>, and declares intmax_t.
169 AC_MSG_CHECKING(for inttypes.h)
170 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
172 [#include <sys/types.h>
173 #include <inttypes.h>],
175 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
176 gcc_cv_header_inttypes_h=yes],
177 gcc_cv_header_inttypes_h=no)])
178 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
180 AC_CHECK_FUNCS(strtoul)
181 AC_CHECK_FUNCS(bsearch)
182 AC_CHECK_FUNCS(strerror)
183 AC_CHECK_FUNCS(putenv)
184 AC_CHECK_FUNCS(popen)
185 AC_CHECK_FUNCS(vprintf)
186 AC_CHECK_FUNCS(bcopy)
187 AC_CHECK_FUNCS(bzero)
189 AC_CHECK_FUNCS(index)
190 AC_CHECK_FUNCS(rindex)
192 AC_CHECK_FUNCS(getrlimit)
193 AC_CHECK_FUNCS(setrlimit)
195 GCC_NEED_DECLARATION(malloc)
196 GCC_NEED_DECLARATION(realloc)
197 GCC_NEED_DECLARATION(calloc)
198 GCC_NEED_DECLARATION(free)
199 GCC_NEED_DECLARATION(index)
200 GCC_NEED_DECLARATION(rindex)
201 GCC_NEED_DECLARATION(getenv)
202 GCC_NEED_DECLARATION(sbrk)
213 build_install_headers_dir=install-headers-tar
217 host_truncate_target=
220 # Decode the host machine, then the target machine.
221 # For the host machine, we save the xm_file variable as host_xm_file;
222 # then we decode the target machine and forget everything else
223 # that came from the host machine.
224 for machine in $build $host $target; do
237 # Set this to force installation and use of collect2.
239 # Set this to override the default target model.
241 # Set this to control which fixincludes program to use.
242 fixincludes=fixincludes
243 # Set this to control how the header file directory is installed.
244 install_headers_dir=install-headers-tar
245 # Set this to a non-empty list of args to pass to cpp if the target
246 # wants its .md file passed through cpp.
248 # Set this if directory names should be truncated to 14 characters.
250 # Set this if gdb needs a dir command with `dirname $out_file`
251 gdb_needs_out_file_path=
252 # Set this if the build machine requires executables to have a
256 # Set default cpu_type, tm_file and xm_file so it can be updated in
257 # each machine entry.
258 cpu_type=`echo $machine | sed 's/-.*$//'`
292 tm_file=${cpu_type}/${cpu_type}.h
293 xm_file=${cpu_type}/xm-${cpu_type}.h
296 # Support site-specific machine types.
298 cpu_type=`echo $machine | sed -e 's/-.*//'`
299 rest=`echo $machine | sed -e "s/$cpu_type-//"`
300 xm_file=${cpu_type}/xm-$rest.h
301 tm_file=${cpu_type}/$rest.h
302 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
303 then xmake_file=${cpu_type}/x-$rest; \
306 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
307 then tmake_file=${cpu_type}/t-$rest; \
313 a29k-*-bsd* | a29k-*-sym1*)
314 tm_file="${tm_file} a29k/unix.h"
315 xm_file=a29k/xm-unix.h
316 xmake_file=a29k/x-unix
319 a29k-*-udi | a29k-*-coff)
320 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
321 tmake_file=a29k/t-a29kbare
324 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
325 tmake_file=a29k/t-vx29k
326 extra_parts="crtbegin.o crtend.o"
328 a29k-*-*) # Default a29k environment.
331 alpha*-*-linux-gnuecoff*)
332 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
333 xm_file="${xm_file} alpha/xm-linux.h"
336 fixincludes=Makefile.in
339 alpha*-*-linux-gnulibc1*)
340 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
341 xm_file="${xm_file} alpha/xm-linux.h"
342 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
344 fixincludes=Makefile.in
346 if [[ x$enable_threads = xyes ]]; then
351 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
352 xm_file="${xm_file} alpha/xm-linux.h"
353 tmake_file="t-linux alpha/t-linux"
355 fixincludes=Makefile.in
357 if [[ x$enable_threads = xyes ]]; then
362 if [[ x$stabs = xyes ]]
364 tm_file="${tm_file} dbx.h"
366 if [[ x$gas != xyes ]]
368 extra_passes="mips-tfile mips-tdump"
373 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
376 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
379 tm_file="${tm_file} alpha/osf.h"
380 # Some versions of OSF4 (specifically X4.0-9 296.7) have
381 # a broken tar, so we use cpio instead.
382 install_headers_dir=install-headers-cpio
386 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
387 target_cpu_default=MASK_SUPPORT_ARCH
392 tm_file="${tm_file} alpha/win-nt.h"
393 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
395 xmake_file=winnt/x-winnt
396 extra_host_objs=oldnames.o
397 extra_gcc_objs="spawnv.o oldnames.o"
398 fixincludes=fixinc.winnt
399 if [[ x$gnu_ld != xyes ]]
401 extra_programs=ld.exe
403 if [[ x$enable_threads = xyes ]]; then
409 xm_file="${xm_file} alpha/xm-vms.h"
410 tmake_file=alpha/t-vms
411 fixincludes=Makefile.in
414 extra_parts="crtinit.o crtfini.o"
416 arm-*-coff* | armel-*-coff*)
418 tmake_file=arm/t-bare
420 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
421 tm_file=arm/riscix1-1.h
424 arm-*-riscix*) # Acorn RISC machine
425 if [[ x$gas = xyes ]]
427 tm_file=arm/rix-gas.h
431 xmake_file=arm/x-riscix
432 tmake_file=arm/t-riscix
435 arm-semi-aout | armel-semi-aout)
437 tmake_file=arm/t-semi
438 fixincludes=Makefile.in # There is nothing to fix
440 arm-semi-aof | armel-semi-aof)
441 tm_file=arm/semiaof.h
442 tmake_file=arm/t-semiaof
443 fixincludes=Makefile.in # There is nothing to fix
447 xm_file=arm/xm-netbsd.h
448 tmake_file="t-netbsd arm/t-netbsd"
449 # On NetBSD, the headers are already okay, except for math.h.
450 fixincludes=fixinc.math
452 arm-*-linux-gnuaout*) # ARM GNU/Linux
454 xm_file=arm/xm-linux.h
456 tm_file=arm/linux-gas.h
457 tmake_file=arm/t-linux
458 fixincludes=Makefile.in
463 tmake_file=arm/t-bare
465 c1-convex-*) # Convex C1
468 fixincludes=Makefile.in
470 c2-convex-*) # Convex C2
473 fixincludes=Makefile.in
478 fixincludes=Makefile.in
483 fixincludes=Makefile.in
486 target_cpu_default=16
488 fixincludes=Makefile.in
490 clipper-intergraph-clix*)
491 tm_file="${tm_file} svr3.h clipper/clix.h"
492 xm_file=clipper/xm-clix.h
493 xmake_file=clipper/x-clix
494 extra_headers=va-clipper.h
495 extra_parts="crtbegin.o crtend.o"
496 install_headers_dir=install-headers-cpio
503 # This hasn't been upgraded to GCC 2.
504 # fx80-alliant-*) # Alliant FX/80
510 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
511 xm_file=pa/xm-papro.h
516 tm_file="${tm_file} pa/pa-osf.h"
518 fixincludes=Makefile.in
521 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
522 xm_file=pa/xm-papro.h
526 tm_file="${tm_file} pa/pa-osf.h"
528 fixincludes=Makefile.in
533 fixincludes=Makefile.in
537 fixincludes=Makefile.in
540 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
541 xm_file=pa/xm-pahpux.h
542 xmake_file=pa/x-pa-hpux
543 if [[ x$gas = xyes ]]
545 tm_file="${tm_file} pa/gas.h"
547 install_headers_dir=install-headers-cpio
550 hppa1.0-*-hpux8.0[[0-2]]*)
551 tm_file="${tm_file} pa/pa-hpux.h"
552 xm_file=pa/xm-pahpux.h
553 xmake_file=pa/x-pa-hpux
554 if [[ x$gas = xyes ]]
556 tm_file="${tm_file} pa/pa-gas.h"
558 tm_file="pa/pa-oldas.h ${tm_file}"
560 install_headers_dir=install-headers-cpio
563 hppa1.1-*-hpux8.0[[0-2]]*)
565 tm_file="${tm_file} pa/pa-hpux.h"
566 xm_file=pa/xm-pahpux.h
567 xmake_file=pa/x-pa-hpux
568 if [[ x$gas = xyes ]]
570 tm_file="${tm_file} pa/pa-gas.h"
572 tm_file="pa/pa-oldas.h ${tm_file}"
574 install_headers_dir=install-headers-cpio
579 tm_file="${tm_file} pa/pa-hpux.h"
580 xm_file=pa/xm-pahpux.h
581 xmake_file=pa/x-pa-hpux
582 if [[ x$gas = xyes ]]
584 tm_file="${tm_file} pa/pa-gas.h"
586 install_headers_dir=install-headers-cpio
590 tm_file="${tm_file} pa/pa-hpux.h"
591 xm_file=pa/xm-pahpux.h
592 xmake_file=pa/x-pa-hpux
593 if [[ x$gas = xyes ]]
595 tm_file="${tm_file} pa/pa-gas.h"
597 install_headers_dir=install-headers-cpio
602 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
603 xm_file=pa/xm-pahpux.h
604 xmake_file=pa/x-pa-hpux
606 if [[ x$gas = xyes ]]
608 tm_file="${tm_file} pa/pa-gas.h"
610 if [[ x$enable_threads = x ]]; then
611 enable_threads=$have_pthread_h
613 if [[ x$enable_threads = xyes ]]; then
615 tmake_file="${tmake_file} pa/t-dce-thr"
617 install_headers_dir=install-headers-cpio
621 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
622 xm_file=pa/xm-pahpux.h
623 xmake_file=pa/x-pa-hpux
624 if [[ x$gas = xyes ]]
626 tm_file="${tm_file} pa/pa-gas.h"
628 install_headers_dir=install-headers-cpio
633 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
634 xm_file=pa/xm-pahpux.h
635 xmake_file=pa/x-pa-hpux
636 if [[ x$gas = xyes ]]
638 tm_file="${tm_file} pa/pa-gas.h"
640 install_headers_dir=install-headers-cpio
644 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
645 xm_file=pa/xm-pahpux.h
646 xmake_file=pa/x-pa-hpux
647 if [[ x$gas = xyes ]]
649 tm_file="${tm_file} pa/pa-gas.h"
651 install_headers_dir=install-headers-cpio
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 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
668 xm_file=pa/xm-pahpux.h
669 xmake_file=pa/x-pa-hpux
670 if [[ x$gas = xyes ]]
672 tm_file="${tm_file} pa/pa-gas.h"
674 install_headers_dir=install-headers-cpio
680 fixincludes=Makefile.in
684 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
685 if [[ x$gas = xyes ]]
687 tm_file=i386/aix386.h
688 extra_parts="crtbegin.o crtend.o"
689 tmake_file=i386/t-crtstuff
691 tm_file=i386/aix386ng.h
694 xm_file=i386/xm-aix.h
695 xmake_file=i386/x-aix
697 i[[456]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
698 xm_file=i386/xm-sysv4.h
699 xmake_file=i386/x-ncr3000
700 if [[ x$stabs = xyes -a x$gas = xyes ]]
702 tm_file=i386/sysv4gdb.h
706 extra_parts="crtbegin.o crtend.o"
707 tmake_file=i386/t-crtpic
711 xm_file=i386/xm-next.h
712 tmake_file=i386/t-next
713 xmake_file=i386/x-next
714 extra_objs=nextstep.o
715 if [[ x$enable_threads = xyes ]]; then
719 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
721 if [[ x$gas = xyes ]]
723 tm_file=i386/seq-gas.h
725 tm_file=i386/sequent.h
728 i[[3456]]86-sequent-ptx1*)
729 xm_file=i386/xm-sysv3.h
730 xmake_file=i386/x-sysv3
731 tm_file=i386/seq-sysv3.h
732 tmake_file=i386/t-crtstuff
733 fixincludes=fixinc.ptx
734 extra_parts="crtbegin.o crtend.o"
735 install_headers_dir=install-headers-cpio
737 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
738 xm_file=i386/xm-sysv3.h
739 xmake_file=i386/x-sysv3
740 tm_file=i386/seq2-sysv3.h
741 tmake_file=i386/t-crtstuff
742 extra_parts="crtbegin.o crtend.o"
743 fixincludes=fixinc.ptx
744 install_headers_dir=install-headers-cpio
746 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
747 xm_file=i386/xm-sysv4.h
749 tm_file=i386/ptx4-i.h
751 extra_parts="crtbegin.o crtend.o"
752 fixincludes=fixinc.ptx
753 install_headers_dir=install-headers-cpio
755 i386-sun-sunos*) # Sun i386 roadrunner
756 xm_file=i386/xm-sun.h
761 tm_file=i386/i386-aout.h
762 tmake_file=i386/t-i386bare
764 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
765 tm_file=i386/bsd386.h
766 xm_file=i386/xm-bsd386.h
767 # tmake_file=t-libc-ok
770 tm_file=i386/386bsd.h
771 xm_file=i386/xm-bsd386.h
772 # tmake_file=t-libc-ok
773 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
776 i[[3456]]86-*-freebsdelf*)
777 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
778 # On FreeBSD, the headers are already ok, except for math.h.
779 fixincludes=fixinc.math
780 tmake_file=i386/t-freebsd
785 i[[3456]]86-*-freebsd*)
786 tm_file=i386/freebsd.h
787 # On FreeBSD, the headers are already ok, except for math.h.
788 fixincludes=fixinc.math
789 tmake_file=i386/t-freebsd
791 i[[3456]]86-*-netbsd*)
792 tm_file=i386/netbsd.h
793 # On NetBSD, the headers are already okay, except for math.h.
794 fixincludes=fixinc.math
798 tm_file=i386/i386-coff.h
799 tmake_file=i386/t-i386bare
801 i[[3456]]86-*-isc*) # 80386 running ISC system
802 xm_file=i386/xm-isc.h
804 i[[345]]86-*-isc[[34]]*)
805 xmake_file=i386/x-isc3
808 xmake_file=i386/x-isc
811 if [[ x$gas = xyes -a x$stabs = xyes ]]
813 tm_file=i386/iscdbx.h
814 tmake_file=i386/t-svr3dbx
815 extra_parts="svr3.ifile svr3z.ifile"
817 tm_file=i386/isccoff.h
818 tmake_file=i386/t-crtstuff
819 extra_parts="crtbegin.o crtend.o"
821 install_headers_dir=install-headers-cpio
823 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
824 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
825 xmake_file=x-linux-aout
826 tmake_file="t-linux-aout i386/t-crtstuff"
827 tm_file=i386/linux-oldld.h
828 fixincludes=Makefile.in #On Linux, the headers are ok already.
831 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
832 xm_file=i386/xm-linux.h # with a.out format
833 xmake_file=x-linux-aout
834 tmake_file="t-linux-aout i386/t-crtstuff"
835 tm_file=i386/linux-aout.h
836 fixincludes=Makefile.in #On Linux, the headers are ok already.
839 i[[3456]]86-*-linux-gnulibc1)
840 xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
841 xmake_file=x-linux # with ELF format using the
842 tm_file=i386/linux.h # GNU/Linux C library 5
843 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
844 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
845 fixincludes=Makefile.in #On Linux, the headers are ok already.
847 if [[ x$enable_threads = xyes ]]; then
851 i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
852 xm_file=i386/xm-linux.h # with ELF format using glibc 2
853 xmake_file=x-linux # aka GNU/Linux C library 6
855 tmake_file="t-linux i386/t-crtstuff"
856 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
857 fixincludes=Makefile.in #On Linux, the headers are ok already.
859 if [[ x$enable_threads = xyes ]]; then
865 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
866 xm_file=i386/xm-go32.h
868 tmake_file=i386/t-go32
870 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
873 fixincludes=Makefile.in
877 i[[3456]]86-*-lynxos*)
878 if [[ x$gas = xyes ]]
882 tm_file=i386/lynx-ng.h
884 xm_file=i386/xm-lynx.h
885 tmake_file=i386/t-i386bare
890 # tmake_file=t-libc-ok
893 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
894 if [[ x$elf = xyes ]]
896 tm_file=i386/osfelf.h
899 tm_file=i386/osfrose.h
902 xm_file=i386/xm-osf.h
903 xmake_file=i386/x-osfrose
904 tmake_file=i386/t-osf
907 i[[345]]86-go32-rtems*)
909 xm_file=i386/xm-go32.h
910 tm_file=i386/go32-rtems.h
911 tmake_file="i386/t-go32 t-rtems"
916 tmake_file="i386/t-i386bare t-rtems"
918 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
919 xm_file=i386/xm-sco5.h
920 xmake_file=i386/x-sco5
921 fixincludes=fixinc.sco
922 install_headers_dir=install-headers-cpio
924 tmake_file=i386/t-sco5
925 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
927 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
928 xm_file=i386/xm-sco.h
929 xmake_file=i386/x-sco4
930 fixincludes=fixinc.sco
931 install_headers_dir=install-headers-cpio
932 if [[ x$stabs = xyes ]]
934 tm_file=i386/sco4dbx.h
935 tmake_file=i386/t-svr3dbx
936 extra_parts="svr3.ifile svr3z.rfile"
939 tmake_file=i386/t-crtstuff
940 extra_parts="crtbegin.o crtend.o"
944 i[[3456]]86-*-sco*) # 80386 running SCO system
945 xm_file=i386/xm-sco.h
946 xmake_file=i386/x-sco
947 install_headers_dir=install-headers-cpio
948 if [[ x$stabs = xyes ]]
950 tm_file=i386/scodbx.h
951 tmake_file=i386/t-svr3dbx
952 extra_parts="svr3.ifile svr3z.rfile"
955 extra_parts="crtbegin.o crtend.o"
956 tmake_file=i386/t-crtstuff
960 i[[3456]]86-*-solaris2*)
961 xm_file=i386/xm-sysv4.h
962 if [[ x$stabs = xyes ]]
964 tm_file=i386/sol2dbg.h
968 tmake_file=i386/t-sol2
969 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
971 fixincludes=fixinc.svr4
973 if [[ x$enable_threads = xyes ]]; then
974 thread_file='solaris'
977 i[[3456]]86-*-sysv5*) # Intel x86 on System V Release 5
978 xm_file=i386/xm-sysv4.h
980 if [[ x$stabs = xyes ]]
982 tm_file="${tm_file} dbx.h"
984 tmake_file=i386/t-crtpic
986 extra_parts="crtbegin.o crtend.o"
987 fixincludes=Makefile.in # The headers are just fine, thank you.
989 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
990 xm_file=i386/xm-sysv4.h
992 if [[ x$stabs = xyes ]]
994 tm_file="${tm_file} dbx.h"
996 tmake_file=i386/t-crtpic
998 extra_parts="crtbegin.o crtend.o"
1000 i[[3456]]86-*-sysv*) # Intel 80386's running system V
1001 xm_file=i386/xm-sysv3.h
1002 xmake_file=i386/x-sysv3
1003 if [[ x$gas = xyes ]]
1005 if [[ x$stabs = xyes ]]
1007 tm_file=i386/svr3dbx.h
1008 tmake_file=i386/t-svr3dbx
1009 extra_parts="svr3.ifile svr3z.rfile"
1011 tm_file=i386/svr3gas.h
1012 extra_parts="crtbegin.o crtend.o"
1013 tmake_file=i386/t-crtstuff
1016 tm_file=i386/sysv3.h
1017 extra_parts="crtbegin.o crtend.o"
1018 tmake_file=i386/t-crtstuff
1021 i386-*-vsta) # Intel 80386's running VSTa kernel
1022 xm_file=i386/xm-vsta.h
1024 tmake_file=i386/t-vsta
1025 xmake_file=i386/x-vsta
1027 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1028 xm_file="${xm_file} i386/xm-cygwin32.h"
1029 tmake_file=i386/t-cygwin32
1030 tm_file=i386/cygwin32.h
1031 xmake_file=i386/x-cygwin32
1033 fixincludes=Makefile.in
1034 if [[ x$enable_threads = xyes ]]; then
1039 i[[3456]]86-*-mingw32)
1040 tm_file=i386/mingw32.h
1041 xm_file="${xm_file} i386/xm-mingw32.h"
1042 tmake_file=i386/t-cygwin32
1044 xmake_file=i386/x-cygwin32
1045 fixincludes=Makefile.in
1046 if [[ x$enable_threads = xyes ]]; then
1051 i[[3456]]86-*-winnt*)
1052 tm_file=i386/win-nt.h
1053 out_file=i386/i386.c
1054 xm_file=i386/xm-winnt.h
1055 xmake_file=winnt/x-winnt
1056 tmake_file=i386/t-winnt
1057 extra_host_objs="winnt.o oldnames.o"
1058 extra_gcc_objs="spawnv.o oldnames.o"
1059 fixincludes=fixinc.winnt
1060 if [[ x$gnu_ld != xyes ]]
1062 extra_programs=ld.exe
1064 if [[ x$enable_threads = xyes ]]; then
1068 i[[3456]]86-dg-dgux)
1069 xm_file=i386/xm-dgux.h
1070 out_file=i386/dgux.c
1072 tmake_file=i386/t-dgux
1073 xmake_file=i386/x-dgux
1074 fixincludes=fixinc.dgux
1075 install_headers_dir=install-headers-cpio
1077 i860-alliant-*) # Alliant FX/2800
1078 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1079 xm_file="${xm_file}"
1080 xmake_file=i860/x-fx2800
1081 tmake_file=i860/t-fx2800
1082 extra_parts="crtbegin.o crtend.o"
1085 tm_file="${tm_file} i860/bsd.h"
1086 if [[ x$gas = xyes ]]
1088 tm_file="${tm_file} i860/bsd-gas.h"
1093 tm_file="${tm_file} i860/mach.h"
1094 tmake_file=t-libc-ok
1096 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1097 tm_file="${tm_file} svr3.h i860/paragon.h"
1098 xm_file="${xm_file} xm-svr3.h"
1102 tm_file="${tm_file} svr3.h i860/sysv3.h"
1103 xm_file="${tm_file} xm-svr3.h"
1104 xmake_file=i860/x-sysv3
1105 extra_parts="crtbegin.o crtend.o"
1108 tm_file="${tm_file} svr4.h i860/sysv4.h"
1109 xm_file="${xm_file} xm-svr3.h"
1110 xmake_file=i860/x-sysv4
1112 extra_parts="crtbegin.o crtend.o"
1114 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1115 tm_file="${tm_file} i960/vx960.h"
1116 tmake_file=i960/t-vxworks960
1119 i960-wrs-vxworks5* | i960-wrs-vxworks)
1120 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1121 tmake_file=i960/t-vxworks960
1125 tm_file="${tm_file} i960/vx960.h"
1126 tmake_file=i960/t-vxworks960
1130 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1131 tmake_file=i960/t-960bare
1135 tmake_file="i960/t-960bare t-rtems"
1136 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1139 i960-*-*) # Default i960 environment.
1143 extra_parts="crtinit.o crtfini.o"
1145 m68000-convergent-sysv*)
1147 xm_file=m68k/xm-3b1.h
1149 extra_headers=math-68881.h
1151 m68000-hp-bsd*) # HP 9000/200 running BSD
1152 tm_file=m68k/hp2bsd.h
1153 xmake_file=m68k/x-hp2bsd
1155 extra_headers=math-68881.h
1157 m68000-hp-hpux*) # HP 9000 series 300
1158 xm_file=m68k/xm-hp320.h
1159 if [[ x$gas = xyes ]]
1161 xmake_file=m68k/x-hp320g
1162 tm_file=m68k/hp310g.h
1164 xmake_file=m68k/x-hp320
1165 tm_file=m68k/hp310.h
1167 install_headers_dir=install-headers-cpio
1169 extra_headers=math-68881.h
1174 extra_headers=math-68881.h
1177 tm_file=m68k/sun2o4.h
1179 extra_headers=math-68881.h
1182 xm_file=m68k/xm-3b1.h
1183 if [[ x$gas = xyes ]]
1190 extra_headers=math-68881.h
1192 m68k-apple-aux*) # Apple Macintosh running A/UX
1193 xm_file=m68k/xm-aux.h
1194 tmake_file=m68k/t-aux
1195 install_headers_dir=install-headers-cpio
1196 extra_headers=math-68881.h
1197 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1199 if [[ "$gnu_ld" = yes ]]
1201 tm_file="${tm_file} m68k/auxgld.h"
1203 tm_file="${tm_file} m68k/auxld.h"
1205 if [[ "$gas" = yes ]]
1207 tm_file="${tm_file} m68k/auxgas.h"
1209 tm_file="${tm_file} m68k/auxas.h"
1211 tm_file="${tm_file} m68k/a-ux.h"
1214 tm_file=m68k/apollo68.h
1215 xmake_file=m68k/x-apollo68
1217 extra_headers=math-68881.h
1219 m68k-altos-sysv*) # Altos 3068
1220 if [[ x$gas = xyes ]]
1222 tm_file=m68k/altos3068.h
1223 xm_file=m68k/xm-altos3068.h
1225 echo "The Altos is supported only with the GNU assembler" 1>&2
1228 extra_headers=math-68881.h
1230 m68k-bull-sysv*) # Bull DPX/2
1231 if [[ x$gas = xyes ]]
1233 if [[ x$stabs = xyes ]]
1235 tm_file=m68k/dpx2cdbx.h
1237 tm_file=m68k/dpx2g.h
1242 xm_file=m68k/xm-m68kv.h
1243 xmake_file=m68k/x-dpx2
1245 extra_headers=math-68881.h
1247 m68k-atari-sysv4*) # Atari variant of V.4.
1248 tm_file=m68k/atari.h
1249 xm_file=m68k/xm-atari.h
1251 extra_parts="crtbegin.o crtend.o"
1252 extra_headers=math-68881.h
1254 m68k-motorola-sysv*)
1255 tm_file=m68k/mot3300.h
1256 xm_file=m68k/xm-mot3300.h
1257 if [[ x$gas = xyes ]]
1259 xmake_file=m68k/x-mot3300-gas
1260 if [[ x$gnu_ld = xyes ]]
1262 tmake_file=m68k/t-mot3300-gald
1264 tmake_file=m68k/t-mot3300-gas
1268 xmake_file=m68k/x-mot3300
1269 if [[ x$gnu_ld = xyes ]]
1271 tmake_file=m68k/t-mot3300-gld
1273 tmake_file=m68k/t-mot3300
1277 gdb_needs_out_file_path=yes
1278 extra_parts="crt0.o mcrt0.o"
1279 extra_headers=math-68881.h
1281 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1282 tm_file=m68k/tower-as.h
1283 xm_file="${xm_file} xm-svr3.h"
1284 xmake_file=m68k/x-tower
1285 extra_parts="crtbegin.o crtend.o"
1286 extra_headers=math-68881.h
1289 tm_file=m68k/plexus.h
1290 xm_file=m68k/xm-plexus.h
1292 extra_headers=math-68881.h
1296 xm_file=m68k/xm-m68kv.h
1297 extra_headers=math-68881.h
1300 xm_file=m68k/xm-crds.h
1301 xmake_file=m68k/x-crds
1304 extra_headers=math-68881.h
1306 m68k-cbm-sysv4*) # Commodore variant of V.4.
1308 xm_file=m68k/xm-amix.h
1309 xmake_file=m68k/x-amix
1311 extra_parts="crtbegin.o crtend.o"
1312 extra_headers=math-68881.h
1315 tm_file=m68k/ccur-GAS.h
1316 xmake_file=m68k/x-ccur
1317 extra_headers=math-68881.h
1320 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1321 tm_file=m68k/hp3bsd44.h
1322 xmake_file=m68k/x-hp3bsd44
1324 extra_headers=math-68881.h
1326 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1327 tm_file=m68k/hp3bsd.h
1329 extra_headers=math-68881.h
1332 if [[ x$with_fp = xno ]]
1334 tm_file=m68k/isi-nfp.h
1339 extra_headers=math-68881.h
1341 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1342 xm_file=m68k/xm-hp320.h
1343 if [[ x$gas = xyes ]]
1345 xmake_file=m68k/x-hp320g
1346 tm_file=m68k/hp320g.h
1348 xmake_file=m68k/x-hp320
1349 tm_file=m68k/hpux7.h
1351 install_headers_dir=install-headers-cpio
1353 extra_headers=math-68881.h
1355 m68k-hp-hpux*) # HP 9000 series 300
1356 xm_file=m68k/xm-hp320.h
1357 if [[ x$gas = xyes ]]
1359 xmake_file=m68k/x-hp320g
1360 tm_file=m68k/hp320g.h
1362 xmake_file=m68k/x-hp320
1363 tm_file=m68k/hp320.h
1365 install_headers_dir=install-headers-cpio
1367 extra_headers=math-68881.h
1370 tm_file=m68k/sun3mach.h
1372 extra_headers=math-68881.h
1375 if [[ x$gas = xyes ]]
1377 tm_file=m68k/news3gas.h
1379 tm_file=m68k/news3.h
1382 extra_headers=math-68881.h
1384 m68k-sony-bsd* | m68k-sony-newsos*)
1385 if [[ x$gas = xyes ]]
1387 tm_file=m68k/newsgas.h
1392 extra_headers=math-68881.h
1394 m68k-next-nextstep2*)
1395 tm_file=m68k/next21.h
1396 xm_file=m68k/xm-next.h
1397 tmake_file=m68k/t-next
1398 xmake_file=m68k/x-next
1399 extra_objs=nextstep.o
1400 extra_headers=math-68881.h
1403 m68k-next-nextstep3*)
1405 xm_file=m68k/xm-next.h
1406 tmake_file=m68k/t-next
1407 xmake_file=m68k/x-next
1408 extra_objs=nextstep.o
1409 extra_headers=math-68881.h
1410 if [[ x$enable_threads = xyes ]]; then
1415 if [[ x$with_fp = xno ]]
1417 tm_file=m68k/sun3n3.h
1419 tm_file=m68k/sun3o3.h
1422 extra_headers=math-68881.h
1424 m68k-sun-sunos*) # For SunOS 4 (the default).
1425 if [[ x$with_fp = xno ]]
1427 tm_file=m68k/sun3n.h
1432 extra_headers=math-68881.h
1435 tm_file=m68k/vxm68k.h
1436 tmake_file=m68k/t-vxworks68
1437 extra_headers=math-68881.h
1440 tmake_file=m68k/t-m68kbare
1441 tm_file="m68k/m68k-aout.h libgloss.h"
1442 extra_headers=math-68881.h
1445 tmake_file=m68k/t-m68kbare
1446 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1447 extra_headers=math-68881.h
1450 if [[ x$gas = xyes ]]
1454 tm_file=m68k/lynx-ng.h
1456 xm_file=m68k/xm-lynx.h
1458 tmake_file=m68k/t-lynx
1459 extra_headers=math-68881.h
1462 tm_file=m68k/netbsd.h
1463 # On NetBSD, the headers are already okay, except for math.h.
1464 fixincludes=fixinc.math
1467 m68k-*-sysv3*) # Motorola m68k's running system V.3
1468 xm_file=m68k/xm-m68kv.h
1469 xmake_file=m68k/x-m68kv
1470 extra_parts="crtbegin.o crtend.o"
1471 extra_headers=math-68881.h
1473 m68k-*-sysv4*) # Motorola m68k's running system V.4
1474 tm_file=m68k/m68kv4.h
1475 xm_file=m68k/xm-m68kv.h
1477 extra_parts="crtbegin.o crtend.o"
1478 extra_headers=math-68881.h
1480 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1481 xm_file=m68k/xm-linux.h # with a.out format
1483 tm_file=m68k/linux-aout.h
1484 tmake_file="t-linux-aout m68k/t-linux-aout"
1485 fixincludes=Makefile.in # The headers are ok already.
1486 extra_headers=math-68881.h
1489 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1490 xm_file=m68k/xm-linux.h # with ELF format using the
1491 xmake_file=x-linux # GNU/Linux C library 5
1492 tm_file=m68k/linux.h
1493 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1494 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1495 fixincludes=Makefile.in # The headers are ok already.
1496 extra_headers=math-68881.h
1499 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1500 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1501 xmake_file=x-linux # aka the GNU/Linux C library 6.
1502 tm_file=m68k/linux.h
1503 tmake_file="t-linux m68k/t-linux"
1504 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1505 fixincludes=Makefile.in # The headers are ok already.
1506 extra_headers=math-68881.h
1508 if [[ x$enable_threads = xyes ]]; then
1513 tmake_file=m68k/t-m68kbare
1514 tm_file=m68k/m68k-psos.h
1515 extra_headers=math-68881.h
1518 tmake_file="m68k/t-m68kbare t-rtems"
1519 tm_file=m68k/rtems.h
1520 extra_headers=math-68881.h
1526 tm_file=m88k/dguxbcs.h
1527 tmake_file=m88k/t-dguxbcs
1531 tmake_file=m88k/t-dgux
1534 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1535 xmake_file=m88k/x-dgux
1536 if [[ x$gas = xyes ]]
1538 tmake_file=m88k/t-dgux-gas
1540 fixincludes=fixinc.dgux
1542 m88k-dolphin-sysv3*)
1543 tm_file=m88k/dolph.h
1544 extra_parts="crtbegin.o crtend.o"
1545 xm_file=m88k/xm-sysv3.h
1546 xmake_file=m88k/x-dolph
1547 if [[ x$gas = xyes ]]
1549 tmake_file=m88k/t-m88k-gas
1552 m88k-tektronix-sysv3)
1553 tm_file=m88k/tekXD88.h
1554 extra_parts="crtbegin.o crtend.o"
1555 xm_file=m88k/xm-sysv3.h
1556 xmake_file=m88k/x-tekXD88
1557 if [[ x$gas = xyes ]]
1559 tmake_file=m88k/t-m88k-gas
1563 tm_file=m88k/m88k-aout.h
1566 tm_file=m88k/m88k-coff.h
1567 tmake_file=m88k/t-bug
1571 extra_parts="crtbegin.o crtend.o"
1572 if [[ x$gas = xyes ]]
1574 tmake_file=m88k/t-luna-gas
1576 tmake_file=m88k/t-luna
1580 tm_file=m88k/sysv3.h
1581 extra_parts="crtbegin.o crtend.o"
1582 xm_file=m88k/xm-sysv3.h
1583 xmake_file=m88k/x-sysv3
1584 if [[ x$gas = xyes ]]
1586 tmake_file=m88k/t-m88k-gas
1590 tm_file=m88k/sysv4.h
1591 extra_parts="crtbegin.o crtend.o"
1592 xmake_file=m88k/x-sysv4
1593 tmake_file=m88k/t-sysv4
1595 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1596 tm_file=mips/iris6.h
1597 xm_file=mips/xm-iris6.h
1598 fixincludes=fixinc.irix
1599 xmake_file=mips/x-iris6
1600 tmake_file=mips/t-iris6
1601 if [[ x$enable_threads = xyes ]]; then
1605 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1606 tm_file=mips/cross64.h
1607 xm_file=mips/xm-iris5.h
1608 fixincludes=Makefile.in
1609 xmake_file=mips/x-iris
1610 tmake_file=mips/t-cross64
1611 # See comment in mips/iris[56].h files.
1613 if [[ x$enable_threads = xyes ]]; then
1618 if [[ x$gas = xyes ]]
1620 if [[ x$stabs = xyes ]]
1622 tm_file=mips/iris5gdb.h
1624 tm_file=mips/sni-gas.h
1627 tm_file=mips/sni-svr4.h
1629 xm_file=mips/xm-sysv.h
1630 xmake_file=mips/x-sni-svr4
1631 tmake_file=mips/t-mips-gas
1632 if [[ x$gnu_ld != xyes ]]
1637 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1638 if [[ x$gas = xyes ]]
1640 tm_file=mips/iris5gas.h
1641 if [[ x$stabs = xyes ]]
1643 tm_file="${tm_file} dbx.h"
1646 tm_file=mips/iris5.h
1648 xm_file=mips/xm-iris5.h
1649 fixincludes=fixinc.irix
1650 xmake_file=mips/x-iris
1651 # mips-tfile doesn't work yet
1652 tmake_file=mips/t-mips-gas
1653 # See comment in mips/iris5.h file.
1655 if [[ x$enable_threads = xyes ]]; then
1659 mips-sgi-irix4loser*) # Mostly like a MIPS.
1660 tm_file=mips/iris4loser.h
1661 if [[ x$stabs = xyes ]]; then
1662 tm_file="${tm_file} dbx.h"
1664 xm_file=mips/xm-iris4.h
1665 xmake_file=mips/x-iris
1666 if [[ x$gas = xyes ]]
1668 tmake_file=mips/t-mips-gas
1670 extra_passes="mips-tfile mips-tdump"
1672 if [[ x$gnu_ld != xyes ]]
1676 if [[ x$enable_threads = xyes ]]; then
1680 mips-sgi-irix4*) # Mostly like a MIPS.
1681 tm_file=mips/iris4.h
1682 if [[ x$stabs = xyes ]]; then
1683 tm_file="${tm_file} dbx.h"
1685 xm_file=mips/xm-iris4.h
1686 xmake_file=mips/x-iris
1687 if [[ x$gas = xyes ]]
1689 tmake_file=mips/t-mips-gas
1691 extra_passes="mips-tfile mips-tdump"
1693 if [[ x$gnu_ld != xyes ]]
1697 if [[ x$enable_threads = xyes ]]; then
1701 mips-sgi-*) # Mostly like a MIPS.
1702 tm_file=mips/iris3.h
1703 if [[ x$stabs = xyes ]]; then
1704 tm_file="${tm_file} dbx.h"
1706 xm_file=mips/xm-iris3.h
1707 xmake_file=mips/x-iris3
1708 if [[ x$gas = xyes ]]
1710 tmake_file=mips/t-mips-gas
1712 extra_passes="mips-tfile mips-tdump"
1714 if [[ x$gnu_ld != xyes ]]
1719 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1720 tm_file=mips/osfrose.h
1721 xmake_file=mips/x-osfrose
1722 tmake_file=mips/t-osfrose
1723 extra_objs=halfpic.o
1726 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1727 tm_file=mips/dec-osf1.h
1728 if [[ x$stabs = xyes ]]; then
1729 tm_file="${tm_file} dbx.h"
1731 xmake_file=mips/x-dec-osf1
1732 if [[ x$gas = xyes ]]
1734 tmake_file=mips/t-mips-gas
1736 tmake_file=mips/t-ultrix
1737 extra_passes="mips-tfile mips-tdump"
1739 if [[ x$gnu_ld != xyes ]]
1744 mips-dec-bsd*) # Decstation running 4.4 BSD
1745 tm_file=mips/dec-bsd.h
1747 if [[ x$gas = xyes ]]
1749 tmake_file=mips/t-mips-gas
1751 tmake_file=mips/t-ultrix
1752 extra_passes="mips-tfile mips-tdump"
1754 if [[ x$gnu_ld != xyes ]]
1759 mips-dec-netbsd*) # Decstation running NetBSD
1760 tm_file=mips/netbsd.h
1761 # On NetBSD, the headers are already okay, except for math.h.
1762 fixincludes=fixinc.math
1765 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1766 tm_file=mips/news4.h
1767 if [[ x$stabs = xyes ]]; then
1768 tm_file="${tm_file} dbx.h"
1770 if [[ x$gas = xyes ]]
1772 tmake_file=mips/t-mips-gas
1774 extra_passes="mips-tfile mips-tdump"
1776 if [[ x$gnu_ld != xyes ]]
1780 xmake_file=mips/x-sony
1782 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1783 # That is based on svr4.
1784 # t-svr4 is not right because this system doesn't use ELF.
1785 tm_file=mips/news5.h
1786 if [[ x$stabs = xyes ]]; then
1787 tm_file="${tm_file} dbx.h"
1789 xm_file=mips/xm-news.h
1790 if [[ x$gas = xyes ]]
1792 tmake_file=mips/t-mips-gas
1794 extra_passes="mips-tfile mips-tdump"
1796 if [[ x$gnu_ld != xyes ]]
1801 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1802 tm_file=mips/svr4-t.h
1803 if [[ x$stabs = xyes ]]; then
1804 tm_file="${tm_file} dbx.h"
1806 xm_file=mips/xm-sysv4.h
1807 xmake_file=mips/x-sysv
1808 if [[ x$gas = xyes ]]
1810 tmake_file=mips/t-mips-gas
1811 extra_parts="crtbegin.o crtend.o"
1813 tmake_file=mips/t-mips
1814 extra_passes="mips-tfile mips-tdump"
1816 if [[ x$gnu_ld != xyes ]]
1821 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1822 tm_file=mips/ultrix.h
1823 if [[ x$stabs = xyes ]]; then
1824 tm_file="${tm_file} dbx.h"
1826 xmake_file=mips/x-ultrix
1827 if [[ x$gas = xyes ]]
1829 tmake_file=mips/t-mips-gas
1831 tmake_file=mips/t-ultrix
1832 extra_passes="mips-tfile mips-tdump"
1834 if [[ x$gnu_ld != xyes ]]
1839 mips-*-riscos[[56789]]bsd*)
1840 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1841 if [[ x$stabs = xyes ]]; then
1842 tm_file="${tm_file} dbx.h"
1844 if [[ x$gas = xyes ]]
1846 tmake_file=mips/t-bsd-gas
1848 tmake_file=mips/t-bsd
1849 extra_passes="mips-tfile mips-tdump"
1851 if [[ x$gnu_ld != xyes ]]
1856 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1857 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1858 if [[ x$stabs = xyes ]]; then
1859 tm_file="${tm_file} dbx.h"
1861 if [[ x$gas = xyes ]]
1863 tmake_file=mips/t-bsd-gas
1865 tmake_file=mips/t-bsd
1866 extra_passes="mips-tfile mips-tdump"
1868 if [[ x$gnu_ld != xyes ]]
1873 mips-*-riscos[[56789]]sysv4*)
1874 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1875 if [[ x$stabs = xyes ]]; then
1876 tm_file="${tm_file} dbx.h"
1878 xm_file=mips/xm-sysv4.h
1879 xmake_file=mips/x-sysv
1880 if [[ x$gas = xyes ]]
1882 tmake_file=mips/t-svr4-gas
1884 tmake_file=mips/t-svr4
1885 extra_passes="mips-tfile mips-tdump"
1887 if [[ x$gnu_ld != xyes ]]
1892 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1893 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1894 if [[ x$stabs = xyes ]]; then
1895 tm_file="${tm_file} dbx.h"
1897 xm_file=mips/xm-sysv.h
1898 xmake_file=mips/x-sysv
1899 if [[ x$gas = xyes ]]
1901 tmake_file=mips/t-svr4-gas
1903 tmake_file=mips/t-svr4
1904 extra_passes="mips-tfile mips-tdump"
1906 if [[ x$gnu_ld != xyes ]]
1911 mips-*-riscos[[56789]]sysv*)
1912 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1913 if [[ x$stabs = xyes ]]; then
1914 tm_file="${tm_file} dbx.h"
1916 xm_file=mips/xm-sysv.h
1917 xmake_file=mips/x-sysv
1918 if [[ x$gas = xyes ]]
1920 tmake_file=mips/t-svr3-gas
1922 tmake_file=mips/t-svr3
1923 extra_passes="mips-tfile mips-tdump"
1925 if [[ x$gnu_ld != xyes ]]
1930 mips-*-sysv* | mips-*-riscos*sysv*)
1931 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1932 if [[ x$stabs = xyes ]]; then
1933 tm_file="${tm_file} dbx.h"
1935 xm_file=mips/xm-sysv.h
1936 xmake_file=mips/x-sysv
1937 if [[ x$gas = xyes ]]
1939 tmake_file=mips/t-svr3-gas
1941 tmake_file=mips/t-svr3
1942 extra_passes="mips-tfile mips-tdump"
1944 if [[ x$gnu_ld != xyes ]]
1949 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1950 tm_file=mips/mips-5.h
1951 if [[ x$stabs = xyes ]]; then
1952 tm_file="${tm_file} dbx.h"
1954 if [[ x$gas = xyes ]]
1956 tmake_file=mips/t-mips-gas
1958 extra_passes="mips-tfile mips-tdump"
1960 if [[ x$gnu_ld != xyes ]]
1968 tm_file=mips/ecoffl.h
1969 if [[ x$stabs = xyes ]]; then
1970 tm_file="${tm_file} dbx.h"
1972 tmake_file=mips/t-ecoff
1975 tm_file=mips/ecoff.h
1976 if [[ x$stabs = xyes ]]; then
1977 tm_file="${tm_file} dbx.h"
1979 tmake_file=mips/t-ecoff
1982 tm_file="mips/elfl.h libgloss.h"
1983 tmake_file=mips/t-ecoff
1986 tm_file="mips/elf.h libgloss.h"
1987 tmake_file=mips/t-ecoff
1990 tm_file="mips/elfl64.h libgloss.h"
1991 tmake_file=mips/t-ecoff
1993 mips64orionel-*-elf*)
1994 tm_file="mips/elflorion.h libgloss.h"
1995 tmake_file=mips/t-ecoff
1998 tm_file="mips/elf64.h libgloss.h"
1999 tmake_file=mips/t-ecoff
2002 tm_file="mips/elforion.h libgloss.h"
2003 tmake_file=mips/t-ecoff
2005 mips64orion-*-rtems*)
2006 tm_file=mips/rtems64.h
2007 tmake_file="mips/t-ecoff t-rtems"
2010 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2011 tmake_file=mips/t-ecoff
2014 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2015 tmake_file=mips/t-ecoff
2017 mips-*-*) # Default MIPS RISC-OS 4.0.
2018 if [[ x$stabs = xyes ]]; then
2019 tm_file="${tm_file} dbx.h"
2021 if [[ x$gas = xyes ]]
2023 tmake_file=mips/t-mips-gas
2025 extra_passes="mips-tfile mips-tdump"
2027 if [[ x$gnu_ld != xyes ]]
2034 tm_file="mn10200/mn10200.h"
2035 if [[ x$stabs = xyes ]]
2037 tm_file="${tm_file} dbx.h"
2043 tm_file="mn10300/mn10300.h"
2044 if [[ x$stabs = xyes ]]
2046 tm_file="${tm_file} dbx.h"
2051 tm_file=ns32k/encore.h
2055 tm_file=ns32k/sequent.h
2059 tm_file=ns32k/tek6100.h
2063 tm_file=ns32k/tek6200.h
2066 # This has not been updated to GCC 2.
2068 # xm_file=ns32k/xm-genix.h
2069 # xmake_file=ns32k/x-genix
2070 # tm_file=ns32k/genix.h
2074 tm_file=ns32k/merlin.h
2078 tm_file=ns32k/pc532-mach.h
2082 tm_file=ns32k/pc532-min.h
2083 xm_file=ns32k/xm-pc532-min.h
2086 ns32k-pc532-netbsd*)
2087 tm_file=ns32k/netbsd.h
2088 # On NetBSD, the headers are already okay, except for math.h.
2089 fixincludes=fixinc.math
2093 tm_file="${tm_file} pdp11/2bsd.h"
2099 xmake_file=pyr/x-pyr
2106 xmake_file=romp/x-mach
2111 tm_file=rs6000/beos.h
2112 xm_file=rs6000/xm-beos.h
2113 tmake_file=rs6000/t-beos
2114 xmake_file=rs6000/x-beos
2116 powerpc-*-sysv* | powerpc-*-elf*)
2117 tm_file=rs6000/sysv4.h
2118 xm_file=rs6000/xm-sysv4.h
2119 extra_headers=ppc-asm.h
2120 if [[ x$gas = xyes ]]
2122 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2124 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2126 xmake_file=rs6000/x-sysv4
2129 tm_file=rs6000/eabiaix.h
2130 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2131 fixincludes=Makefile.in
2132 extra_headers=ppc-asm.h
2135 tm_file=rs6000/eabisim.h
2136 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2137 fixincludes=Makefile.in
2138 extra_headers=ppc-asm.h
2141 tm_file=rs6000/eabi.h
2142 if [[ x$gas = xyes ]]
2144 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2146 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2148 fixincludes=Makefile.in
2149 extra_headers=ppc-asm.h
2152 tm_file=rs6000/rtems.h
2153 if [[ x$gas = xyes ]]
2155 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2157 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2159 fixincludes=Makefile.in
2160 extra_headers=ppc-asm.h
2162 powerpc-*-linux-gnu*)
2163 tm_file=rs6000/linux.h
2164 xm_file=rs6000/xm-sysv4.h
2165 out_file=rs6000/rs6000.c
2166 if [[ x$gas = xyes ]]
2168 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2170 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2173 fixincludes=Makefile.in
2174 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2175 extra_headers=ppc-asm.h
2176 if [[ x$enable_threads = xyes ]]; then
2182 xm_file=rs6000/xm-sysv4.h
2183 tm_file=rs6000/vxppc.h
2184 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2185 extra_headers=ppc-asm.h
2187 powerpcle-*-sysv* | powerpcle-*-elf*)
2188 tm_file=rs6000/sysv4le.h
2189 xm_file=rs6000/xm-sysv4.h
2190 if [[ x$gas = xyes ]]
2192 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2194 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2196 xmake_file=rs6000/x-sysv4
2197 extra_headers=ppc-asm.h
2199 powerpcle-*-eabisim*)
2200 tm_file=rs6000/eabilesim.h
2201 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2202 fixincludes=Makefile.in
2203 extra_headers=ppc-asm.h
2206 tm_file=rs6000/eabile.h
2207 if [[ x$gas = xyes ]]
2209 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2211 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2213 fixincludes=Makefile.in
2214 extra_headers=ppc-asm.h
2216 powerpcle-*-winnt* )
2217 tm_file=rs6000/win-nt.h
2218 tmake_file=rs6000/t-winnt
2220 fixincludes=Makefile.in
2221 if [[ x$enable_threads = xyes ]]; then
2224 extra_headers=ppc-asm.h
2226 powerpcle-*-pe | powerpcle-*-cygwin32)
2227 tm_file=rs6000/cygwin32.h
2228 xm_file=rs6000/xm-cygwin32.h
2229 tmake_file=rs6000/t-winnt
2230 xmake_file=rs6000/x-cygwin32
2232 fixincludes=Makefile.in
2233 if [[ x$enable_threads = xyes ]]; then
2237 extra_headers=ppc-asm.h
2239 powerpcle-*-solaris2*)
2240 tm_file=rs6000/sol2.h
2241 xm_file=rs6000/xm-sysv4.h
2242 if [[ x$gas = xyes ]]
2244 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2246 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2248 xmake_file=rs6000/x-sysv4
2249 fixincludes=fixinc.math
2250 extra_headers=ppc-asm.h
2252 rs6000-ibm-aix3.[[01]]*)
2253 tm_file=rs6000/aix31.h
2254 xmake_file=rs6000/x-aix31
2257 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2258 tm_file=rs6000/aix3newas.h
2259 if [[ x$host != x$target ]]
2261 tmake_file=rs6000/t-xnewas
2263 tmake_file=rs6000/t-newas
2267 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2268 tm_file=rs6000/aix41.h
2269 if [[ x$host != x$target ]]
2271 tmake_file=rs6000/t-xnewas
2273 tmake_file=rs6000/t-newas
2275 xmake_file=rs6000/x-aix31
2285 tm_file=rs6000/mach.h
2286 xm_file=rs6000/xm-mach.h
2287 xmake_file=rs6000/x-mach
2291 tm_file=rs6000/lynx.h
2292 xm_file=rs6000/xm-lynx.h
2293 tmake_file=rs6000/t-rs6000
2294 xmake_file=rs6000/x-lynx
2302 tmake_file="sh/t-sh t-rtems"
2311 xm_file=sparc/xm-pbd.h
2313 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2314 tm_file=sparc/vxsparc.h
2315 tmake_file=sparc/t-vxsparc
2319 tmake_file=sparc/t-sparcbare
2320 tm_file="sparc/aout.h libgloss.h"
2323 tm_file=sparc/netbsd.h
2324 # On NetBSD, the headers are already okay, except for math.h.
2325 fixincludes=fixinc.math
2333 tmake_file=sparc/t-elf
2334 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2338 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2339 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2340 tm_file=sparc/linux-aout.h
2342 fixincludes=Makefile.in #On Linux, the headers are ok already.
2345 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2346 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2348 tm_file=sparc/linux.h
2349 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2350 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2351 fixincludes=Makefile.in #On Linux, the headers are ok already.
2354 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2355 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2357 tm_file=sparc/linux.h
2358 tmake_file="t-linux sparc/t-linux"
2359 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2360 fixincludes=Makefile.in #On Linux, the headers are ok already.
2362 if [[ x$enable_threads = xyes ]]; then
2367 if [[ x$gas = xyes ]]
2369 tm_file=sparc/lynx.h
2371 tm_file=sparc/lynx-ng.h
2373 xm_file=sparc/xm-lynx.h
2374 tmake_file=sparc/t-sunos41
2378 tmake_file="sparc/t-sparcbare t-rtems"
2379 tm_file=sparc/rtems.h
2382 tm_file=sparc/sol2.h
2383 xm_file=sparc/xm-sol2.h
2384 tmake_file=sparc/t-sol2
2385 xmake_file=sparc/x-sysv4
2386 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2387 fixincludes=fixinc.svr4
2390 if [[ x${enable_threads} = x ]]; then
2391 enable_threads=$have_pthread_h
2392 if [[ x${enable_threads} = x ]]; then
2393 enable_threads=$have_thread_h
2396 if [[ x${enable_threads} = xyes ]]; then
2397 if [[ x${have_pthread_h} = xyes ]]; then
2400 thread_file='solaris'
2405 tm_file=sparc/sunos4.h
2406 tmake_file=sparc/t-sunos40
2410 tm_file=sparc/sunos4.h
2411 tmake_file=sparc/t-sunos41
2413 if [[ x$gas = xyes ]]; then
2414 tm_file="${tm_file} sparc/sun4gas.h"
2418 tm_file=sparc/sun4o3.h
2422 tm_file=sparc/sysv4.h
2423 xm_file=sparc/xm-sysv4.h
2425 xmake_file=sparc/x-sysv4
2426 extra_parts="crtbegin.o crtend.o"
2429 xm_file=sparc/xm-sol2.h
2430 tm_file=sparc/vxsim.h
2431 tmake_file=sparc/t-vxsparc
2432 xmake_file=sparc/x-sysv4
2435 tm_file="sparc/splet.h libgloss.h"
2436 tmake_file=sparc/t-splet
2439 tm_file="sparc/litecoff.h libgloss.h"
2440 tmake_file=sparc/t-sparclite
2443 tm_file="sparc/lite.h aoutos.h libgloss.h"
2444 tmake_file=sparc/t-sparclite
2447 tmake_file=sparc/t-sp64
2448 tm_file=sparc/sp64-aout.h
2451 tmake_file=sparc/t-sp64
2452 tm_file=sparc/sp64-elf.h
2453 extra_parts="crtbegin.o crtend.o"
2455 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2456 tmake_file=sparc/t-sp64
2457 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2458 tm_file=sparc/linux64.h
2460 fixincludes=Makefile.in # The headers are ok already.
2463 # This hasn't been upgraded to GCC 2.
2464 # tahoe-harris-*) # Harris tahoe, using COFF.
2465 # tm_file=tahoe/harris.h
2467 # tahoe-*-bsd*) # tahoe running BSD
2469 # This hasn't been upgraded to GCC 2.
2476 tm_file="v850/v850.h"
2477 xm_file="v850/xm-v850.h"
2478 if [[ x$stabs = xyes ]]
2480 tm_file="${tm_file} dbx.h"
2484 vax-*-bsd*) # vaxen running BSD
2488 vax-*-sysv*) # vaxen running system V
2489 tm_file="${tm_file} vax/vaxv.h"
2490 xm_file="${xm_file} vax/xm-vaxv.h"
2494 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2495 # On NetBSD, the headers are already okay, except for math.h.
2496 fixincludes=fixinc.math
2500 vax-*-ultrix*) # vaxen running ultrix
2501 tm_file="${tm_file} vax/ultrix.h"
2505 vax-*-vms*) # vaxen running VMS
2506 xm_file=vax/xm-vms.h
2510 vax-*-*) # vax default entry
2514 xm_file="${xm_file} xm-svr3"
2518 echo "Configuration $machine not supported" 1>&2
2525 ;; # Existing Linux/GNU systems do not use the GNU setup.
2527 # On the GNU system, the setup is just about the same on
2528 # each different CPU. The specific machines that GNU
2529 # supports are matched above and just set $cpu_type.
2530 xm_file=${cpu_type}/xm-gnu.h
2531 tm_file=${cpu_type}/gnu.h
2532 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2533 # GNU always uses ELF.
2535 # GNU tools are the only tools.
2538 # On GNU, the headers are already okay.
2539 fixincludes=Makefile.in
2540 xmake_file=x-linux # These details are the same as Linux.
2541 tmake_file=t-gnu # These are not.
2544 fixincludes=fixinc.svr4
2545 xmake_try_sysv=x-sysv
2546 install_headers_dir=install-headers-cpio
2549 install_headers_dir=install-headers-cpio
2553 # Distinguish i[3456]86
2554 # Also, do not run mips-tfile on MIPS if using gas.
2555 # Process --with-cpu= for PowerPC/rs6000
2556 target_cpu_default2=
2559 target_cpu_default2=1
2562 target_cpu_default2=2
2565 target_cpu_default2=3
2570 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2573 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
2576 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2579 target_cpu_default2="MASK_CPU_EV5"
2583 if [[ x$gas = xyes ]]
2585 if [[ "$target_cpu_default2" = "" ]]
2587 target_cpu_default2="MASK_GAS"
2589 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2594 case "x$with_cpu" in
2597 target_cpu_default2="TARGET_CPU_generic"
2600 # Distinguish cores, and major variants
2601 # arm7m doesn't exist, but D & I don't affect code
2602 xarm[23678] | xarm250 | xarm[67][01]0 \
2603 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2604 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2605 | xstrongarm | xstrongarm110)
2606 target_cpu_default2="TARGET_CPU_$with_cpu"
2610 echo "--with-cpu must be passed a value" 1>&2
2615 if [[ x$pass2done = xyes ]]
2617 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2624 mips*-*-ecoff* | mips*-*-elf*)
2625 if [[ x$gas = xyes ]]
2627 if [[ x$gnu_ld = xyes ]]
2629 target_cpu_default2=20
2631 target_cpu_default2=16
2636 if [[ x$gas = xyes ]]
2638 target_cpu_default2=16
2641 powerpc*-*-* | rs6000-*-*)
2642 case "x$with_cpu" in
2646 xcommon | xpower | xpower2 | xpowerpc | xrios \
2647 | xrios1 | xrios2 | xrsc | xrsc1 \
2648 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2649 | x403 | x505 | x801 | x821 | x823 | x860)
2650 target_cpu_default2="\"$with_cpu\""
2654 echo "--with-cpu must be passed a value" 1>&2
2659 if [[ x$pass2done = xyes ]]
2661 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2668 case ".$with_cpu" in
2670 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2672 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2673 target_cpu_default2="TARGET_CPU_$with_cpu"
2676 if [[ x$pass2done = xyes ]]
2678 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2686 if [[ "$target_cpu_default2" != "" ]]
2688 if [[ "$target_cpu_default" != "" ]]
2690 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2692 target_cpu_default=$target_cpu_default2
2696 # No need for collect2 if we have the GNU linker.
2703 # Save data on machine being used to compile GCC in build_xm_file.
2704 # Save data on host machine in vars host_xm_file and host_xmake_file.
2705 if [[ x$pass1done = x ]]
2707 if [[ x"$xm_file" = x ]]
2708 then build_xm_file=$cpu_type/xm-$cpu_type.h
2709 else build_xm_file=$xm_file
2711 build_install_headers_dir=$install_headers_dir
2712 build_exeext=$exeext
2715 if [[ x$pass2done = x ]]
2717 if [[ x"$xm_file" = x ]]
2718 then host_xm_file=$cpu_type/xm-$cpu_type.h
2719 else host_xm_file=$xm_file
2721 if [[ x"$xmake_file" = x ]]
2722 then xmake_file=$cpu_type/x-$cpu_type
2724 host_xmake_file="$xmake_file"
2725 host_truncate_target=$truncate_target
2726 host_extra_gcc_objs=$extra_gcc_objs
2727 host_extra_objs=$extra_host_objs
2734 extra_objs="${host_extra_objs} ${extra_objs}"
2736 # Default the target-machine variables that were not explicitly set.
2737 if [[ x"$tm_file" = x ]]
2738 then tm_file=$cpu_type/$cpu_type.h; fi
2740 if [[ x$extra_headers = x ]]
2741 then extra_headers=; fi
2743 if [[ x"$xm_file" = x ]]
2744 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2746 md_file=$cpu_type/$cpu_type.md
2748 if [[ x$out_file = x ]]
2749 then out_file=$cpu_type/$cpu_type.c; fi
2751 if [[ x"$tmake_file" = x ]]
2752 then tmake_file=$cpu_type/t-$cpu_type
2755 if [[ x$float_format = x ]]
2756 then float_format=i64
2759 if [[ x$enable_haifa = x ]]
2762 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-*)
2767 # Say what files are being used for the output code and MD file.
2768 echo "Using \`$srcdir/config/$out_file' to output insns."
2769 echo "Using \`$srcdir/config/$md_file' as machine description file."
2772 for f in $tm_file; do
2775 if [[ $count = ax ]]; then
2776 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2778 echo "Using the following target machine macro files:"
2779 for f in $tm_file; do
2780 echo " $srcdir/config/$f"
2785 for f in $host_xm_file; do
2788 if [[ $count = ax ]]; then
2789 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2791 echo "Using the following host machine macro files:"
2792 for f in $host_xm_file; do
2793 echo " $srcdir/config/$f"
2797 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2799 for f in $build_xm_file; do
2802 if [[ $count = ax ]]; then
2803 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2805 echo "Using the following build machine macro files:"
2806 for f in $build_xm_file; do
2807 echo " $srcdir/config/$f"
2812 if [[ x$thread_file = x ]]
2813 then thread_file='single'
2816 # Set up the header files.
2817 # $links is the list of header files to create.
2818 # $vars is the list of shell variables with file names to include.
2819 # auto-conf.h is the file containing items generated by autoconf and is
2820 # the first file included by config.h.
2821 host_xm_file="auto-config.h ${host_xm_file}"
2822 vars="host_xm_file tm_file xm_file build_xm_file"
2823 links="config.h tm.h tconfig.h hconfig.h"
2826 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2829 while [[ -n "$vars" ]]
2831 # set file to car of files, files to cdr of files
2832 set $vars; var=$1; shift; vars=$*
2833 set $links; link=$1; shift; links=$*
2837 # Define TARGET_CPU_DEFAULT if the system wants one.
2838 # This substitutes for lots of *.h files.
2839 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
2841 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
2844 for file in `eval echo '$'$var`; do
2845 echo "#include \"$file\"" >>$link
2849 # Truncate the target if necessary
2850 if [[ x$host_truncate_target != x ]]; then
2851 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2854 # Get the version number from the toplevel
2855 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2857 # Get an absolute path to the GCC top-level source directory
2863 # Conditionalize the makefile for this host machine.
2864 # Make-host contains the concatenation of all host makefile fragments
2865 # [there can be more than one]. This file is built by configure.frag.
2866 host_overrides=Make-host
2867 dep_host_xmake_file=
2868 for f in .. ${host_xmake_file}
2870 if [[ -f ${srcdir}/config/$f ]]
2872 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2876 # Conditionalize the makefile for this target machine.
2877 # Make-target contains the concatenation of all host makefile fragments
2878 # [there can be more than one]. This file is built by configure.frag.
2879 target_overrides=Make-target
2881 for f in .. ${tmake_file}
2883 if [[ -f ${srcdir}/config/$f ]]
2885 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2889 # If the host doesn't support symlinks, modify CC in
2890 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2891 # Otherwise, we can use "CC=$(CC)".
2893 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2895 cc_set_by_configure="\$(CC)"
2896 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2898 symbolic_link="cp -p"
2899 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2900 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2904 out_object_file=`basename $out_file .c`.o
2907 for f in $tm_file; do
2908 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2912 for f in $host_xm_file; do
2913 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2917 for f in $build_xm_file; do
2918 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2921 # Define macro CROSS_COMPILE in compilation
2922 # if this is a cross-compiler.
2923 # Also use all.cross instead of all.internal
2924 # and add cross-make to Makefile.
2925 cross_overrides="/dev/null"
2926 if [[ x$host != x$target ]]
2928 cross_defines="CROSS=-DCROSS_COMPILE"
2929 cross_overrides="${topdir}/cross-make"
2932 # When building gcc with a cross-compiler, we need to fix a few things.
2933 # This must come after cross-make as we want all.build to override
2935 build_overrides="/dev/null"
2936 if [[ x$build != x$host ]]
2938 build_overrides="${topdir}/build-make"
2941 # Expand extra_headers to include complete path.
2942 # This substitutes for lots of t-* files.
2944 if [[ "x$extra_headers" = x ]]
2947 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2948 for file in $extra_headers;
2950 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2954 # Add a definition of USE_COLLECT2 if system wants one.
2955 # Also tell toplev.c what to do.
2956 # This substitutes for lots of t-* files.
2957 if [[ x$use_collect2 = x ]]
2962 will_use_collect2="ld"
2963 maybe_use_collect2="-DUSE_COLLECT2"
2967 # Set MD_DEPS if the real md file is in md.pre-cpp.
2968 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
2969 # for line oriented comments, so we must always use a GNU cpp. If
2970 # building gcc with a cross compiler, use the cross compiler just
2971 # built. Otherwise, we can use the cpp just built.
2973 if [[ "x$md_cppflags" = x ]]
2975 md_file_sub=$srcdir/config/$md_file
2980 # If we have gas in the build tree, make a link to it.
2981 if [[ -f ../gas/Makefile ]]; then
2982 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
2985 # If we have ld in the build tree, make a link to it.
2986 if [[ -f ../ld/Makefile ]]; then
2987 # if [[ x$use_collect2 = x ]]; then
2988 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
2990 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
2994 # Figure out what language subdirectories are present.
2996 for lang in ${srcdir}/*/config-lang.in ..
3000 # The odd quoting in the next line works around
3001 # an apparent bug in bash 1.12 on linux.
3002 ${srcdir}/[[*]]/config-lang.in) ;;
3003 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3007 # Make gthr-default.h if we have a thread file.
3009 if [[ $thread_file != single ]]; then
3010 rm -f gthr-default.h
3011 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3012 gthread_flags=-DHAVE_GTHR_DEFAULT
3014 AC_SUBST(gthread_flags)
3016 # Make empty files to contain the specs and options for each language.
3017 # Then add #include lines to for a compiler that has specs and/or options.
3021 rm -f specs.h options.h
3022 touch specs.h options.h
3023 for subdir in . $subdirs
3025 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3026 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3027 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3029 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3030 echo "#include \"$subdir/lang-options.h\"" >>options.h
3031 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3035 # These (without "all_") are set in each config-lang.in.
3036 # `language' must be a single word so is spelled singularly.
3042 all_outputs=Makefile
3043 # List of language makefile fragments.
3048 # Add the language fragments.
3049 # Languages are added via two mechanisms. Some information must be
3050 # recorded in makefile variables, these are defined in config-lang.in.
3051 # We accumulate them and plug them into the main Makefile.
3052 # The other mechanism is a set of hooks for each of the main targets
3053 # like `clean', `install', etc.
3055 language_fragments="Make-lang"
3056 language_hooks="Make-hooks"
3059 for s in .. $subdirs
3071 . ${srcdir}/$s/config-lang.in
3072 if [[ "x$language" = x ]]
3074 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3077 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3078 all_languages="$all_languages $language"
3079 if [[ "x$boot_language" = xyes ]]
3081 all_boot_languages="$all_boot_languages $language"
3083 all_compilers="$all_compilers $compilers"
3084 all_stagestuff="$all_stagestuff $stagestuff"
3085 all_diff_excludes="$all_diff_excludes $diff_excludes"
3086 all_headers="$all_headers $headers"
3087 all_outputs="$all_outputs $outputs"
3088 if [[ x$outputs = x ]]
3090 oldstyle_subdirs="$oldstyle_subdirs $s"
3092 all_lib2funcs="$all_lib2funcs $lib2funcs"
3096 # Since we can't use `::' targets, we link each language in
3097 # with a set of hooks, reached indirectly via lang.${target}.
3101 target_list="all.build all.cross start.encap rest.encap \
3103 install-normal install-common install-info install-man \
3105 mostlyclean clean distclean extraclean maintainer-clean \
3106 stage1 stage2 stage3 stage4"
3107 for t in $target_list
3110 for l in .. $all_languages
3112 if [[ $l != ".." ]]; then
3116 echo "lang.$t: $x" >> Make-hooks
3119 # If we're not building in srcdir, create .gdbinit.
3121 if [[ ! -f Makefile.in ]]; then
3122 echo "dir ." > .gdbinit
3123 echo "dir ${srcdir}" >> .gdbinit
3124 if [[ x$gdb_needs_out_file_path = xyes ]]
3126 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3128 if [[ "x$subdirs" != x ]]; then
3131 echo "dir ${srcdir}/$s" >> .gdbinit
3134 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3137 # If this is using newlib, then define inhibit_libc in
3138 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3139 # libgcc.a, but that's OK because newib should have its own version of
3142 if [[ x$with_newlib = xyes ]]; then
3143 inhibit_libc=-Dinhibit_libc
3145 AC_SUBST(inhibit_libc)
3147 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3150 if [[ x$enable_haifa = xyes ]]; then
3151 echo "Using the Haifa scheduler."
3153 sched_cflags=-DHAIFA
3155 AC_SUBST(sched_prefix)
3156 AC_SUBST(sched_cflags)
3157 if [[ x$enable_haifa != x ]]; then
3158 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3159 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3160 if [[ -f $x ]]; then
3167 # Process the language and host/target makefile fragments.
3168 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3170 # Substitute configuration variables
3172 AC_SUBST(all_languages)
3173 AC_SUBST(all_boot_languages)
3174 AC_SUBST(all_compilers)
3175 AC_SUBST(all_lang_makefiles)
3176 AC_SUBST(all_stagestuff)
3177 AC_SUBST(all_diff_excludes)
3178 AC_SUBST(all_lib2funcs)
3179 AC_SUBST(all_headers)
3180 AC_SUBST(extra_passes)
3181 AC_SUBST(extra_programs)
3182 AC_SUBST(extra_parts)
3183 AC_SUBST(extra_c_objs)
3184 AC_SUBST(extra_c_flags)
3185 AC_SUBST(extra_objs)
3186 AC_SUBST(host_extra_gcc_objs)
3187 AC_SUBST(extra_headers_list)
3188 AC_SUBST(dep_host_xmake_file)
3189 AC_SUBST(dep_tmake_file)
3191 AC_SUBST(out_object_file)
3193 AC_SUBST(tm_file_list)
3194 AC_SUBST(build_xm_file_list)
3195 AC_SUBST(host_xm_file_list)
3196 AC_SUBST(lang_specs_files)
3197 AC_SUBST(lang_options_files)
3198 AC_SUBST(thread_file)
3200 AC_SUBST(local_prefix)
3201 AC_SUBST(gxx_include_dir)
3202 AC_SUBST(fixincludes)
3203 AC_SUBST(build_install_headers_dir)
3204 AC_SUBST(build_exeext)
3205 AC_SUBST(host_exeext)
3206 AC_SUBST(float_format)
3207 AC_SUBST(will_use_collect2)
3208 AC_SUBST(maybe_use_collect2)
3209 AC_SUBST(cc_set_by_configure)
3210 AC_SUBST(stage_prefix_set_by_configure)
3212 AC_SUBST(symbolic_link)
3214 AC_SUBST_FILE(target_overrides)
3215 AC_SUBST_FILE(host_overrides)
3216 AC_SUBST(cross_defines)
3217 AC_SUBST_FILE(cross_overrides)
3218 AC_SUBST_FILE(build_overrides)
3219 AC_SUBST_FILE(language_fragments)
3220 AC_SUBST_FILE(language_hooks)
3222 # Echo that links are built
3223 if [[ x$host = x$target ]]
3231 if [[ x$host != x$build ]]
3233 str3=" on a $build system"
3236 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3241 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3243 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3245 echo " ${str2}${str3}." 1>&2
3248 # Configure the subdirectories
3249 # AC_CONFIG_SUBDIRS($subdirs)
3251 # Create the Makefile
3252 # and configure language subdirectories
3253 AC_OUTPUT($all_outputs,
3255 . $srcdir/configure.lang
3256 case x$CONFIG_HEADERS in
3257 xauto-config.h:config.in)
3260 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3261 # bootstrapping and the installation procedure can still use
3262 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3263 # FLAGS_TO_PASS has been modified to solve the problem there.
3264 # This is virtually a duplicate of what happens in configure.lang; we do
3265 # an extra check to make sure this only happens if ln -s can be used.
3266 if [[ "$symbolic_link" = "ln -s" ]]; then
3267 for d in .. ${subdirs} ; do
3268 if [[ $d != .. ]]; then
3271 for t in stage1 stage2 stage3 stage4 include
3274 $symbolic_link ../$t $t 2>/dev/null
3285 target_alias='${target_alias}'
3287 subdirs='${subdirs}'
3288 oldstyle_subdirs='${oldstyle_subdirs}'
3289 symbolic_link='${symbolic_link}'
3290 program_transform_set='${program_transform_set}'
3291 program_transform_name='${program_transform_name}'
3292 dep_host_xmake_file='${dep_host_xmake_file}'
3293 host_xmake_file='${host_xmake_file}'
3294 dep_tmake_file='${dep_tmake_file}'
3295 tmake_file='${tmake_file}'
3296 thread_file='${thread_file}'
3297 version='${version}'
3298 local_prefix='${local_prefix}'
3299 build_install_headers_dir='${build_install_headers_dir}'
3300 build_exeext='${build_exeext}'
3301 host_exeext='${host_exeext}'
3302 out_file='${out_file}'
3303 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3304 SET_MAKE='${SET_MAKE}'
3305 target_list='${target_list}'
3306 target_overrides='${target_overrides}'
3307 host_overrides='${host_overrides}'
3308 cross_defines='${cross_defines}'
3309 cross_overrides='${cross_overrides}'
3310 build_overrides='${build_overrides}'