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
110 target_thread_file='single'
114 target_thread_file=''
116 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
117 xsolaris | xwin32 | xdce)
118 target_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
144 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)
146 # Check for thread headers.
147 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
148 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
150 # See if the system preprocessor understands the ANSI C preprocessor
151 # stringification operator.
152 AC_MSG_CHECKING(whether cpp understands the stringify operator)
153 AC_CACHE_VAL(gcc_cv_c_have_stringify,
156 char *test = S(foo);],
157 gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
158 AC_MSG_RESULT($gcc_cv_c_have_stringify)
159 if test $gcc_cv_c_have_stringify = yes; then
160 AC_DEFINE(HAVE_CPP_STRINGIFY)
163 # Use <inttypes.h> only if it exists,
164 # doesn't clash with <sys/types.h>, and declares intmax_t.
165 AC_MSG_CHECKING(for inttypes.h)
166 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
168 [#include <sys/types.h>
169 #include <inttypes.h>],
171 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
172 gcc_cv_header_inttypes_h=yes],
173 gcc_cv_header_inttypes_h=no)])
174 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
176 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen vprintf bcopy bzero bcmp \
177 index rindex kill getrlimit setrlimit atoll atoq)
181 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
182 index rindex getenv atol sbrk abort)
193 build_install_headers_dir=install-headers-tar
197 host_truncate_target=
200 # Decode the host machine, then the target machine.
201 # For the host machine, we save the xm_file variable as host_xm_file;
202 # then we decode the target machine and forget everything else
203 # that came from the host machine.
204 for machine in $build $host $target; do
217 # Set this to force installation and use of collect2.
219 # Set this to override the default target model.
221 # Set this to control which fixincludes program to use.
222 fixincludes=fixincludes
223 # Set this to control how the header file directory is installed.
224 install_headers_dir=install-headers-tar
225 # Set this to a non-empty list of args to pass to cpp if the target
226 # wants its .md file passed through cpp.
228 # Set this if directory names should be truncated to 14 characters.
230 # Set this if gdb needs a dir command with `dirname $out_file`
231 gdb_needs_out_file_path=
232 # Set this if the build machine requires executables to have a
235 # Set this to control which thread package will be used.
238 # Set default cpu_type, tm_file and xm_file so it can be updated in
239 # each machine entry.
240 cpu_type=`echo $machine | sed 's/-.*$//'`
274 tm_file=${cpu_type}/${cpu_type}.h
275 xm_file=${cpu_type}/xm-${cpu_type}.h
278 # Support site-specific machine types.
280 cpu_type=`echo $machine | sed -e 's/-.*//'`
281 rest=`echo $machine | sed -e "s/$cpu_type-//"`
282 xm_file=${cpu_type}/xm-$rest.h
283 tm_file=${cpu_type}/$rest.h
284 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
285 then xmake_file=${cpu_type}/x-$rest; \
288 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
289 then tmake_file=${cpu_type}/t-$rest; \
295 a29k-*-bsd* | a29k-*-sym1*)
296 tm_file="${tm_file} a29k/unix.h"
297 xm_file=a29k/xm-unix.h
298 xmake_file=a29k/x-unix
301 a29k-*-udi | a29k-*-coff)
302 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
303 tmake_file=a29k/t-a29kbare
306 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
307 tmake_file=a29k/t-vx29k
308 extra_parts="crtbegin.o crtend.o"
310 a29k-*-*) # Default a29k environment.
313 alpha*-*-linux-gnuecoff*)
314 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
315 xm_file="${xm_file} alpha/xm-linux.h"
318 fixincludes=Makefile.in
321 alpha*-*-linux-gnulibc1*)
322 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
323 xm_file="${xm_file} alpha/xm-linux.h"
324 tmake_file="t-linux t-linux-gnulibc1"
326 fixincludes=Makefile.in
328 if [[ x$enable_threads = xyes ]]; then
333 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
334 xm_file="${xm_file} alpha/xm-linux.h"
337 fixincludes=Makefile.in
339 if [[ x$enable_threads = xyes ]]; then
344 if [[ x$stabs = xyes ]]
346 tm_file="${tm_file} dbx.h"
348 if [[ x$gas != xyes ]]
350 extra_passes="mips-tfile mips-tdump"
355 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
358 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
361 tm_file="${tm_file} alpha/osf.h"
362 # Some versions of OSF4 (specifically X4.0-9 296.7) have
363 # a broken tar, so we use cpio instead.
364 install_headers_dir=install-headers-cpio
367 tm_file="${tm_file} alpha/osf.h"
371 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
372 target_cpu_default=MASK_SUPPORT_ARCH
377 tm_file="${tm_file} alpha/win-nt.h"
378 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
380 xmake_file=winnt/x-winnt
381 extra_host_objs=oldnames.o
382 extra_gcc_objs="spawnv.o oldnames.o"
383 fixincludes=fixinc.winnt
384 if [[ x$gnu_ld != xyes ]]
386 extra_programs=ld.exe
388 if [[ x$enable_threads = xyes ]]; then
394 xm_file="${xm_file} alpha/xm-vms.h"
395 tmake_file=alpha/t-vms
396 fixincludes=Makefile.in
399 extra_parts="crtinit.o crtfini.o"
401 arm-*-coff* | armel-*-coff*)
403 tmake_file=arm/t-bare
405 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
406 tm_file=arm/riscix1-1.h
409 arm-*-riscix*) # Acorn RISC machine
410 if [[ x$gas = xyes ]]
412 tm_file=arm/rix-gas.h
416 xmake_file=arm/x-riscix
417 tmake_file=arm/t-riscix
420 arm-semi-aout | armel-semi-aout)
422 tmake_file=arm/t-semi
423 fixincludes=Makefile.in # There is nothing to fix
425 arm-semi-aof | armel-semi-aof)
426 tm_file=arm/semiaof.h
427 tmake_file=arm/t-semiaof
428 fixincludes=Makefile.in # There is nothing to fix
432 xm_file=arm/xm-netbsd.h
433 tmake_file="t-netbsd arm/t-netbsd"
434 # On NetBSD, the headers are already okay, except for math.h.
435 fixincludes=fixinc.math
437 arm-*-linux-gnuaout*) # ARM GNU/Linux
439 xm_file=arm/xm-linux.h
441 tm_file=arm/linux-gas.h
442 tmake_file=arm/t-linux
443 fixincludes=Makefile.in
448 tmake_file=arm/t-bare
450 c1-convex-*) # Convex C1
453 fixincludes=Makefile.in
455 c2-convex-*) # Convex C2
458 fixincludes=Makefile.in
463 fixincludes=Makefile.in
468 fixincludes=Makefile.in
471 target_cpu_default=16
473 fixincludes=Makefile.in
475 clipper-intergraph-clix*)
476 tm_file="${tm_file} svr3.h clipper/clix.h"
477 xm_file=clipper/xm-clix.h
478 xmake_file=clipper/x-clix
479 extra_headers=va-clipper.h
480 extra_parts="crtbegin.o crtend.o"
481 install_headers_dir=install-headers-cpio
488 # This hasn't been upgraded to GCC 2.
489 # fx80-alliant-*) # Alliant FX/80
495 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
496 xm_file=pa/xm-papro.h
501 tm_file="${tm_file} pa/pa-osf.h"
503 fixincludes=Makefile.in
506 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
507 xm_file=pa/xm-papro.h
511 tm_file="${tm_file} pa/pa-osf.h"
513 fixincludes=Makefile.in
518 fixincludes=Makefile.in
522 fixincludes=Makefile.in
525 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
526 xm_file=pa/xm-pahpux.h
527 xmake_file=pa/x-pa-hpux
528 if [[ x$gas = xyes ]]
530 tm_file="${tm_file} pa/gas.h"
532 install_headers_dir=install-headers-cpio
535 hppa1.0-*-hpux8.0[[0-2]]*)
536 tm_file="${tm_file} pa/pa-hpux.h"
537 xm_file=pa/xm-pahpux.h
538 xmake_file=pa/x-pa-hpux
539 if [[ x$gas = xyes ]]
541 tm_file="${tm_file} pa/pa-gas.h"
543 tm_file="pa/pa-oldas.h ${tm_file}"
545 install_headers_dir=install-headers-cpio
548 hppa1.1-*-hpux8.0[[0-2]]*)
550 tm_file="${tm_file} pa/pa-hpux.h"
551 xm_file=pa/xm-pahpux.h
552 xmake_file=pa/x-pa-hpux
553 if [[ x$gas = xyes ]]
555 tm_file="${tm_file} pa/pa-gas.h"
557 tm_file="pa/pa-oldas.h ${tm_file}"
559 install_headers_dir=install-headers-cpio
564 tm_file="${tm_file} pa/pa-hpux.h"
565 xm_file=pa/xm-pahpux.h
566 xmake_file=pa/x-pa-hpux
567 if [[ x$gas = xyes ]]
569 tm_file="${tm_file} pa/pa-gas.h"
571 install_headers_dir=install-headers-cpio
575 tm_file="${tm_file} pa/pa-hpux.h"
576 xm_file=pa/xm-pahpux.h
577 xmake_file=pa/x-pa-hpux
578 if [[ x$gas = xyes ]]
580 tm_file="${tm_file} pa/pa-gas.h"
582 install_headers_dir=install-headers-cpio
587 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
588 xm_file=pa/xm-pahpux.h
589 xmake_file=pa/x-pa-hpux
591 if [[ x$gas = xyes ]]
593 tm_file="${tm_file} pa/pa-gas.h"
595 if [[ x$enable_threads = x ]]; then
596 enable_threads=$have_pthread_h
598 if [[ x$enable_threads = xyes ]]; then
600 tmake_file="${tmake_file} pa/t-dce-thr"
602 install_headers_dir=install-headers-cpio
606 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
607 xm_file=pa/xm-pahpux.h
608 xmake_file=pa/x-pa-hpux
609 if [[ x$gas = xyes ]]
611 tm_file="${tm_file} pa/pa-gas.h"
613 install_headers_dir=install-headers-cpio
618 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
619 xm_file=pa/xm-pahpux.h
620 xmake_file=pa/x-pa-hpux
621 if [[ x$gas = xyes ]]
623 tm_file="${tm_file} pa/pa-gas.h"
625 install_headers_dir=install-headers-cpio
629 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
630 xm_file=pa/xm-pahpux.h
631 xmake_file=pa/x-pa-hpux
632 if [[ x$gas = xyes ]]
634 tm_file="${tm_file} pa/pa-gas.h"
636 install_headers_dir=install-headers-cpio
641 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.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 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
653 xm_file=pa/xm-pahpux.h
654 xmake_file=pa/x-pa-hpux
655 if [[ x$gas = xyes ]]
657 tm_file="${tm_file} pa/pa-gas.h"
659 install_headers_dir=install-headers-cpio
665 fixincludes=Makefile.in
669 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
670 if [[ x$gas = xyes ]]
672 tm_file=i386/aix386.h
673 extra_parts="crtbegin.o crtend.o"
674 tmake_file=i386/t-crtstuff
676 tm_file=i386/aix386ng.h
679 xm_file=i386/xm-aix.h
680 xmake_file=i386/x-aix
682 i[[456]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
683 xm_file=i386/xm-sysv4.h
684 xmake_file=i386/x-ncr3000
685 if [[ x$stabs = xyes -a x$gas = xyes ]]
687 tm_file=i386/sysv4gdb.h
691 extra_parts="crtbegin.o crtend.o"
692 tmake_file=i386/t-crtpic
696 xm_file=i386/xm-next.h
697 tmake_file=i386/t-next
698 xmake_file=i386/x-next
699 extra_objs=nextstep.o
700 if [[ x$enable_threads = xyes ]]; then
704 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
706 if [[ x$gas = xyes ]]
708 tm_file=i386/seq-gas.h
710 tm_file=i386/sequent.h
713 i[[3456]]86-sequent-ptx1*)
714 xm_file=i386/xm-sysv3.h
715 xmake_file=i386/x-sysv3
716 tm_file=i386/seq-sysv3.h
717 tmake_file=i386/t-crtstuff
718 fixincludes=fixinc.ptx
719 extra_parts="crtbegin.o crtend.o"
720 install_headers_dir=install-headers-cpio
722 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
723 xm_file=i386/xm-sysv3.h
724 xmake_file=i386/x-sysv3
725 tm_file=i386/seq2-sysv3.h
726 tmake_file=i386/t-crtstuff
727 extra_parts="crtbegin.o crtend.o"
728 fixincludes=fixinc.ptx
729 install_headers_dir=install-headers-cpio
731 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
732 xm_file=i386/xm-sysv4.h
734 tm_file=i386/ptx4-i.h
736 extra_parts="crtbegin.o crtend.o"
737 fixincludes=fixinc.ptx
738 install_headers_dir=install-headers-cpio
740 i386-sun-sunos*) # Sun i386 roadrunner
741 xm_file=i386/xm-sun.h
745 i[[3456]]86-wrs-vxworks*)
746 tm_file=i386/vxi386.h
747 tmake_file=i386/t-i386bare
750 tm_file=i386/i386-aout.h
751 tmake_file=i386/t-i386bare
753 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
754 tm_file=i386/bsd386.h
755 xm_file=i386/xm-bsd386.h
756 # tmake_file=t-libc-ok
759 tm_file=i386/386bsd.h
760 xm_file=i386/xm-bsd386.h
761 # tmake_file=t-libc-ok
762 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
765 i[[3456]]86-*-freebsdelf*)
766 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
767 # On FreeBSD, the headers are already ok, except for math.h.
768 fixincludes=fixinc.math
769 tmake_file=i386/t-freebsd
774 i[[3456]]86-*-freebsd*)
775 tm_file=i386/freebsd.h
776 # On FreeBSD, the headers are already ok, except for math.h.
777 fixincludes=fixinc.math
778 tmake_file=i386/t-freebsd
780 i[[3456]]86-*-netbsd*)
781 tm_file=i386/netbsd.h
782 # On NetBSD, the headers are already okay, except for math.h.
783 fixincludes=fixinc.math
787 tm_file=i386/i386-coff.h
788 tmake_file=i386/t-i386bare
790 i[[3456]]86-*-isc*) # 80386 running ISC system
791 xm_file=i386/xm-isc.h
793 i[[345]]86-*-isc[[34]]*)
794 xmake_file=i386/x-isc3
797 xmake_file=i386/x-isc
800 if [[ x$gas = xyes -a x$stabs = xyes ]]
802 tm_file=i386/iscdbx.h
803 tmake_file=i386/t-svr3dbx
804 extra_parts="svr3.ifile svr3z.ifile"
806 tm_file=i386/isccoff.h
807 tmake_file=i386/t-crtstuff
808 extra_parts="crtbegin.o crtend.o"
810 install_headers_dir=install-headers-cpio
812 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
813 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
814 xmake_file=x-linux-aout
815 tmake_file="t-linux-aout i386/t-crtstuff"
816 tm_file=i386/linux-oldld.h
817 fixincludes=Makefile.in #On Linux, the headers are ok already.
820 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
821 xm_file=i386/xm-linux.h # with a.out format
822 xmake_file=x-linux-aout
823 tmake_file="t-linux-aout i386/t-crtstuff"
824 tm_file=i386/linux-aout.h
825 fixincludes=Makefile.in #On Linux, the headers are ok already.
828 i[[3456]]86-*-linux-gnulibc1)
829 xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
830 xmake_file=x-linux # with ELF format using the
831 tm_file=i386/linux.h # GNU/Linux C library 5
832 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
833 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
834 fixincludes=Makefile.in #On Linux, the headers are ok already.
836 if [[ x$enable_threads = xyes ]]; then
840 i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
841 xm_file=i386/xm-linux.h # with ELF format using glibc 2
842 xmake_file=x-linux # aka GNU/Linux C library 6
844 tmake_file="t-linux i386/t-crtstuff"
845 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
846 fixincludes=Makefile.in #On Linux, the headers are ok already.
848 if [[ x$enable_threads = xyes ]]; then
854 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
855 xm_file=i386/xm-go32.h
857 tmake_file=i386/t-go32
859 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
862 fixincludes=Makefile.in
866 i[[3456]]86-*-lynxos*)
867 if [[ x$gas = xyes ]]
871 tm_file=i386/lynx-ng.h
873 xm_file=i386/xm-lynx.h
874 tmake_file=i386/t-i386bare
879 # tmake_file=t-libc-ok
882 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
883 if [[ x$elf = xyes ]]
885 tm_file=i386/osfelf.h
888 tm_file=i386/osfrose.h
891 xm_file=i386/xm-osf.h
892 xmake_file=i386/x-osfrose
893 tmake_file=i386/t-osf
896 i[[345]]86-go32-rtems*)
898 xm_file=i386/xm-go32.h
899 tm_file=i386/go32-rtems.h
900 tmake_file="i386/t-go32 t-rtems"
905 tmake_file="i386/t-i386bare t-rtems"
907 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
908 xm_file=i386/xm-sco5.h
909 xmake_file=i386/x-sco5
910 fixincludes=fixinc.sco
911 install_headers_dir=install-headers-cpio
913 tmake_file=i386/t-sco5
914 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
916 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
917 xm_file=i386/xm-sco.h
918 xmake_file=i386/x-sco4
919 fixincludes=fixinc.sco
920 install_headers_dir=install-headers-cpio
921 if [[ x$stabs = xyes ]]
923 tm_file=i386/sco4dbx.h
924 tmake_file=i386/t-svr3dbx
925 extra_parts="svr3.ifile svr3z.rfile"
928 tmake_file=i386/t-crtstuff
929 extra_parts="crtbegin.o crtend.o"
933 i[[3456]]86-*-sco*) # 80386 running SCO system
934 xm_file=i386/xm-sco.h
935 xmake_file=i386/x-sco
936 install_headers_dir=install-headers-cpio
937 if [[ x$stabs = xyes ]]
939 tm_file=i386/scodbx.h
940 tmake_file=i386/t-svr3dbx
941 extra_parts="svr3.ifile svr3z.rfile"
944 extra_parts="crtbegin.o crtend.o"
945 tmake_file=i386/t-crtstuff
949 i[[3456]]86-*-solaris2*)
950 xm_file=i386/xm-sysv4.h
951 if [[ x$stabs = xyes ]]
953 tm_file=i386/sol2dbg.h
957 tmake_file=i386/t-sol2
958 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
960 fixincludes=fixinc.svr4
962 if [[ x$enable_threads = xyes ]]; then
963 thread_file='solaris'
966 i[[3456]]86-*-sysv5*) # Intel x86 on System V Release 5
967 xm_file=i386/xm-sysv4.h
969 if [[ x$stabs = xyes ]]
971 tm_file="${tm_file} dbx.h"
973 tmake_file=i386/t-crtpic
975 extra_parts="crtbegin.o crtend.o"
976 fixincludes=Makefile.in # The headers are just fine, thank you.
978 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
979 xm_file=i386/xm-sysv4.h
981 if [[ x$stabs = xyes ]]
983 tm_file="${tm_file} dbx.h"
985 tmake_file=i386/t-crtpic
987 extra_parts="crtbegin.o crtend.o"
989 i[[3456]]86-*-sysv*) # Intel 80386's running system V
990 xm_file=i386/xm-sysv3.h
991 xmake_file=i386/x-sysv3
992 if [[ x$gas = xyes ]]
994 if [[ x$stabs = xyes ]]
996 tm_file=i386/svr3dbx.h
997 tmake_file=i386/t-svr3dbx
998 extra_parts="svr3.ifile svr3z.rfile"
1000 tm_file=i386/svr3gas.h
1001 extra_parts="crtbegin.o crtend.o"
1002 tmake_file=i386/t-crtstuff
1005 tm_file=i386/sysv3.h
1006 extra_parts="crtbegin.o crtend.o"
1007 tmake_file=i386/t-crtstuff
1010 i386-*-vsta) # Intel 80386's running VSTa kernel
1011 xm_file=i386/xm-vsta.h
1013 tmake_file=i386/t-vsta
1014 xmake_file=i386/x-vsta
1016 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1017 xm_file="${xm_file} i386/xm-cygwin32.h"
1018 tmake_file=i386/t-cygwin32
1019 tm_file=i386/cygwin32.h
1020 xmake_file=i386/x-cygwin32
1022 fixincludes=Makefile.in
1023 if [[ x$enable_threads = xyes ]]; then
1028 i[[3456]]86-*-mingw32)
1029 tm_file=i386/mingw32.h
1030 xm_file="${xm_file} i386/xm-mingw32.h"
1031 tmake_file=i386/t-cygwin32
1033 xmake_file=i386/x-cygwin32
1034 fixincludes=Makefile.in
1035 if [[ x$enable_threads = xyes ]]; then
1040 i[[3456]]86-*-winnt*)
1041 tm_file=i386/win-nt.h
1042 out_file=i386/i386.c
1043 xm_file=i386/xm-winnt.h
1044 xmake_file=winnt/x-winnt
1045 tmake_file=i386/t-winnt
1046 extra_host_objs="winnt.o oldnames.o"
1047 extra_gcc_objs="spawnv.o oldnames.o"
1048 fixincludes=fixinc.winnt
1049 if [[ x$gnu_ld != xyes ]]
1051 extra_programs=ld.exe
1053 if [[ x$enable_threads = xyes ]]; then
1057 i[[3456]]86-dg-dgux)
1058 xm_file=i386/xm-dgux.h
1059 out_file=i386/dgux.c
1061 tmake_file=i386/t-dgux
1062 xmake_file=i386/x-dgux
1063 fixincludes=fixinc.dgux
1064 install_headers_dir=install-headers-cpio
1066 i860-alliant-*) # Alliant FX/2800
1067 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1068 xm_file="${xm_file}"
1069 xmake_file=i860/x-fx2800
1070 tmake_file=i860/t-fx2800
1071 extra_parts="crtbegin.o crtend.o"
1074 tm_file="${tm_file} i860/bsd.h"
1075 if [[ x$gas = xyes ]]
1077 tm_file="${tm_file} i860/bsd-gas.h"
1082 tm_file="${tm_file} i860/mach.h"
1083 tmake_file=t-libc-ok
1085 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1086 tm_file="${tm_file} svr3.h i860/paragon.h"
1087 xm_file="${xm_file} xm-svr3.h"
1091 tm_file="${tm_file} svr3.h i860/sysv3.h"
1092 xm_file="${tm_file} xm-svr3.h"
1093 xmake_file=i860/x-sysv3
1094 extra_parts="crtbegin.o crtend.o"
1097 tm_file="${tm_file} svr4.h i860/sysv4.h"
1098 xm_file="${xm_file} xm-svr3.h"
1099 xmake_file=i860/x-sysv4
1101 extra_parts="crtbegin.o crtend.o"
1103 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1104 tm_file="${tm_file} i960/vx960.h"
1105 tmake_file=i960/t-vxworks960
1108 i960-wrs-vxworks5* | i960-wrs-vxworks)
1109 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1110 tmake_file=i960/t-vxworks960
1114 tm_file="${tm_file} i960/vx960.h"
1115 tmake_file=i960/t-vxworks960
1119 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1120 tmake_file=i960/t-960bare
1124 tmake_file="i960/t-960bare t-rtems"
1125 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1128 i960-*-*) # Default i960 environment.
1132 extra_parts="crtinit.o crtfini.o"
1134 m68000-convergent-sysv*)
1136 xm_file=m68k/xm-3b1.h
1138 extra_headers=math-68881.h
1140 m68000-hp-bsd*) # HP 9000/200 running BSD
1141 tm_file=m68k/hp2bsd.h
1142 xmake_file=m68k/x-hp2bsd
1144 extra_headers=math-68881.h
1146 m68000-hp-hpux*) # HP 9000 series 300
1147 xm_file=m68k/xm-hp320.h
1148 if [[ x$gas = xyes ]]
1150 xmake_file=m68k/x-hp320g
1151 tm_file=m68k/hp310g.h
1153 xmake_file=m68k/x-hp320
1154 tm_file=m68k/hp310.h
1156 install_headers_dir=install-headers-cpio
1158 extra_headers=math-68881.h
1163 extra_headers=math-68881.h
1166 tm_file=m68k/sun2o4.h
1168 extra_headers=math-68881.h
1171 xm_file=m68k/xm-3b1.h
1172 if [[ x$gas = xyes ]]
1179 extra_headers=math-68881.h
1181 m68k-apple-aux*) # Apple Macintosh running A/UX
1182 xm_file=m68k/xm-aux.h
1183 tmake_file=m68k/t-aux
1184 install_headers_dir=install-headers-cpio
1185 extra_headers=math-68881.h
1186 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1188 if [[ "$gnu_ld" = yes ]]
1190 tm_file="${tm_file} m68k/auxgld.h"
1192 tm_file="${tm_file} m68k/auxld.h"
1194 if [[ "$gas" = yes ]]
1196 tm_file="${tm_file} m68k/auxgas.h"
1198 tm_file="${tm_file} m68k/auxas.h"
1200 tm_file="${tm_file} m68k/a-ux.h"
1203 tm_file=m68k/apollo68.h
1204 xmake_file=m68k/x-apollo68
1206 extra_headers=math-68881.h
1208 m68k-altos-sysv*) # Altos 3068
1209 if [[ x$gas = xyes ]]
1211 tm_file=m68k/altos3068.h
1212 xm_file=m68k/xm-altos3068.h
1214 echo "The Altos is supported only with the GNU assembler" 1>&2
1217 extra_headers=math-68881.h
1219 m68k-bull-sysv*) # Bull DPX/2
1220 if [[ x$gas = xyes ]]
1222 if [[ x$stabs = xyes ]]
1224 tm_file=m68k/dpx2cdbx.h
1226 tm_file=m68k/dpx2g.h
1231 xm_file=m68k/xm-m68kv.h
1232 xmake_file=m68k/x-dpx2
1234 extra_headers=math-68881.h
1236 m68k-atari-sysv4*) # Atari variant of V.4.
1237 tm_file=m68k/atari.h
1238 xm_file=m68k/xm-atari.h
1240 extra_parts="crtbegin.o crtend.o"
1241 extra_headers=math-68881.h
1243 m68k-motorola-sysv*)
1244 tm_file=m68k/mot3300.h
1245 xm_file=m68k/xm-mot3300.h
1246 if [[ x$gas = xyes ]]
1248 xmake_file=m68k/x-mot3300-gas
1249 if [[ x$gnu_ld = xyes ]]
1251 tmake_file=m68k/t-mot3300-gald
1253 tmake_file=m68k/t-mot3300-gas
1257 xmake_file=m68k/x-mot3300
1258 if [[ x$gnu_ld = xyes ]]
1260 tmake_file=m68k/t-mot3300-gld
1262 tmake_file=m68k/t-mot3300
1266 gdb_needs_out_file_path=yes
1267 extra_parts="crt0.o mcrt0.o"
1268 extra_headers=math-68881.h
1270 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1271 tm_file=m68k/tower-as.h
1272 xm_file="${xm_file} xm-svr3.h"
1273 xmake_file=m68k/x-tower
1274 extra_parts="crtbegin.o crtend.o"
1275 extra_headers=math-68881.h
1278 tm_file=m68k/plexus.h
1279 xm_file=m68k/xm-plexus.h
1281 extra_headers=math-68881.h
1285 xm_file=m68k/xm-m68kv.h
1286 extra_headers=math-68881.h
1289 xm_file=m68k/xm-crds.h
1290 xmake_file=m68k/x-crds
1293 extra_headers=math-68881.h
1295 m68k-cbm-sysv4*) # Commodore variant of V.4.
1297 xm_file=m68k/xm-amix.h
1298 xmake_file=m68k/x-amix
1300 extra_parts="crtbegin.o crtend.o"
1301 extra_headers=math-68881.h
1304 tm_file=m68k/ccur-GAS.h
1305 xmake_file=m68k/x-ccur
1306 extra_headers=math-68881.h
1309 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1310 tm_file=m68k/hp3bsd44.h
1311 xmake_file=m68k/x-hp3bsd44
1313 extra_headers=math-68881.h
1315 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1316 tm_file=m68k/hp3bsd.h
1318 extra_headers=math-68881.h
1321 if [[ x$with_fp = xno ]]
1323 tm_file=m68k/isi-nfp.h
1328 extra_headers=math-68881.h
1330 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1331 xm_file=m68k/xm-hp320.h
1332 if [[ x$gas = xyes ]]
1334 xmake_file=m68k/x-hp320g
1335 tm_file=m68k/hp320g.h
1337 xmake_file=m68k/x-hp320
1338 tm_file=m68k/hpux7.h
1340 install_headers_dir=install-headers-cpio
1342 extra_headers=math-68881.h
1344 m68k-hp-hpux*) # HP 9000 series 300
1345 xm_file=m68k/xm-hp320.h
1346 if [[ x$gas = xyes ]]
1348 xmake_file=m68k/x-hp320g
1349 tm_file=m68k/hp320g.h
1351 xmake_file=m68k/x-hp320
1352 tm_file=m68k/hp320.h
1354 install_headers_dir=install-headers-cpio
1356 extra_headers=math-68881.h
1359 tm_file=m68k/sun3mach.h
1361 extra_headers=math-68881.h
1364 if [[ x$gas = xyes ]]
1366 tm_file=m68k/news3gas.h
1368 tm_file=m68k/news3.h
1371 extra_headers=math-68881.h
1373 m68k-sony-bsd* | m68k-sony-newsos*)
1374 if [[ x$gas = xyes ]]
1376 tm_file=m68k/newsgas.h
1381 extra_headers=math-68881.h
1383 m68k-next-nextstep2*)
1384 tm_file=m68k/next21.h
1385 xm_file=m68k/xm-next.h
1386 tmake_file=m68k/t-next
1387 xmake_file=m68k/x-next
1388 extra_objs=nextstep.o
1389 extra_headers=math-68881.h
1392 m68k-next-nextstep3*)
1394 xm_file=m68k/xm-next.h
1395 tmake_file=m68k/t-next
1396 xmake_file=m68k/x-next
1397 extra_objs=nextstep.o
1398 extra_headers=math-68881.h
1399 if [[ x$enable_threads = xyes ]]; then
1404 if [[ x$with_fp = xno ]]
1406 tm_file=m68k/sun3n3.h
1408 tm_file=m68k/sun3o3.h
1411 extra_headers=math-68881.h
1413 m68k-sun-sunos*) # For SunOS 4 (the default).
1414 if [[ x$with_fp = xno ]]
1416 tm_file=m68k/sun3n.h
1421 extra_headers=math-68881.h
1424 tm_file=m68k/vxm68k.h
1425 tmake_file=m68k/t-vxworks68
1426 extra_headers=math-68881.h
1429 tmake_file=m68k/t-m68kbare
1430 tm_file="m68k/m68k-aout.h libgloss.h"
1431 extra_headers=math-68881.h
1434 tmake_file=m68k/t-m68kbare
1435 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1436 extra_headers=math-68881.h
1439 if [[ x$gas = xyes ]]
1443 tm_file=m68k/lynx-ng.h
1445 xm_file=m68k/xm-lynx.h
1447 tmake_file=m68k/t-lynx
1448 extra_headers=math-68881.h
1451 tm_file=m68k/netbsd.h
1452 # On NetBSD, the headers are already okay, except for math.h.
1453 fixincludes=fixinc.math
1456 m68k-*-sysv3*) # Motorola m68k's running system V.3
1457 xm_file=m68k/xm-m68kv.h
1458 xmake_file=m68k/x-m68kv
1459 extra_parts="crtbegin.o crtend.o"
1460 extra_headers=math-68881.h
1462 m68k-*-sysv4*) # Motorola m68k's running system V.4
1463 tm_file=m68k/m68kv4.h
1464 xm_file=m68k/xm-m68kv.h
1466 extra_parts="crtbegin.o crtend.o"
1467 extra_headers=math-68881.h
1469 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1470 xm_file=m68k/xm-linux.h # with a.out format
1472 tm_file=m68k/linux-aout.h
1473 tmake_file="t-linux-aout m68k/t-linux-aout"
1474 fixincludes=Makefile.in # The headers are ok already.
1475 extra_headers=math-68881.h
1478 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1479 xm_file=m68k/xm-linux.h # with ELF format using the
1480 xmake_file=x-linux # GNU/Linux C library 5
1481 tm_file=m68k/linux.h
1482 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1483 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1484 fixincludes=Makefile.in # The headers are ok already.
1485 extra_headers=math-68881.h
1488 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1489 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1490 xmake_file=x-linux # aka the GNU/Linux C library 6.
1491 tm_file=m68k/linux.h
1492 tmake_file="t-linux m68k/t-linux"
1493 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1494 fixincludes=Makefile.in # The headers are ok already.
1495 extra_headers=math-68881.h
1497 if [[ x$enable_threads = xyes ]]; then
1502 tmake_file=m68k/t-m68kbare
1503 tm_file=m68k/m68k-psos.h
1504 extra_headers=math-68881.h
1507 tmake_file="m68k/t-m68kbare t-rtems"
1508 tm_file=m68k/rtems.h
1509 extra_headers=math-68881.h
1515 tm_file=m88k/dguxbcs.h
1516 tmake_file=m88k/t-dguxbcs
1520 tmake_file=m88k/t-dgux
1523 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1524 xmake_file=m88k/x-dgux
1525 if [[ x$gas = xyes ]]
1527 tmake_file=m88k/t-dgux-gas
1529 fixincludes=fixinc.dgux
1531 m88k-dolphin-sysv3*)
1532 tm_file=m88k/dolph.h
1533 extra_parts="crtbegin.o crtend.o"
1534 xm_file=m88k/xm-sysv3.h
1535 xmake_file=m88k/x-dolph
1536 if [[ x$gas = xyes ]]
1538 tmake_file=m88k/t-m88k-gas
1541 m88k-tektronix-sysv3)
1542 tm_file=m88k/tekXD88.h
1543 extra_parts="crtbegin.o crtend.o"
1544 xm_file=m88k/xm-sysv3.h
1545 xmake_file=m88k/x-tekXD88
1546 if [[ x$gas = xyes ]]
1548 tmake_file=m88k/t-m88k-gas
1552 tm_file=m88k/m88k-aout.h
1555 tm_file=m88k/m88k-coff.h
1556 tmake_file=m88k/t-bug
1560 extra_parts="crtbegin.o crtend.o"
1561 if [[ x$gas = xyes ]]
1563 tmake_file=m88k/t-luna-gas
1565 tmake_file=m88k/t-luna
1569 tm_file=m88k/sysv3.h
1570 extra_parts="crtbegin.o crtend.o"
1571 xm_file=m88k/xm-sysv3.h
1572 xmake_file=m88k/x-sysv3
1573 if [[ x$gas = xyes ]]
1575 tmake_file=m88k/t-m88k-gas
1579 tm_file=m88k/sysv4.h
1580 extra_parts="crtbegin.o crtend.o"
1581 xmake_file=m88k/x-sysv4
1582 tmake_file=m88k/t-sysv4
1584 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1585 tm_file=mips/iris6.h
1586 xm_file=mips/xm-iris6.h
1587 fixincludes=fixinc.irix
1588 xmake_file=mips/x-iris6
1589 tmake_file=mips/t-iris6
1590 if [[ x$enable_threads = xyes ]]; then
1594 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1595 tm_file=mips/cross64.h
1596 xm_file=mips/xm-iris5.h
1597 fixincludes=Makefile.in
1598 xmake_file=mips/x-iris
1599 tmake_file=mips/t-cross64
1600 # See comment in mips/iris[56].h files.
1602 if [[ x$enable_threads = xyes ]]; then
1607 if [[ x$gas = xyes ]]
1609 if [[ x$stabs = xyes ]]
1611 tm_file=mips/iris5gdb.h
1613 tm_file=mips/sni-gas.h
1616 tm_file=mips/sni-svr4.h
1618 xm_file=mips/xm-sysv.h
1619 xmake_file=mips/x-sni-svr4
1620 tmake_file=mips/t-mips-gas
1621 if [[ x$gnu_ld != xyes ]]
1626 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1627 if [[ x$gas = xyes ]]
1629 tm_file=mips/iris5gas.h
1630 if [[ x$stabs = xyes ]]
1632 tm_file="${tm_file} dbx.h"
1635 tm_file=mips/iris5.h
1637 xm_file=mips/xm-iris5.h
1638 fixincludes=fixinc.irix
1639 xmake_file=mips/x-iris
1640 # mips-tfile doesn't work yet
1641 tmake_file=mips/t-mips-gas
1642 # See comment in mips/iris5.h file.
1644 if [[ x$enable_threads = xyes ]]; then
1648 mips-sgi-irix4loser*) # Mostly like a MIPS.
1649 tm_file=mips/iris4loser.h
1650 if [[ x$stabs = xyes ]]; then
1651 tm_file="${tm_file} dbx.h"
1653 xm_file=mips/xm-iris4.h
1654 xmake_file=mips/x-iris
1655 if [[ x$gas = xyes ]]
1657 tmake_file=mips/t-mips-gas
1659 extra_passes="mips-tfile mips-tdump"
1661 if [[ x$gnu_ld != xyes ]]
1665 if [[ x$enable_threads = xyes ]]; then
1669 mips-sgi-irix4*) # Mostly like a MIPS.
1670 tm_file=mips/iris4.h
1671 if [[ x$stabs = xyes ]]; then
1672 tm_file="${tm_file} dbx.h"
1674 xm_file=mips/xm-iris4.h
1675 xmake_file=mips/x-iris
1676 if [[ x$gas = xyes ]]
1678 tmake_file=mips/t-mips-gas
1680 extra_passes="mips-tfile mips-tdump"
1682 if [[ x$gnu_ld != xyes ]]
1686 if [[ x$enable_threads = xyes ]]; then
1690 mips-sgi-*) # Mostly like a MIPS.
1691 tm_file=mips/iris3.h
1692 if [[ x$stabs = xyes ]]; then
1693 tm_file="${tm_file} dbx.h"
1695 xm_file=mips/xm-iris3.h
1696 xmake_file=mips/x-iris3
1697 if [[ x$gas = xyes ]]
1699 tmake_file=mips/t-mips-gas
1701 extra_passes="mips-tfile mips-tdump"
1703 if [[ x$gnu_ld != xyes ]]
1708 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1709 tm_file=mips/osfrose.h
1710 xmake_file=mips/x-osfrose
1711 tmake_file=mips/t-osfrose
1712 extra_objs=halfpic.o
1715 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1716 tm_file=mips/dec-osf1.h
1717 if [[ x$stabs = xyes ]]; then
1718 tm_file="${tm_file} dbx.h"
1720 xmake_file=mips/x-dec-osf1
1721 if [[ x$gas = xyes ]]
1723 tmake_file=mips/t-mips-gas
1725 tmake_file=mips/t-ultrix
1726 extra_passes="mips-tfile mips-tdump"
1728 if [[ x$gnu_ld != xyes ]]
1733 mips-dec-bsd*) # Decstation running 4.4 BSD
1734 tm_file=mips/dec-bsd.h
1736 if [[ x$gas = xyes ]]
1738 tmake_file=mips/t-mips-gas
1740 tmake_file=mips/t-ultrix
1741 extra_passes="mips-tfile mips-tdump"
1743 if [[ x$gnu_ld != xyes ]]
1748 mips-dec-netbsd*) # Decstation running NetBSD
1749 tm_file=mips/netbsd.h
1750 # On NetBSD, the headers are already okay, except for math.h.
1751 fixincludes=fixinc.math
1754 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1755 tm_file=mips/news4.h
1756 if [[ x$stabs = xyes ]]; then
1757 tm_file="${tm_file} dbx.h"
1759 if [[ x$gas = xyes ]]
1761 tmake_file=mips/t-mips-gas
1763 extra_passes="mips-tfile mips-tdump"
1765 if [[ x$gnu_ld != xyes ]]
1769 xmake_file=mips/x-sony
1771 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1772 # That is based on svr4.
1773 # t-svr4 is not right because this system doesn't use ELF.
1774 tm_file=mips/news5.h
1775 if [[ x$stabs = xyes ]]; then
1776 tm_file="${tm_file} dbx.h"
1778 xm_file=mips/xm-news.h
1779 if [[ x$gas = xyes ]]
1781 tmake_file=mips/t-mips-gas
1783 extra_passes="mips-tfile mips-tdump"
1785 if [[ x$gnu_ld != xyes ]]
1790 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1791 tm_file=mips/svr4-t.h
1792 if [[ x$stabs = xyes ]]; then
1793 tm_file="${tm_file} dbx.h"
1795 xm_file=mips/xm-sysv4.h
1796 xmake_file=mips/x-sysv
1797 if [[ x$gas = xyes ]]
1799 tmake_file=mips/t-mips-gas
1800 extra_parts="crtbegin.o crtend.o"
1802 tmake_file=mips/t-mips
1803 extra_passes="mips-tfile mips-tdump"
1805 if [[ x$gnu_ld != xyes ]]
1810 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1811 tm_file=mips/ultrix.h
1812 if [[ x$stabs = xyes ]]; then
1813 tm_file="${tm_file} dbx.h"
1815 xmake_file=mips/x-ultrix
1816 if [[ x$gas = xyes ]]
1818 tmake_file=mips/t-mips-gas
1820 tmake_file=mips/t-ultrix
1821 extra_passes="mips-tfile mips-tdump"
1823 if [[ x$gnu_ld != xyes ]]
1828 mips-*-riscos[[56789]]bsd*)
1829 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1830 if [[ x$stabs = xyes ]]; then
1831 tm_file="${tm_file} dbx.h"
1833 if [[ x$gas = xyes ]]
1835 tmake_file=mips/t-bsd-gas
1837 tmake_file=mips/t-bsd
1838 extra_passes="mips-tfile mips-tdump"
1840 if [[ x$gnu_ld != xyes ]]
1845 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1846 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1847 if [[ x$stabs = xyes ]]; then
1848 tm_file="${tm_file} dbx.h"
1850 if [[ x$gas = xyes ]]
1852 tmake_file=mips/t-bsd-gas
1854 tmake_file=mips/t-bsd
1855 extra_passes="mips-tfile mips-tdump"
1857 if [[ x$gnu_ld != xyes ]]
1862 mips-*-riscos[[56789]]sysv4*)
1863 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1864 if [[ x$stabs = xyes ]]; then
1865 tm_file="${tm_file} dbx.h"
1867 xm_file=mips/xm-sysv4.h
1868 xmake_file=mips/x-sysv
1869 if [[ x$gas = xyes ]]
1871 tmake_file=mips/t-svr4-gas
1873 tmake_file=mips/t-svr4
1874 extra_passes="mips-tfile mips-tdump"
1876 if [[ x$gnu_ld != xyes ]]
1881 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1882 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1883 if [[ x$stabs = xyes ]]; then
1884 tm_file="${tm_file} dbx.h"
1886 xm_file=mips/xm-sysv.h
1887 xmake_file=mips/x-sysv
1888 if [[ x$gas = xyes ]]
1890 tmake_file=mips/t-svr4-gas
1892 tmake_file=mips/t-svr4
1893 extra_passes="mips-tfile mips-tdump"
1895 if [[ x$gnu_ld != xyes ]]
1900 mips-*-riscos[[56789]]sysv*)
1901 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1902 if [[ x$stabs = xyes ]]; then
1903 tm_file="${tm_file} dbx.h"
1905 xm_file=mips/xm-sysv.h
1906 xmake_file=mips/x-sysv
1907 if [[ x$gas = xyes ]]
1909 tmake_file=mips/t-svr3-gas
1911 tmake_file=mips/t-svr3
1912 extra_passes="mips-tfile mips-tdump"
1914 if [[ x$gnu_ld != xyes ]]
1919 mips-*-sysv* | mips-*-riscos*sysv*)
1920 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1921 if [[ x$stabs = xyes ]]; then
1922 tm_file="${tm_file} dbx.h"
1924 xm_file=mips/xm-sysv.h
1925 xmake_file=mips/x-sysv
1926 if [[ x$gas = xyes ]]
1928 tmake_file=mips/t-svr3-gas
1930 tmake_file=mips/t-svr3
1931 extra_passes="mips-tfile mips-tdump"
1933 if [[ x$gnu_ld != xyes ]]
1938 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1939 tm_file=mips/mips-5.h
1940 if [[ x$stabs = xyes ]]; then
1941 tm_file="${tm_file} dbx.h"
1943 if [[ x$gas = xyes ]]
1945 tmake_file=mips/t-mips-gas
1947 extra_passes="mips-tfile mips-tdump"
1949 if [[ x$gnu_ld != xyes ]]
1957 tm_file=mips/ecoffl.h
1958 if [[ x$stabs = xyes ]]; then
1959 tm_file="${tm_file} dbx.h"
1961 tmake_file=mips/t-ecoff
1964 tm_file=mips/ecoff.h
1965 if [[ x$stabs = xyes ]]; then
1966 tm_file="${tm_file} dbx.h"
1968 tmake_file=mips/t-ecoff
1971 tm_file="mips/elfl.h libgloss.h"
1972 tmake_file=mips/t-ecoff
1975 tm_file="mips/elf.h libgloss.h"
1976 tmake_file=mips/t-ecoff
1979 tm_file="mips/elfl64.h libgloss.h"
1980 tmake_file=mips/t-ecoff
1982 mips64orionel-*-elf*)
1983 tm_file="mips/elflorion.h libgloss.h"
1984 tmake_file=mips/t-ecoff
1987 tm_file="mips/elf64.h libgloss.h"
1988 tmake_file=mips/t-ecoff
1991 tm_file="mips/elforion.h libgloss.h"
1992 tmake_file=mips/t-ecoff
1994 mips64orion-*-rtems*)
1995 tm_file=mips/rtems64.h
1996 tmake_file="mips/t-ecoff t-rtems"
1999 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2000 tmake_file=mips/t-r3900
2003 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2004 tmake_file=mips/t-r3900
2006 mips-*-*) # Default MIPS RISC-OS 4.0.
2007 if [[ x$stabs = xyes ]]; then
2008 tm_file="${tm_file} dbx.h"
2010 if [[ x$gas = xyes ]]
2012 tmake_file=mips/t-mips-gas
2014 extra_passes="mips-tfile mips-tdump"
2016 if [[ x$gnu_ld != xyes ]]
2023 tm_file="mn10200/mn10200.h"
2024 if [[ x$stabs = xyes ]]
2026 tm_file="${tm_file} dbx.h"
2032 tm_file="mn10300/mn10300.h"
2033 if [[ x$stabs = xyes ]]
2035 tm_file="${tm_file} dbx.h"
2040 tm_file=ns32k/encore.h
2044 tm_file=ns32k/sequent.h
2048 tm_file=ns32k/tek6100.h
2052 tm_file=ns32k/tek6200.h
2055 # This has not been updated to GCC 2.
2057 # xm_file=ns32k/xm-genix.h
2058 # xmake_file=ns32k/x-genix
2059 # tm_file=ns32k/genix.h
2063 tm_file=ns32k/merlin.h
2067 tm_file=ns32k/pc532-mach.h
2071 tm_file=ns32k/pc532-min.h
2072 xm_file=ns32k/xm-pc532-min.h
2075 ns32k-pc532-netbsd*)
2076 tm_file=ns32k/netbsd.h
2077 # On NetBSD, the headers are already okay, except for math.h.
2078 fixincludes=fixinc.math
2082 tm_file="${tm_file} pdp11/2bsd.h"
2088 xmake_file=pyr/x-pyr
2095 xmake_file=romp/x-mach
2100 tm_file=rs6000/beos.h
2101 xm_file=rs6000/xm-beos.h
2102 tmake_file=rs6000/t-beos
2103 xmake_file=rs6000/x-beos
2105 powerpc-*-sysv* | powerpc-*-elf*)
2106 tm_file=rs6000/sysv4.h
2107 xm_file=rs6000/xm-sysv4.h
2108 extra_headers=ppc-asm.h
2109 if [[ x$gas = xyes ]]
2111 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2113 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2115 xmake_file=rs6000/x-sysv4
2118 tm_file=rs6000/eabiaix.h
2119 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2120 fixincludes=Makefile.in
2121 extra_headers=ppc-asm.h
2124 tm_file=rs6000/eabisim.h
2125 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2126 fixincludes=Makefile.in
2127 extra_headers=ppc-asm.h
2130 tm_file=rs6000/eabi.h
2131 if [[ x$gas = xyes ]]
2133 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2135 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2137 fixincludes=Makefile.in
2138 extra_headers=ppc-asm.h
2141 tm_file=rs6000/rtems.h
2142 if [[ x$gas = xyes ]]
2144 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2146 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2148 fixincludes=Makefile.in
2149 extra_headers=ppc-asm.h
2151 powerpc-*-linux-gnulibc1)
2152 tm_file=rs6000/linux.h
2153 xm_file=rs6000/xm-sysv4.h
2154 out_file=rs6000/rs6000.c
2155 if [[ x$gas = xyes ]]
2157 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2159 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2162 fixincludes=Makefile.in
2163 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2164 extra_headers=ppc-asm.h
2165 if [[ x$enable_threads = xyes ]]; then
2169 powerpc-*-linux-gnu*)
2170 tm_file=rs6000/linux.h
2171 xm_file=rs6000/xm-sysv4.h
2172 out_file=rs6000/rs6000.c
2173 if [[ x$gas = xyes ]]
2175 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2177 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2180 fixincludes=Makefile.in
2181 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2182 extra_headers=ppc-asm.h
2183 if [[ x$enable_threads = xyes ]]; then
2189 xm_file=rs6000/xm-sysv4.h
2190 tm_file=rs6000/vxppc.h
2191 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2192 extra_headers=ppc-asm.h
2194 powerpcle-*-sysv* | powerpcle-*-elf*)
2195 tm_file=rs6000/sysv4le.h
2196 xm_file=rs6000/xm-sysv4.h
2197 if [[ x$gas = xyes ]]
2199 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2201 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2203 xmake_file=rs6000/x-sysv4
2204 extra_headers=ppc-asm.h
2206 powerpcle-*-eabisim*)
2207 tm_file=rs6000/eabilesim.h
2208 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2209 fixincludes=Makefile.in
2210 extra_headers=ppc-asm.h
2213 tm_file=rs6000/eabile.h
2214 if [[ x$gas = xyes ]]
2216 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2218 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2220 fixincludes=Makefile.in
2221 extra_headers=ppc-asm.h
2223 powerpcle-*-winnt* )
2224 tm_file=rs6000/win-nt.h
2225 tmake_file=rs6000/t-winnt
2227 fixincludes=Makefile.in
2228 if [[ x$enable_threads = xyes ]]; then
2231 extra_headers=ppc-asm.h
2233 powerpcle-*-pe | powerpcle-*-cygwin32)
2234 tm_file=rs6000/cygwin32.h
2235 xm_file=rs6000/xm-cygwin32.h
2236 tmake_file=rs6000/t-winnt
2237 xmake_file=rs6000/x-cygwin32
2239 fixincludes=Makefile.in
2240 if [[ x$enable_threads = xyes ]]; then
2244 extra_headers=ppc-asm.h
2246 powerpcle-*-solaris2*)
2247 tm_file=rs6000/sol2.h
2248 xm_file=rs6000/xm-sysv4.h
2249 if [[ x$gas = xyes ]]
2251 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2253 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2255 xmake_file=rs6000/x-sysv4
2256 fixincludes=fixinc.math
2257 extra_headers=ppc-asm.h
2259 rs6000-ibm-aix3.[[01]]*)
2260 tm_file=rs6000/aix31.h
2261 xmake_file=rs6000/x-aix31
2264 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2265 tm_file=rs6000/aix3newas.h
2266 if [[ x$host != x$target ]]
2268 tmake_file=rs6000/t-xnewas
2270 tmake_file=rs6000/t-newas
2274 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2275 tm_file=rs6000/aix41.h
2276 if [[ x$host != x$target ]]
2278 tmake_file=rs6000/t-xnewas
2280 tmake_file=rs6000/t-newas
2282 xmake_file=rs6000/x-aix31
2292 tm_file=rs6000/mach.h
2293 xm_file=rs6000/xm-mach.h
2294 xmake_file=rs6000/x-mach
2298 tm_file=rs6000/lynx.h
2299 xm_file=rs6000/xm-lynx.h
2300 tmake_file=rs6000/t-rs6000
2301 xmake_file=rs6000/x-lynx
2309 tmake_file="sh/t-sh t-rtems"
2318 xm_file=sparc/xm-pbd.h
2320 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2321 tm_file=sparc/vxsparc.h
2322 tmake_file=sparc/t-vxsparc
2326 tmake_file=sparc/t-sparcbare
2327 tm_file="sparc/aout.h libgloss.h"
2330 tm_file=sparc/netbsd.h
2331 # On NetBSD, the headers are already okay, except for math.h.
2332 fixincludes=fixinc.math
2340 tmake_file=sparc/t-elf
2341 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2345 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2346 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2347 tm_file=sparc/linux-aout.h
2349 fixincludes=Makefile.in #On Linux, the headers are ok already.
2352 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2353 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2355 tm_file=sparc/linux.h
2356 tmake_file="t-linux t-linux-gnulibc1"
2357 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2358 fixincludes=Makefile.in #On Linux, the headers are ok already.
2361 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2362 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2364 tm_file=sparc/linux.h
2365 tmake_file="t-linux"
2366 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2367 fixincludes=Makefile.in #On Linux, the headers are ok already.
2369 if [[ x$enable_threads = xyes ]]; then
2374 if [[ x$gas = xyes ]]
2376 tm_file=sparc/lynx.h
2378 tm_file=sparc/lynx-ng.h
2380 xm_file=sparc/xm-lynx.h
2381 tmake_file=sparc/t-sunos41
2385 tmake_file="sparc/t-sparcbare t-rtems"
2386 tm_file=sparc/rtems.h
2389 if [[ x$gnu_ld = xyes ]]
2391 tm_file=sparc/sol2.h
2393 tm_file=sparc/sol2-sld.h
2395 xm_file=sparc/xm-sol2.h
2396 tmake_file=sparc/t-sol2
2397 xmake_file=sparc/x-sysv4
2398 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2399 fixincludes=fixinc.svr4
2402 if [[ x${enable_threads} = x ]]; then
2403 enable_threads=$have_pthread_h
2404 if [[ x${enable_threads} = x ]]; then
2405 enable_threads=$have_thread_h
2408 if [[ x${enable_threads} = xyes ]]; then
2409 if [[ x${have_pthread_h} = xyes ]]; then
2412 thread_file='solaris'
2417 tm_file=sparc/sunos4.h
2418 tmake_file=sparc/t-sunos40
2422 tm_file=sparc/sunos4.h
2423 tmake_file=sparc/t-sunos41
2425 if [[ x$gas = xyes ]]; then
2426 tm_file="${tm_file} sparc/sun4gas.h"
2430 tm_file=sparc/sun4o3.h
2434 tm_file=sparc/sysv4.h
2435 xm_file=sparc/xm-sysv4.h
2437 xmake_file=sparc/x-sysv4
2438 extra_parts="crtbegin.o crtend.o"
2441 xm_file=sparc/xm-sol2.h
2442 tm_file=sparc/vxsim.h
2443 tmake_file=sparc/t-vxsparc
2444 xmake_file=sparc/x-sysv4
2447 tm_file="sparc/splet.h libgloss.h"
2448 tmake_file=sparc/t-splet
2451 tm_file="sparc/litecoff.h libgloss.h"
2452 tmake_file=sparc/t-sparclite
2455 tm_file="sparc/lite.h aoutos.h libgloss.h"
2456 tmake_file=sparc/t-sparclite
2459 tmake_file=sparc/t-sp64
2460 tm_file=sparc/sp64-aout.h
2463 tmake_file=sparc/t-sp64
2464 tm_file=sparc/sp64-elf.h
2465 extra_parts="crtbegin.o crtend.o"
2467 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2468 tmake_file=sparc/t-sp64
2469 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2470 tm_file=sparc/linux64.h
2472 fixincludes=Makefile.in # The headers are ok already.
2475 # This hasn't been upgraded to GCC 2.
2476 # tahoe-harris-*) # Harris tahoe, using COFF.
2477 # tm_file=tahoe/harris.h
2479 # tahoe-*-bsd*) # tahoe running BSD
2481 # This hasn't been upgraded to GCC 2.
2488 tm_file="v850/v850.h"
2489 xm_file="v850/xm-v850.h"
2490 if [[ x$stabs = xyes ]]
2492 tm_file="${tm_file} dbx.h"
2496 vax-*-bsd*) # vaxen running BSD
2500 vax-*-sysv*) # vaxen running system V
2501 tm_file="${tm_file} vax/vaxv.h"
2502 xm_file="${xm_file} vax/xm-vaxv.h"
2506 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2507 # On NetBSD, the headers are already okay, except for math.h.
2508 fixincludes=fixinc.math
2512 vax-*-ultrix*) # vaxen running ultrix
2513 tm_file="${tm_file} vax/ultrix.h"
2517 vax-*-vms*) # vaxen running VMS
2518 xm_file=vax/xm-vms.h
2522 vax-*-*) # vax default entry
2526 xm_file="${xm_file} xm-svr3"
2530 echo "Configuration $machine not supported" 1>&2
2537 ;; # Existing Linux/GNU systems do not use the GNU setup.
2539 # On the GNU system, the setup is just about the same on
2540 # each different CPU. The specific machines that GNU
2541 # supports are matched above and just set $cpu_type.
2542 xm_file=${cpu_type}/xm-gnu.h
2543 tm_file=${cpu_type}/gnu.h
2544 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2545 # GNU always uses ELF.
2547 # GNU tools are the only tools.
2550 # On GNU, the headers are already okay.
2551 fixincludes=Makefile.in
2552 xmake_file=x-linux # These details are the same as Linux.
2553 tmake_file=t-gnu # These are not.
2556 fixincludes=fixinc.svr4
2557 xmake_try_sysv=x-sysv
2558 install_headers_dir=install-headers-cpio
2561 install_headers_dir=install-headers-cpio
2565 # Distinguish i[3456]86
2566 # Also, do not run mips-tfile on MIPS if using gas.
2567 # Process --with-cpu= for PowerPC/rs6000
2568 target_cpu_default2=
2571 target_cpu_default2=1
2574 target_cpu_default2=2
2577 target_cpu_default2=3
2582 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2585 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
2588 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2591 target_cpu_default2="MASK_CPU_EV5"
2595 if [[ x$gas = xyes ]]
2597 if [[ "$target_cpu_default2" = "" ]]
2599 target_cpu_default2="MASK_GAS"
2601 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2606 case "x$with_cpu" in
2609 target_cpu_default2="TARGET_CPU_generic"
2612 # Distinguish cores, and major variants
2613 # arm7m doesn't exist, but D & I don't affect code
2614 xarm[23678] | xarm250 | xarm[67][01]0 \
2615 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2616 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2617 | xstrongarm | xstrongarm110)
2618 target_cpu_default2="TARGET_CPU_$with_cpu"
2622 echo "--with-cpu must be passed a value" 1>&2
2627 if [[ x$pass2done = xyes ]]
2629 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2636 mips*-*-ecoff* | mips*-*-elf*)
2637 if [[ x$gas = xyes ]]
2639 if [[ x$gnu_ld = xyes ]]
2641 target_cpu_default2=20
2643 target_cpu_default2=16
2648 if [[ x$gas = xyes ]]
2650 target_cpu_default2=16
2653 powerpc*-*-* | rs6000-*-*)
2654 case "x$with_cpu" in
2658 xcommon | xpower | xpower2 | xpowerpc | xrios \
2659 | xrios1 | xrios2 | xrsc | xrsc1 \
2660 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2661 | x403 | x505 | x801 | x821 | x823 | x860)
2662 target_cpu_default2="\"$with_cpu\""
2666 echo "--with-cpu must be passed a value" 1>&2
2671 if [[ x$pass2done = xyes ]]
2673 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2680 case ".$with_cpu" in
2682 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2684 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2685 target_cpu_default2="TARGET_CPU_$with_cpu"
2688 if [[ x$pass2done = xyes ]]
2690 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2698 if [[ "$target_cpu_default2" != "" ]]
2700 if [[ "$target_cpu_default" != "" ]]
2702 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2704 target_cpu_default=$target_cpu_default2
2708 # No need for collect2 if we have the GNU linker.
2715 # Save data on machine being used to compile GCC in build_xm_file.
2716 # Save data on host machine in vars host_xm_file and host_xmake_file.
2717 if [[ x$pass1done = x ]]
2719 if [[ x"$xm_file" = x ]]
2720 then build_xm_file=$cpu_type/xm-$cpu_type.h
2721 else build_xm_file=$xm_file
2723 build_install_headers_dir=$install_headers_dir
2724 build_exeext=$exeext
2727 if [[ x$pass2done = x ]]
2729 if [[ x"$xm_file" = x ]]
2730 then host_xm_file=$cpu_type/xm-$cpu_type.h
2731 else host_xm_file=$xm_file
2733 if [[ x"$xmake_file" = x ]]
2734 then xmake_file=$cpu_type/x-$cpu_type
2736 host_xmake_file="$xmake_file"
2737 host_truncate_target=$truncate_target
2738 host_extra_gcc_objs=$extra_gcc_objs
2739 host_extra_objs=$extra_host_objs
2746 extra_objs="${host_extra_objs} ${extra_objs}"
2748 # Default the target-machine variables that were not explicitly set.
2749 if [[ x"$tm_file" = x ]]
2750 then tm_file=$cpu_type/$cpu_type.h; fi
2752 if [[ x$extra_headers = x ]]
2753 then extra_headers=; fi
2755 if [[ x"$xm_file" = x ]]
2756 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2758 md_file=$cpu_type/$cpu_type.md
2760 if [[ x$out_file = x ]]
2761 then out_file=$cpu_type/$cpu_type.c; fi
2763 if [[ x"$tmake_file" = x ]]
2764 then tmake_file=$cpu_type/t-$cpu_type
2767 if [[ x$float_format = x ]]
2768 then float_format=i64
2771 if [[ x$enable_haifa = x ]]
2774 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-*)
2779 # Say what files are being used for the output code and MD file.
2780 echo "Using \`$srcdir/config/$out_file' to output insns."
2781 echo "Using \`$srcdir/config/$md_file' as machine description file."
2784 for f in $tm_file; do
2787 if [[ $count = ax ]]; then
2788 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2790 echo "Using the following target machine macro files:"
2791 for f in $tm_file; do
2792 echo " $srcdir/config/$f"
2797 for f in $host_xm_file; do
2800 if [[ $count = ax ]]; then
2801 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2803 echo "Using the following host machine macro files:"
2804 for f in $host_xm_file; do
2805 echo " $srcdir/config/$f"
2809 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2811 for f in $build_xm_file; do
2814 if [[ $count = ax ]]; then
2815 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2817 echo "Using the following build machine macro files:"
2818 for f in $build_xm_file; do
2819 echo " $srcdir/config/$f"
2824 if [[ x$thread_file = x ]]; then
2825 if [[ x$target_thread_file != x ]]; then
2826 thread_file=$target_thread_file
2828 thread_file='single'
2832 # Set up the header files.
2833 # $links is the list of header files to create.
2834 # $vars is the list of shell variables with file names to include.
2835 # auto-conf.h is the file containing items generated by autoconf and is
2836 # the first file included by config.h.
2837 host_xm_file="auto-config.h ${host_xm_file}"
2839 # If host=build, it is correct to have hconfig include auto-conf.h
2840 # as well. If host!=build, we are in error and need to do more
2841 # work to find out the build config parameters.
2842 if [[ x$host = x$build ]]
2844 build_xm_file="auto-config.h ${build_xm_file}"
2847 vars="host_xm_file tm_file xm_file build_xm_file"
2848 links="config.h tm.h tconfig.h hconfig.h"
2851 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2854 while [[ -n "$vars" ]]
2856 # set file to car of files, files to cdr of files
2857 set $vars; var=$1; shift; vars=$*
2858 set $links; link=$1; shift; links=$*
2862 # Define TARGET_CPU_DEFAULT if the system wants one.
2863 # This substitutes for lots of *.h files.
2864 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
2866 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
2869 for file in `eval echo '$'$var`; do
2870 echo "#include \"$file\"" >>$link
2874 # Truncate the target if necessary
2875 if [[ x$host_truncate_target != x ]]; then
2876 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2879 # Get the version number from the toplevel
2880 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2882 # Get an absolute path to the GCC top-level source directory
2888 # Conditionalize the makefile for this host machine.
2889 # Make-host contains the concatenation of all host makefile fragments
2890 # [there can be more than one]. This file is built by configure.frag.
2891 host_overrides=Make-host
2892 dep_host_xmake_file=
2893 for f in .. ${host_xmake_file}
2895 if [[ -f ${srcdir}/config/$f ]]
2897 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2901 # Conditionalize the makefile for this target machine.
2902 # Make-target contains the concatenation of all host makefile fragments
2903 # [there can be more than one]. This file is built by configure.frag.
2904 target_overrides=Make-target
2906 for f in .. ${tmake_file}
2908 if [[ -f ${srcdir}/config/$f ]]
2910 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2914 # If the host doesn't support symlinks, modify CC in
2915 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2916 # Otherwise, we can use "CC=$(CC)".
2918 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2920 cc_set_by_configure="\$(CC)"
2921 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2923 symbolic_link="cp -p"
2924 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2925 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2929 out_object_file=`basename $out_file .c`.o
2932 for f in $tm_file; do
2933 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2937 for f in $host_xm_file; do
2938 if test $f != "auto-config.h"; then
2939 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2941 host_xm_file_list="${host_xm_file_list} auto-config.h"
2946 for f in $build_xm_file; do
2947 if test $f != "auto-config.h"; then
2948 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2950 build_xm_file_list="${build_xm_file_list} auto-config.h"
2954 # Define macro CROSS_COMPILE in compilation
2955 # if this is a cross-compiler.
2956 # Also use all.cross instead of all.internal
2957 # and add cross-make to Makefile.
2958 cross_overrides="/dev/null"
2959 if [[ x$host != x$target ]]
2961 cross_defines="CROSS=-DCROSS_COMPILE"
2962 cross_overrides="${topdir}/cross-make"
2965 # When building gcc with a cross-compiler, we need to fix a few things.
2966 # This must come after cross-make as we want all.build to override
2968 build_overrides="/dev/null"
2969 if [[ x$build != x$host ]]
2971 build_overrides="${topdir}/build-make"
2974 # Expand extra_headers to include complete path.
2975 # This substitutes for lots of t-* files.
2977 if [[ "x$extra_headers" = x ]]
2980 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2981 for file in $extra_headers;
2983 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2987 # Add a definition of USE_COLLECT2 if system wants one.
2988 # Also tell toplev.c what to do.
2989 # This substitutes for lots of t-* files.
2990 if [[ x$use_collect2 = x ]]
2995 will_use_collect2="ld"
2996 maybe_use_collect2="-DUSE_COLLECT2"
3000 # Set MD_DEPS if the real md file is in md.pre-cpp.
3001 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
3002 # for line oriented comments, so we must always use a GNU cpp. If
3003 # building gcc with a cross compiler, use the cross compiler just
3004 # built. Otherwise, we can use the cpp just built.
3006 if [[ "x$md_cppflags" = x ]]
3008 md_file_sub=$srcdir/config/$md_file
3013 # If we have gas in the build tree, make a link to it.
3014 if [[ -f ../gas/Makefile ]]; then
3015 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3018 # If we have ld in the build tree, make a link to it.
3019 if [[ -f ../ld/Makefile ]]; then
3020 # if [[ x$use_collect2 = x ]]; then
3021 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3023 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3027 # Figure out what language subdirectories are present.
3029 for lang in ${srcdir}/*/config-lang.in ..
3033 # The odd quoting in the next line works around
3034 # an apparent bug in bash 1.12 on linux.
3035 ${srcdir}/[[*]]/config-lang.in) ;;
3036 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3040 # Make gthr-default.h if we have a thread file.
3042 if [[ $thread_file != single ]]; then
3043 rm -f gthr-default.h
3044 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3045 gthread_flags=-DHAVE_GTHR_DEFAULT
3047 AC_SUBST(gthread_flags)
3049 # Make empty files to contain the specs and options for each language.
3050 # Then add #include lines to for a compiler that has specs and/or options.
3054 rm -f specs.h options.h
3055 touch specs.h options.h
3056 for subdir in . $subdirs
3058 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3059 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3060 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3062 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3063 echo "#include \"$subdir/lang-options.h\"" >>options.h
3064 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3068 # These (without "all_") are set in each config-lang.in.
3069 # `language' must be a single word so is spelled singularly.
3075 all_outputs=Makefile
3076 # List of language makefile fragments.
3081 # Add the language fragments.
3082 # Languages are added via two mechanisms. Some information must be
3083 # recorded in makefile variables, these are defined in config-lang.in.
3084 # We accumulate them and plug them into the main Makefile.
3085 # The other mechanism is a set of hooks for each of the main targets
3086 # like `clean', `install', etc.
3088 language_fragments="Make-lang"
3089 language_hooks="Make-hooks"
3092 for s in .. $subdirs
3104 . ${srcdir}/$s/config-lang.in
3105 if [[ "x$language" = x ]]
3107 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3110 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3111 all_languages="$all_languages $language"
3112 if [[ "x$boot_language" = xyes ]]
3114 all_boot_languages="$all_boot_languages $language"
3116 all_compilers="$all_compilers $compilers"
3117 all_stagestuff="$all_stagestuff $stagestuff"
3118 all_diff_excludes="$all_diff_excludes $diff_excludes"
3119 all_headers="$all_headers $headers"
3120 all_outputs="$all_outputs $outputs"
3121 if [[ x$outputs = x ]]
3123 oldstyle_subdirs="$oldstyle_subdirs $s"
3125 all_lib2funcs="$all_lib2funcs $lib2funcs"
3129 # Since we can't use `::' targets, we link each language in
3130 # with a set of hooks, reached indirectly via lang.${target}.
3134 target_list="all.build all.cross start.encap rest.encap \
3136 install-normal install-common install-info install-man \
3138 mostlyclean clean distclean extraclean maintainer-clean \
3139 stage1 stage2 stage3 stage4"
3140 for t in $target_list
3143 for l in .. $all_languages
3145 if [[ $l != ".." ]]; then
3149 echo "lang.$t: $x" >> Make-hooks
3152 # If we're not building in srcdir, create .gdbinit.
3154 if [[ ! -f Makefile.in ]]; then
3155 echo "dir ." > .gdbinit
3156 echo "dir ${srcdir}" >> .gdbinit
3157 if [[ x$gdb_needs_out_file_path = xyes ]]
3159 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3161 if [[ "x$subdirs" != x ]]; then
3164 echo "dir ${srcdir}/$s" >> .gdbinit
3167 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3170 # If this is using newlib, then define inhibit_libc in
3171 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3172 # libgcc.a, but that's OK because newib should have its own version of
3175 if [[ x$with_newlib = xyes ]]; then
3176 inhibit_libc=-Dinhibit_libc
3178 AC_SUBST(inhibit_libc)
3180 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3183 if [[ x$enable_haifa = xyes ]]; then
3184 echo "Using the Haifa scheduler."
3186 sched_cflags=-DHAIFA
3188 AC_SUBST(sched_prefix)
3189 AC_SUBST(sched_cflags)
3190 if [[ x$enable_haifa != x ]]; then
3191 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3192 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3193 if [[ -f $x ]]; then
3200 # Process the language and host/target makefile fragments.
3201 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3203 # Substitute configuration variables
3205 AC_SUBST(all_languages)
3206 AC_SUBST(all_boot_languages)
3207 AC_SUBST(all_compilers)
3208 AC_SUBST(all_lang_makefiles)
3209 AC_SUBST(all_stagestuff)
3210 AC_SUBST(all_diff_excludes)
3211 AC_SUBST(all_lib2funcs)
3212 AC_SUBST(all_headers)
3213 AC_SUBST(extra_passes)
3214 AC_SUBST(extra_programs)
3215 AC_SUBST(extra_parts)
3216 AC_SUBST(extra_c_objs)
3217 AC_SUBST(extra_c_flags)
3218 AC_SUBST(extra_objs)
3219 AC_SUBST(host_extra_gcc_objs)
3220 AC_SUBST(extra_headers_list)
3221 AC_SUBST(dep_host_xmake_file)
3222 AC_SUBST(dep_tmake_file)
3224 AC_SUBST(out_object_file)
3226 AC_SUBST(tm_file_list)
3227 AC_SUBST(build_xm_file_list)
3228 AC_SUBST(host_xm_file_list)
3229 AC_SUBST(lang_specs_files)
3230 AC_SUBST(lang_options_files)
3231 AC_SUBST(thread_file)
3233 AC_SUBST(local_prefix)
3234 AC_SUBST(gxx_include_dir)
3235 AC_SUBST(fixincludes)
3236 AC_SUBST(build_install_headers_dir)
3237 AC_SUBST(build_exeext)
3238 AC_SUBST(host_exeext)
3239 AC_SUBST(float_format)
3240 AC_SUBST(will_use_collect2)
3241 AC_SUBST(maybe_use_collect2)
3242 AC_SUBST(cc_set_by_configure)
3243 AC_SUBST(stage_prefix_set_by_configure)
3245 AC_SUBST(symbolic_link)
3247 AC_SUBST_FILE(target_overrides)
3248 AC_SUBST_FILE(host_overrides)
3249 AC_SUBST(cross_defines)
3250 AC_SUBST_FILE(cross_overrides)
3251 AC_SUBST_FILE(build_overrides)
3252 AC_SUBST_FILE(language_fragments)
3253 AC_SUBST_FILE(language_hooks)
3255 # Echo that links are built
3256 if [[ x$host = x$target ]]
3264 if [[ x$host != x$build ]]
3266 str3=" on a $build system"
3269 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3274 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3276 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3278 echo " ${str2}${str3}." 1>&2
3281 # Configure the subdirectories
3282 # AC_CONFIG_SUBDIRS($subdirs)
3284 # Create the Makefile
3285 # and configure language subdirectories
3286 AC_OUTPUT($all_outputs,
3288 . $srcdir/configure.lang
3289 case x$CONFIG_HEADERS in
3290 xauto-config.h:config.in)
3293 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3294 # bootstrapping and the installation procedure can still use
3295 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3296 # FLAGS_TO_PASS has been modified to solve the problem there.
3297 # This is virtually a duplicate of what happens in configure.lang; we do
3298 # an extra check to make sure this only happens if ln -s can be used.
3299 if [[ "$symbolic_link" = "ln -s" ]]; then
3300 for d in .. ${subdirs} ; do
3301 if [[ $d != .. ]]; then
3304 for t in stage1 stage2 stage3 stage4 include
3307 $symbolic_link ../$t $t 2>/dev/null
3318 target_alias='${target_alias}'
3320 subdirs='${subdirs}'
3321 oldstyle_subdirs='${oldstyle_subdirs}'
3322 symbolic_link='${symbolic_link}'
3323 program_transform_set='${program_transform_set}'
3324 program_transform_name='${program_transform_name}'
3325 dep_host_xmake_file='${dep_host_xmake_file}'
3326 host_xmake_file='${host_xmake_file}'
3327 dep_tmake_file='${dep_tmake_file}'
3328 tmake_file='${tmake_file}'
3329 thread_file='${thread_file}'
3330 version='${version}'
3331 local_prefix='${local_prefix}'
3332 build_install_headers_dir='${build_install_headers_dir}'
3333 build_exeext='${build_exeext}'
3334 host_exeext='${host_exeext}'
3335 out_file='${out_file}'
3336 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3337 SET_MAKE='${SET_MAKE}'
3338 target_list='${target_list}'
3339 target_overrides='${target_overrides}'
3340 host_overrides='${host_overrides}'
3341 cross_defines='${cross_defines}'
3342 cross_overrides='${cross_overrides}'
3343 build_overrides='${build_overrides}'