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-host.h:config.in)
32 # Check for additional parameters
36 [ --with-gnu-ld arrange to work with GNU ld.],
37 gnu_ld_flag="$with_gnu_ld",
42 [ --with-gnu-as arrange to work with GNU as.],
43 gas_flag="$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 if test x${enable_version_specific_runtime_libs} = xyes; then
75 gxx_include_dir='${libsubdir}/include/g++'
76 else gxx_include_dir='${prefix}/include/g++'; fi)
78 # Enable expensive internal checks
79 AC_ARG_ENABLE(checking,
80 [ --enable-checking enable expensive run-time checks.],
81 AC_DEFINE(ENABLE_CHECKING)
84 # Enable use of cpplib for C.
86 AC_ARG_ENABLE(c-cpplib,
87 [ --enable-c-cpplib Use cpplib for C and C++.],
88 if [[[ x$enable_c_cpplib != xno ]]]; then
89 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
90 extra_c_objs="${extra_c_objs} prefix.o"
91 extra_cxx_objs="${extra_cxx_objs} ../cpplib.o ../cppexp.o ../cpphash.o ../cpperror.o ../prefix.o"
92 extra_c_flags=-DUSE_CPPLIB=1
96 # Enable Multibyte Characters for C/C++
97 AC_ARG_ENABLE(c-mbchar,
98 [ --enable-c-mbchar Enable multibyte characters for C and C++.],
99 if [[[ x$enable_c_mbchar != xno ]]]; then
100 extra_c_flags=-DMULTIBYTE_CHARS=1
103 # Enable Haifa scheduler.
105 [ --enable-haifa Use the experimental scheduler.
106 --disable-haifa Don't use the experimental scheduler for the
107 targets which normally enable it.])
110 # This is a work in progress...
111 AC_ARG_WITH(fast-fixincludes,
112 [ --with-fast-fixincludes Use a faster fixinclude program. Experimental],
113 fast_fixinc="$with_fast_fixincludes",
117 # Pass with no value to take the default
118 # Pass with a value to specify a thread package
119 AC_ARG_ENABLE(threads,
120 [ --enable-threads enable thread usage for target GCC.
121 --enable-threads=LIB use LIB thread package for target GCC.],
122 if [[[ x$enable_threads = xno ]]]; then
127 enable_threads_flag=$enable_threads
128 # Check if a valid thread package
129 case x${enable_threads_flag} in
132 target_thread_file='single'
136 target_thread_file=''
138 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
139 xsolaris | xwin32 | xdce | xvxworks)
140 target_thread_file=$enable_threads_flag
143 echo "$enable_threads is an unknown thread package" 1>&2
148 # Determine the host, build, and target systems
151 # Find the native compiler
155 # Find some useful tools
167 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h)
169 # Check for thread headers.
170 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
171 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
173 # See if the system preprocessor understands the ANSI C preprocessor
174 # stringification operator.
175 AC_MSG_CHECKING(whether cpp understands the stringify operator)
176 AC_CACHE_VAL(gcc_cv_c_have_stringify,
179 char *test = S(foo);],
180 gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
181 AC_MSG_RESULT($gcc_cv_c_have_stringify)
182 if test $gcc_cv_c_have_stringify = yes; then
183 AC_DEFINE(HAVE_CPP_STRINGIFY)
186 # Use <inttypes.h> only if it exists,
187 # doesn't clash with <sys/types.h>, and declares intmax_t.
188 AC_MSG_CHECKING(for inttypes.h)
189 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
191 [#include <sys/types.h>
192 #include <inttypes.h>],
194 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
195 gcc_cv_header_inttypes_h=yes],
196 gcc_cv_header_inttypes_h=no)])
197 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
199 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
200 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
201 sysconf isascii gettimeofday)
203 # Make sure wchar_t is available
204 #AC_CHECK_TYPE(wchar_t, unsigned int)
206 GCC_FUNC_VFPRINTF_DOPRNT
209 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
210 index rindex getenv atol sbrk abort atof strerror getcwd getwd)
212 GCC_NEED_DECLARATIONS(getrlimit setrlimit, [
213 #include <sys/types.h>
214 #ifdef HAVE_SYS_RESOURCE_H
215 #include <sys/resource.h>
229 build_install_headers_dir=install-headers-tar
234 host_truncate_target=
237 # Decode the host machine, then the target machine.
238 # For the host machine, we save the xm_file variable as host_xm_file;
239 # then we decode the target machine and forget everything else
240 # that came from the host machine.
241 for machine in $build $host $target; do
255 # Set this to force installation and use of collect2.
257 # Set this to override the default target model.
259 # Set this to control which fixincludes program to use.
260 if [[ x$fast_fixinc != xyes ]] ; then
261 fixincludes=fixincludes
262 else fixincludes=fixinc.sh ; fi
263 # Set this to control how the header file directory is installed.
264 install_headers_dir=install-headers-tar
265 # Set this to a non-empty list of args to pass to cpp if the target
266 # wants its .md file passed through cpp.
268 # Set this if directory names should be truncated to 14 characters.
270 # Set this if gdb needs a dir command with `dirname $out_file`
271 gdb_needs_out_file_path=
272 # Set this if the build machine requires executables to have a
275 # Set this to control which thread package will be used.
277 # Reinitialize these from the flag values every loop pass, since some
278 # configure entries modify them.
280 gnu_ld="$gnu_ld_flag"
281 enable_threads=$enable_threads_flag
283 # Set default cpu_type, tm_file and xm_file so it can be updated in
284 # each machine entry.
285 cpu_type=`echo $machine | sed 's/-.*$//'`
319 tm_file=${cpu_type}/${cpu_type}.h
320 xm_file=${cpu_type}/xm-${cpu_type}.h
322 # Set the default macros to define for GNU/Linux systems.
325 xm_defines="HAVE_ATEXIT POSIX BSTRING"
330 # Support site-specific machine types.
332 cpu_type=`echo $machine | sed -e 's/-.*//'`
333 rest=`echo $machine | sed -e "s/$cpu_type-//"`
334 xm_file=${cpu_type}/xm-$rest.h
335 tm_file=${cpu_type}/$rest.h
336 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
337 then xmake_file=${cpu_type}/x-$rest; \
340 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
341 then tmake_file=${cpu_type}/t-$rest; \
347 a29k-*-bsd* | a29k-*-sym1*)
348 tm_file="${tm_file} a29k/unix.h"
350 xmake_file=a29k/x-unix
353 a29k-*-udi | a29k-*-coff)
354 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
355 tmake_file=a29k/t-a29kbare
358 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
359 tmake_file=a29k/t-vx29k
360 extra_parts="crtbegin.o crtend.o"
361 thread_file='vxworks'
363 a29k-*-*) # Default a29k environment.
366 alpha*-*-linux-gnuecoff*)
367 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
368 target_cpu_default="MASK_GAS"
373 alpha*-*-linux-gnulibc1*)
374 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
375 target_cpu_default="MASK_GAS"
376 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
377 extra_parts="crtbegin.o crtend.o"
378 fixincludes=fixinc.wrap
381 if [[ x$enable_threads = xyes ]]; then
386 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
387 target_cpu_default="MASK_GAS"
388 tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
389 extra_parts="crtbegin.o crtend.o"
391 fixincludes=Makefile.in
393 if [[ x$enable_threads = xyes ]]; then
398 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
399 target_cpu_default="MASK_GAS"
400 tmake_file="alpha/t-crtbe"
401 extra_parts="crtbegin.o crtend.o"
403 fixincludes=fixinc.wrap
408 if [[ x$stabs = xyes ]]
410 tm_file="${tm_file} dbx.h"
412 if [[ x$gas != xyes ]]
414 extra_passes="mips-tfile mips-tdump"
419 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
422 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
425 tm_file="${tm_file} alpha/osf.h"
426 # Some versions of OSF4 (specifically X4.0-9 296.7) have
427 # a broken tar, so we use cpio instead.
428 install_headers_dir=install-headers-cpio
432 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
433 target_cpu_default=MASK_SUPPORT_ARCH
438 tm_file="${tm_file} dbx.h alpha/vxworks.h"
441 extra_passes="mips-tfile mips-tdump"
446 tm_file="${tm_file} alpha/win-nt.h"
447 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
449 xmake_file=winnt/x-winnt
450 extra_host_objs=oldnames.o
451 extra_gcc_objs="spawnv.o oldnames.o"
452 fixincludes=fixinc.winnt
453 if [[ x$gnu_ld != xyes ]]
455 extra_programs=ld.exe
457 if [[ x$enable_threads = xyes ]]; then
463 xm_file="${xm_file} alpha/xm-vms.h"
464 tmake_file=alpha/t-vms
465 fixincludes=Makefile.in
468 extra_parts="crtinit.o crtfini.o"
470 arm-*-coff* | armel-*-coff*)
472 tmake_file=arm/t-bare
474 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
475 tm_file=arm/riscix1-1.h
478 arm-*-riscix*) # Acorn RISC machine
479 if [[ x$gas = xyes ]]
481 tm_file=arm/rix-gas.h
485 xmake_file=arm/x-riscix
486 tmake_file=arm/t-riscix
489 arm-semi-aout | armel-semi-aout)
491 tmake_file=arm/t-semi
492 fixincludes=Makefile.in # There is nothing to fix
494 arm-semi-aof | armel-semi-aof)
495 tm_file=arm/semiaof.h
496 tmake_file=arm/t-semiaof
497 fixincludes=Makefile.in # There is nothing to fix
501 xm_file="xm-siglist.h ${xm_file}"
502 tmake_file="t-netbsd arm/t-netbsd"
503 # On NetBSD, the headers are already okay, except for math.h.
504 fixincludes=fixinc.wrap
506 arm-*-linux-gnuaout*) # ARM GNU/Linux
509 tm_file=arm/linux-gas.h
510 tmake_file=arm/t-linux
511 fixincludes=Makefile.in
516 tmake_file=arm/t-bare
518 c1-convex-*) # Convex C1
521 fixincludes=Makefile.in
523 c2-convex-*) # Convex C2
526 fixincludes=Makefile.in
531 fixincludes=Makefile.in
536 fixincludes=Makefile.in
539 target_cpu_default=16
541 fixincludes=Makefile.in
543 clipper-intergraph-clix*)
544 tm_file="${tm_file} svr3.h clipper/clix.h"
545 xm_file=clipper/xm-clix.h
546 xmake_file=clipper/x-clix
547 extra_headers=va-clipper.h
548 extra_parts="crtbegin.o crtend.o"
549 install_headers_dir=install-headers-cpio
556 # This hasn't been upgraded to GCC 2.
557 # fx80-alliant-*) # Alliant FX/80
563 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
564 xm_file=pa/xm-papro.h
569 tm_file="${tm_file} pa/pa-osf.h"
571 fixincludes=Makefile.in
574 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
575 xm_file=pa/xm-papro.h
579 tm_file="${tm_file} pa/pa-osf.h"
581 fixincludes=Makefile.in
586 fixincludes=Makefile.in
590 fixincludes=Makefile.in
593 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
594 xm_file=pa/xm-pahpux.h
595 xmake_file=pa/x-pa-hpux
596 if [[ x$gas = xyes ]]
598 tm_file="${tm_file} pa/gas.h"
600 install_headers_dir=install-headers-cpio
603 hppa1.0-*-hpux8.0[[0-2]]*)
604 tm_file="${tm_file} pa/pa-hpux.h"
605 xm_file=pa/xm-pahpux.h
606 xmake_file=pa/x-pa-hpux
607 if [[ x$gas = xyes ]]
609 tm_file="${tm_file} pa/pa-gas.h"
611 tm_file="pa/pa-oldas.h ${tm_file}"
613 install_headers_dir=install-headers-cpio
616 hppa1.1-*-hpux8.0[[0-2]]*)
618 tm_file="${tm_file} pa/pa-hpux.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 tm_file="pa/pa-oldas.h ${tm_file}"
627 install_headers_dir=install-headers-cpio
632 tm_file="${tm_file} pa/pa-hpux.h"
633 xm_file=pa/xm-pahpux.h
634 xmake_file=pa/x-pa-hpux
635 if [[ x$gas = xyes ]]
637 tm_file="${tm_file} pa/pa-gas.h"
639 install_headers_dir=install-headers-cpio
643 tm_file="${tm_file} pa/pa-hpux.h"
644 xm_file=pa/xm-pahpux.h
645 xmake_file=pa/x-pa-hpux
646 if [[ x$gas = xyes ]]
648 tm_file="${tm_file} pa/pa-gas.h"
650 install_headers_dir=install-headers-cpio
655 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
656 xm_file=pa/xm-pahpux.h
657 xmake_file=pa/x-pa-hpux
659 if [[ x$gas = xyes ]]
661 tm_file="${tm_file} pa/pa-gas.h"
663 if [[ x$enable_threads = x ]]; then
664 enable_threads=$have_pthread_h
666 if [[ x$enable_threads = xyes ]]; then
668 tmake_file="${tmake_file} pa/t-dce-thr"
670 install_headers_dir=install-headers-cpio
674 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
675 xm_file=pa/xm-pahpux.h
676 xmake_file=pa/x-pa-hpux
677 if [[ x$gas = xyes ]]
679 tm_file="${tm_file} pa/pa-gas.h"
681 if [[ x$enable_threads = x ]]; then
682 enable_threads=$have_pthread_h
684 if [[ x$enable_threads = xyes ]]; then
686 tmake_file="${tmake_file} pa/t-dce-thr"
688 install_headers_dir=install-headers-cpio
693 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
694 xm_file=pa/xm-pahpux.h
695 xmake_file=pa/x-pa-hpux
696 if [[ x$gas = xyes ]]
698 tm_file="${tm_file} pa/pa-gas.h"
700 install_headers_dir=install-headers-cpio
704 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
705 xm_file=pa/xm-pahpux.h
706 xmake_file=pa/x-pa-hpux
707 if [[ x$gas = xyes ]]
709 tm_file="${tm_file} pa/pa-gas.h"
711 install_headers_dir=install-headers-cpio
716 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
717 xm_file=pa/xm-pahpux.h
718 xmake_file=pa/x-pa-hpux
719 if [[ x$gas = xyes ]]
721 tm_file="${tm_file} pa/pa-gas.h"
723 install_headers_dir=install-headers-cpio
727 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
728 xm_file=pa/xm-pahpux.h
729 xmake_file=pa/x-pa-hpux
730 if [[ x$gas = xyes ]]
732 tm_file="${tm_file} pa/pa-gas.h"
734 install_headers_dir=install-headers-cpio
740 fixincludes=Makefile.in
744 i[[34567]]86-ibm-aix*) # IBM PS/2 running AIX
745 if [[ x$gas = xyes ]]
747 tm_file=i386/aix386.h
748 extra_parts="crtbegin.o crtend.o"
749 tmake_file=i386/t-crtstuff
751 tm_file=i386/aix386ng.h
754 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
756 xmake_file=i386/x-aix
758 i[[34567]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
759 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
760 xm_defines="USG POSIX SMALL_ARG_MAX"
761 xmake_file=i386/x-ncr3000
762 if [[ x$stabs = xyes -a x$gas = xyes ]]
764 tm_file=i386/sysv4gdb.h
768 extra_parts="crtbegin.o crtend.o"
769 tmake_file=i386/t-crtpic
773 xm_file=i386/xm-next.h
774 tmake_file=i386/t-next
775 xmake_file=i386/x-next
776 extra_objs=nextstep.o
777 if [[ x$enable_threads = xyes ]]; then
781 i[[34567]]86-sequent-bsd*) # 80386 from Sequent
783 if [[ x$gas = xyes ]]
785 tm_file=i386/seq-gas.h
787 tm_file=i386/sequent.h
790 i[[34567]]86-sequent-ptx1*)
791 xm_defines="USG SVR3"
792 xmake_file=i386/x-sysv3
793 tm_file=i386/seq-sysv3.h
794 tmake_file=i386/t-crtstuff
795 fixincludes=fixinc.ptx
796 extra_parts="crtbegin.o crtend.o"
797 install_headers_dir=install-headers-cpio
799 i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
800 xm_defines="USG SVR3"
801 xmake_file=i386/x-sysv3
802 tm_file=i386/seq2-sysv3.h
803 tmake_file=i386/t-crtstuff
804 extra_parts="crtbegin.o crtend.o"
805 fixincludes=fixinc.ptx
806 install_headers_dir=install-headers-cpio
808 i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
809 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
810 xm_defines="USG POSIX SMALL_ARG_MAX"
812 tm_file=i386/ptx4-i.h
814 extra_parts="crtbegin.o crtend.o"
815 fixincludes=fixinc.ptx
816 install_headers_dir=install-headers-cpio
818 i386-sun-sunos*) # Sun i386 roadrunner
823 i[[34567]]86-wrs-vxworks*)
824 tm_file=i386/vxi386.h
825 tmake_file=i386/t-i386bare
827 i[[34567]]86-*-aout*)
828 tm_file=i386/i386-aout.h
829 tmake_file=i386/t-i386bare
831 i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
832 tm_file=i386/bsd386.h
833 # tmake_file=t-libc-ok
836 tm_file=i386/386bsd.h
837 # tmake_file=t-libc-ok
838 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
841 i[[34567]]86-*-freebsdelf*)
842 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
843 # On FreeBSD, the headers are already ok, except for math.h.
844 fixincludes=fixinc.wrap
845 tmake_file=i386/t-freebsd
850 i[[34567]]86-*-freebsd*)
851 tm_file=i386/freebsd.h
852 # On FreeBSD, the headers are already ok, except for math.h.
853 fixincludes=fixinc.wrap
854 tmake_file=i386/t-freebsd
856 i[[34567]]86-*-netbsd*)
857 tm_file=i386/netbsd.h
858 # On NetBSD, the headers are already okay, except for math.h.
859 fixincludes=fixinc.wrap
862 i[[34567]]86-*-coff*)
863 tm_file=i386/i386-coff.h
864 tmake_file=i386/t-i386bare
866 i[[34567]]86-*-isc*) # 80386 running ISC system
867 xm_file="${xm_file} i386/xm-isc.h"
868 xm_defines="USG SVR3"
870 i[[34567]]86-*-isc[[34]]*)
871 xmake_file=i386/x-isc3
874 xmake_file=i386/x-isc
877 if [[ x$gas = xyes -a x$stabs = xyes ]]
879 tm_file=i386/iscdbx.h
880 tmake_file=i386/t-svr3dbx
881 extra_parts="svr3.ifile svr3z.ifile"
883 tm_file=i386/isccoff.h
884 tmake_file=i386/t-crtstuff
885 extra_parts="crtbegin.o crtend.o"
887 install_headers_dir=install-headers-cpio
889 i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
890 # with a.out format using
892 xmake_file=x-linux-aout
893 tmake_file="t-linux-aout i386/t-crtstuff"
894 tm_file=i386/linux-oldld.h
895 fixincludes=Makefile.in #On Linux, the headers are ok already.
899 i[[34567]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
901 xmake_file=x-linux-aout
902 tmake_file="t-linux-aout i386/t-crtstuff"
903 tm_file=i386/linux-aout.h
904 fixincludes=Makefile.in #On Linux, the headers are ok already.
908 i[[34567]]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
909 # with ELF format using the
910 # GNU/Linux C library 5
913 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
914 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
915 fixincludes=Makefile.in #On Linux, the headers are ok already.
918 if [[ x$enable_threads = xyes ]]; then
922 i[[34567]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
923 # with ELF format using glibc 2
924 # aka GNU/Linux C library 6
927 tmake_file="t-linux i386/t-crtstuff"
928 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
929 fixincludes=Makefile.in #On Linux, the headers are ok already.
932 if [[ x$enable_threads = xyes ]]; then
938 i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
939 xm_file=i386/xm-go32.h
941 tmake_file=i386/t-go32
943 i[[34567]]86-pc-msdosdjgpp*)
944 xm_file=i386/xm-go32.h
946 tmake_file=i386/t-go32
950 i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
953 fixincludes=Makefile.in
957 i[[34567]]86-*-lynxos*)
958 if [[ x$gas = xyes ]]
962 tm_file=i386/lynx-ng.h
964 xm_file=i386/xm-lynx.h
965 tmake_file=i386/t-i386bare
968 i[[34567]]86-*-mach*)
970 # tmake_file=t-libc-ok
973 i[[34567]]86-*-osfrose*) # 386 using OSF/rose
974 if [[ x$elf = xyes ]]
976 tm_file=i386/osfelf.h
979 tm_file=i386/osfrose.h
982 xm_file="i386/xm-osf.h ${xm_file}"
983 xmake_file=i386/x-osfrose
984 tmake_file=i386/t-osf
987 i[[34567]]86-go32-rtems*)
989 xm_file=i386/xm-go32.h
990 tm_file=i386/go32-rtems.h
991 tmake_file="i386/t-go32 t-rtems"
993 i[[34567]]86-*-rtemself*)
995 tm_file=i386/rtemself.h
996 tmake_file="i386/t-i386bare t-rtems"
998 i[[34567]]86-*-rtems*)
1000 tm_file=i386/rtems.h
1001 tmake_file="i386/t-i386bare t-rtems"
1003 i[[34567]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1004 xm_file="xm-siglist.h xm-alloca.h ${xm_file} i386/xm-sco5.h"
1005 xm_defines="USG SVR3"
1006 xmake_file=i386/x-sco5
1007 fixincludes=fixinc.sco
1008 install_headers_dir=install-headers-cpio
1010 if [[ x$gas = xyes ]]
1012 tm_file="i386/sco5gas.h ${tm_file}"
1013 tmake_file=i386/t-sco5gas
1015 tmake_file=i386/t-sco5
1017 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
1019 i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
1020 xm_file="${xm_file} i386/xm-sco.h"
1021 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX NO_SYS_SIGLIST"
1022 xmake_file=i386/x-sco4
1023 fixincludes=fixinc.sco
1024 install_headers_dir=install-headers-cpio
1025 if [[ x$stabs = xyes ]]
1027 tm_file=i386/sco4dbx.h
1028 tmake_file=i386/t-svr3dbx
1029 extra_parts="svr3.ifile svr3z.rfile"
1032 tmake_file=i386/t-crtstuff
1033 extra_parts="crtbegin.o crtend.o"
1037 i[[34567]]86-*-sco*) # 80386 running SCO system
1038 xm_file=i386/xm-sco.h
1039 xmake_file=i386/x-sco
1040 install_headers_dir=install-headers-cpio
1041 if [[ x$stabs = xyes ]]
1043 tm_file=i386/scodbx.h
1044 tmake_file=i386/t-svr3dbx
1045 extra_parts="svr3.ifile svr3z.rfile"
1048 extra_parts="crtbegin.o crtend.o"
1049 tmake_file=i386/t-crtstuff
1053 i[[34567]]86-*-solaris2*)
1054 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1055 xm_defines="USG POSIX SMALL_ARG_MAX"
1056 if [[ x$stabs = xyes ]]
1058 tm_file=i386/sol2dbg.h
1062 tmake_file=i386/t-sol2
1063 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1066 *-*-solaris2.[[0-4]])
1067 fixincludes=fixinc.svr4;;
1069 fixincludes=fixinc.wrap;;
1071 if [[ x$enable_threads = xyes ]]; then
1072 thread_file='solaris'
1075 i[[34567]]86-*-sysv5*) # Intel x86 on System V Release 5
1076 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1077 xm_defines="USG POSIX"
1078 tm_file=i386/sysv4.h
1079 if [[ x$stabs = xyes ]]
1081 tm_file="${tm_file} dbx.h"
1083 tmake_file=i386/t-crtpic
1085 extra_parts="crtbegin.o crtend.o"
1086 fixincludes=Makefile.in # The headers are just fine, thank you.
1088 i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
1089 xm_file="xm-siglist.h xm-alloca.h ${xm_file}"
1090 xm_defines="USG POSIX SMALL_ARG_MAX"
1091 tm_file=i386/sysv4.h
1092 if [[ x$stabs = xyes ]]
1094 tm_file="${tm_file} dbx.h"
1096 tmake_file=i386/t-crtpic
1098 extra_parts="crtbegin.o crtend.o"
1100 i[[34567]]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1102 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1103 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1104 fixincludes=Makefile.in #Don't do it on OSF/1
1105 if [[ x$stabs = xyes ]]
1107 tm_file=i386/osf1elfgdb.h
1109 tm_file=i386/osf1elf.h
1111 tmake_file=i386/t-osf1elf
1112 xmake_file=i386/x-osf1elf
1113 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1115 i[[34567]]86-*-sysv*) # Intel 80386's running system V
1116 xm_defines="USG SVR3"
1117 xmake_file=i386/x-sysv3
1118 if [[ x$gas = xyes ]]
1120 if [[ x$stabs = xyes ]]
1122 tm_file=i386/svr3dbx.h
1123 tmake_file=i386/t-svr3dbx
1124 extra_parts="svr3.ifile svr3z.rfile"
1126 tm_file=i386/svr3gas.h
1127 extra_parts="crtbegin.o crtend.o"
1128 tmake_file=i386/t-crtstuff
1131 tm_file=i386/sysv3.h
1132 extra_parts="crtbegin.o crtend.o"
1133 tmake_file=i386/t-crtstuff
1136 i386-*-vsta) # Intel 80386's running VSTa kernel
1137 xm_file="${xm_file} i386/xm-vsta.h"
1139 tmake_file=i386/t-vsta
1140 xmake_file=i386/x-vsta
1142 i[[34567]]86-*-win32)
1143 xm_file="${xm_file} i386/xm-cygwin32.h"
1144 tmake_file=i386/t-cygwin32
1145 tm_file=i386/win32.h
1146 xmake_file=i386/x-cygwin32
1148 fixincludes=Makefile.in
1149 if [[ x$enable_threads = xyes ]]; then
1154 i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
1155 xm_file="${xm_file} i386/xm-cygwin32.h"
1156 tmake_file=i386/t-cygwin32
1157 tm_file=i386/cygwin32.h
1158 xmake_file=i386/x-cygwin32
1160 fixincludes=Makefile.in
1161 if [[ x$enable_threads = xyes ]]; then
1166 i[[34567]]86-*-mingw32*)
1167 tm_file=i386/mingw32.h
1168 xm_file="${xm_file} i386/xm-mingw32.h"
1169 tmake_file="i386/t-cygwin32 i386/t-mingw32"
1171 xmake_file=i386/x-cygwin32
1172 fixincludes=Makefile.in
1173 if [[ x$enable_threads = xyes ]]; then
1180 *minwg32crt* | *mingw32*)
1181 tm_file="${tm_file} i386/crtdll.h"
1185 i[[34567]]86-*-winnt3*)
1186 tm_file=i386/win-nt.h
1187 out_file=i386/i386.c
1188 xm_file="xm-winnt.h ${xm_file}"
1189 xmake_file=winnt/x-winnt
1190 tmake_file=i386/t-winnt
1191 extra_host_objs="winnt.o oldnames.o"
1192 extra_gcc_objs="spawnv.o oldnames.o"
1193 fixincludes=fixinc.winnt
1194 if [[ x$gnu_ld != xyes ]]
1196 extra_programs=ld.exe
1198 if [[ x$enable_threads = xyes ]]; then
1202 i[[34567]]86-dg-dgux*)
1203 xm_file="xm-alloca.h xm-siglist.h ${xm_file}"
1204 xm_defines="USG POSIX"
1205 out_file=i386/dgux.c
1207 tmake_file=i386/t-dgux
1208 xmake_file=i386/x-dgux
1209 fixincludes=fixinc.dgux
1210 install_headers_dir=install-headers-cpio
1212 i860-alliant-*) # Alliant FX/2800
1213 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1214 xm_file="${xm_file}"
1215 xmake_file=i860/x-fx2800
1216 tmake_file=i860/t-fx2800
1217 extra_parts="crtbegin.o crtend.o"
1220 tm_file="${tm_file} i860/bsd.h"
1221 if [[ x$gas = xyes ]]
1223 tm_file="${tm_file} i860/bsd-gas.h"
1228 tm_file="${tm_file} i860/mach.h"
1229 tmake_file=t-libc-ok
1231 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1232 tm_file="${tm_file} svr3.h i860/paragon.h"
1233 xm_defines="USG SVR3"
1237 tm_file="${tm_file} svr3.h i860/sysv3.h"
1238 xm_defines="USG SVR3"
1239 xmake_file=i860/x-sysv3
1240 extra_parts="crtbegin.o crtend.o"
1243 tm_file="${tm_file} svr4.h i860/sysv4.h"
1244 xm_defines="USG SVR3"
1245 xmake_file=i860/x-sysv4
1247 extra_parts="crtbegin.o crtend.o"
1249 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1250 tm_file="${tm_file} i960/vx960.h"
1251 tmake_file=i960/t-vxworks960
1253 thread_file='vxworks'
1255 i960-wrs-vxworks5* | i960-wrs-vxworks)
1256 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1257 tmake_file=i960/t-vxworks960
1259 thread_file='vxworks'
1262 tm_file="${tm_file} i960/vx960.h"
1263 tmake_file=i960/t-vxworks960
1265 thread_file='vxworks'
1268 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1269 tmake_file=i960/t-960bare
1273 tmake_file="i960/t-960bare t-rtems"
1274 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1277 i960-*-*) # Default i960 environment.
1281 extra_parts="crtinit.o crtfini.o"
1283 m68000-convergent-sysv*)
1285 xm_file="m68k/xm-3b1.h ${xm_file}"
1288 extra_headers=math-68881.h
1290 m68000-hp-bsd*) # HP 9000/200 running BSD
1291 tm_file=m68k/hp2bsd.h
1292 xmake_file=m68k/x-hp2bsd
1294 extra_headers=math-68881.h
1296 m68000-hp-hpux*) # HP 9000 series 300
1297 xm_file="xm_alloca.h ${xm_file}"
1298 xm_defines="USG NO_SYS_SIGLIST"
1299 if [[ x$gas = xyes ]]
1301 xmake_file=m68k/x-hp320g
1302 tm_file=m68k/hp310g.h
1304 xmake_file=m68k/x-hp320
1305 tm_file=m68k/hp310.h
1307 install_headers_dir=install-headers-cpio
1309 extra_headers=math-68881.h
1314 extra_headers=math-68881.h
1317 tm_file=m68k/sun2o4.h
1319 extra_headers=math-68881.h
1322 xm_file="m68k/xm-3b1.h ${xm_file}"
1324 if [[ x$gas = xyes ]]
1331 extra_headers=math-68881.h
1333 m68k-apple-aux*) # Apple Macintosh running A/UX
1334 xm_defines="USG AUX"
1335 tmake_file=m68k/t-aux
1336 install_headers_dir=install-headers-cpio
1337 extra_headers=math-68881.h
1338 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1340 if [[ "$gnu_ld" = yes ]]
1342 tm_file="${tm_file} m68k/auxgld.h"
1344 tm_file="${tm_file} m68k/auxld.h"
1346 if [[ "$gas" = yes ]]
1348 tm_file="${tm_file} m68k/auxgas.h"
1350 tm_file="${tm_file} m68k/auxas.h"
1352 tm_file="${tm_file} m68k/a-ux.h"
1356 tm_file=m68k/apollo68.h
1357 xmake_file=m68k/x-apollo68
1359 extra_headers=math-68881.h
1362 m68k-altos-sysv*) # Altos 3068
1363 if [[ x$gas = xyes ]]
1365 tm_file=m68k/altos3068.h
1368 echo "The Altos is supported only with the GNU assembler" 1>&2
1371 extra_headers=math-68881.h
1373 m68k-bull-sysv*) # Bull DPX/2
1374 if [[ x$gas = xyes ]]
1376 if [[ x$stabs = xyes ]]
1378 tm_file=m68k/dpx2cdbx.h
1380 tm_file=m68k/dpx2g.h
1385 xm_file="xm-alloca.h ${xm_file}"
1387 xmake_file=m68k/x-dpx2
1389 extra_headers=math-68881.h
1391 m68k-atari-sysv4*) # Atari variant of V.4.
1392 tm_file=m68k/atari.h
1393 xm_file="xm-alloca.h ${xm_file}"
1394 xm_defines="USG FULL_PROTOTYPES"
1396 extra_parts="crtbegin.o crtend.o"
1397 extra_headers=math-68881.h
1400 m68k-motorola-sysv*)
1401 tm_file=m68k/mot3300.h
1402 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
1403 xm_defines=NO_SYS_SIGLIST
1404 if [[ x$gas = xyes ]]
1406 xmake_file=m68k/x-mot3300-gas
1407 if [[ x$gnu_ld = xyes ]]
1409 tmake_file=m68k/t-mot3300-gald
1411 tmake_file=m68k/t-mot3300-gas
1415 xmake_file=m68k/x-mot3300
1416 if [[ x$gnu_ld = xyes ]]
1418 tmake_file=m68k/t-mot3300-gld
1420 tmake_file=m68k/t-mot3300
1424 gdb_needs_out_file_path=yes
1425 extra_parts="crt0.o mcrt0.o"
1426 extra_headers=math-68881.h
1429 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1430 tm_file=m68k/tower-as.h
1431 xm_defines="USG SVR3"
1432 xmake_file=m68k/x-tower
1433 extra_parts="crtbegin.o crtend.o"
1434 extra_headers=math-68881.h
1437 tm_file=m68k/plexus.h
1438 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
1441 extra_headers=math-68881.h
1445 xm_file="xm-alloca.h ${xm_file}"
1447 extra_headers=math-68881.h
1450 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
1451 xm_defines="USG unos"
1452 xmake_file=m68k/x-crds
1455 extra_headers=math-68881.h
1457 m68k-cbm-sysv4*) # Commodore variant of V.4.
1459 xm_file="xm-alloca.h ${xm_file}"
1460 xm_defines="USG FULL_PROTOTYPES"
1461 xmake_file=m68k/x-amix
1463 extra_parts="crtbegin.o crtend.o"
1464 extra_headers=math-68881.h
1468 tm_file=m68k/ccur-GAS.h
1469 xmake_file=m68k/x-ccur
1470 extra_headers=math-68881.h
1474 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1475 tm_file=m68k/hp3bsd44.h
1476 xmake_file=m68k/x-hp3bsd44
1478 extra_headers=math-68881.h
1481 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1482 tm_file=m68k/hp3bsd.h
1484 extra_headers=math-68881.h
1488 if [[ x$with_fp = xno ]]
1490 tm_file=m68k/isi-nfp.h
1496 extra_headers=math-68881.h
1498 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1499 xm_file="xm_alloca.h ${xm_file}"
1500 xm_defines="USG NO_SYS_SIGLIST"
1501 if [[ x$gas = xyes ]]
1503 xmake_file=m68k/x-hp320g
1504 tm_file=m68k/hp320g.h
1506 xmake_file=m68k/x-hp320
1507 tm_file=m68k/hpux7.h
1509 install_headers_dir=install-headers-cpio
1511 extra_headers=math-68881.h
1514 m68k-hp-hpux*) # HP 9000 series 300
1515 xm_file="xm_alloca.h ${xm_file}"
1516 xm_defines="USG NO_SYS_SIGLIST"
1517 if [[ x$gas = xyes ]]
1519 xmake_file=m68k/x-hp320g
1520 tm_file=m68k/hp320g.h
1522 xmake_file=m68k/x-hp320
1523 tm_file=m68k/hp320.h
1525 install_headers_dir=install-headers-cpio
1527 extra_headers=math-68881.h
1531 tm_file=m68k/sun3mach.h
1533 extra_headers=math-68881.h
1537 if [[ x$gas = xyes ]]
1539 tm_file=m68k/news3gas.h
1541 tm_file=m68k/news3.h
1544 extra_headers=math-68881.h
1547 m68k-sony-bsd* | m68k-sony-newsos*)
1548 if [[ x$gas = xyes ]]
1550 tm_file=m68k/newsgas.h
1555 extra_headers=math-68881.h
1558 m68k-next-nextstep2*)
1559 tm_file=m68k/next21.h
1560 xm_file="m68k/xm-next.h ${xm_file}"
1561 tmake_file=m68k/t-next
1562 xmake_file=m68k/x-next
1563 extra_objs=nextstep.o
1564 extra_headers=math-68881.h
1568 m68k-next-nextstep3*)
1570 xm_file="m68k/xm-next.h ${xm_file}"
1571 tmake_file=m68k/t-next
1572 xmake_file=m68k/x-next
1573 extra_objs=nextstep.o
1574 extra_headers=math-68881.h
1576 if [[ x$enable_threads = xyes ]]; then
1581 if [[ x$with_fp = xno ]]
1583 tm_file=m68k/sun3n3.h
1585 tm_file=m68k/sun3o3.h
1589 extra_headers=math-68881.h
1591 m68k-sun-sunos*) # For SunOS 4 (the default).
1592 if [[ x$with_fp = xno ]]
1594 tm_file=m68k/sun3n.h
1600 extra_headers=math-68881.h
1603 tm_file=m68k/vxm68k.h
1604 tmake_file=m68k/t-vxworks68
1605 extra_headers=math-68881.h
1606 thread_file='vxworks'
1610 tmake_file=m68k/t-m68kbare
1611 tm_file="m68k/m68k-aout.h libgloss.h"
1612 extra_headers=math-68881.h
1616 tmake_file=m68k/t-m68kbare
1617 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1618 extra_headers=math-68881.h
1622 if [[ x$gas = xyes ]]
1626 tm_file=m68k/lynx-ng.h
1628 xm_file=m68k/xm-lynx.h
1630 tmake_file=m68k/t-lynx
1631 extra_headers=math-68881.h
1635 tm_file=m68k/netbsd.h
1636 # On NetBSD, the headers are already okay, except for math.h.
1637 fixincludes=fixinc.wrap
1641 m68k-*-sysv3*) # Motorola m68k's running system V.3
1642 xm_file="xm-alloca.h ${xm_file}"
1644 xmake_file=m68k/x-m68kv
1645 extra_parts="crtbegin.o crtend.o"
1646 extra_headers=math-68881.h
1649 m68k-*-sysv4*) # Motorola m68k's running system V.4
1650 tm_file=m68k/m68kv4.h
1651 xm_file="xm-alloca.h ${xm_file}"
1654 extra_parts="crtbegin.o crtend.o"
1655 extra_headers=math-68881.h
1658 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1661 tm_file=m68k/linux-aout.h
1662 tmake_file="t-linux-aout m68k/t-linux-aout"
1663 fixincludes=Makefile.in # The headers are ok already.
1664 extra_headers=math-68881.h
1668 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1669 # with ELF format using the
1670 # GNU/Linux C library 5
1672 tm_file=m68k/linux.h
1673 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1674 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1675 fixincludes=Makefile.in # The headers are ok already.
1676 extra_headers=math-68881.h
1680 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1681 # with ELF format using glibc 2
1682 # aka the GNU/Linux C library 6.
1684 tm_file=m68k/linux.h
1685 tmake_file="t-linux m68k/t-linux"
1686 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1687 fixincludes=Makefile.in # The headers are ok already.
1688 extra_headers=math-68881.h
1691 if [[ x$enable_threads = xyes ]]; then
1696 tmake_file=m68k/t-m68kbare
1697 tm_file=m68k/m68k-psos.h
1698 extra_headers=math-68881.h
1702 tmake_file="m68k/t-m68kbare t-rtems"
1703 tm_file=m68k/rtems.h
1704 extra_headers=math-68881.h
1711 tm_file=m88k/dguxbcs.h
1712 tmake_file=m88k/t-dguxbcs
1716 tmake_file=m88k/t-dgux
1719 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1720 xmake_file=m88k/x-dgux
1721 if [[ x$gas = xyes ]]
1723 tmake_file=m88k/t-dgux-gas
1725 fixincludes=fixinc.dgux
1727 m88k-dolphin-sysv3*)
1728 tm_file=m88k/dolph.h
1729 extra_parts="crtbegin.o crtend.o"
1730 xm_file="m88k/xm-sysv3.h ${xm_file}"
1731 xmake_file=m88k/x-dolph
1732 if [[ x$gas = xyes ]]
1734 tmake_file=m88k/t-m88k-gas
1737 m88k-tektronix-sysv3)
1738 tm_file=m88k/tekXD88.h
1739 extra_parts="crtbegin.o crtend.o"
1740 xm_file="m88k/xm-sysv3.h ${xm_file}"
1741 xmake_file=m88k/x-tekXD88
1742 if [[ x$gas = xyes ]]
1744 tmake_file=m88k/t-m88k-gas
1748 tm_file=m88k/m88k-aout.h
1751 tm_file=m88k/m88k-coff.h
1752 tmake_file=m88k/t-bug
1756 extra_parts="crtbegin.o crtend.o"
1757 if [[ x$gas = xyes ]]
1759 tmake_file=m88k/t-luna-gas
1761 tmake_file=m88k/t-luna
1765 tm_file=m88k/sysv3.h
1766 extra_parts="crtbegin.o crtend.o"
1767 xm_file="m88k/xm-sysv3.h ${xm_file}"
1768 xmake_file=m88k/x-sysv3
1769 if [[ x$gas = xyes ]]
1771 tmake_file=m88k/t-m88k-gas
1775 tm_file=m88k/sysv4.h
1776 extra_parts="crtbegin.o crtend.o"
1777 xmake_file=m88k/x-sysv4
1778 tmake_file=m88k/t-sysv4
1780 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1781 tm_file=mips/iris6.h
1782 xm_file=mips/xm-iris6.h
1783 fixincludes=fixinc.irix
1784 xmake_file=mips/x-iris6
1785 tmake_file=mips/t-iris6
1786 if [[ x$enable_threads = xyes ]]; then
1791 tm_file="mips/elf.h libgloss.h"
1792 tmake_file=mips/t-ecoff
1795 extra_parts="crtbegin.o crtend.o"
1796 # thread_file='vxworks'
1798 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1799 tm_file="mips/iris6.h mips/cross64.h"
1801 xm_file="mips/xm-iris5.h"
1802 fixincludes=Makefile.in
1803 xmake_file=mips/x-iris
1804 tmake_file=mips/t-cross64
1805 # See comment in mips/iris[56].h files.
1807 if [[ x$enable_threads = xyes ]]; then
1812 if [[ x$gas = xyes ]]
1814 if [[ x$stabs = xyes ]]
1816 tm_file=mips/iris5gdb.h
1818 tm_file="mips/sni-svr4.h mips/sni-gas.h"
1821 tm_file=mips/sni-svr4.h
1824 xmake_file=mips/x-sni-svr4
1825 tmake_file=mips/t-mips-gas
1826 if [[ x$gnu_ld != xyes ]]
1831 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1832 if [[ x$gas = xyes ]]
1834 tm_file="mips/iris5.h mips/iris5gas.h"
1835 if [[ x$stabs = xyes ]]
1837 tm_file="${tm_file} dbx.h"
1840 tm_file=mips/iris5.h
1843 xm_file="mips/xm-iris5.h"
1844 fixincludes=fixinc.irix
1845 xmake_file=mips/x-iris
1846 # mips-tfile doesn't work yet
1847 tmake_file=mips/t-mips-gas
1848 # See comment in mips/iris5.h file.
1850 if [[ x$enable_threads = xyes ]]; then
1854 mips-sgi-irix4loser*) # Mostly like a MIPS.
1855 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
1856 if [[ x$stabs = xyes ]]; then
1857 tm_file="${tm_file} dbx.h"
1860 xmake_file=mips/x-iris
1861 if [[ x$gas = xyes ]]
1863 tmake_file=mips/t-mips-gas
1865 extra_passes="mips-tfile mips-tdump"
1867 if [[ x$gnu_ld != xyes ]]
1871 if [[ x$enable_threads = xyes ]]; then
1875 mips-sgi-irix4*) # Mostly like a MIPS.
1876 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
1877 if [[ x$stabs = xyes ]]; then
1878 tm_file="${tm_file} dbx.h"
1881 xmake_file=mips/x-iris
1882 if [[ x$gas = xyes ]]
1884 tmake_file=mips/t-mips-gas
1886 extra_passes="mips-tfile mips-tdump"
1888 if [[ x$gnu_ld != xyes ]]
1892 if [[ x$enable_threads = xyes ]]; then
1896 mips-sgi-*) # Mostly like a MIPS.
1897 tm_file="mips/iris3.h ${tm_file}"
1898 if [[ x$stabs = xyes ]]; then
1899 tm_file="${tm_file} dbx.h"
1902 xmake_file=mips/x-iris3
1903 if [[ x$gas = xyes ]]
1905 tmake_file=mips/t-mips-gas
1907 extra_passes="mips-tfile mips-tdump"
1909 if [[ x$gnu_ld != xyes ]]
1914 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1915 tm_file="mips/osfrose.h ${tm_file}"
1916 xmake_file=mips/x-osfrose
1917 tmake_file=mips/t-osfrose
1918 extra_objs=halfpic.o
1921 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1922 tm_file=mips/dec-osf1.h
1923 if [[ x$stabs = xyes ]]; then
1924 tm_file="${tm_file} dbx.h"
1926 xmake_file=mips/x-dec-osf1
1927 if [[ x$gas = xyes ]]
1929 tmake_file=mips/t-mips-gas
1931 tmake_file=mips/t-ultrix
1932 extra_passes="mips-tfile mips-tdump"
1934 if [[ x$gnu_ld != xyes ]]
1939 mips-dec-bsd*) # Decstation running 4.4 BSD
1940 tm_file=mips/dec-bsd.h
1942 if [[ x$gas = xyes ]]
1944 tmake_file=mips/t-mips-gas
1946 tmake_file=mips/t-ultrix
1947 extra_passes="mips-tfile mips-tdump"
1949 if [[ x$gnu_ld != xyes ]]
1954 mips-dec-netbsd*) # Decstation running NetBSD
1955 tm_file=mips/netbsd.h
1956 # On NetBSD, the headers are already okay, except for math.h.
1957 fixincludes=fixinc.wrap
1960 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1961 tm_file="mips/news4.h ${tm_file}"
1962 if [[ x$stabs = xyes ]]; then
1963 tm_file="${tm_file} dbx.h"
1965 if [[ x$gas = xyes ]]
1967 tmake_file=mips/t-mips-gas
1969 extra_passes="mips-tfile mips-tdump"
1971 if [[ x$gnu_ld != xyes ]]
1975 xmake_file=mips/x-sony
1977 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1978 # That is based on svr4.
1979 # t-svr4 is not right because this system doesn't use ELF.
1980 tm_file="mips/news5.h ${tm_file}"
1981 if [[ x$stabs = xyes ]]; then
1982 tm_file="${tm_file} dbx.h"
1984 xm_file="xm-siglist.h ${xm_file}"
1986 if [[ x$gas = xyes ]]
1988 tmake_file=mips/t-mips-gas
1990 extra_passes="mips-tfile mips-tdump"
1992 if [[ x$gnu_ld != xyes ]]
1997 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1998 tm_file="mips/svr4-5.h mips/svr4-t.h"
1999 if [[ x$stabs = xyes ]]; then
2000 tm_file="${tm_file} dbx.h"
2002 xm_file="xm-siglist.h ${xm_file}"
2004 xmake_file=mips/x-sysv
2005 if [[ x$gas = xyes ]]
2007 tmake_file=mips/t-mips-gas
2008 extra_parts="crtbegin.o crtend.o"
2010 tmake_file=mips/t-mips
2011 extra_passes="mips-tfile mips-tdump"
2013 if [[ x$gnu_ld != xyes ]]
2018 mips-*-ultrix* | mips-dec-mach3) # Decstation.
2019 tm_file="mips/ultrix.h ${tm_file}"
2020 if [[ x$stabs = xyes ]]; then
2021 tm_file="${tm_file} dbx.h"
2023 xmake_file=mips/x-ultrix
2024 if [[ x$gas = xyes ]]
2026 tmake_file=mips/t-mips-gas
2028 tmake_file=mips/t-ultrix
2029 extra_passes="mips-tfile mips-tdump"
2031 if [[ x$gnu_ld != xyes ]]
2036 mips-*-riscos[[56789]]bsd*)
2037 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
2038 if [[ x$stabs = xyes ]]; then
2039 tm_file="${tm_file} dbx.h"
2041 if [[ x$gas = xyes ]]
2043 tmake_file=mips/t-bsd-gas
2045 tmake_file=mips/t-bsd
2046 extra_passes="mips-tfile mips-tdump"
2048 if [[ x$gnu_ld != xyes ]]
2053 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
2054 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2055 if [[ x$stabs = xyes ]]; then
2056 tm_file="${tm_file} dbx.h"
2058 if [[ x$gas = xyes ]]
2060 tmake_file=mips/t-bsd-gas
2062 tmake_file=mips/t-bsd
2063 extra_passes="mips-tfile mips-tdump"
2065 if [[ x$gnu_ld != xyes ]]
2070 mips-*-riscos[[56789]]sysv4*)
2071 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
2072 if [[ x$stabs = xyes ]]; then
2073 tm_file="${tm_file} dbx.h"
2075 xm_file="xm-siglist.h ${xm_file}"
2076 xmake_file=mips/x-sysv
2077 if [[ x$gas = xyes ]]
2079 tmake_file=mips/t-svr4-gas
2081 tmake_file=mips/t-svr4
2082 extra_passes="mips-tfile mips-tdump"
2084 if [[ x$gnu_ld != xyes ]]
2089 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
2090 tm_file="mips/svr4-4.h ${tm_file}"
2091 if [[ x$stabs = xyes ]]; then
2092 tm_file="${tm_file} dbx.h"
2095 xmake_file=mips/x-sysv
2096 if [[ x$gas = xyes ]]
2098 tmake_file=mips/t-svr4-gas
2100 tmake_file=mips/t-svr4
2101 extra_passes="mips-tfile mips-tdump"
2103 if [[ x$gnu_ld != xyes ]]
2108 mips-*-riscos[[56789]]sysv*)
2109 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
2110 if [[ x$stabs = xyes ]]; then
2111 tm_file="${tm_file} dbx.h"
2114 xmake_file=mips/x-sysv
2115 if [[ x$gas = xyes ]]
2117 tmake_file=mips/t-svr3-gas
2119 tmake_file=mips/t-svr3
2120 extra_passes="mips-tfile mips-tdump"
2122 if [[ x$gnu_ld != xyes ]]
2127 mips-*-sysv* | mips-*-riscos*sysv*)
2128 tm_file="mips/svr3-4.h ${tm_file}"
2129 if [[ x$stabs = xyes ]]; then
2130 tm_file="${tm_file} dbx.h"
2133 xmake_file=mips/x-sysv
2134 if [[ x$gas = xyes ]]
2136 tmake_file=mips/t-svr3-gas
2138 tmake_file=mips/t-svr3
2139 extra_passes="mips-tfile mips-tdump"
2141 if [[ x$gnu_ld != xyes ]]
2146 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
2147 tm_file=mips/mips-5.h
2148 if [[ x$stabs = xyes ]]; then
2149 tm_file="${tm_file} dbx.h"
2151 if [[ x$gas = xyes ]]
2153 tmake_file=mips/t-mips-gas
2155 extra_passes="mips-tfile mips-tdump"
2157 if [[ x$gnu_ld != xyes ]]
2165 tm_file=mips/ecoffl.h
2166 if [[ x$stabs = xyes ]]; then
2167 tm_file="${tm_file} dbx.h"
2169 tmake_file=mips/t-ecoff
2172 tm_file="gofast.h mips/ecoff.h"
2173 if [[ x$stabs = xyes ]]; then
2174 tm_file="${tm_file} dbx.h"
2176 tmake_file=mips/t-ecoff
2179 tm_file="mips/elfl.h libgloss.h"
2180 tmake_file=mips/t-ecoff
2183 tm_file="mips/elf.h libgloss.h"
2184 tmake_file=mips/t-ecoff
2187 tm_file="mips/elfl64.h libgloss.h"
2188 tmake_file=mips/t-ecoff
2190 mips64orionel-*-elf*)
2191 tm_file="mips/elforion.h mips/elfl64.h libgloss.h"
2192 tmake_file=mips/t-ecoff
2195 tm_file="mips/elf64.h libgloss.h"
2196 tmake_file=mips/t-ecoff
2199 tm_file="mips/elforion.h mips/elf64.h libgloss.h"
2200 tmake_file=mips/t-ecoff
2202 mips64orion-*-rtems*)
2203 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
2204 tmake_file="mips/t-ecoff t-rtems"
2207 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2208 tmake_file=mips/t-r3900
2211 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2212 tmake_file=mips/t-r3900
2214 mips-*-*) # Default MIPS RISC-OS 4.0.
2215 if [[ x$stabs = xyes ]]; then
2216 tm_file="${tm_file} dbx.h"
2218 if [[ x$gas = xyes ]]
2220 tmake_file=mips/t-mips-gas
2222 extra_passes="mips-tfile mips-tdump"
2224 if [[ x$gnu_ld != xyes ]]
2231 tm_file="mn10200/mn10200.h"
2232 if [[ x$stabs = xyes ]]
2234 tm_file="${tm_file} dbx.h"
2240 tm_file="mn10300/mn10300.h"
2241 if [[ x$stabs = xyes ]]
2243 tm_file="${tm_file} dbx.h"
2248 tm_file=ns32k/encore.h
2252 tm_file=ns32k/sequent.h
2256 tm_file=ns32k/tek6100.h
2260 tm_file=ns32k/tek6200.h
2263 # This has not been updated to GCC 2.
2266 # xmake_file=ns32k/x-genix
2267 # tm_file=ns32k/genix.h
2271 tm_file=ns32k/merlin.h
2275 tm_file=ns32k/pc532-mach.h
2279 tm_file=ns32k/pc532-min.h
2280 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
2284 ns32k-pc532-netbsd*)
2285 tm_file=ns32k/netbsd.h
2286 # On NetBSD, the headers are already okay, except for math.h.
2287 fixincludes=fixinc.wrap
2291 tm_file="${tm_file} pdp11/2bsd.h"
2297 xmake_file=pyr/x-pyr
2304 xmake_file=romp/x-mach
2309 tm_file=rs6000/beos.h
2310 xm_file=rs6000/xm-beos.h
2311 tmake_file=rs6000/t-beos
2312 xmake_file=rs6000/x-beos
2314 powerpc-*-sysv* | powerpc-*-elf*)
2315 tm_file=rs6000/sysv4.h
2316 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2317 xm_defines="USG POSIX"
2318 extra_headers=ppc-asm.h
2319 if [[ x$gas = xyes ]]
2321 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2323 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2325 xmake_file=rs6000/x-sysv4
2328 tm_file=rs6000/eabiaix.h
2329 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2330 fixincludes=Makefile.in
2331 extra_headers=ppc-asm.h
2334 tm_file=rs6000/eabisim.h
2335 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2336 fixincludes=Makefile.in
2337 extra_headers=ppc-asm.h
2340 tm_file=rs6000/eabi.h
2341 if [[ x$gas = xyes ]]
2343 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2345 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2347 fixincludes=Makefile.in
2348 extra_headers=ppc-asm.h
2351 tm_file=rs6000/rtems.h
2352 if [[ x$gas = xyes ]]
2354 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2356 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2358 fixincludes=Makefile.in
2359 extra_headers=ppc-asm.h
2361 powerpc-*-linux-gnulibc1)
2362 tm_file=rs6000/linux.h
2363 xm_file=rs6000/xm-sysv4.h
2364 out_file=rs6000/rs6000.c
2365 if [[ x$gas = xyes ]]
2367 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2369 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2372 fixincludes=Makefile.in
2373 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2374 extra_headers=ppc-asm.h
2375 if [[ x$enable_threads = xyes ]]; then
2379 powerpc-*-linux-gnu*)
2380 tm_file=rs6000/linux.h
2381 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2382 xm_defines="USG ${xm_defines}"
2383 out_file=rs6000/rs6000.c
2384 if [[ x$gas = xyes ]]
2386 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2388 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2391 fixincludes=Makefile.in
2392 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2393 extra_headers=ppc-asm.h
2394 if [[ x$enable_threads = xyes ]]; then
2398 powerpc-wrs-vxworks*)
2400 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2401 xm_defines="USG POSIX"
2402 tm_file=rs6000/vxppc.h
2403 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2404 extra_headers=ppc-asm.h
2405 thread_file='vxworks'
2407 powerpcle-*-sysv* | powerpcle-*-elf*)
2408 tm_file=rs6000/sysv4le.h
2409 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2410 xm_defines="USG POSIX"
2411 if [[ x$gas = xyes ]]
2413 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2415 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2417 xmake_file=rs6000/x-sysv4
2418 extra_headers=ppc-asm.h
2420 powerpcle-*-eabisim*)
2421 tm_file=rs6000/eabilesim.h
2422 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2423 fixincludes=Makefile.in
2424 extra_headers=ppc-asm.h
2427 tm_file=rs6000/eabile.h
2428 if [[ x$gas = xyes ]]
2430 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2432 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2434 fixincludes=Makefile.in
2435 extra_headers=ppc-asm.h
2437 powerpcle-*-winnt* )
2438 tm_file=rs6000/win-nt.h
2439 tmake_file=rs6000/t-winnt
2441 fixincludes=Makefile.in
2442 if [[ x$enable_threads = xyes ]]; then
2445 extra_headers=ppc-asm.h
2447 powerpcle-*-pe | powerpcle-*-cygwin32)
2448 tm_file=rs6000/cygwin32.h
2449 xm_file="rs6000/xm-cygwin32.h ${xm_file}"
2450 tmake_file=rs6000/t-winnt
2451 xmake_file=rs6000/x-cygwin32
2453 fixincludes=Makefile.in
2454 if [[ x$enable_threads = xyes ]]; then
2458 extra_headers=ppc-asm.h
2460 powerpcle-*-solaris2*)
2461 tm_file=rs6000/sol2.h
2462 xm_file="xm-siglist.h rs6000/xm-sysv4.h"
2463 xm_defines="USG POSIX"
2464 if [[ x$gas = xyes ]]
2466 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2468 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2470 xmake_file=rs6000/x-sysv4
2472 *-*-solaris2.[[0-4]])
2473 fixincludes=fixinc.svr4;;
2475 fixincludes=fixinc.wrap;;
2477 extra_headers=ppc-asm.h
2479 rs6000-ibm-aix3.[[01]]*)
2480 tm_file=rs6000/aix31.h
2481 xmake_file=rs6000/x-aix31
2484 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2485 tm_file=rs6000/aix3newas.h
2486 if [[ x$host != x$target ]]
2488 tmake_file=rs6000/t-xnewas
2490 tmake_file=rs6000/t-newas
2494 rs6000-ibm-aix4.[[12]].* | powerpc-ibm-aix4.[[12]].*)
2495 tm_file=rs6000/aix41.h
2496 if [[ x$host != x$target ]]
2498 tmake_file=rs6000/t-xnewas
2500 tmake_file=rs6000/t-newas
2502 xmake_file=rs6000/x-aix41
2505 rs6000-ibm-aix4.[[3456789]].* | powerpc-ibm-aix4.[[3456789]].*)
2506 tm_file=rs6000/aix43.h
2507 if [[ x$host != x$target ]]
2509 tmake_file=rs6000/t-xaix43
2511 tmake_file=rs6000/t-aix43
2513 xmake_file=rs6000/x-aix43
2516 rs6000-ibm-aix[[56789]].* | powerpc-ibm-aix[[56789]].*)
2517 tm_file=rs6000/aix43.h
2518 if [[ x$host != x$target ]]
2520 tmake_file=rs6000/t-xaix43
2522 tmake_file=rs6000/t-aix43
2524 xmake_file=rs6000/x-aix43
2534 tm_file=rs6000/mach.h
2535 xm_file="${xm_file} rs6000/xm-mach.h"
2536 xmake_file=rs6000/x-mach
2540 tm_file=rs6000/lynx.h
2541 xm_file=rs6000/xm-lynx.h
2542 tmake_file=rs6000/t-rs6000
2543 xmake_file=rs6000/x-lynx
2551 tmake_file="sh/t-sh t-rtems"
2552 tm_file=sh/rtemself.h
2556 tmake_file="sh/t-sh t-rtems"
2565 xm_file="xm-alloca.h ${xm_file}"
2568 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2569 tm_file=sparc/vxsparc.h
2570 tmake_file=sparc/t-vxsparc
2572 thread_file='vxworks'
2575 tmake_file=sparc/t-sparcbare
2576 tm_file="sparc/aout.h libgloss.h"
2579 tm_file=sparc/netbsd.h
2580 # On NetBSD, the headers are already okay, except for math.h.
2581 fixincludes=fixinc.wrap
2589 tmake_file=sparc/t-elf
2590 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2594 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2595 xm_file="${xm_file} sparc/xm-linux.h"
2596 tm_file=sparc/linux-aout.h
2598 fixincludes=Makefile.in #On Linux, the headers are ok already.
2601 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2602 xm_file="${xm_file} sparc/xm-linux.h"
2604 tm_file=sparc/linux.h
2605 tmake_file="t-linux t-linux-gnulibc1"
2606 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2607 fixincludes=Makefile.in #On Linux, the headers are ok already.
2610 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2611 xm_file="${xm_file} sparc/xm-linux.h"
2613 tm_file=sparc/linux.h
2614 tmake_file="t-linux"
2615 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2616 fixincludes=Makefile.in #On Linux, the headers are ok already.
2618 if [[ x$enable_threads = xyes ]]; then
2623 if [[ x$gas = xyes ]]
2625 tm_file=sparc/lynx.h
2627 tm_file=sparc/lynx-ng.h
2629 xm_file=sparc/xm-lynx.h
2630 tmake_file=sparc/t-sunos41
2634 tmake_file="sparc/t-sparcbare t-rtems"
2635 tm_file=sparc/rtems.h
2638 if [[ x$gnu_ld = xyes ]]
2640 tm_file=sparc/sol2.h
2642 tm_file=sparc/sol2-sld.h
2644 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2645 xm_defines="USG POSIX"
2646 tmake_file=sparc/t-sol2
2647 xmake_file=sparc/x-sysv4
2648 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2650 *-*-solaris2.[[0-4]])
2651 fixincludes=fixinc.svr4;;
2653 fixincludes=fixinc.wrap;;
2656 if [[ x${enable_threads} = x ]]; then
2657 enable_threads=$have_pthread_h
2658 if [[ x${enable_threads} = x ]]; then
2659 enable_threads=$have_thread_h
2662 if [[ x${enable_threads} = xyes ]]; then
2663 if [[ x${have_pthread_h} = xyes ]]; then
2666 thread_file='solaris'
2671 tm_file=sparc/sunos4.h
2672 tmake_file=sparc/t-sunos40
2676 tm_file=sparc/sunos4.h
2677 tmake_file=sparc/t-sunos41
2679 if [[ x$gas = xyes ]]; then
2680 tm_file="${tm_file} sparc/sun4gas.h"
2684 tm_file=sparc/sun4o3.h
2688 tm_file=sparc/sysv4.h
2689 xm_file="xm-siglist.h sparc/xm-sysv4.h"
2690 xm_defines="USG POSIX"
2692 xmake_file=sparc/x-sysv4
2693 extra_parts="crtbegin.o crtend.o"
2696 xm_file="xm-siglist.h sparc/xm-sysv4.h sparc/xm-sol2.h"
2697 xm_defines="USG POSIX"
2698 tm_file=sparc/vxsim.h
2699 tmake_file=sparc/t-vxsparc
2700 xmake_file=sparc/x-sysv4
2703 tm_file="sparc/splet.h libgloss.h"
2704 tmake_file=sparc/t-splet
2707 tm_file="sparc/litecoff.h libgloss.h"
2708 tmake_file=sparc/t-sparclite
2711 tm_file="sparc/lite.h aoutos.h libgloss.h"
2712 tmake_file=sparc/t-sparclite
2715 tmake_file=sparc/t-sp64
2716 tm_file=sparc/sp64-aout.h
2719 tmake_file=sparc/t-sp64
2720 tm_file=sparc/sp64-elf.h
2721 extra_parts="crtbegin.o crtend.o"
2723 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2724 tmake_file=sparc/t-sp64
2725 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2726 tm_file=sparc/linux64.h
2728 fixincludes=Makefile.in # The headers are ok already.
2731 # This hasn't been upgraded to GCC 2.
2732 # tahoe-harris-*) # Harris tahoe, using COFF.
2733 # tm_file=tahoe/harris.h
2735 # tahoe-*-bsd*) # tahoe running BSD
2737 thumb-*-coff* | thumbel-*-coff*)
2739 out_file=arm/thumb.c
2740 xm_file=arm/xm-thumb.h
2741 md_file=arm/thumb.md
2742 tmake_file=arm/t-thumb
2743 fixincludes=Makefile.in # There is nothing to fix
2745 # This hasn't been upgraded to GCC 2.
2752 tm_file="v850/v850.h"
2753 xm_file="v850/xm-v850.h"
2754 tmake_file=v850/t-v850
2755 if [[ x$stabs = xyes ]]
2757 tm_file="${tm_file} dbx.h"
2761 vax-*-bsd*) # vaxen running BSD
2765 vax-*-sysv*) # vaxen running system V
2766 tm_file="${tm_file} vax/vaxv.h"
2771 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2772 # On NetBSD, the headers are already okay, except for math.h.
2773 fixincludes=fixinc.wrap
2777 vax-*-ultrix*) # vaxen running ultrix
2778 tm_file="${tm_file} vax/ultrix.h"
2782 vax-*-vms*) # vaxen running VMS
2783 xm_file=vax/xm-vms.h
2787 vax-*-*) # vax default entry
2791 xm_file="${xm_file} xm-svr3"
2795 echo "Configuration $machine not supported" 1>&2
2802 ;; # Existing GNU/Linux systems do not use the GNU setup.
2804 # On the GNU system, the setup is just about the same on
2805 # each different CPU. The specific machines that GNU
2806 # supports are matched above and just set $cpu_type.
2807 xm_file="xm-gnu.h ${xm_file}"
2808 tm_file=${cpu_type}/gnu.h
2809 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2810 # GNU always uses ELF.
2812 # GNU tools are the only tools.
2815 # On GNU, the headers are already okay.
2816 fixincludes=Makefile.in
2817 xmake_file=x-linux # These details are the same as Linux.
2818 tmake_file=t-gnu # These are not.
2821 fixincludes=fixinc.svr4
2822 xmake_try_sysv=x-sysv
2823 install_headers_dir=install-headers-cpio
2826 install_headers_dir=install-headers-cpio
2830 # Distinguish i[34567]86
2831 # Also, do not run mips-tfile on MIPS if using gas.
2832 # Process --with-cpu= for PowerPC/rs6000
2833 target_cpu_default2=
2836 target_cpu_default2=1
2839 target_cpu_default2=2
2841 i686-*-* | i786-*-*)
2842 target_cpu_default2=3
2847 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2850 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
2853 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2856 target_cpu_default2="MASK_CPU_EV5"
2860 if [[ x$gas = xyes ]]
2862 if [[ "$target_cpu_default2" = "" ]]
2864 target_cpu_default2="MASK_GAS"
2866 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2871 case "x$with_cpu" in
2874 target_cpu_default2="TARGET_CPU_generic"
2877 # Distinguish cores, and major variants
2878 # arm7m doesn't exist, but D & I don't affect code
2879 xarm[23678] | xarm250 | xarm[67][01]0 \
2880 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2881 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2882 | xstrongarm | xstrongarm110)
2883 target_cpu_default2="TARGET_CPU_$with_cpu"
2887 echo "--with-cpu must be passed a value" 1>&2
2892 if [[ x$pass2done = xyes ]]
2894 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2901 mips*-*-ecoff* | mips*-*-elf*)
2902 if [[ x$gas = xyes ]]
2904 if [[ x$gnu_ld = xyes ]]
2906 target_cpu_default2=20
2908 target_cpu_default2=16
2913 if [[ x$gas = xyes ]]
2915 target_cpu_default2=16
2918 powerpc*-*-* | rs6000-*-*)
2919 case "x$with_cpu" in
2923 xcommon | xpower | xpower2 | xpowerpc | xrios \
2924 | xrios1 | xrios2 | xrsc | xrsc1 \
2925 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2926 | x403 | x505 | x801 | x821 | x823 | x860)
2927 target_cpu_default2="\"$with_cpu\""
2931 echo "--with-cpu must be passed a value" 1>&2
2936 if [[ x$pass2done = xyes ]]
2938 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2945 case ".$with_cpu" in
2947 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2949 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2950 target_cpu_default2="TARGET_CPU_$with_cpu"
2953 if [[ x$pass2done = xyes ]]
2955 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2963 if [[ "$target_cpu_default2" != "" ]]
2965 if [[ "$target_cpu_default" != "" ]]
2967 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2969 target_cpu_default=$target_cpu_default2
2973 # No need for collect2 if we have the GNU linker.
2974 # Actually, there is now; GNU ld doesn't handle the EH info or
2975 # collecting for shared libraries.
2982 # Save data on machine being used to compile GCC in build_xm_file.
2983 # Save data on host machine in vars host_xm_file and host_xmake_file.
2984 if [[ x$pass1done = x ]]
2986 if [[ x"$xm_file" = x ]]
2987 then build_xm_file=$cpu_type/xm-$cpu_type.h
2988 else build_xm_file=$xm_file
2990 build_xm_defines=$xm_defines
2991 build_install_headers_dir=$install_headers_dir
2992 build_exeext=$exeext
2995 if [[ x$pass2done = x ]]
2997 if [[ x"$xm_file" = x ]]
2998 then host_xm_file=$cpu_type/xm-$cpu_type.h
2999 else host_xm_file=$xm_file
3001 host_xm_defines=$xm_defines
3002 if [[ x"$xmake_file" = x ]]
3003 then xmake_file=$cpu_type/x-$cpu_type
3005 host_xmake_file="$xmake_file"
3006 host_truncate_target=$truncate_target
3007 host_extra_gcc_objs=$extra_gcc_objs
3008 host_extra_objs=$extra_host_objs
3015 extra_objs="${host_extra_objs} ${extra_objs}"
3017 # Default the target-machine variables that were not explicitly set.
3018 if [[ x"$tm_file" = x ]]
3019 then tm_file=$cpu_type/$cpu_type.h; fi
3021 if [[ x$extra_headers = x ]]
3022 then extra_headers=; fi
3024 if [[ x"$xm_file" = x ]]
3025 then xm_file=$cpu_type/xm-$cpu_type.h; fi
3027 if [[ x$md_file = x ]]
3028 then md_file=$cpu_type/$cpu_type.md; fi
3030 if [[ x$out_file = x ]]
3031 then out_file=$cpu_type/$cpu_type.c; fi
3033 if [[ x"$tmake_file" = x ]]
3034 then tmake_file=$cpu_type/t-$cpu_type
3037 if [[ x$float_format = x ]]
3038 then float_format=i64
3041 if [[ x$enable_haifa = x ]]
3044 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-* | *sparc-* | m32r*-*)
3049 # Say what files are being used for the output code and MD file.
3050 echo "Using \`$srcdir/config/$out_file' to output insns."
3051 echo "Using \`$srcdir/config/$md_file' as machine description file."
3054 for f in $tm_file; do
3057 if [[ $count = ax ]]; then
3058 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3060 echo "Using the following target machine macro files:"
3061 for f in $tm_file; do
3062 echo " $srcdir/config/$f"
3067 for f in $host_xm_file; do
3070 if [[ $count = ax ]]; then
3071 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3073 echo "Using the following host machine macro files:"
3074 for f in $host_xm_file; do
3075 echo " $srcdir/config/$f"
3079 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
3081 for f in $build_xm_file; do
3084 if [[ $count = ax ]]; then
3085 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3087 echo "Using the following build machine macro files:"
3088 for f in $build_xm_file; do
3089 echo " $srcdir/config/$f"
3094 if [[ x$thread_file = x ]]; then
3095 if [[ x$target_thread_file != x ]]; then
3096 thread_file=$target_thread_file
3098 thread_file='single'
3102 # Set up the header files.
3103 # $links is the list of header files to create.
3104 # $vars is the list of shell variables with file names to include.
3105 # auto-host.h is the file containing items generated by autoconf and is
3106 # the first file included by config.h.
3108 host_xm_file="auto-host.h ${host_xm_file}"
3110 # If host=build, it is correct to have hconfig include auto-host.h
3111 # as well. If host!=build, we are in error and need to do more
3112 # work to find out the build config parameters.
3113 if [[ x$host = x$build ]]
3115 build_xm_file="auto-host.h ${build_xm_file}"
3117 # We create a subdir, then run autoconf in the subdir.
3118 # To prevent recursion we set host and build for the new
3119 # invocation of configure to the build for this invocation
3126 /*) realsrcdir=${srcdir};;
3127 *) realsrcdir=../${srcdir};;
3129 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
3130 --target=$target --host=$build --build=$build
3132 # We just finished tests for the build machine, so rename
3133 # the file auto-build.h in the gcc directory.
3134 mv auto-host.h ../auto-build.h
3137 build_xm_file="auto-build.h ${build_xm_file}"
3140 vars="host_xm_file tm_file xm_file build_xm_file"
3141 links="config.h tm.h tconfig.h hconfig.h"
3142 defines="host_xm_defines null_defines xm_defines build_xm_defines"
3145 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
3148 while [[ -n "$vars" ]]
3150 set $vars; var=$1; shift; vars=$*
3151 set $links; link=$1; shift; links=$*
3152 set $defines; define=$1; shift; defines=$*
3156 # Define TARGET_CPU_DEFAULT if the system wants one.
3157 # This substitutes for lots of *.h files.
3158 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
3160 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
3163 for file in `eval echo '$'$var`; do
3164 echo "#include \"$file\"" >>$link
3167 for def in `eval echo '$'$define`; do
3168 echo "#ifndef $def" >>$link
3169 echo "#define $def" >>$link
3170 echo "#endif" >>$link
3174 # Truncate the target if necessary
3175 if [[ x$host_truncate_target != x ]]; then
3176 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3179 # Get the version trigger filename from the toplevel
3180 if [[ "${with_gcc_version_trigger+set}" = set ]]; then
3181 gcc_version_trigger=$with_gcc_version_trigger
3183 gcc_version_trigger=${srcdir}/version.c
3185 gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${gcc_version_trigger}`
3187 # Get an absolute path to the GCC top-level source directory
3193 # Conditionalize the makefile for this host machine.
3194 # Make-host contains the concatenation of all host makefile fragments
3195 # [there can be more than one]. This file is built by configure.frag.
3196 host_overrides=Make-host
3197 dep_host_xmake_file=
3198 for f in .. ${host_xmake_file}
3200 if [[ -f ${srcdir}/config/$f ]]
3202 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
3206 # Conditionalize the makefile for this target machine.
3207 # Make-target contains the concatenation of all host makefile fragments
3208 # [there can be more than one]. This file is built by configure.frag.
3209 target_overrides=Make-target
3211 for f in .. ${tmake_file}
3213 if [[ -f ${srcdir}/config/$f ]]
3215 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
3219 # If the host doesn't support symlinks, modify CC in
3220 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
3221 # Otherwise, we can use "CC=$(CC)".
3223 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
3225 cc_set_by_configure="\$(CC)"
3226 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
3229 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
3231 symbolic_link="cp -p"
3235 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
3236 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
3240 out_object_file=`basename $out_file .c`.o
3243 for f in $tm_file; do
3244 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
3248 for f in $host_xm_file; do
3249 if test $f != "auto-host.h"; then
3250 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
3252 host_xm_file_list="${host_xm_file_list} auto-host.h"
3257 for f in $build_xm_file; do
3258 if test $f != "auto-build.h"; then
3259 if test $f != "auto-host.h"; then
3260 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
3262 build_xm_file_list="${build_xm_file_list} auto-host.h"
3265 build_xm_file_list="${build_xm_file_list} auto-build.h"
3269 # Define macro CROSS_COMPILE in compilation
3270 # if this is a cross-compiler.
3271 # Also use all.cross instead of all.internal
3272 # and add cross-make to Makefile.
3273 cross_overrides="/dev/null"
3274 if [[ x$host != x$target ]]
3276 cross_defines="CROSS=-DCROSS_COMPILE"
3277 cross_overrides="${topdir}/cross-make"
3280 # When building gcc with a cross-compiler, we need to fix a few things.
3281 # This must come after cross-make as we want all.build to override
3283 build_overrides="/dev/null"
3284 if [[ x$build != x$host ]]
3286 build_overrides="${topdir}/build-make"
3289 # Expand extra_headers to include complete path.
3290 # This substitutes for lots of t-* files.
3292 if [[ "x$extra_headers" = x ]]
3295 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
3296 for file in $extra_headers;
3298 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
3302 # Add a definition of USE_COLLECT2 if system wants one.
3303 # Also tell toplev.c what to do.
3304 # This substitutes for lots of t-* files.
3305 if [[ x$use_collect2 = x ]]
3310 will_use_collect2="collect2"
3311 maybe_use_collect2="-DUSE_COLLECT2"
3315 # Set MD_DEPS if the real md file is in md.pre-cpp.
3316 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
3317 # for line oriented comments, so we must always use a GNU cpp. If
3318 # building gcc with a cross compiler, use the cross compiler just
3319 # built. Otherwise, we can use the cpp just built.
3321 if [[ "x$md_cppflags" = x ]]
3323 md_file_sub=$srcdir/config/$md_file
3328 # If we have gas in the build tree, make a link to it.
3329 if [[ -f ../gas/Makefile ]]; then
3330 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3333 # If we have nm in the build tree, make a link to it.
3334 if [[ -f ../binutils/Makefile ]]; then
3335 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
3338 # If we have ld in the build tree, make a link to it.
3339 if [[ -f ../ld/Makefile ]]; then
3340 # if [[ x$use_collect2 = x ]]; then
3341 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3343 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3347 # Figure out what assembler alignment features are present.
3348 AC_MSG_CHECKING(assembler alignment features)
3350 gcc_cv_as_alignment_features=
3351 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,gcc$,gas,'`
3352 if [[ -x as$host_exeext ]]; then
3353 # Build using assembler in the current directory.
3354 gcc_cv_as=./as$host_exeext
3355 elif [[ -f $gcc_cv_as_gas_srcdir/configure.in ]]; then
3356 # Single tree build which includes gas.
3357 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
3359 gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
3360 if [[ x$gcc_cv_gas_version != x ]]; then
3364 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
3365 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
3366 if [[ x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x ]]; then
3367 # Gas version 2.6 and later support for .balign and .p2align.
3368 # bytes to skip when using .p2align.
3369 if [[ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2 ]]; then
3370 gcc_cv_as_alignment_features=".balign and .p2align"
3371 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
3373 # Gas version 2.8 and later support specifying the maximum
3374 # bytes to skip when using .p2align.
3375 if [[ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2 ]]; then
3376 gcc_cv_as_alignment_features=".p2align including maximum skip"
3377 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3380 elif [[ x$host = x$target ]]; then
3382 gcc_cv_as=as$host_exeext
3384 if [[ x$gcc_cv_as != x ]]; then
3385 # Check if we have .balign and .p2align
3386 echo ".balign 4" > conftest.s
3387 echo ".p2align 2" >> conftest.s
3388 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
3389 gcc_cv_as_alignment_features=".balign and .p2align"
3390 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
3392 rm -f conftest.s conftest.o
3393 # Check if specifying the maximum bytes to skip when
3394 # using .p2align is supported.
3395 echo ".p2align 4,,7" > conftest.s
3396 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
3397 gcc_cv_as_alignment_features=".p2align including maximum skip"
3398 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
3400 rm -f conftest.s conftest.o
3402 AC_MSG_RESULT($gcc_cv_as_alignment_features)
3404 # Figure out what language subdirectories are present.
3406 for lang in ${srcdir}/*/config-lang.in ..
3410 # The odd quoting in the next line works around
3411 # an apparent bug in bash 1.12 on linux.
3412 ${srcdir}/[[*]]/config-lang.in) ;;
3413 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3417 # Make gthr-default.h if we have a thread file.
3419 if [[ $thread_file != single ]]; then
3420 rm -f gthr-default.h
3421 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3422 gthread_flags=-DHAVE_GTHR_DEFAULT
3424 AC_SUBST(gthread_flags)
3426 # Make empty files to contain the specs and options for each language.
3427 # Then add #include lines to for a compiler that has specs and/or options.
3431 rm -f specs.h options.h
3432 touch specs.h options.h
3433 for subdir in . $subdirs
3435 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3436 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3437 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3439 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3440 echo "#include \"$subdir/lang-options.h\"" >>options.h
3441 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3445 # These (without "all_") are set in each config-lang.in.
3446 # `language' must be a single word so is spelled singularly.
3452 all_outputs=Makefile
3453 # List of language makefile fragments.
3458 # Add the language fragments.
3459 # Languages are added via two mechanisms. Some information must be
3460 # recorded in makefile variables, these are defined in config-lang.in.
3461 # We accumulate them and plug them into the main Makefile.
3462 # The other mechanism is a set of hooks for each of the main targets
3463 # like `clean', `install', etc.
3465 language_fragments="Make-lang"
3466 language_hooks="Make-hooks"
3469 for s in .. $subdirs
3481 . ${srcdir}/$s/config-lang.in
3482 if [[ "x$language" = x ]]
3484 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3487 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3488 all_languages="$all_languages $language"
3489 if [[ "x$boot_language" = xyes ]]
3491 all_boot_languages="$all_boot_languages $language"
3493 all_compilers="$all_compilers $compilers"
3494 all_stagestuff="$all_stagestuff $stagestuff"
3495 all_diff_excludes="$all_diff_excludes $diff_excludes"
3496 all_headers="$all_headers $headers"
3497 all_outputs="$all_outputs $outputs"
3498 if [[ x$outputs = x ]]
3500 oldstyle_subdirs="$oldstyle_subdirs $s"
3502 all_lib2funcs="$all_lib2funcs $lib2funcs"
3506 # Since we can't use `::' targets, we link each language in
3507 # with a set of hooks, reached indirectly via lang.${target}.
3511 target_list="all.build all.cross start.encap rest.encap \
3513 install-normal install-common install-info install-man \
3515 mostlyclean clean distclean extraclean maintainer-clean \
3516 stage1 stage2 stage3 stage4"
3517 for t in $target_list
3520 for l in .. $all_languages
3522 if [[ $l != ".." ]]; then
3526 echo "lang.$t: $x" >> Make-hooks
3529 # If we're not building in srcdir, create .gdbinit.
3531 if [[ ! -f Makefile.in ]]; then
3532 echo "dir ." > .gdbinit
3533 echo "dir ${srcdir}" >> .gdbinit
3534 if [[ x$gdb_needs_out_file_path = xyes ]]
3536 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3538 if [[ "x$subdirs" != x ]]; then
3541 echo "dir ${srcdir}/$s" >> .gdbinit
3544 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3547 # Define variables host_canonical and build_canonical
3548 # because some Cygnus local changes in the Makefile depend on them.
3549 build_canonical=${build}
3550 host_canonical=${host}
3552 if [[ "${host}" != "${target}" ]] ; then
3553 target_subdir=${target}/
3555 AC_SUBST(build_canonical)
3556 AC_SUBST(host_canonical)
3557 AC_SUBST(target_subdir)
3559 # If this is using newlib, then define inhibit_libc in
3560 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3561 # libgcc.a, but that's OK because newib should have its own version of
3564 if [[ x$with_newlib = xyes ]]; then
3565 inhibit_libc=-Dinhibit_libc
3567 AC_SUBST(inhibit_libc)
3569 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3572 if [[ x$enable_haifa = xyes ]]; then
3573 echo "Using the Haifa scheduler."
3575 sched_cflags=-DHAIFA
3577 AC_SUBST(sched_prefix)
3578 AC_SUBST(sched_cflags)
3579 if [[ x$enable_haifa != x ]]; then
3580 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3581 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3582 if [[ -f $x ]]; then
3589 # Nothing to do for FLOAT_H, float_format already handled.
3593 # Process the language and host/target makefile fragments.
3594 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3596 # Substitute configuration variables
3598 AC_SUBST(all_languages)
3599 AC_SUBST(all_boot_languages)
3600 AC_SUBST(all_compilers)
3601 AC_SUBST(all_lang_makefiles)
3602 AC_SUBST(all_stagestuff)
3603 AC_SUBST(all_diff_excludes)
3604 AC_SUBST(all_lib2funcs)
3605 AC_SUBST(all_headers)
3607 AC_SUBST(extra_passes)
3608 AC_SUBST(extra_programs)
3609 AC_SUBST(extra_parts)
3610 AC_SUBST(extra_c_objs)
3611 AC_SUBST(extra_cxx_objs)
3612 AC_SUBST(extra_cpp_objs)
3613 AC_SUBST(extra_c_flags)
3614 AC_SUBST(extra_objs)
3615 AC_SUBST(host_extra_gcc_objs)
3616 AC_SUBST(extra_headers_list)
3617 AC_SUBST(dep_host_xmake_file)
3618 AC_SUBST(dep_tmake_file)
3620 AC_SUBST(out_object_file)
3622 AC_SUBST(tm_file_list)
3623 AC_SUBST(build_xm_file_list)
3624 AC_SUBST(host_xm_file_list)
3625 AC_SUBST(lang_specs_files)
3626 AC_SUBST(lang_options_files)
3627 AC_SUBST(thread_file)
3628 AC_SUBST(gcc_version)
3629 AC_SUBST(gcc_version_trigger)
3630 AC_SUBST(local_prefix)
3631 AC_SUBST(gxx_include_dir)
3632 AC_SUBST(fixincludes)
3633 AC_SUBST(build_install_headers_dir)
3634 AC_SUBST(build_exeext)
3635 AC_SUBST(host_exeext)
3636 AC_SUBST(float_format)
3637 AC_SUBST(will_use_collect2)
3638 AC_SUBST(maybe_use_collect2)
3639 AC_SUBST(cc_set_by_configure)
3640 AC_SUBST(stage_prefix_set_by_configure)
3642 AC_SUBST(symbolic_link)
3644 AC_SUBST_FILE(target_overrides)
3645 AC_SUBST_FILE(host_overrides)
3646 AC_SUBST(cross_defines)
3647 AC_SUBST_FILE(cross_overrides)
3648 AC_SUBST_FILE(build_overrides)
3649 AC_SUBST_FILE(language_fragments)
3650 AC_SUBST_FILE(language_hooks)
3652 # Echo that links are built
3653 if [[ x$host = x$target ]]
3661 if [[ x$host != x$build ]]
3663 str3=" on a $build system"
3666 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3671 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3673 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3675 echo " ${str2}${str3}." 1>&2
3678 # Truncate the target if necessary
3679 if [[ x$host_truncate_target != x ]]; then
3680 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3683 # Configure the subdirectories
3684 # AC_CONFIG_SUBDIRS($subdirs)
3686 # Create the Makefile
3687 # and configure language subdirectories
3688 AC_OUTPUT($all_outputs,
3690 . $srcdir/configure.lang
3691 case x$CONFIG_HEADERS in
3692 xauto-host.h:config.in)
3695 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3696 # bootstrapping and the installation procedure can still use
3697 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3698 # FLAGS_TO_PASS has been modified to solve the problem there.
3699 # This is virtually a duplicate of what happens in configure.lang; we do
3700 # an extra check to make sure this only happens if ln -s can be used.
3701 if [[ "$symbolic_link" = "ln -s" ]]; then
3702 for d in .. ${subdirs} ; do
3703 if [[ $d != .. ]]; then
3706 for t in stage1 stage2 stage3 stage4 include
3709 $symbolic_link ../$t $t 2>/dev/null
3720 target_alias='${target_alias}'
3722 subdirs='${subdirs}'
3723 oldstyle_subdirs='${oldstyle_subdirs}'
3724 symbolic_link='${symbolic_link}'
3725 program_transform_set='${program_transform_set}'
3726 program_transform_name='${program_transform_name}'
3727 dep_host_xmake_file='${dep_host_xmake_file}'
3728 host_xmake_file='${host_xmake_file}'
3729 dep_tmake_file='${dep_tmake_file}'
3730 tmake_file='${tmake_file}'
3731 thread_file='${thread_file}'
3732 gcc_version='${gcc_version}'
3733 gcc_version_trigger='${gcc_version_trigger}'
3734 local_prefix='${local_prefix}'
3735 build_install_headers_dir='${build_install_headers_dir}'
3736 build_exeext='${build_exeext}'
3737 host_exeext='${host_exeext}'
3738 out_file='${out_file}'
3739 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3740 SET_MAKE='${SET_MAKE}'
3741 target_list='${target_list}'
3742 target_overrides='${target_overrides}'
3743 host_overrides='${host_overrides}'
3744 cross_defines='${cross_defines}'
3745 cross_overrides='${cross_overrides}'
3746 build_overrides='${build_overrides}'