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.],
37 gnu_ld="$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 if [[ x$enable_threads = x ]]; then
614 enable_threads=$have_pthread_h
616 if [[ x$enable_threads = xyes ]]; then
618 tmake_file="${tmake_file} pa/t-dce-thr"
620 install_headers_dir=install-headers-cpio
625 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
626 xm_file=pa/xm-pahpux.h
627 xmake_file=pa/x-pa-hpux
628 if [[ x$gas = xyes ]]
630 tm_file="${tm_file} pa/pa-gas.h"
632 install_headers_dir=install-headers-cpio
636 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
637 xm_file=pa/xm-pahpux.h
638 xmake_file=pa/x-pa-hpux
639 if [[ x$gas = xyes ]]
641 tm_file="${tm_file} pa/pa-gas.h"
643 install_headers_dir=install-headers-cpio
648 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
649 xm_file=pa/xm-pahpux.h
650 xmake_file=pa/x-pa-hpux
651 if [[ x$gas = xyes ]]
653 tm_file="${tm_file} pa/pa-gas.h"
655 install_headers_dir=install-headers-cpio
659 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
660 xm_file=pa/xm-pahpux.h
661 xmake_file=pa/x-pa-hpux
662 if [[ x$gas = xyes ]]
664 tm_file="${tm_file} pa/pa-gas.h"
666 install_headers_dir=install-headers-cpio
672 fixincludes=Makefile.in
676 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
677 if [[ x$gas = xyes ]]
679 tm_file=i386/aix386.h
680 extra_parts="crtbegin.o crtend.o"
681 tmake_file=i386/t-crtstuff
683 tm_file=i386/aix386ng.h
686 xm_file=i386/xm-aix.h
687 xmake_file=i386/x-aix
689 i[[456]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
690 xm_file=i386/xm-sysv4.h
691 xmake_file=i386/x-ncr3000
692 if [[ x$stabs = xyes -a x$gas = xyes ]]
694 tm_file=i386/sysv4gdb.h
698 extra_parts="crtbegin.o crtend.o"
699 tmake_file=i386/t-crtpic
703 xm_file=i386/xm-next.h
704 tmake_file=i386/t-next
705 xmake_file=i386/x-next
706 extra_objs=nextstep.o
707 if [[ x$enable_threads = xyes ]]; then
711 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
713 if [[ x$gas = xyes ]]
715 tm_file=i386/seq-gas.h
717 tm_file=i386/sequent.h
720 i[[3456]]86-sequent-ptx1*)
721 xm_file=i386/xm-sysv3.h
722 xmake_file=i386/x-sysv3
723 tm_file=i386/seq-sysv3.h
724 tmake_file=i386/t-crtstuff
725 fixincludes=fixinc.ptx
726 extra_parts="crtbegin.o crtend.o"
727 install_headers_dir=install-headers-cpio
729 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
730 xm_file=i386/xm-sysv3.h
731 xmake_file=i386/x-sysv3
732 tm_file=i386/seq2-sysv3.h
733 tmake_file=i386/t-crtstuff
734 extra_parts="crtbegin.o crtend.o"
735 fixincludes=fixinc.ptx
736 install_headers_dir=install-headers-cpio
738 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
739 xm_file=i386/xm-sysv4.h
741 tm_file=i386/ptx4-i.h
743 extra_parts="crtbegin.o crtend.o"
744 fixincludes=fixinc.ptx
745 install_headers_dir=install-headers-cpio
747 i386-sun-sunos*) # Sun i386 roadrunner
748 xm_file=i386/xm-sun.h
752 i[[3456]]86-wrs-vxworks*)
753 tm_file=i386/vxi386.h
754 tmake_file=i386/t-i386bare
757 tm_file=i386/i386-aout.h
758 tmake_file=i386/t-i386bare
760 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
761 tm_file=i386/bsd386.h
762 xm_file=i386/xm-bsd386.h
763 # tmake_file=t-libc-ok
766 tm_file=i386/386bsd.h
767 xm_file=i386/xm-bsd386.h
768 # tmake_file=t-libc-ok
769 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
772 i[[3456]]86-*-freebsdelf*)
773 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
774 # On FreeBSD, the headers are already ok, except for math.h.
775 fixincludes=fixinc.math
776 tmake_file=i386/t-freebsd
781 i[[3456]]86-*-freebsd*)
782 tm_file=i386/freebsd.h
783 # On FreeBSD, the headers are already ok, except for math.h.
784 fixincludes=fixinc.math
785 tmake_file=i386/t-freebsd
787 i[[3456]]86-*-netbsd*)
788 tm_file=i386/netbsd.h
789 # On NetBSD, the headers are already okay, except for math.h.
790 fixincludes=fixinc.math
794 tm_file=i386/i386-coff.h
795 tmake_file=i386/t-i386bare
797 i[[3456]]86-*-isc*) # 80386 running ISC system
798 xm_file=i386/xm-isc.h
800 i[[345]]86-*-isc[[34]]*)
801 xmake_file=i386/x-isc3
804 xmake_file=i386/x-isc
807 if [[ x$gas = xyes -a x$stabs = xyes ]]
809 tm_file=i386/iscdbx.h
810 tmake_file=i386/t-svr3dbx
811 extra_parts="svr3.ifile svr3z.ifile"
813 tm_file=i386/isccoff.h
814 tmake_file=i386/t-crtstuff
815 extra_parts="crtbegin.o crtend.o"
817 install_headers_dir=install-headers-cpio
819 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
820 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
821 xmake_file=x-linux-aout
822 tmake_file="t-linux-aout i386/t-crtstuff"
823 tm_file=i386/linux-oldld.h
824 fixincludes=Makefile.in #On Linux, the headers are ok already.
827 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
828 xm_file=i386/xm-linux.h # with a.out format
829 xmake_file=x-linux-aout
830 tmake_file="t-linux-aout i386/t-crtstuff"
831 tm_file=i386/linux-aout.h
832 fixincludes=Makefile.in #On Linux, the headers are ok already.
835 i[[3456]]86-*-linux-gnulibc1)
836 xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
837 xmake_file=x-linux # with ELF format using the
838 tm_file=i386/linux.h # GNU/Linux C library 5
839 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
840 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
841 fixincludes=Makefile.in #On Linux, the headers are ok already.
843 if [[ x$enable_threads = xyes ]]; then
847 i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
848 xm_file=i386/xm-linux.h # with ELF format using glibc 2
849 xmake_file=x-linux # aka GNU/Linux C library 6
851 tmake_file="t-linux i386/t-crtstuff"
852 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
853 fixincludes=Makefile.in #On Linux, the headers are ok already.
855 if [[ x$enable_threads = xyes ]]; then
861 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
862 xm_file=i386/xm-go32.h
864 tmake_file=i386/t-go32
866 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
869 fixincludes=Makefile.in
873 i[[3456]]86-*-lynxos*)
874 if [[ x$gas = xyes ]]
878 tm_file=i386/lynx-ng.h
880 xm_file=i386/xm-lynx.h
881 tmake_file=i386/t-i386bare
886 # tmake_file=t-libc-ok
889 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
890 if [[ x$elf = xyes ]]
892 tm_file=i386/osfelf.h
895 tm_file=i386/osfrose.h
898 xm_file=i386/xm-osf.h
899 xmake_file=i386/x-osfrose
900 tmake_file=i386/t-osf
903 i[[345]]86-go32-rtems*)
905 xm_file=i386/xm-go32.h
906 tm_file=i386/go32-rtems.h
907 tmake_file="i386/t-go32 t-rtems"
912 tmake_file="i386/t-i386bare t-rtems"
914 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
915 xm_file=i386/xm-sco5.h
916 xmake_file=i386/x-sco5
917 fixincludes=fixinc.sco
918 install_headers_dir=install-headers-cpio
920 tmake_file=i386/t-sco5
921 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
923 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
924 xm_file=i386/xm-sco.h
925 xmake_file=i386/x-sco4
926 fixincludes=fixinc.sco
927 install_headers_dir=install-headers-cpio
928 if [[ x$stabs = xyes ]]
930 tm_file=i386/sco4dbx.h
931 tmake_file=i386/t-svr3dbx
932 extra_parts="svr3.ifile svr3z.rfile"
935 tmake_file=i386/t-crtstuff
936 extra_parts="crtbegin.o crtend.o"
940 i[[3456]]86-*-sco*) # 80386 running SCO system
941 xm_file=i386/xm-sco.h
942 xmake_file=i386/x-sco
943 install_headers_dir=install-headers-cpio
944 if [[ x$stabs = xyes ]]
946 tm_file=i386/scodbx.h
947 tmake_file=i386/t-svr3dbx
948 extra_parts="svr3.ifile svr3z.rfile"
951 extra_parts="crtbegin.o crtend.o"
952 tmake_file=i386/t-crtstuff
956 i[[3456]]86-*-solaris2*)
957 xm_file=i386/xm-sysv4.h
958 if [[ x$stabs = xyes ]]
960 tm_file=i386/sol2dbg.h
964 tmake_file=i386/t-sol2
965 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
967 fixincludes=fixinc.svr4
969 if [[ x$enable_threads = xyes ]]; then
970 thread_file='solaris'
973 i[[3456]]86-*-sysv5*) # Intel x86 on System V Release 5
974 xm_file=i386/xm-sysv4.h
976 if [[ x$stabs = xyes ]]
978 tm_file="${tm_file} dbx.h"
980 tmake_file=i386/t-crtpic
982 extra_parts="crtbegin.o crtend.o"
983 fixincludes=Makefile.in # The headers are just fine, thank you.
985 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
986 xm_file=i386/xm-sysv4.h
988 if [[ x$stabs = xyes ]]
990 tm_file="${tm_file} dbx.h"
992 tmake_file=i386/t-crtpic
994 extra_parts="crtbegin.o crtend.o"
996 i[[3456]]86-*-sysv*) # Intel 80386's running system V
997 xm_file=i386/xm-sysv3.h
998 xmake_file=i386/x-sysv3
999 if [[ x$gas = xyes ]]
1001 if [[ x$stabs = xyes ]]
1003 tm_file=i386/svr3dbx.h
1004 tmake_file=i386/t-svr3dbx
1005 extra_parts="svr3.ifile svr3z.rfile"
1007 tm_file=i386/svr3gas.h
1008 extra_parts="crtbegin.o crtend.o"
1009 tmake_file=i386/t-crtstuff
1012 tm_file=i386/sysv3.h
1013 extra_parts="crtbegin.o crtend.o"
1014 tmake_file=i386/t-crtstuff
1017 i386-*-vsta) # Intel 80386's running VSTa kernel
1018 xm_file=i386/xm-vsta.h
1020 tmake_file=i386/t-vsta
1021 xmake_file=i386/x-vsta
1023 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1024 xm_file="${xm_file} i386/xm-cygwin32.h"
1025 tmake_file=i386/t-cygwin32
1026 tm_file=i386/cygwin32.h
1027 xmake_file=i386/x-cygwin32
1029 fixincludes=Makefile.in
1030 if [[ x$enable_threads = xyes ]]; then
1035 i[[3456]]86-*-mingw32)
1036 tm_file=i386/mingw32.h
1037 xm_file="${xm_file} i386/xm-mingw32.h"
1038 tmake_file=i386/t-cygwin32
1040 xmake_file=i386/x-cygwin32
1041 fixincludes=Makefile.in
1042 if [[ x$enable_threads = xyes ]]; then
1047 i[[3456]]86-*-winnt*)
1048 tm_file=i386/win-nt.h
1049 out_file=i386/i386.c
1050 xm_file=i386/xm-winnt.h
1051 xmake_file=winnt/x-winnt
1052 tmake_file=i386/t-winnt
1053 extra_host_objs="winnt.o oldnames.o"
1054 extra_gcc_objs="spawnv.o oldnames.o"
1055 fixincludes=fixinc.winnt
1056 if [[ x$gnu_ld != xyes ]]
1058 extra_programs=ld.exe
1060 if [[ x$enable_threads = xyes ]]; then
1064 i[[3456]]86-dg-dgux)
1065 xm_file=i386/xm-dgux.h
1066 out_file=i386/dgux.c
1068 tmake_file=i386/t-dgux
1069 xmake_file=i386/x-dgux
1070 fixincludes=fixinc.dgux
1071 install_headers_dir=install-headers-cpio
1073 i860-alliant-*) # Alliant FX/2800
1074 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1075 xm_file="${xm_file}"
1076 xmake_file=i860/x-fx2800
1077 tmake_file=i860/t-fx2800
1078 extra_parts="crtbegin.o crtend.o"
1081 tm_file="${tm_file} i860/bsd.h"
1082 if [[ x$gas = xyes ]]
1084 tm_file="${tm_file} i860/bsd-gas.h"
1089 tm_file="${tm_file} i860/mach.h"
1090 tmake_file=t-libc-ok
1092 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1093 tm_file="${tm_file} svr3.h i860/paragon.h"
1094 xm_file="${xm_file} xm-svr3.h"
1098 tm_file="${tm_file} svr3.h i860/sysv3.h"
1099 xm_file="${tm_file} xm-svr3.h"
1100 xmake_file=i860/x-sysv3
1101 extra_parts="crtbegin.o crtend.o"
1104 tm_file="${tm_file} svr4.h i860/sysv4.h"
1105 xm_file="${xm_file} xm-svr3.h"
1106 xmake_file=i860/x-sysv4
1108 extra_parts="crtbegin.o crtend.o"
1110 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1111 tm_file="${tm_file} i960/vx960.h"
1112 tmake_file=i960/t-vxworks960
1115 i960-wrs-vxworks5* | i960-wrs-vxworks)
1116 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1117 tmake_file=i960/t-vxworks960
1121 tm_file="${tm_file} i960/vx960.h"
1122 tmake_file=i960/t-vxworks960
1126 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1127 tmake_file=i960/t-960bare
1131 tmake_file="i960/t-960bare t-rtems"
1132 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1135 i960-*-*) # Default i960 environment.
1139 extra_parts="crtinit.o crtfini.o"
1141 m68000-convergent-sysv*)
1143 xm_file=m68k/xm-3b1.h
1145 extra_headers=math-68881.h
1147 m68000-hp-bsd*) # HP 9000/200 running BSD
1148 tm_file=m68k/hp2bsd.h
1149 xmake_file=m68k/x-hp2bsd
1151 extra_headers=math-68881.h
1153 m68000-hp-hpux*) # HP 9000 series 300
1154 xm_file=m68k/xm-hp320.h
1155 if [[ x$gas = xyes ]]
1157 xmake_file=m68k/x-hp320g
1158 tm_file=m68k/hp310g.h
1160 xmake_file=m68k/x-hp320
1161 tm_file=m68k/hp310.h
1163 install_headers_dir=install-headers-cpio
1165 extra_headers=math-68881.h
1170 extra_headers=math-68881.h
1173 tm_file=m68k/sun2o4.h
1175 extra_headers=math-68881.h
1178 xm_file=m68k/xm-3b1.h
1179 if [[ x$gas = xyes ]]
1186 extra_headers=math-68881.h
1188 m68k-apple-aux*) # Apple Macintosh running A/UX
1189 xm_file=m68k/xm-aux.h
1190 tmake_file=m68k/t-aux
1191 install_headers_dir=install-headers-cpio
1192 extra_headers=math-68881.h
1193 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1195 if [[ "$gnu_ld" = yes ]]
1197 tm_file="${tm_file} m68k/auxgld.h"
1199 tm_file="${tm_file} m68k/auxld.h"
1201 if [[ "$gas" = yes ]]
1203 tm_file="${tm_file} m68k/auxgas.h"
1205 tm_file="${tm_file} m68k/auxas.h"
1207 tm_file="${tm_file} m68k/a-ux.h"
1210 tm_file=m68k/apollo68.h
1211 xmake_file=m68k/x-apollo68
1213 extra_headers=math-68881.h
1215 m68k-altos-sysv*) # Altos 3068
1216 if [[ x$gas = xyes ]]
1218 tm_file=m68k/altos3068.h
1219 xm_file=m68k/xm-altos3068.h
1221 echo "The Altos is supported only with the GNU assembler" 1>&2
1224 extra_headers=math-68881.h
1226 m68k-bull-sysv*) # Bull DPX/2
1227 if [[ x$gas = xyes ]]
1229 if [[ x$stabs = xyes ]]
1231 tm_file=m68k/dpx2cdbx.h
1233 tm_file=m68k/dpx2g.h
1238 xm_file=m68k/xm-m68kv.h
1239 xmake_file=m68k/x-dpx2
1241 extra_headers=math-68881.h
1243 m68k-atari-sysv4*) # Atari variant of V.4.
1244 tm_file=m68k/atari.h
1245 xm_file=m68k/xm-atari.h
1247 extra_parts="crtbegin.o crtend.o"
1248 extra_headers=math-68881.h
1250 m68k-motorola-sysv*)
1251 tm_file=m68k/mot3300.h
1252 xm_file=m68k/xm-mot3300.h
1253 if [[ x$gas = xyes ]]
1255 xmake_file=m68k/x-mot3300-gas
1256 if [[ x$gnu_ld = xyes ]]
1258 tmake_file=m68k/t-mot3300-gald
1260 tmake_file=m68k/t-mot3300-gas
1264 xmake_file=m68k/x-mot3300
1265 if [[ x$gnu_ld = xyes ]]
1267 tmake_file=m68k/t-mot3300-gld
1269 tmake_file=m68k/t-mot3300
1273 gdb_needs_out_file_path=yes
1274 extra_parts="crt0.o mcrt0.o"
1275 extra_headers=math-68881.h
1277 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1278 tm_file=m68k/tower-as.h
1279 xm_file="${xm_file} xm-svr3.h"
1280 xmake_file=m68k/x-tower
1281 extra_parts="crtbegin.o crtend.o"
1282 extra_headers=math-68881.h
1285 tm_file=m68k/plexus.h
1286 xm_file=m68k/xm-plexus.h
1288 extra_headers=math-68881.h
1292 xm_file=m68k/xm-m68kv.h
1293 extra_headers=math-68881.h
1296 xm_file=m68k/xm-crds.h
1297 xmake_file=m68k/x-crds
1300 extra_headers=math-68881.h
1302 m68k-cbm-sysv4*) # Commodore variant of V.4.
1304 xm_file=m68k/xm-amix.h
1305 xmake_file=m68k/x-amix
1307 extra_parts="crtbegin.o crtend.o"
1308 extra_headers=math-68881.h
1311 tm_file=m68k/ccur-GAS.h
1312 xmake_file=m68k/x-ccur
1313 extra_headers=math-68881.h
1316 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1317 tm_file=m68k/hp3bsd44.h
1318 xmake_file=m68k/x-hp3bsd44
1320 extra_headers=math-68881.h
1322 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1323 tm_file=m68k/hp3bsd.h
1325 extra_headers=math-68881.h
1328 if [[ x$with_fp = xno ]]
1330 tm_file=m68k/isi-nfp.h
1335 extra_headers=math-68881.h
1337 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1338 xm_file=m68k/xm-hp320.h
1339 if [[ x$gas = xyes ]]
1341 xmake_file=m68k/x-hp320g
1342 tm_file=m68k/hp320g.h
1344 xmake_file=m68k/x-hp320
1345 tm_file=m68k/hpux7.h
1347 install_headers_dir=install-headers-cpio
1349 extra_headers=math-68881.h
1351 m68k-hp-hpux*) # HP 9000 series 300
1352 xm_file=m68k/xm-hp320.h
1353 if [[ x$gas = xyes ]]
1355 xmake_file=m68k/x-hp320g
1356 tm_file=m68k/hp320g.h
1358 xmake_file=m68k/x-hp320
1359 tm_file=m68k/hp320.h
1361 install_headers_dir=install-headers-cpio
1363 extra_headers=math-68881.h
1366 tm_file=m68k/sun3mach.h
1368 extra_headers=math-68881.h
1371 if [[ x$gas = xyes ]]
1373 tm_file=m68k/news3gas.h
1375 tm_file=m68k/news3.h
1378 extra_headers=math-68881.h
1380 m68k-sony-bsd* | m68k-sony-newsos*)
1381 if [[ x$gas = xyes ]]
1383 tm_file=m68k/newsgas.h
1388 extra_headers=math-68881.h
1390 m68k-next-nextstep2*)
1391 tm_file=m68k/next21.h
1392 xm_file=m68k/xm-next.h
1393 tmake_file=m68k/t-next
1394 xmake_file=m68k/x-next
1395 extra_objs=nextstep.o
1396 extra_headers=math-68881.h
1399 m68k-next-nextstep3*)
1401 xm_file=m68k/xm-next.h
1402 tmake_file=m68k/t-next
1403 xmake_file=m68k/x-next
1404 extra_objs=nextstep.o
1405 extra_headers=math-68881.h
1406 if [[ x$enable_threads = xyes ]]; then
1411 if [[ x$with_fp = xno ]]
1413 tm_file=m68k/sun3n3.h
1415 tm_file=m68k/sun3o3.h
1418 extra_headers=math-68881.h
1420 m68k-sun-sunos*) # For SunOS 4 (the default).
1421 if [[ x$with_fp = xno ]]
1423 tm_file=m68k/sun3n.h
1428 extra_headers=math-68881.h
1431 tm_file=m68k/vxm68k.h
1432 tmake_file=m68k/t-vxworks68
1433 extra_headers=math-68881.h
1436 tmake_file=m68k/t-m68kbare
1437 tm_file="m68k/m68k-aout.h libgloss.h"
1438 extra_headers=math-68881.h
1441 tmake_file=m68k/t-m68kbare
1442 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1443 extra_headers=math-68881.h
1446 if [[ x$gas = xyes ]]
1450 tm_file=m68k/lynx-ng.h
1452 xm_file=m68k/xm-lynx.h
1454 tmake_file=m68k/t-lynx
1455 extra_headers=math-68881.h
1458 tm_file=m68k/netbsd.h
1459 # On NetBSD, the headers are already okay, except for math.h.
1460 fixincludes=fixinc.math
1463 m68k-*-sysv3*) # Motorola m68k's running system V.3
1464 xm_file=m68k/xm-m68kv.h
1465 xmake_file=m68k/x-m68kv
1466 extra_parts="crtbegin.o crtend.o"
1467 extra_headers=math-68881.h
1469 m68k-*-sysv4*) # Motorola m68k's running system V.4
1470 tm_file=m68k/m68kv4.h
1471 xm_file=m68k/xm-m68kv.h
1473 extra_parts="crtbegin.o crtend.o"
1474 extra_headers=math-68881.h
1476 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1477 xm_file=m68k/xm-linux.h # with a.out format
1479 tm_file=m68k/linux-aout.h
1480 tmake_file="t-linux-aout m68k/t-linux-aout"
1481 fixincludes=Makefile.in # The headers are ok already.
1482 extra_headers=math-68881.h
1485 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1486 xm_file=m68k/xm-linux.h # with ELF format using the
1487 xmake_file=x-linux # GNU/Linux C library 5
1488 tm_file=m68k/linux.h
1489 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1490 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1491 fixincludes=Makefile.in # The headers are ok already.
1492 extra_headers=math-68881.h
1495 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1496 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1497 xmake_file=x-linux # aka the GNU/Linux C library 6.
1498 tm_file=m68k/linux.h
1499 tmake_file="t-linux m68k/t-linux"
1500 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1501 fixincludes=Makefile.in # The headers are ok already.
1502 extra_headers=math-68881.h
1504 if [[ x$enable_threads = xyes ]]; then
1509 tmake_file=m68k/t-m68kbare
1510 tm_file=m68k/m68k-psos.h
1511 extra_headers=math-68881.h
1514 tmake_file="m68k/t-m68kbare t-rtems"
1515 tm_file=m68k/rtems.h
1516 extra_headers=math-68881.h
1522 tm_file=m88k/dguxbcs.h
1523 tmake_file=m88k/t-dguxbcs
1527 tmake_file=m88k/t-dgux
1530 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1531 xmake_file=m88k/x-dgux
1532 if [[ x$gas = xyes ]]
1534 tmake_file=m88k/t-dgux-gas
1536 fixincludes=fixinc.dgux
1538 m88k-dolphin-sysv3*)
1539 tm_file=m88k/dolph.h
1540 extra_parts="crtbegin.o crtend.o"
1541 xm_file=m88k/xm-sysv3.h
1542 xmake_file=m88k/x-dolph
1543 if [[ x$gas = xyes ]]
1545 tmake_file=m88k/t-m88k-gas
1548 m88k-tektronix-sysv3)
1549 tm_file=m88k/tekXD88.h
1550 extra_parts="crtbegin.o crtend.o"
1551 xm_file=m88k/xm-sysv3.h
1552 xmake_file=m88k/x-tekXD88
1553 if [[ x$gas = xyes ]]
1555 tmake_file=m88k/t-m88k-gas
1559 tm_file=m88k/m88k-aout.h
1562 tm_file=m88k/m88k-coff.h
1563 tmake_file=m88k/t-bug
1567 extra_parts="crtbegin.o crtend.o"
1568 if [[ x$gas = xyes ]]
1570 tmake_file=m88k/t-luna-gas
1572 tmake_file=m88k/t-luna
1576 tm_file=m88k/sysv3.h
1577 extra_parts="crtbegin.o crtend.o"
1578 xm_file=m88k/xm-sysv3.h
1579 xmake_file=m88k/x-sysv3
1580 if [[ x$gas = xyes ]]
1582 tmake_file=m88k/t-m88k-gas
1586 tm_file=m88k/sysv4.h
1587 extra_parts="crtbegin.o crtend.o"
1588 xmake_file=m88k/x-sysv4
1589 tmake_file=m88k/t-sysv4
1591 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1592 tm_file=mips/iris6.h
1593 xm_file=mips/xm-iris6.h
1594 fixincludes=fixinc.irix
1595 xmake_file=mips/x-iris6
1596 tmake_file=mips/t-iris6
1597 if [[ x$enable_threads = xyes ]]; then
1601 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1602 tm_file=mips/cross64.h
1603 xm_file=mips/xm-iris5.h
1604 fixincludes=Makefile.in
1605 xmake_file=mips/x-iris
1606 tmake_file=mips/t-cross64
1607 # See comment in mips/iris[56].h files.
1609 if [[ x$enable_threads = xyes ]]; then
1614 if [[ x$gas = xyes ]]
1616 if [[ x$stabs = xyes ]]
1618 tm_file=mips/iris5gdb.h
1620 tm_file=mips/sni-gas.h
1623 tm_file=mips/sni-svr4.h
1625 xm_file=mips/xm-sysv.h
1626 xmake_file=mips/x-sni-svr4
1627 tmake_file=mips/t-mips-gas
1628 if [[ x$gnu_ld != xyes ]]
1633 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1634 if [[ x$gas = xyes ]]
1636 tm_file=mips/iris5gas.h
1637 if [[ x$stabs = xyes ]]
1639 tm_file="${tm_file} dbx.h"
1642 tm_file=mips/iris5.h
1644 xm_file=mips/xm-iris5.h
1645 fixincludes=fixinc.irix
1646 xmake_file=mips/x-iris
1647 # mips-tfile doesn't work yet
1648 tmake_file=mips/t-mips-gas
1649 # See comment in mips/iris5.h file.
1651 if [[ x$enable_threads = xyes ]]; then
1655 mips-sgi-irix4loser*) # Mostly like a MIPS.
1656 tm_file=mips/iris4loser.h
1657 if [[ x$stabs = xyes ]]; then
1658 tm_file="${tm_file} dbx.h"
1660 xm_file=mips/xm-iris4.h
1661 xmake_file=mips/x-iris
1662 if [[ x$gas = xyes ]]
1664 tmake_file=mips/t-mips-gas
1666 extra_passes="mips-tfile mips-tdump"
1668 if [[ x$gnu_ld != xyes ]]
1672 if [[ x$enable_threads = xyes ]]; then
1676 mips-sgi-irix4*) # Mostly like a MIPS.
1677 tm_file=mips/iris4.h
1678 if [[ x$stabs = xyes ]]; then
1679 tm_file="${tm_file} dbx.h"
1681 xm_file=mips/xm-iris4.h
1682 xmake_file=mips/x-iris
1683 if [[ x$gas = xyes ]]
1685 tmake_file=mips/t-mips-gas
1687 extra_passes="mips-tfile mips-tdump"
1689 if [[ x$gnu_ld != xyes ]]
1693 if [[ x$enable_threads = xyes ]]; then
1697 mips-sgi-*) # Mostly like a MIPS.
1698 tm_file=mips/iris3.h
1699 if [[ x$stabs = xyes ]]; then
1700 tm_file="${tm_file} dbx.h"
1702 xm_file=mips/xm-iris3.h
1703 xmake_file=mips/x-iris3
1704 if [[ x$gas = xyes ]]
1706 tmake_file=mips/t-mips-gas
1708 extra_passes="mips-tfile mips-tdump"
1710 if [[ x$gnu_ld != xyes ]]
1715 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1716 tm_file=mips/osfrose.h
1717 xmake_file=mips/x-osfrose
1718 tmake_file=mips/t-osfrose
1719 extra_objs=halfpic.o
1722 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1723 tm_file=mips/dec-osf1.h
1724 if [[ x$stabs = xyes ]]; then
1725 tm_file="${tm_file} dbx.h"
1727 xmake_file=mips/x-dec-osf1
1728 if [[ x$gas = xyes ]]
1730 tmake_file=mips/t-mips-gas
1732 tmake_file=mips/t-ultrix
1733 extra_passes="mips-tfile mips-tdump"
1735 if [[ x$gnu_ld != xyes ]]
1740 mips-dec-bsd*) # Decstation running 4.4 BSD
1741 tm_file=mips/dec-bsd.h
1743 if [[ x$gas = xyes ]]
1745 tmake_file=mips/t-mips-gas
1747 tmake_file=mips/t-ultrix
1748 extra_passes="mips-tfile mips-tdump"
1750 if [[ x$gnu_ld != xyes ]]
1755 mips-dec-netbsd*) # Decstation running NetBSD
1756 tm_file=mips/netbsd.h
1757 # On NetBSD, the headers are already okay, except for math.h.
1758 fixincludes=fixinc.math
1761 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1762 tm_file=mips/news4.h
1763 if [[ x$stabs = xyes ]]; then
1764 tm_file="${tm_file} dbx.h"
1766 if [[ x$gas = xyes ]]
1768 tmake_file=mips/t-mips-gas
1770 extra_passes="mips-tfile mips-tdump"
1772 if [[ x$gnu_ld != xyes ]]
1776 xmake_file=mips/x-sony
1778 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1779 # That is based on svr4.
1780 # t-svr4 is not right because this system doesn't use ELF.
1781 tm_file=mips/news5.h
1782 if [[ x$stabs = xyes ]]; then
1783 tm_file="${tm_file} dbx.h"
1785 xm_file=mips/xm-news.h
1786 if [[ x$gas = xyes ]]
1788 tmake_file=mips/t-mips-gas
1790 extra_passes="mips-tfile mips-tdump"
1792 if [[ x$gnu_ld != xyes ]]
1797 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1798 tm_file=mips/svr4-t.h
1799 if [[ x$stabs = xyes ]]; then
1800 tm_file="${tm_file} dbx.h"
1802 xm_file=mips/xm-sysv4.h
1803 xmake_file=mips/x-sysv
1804 if [[ x$gas = xyes ]]
1806 tmake_file=mips/t-mips-gas
1807 extra_parts="crtbegin.o crtend.o"
1809 tmake_file=mips/t-mips
1810 extra_passes="mips-tfile mips-tdump"
1812 if [[ x$gnu_ld != xyes ]]
1817 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1818 tm_file=mips/ultrix.h
1819 if [[ x$stabs = xyes ]]; then
1820 tm_file="${tm_file} dbx.h"
1822 xmake_file=mips/x-ultrix
1823 if [[ x$gas = xyes ]]
1825 tmake_file=mips/t-mips-gas
1827 tmake_file=mips/t-ultrix
1828 extra_passes="mips-tfile mips-tdump"
1830 if [[ x$gnu_ld != xyes ]]
1835 mips-*-riscos[[56789]]bsd*)
1836 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1837 if [[ x$stabs = xyes ]]; then
1838 tm_file="${tm_file} dbx.h"
1840 if [[ x$gas = xyes ]]
1842 tmake_file=mips/t-bsd-gas
1844 tmake_file=mips/t-bsd
1845 extra_passes="mips-tfile mips-tdump"
1847 if [[ x$gnu_ld != xyes ]]
1852 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1853 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1854 if [[ x$stabs = xyes ]]; then
1855 tm_file="${tm_file} dbx.h"
1857 if [[ x$gas = xyes ]]
1859 tmake_file=mips/t-bsd-gas
1861 tmake_file=mips/t-bsd
1862 extra_passes="mips-tfile mips-tdump"
1864 if [[ x$gnu_ld != xyes ]]
1869 mips-*-riscos[[56789]]sysv4*)
1870 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1871 if [[ x$stabs = xyes ]]; then
1872 tm_file="${tm_file} dbx.h"
1874 xm_file=mips/xm-sysv4.h
1875 xmake_file=mips/x-sysv
1876 if [[ x$gas = xyes ]]
1878 tmake_file=mips/t-svr4-gas
1880 tmake_file=mips/t-svr4
1881 extra_passes="mips-tfile mips-tdump"
1883 if [[ x$gnu_ld != xyes ]]
1888 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1889 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1890 if [[ x$stabs = xyes ]]; then
1891 tm_file="${tm_file} dbx.h"
1893 xm_file=mips/xm-sysv.h
1894 xmake_file=mips/x-sysv
1895 if [[ x$gas = xyes ]]
1897 tmake_file=mips/t-svr4-gas
1899 tmake_file=mips/t-svr4
1900 extra_passes="mips-tfile mips-tdump"
1902 if [[ x$gnu_ld != xyes ]]
1907 mips-*-riscos[[56789]]sysv*)
1908 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1909 if [[ x$stabs = xyes ]]; then
1910 tm_file="${tm_file} dbx.h"
1912 xm_file=mips/xm-sysv.h
1913 xmake_file=mips/x-sysv
1914 if [[ x$gas = xyes ]]
1916 tmake_file=mips/t-svr3-gas
1918 tmake_file=mips/t-svr3
1919 extra_passes="mips-tfile mips-tdump"
1921 if [[ x$gnu_ld != xyes ]]
1926 mips-*-sysv* | mips-*-riscos*sysv*)
1927 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1928 if [[ x$stabs = xyes ]]; then
1929 tm_file="${tm_file} dbx.h"
1931 xm_file=mips/xm-sysv.h
1932 xmake_file=mips/x-sysv
1933 if [[ x$gas = xyes ]]
1935 tmake_file=mips/t-svr3-gas
1937 tmake_file=mips/t-svr3
1938 extra_passes="mips-tfile mips-tdump"
1940 if [[ x$gnu_ld != xyes ]]
1945 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1946 tm_file=mips/mips-5.h
1947 if [[ x$stabs = xyes ]]; then
1948 tm_file="${tm_file} dbx.h"
1950 if [[ x$gas = xyes ]]
1952 tmake_file=mips/t-mips-gas
1954 extra_passes="mips-tfile mips-tdump"
1956 if [[ x$gnu_ld != xyes ]]
1964 tm_file=mips/ecoffl.h
1965 if [[ x$stabs = xyes ]]; then
1966 tm_file="${tm_file} dbx.h"
1968 tmake_file=mips/t-ecoff
1971 tm_file=mips/ecoff.h
1972 if [[ x$stabs = xyes ]]; then
1973 tm_file="${tm_file} dbx.h"
1975 tmake_file=mips/t-ecoff
1978 tm_file="mips/elfl.h libgloss.h"
1979 tmake_file=mips/t-ecoff
1982 tm_file="mips/elf.h libgloss.h"
1983 tmake_file=mips/t-ecoff
1986 tm_file="mips/elfl64.h libgloss.h"
1987 tmake_file=mips/t-ecoff
1989 mips64orionel-*-elf*)
1990 tm_file="mips/elflorion.h libgloss.h"
1991 tmake_file=mips/t-ecoff
1994 tm_file="mips/elf64.h libgloss.h"
1995 tmake_file=mips/t-ecoff
1998 tm_file="mips/elforion.h libgloss.h"
1999 tmake_file=mips/t-ecoff
2001 mips64orion-*-rtems*)
2002 tm_file=mips/rtems64.h
2003 tmake_file="mips/t-ecoff t-rtems"
2006 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2007 tmake_file=mips/t-r3900
2010 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2011 tmake_file=mips/t-r3900
2013 mips-*-*) # Default MIPS RISC-OS 4.0.
2014 if [[ x$stabs = xyes ]]; then
2015 tm_file="${tm_file} dbx.h"
2017 if [[ x$gas = xyes ]]
2019 tmake_file=mips/t-mips-gas
2021 extra_passes="mips-tfile mips-tdump"
2023 if [[ x$gnu_ld != xyes ]]
2030 tm_file="mn10200/mn10200.h"
2031 if [[ x$stabs = xyes ]]
2033 tm_file="${tm_file} dbx.h"
2039 tm_file="mn10300/mn10300.h"
2040 if [[ x$stabs = xyes ]]
2042 tm_file="${tm_file} dbx.h"
2047 tm_file=ns32k/encore.h
2051 tm_file=ns32k/sequent.h
2055 tm_file=ns32k/tek6100.h
2059 tm_file=ns32k/tek6200.h
2062 # This has not been updated to GCC 2.
2064 # xm_file=ns32k/xm-genix.h
2065 # xmake_file=ns32k/x-genix
2066 # tm_file=ns32k/genix.h
2070 tm_file=ns32k/merlin.h
2074 tm_file=ns32k/pc532-mach.h
2078 tm_file=ns32k/pc532-min.h
2079 xm_file=ns32k/xm-pc532-min.h
2082 ns32k-pc532-netbsd*)
2083 tm_file=ns32k/netbsd.h
2084 # On NetBSD, the headers are already okay, except for math.h.
2085 fixincludes=fixinc.math
2089 tm_file="${tm_file} pdp11/2bsd.h"
2095 xmake_file=pyr/x-pyr
2102 xmake_file=romp/x-mach
2107 tm_file=rs6000/beos.h
2108 xm_file=rs6000/xm-beos.h
2109 tmake_file=rs6000/t-beos
2110 xmake_file=rs6000/x-beos
2112 powerpc-*-sysv* | powerpc-*-elf*)
2113 tm_file=rs6000/sysv4.h
2114 xm_file=rs6000/xm-sysv4.h
2115 extra_headers=ppc-asm.h
2116 if [[ x$gas = xyes ]]
2118 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2120 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2122 xmake_file=rs6000/x-sysv4
2125 tm_file=rs6000/eabiaix.h
2126 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2127 fixincludes=Makefile.in
2128 extra_headers=ppc-asm.h
2131 tm_file=rs6000/eabisim.h
2132 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2133 fixincludes=Makefile.in
2134 extra_headers=ppc-asm.h
2137 tm_file=rs6000/eabi.h
2138 if [[ x$gas = xyes ]]
2140 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2142 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2144 fixincludes=Makefile.in
2145 extra_headers=ppc-asm.h
2148 tm_file=rs6000/rtems.h
2149 if [[ x$gas = xyes ]]
2151 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2153 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2155 fixincludes=Makefile.in
2156 extra_headers=ppc-asm.h
2158 powerpc-*-linux-gnulibc1)
2159 tm_file=rs6000/linux.h
2160 xm_file=rs6000/xm-sysv4.h
2161 out_file=rs6000/rs6000.c
2162 if [[ x$gas = xyes ]]
2164 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2166 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2169 fixincludes=Makefile.in
2170 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2171 extra_headers=ppc-asm.h
2172 if [[ x$enable_threads = xyes ]]; then
2176 powerpc-*-linux-gnu*)
2177 tm_file=rs6000/linux.h
2178 xm_file=rs6000/xm-sysv4.h
2179 out_file=rs6000/rs6000.c
2180 if [[ x$gas = xyes ]]
2182 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2184 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2187 fixincludes=Makefile.in
2188 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2189 extra_headers=ppc-asm.h
2190 if [[ x$enable_threads = xyes ]]; then
2196 xm_file=rs6000/xm-sysv4.h
2197 tm_file=rs6000/vxppc.h
2198 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2199 extra_headers=ppc-asm.h
2201 powerpcle-*-sysv* | powerpcle-*-elf*)
2202 tm_file=rs6000/sysv4le.h
2203 xm_file=rs6000/xm-sysv4.h
2204 if [[ x$gas = xyes ]]
2206 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2208 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2210 xmake_file=rs6000/x-sysv4
2211 extra_headers=ppc-asm.h
2213 powerpcle-*-eabisim*)
2214 tm_file=rs6000/eabilesim.h
2215 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2216 fixincludes=Makefile.in
2217 extra_headers=ppc-asm.h
2220 tm_file=rs6000/eabile.h
2221 if [[ x$gas = xyes ]]
2223 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2225 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2227 fixincludes=Makefile.in
2228 extra_headers=ppc-asm.h
2230 powerpcle-*-winnt* )
2231 tm_file=rs6000/win-nt.h
2232 tmake_file=rs6000/t-winnt
2234 fixincludes=Makefile.in
2235 if [[ x$enable_threads = xyes ]]; then
2238 extra_headers=ppc-asm.h
2240 powerpcle-*-pe | powerpcle-*-cygwin32)
2241 tm_file=rs6000/cygwin32.h
2242 xm_file=rs6000/xm-cygwin32.h
2243 tmake_file=rs6000/t-winnt
2244 xmake_file=rs6000/x-cygwin32
2246 fixincludes=Makefile.in
2247 if [[ x$enable_threads = xyes ]]; then
2251 extra_headers=ppc-asm.h
2253 powerpcle-*-solaris2*)
2254 tm_file=rs6000/sol2.h
2255 xm_file=rs6000/xm-sysv4.h
2256 if [[ x$gas = xyes ]]
2258 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2260 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2262 xmake_file=rs6000/x-sysv4
2263 fixincludes=fixinc.math
2264 extra_headers=ppc-asm.h
2266 rs6000-ibm-aix3.[[01]]*)
2267 tm_file=rs6000/aix31.h
2268 xmake_file=rs6000/x-aix31
2271 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2272 tm_file=rs6000/aix3newas.h
2273 if [[ x$host != x$target ]]
2275 tmake_file=rs6000/t-xnewas
2277 tmake_file=rs6000/t-newas
2281 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2282 tm_file=rs6000/aix41.h
2283 if [[ x$host != x$target ]]
2285 tmake_file=rs6000/t-xnewas
2287 tmake_file=rs6000/t-newas
2289 xmake_file=rs6000/x-aix31
2299 tm_file=rs6000/mach.h
2300 xm_file=rs6000/xm-mach.h
2301 xmake_file=rs6000/x-mach
2305 tm_file=rs6000/lynx.h
2306 xm_file=rs6000/xm-lynx.h
2307 tmake_file=rs6000/t-rs6000
2308 xmake_file=rs6000/x-lynx
2316 tmake_file="sh/t-sh t-rtems"
2325 xm_file=sparc/xm-pbd.h
2327 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2328 tm_file=sparc/vxsparc.h
2329 tmake_file=sparc/t-vxsparc
2333 tmake_file=sparc/t-sparcbare
2334 tm_file="sparc/aout.h libgloss.h"
2337 tm_file=sparc/netbsd.h
2338 # On NetBSD, the headers are already okay, except for math.h.
2339 fixincludes=fixinc.math
2347 tmake_file=sparc/t-elf
2348 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2352 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2353 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2354 tm_file=sparc/linux-aout.h
2356 fixincludes=Makefile.in #On Linux, the headers are ok already.
2359 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2360 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2362 tm_file=sparc/linux.h
2363 tmake_file="t-linux t-linux-gnulibc1"
2364 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2365 fixincludes=Makefile.in #On Linux, the headers are ok already.
2368 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2369 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2371 tm_file=sparc/linux.h
2372 tmake_file="t-linux"
2373 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2374 fixincludes=Makefile.in #On Linux, the headers are ok already.
2376 if [[ x$enable_threads = xyes ]]; then
2381 if [[ x$gas = xyes ]]
2383 tm_file=sparc/lynx.h
2385 tm_file=sparc/lynx-ng.h
2387 xm_file=sparc/xm-lynx.h
2388 tmake_file=sparc/t-sunos41
2392 tmake_file="sparc/t-sparcbare t-rtems"
2393 tm_file=sparc/rtems.h
2396 if [[ x$gnu_ld = xyes ]]
2398 tm_file=sparc/sol2.h
2400 tm_file=sparc/sol2-sld.h
2402 xm_file=sparc/xm-sol2.h
2403 tmake_file=sparc/t-sol2
2404 xmake_file=sparc/x-sysv4
2405 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2406 fixincludes=fixinc.svr4
2409 if [[ x${enable_threads} = x ]]; then
2410 enable_threads=$have_pthread_h
2411 if [[ x${enable_threads} = x ]]; then
2412 enable_threads=$have_thread_h
2415 if [[ x${enable_threads} = xyes ]]; then
2416 if [[ x${have_pthread_h} = xyes ]]; then
2419 thread_file='solaris'
2424 tm_file=sparc/sunos4.h
2425 tmake_file=sparc/t-sunos40
2429 tm_file=sparc/sunos4.h
2430 tmake_file=sparc/t-sunos41
2432 if [[ x$gas = xyes ]]; then
2433 tm_file="${tm_file} sparc/sun4gas.h"
2437 tm_file=sparc/sun4o3.h
2441 tm_file=sparc/sysv4.h
2442 xm_file=sparc/xm-sysv4.h
2444 xmake_file=sparc/x-sysv4
2445 extra_parts="crtbegin.o crtend.o"
2448 xm_file=sparc/xm-sol2.h
2449 tm_file=sparc/vxsim.h
2450 tmake_file=sparc/t-vxsparc
2451 xmake_file=sparc/x-sysv4
2454 tm_file="sparc/splet.h libgloss.h"
2455 tmake_file=sparc/t-splet
2458 tm_file="sparc/litecoff.h libgloss.h"
2459 tmake_file=sparc/t-sparclite
2462 tm_file="sparc/lite.h aoutos.h libgloss.h"
2463 tmake_file=sparc/t-sparclite
2466 tmake_file=sparc/t-sp64
2467 tm_file=sparc/sp64-aout.h
2470 tmake_file=sparc/t-sp64
2471 tm_file=sparc/sp64-elf.h
2472 extra_parts="crtbegin.o crtend.o"
2474 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2475 tmake_file=sparc/t-sp64
2476 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2477 tm_file=sparc/linux64.h
2479 fixincludes=Makefile.in # The headers are ok already.
2482 # This hasn't been upgraded to GCC 2.
2483 # tahoe-harris-*) # Harris tahoe, using COFF.
2484 # tm_file=tahoe/harris.h
2486 # tahoe-*-bsd*) # tahoe running BSD
2488 thumb-*-coff* | thumbel-*-coff*)
2490 out_file=arm/thumb.c
2491 xm_file=arm/xm-thumb.h
2492 md_file=arm/thumb.md
2493 tmake_file=arm/t-thumb
2495 # This hasn't been upgraded to GCC 2.
2502 tm_file="v850/v850.h"
2503 xm_file="v850/xm-v850.h"
2504 if [[ x$stabs = xyes ]]
2506 tm_file="${tm_file} dbx.h"
2510 vax-*-bsd*) # vaxen running BSD
2514 vax-*-sysv*) # vaxen running system V
2515 tm_file="${tm_file} vax/vaxv.h"
2516 xm_file="${xm_file} vax/xm-vaxv.h"
2520 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2521 # On NetBSD, the headers are already okay, except for math.h.
2522 fixincludes=fixinc.math
2526 vax-*-ultrix*) # vaxen running ultrix
2527 tm_file="${tm_file} vax/ultrix.h"
2531 vax-*-vms*) # vaxen running VMS
2532 xm_file=vax/xm-vms.h
2536 vax-*-*) # vax default entry
2540 xm_file="${xm_file} xm-svr3"
2544 echo "Configuration $machine not supported" 1>&2
2551 ;; # Existing Linux/GNU systems do not use the GNU setup.
2553 # On the GNU system, the setup is just about the same on
2554 # each different CPU. The specific machines that GNU
2555 # supports are matched above and just set $cpu_type.
2556 xm_file=${cpu_type}/xm-gnu.h
2557 tm_file=${cpu_type}/gnu.h
2558 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2559 # GNU always uses ELF.
2561 # GNU tools are the only tools.
2564 # On GNU, the headers are already okay.
2565 fixincludes=Makefile.in
2566 xmake_file=x-linux # These details are the same as Linux.
2567 tmake_file=t-gnu # These are not.
2570 fixincludes=fixinc.svr4
2571 xmake_try_sysv=x-sysv
2572 install_headers_dir=install-headers-cpio
2575 install_headers_dir=install-headers-cpio
2579 # Distinguish i[3456]86
2580 # Also, do not run mips-tfile on MIPS if using gas.
2581 # Process --with-cpu= for PowerPC/rs6000
2582 target_cpu_default2=
2585 target_cpu_default2=1
2588 target_cpu_default2=2
2591 target_cpu_default2=3
2596 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2599 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
2602 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2605 target_cpu_default2="MASK_CPU_EV5"
2609 if [[ x$gas = xyes ]]
2611 if [[ "$target_cpu_default2" = "" ]]
2613 target_cpu_default2="MASK_GAS"
2615 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2620 case "x$with_cpu" in
2623 target_cpu_default2="TARGET_CPU_generic"
2626 # Distinguish cores, and major variants
2627 # arm7m doesn't exist, but D & I don't affect code
2628 xarm[23678] | xarm250 | xarm[67][01]0 \
2629 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2630 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2631 | xstrongarm | xstrongarm110)
2632 target_cpu_default2="TARGET_CPU_$with_cpu"
2636 echo "--with-cpu must be passed a value" 1>&2
2641 if [[ x$pass2done = xyes ]]
2643 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2650 mips*-*-ecoff* | mips*-*-elf*)
2651 if [[ x$gas = xyes ]]
2653 if [[ x$gnu_ld = xyes ]]
2655 target_cpu_default2=20
2657 target_cpu_default2=16
2662 if [[ x$gas = xyes ]]
2664 target_cpu_default2=16
2667 powerpc*-*-* | rs6000-*-*)
2668 case "x$with_cpu" in
2672 xcommon | xpower | xpower2 | xpowerpc | xrios \
2673 | xrios1 | xrios2 | xrsc | xrsc1 \
2674 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2675 | x403 | x505 | x801 | x821 | x823 | x860)
2676 target_cpu_default2="\"$with_cpu\""
2680 echo "--with-cpu must be passed a value" 1>&2
2685 if [[ x$pass2done = xyes ]]
2687 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2694 case ".$with_cpu" in
2696 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2698 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2699 target_cpu_default2="TARGET_CPU_$with_cpu"
2702 if [[ x$pass2done = xyes ]]
2704 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2712 if [[ "$target_cpu_default2" != "" ]]
2714 if [[ "$target_cpu_default" != "" ]]
2716 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2718 target_cpu_default=$target_cpu_default2
2722 # No need for collect2 if we have the GNU linker.
2729 # Save data on machine being used to compile GCC in build_xm_file.
2730 # Save data on host machine in vars host_xm_file and host_xmake_file.
2731 if [[ x$pass1done = x ]]
2733 if [[ x"$xm_file" = x ]]
2734 then build_xm_file=$cpu_type/xm-$cpu_type.h
2735 else build_xm_file=$xm_file
2737 build_install_headers_dir=$install_headers_dir
2738 build_exeext=$exeext
2741 if [[ x$pass2done = x ]]
2743 if [[ x"$xm_file" = x ]]
2744 then host_xm_file=$cpu_type/xm-$cpu_type.h
2745 else host_xm_file=$xm_file
2747 if [[ x"$xmake_file" = x ]]
2748 then xmake_file=$cpu_type/x-$cpu_type
2750 host_xmake_file="$xmake_file"
2751 host_truncate_target=$truncate_target
2752 host_extra_gcc_objs=$extra_gcc_objs
2753 host_extra_objs=$extra_host_objs
2760 extra_objs="${host_extra_objs} ${extra_objs}"
2762 # Default the target-machine variables that were not explicitly set.
2763 if [[ x"$tm_file" = x ]]
2764 then tm_file=$cpu_type/$cpu_type.h; fi
2766 if [[ x$extra_headers = x ]]
2767 then extra_headers=; fi
2769 if [[ x"$xm_file" = x ]]
2770 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2772 if [[ x$md_file = x ]]
2773 then md_file=$cpu_type/$cpu_type.md; fi
2775 if [[ x$out_file = x ]]
2776 then out_file=$cpu_type/$cpu_type.c; fi
2778 if [[ x"$tmake_file" = x ]]
2779 then tmake_file=$cpu_type/t-$cpu_type
2782 if [[ x$float_format = x ]]
2783 then float_format=i64
2786 if [[ x$enable_haifa = x ]]
2789 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-*)
2794 # Say what files are being used for the output code and MD file.
2795 echo "Using \`$srcdir/config/$out_file' to output insns."
2796 echo "Using \`$srcdir/config/$md_file' as machine description file."
2799 for f in $tm_file; do
2802 if [[ $count = ax ]]; then
2803 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2805 echo "Using the following target machine macro files:"
2806 for f in $tm_file; do
2807 echo " $srcdir/config/$f"
2812 for f in $host_xm_file; do
2815 if [[ $count = ax ]]; then
2816 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2818 echo "Using the following host machine macro files:"
2819 for f in $host_xm_file; do
2820 echo " $srcdir/config/$f"
2824 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2826 for f in $build_xm_file; do
2829 if [[ $count = ax ]]; then
2830 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2832 echo "Using the following build machine macro files:"
2833 for f in $build_xm_file; do
2834 echo " $srcdir/config/$f"
2839 if [[ x$thread_file = x ]]; then
2840 if [[ x$target_thread_file != x ]]; then
2841 thread_file=$target_thread_file
2843 thread_file='single'
2847 # Set up the header files.
2848 # $links is the list of header files to create.
2849 # $vars is the list of shell variables with file names to include.
2850 # auto-conf.h is the file containing items generated by autoconf and is
2851 # the first file included by config.h.
2852 host_xm_file="auto-config.h ${host_xm_file}"
2854 # If host=build, it is correct to have hconfig include auto-conf.h
2855 # as well. If host!=build, we are in error and need to do more
2856 # work to find out the build config parameters.
2857 if [[ x$host = x$build ]]
2859 build_xm_file="auto-config.h ${build_xm_file}"
2862 vars="host_xm_file tm_file xm_file build_xm_file"
2863 links="config.h tm.h tconfig.h hconfig.h"
2866 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2869 while [[ -n "$vars" ]]
2871 # set file to car of files, files to cdr of files
2872 set $vars; var=$1; shift; vars=$*
2873 set $links; link=$1; shift; links=$*
2877 # Define TARGET_CPU_DEFAULT if the system wants one.
2878 # This substitutes for lots of *.h files.
2879 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
2881 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
2884 for file in `eval echo '$'$var`; do
2885 echo "#include \"$file\"" >>$link
2889 # Truncate the target if necessary
2890 if [[ x$host_truncate_target != x ]]; then
2891 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2894 # Get the version number from the toplevel
2895 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2897 # Get an absolute path to the GCC top-level source directory
2903 # Conditionalize the makefile for this host machine.
2904 # Make-host contains the concatenation of all host makefile fragments
2905 # [there can be more than one]. This file is built by configure.frag.
2906 host_overrides=Make-host
2907 dep_host_xmake_file=
2908 for f in .. ${host_xmake_file}
2910 if [[ -f ${srcdir}/config/$f ]]
2912 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2916 # Conditionalize the makefile for this target machine.
2917 # Make-target contains the concatenation of all host makefile fragments
2918 # [there can be more than one]. This file is built by configure.frag.
2919 target_overrides=Make-target
2921 for f in .. ${tmake_file}
2923 if [[ -f ${srcdir}/config/$f ]]
2925 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2929 # If the host doesn't support symlinks, modify CC in
2930 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2931 # Otherwise, we can use "CC=$(CC)".
2933 if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
2935 cc_set_by_configure="\$(CC)"
2936 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2938 symbolic_link="cp -p"
2939 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2940 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2944 out_object_file=`basename $out_file .c`.o
2947 for f in $tm_file; do
2948 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2952 for f in $host_xm_file; do
2953 if test $f != "auto-config.h"; then
2954 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2956 host_xm_file_list="${host_xm_file_list} auto-config.h"
2961 for f in $build_xm_file; do
2962 if test $f != "auto-config.h"; then
2963 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2965 build_xm_file_list="${build_xm_file_list} auto-config.h"
2969 # Define macro CROSS_COMPILE in compilation
2970 # if this is a cross-compiler.
2971 # Also use all.cross instead of all.internal
2972 # and add cross-make to Makefile.
2973 cross_overrides="/dev/null"
2974 if [[ x$host != x$target ]]
2976 cross_defines="CROSS=-DCROSS_COMPILE"
2977 cross_overrides="${topdir}/cross-make"
2980 # When building gcc with a cross-compiler, we need to fix a few things.
2981 # This must come after cross-make as we want all.build to override
2983 build_overrides="/dev/null"
2984 if [[ x$build != x$host ]]
2986 build_overrides="${topdir}/build-make"
2989 # Expand extra_headers to include complete path.
2990 # This substitutes for lots of t-* files.
2992 if [[ "x$extra_headers" = x ]]
2995 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2996 for file in $extra_headers;
2998 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
3002 # Add a definition of USE_COLLECT2 if system wants one.
3003 # Also tell toplev.c what to do.
3004 # This substitutes for lots of t-* files.
3005 if [[ x$use_collect2 = x ]]
3010 will_use_collect2="ld"
3011 maybe_use_collect2="-DUSE_COLLECT2"
3015 # Set MD_DEPS if the real md file is in md.pre-cpp.
3016 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
3017 # for line oriented comments, so we must always use a GNU cpp. If
3018 # building gcc with a cross compiler, use the cross compiler just
3019 # built. Otherwise, we can use the cpp just built.
3021 if [[ "x$md_cppflags" = x ]]
3023 md_file_sub=$srcdir/config/$md_file
3028 # If we have gas in the build tree, make a link to it.
3029 if [[ -f ../gas/Makefile ]]; then
3030 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3033 # If we have ld in the build tree, make a link to it.
3034 if [[ -f ../ld/Makefile ]]; then
3035 # if [[ x$use_collect2 = x ]]; then
3036 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3038 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3042 # Figure out what language subdirectories are present.
3044 for lang in ${srcdir}/*/config-lang.in ..
3048 # The odd quoting in the next line works around
3049 # an apparent bug in bash 1.12 on linux.
3050 ${srcdir}/[[*]]/config-lang.in) ;;
3051 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3055 # Make gthr-default.h if we have a thread file.
3057 if [[ $thread_file != single ]]; then
3058 rm -f gthr-default.h
3059 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3060 gthread_flags=-DHAVE_GTHR_DEFAULT
3062 AC_SUBST(gthread_flags)
3064 # Make empty files to contain the specs and options for each language.
3065 # Then add #include lines to for a compiler that has specs and/or options.
3069 rm -f specs.h options.h
3070 touch specs.h options.h
3071 for subdir in . $subdirs
3073 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3074 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3075 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3077 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3078 echo "#include \"$subdir/lang-options.h\"" >>options.h
3079 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3083 # These (without "all_") are set in each config-lang.in.
3084 # `language' must be a single word so is spelled singularly.
3090 all_outputs=Makefile
3091 # List of language makefile fragments.
3096 # Add the language fragments.
3097 # Languages are added via two mechanisms. Some information must be
3098 # recorded in makefile variables, these are defined in config-lang.in.
3099 # We accumulate them and plug them into the main Makefile.
3100 # The other mechanism is a set of hooks for each of the main targets
3101 # like `clean', `install', etc.
3103 language_fragments="Make-lang"
3104 language_hooks="Make-hooks"
3107 for s in .. $subdirs
3119 . ${srcdir}/$s/config-lang.in
3120 if [[ "x$language" = x ]]
3122 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3125 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3126 all_languages="$all_languages $language"
3127 if [[ "x$boot_language" = xyes ]]
3129 all_boot_languages="$all_boot_languages $language"
3131 all_compilers="$all_compilers $compilers"
3132 all_stagestuff="$all_stagestuff $stagestuff"
3133 all_diff_excludes="$all_diff_excludes $diff_excludes"
3134 all_headers="$all_headers $headers"
3135 all_outputs="$all_outputs $outputs"
3136 if [[ x$outputs = x ]]
3138 oldstyle_subdirs="$oldstyle_subdirs $s"
3140 all_lib2funcs="$all_lib2funcs $lib2funcs"
3144 # Since we can't use `::' targets, we link each language in
3145 # with a set of hooks, reached indirectly via lang.${target}.
3149 target_list="all.build all.cross start.encap rest.encap \
3151 install-normal install-common install-info install-man \
3153 mostlyclean clean distclean extraclean maintainer-clean \
3154 stage1 stage2 stage3 stage4"
3155 for t in $target_list
3158 for l in .. $all_languages
3160 if [[ $l != ".." ]]; then
3164 echo "lang.$t: $x" >> Make-hooks
3167 # If we're not building in srcdir, create .gdbinit.
3169 if [[ ! -f Makefile.in ]]; then
3170 echo "dir ." > .gdbinit
3171 echo "dir ${srcdir}" >> .gdbinit
3172 if [[ x$gdb_needs_out_file_path = xyes ]]
3174 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3176 if [[ "x$subdirs" != x ]]; then
3179 echo "dir ${srcdir}/$s" >> .gdbinit
3182 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3185 # If this is using newlib, then define inhibit_libc in
3186 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3187 # libgcc.a, but that's OK because newib should have its own version of
3190 if [[ x$with_newlib = xyes ]]; then
3191 inhibit_libc=-Dinhibit_libc
3193 AC_SUBST(inhibit_libc)
3195 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3198 if [[ x$enable_haifa = xyes ]]; then
3199 echo "Using the Haifa scheduler."
3201 sched_cflags=-DHAIFA
3203 AC_SUBST(sched_prefix)
3204 AC_SUBST(sched_cflags)
3205 if [[ x$enable_haifa != x ]]; then
3206 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3207 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3208 if [[ -f $x ]]; then
3215 # Process the language and host/target makefile fragments.
3216 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3218 # Substitute configuration variables
3220 AC_SUBST(all_languages)
3221 AC_SUBST(all_boot_languages)
3222 AC_SUBST(all_compilers)
3223 AC_SUBST(all_lang_makefiles)
3224 AC_SUBST(all_stagestuff)
3225 AC_SUBST(all_diff_excludes)
3226 AC_SUBST(all_lib2funcs)
3227 AC_SUBST(all_headers)
3228 AC_SUBST(extra_passes)
3229 AC_SUBST(extra_programs)
3230 AC_SUBST(extra_parts)
3231 AC_SUBST(extra_c_objs)
3232 AC_SUBST(extra_c_flags)
3233 AC_SUBST(extra_objs)
3234 AC_SUBST(host_extra_gcc_objs)
3235 AC_SUBST(extra_headers_list)
3236 AC_SUBST(dep_host_xmake_file)
3237 AC_SUBST(dep_tmake_file)
3239 AC_SUBST(out_object_file)
3241 AC_SUBST(tm_file_list)
3242 AC_SUBST(build_xm_file_list)
3243 AC_SUBST(host_xm_file_list)
3244 AC_SUBST(lang_specs_files)
3245 AC_SUBST(lang_options_files)
3246 AC_SUBST(thread_file)
3248 AC_SUBST(local_prefix)
3249 AC_SUBST(gxx_include_dir)
3250 AC_SUBST(fixincludes)
3251 AC_SUBST(build_install_headers_dir)
3252 AC_SUBST(build_exeext)
3253 AC_SUBST(host_exeext)
3254 AC_SUBST(float_format)
3255 AC_SUBST(will_use_collect2)
3256 AC_SUBST(maybe_use_collect2)
3257 AC_SUBST(cc_set_by_configure)
3258 AC_SUBST(stage_prefix_set_by_configure)
3260 AC_SUBST(symbolic_link)
3262 AC_SUBST_FILE(target_overrides)
3263 AC_SUBST_FILE(host_overrides)
3264 AC_SUBST(cross_defines)
3265 AC_SUBST_FILE(cross_overrides)
3266 AC_SUBST_FILE(build_overrides)
3267 AC_SUBST_FILE(language_fragments)
3268 AC_SUBST_FILE(language_hooks)
3270 # Echo that links are built
3271 if [[ x$host = x$target ]]
3279 if [[ x$host != x$build ]]
3281 str3=" on a $build system"
3284 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3289 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3291 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3293 echo " ${str2}${str3}." 1>&2
3296 # Configure the subdirectories
3297 # AC_CONFIG_SUBDIRS($subdirs)
3299 # Create the Makefile
3300 # and configure language subdirectories
3301 AC_OUTPUT($all_outputs,
3303 . $srcdir/configure.lang
3304 case x$CONFIG_HEADERS in
3305 xauto-config.h:config.in)
3308 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3309 # bootstrapping and the installation procedure can still use
3310 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3311 # FLAGS_TO_PASS has been modified to solve the problem there.
3312 # This is virtually a duplicate of what happens in configure.lang; we do
3313 # an extra check to make sure this only happens if ln -s can be used.
3314 if [[ "$symbolic_link" = "ln -s" ]]; then
3315 for d in .. ${subdirs} ; do
3316 if [[ $d != .. ]]; then
3319 for t in stage1 stage2 stage3 stage4 include
3322 $symbolic_link ../$t $t 2>/dev/null
3333 target_alias='${target_alias}'
3335 subdirs='${subdirs}'
3336 oldstyle_subdirs='${oldstyle_subdirs}'
3337 symbolic_link='${symbolic_link}'
3338 program_transform_set='${program_transform_set}'
3339 program_transform_name='${program_transform_name}'
3340 dep_host_xmake_file='${dep_host_xmake_file}'
3341 host_xmake_file='${host_xmake_file}'
3342 dep_tmake_file='${dep_tmake_file}'
3343 tmake_file='${tmake_file}'
3344 thread_file='${thread_file}'
3345 version='${version}'
3346 local_prefix='${local_prefix}'
3347 build_install_headers_dir='${build_install_headers_dir}'
3348 build_exeext='${build_exeext}'
3349 host_exeext='${host_exeext}'
3350 out_file='${out_file}'
3351 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3352 SET_MAKE='${SET_MAKE}'
3353 target_list='${target_list}'
3354 target_overrides='${target_overrides}'
3355 host_overrides='${host_overrides}'
3356 cross_defines='${cross_defines}'
3357 cross_overrides='${cross_overrides}'
3358 build_overrides='${build_overrides}'