1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997, 1998, 1999, 2000 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
26 AC_CONFIG_HEADER(auto-host.h:config.in)
33 # Check for bogus environment variables.
34 # Test if LIBRARY_PATH contains the notation for the current directory
35 # since this would lead to problems installing/building glibc.
36 # LIBRARY_PATH contains the current directory if one of the following
38 # - one of the terminals (":" and ";") is the first or last sign
39 # - two terminals occur directly after each other
40 # - the path contains an element with a dot in it
41 AC_MSG_CHECKING(LIBRARY_PATH variable)
43 case ${LIBRARY_PATH} in
44 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
45 library_path_setting="contains current directory"
48 library_path_setting="ok"
52 AC_MSG_RESULT($library_path_setting)
53 if test "$library_path_setting" != "ok"; then
55 *** LIBRARY_PATH shouldn't contain the current directory when
56 *** building gcc. Please change the environment variable
57 *** and run configure again.])
60 # Test if GCC_EXEC_PREFIX contains the notation for the current directory
61 # since this would lead to problems installing/building glibc.
62 # GCC_EXEC_PREFIX contains the current directory if one of the following
64 # - one of the terminals (":" and ";") is the first or last sign
65 # - two terminals occur directly after each other
66 # - the path contains an element with a dot in it
67 AC_MSG_CHECKING(GCC_EXEC_PREFIX variable)
69 case ${GCC_EXEC_PREFIX} in
70 [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
71 gcc_exec_prefix_setting="contains current directory"
74 gcc_exec_prefix_setting="ok"
78 AC_MSG_RESULT($gcc_exec_prefix_setting)
79 if test "$gcc_exec_prefix_setting" != "ok"; then
81 *** GCC_EXEC_PREFIX shouldn't contain the current directory when
82 *** building gcc. Please change the environment variable
83 *** and run configure again.])
86 # Check for additional parameters
90 [ --with-gnu-ld arrange to work with GNU ld.],
91 gnu_ld_flag="$with_gnu_ld",
96 [ --with-ld arrange to use the specified ld (full pathname).],
97 DEFAULT_LINKER="$with_ld")
98 if test x"${DEFAULT_LINKER+set}" = x"set"; then
99 if test ! -x "$DEFAULT_LINKER"; then
100 AC_MSG_WARN([cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER])
101 elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
104 AC_DEFINE_UNQUOTED(DEFAULT_LINKER,"$DEFAULT_LINKER")
109 [ --with-gnu-as arrange to work with GNU as.],
110 gas_flag="$with_gnu_as",
114 [ --with-as arrange to use the specified as (full pathname).],
115 DEFAULT_ASSEMBLER="$with_as")
116 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
117 if test ! -x "$DEFAULT_ASSEMBLER"; then
118 AC_MSG_WARN([cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER])
119 elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then
122 AC_DEFINE_UNQUOTED(DEFAULT_ASSEMBLER,"$DEFAULT_ASSEMBLER")
127 [ --with-stabs arrange to use stabs instead of host debug format.],
133 [ --with-elf arrange to use ELF instead of host debug format.],
137 # Specify the local prefix
139 AC_ARG_WITH(local-prefix,
140 [ --with-local-prefix=DIR specifies directory to put local include.],
141 [case "${withval}" in
142 yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
144 *) local_prefix=$with_local_prefix ;;
147 # Default local prefix if it is empty
148 if test x$local_prefix = x; then
149 local_prefix=/usr/local
152 # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
153 # passed in by the toplevel make and thus we'd get different behavior
154 # depending on where we built the sources.
156 # Specify the g++ header file directory
157 AC_ARG_WITH(gxx-include-dir,
158 [ --with-gxx-include-dir=DIR
159 specifies directory to put g++ header files.],
160 [case "${withval}" in
161 yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
163 *) gcc_gxx_include_dir=$with_gxx_include_dir ;;
166 if test x${gcc_gxx_include_dir} = x; then
167 if test x${enable_version_specific_runtime_libs} = xyes; then
168 gcc_gxx_include_dir='${libsubdir}/include/g++'
170 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
171 changequote(<<, >>)dnl
172 gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
177 # Enable expensive internal checks
178 AC_ARG_ENABLE(checking,
179 [ --enable-checking[=LIST]
180 enable expensive run-time checks. With LIST,
181 enable only specific categories of checks.
182 Categories are: misc,tree,rtl,gc,gcac; default
184 [case "${enableval}" in
185 yes) AC_DEFINE(ENABLE_CHECKING)
186 AC_DEFINE(ENABLE_TREE_CHECKING)
187 AC_DEFINE(ENABLE_RTL_CHECKING) ;;
189 *) IFS="${IFS= }"; ac_save_IFS="$IFS" IFS="$IFS,"
190 set fnord $enableval; shift
195 misc) AC_DEFINE(ENABLE_CHECKING) ;;
196 tree) AC_DEFINE(ENABLE_TREE_CHECKING) ;;
197 rtl) AC_DEFINE(ENABLE_RTL_CHECKING) ;;
198 gc) AC_DEFINE(ENABLE_GC_CHECKING) ;;
199 gcac) AC_DEFINE(ENABLE_GC_ALWAYS_COLLECT) ;;
200 *) AC_MSG_ERROR(unknown check category $check) ;;
207 [ --disable-cpp don't provide a user-visible C preprocessor.],
208 [], [enable_cpp=yes])
210 AC_ARG_WITH(cpp_install_dir,
211 [ --with-cpp-install-dir=DIR
212 install the user visible C preprocessor in DIR
213 (relative to PREFIX) as well as PREFIX/bin.],
214 [if test x$withval = xyes; then
215 AC_MSG_ERROR([option --with-cpp-install-dir requires an argument])
216 elif test x$withval != xno; then
217 cpp_install_dir=$withval
220 dnl Disable this for the moment; the library interface is changing.
221 dnl # Link cpplib into the compiler proper, for C/C++/ObjC.
222 dnl AC_ARG_ENABLE(c-cpplib,
223 dnl [ --enable-c-cpplib link cpplib directly into C and C++ compilers
224 dnl (EXPERIMENTAL) (implies --enable-cpplib).],
225 dnl if test x$enable_c_cpplib != xno; then
226 dnl extra_c_objs="${extra_c_objs} libcpp.a"
227 dnl extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
228 dnl extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
231 # Enable Multibyte Characters for C/C++
232 AC_ARG_ENABLE(c-mbchar,
233 [ --enable-c-mbchar Enable multibyte characters for C and C++.],
234 if test x$enable_c_mbchar != xno; then
235 extra_c_flags="${extra_c_flags} -DMULTIBYTE_CHARS=1"
239 # Pass with no value to take the default
240 # Pass with a value to specify a thread package
241 AC_ARG_ENABLE(threads,
242 [ --enable-threads enable thread usage for target GCC.
243 --enable-threads=LIB use LIB thread package for target GCC.],
244 if test x$enable_threads = xno; then
249 enable_threads_flag=$enable_threads
250 # Check if a valid thread package
251 case x${enable_threads_flag} in
254 target_thread_file='single'
258 target_thread_file=''
260 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
261 xsolaris | xwin32 | xdce | xvxworks)
262 target_thread_file=$enable_threads_flag
265 echo "$enable_threads is an unknown thread package" 1>&2
270 AC_ARG_ENABLE(objc-gc,
271 [ --enable-objc-gc enable the use of Boehm's garbage collector with
272 the GNU Objective-C runtime.],
273 if test x$enable_objc_gc = xno; then
281 [ --with-dwarf2 force the default debug format to be DWARF2.],
282 dwarf2="$with_dwarf2",
285 # Determine the host, build, and target systems
288 # Find the native compiler
292 # If the native compiler is GCC, we can enable warnings even in stage1.
293 # That's useful for people building cross-compilers, or just running a
295 if test "x$GCC" = "xyes"; then
296 stage1_warn_cflags='$(WARN_CFLAGS)'
298 stage1_warn_cflags=""
300 AC_SUBST(stage1_warn_cflags)
304 AC_MSG_CHECKING([whether a default assembler was specified])
305 if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
306 if test x"$gas_flag" = x"no"; then
307 AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)])
309 AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)])
315 AC_MSG_CHECKING([whether a default linker was specified])
316 if test x"${DEFAULT_LINKER+set}" = x"set"; then
317 if test x"$gnu_ld_flag" = x"no"; then
318 AC_MSG_RESULT([yes ($DEFAULT_LINKER)])
320 AC_MSG_RESULT([yes ($DEFAULT_LINKER - GNU ld)])
326 # Find some useful tools
340 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
341 fcntl.h unistd.h stab.h sys/file.h sys/time.h \
342 sys/resource.h sys/param.h sys/times.h sys/stat.h \
345 # Check for thread headers.
346 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
347 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
349 # See if GNAT has been installed
350 AC_CHECK_PROG(gnat, gnatbind, yes, no)
352 # See if the stage1 system preprocessor understands the ANSI C
353 # preprocessor stringification operator.
356 # Use <inttypes.h> only if it exists,
357 # doesn't clash with <sys/types.h>, and declares intmax_t.
358 AC_MSG_CHECKING(for inttypes.h)
359 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
361 [#include <sys/types.h>
362 #include <inttypes.h>],
364 [gcc_cv_header_inttypes_h=yes],
365 gcc_cv_header_inttypes_h=no)])
366 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
367 if test $gcc_cv_header_inttypes_h = yes; then
368 AC_DEFINE(HAVE_INTTYPES_H)
372 # Determine if enumerated bitfields are unsigned. ISO C says they can
373 # be either signed or unsigned.
375 AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
376 [AC_TRY_RUN(#include <stdlib.h>
377 enum t { BLAH = 128 } ;
378 struct s_t { enum t member : 8; } s ;
382 if (s.member < 0) exit(1);
385 }, gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
386 AC_MSG_RESULT($gcc_cv_enum_bf_unsigned)
387 if test $gcc_cv_enum_bf_unsigned = yes; then
388 AC_DEFINE(ENUM_BITFIELDS_ARE_UNSIGNED, 1,
389 [Define if enumerated bitfields are treated as unsigned values.])
392 AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \
393 index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
394 sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
395 fputs_unlocked getrusage valloc)
397 # Make sure wchar_t is available
398 #AC_CHECK_TYPE(wchar_t, unsigned int)
400 GCC_FUNC_VFPRINTF_DOPRNT
405 # Under some versions of uwin, vfork is notoriously buggy and the test
406 # can hang configure; on other versions, vfork exists just as a stub.
407 # FIXME: This should be removed once vfork in uwin's runtime is fixed.
408 ac_cv_func_vfork_works=no
412 AC_FUNC_MMAP_ANYWHERE
415 GCC_NEED_DECLARATIONS(bcopy bzero bcmp \
416 index rindex getenv atol sbrk abort atof getcwd getwd \
417 strsignal putc_unlocked fputs_unlocked strstr environ)
419 GCC_NEED_DECLARATIONS(malloc realloc calloc free, [
425 GCC_NEED_DECLARATIONS(getrlimit setrlimit getrusage, [
426 #include <sys/types.h>
427 #ifdef HAVE_SYS_RESOURCE_H
428 #include <sys/resource.h>
432 # mkdir takes a single argument on some systems.
433 GCC_FUNC_MKDIR_TAKES_ONE_ARG
443 build_install_headers_dir=install-headers-tar
448 host_truncate_target=
451 # Decode the host machine, then the target machine.
452 # For the host machine, we save the xm_file variable as host_xm_file;
453 # then we decode the target machine and forget everything else
454 # that came from the host machine.
455 for machine in $build $host $target; do
469 # Set this to force installation and use of collect2.
471 # Set this to override the default target model.
473 # Set this to control how the header file directory is installed.
474 install_headers_dir=install-headers-tar
475 # Set this to a non-empty list of args to pass to cpp if the target
476 # wants its .md file passed through cpp.
478 # Set this if directory names should be truncated to 14 characters.
480 # Set this if gdb needs a dir command with `dirname $out_file`
481 gdb_needs_out_file_path=
482 # Set this if the build machine requires executables to have a
485 # Set this to control which thread package will be used.
487 # Reinitialize these from the flag values every loop pass, since some
488 # configure entries modify them.
490 gnu_ld="$gnu_ld_flag"
491 enable_threads=$enable_threads_flag
493 # Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
494 # updated in each machine entry.
496 cpu_type=`echo $machine | sed 's/-.*$//'`
535 tm_file=${cpu_type}/${cpu_type}.h
536 xm_file=${cpu_type}/xm-${cpu_type}.h
537 if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h;
539 tm_p_file=${cpu_type}/${cpu_type}-protos.h;
541 # On a.out targets, we need to use collect2.
548 # Common parts for linux-gnu and openbsd systems
551 xm_defines="HAVE_ATEXIT POSIX BSTRING"
554 tm_file=${cpu_type}/openbsd.h
555 tmake_file="t-libc-ok t-openbsd"
556 # avoid surprises, always provide an xm-openbsd file
557 xm_file=${cpu_type}/xm-openbsd.h
558 # don't depend on processor x-fragments as well
560 if test x$enable_threads = xyes; then
562 tmake_file="${tmake_file} t-openbsd-thread"
568 # Support site-specific machine types.
570 cpu_type=`echo $machine | sed -e 's/-.*//'`
571 rest=`echo $machine | sed -e "s/$cpu_type-//"`
572 xm_file=${cpu_type}/xm-$rest.h
573 tm_file=${cpu_type}/$rest.h
574 if test -f $srcdir/config/${cpu_type}/x-$rest; \
575 then xmake_file=${cpu_type}/x-$rest; \
578 if test -f $srcdir/config/${cpu_type}/t-$rest; \
579 then tmake_file=${cpu_type}/t-$rest; \
585 a29k-*-bsd* | a29k-*-sym1*)
586 tm_file="${tm_file} a29k/unix.h"
588 xmake_file=a29k/x-unix
591 a29k-*-udi | a29k-*-coff)
592 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
593 tmake_file=a29k/t-a29kbare
596 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
597 tmake_file=a29k/t-vx29k
598 extra_parts="crtbegin.o crtend.o"
599 thread_file='vxworks'
601 a29k-*-*) # Default a29k environment.
605 tm_file="${tm_file} alpha/alpha32.h interix.h alpha/alpha-interix.h"
607 # GAS + IEEE_CONFORMANT+IEEE (no inexact);
608 #target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT|MASK_IEEE"
610 # GAS + IEEE_CONFORMANT
611 target_cpu_default="MASK_GAS|MASK_IEEE_CONFORMANT"
613 xm_file="alpha/xm-alpha-interix.h xm-interix.h"
614 xmake_file="x-interix alpha/t-pe"
615 tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
616 if test x$enable_threads = xyes ; then
619 if test x$stabs = xyes ; then
620 tm_file="${tm_file} dbxcoff.h"
622 #prefix='$$INTERIX_ROOT'/usr/contrib
623 #local_prefix='$$INTERIX_ROOT'/usr/contrib
625 alpha*-*-linux-gnuecoff*)
626 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
627 target_cpu_default="MASK_GAS"
628 tmake_file="alpha/t-alpha alpha/t-ieee"
633 alpha*-*-linux-gnulibc1*)
634 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
635 target_cpu_default="MASK_GAS"
636 tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-linux alpha/t-crtbe alpha/t-ieee"
637 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
640 if test x$enable_threads = xyes; then
645 tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
646 target_cpu_default="MASK_GAS"
647 tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
648 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
651 if test x$enable_threads = xyes; then
656 tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
657 target_cpu_default="MASK_GAS"
658 tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
659 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
665 # default x-alpha is only appropriate for dec-osf.
666 target_cpu_default="MASK_GAS"
667 tmake_file="alpha/t-alpha alpha/t-ieee"
671 if test x$stabs = xyes
673 tm_file="${tm_file} dbx.h"
675 if test x$gas != xyes
677 extra_passes="mips-tfile mips-tdump"
680 tmake_file="alpha/t-alpha alpha/t-ieee"
683 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
688 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
691 tm_file="${tm_file} alpha/osf.h"
692 # Some versions of OSF4 (specifically X4.0-9 296.7) have
693 # a broken tar, so we use cpio instead.
694 install_headers_dir=install-headers-cpio
697 tm_file="${tm_file} alpha/osf.h alpha/osf5.h"
702 *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5*)
704 target_cpu_default=MASK_SUPPORT_ARCH
709 tm_file="${tm_file} dbx.h alpha/vxworks.h"
710 tmake_file="alpha/t-alpha alpha/t-ieee"
713 extra_passes="mips-tfile mips-tdump"
716 thread_file='vxworks'
719 tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
720 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
721 tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
722 xmake_file=winnt/x-winnt
723 extra_host_objs=oldnames.o
724 extra_gcc_objs="spawnv.o oldnames.o"
725 if test x$gnu_ld != xyes
727 extra_programs=ld.exe
729 if test x$enable_threads = xyes; then
735 xm_file="${xm_file} alpha/xm-vms.h"
736 tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
739 extra_parts="crtinit.o crtfini.o"
741 arm-*-coff* | armel-*-coff*)
743 tmake_file=arm/t-arm-coff
747 tmake_file=arm/t-arm-coff
748 thread_file='vxworks'
751 arm-*-riscix1.[01]*) # Acorn RISC machine (early versions)
753 tm_file=arm/riscix1-1.h
756 arm-*-riscix*) # Acorn RISC machine
759 tm_file=arm/rix-gas.h
763 xmake_file=arm/x-riscix
764 tmake_file=arm/t-riscix
767 arm-semi-aout | armel-semi-aout)
769 tmake_file=arm/t-semi
771 arm-semi-aof | armel-semi-aof)
772 tm_file=arm/semiaof.h
773 tmake_file=arm/t-semiaof
777 tmake_file="t-netbsd arm/t-netbsd"
780 arm*-*-linux-gnuaout*) # ARM GNU/Linux with a.out
783 tm_file=arm/linux-aout.h
784 tmake_file=arm/t-linux
787 arm*-*-linux-gnuoldld*) # ARM GNU/Linux with old ELF linker
788 xm_file=arm/xm-linux.h
790 tm_file="arm/linux-oldld.h arm/linux-elf.h"
793 tm_file="arm/linux-elf26.h $tm_file"
796 tmake_file="t-linux arm/t-linux"
797 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
799 case x${enable_threads} in
800 x | xyes | xpthreads | xposix)
805 arm*-*-linux-gnu*) # ARM GNU/Linux with ELF
806 xm_file=arm/xm-linux.h
808 tm_file="arm/linux-elf.h"
811 tm_file="arm/linux-elf26.h $tm_file"
814 tmake_file="t-linux arm/t-linux"
815 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
817 case x${enable_threads} in
818 x | xyes | xpthreads | xposix)
823 arm*-*-uclinux*) # ARM ucLinux
824 tm_file=arm/uclinux-elf.h
825 tmake_file=arm/t-arm-elf
829 tmake_file=arm/t-arm-aout
832 tm_file=arm/ecos-elf.h
833 tmake_file=arm/t-arm-elf
836 tm_file=arm/unknown-elf.h
837 tmake_file=arm/t-arm-elf
840 tm_file=arm/conix-elf.h
841 tmake_file=arm/t-arm-elf
844 tm_file=arm/unknown-elf-oabi.h
845 tmake_file=arm/t-arm-elf
854 c1-convex-*) # Convex C1
858 c2-convex-*) # Convex C2
871 target_cpu_default=16
878 clipper-intergraph-clix*)
879 tm_file="${tm_file} svr3.h clipper/clix.h"
880 xm_file=clipper/xm-clix.h
881 xmake_file=clipper/x-clix
882 extra_headers=va-clipper.h
883 extra_parts="crtbegin.o crtend.o"
884 install_headers_dir=install-headers-cpio
892 tm_file="fr30/fr30.h"
893 tmake_file=fr30/t-fr30
894 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
896 # This hasn't been upgraded to GCC 2.
897 # fx80-alliant-*) # Alliant FX/80
903 target_cpu_default="(MASK_PA_11 | MASK_GAS | MASK_JUMP_IN_DELAY)"
904 tm_file="${tm_file} pa/elf.h linux.h pa/pa-linux.h"
905 tmake_file="t-linux pa/t-linux"
906 extra_parts="crtbegin.o crtend.o"
909 if test x$enable_threads = xyes; then
914 target_cpu_default="MASK_PA_11"
915 tmake_file=pa/t-openbsd
918 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
919 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h"
920 xm_file=pa/xm-papro.h
924 target_cpu_default="MASK_PA_11"
925 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
929 target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
930 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h"
931 xm_file=pa/xm-papro.h
935 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-osf.h"
939 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
940 target_cpu_default="MASK_PA_11"
944 tm_file="${tm_file} pa/pa32-regs.h pa/som.h"
948 tm_file="pa/pa-oldas.h ${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux7.h"
949 xm_file=pa/xm-pahpux.h
950 xmake_file=pa/x-pa-hpux
953 tm_file="${tm_file} pa/gas.h"
955 install_headers_dir=install-headers-cpio
959 hppa1.0-*-hpux8.0[0-2]*)
961 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
962 xm_file=pa/xm-pahpux.h
963 xmake_file=pa/x-pa-hpux
966 tm_file="${tm_file} pa/pa-gas.h"
968 tm_file="pa/pa-oldas.h ${tm_file}"
970 install_headers_dir=install-headers-cpio
974 hppa1.1-*-hpux8.0[0-2]*)
976 target_cpu_default="MASK_PA_11"
977 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
978 xm_file=pa/xm-pahpux.h
979 xmake_file=pa/x-pa-hpux
982 tm_file="${tm_file} pa/pa-gas.h"
984 tm_file="pa/pa-oldas.h ${tm_file}"
986 install_headers_dir=install-headers-cpio
990 target_cpu_default="MASK_PA_11"
991 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
992 xm_file=pa/xm-pahpux.h
993 xmake_file=pa/x-pa-hpux
996 tm_file="${tm_file} pa/pa-gas.h"
998 install_headers_dir=install-headers-cpio
1002 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h"
1003 xm_file=pa/xm-pahpux.h
1004 xmake_file=pa/x-pa-hpux
1005 if test x$gas = xyes
1007 tm_file="${tm_file} pa/pa-gas.h"
1009 install_headers_dir=install-headers-cpio
1012 hppa1.1-*-hpux10* | hppa2*-*-hpux10*)
1013 target_cpu_default="MASK_PA_11"
1014 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
1016 xm_file=pa/xm-pahpux.h
1017 xmake_file=pa/x-pa-hpux
1019 if test x$gas = xyes
1021 tm_file="${tm_file} pa/pa-gas.h"
1023 if test x$enable_threads = x; then
1024 enable_threads=$have_pthread_h
1026 if test x$enable_threads = xyes; then
1028 tmake_file="${tmake_file} pa/t-dce-thr"
1030 install_headers_dir=install-headers-cpio
1034 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux10.h"
1036 xm_file=pa/xm-pahpux.h
1037 xmake_file=pa/x-pa-hpux
1039 if test x$gas = xyes
1041 tm_file="${tm_file} pa/pa-gas.h"
1043 if test x$enable_threads = x; then
1044 enable_threads=$have_pthread_h
1046 if test x$enable_threads = xyes; then
1048 tmake_file="${tmake_file} pa/t-dce-thr"
1050 install_headers_dir=install-headers-cpio
1053 hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
1054 target_cpu_default="MASK_PA_11"
1055 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
1057 xm_file=pa/xm-pahpux.h
1058 xmake_file=pa/x-pa-hpux
1060 if test x$gas = xyes
1062 tm_file="${tm_file} pa/pa-gas.h"
1064 # if test x$enable_threads = x; then
1065 # enable_threads=$have_pthread_h
1067 # if test x$enable_threads = xyes; then
1069 # tmake_file="${tmake_file} pa/t-dce-thr"
1071 install_headers_dir=install-headers-cpio
1075 tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
1077 xm_file=pa/xm-pahpux.h
1078 xmake_file=pa/x-pa-hpux
1079 if test x$gas = xyes
1081 tm_file="${tm_file} pa/pa-gas.h"
1083 # if test x$enable_threads = x; then
1084 # enable_threads=$have_pthread_h
1086 # if test x$enable_threads = xyes; then
1088 # tmake_file="${tmake_file} pa/t-dce-thr"
1090 install_headers_dir=install-headers-cpio
1093 hppa1.1-*-hpux* | hppa2*-*-hpux*)
1094 target_cpu_default="MASK_PA_11"
1095 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
1096 xm_file=pa/xm-pahpux.h
1097 xmake_file=pa/x-pa-hpux
1098 if test x$gas = xyes
1100 tm_file="${tm_file} pa/pa-gas.h"
1102 install_headers_dir=install-headers-cpio
1106 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hpux9.h"
1107 xm_file=pa/xm-pahpux.h
1108 xmake_file=pa/x-pa-hpux
1109 if test x$gas = xyes
1111 tm_file="${tm_file} pa/pa-gas.h"
1113 install_headers_dir=install-headers-cpio
1116 hppa1.1-*-hiux* | hppa2*-*-hiux*)
1117 target_cpu_default="MASK_PA_11"
1118 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
1119 xm_file=pa/xm-pahpux.h
1120 xmake_file=pa/x-pa-hpux
1121 if test x$gas = xyes
1123 tm_file="${tm_file} pa/pa-gas.h"
1125 install_headers_dir=install-headers-cpio
1129 tm_file="${tm_file} pa/pa32-regs.h pa/som.h pa/pa-hpux.h pa/pa-hiux.h"
1130 xm_file=pa/xm-pahpux.h
1131 xmake_file=pa/x-pa-hpux
1132 if test x$gas = xyes
1134 tm_file="${tm_file} pa/pa-gas.h"
1136 install_headers_dir=install-headers-cpio
1140 tm_file="${tm_file} pa/pa32-regs.h elfos.h pa/elf.h"
1141 target_cpu_default="MASK_PA_11"
1145 tm_file="${tm_file} pa/pa-mpeix.h"
1146 xm_file=pa/xm-pampeix.h
1147 xmake_file=pa/x-pa-mpeix
1148 echo "You must use gas. Assuming it is already installed."
1149 install_headers_dir=install-headers-tar
1152 i370-*-opened*) # IBM 360/370/390 Architecture
1153 xm_file=i370/xm-oe.h
1155 xmake_file=i370/x-oe
1156 tmake_file=i370/t-oe
1159 xm_file=i370/xm-mvs.h
1161 tmake_file=i370/t-mvs
1164 xm_file="xm-linux.h i370/xm-linux.h"
1166 tm_file="i370/linux.h ${tm_file}"
1167 tmake_file="t-linux i370/t-linux"
1168 # broken_install=yes
1169 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1170 # extra_parts="crtbegin.o crtend.o"
1174 if test x$enable_threads = xyes; then
1181 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h"
1182 tm_file=i386/i386elf.h
1183 tmake_file=i386/t-i386elf
1187 i[34567]86-ibm-aix*) # IBM PS/2 running AIX
1189 if test x$gas = xyes
1191 tm_file=i386/aix386.h
1192 extra_parts="crtbegin.o crtend.o"
1193 tmake_file=i386/t-crtstuff
1195 tm_file=i386/aix386ng.h
1198 xm_file="xm-alloca.h i386/xm-aix.h ${xm_file}"
1200 xmake_file=i386/x-aix
1203 i[34567]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
1205 xm_file="xm-alloca.h ${xm_file}"
1206 xm_defines="USG POSIX SMALL_ARG_MAX"
1207 xmake_file=i386/x-ncr3000
1208 if test x$stabs = xyes -a x$gas = xyes
1210 tm_file=i386/sysv4gdb.h
1212 tm_file=i386/sysv4.h
1214 extra_parts="crtbegin.o crtend.o"
1215 tmake_file=i386/t-crtpic
1221 xm_file=i386/xm-next.h
1222 tmake_file=i386/t-next
1223 xmake_file=i386/x-next
1224 extra_objs=nextstep.o
1225 extra_parts="crtbegin.o crtend.o"
1226 if test x$enable_threads = xyes; then
1231 i[34567]86-sequent-bsd*) # 80386 from Sequent
1234 if test x$gas = xyes
1236 tm_file=i386/seq-gas.h
1238 tm_file=i386/sequent.h
1242 i[34567]86-sequent-ptx1*)
1244 xm_defines="USG SVR3"
1245 xmake_file=i386/x-sysv3
1246 tm_file=i386/seq-sysv3.h
1247 tmake_file=i386/t-crtstuff
1248 extra_parts="crtbegin.o crtend.o"
1249 install_headers_dir=install-headers-cpio
1252 i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
1254 xm_defines="USG SVR3"
1255 xmake_file=i386/x-sysv3
1256 tm_file=i386/seq2-sysv3.h
1257 tmake_file=i386/t-crtstuff
1258 extra_parts="crtbegin.o crtend.o"
1259 install_headers_dir=install-headers-cpio
1262 i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
1264 xm_file="xm-alloca.h ${xm_file}"
1265 xm_defines="USG POSIX SMALL_ARG_MAX"
1267 tm_file=i386/ptx4-i.h
1269 extra_parts="crtbegin.o crtend.o"
1270 install_headers_dir=install-headers-cpio
1272 i386-sun-sunos*) # Sun i386 roadrunner
1278 i[34567]86-wrs-vxworks*)
1280 tm_file=i386/vxi386.h
1281 tmake_file=i386/t-i386bare
1282 thread_file='vxworks'
1287 tm_file=i386/i386-aout.h
1288 tmake_file=i386/t-i386bare
1291 i[34567]86-*-beospe*)
1293 xm_file=i386/xm-beos.h
1294 xm_defines="USE_C_ALLOCA"
1295 tmake_file=i386/t-beos
1296 tm_file=i386/beos-pe.h
1297 xmake_file=i386/x-beos
1301 i[34567]86-*-beoself* | i[34567]86-*-beos*)
1303 xm_file=i386/xm-beos.h
1304 tmake_file='i386/t-beos i386/t-crtpic'
1305 tm_file=i386/beos-elf.h
1306 xmake_file=i386/x-beos
1308 extra_parts='crtbegin.o crtend.o'
1311 i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
1313 tm_file=i386/bsd386.h
1314 # tmake_file=t-libc-ok
1319 tm_file=i386/386bsd.h
1320 # tmake_file=t-libc-ok
1321 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
1325 i[34567]86-*-freebsdelf*)
1327 tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd-elf.h i386/perform.h"
1328 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1329 tmake_file=t-freebsd
1333 case x${enable_threads} in
1334 xyes | xpthreads | xposix)
1336 tmake_file="${tmake_file} t-freebsd-thread"
1341 i[34567]86-*-freebsd*)
1343 tm_file="i386/freebsd.h i386/perform.h"
1344 tmake_file=t-freebsd
1347 i[34567]86-*-netbsd*)
1349 tm_file=i386/netbsd.h
1354 i[34567]86-*-openbsd*)
1356 # we need collect2 until our bug is fixed...
1362 tm_file=i386/i386-coff.h
1363 tmake_file=i386/t-i386bare
1366 i[34567]86-*-isc*) # 80386 running ISC system
1368 xm_file="${xm_file} i386/xm-isc.h"
1369 xm_defines="USG SVR3"
1372 i[34567]86-*-isc[34]*)
1374 xmake_file=i386/x-isc3
1377 xmake_file=i386/x-isc
1380 if test x$gas = xyes -a x$stabs = xyes
1382 tm_file=i386/iscdbx.h
1383 tmake_file=i386/t-svr3dbx
1384 extra_parts="svr3.ifile svr3z.ifile"
1386 tm_file=i386/isccoff.h
1387 tmake_file=i386/t-crtstuff
1388 extra_parts="crtbegin.o crtend.o"
1390 install_headers_dir=install-headers-cpio
1393 i[34567]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
1394 changequote([,])dnl # with a.out format using
1396 xmake_file=x-linux-aout
1397 tmake_file="t-linux-aout i386/t-crtstuff"
1398 tm_file=i386/linux-oldld.h
1403 i[34567]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
1404 changequote([,])dnl # with a.out format
1405 xmake_file=x-linux-aout
1406 tmake_file="t-linux-aout i386/t-crtstuff"
1407 tm_file=i386/linux-aout.h
1412 i[34567]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
1413 changequote([,])dnl # with ELF format using the
1414 # GNU/Linux C library 5
1416 tm_file=i386/linux.h
1417 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
1418 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1421 if test x$enable_threads = xyes; then
1422 thread_file='single'
1426 i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
1427 changequote([,])dnl # with ELF format using glibc 2
1428 # aka GNU/Linux C library 6
1430 tm_file=i386/linux.h
1431 tmake_file="t-linux i386/t-crtstuff"
1432 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1435 if test x$enable_threads = xyes; then
1445 i[34567]86-go32-msdos | i[34567]86-*-go32*)
1447 echo "GO32/DJGPP V1.X is no longer supported. Use *-pc-msdosdjgpp for DJGPP V2.X instead."
1451 i[34567]86-pc-msdosdjgpp*)
1453 xm_file=i386/xm-djgpp.h
1454 tm_file=i386/djgpp.h
1455 tmake_file=i386/t-djgpp
1456 xmake_file=i386/x-djgpp
1460 case $host in *pc-msdosdjgpp*)
1466 i[34567]86-moss-msdos* | i[34567]86-*-moss*)
1469 tmake_file=t-libc-ok
1474 i[34567]86-*-lynxos*)
1476 if test x$gas = xyes
1480 tm_file=i386/lynx-ng.h
1482 xm_file=i386/xm-lynx.h
1483 tmake_file=i386/t-i386bare
1490 # tmake_file=t-libc-ok
1494 i[34567]86-*-osfrose*) # 386 using OSF/rose
1496 if test x$elf = xyes
1498 tm_file=i386/osfelf.h
1501 tm_file=i386/osfrose.h
1504 xm_file="i386/xm-osf.h ${xm_file}"
1505 xmake_file=i386/x-osfrose
1506 tmake_file=i386/t-osf
1507 extra_objs=halfpic.o
1510 i[34567]86-go32-rtems*)
1513 xm_file=i386/xm-go32.h
1514 tm_file=i386/go32-rtems.h
1515 tmake_file="i386/t-go32 t-rtems"
1518 i[34567]86-*-rtemscoff*)
1521 tm_file=i386/rtems.h
1522 tmake_file="i386/t-i386bare t-rtems"
1525 i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
1528 tm_file=i386/rtemself.h
1529 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
1530 tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
1533 i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
1535 xm_file="xm-alloca.h ${xm_file} i386/xm-sco5.h"
1536 xm_defines="USG SVR3"
1537 xmake_file=i386/x-sco5
1538 install_headers_dir=install-headers-cpio
1540 if test x$gas = xyes
1542 tm_file="i386/sco5gas.h ${tm_file}"
1543 tmake_file=i386/t-sco5gas
1545 tmake_file=i386/t-sco5
1547 extra_parts="crti.o crtbegin.o crtend.o crtbeginS.o crtendS.o"
1550 i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
1552 xm_file="${xm_file} i386/xm-sco.h"
1553 xm_defines="USG SVR3 BROKEN_LDEXP SMALL_ARG_MAX"
1554 xmake_file=i386/x-sco4
1555 install_headers_dir=install-headers-cpio
1556 if test x$stabs = xyes
1558 tm_file=i386/sco4dbx.h
1559 tmake_file=i386/t-svr3dbx
1560 extra_parts="svr3.ifile svr3z.rfile"
1563 tmake_file=i386/t-crtstuff
1564 extra_parts="crtbegin.o crtend.o"
1566 # The default EAFS filesystem supports long file names.
1567 # Truncating the target makes $host != $target which
1568 # makes gcc think it is doing a cross-compile.
1569 # truncate_target=yes
1572 i[34567]86-*-sco*) # 80386 running SCO system
1574 xm_file=i386/xm-sco.h
1575 xmake_file=i386/x-sco
1576 install_headers_dir=install-headers-cpio
1577 if test x$stabs = xyes
1579 tm_file=i386/scodbx.h
1580 tmake_file=i386/t-svr3dbx
1581 extra_parts="svr3.ifile svr3z.rfile"
1584 extra_parts="crtbegin.o crtend.o"
1585 tmake_file=i386/t-crtstuff
1590 i[34567]86-*-solaris2*)
1592 xm_file="xm-alloca.h ${xm_file}"
1593 xm_defines="USG POSIX SMALL_ARG_MAX"
1595 if test x$gas = xyes; then
1596 # Only needed if gas does not support -s
1597 tm_file="i386/sol2gas.h ${tm_file}"
1599 tmake_file=i386/t-sol2
1600 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
1602 if test x${enable_threads} = x; then
1603 enable_threads=$have_pthread_h
1604 if test x${enable_threads} = x; then
1605 enable_threads=$have_thread_h
1608 if test x${enable_threads} = xyes; then
1609 if test x${have_pthread_h} = xyes; then
1612 thread_file='solaris'
1617 i[34567]86-*-sysv5*) # Intel x86 on System V Release 5
1619 xm_file="xm-alloca.h ${xm_file}"
1620 xm_defines="USG POSIX"
1621 tm_file=i386/sysv5.h
1622 if test x$stabs = xyes
1624 tm_file="${tm_file} dbx.h"
1626 tmake_file=i386/t-crtpic
1628 extra_parts="crtbegin.o crtend.o"
1629 if test x$enable_threads = xyes; then
1634 i[34567]86-*-sysv4*) # Intel 80386's running system V.4
1636 xm_file="xm-alloca.h ${xm_file}"
1637 xm_defines="USG POSIX SMALL_ARG_MAX"
1638 tm_file=i386/sysv4.h
1639 if test x$stabs = xyes
1641 tm_file="${tm_file} dbx.h"
1643 tmake_file=i386/t-crtpic
1645 extra_parts="crtbegin.o crtend.o"
1648 i[34567]86-*-udk*) # Intel x86 on SCO UW/OSR5 Dev Kit
1650 xm_file="xm-alloca.h ${xm_file}"
1651 xm_defines="USG POSIX"
1653 tmake_file="i386/t-crtpic i386/t-udk"
1655 extra_parts="crtbegin.o crtend.o"
1656 install_headers_dir=install-headers-cpio
1659 i[34567]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
1662 xm_file="${xm_file} xm-svr4.h i386/xm-sysv4.h i386/xm-osf1elf.h"
1663 xm_defines="USE_C_ALLOCA SMALL_ARG_MAX"
1664 if test x$stabs = xyes
1666 tm_file=i386/osf1elfgdb.h
1668 tm_file=i386/osf1elf.h
1670 tmake_file=i386/t-osf1elf
1671 xmake_file=i386/x-osf1elf
1672 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
1675 i[34567]86-*-sysv*) # Intel 80386's running system V
1677 xm_defines="USG SVR3"
1678 xmake_file=i386/x-sysv3
1679 if test x$gas = xyes
1681 if test x$stabs = xyes
1683 tm_file=i386/svr3dbx.h
1684 tmake_file=i386/t-svr3dbx
1685 extra_parts="svr3.ifile svr3z.rfile"
1687 tm_file=i386/svr3gas.h
1688 extra_parts="crtbegin.o crtend.o"
1689 tmake_file=i386/t-crtstuff
1692 tm_file=i386/sysv3.h
1693 extra_parts="crtbegin.o crtend.o"
1694 tmake_file=i386/t-crtstuff
1697 i386-*-vsta) # Intel 80386's running VSTa kernel
1698 xm_file="${xm_file} i386/xm-vsta.h"
1700 tmake_file=i386/t-vsta
1701 xmake_file=i386/x-vsta
1706 xm_file="${xm_file} i386/xm-cygwin.h"
1707 tmake_file=i386/t-cygwin
1708 tm_file=i386/win32.h
1709 xmake_file=i386/x-cygwin
1711 if test x$enable_threads = xyes; then
1717 i[34567]86-*-pe | i[34567]86-*-cygwin*)
1719 xm_file="${xm_file} i386/xm-cygwin.h"
1720 tmake_file=i386/t-cygwin
1721 tm_file=i386/cygwin.h
1722 xmake_file=i386/x-cygwin
1724 if test x$enable_threads = xyes; then
1730 i[34567]86-*-mingw32*)
1732 tm_file=i386/mingw32.h
1733 xm_file="${xm_file} i386/xm-mingw32.h"
1734 tmake_file="i386/t-cygwin i386/t-mingw32"
1736 xmake_file=i386/x-cygwin
1737 if test x$enable_threads = xyes; then
1744 *minwg32crt* | *mingw32*)
1745 tm_file="${tm_file} i386/crtdll.h"
1753 xm_file="${xm_file} i386/xm-uwin.h"
1754 xm_defines="USG NO_STAB_H"
1755 tmake_file="i386/t-cygwin i386/t-uwin"
1757 xmake_file=i386/x-cygwin
1758 if test x$enable_threads = xyes; then
1764 i[34567]86-*-interix*)
1766 tm_file="i386/i386-interix.h interix.h"
1767 xm_file="i386/xm-i386-interix.h xm-interix.h"
1769 tmake_file="i386/t-interix"
1770 extra_objs=interix.o
1771 xmake_file=x-interix
1772 if test x$enable_threads = xyes ; then
1775 if test x$stabs = xyes ; then
1776 tm_file="${tm_file} dbxcoff.h"
1780 i[34567]86-*-winnt3*)
1782 tm_file=i386/win-nt.h
1783 out_file=i386/i386.c
1784 xm_file="xm-winnt.h ${xm_file}"
1785 xmake_file=winnt/x-winnt
1786 tmake_file=i386/t-winnt
1787 extra_host_objs="winnt.o oldnames.o"
1788 extra_gcc_objs="spawnv.o oldnames.o"
1789 if test x$gnu_ld != xyes
1791 extra_programs=ld.exe
1793 if test x$enable_threads = xyes; then
1798 i[34567]86-dg-dgux*)
1800 xm_file="xm-alloca.h ${xm_file}"
1801 xm_defines="USG POSIX"
1802 out_file=i386/dgux.c
1804 tmake_file=i386/t-dgux
1805 xmake_file=i386/x-dgux
1806 install_headers_dir=install-headers-cpio
1808 i860-alliant-*) # Alliant FX/2800
1809 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1810 xm_file="${xm_file}"
1811 xmake_file=i860/x-fx2800
1812 tmake_file=i860/t-fx2800
1813 extra_parts="crtbegin.o crtend.o"
1816 tm_file="${tm_file} i860/bsd.h"
1817 if test x$gas = xyes
1819 tm_file="${tm_file} i860/bsd-gas.h"
1824 tm_file="${tm_file} i860/mach.h"
1825 tmake_file=t-libc-ok
1827 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1828 tm_file="${tm_file} svr3.h i860/paragon.h"
1829 xm_defines="USG SVR3"
1833 tm_file="${tm_file} svr3.h i860/sysv3.h"
1834 xm_defines="USG SVR3"
1835 xmake_file=i860/x-sysv3
1836 extra_parts="crtbegin.o crtend.o"
1839 tm_file="${tm_file} svr4.h i860/sysv4.h"
1840 xm_defines="USG SVR3"
1841 xmake_file=i860/x-sysv4
1843 extra_parts="crtbegin.o crtend.o"
1845 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1846 tm_file="${tm_file} i960/vx960.h"
1847 tmake_file=i960/t-vxworks960
1849 thread_file='vxworks'
1851 i960-wrs-vxworks5* | i960-wrs-vxworks)
1852 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1853 tmake_file=i960/t-vxworks960
1855 thread_file='vxworks'
1858 tm_file="${tm_file} i960/vx960.h"
1859 tmake_file=i960/t-vxworks960
1861 thread_file='vxworks'
1864 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1865 tmake_file=i960/t-960bare
1869 tmake_file="i960/t-960bare t-rtems"
1870 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1873 i960-*-*) # Default i960 environment.
1878 tmake_file="ia64/t-ia64"
1879 target_cpu_default="0"
1880 if test x$gas = xyes
1882 target_cpu_default="${target_cpu_default}|MASK_GNU_AS"
1884 if test x$gnu_ld = xyes
1886 target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
1890 tm_file=ia64/linux.h
1891 tmake_file="t-linux ia64/t-ia64"
1892 target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
1893 if test x$enable_threads = xyes; then
1898 extra_parts="crtinit.o crtfini.o"
1900 m68000-convergent-sysv*)
1902 xm_file="m68k/xm-3b1.h ${xm_file}"
1905 extra_headers=math-68881.h
1907 m68000-hp-bsd*) # HP 9000/200 running BSD
1908 tm_file=m68k/hp2bsd.h
1909 xmake_file=m68k/x-hp2bsd
1911 extra_headers=math-68881.h
1913 m68000-hp-hpux*) # HP 9000 series 300
1914 xm_file="xm-alloca.h ${xm_file}"
1916 if test x$gas = xyes
1918 xmake_file=m68k/x-hp320g
1919 tm_file=m68k/hp310g.h
1921 xmake_file=m68k/x-hp320
1922 tm_file=m68k/hp310.h
1924 install_headers_dir=install-headers-cpio
1926 extra_headers=math-68881.h
1931 extra_headers=math-68881.h
1934 tm_file=m68k/sun2o4.h
1936 extra_headers=math-68881.h
1939 xm_file="m68k/xm-3b1.h ${xm_file}"
1941 if test x$gas = xyes
1948 extra_headers=math-68881.h
1950 m68k-apple-aux*) # Apple Macintosh running A/UX
1951 xm_defines="USG AUX"
1952 tmake_file=m68k/t-aux
1953 install_headers_dir=install-headers-cpio
1954 extra_headers=math-68881.h
1955 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1957 if test "$gnu_ld" = yes
1959 tm_file="${tm_file} m68k/auxgld.h"
1961 tm_file="${tm_file} m68k/auxld.h"
1963 if test "$gas" = yes
1965 tm_file="${tm_file} m68k/auxgas.h"
1967 tm_file="${tm_file} m68k/auxas.h"
1969 tm_file="${tm_file} m68k/a-ux.h"
1973 tm_file=m68k/apollo68.h
1974 xmake_file=m68k/x-apollo68
1976 extra_headers=math-68881.h
1979 m68k-altos-sysv*) # Altos 3068
1980 if test x$gas = xyes
1982 tm_file=m68k/altos3068.h
1985 echo "The Altos is supported only with the GNU assembler" 1>&2
1988 extra_headers=math-68881.h
1990 m68k-bull-sysv*) # Bull DPX/2
1991 if test x$gas = xyes
1993 if test x$stabs = xyes
1995 tm_file=m68k/dpx2cdbx.h
1997 tm_file=m68k/dpx2g.h
2002 xm_file="xm-alloca.h ${xm_file}"
2004 xmake_file=m68k/x-dpx2
2006 extra_headers=math-68881.h
2008 m68k-atari-sysv4*) # Atari variant of V.4.
2009 tm_file=m68k/atari.h
2010 xm_file="xm-alloca.h ${xm_file}"
2011 xm_defines="USG FULL_PROTOTYPES"
2013 extra_parts="crtbegin.o crtend.o"
2014 extra_headers=math-68881.h
2017 m68k-motorola-sysv*)
2018 tm_file=m68k/mot3300.h
2019 xm_file="xm-alloca.h m68k/xm-mot3300.h ${xm_file}"
2020 if test x$gas = xyes
2022 xmake_file=m68k/x-mot3300-gas
2023 if test x$gnu_ld = xyes
2025 tmake_file=m68k/t-mot3300-gald
2027 tmake_file=m68k/t-mot3300-gas
2031 xmake_file=m68k/x-mot3300
2032 if test x$gnu_ld = xyes
2034 tmake_file=m68k/t-mot3300-gld
2036 tmake_file=m68k/t-mot3300
2040 gdb_needs_out_file_path=yes
2041 extra_parts="crt0.o mcrt0.o"
2042 extra_headers=math-68881.h
2045 m68k-ncr-sysv*) # NCR Tower 32 SVR3
2046 tm_file=m68k/tower-as.h
2047 xm_defines="USG SVR3"
2048 xmake_file=m68k/x-tower
2049 extra_parts="crtbegin.o crtend.o"
2050 extra_headers=math-68881.h
2053 tm_file=m68k/plexus.h
2054 xm_file="xm-alloca.h m68k/xm-plexus.h ${xm_file}"
2057 extra_headers=math-68881.h
2061 xm_file="xm-alloca.h ${xm_file}"
2063 extra_headers=math-68881.h
2066 xm_file="xm-alloca.h m68k/xm-crds.h ${xm_file}"
2067 xm_defines="USG unos"
2068 xmake_file=m68k/x-crds
2071 extra_headers=math-68881.h
2073 m68k-cbm-sysv4*) # Commodore variant of V.4.
2075 xm_file="xm-alloca.h ${xm_file}"
2076 xm_defines="USG FULL_PROTOTYPES"
2077 xmake_file=m68k/x-amix
2079 extra_parts="crtbegin.o crtend.o"
2080 extra_headers=math-68881.h
2084 tm_file=m68k/ccur-GAS.h
2085 xmake_file=m68k/x-ccur
2086 extra_headers=math-68881.h
2090 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
2091 tm_file=m68k/hp3bsd44.h
2092 xmake_file=m68k/x-hp3bsd44
2094 extra_headers=math-68881.h
2097 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
2098 tm_file=m68k/hp3bsd.h
2100 extra_headers=math-68881.h
2104 if test x$with_fp = xno
2106 tm_file=m68k/isi-nfp.h
2112 extra_headers=math-68881.h
2114 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
2115 xm_file="xm-alloca.h ${xm_file}"
2117 if test x$gas = xyes
2119 xmake_file=m68k/x-hp320g
2120 tm_file=m68k/hp320g.h
2122 xmake_file=m68k/x-hp320
2123 tm_file=m68k/hpux7.h
2125 install_headers_dir=install-headers-cpio
2127 extra_headers=math-68881.h
2130 m68k-hp-hpux*) # HP 9000 series 300
2131 xm_file="xm-alloca.h ${xm_file}"
2133 if test x$gas = xyes
2135 xmake_file=m68k/x-hp320g
2136 tm_file=m68k/hp320g.h
2138 xmake_file=m68k/x-hp320
2139 tm_file=m68k/hp320.h
2141 install_headers_dir=install-headers-cpio
2143 extra_headers=math-68881.h
2147 tm_file=m68k/sun3mach.h
2149 extra_headers=math-68881.h
2153 if test x$gas = xyes
2155 tm_file=m68k/news3gas.h
2157 tm_file=m68k/news3.h
2160 extra_headers=math-68881.h
2163 m68k-sony-bsd* | m68k-sony-newsos*)
2164 if test x$gas = xyes
2166 tm_file=m68k/newsgas.h
2171 extra_headers=math-68881.h
2174 m68k-next-nextstep2*)
2175 tm_file=m68k/next21.h
2176 xm_file="m68k/xm-next.h ${xm_file}"
2177 tmake_file=m68k/t-next
2178 xmake_file=m68k/x-next
2179 extra_objs=nextstep.o
2180 extra_headers=math-68881.h
2185 m68k-next-nextstep[34]*)
2188 xm_file="m68k/xm-next.h ${xm_file}"
2189 tmake_file=m68k/t-next
2190 xmake_file=m68k/x-next
2191 extra_objs=nextstep.o
2192 extra_parts="crtbegin.o crtend.o"
2193 extra_headers=math-68881.h
2195 if test x$enable_threads = xyes; then
2200 if test x$with_fp = xno
2202 tm_file=m68k/sun3n3.h
2204 tm_file=m68k/sun3o3.h
2208 extra_headers=math-68881.h
2210 m68k-sun-sunos*) # For SunOS 4 (the default).
2211 if test x$with_fp = xno
2213 tm_file=m68k/sun3n.h
2219 extra_headers=math-68881.h
2222 tm_file=m68k/vxm68k.h
2223 tmake_file=m68k/t-vxworks68
2224 extra_headers=math-68881.h
2225 thread_file='vxworks'
2229 tmake_file=m68k/t-m68kbare
2230 tm_file="m68k/m68k-aout.h libgloss.h"
2231 extra_headers=math-68881.h
2235 tmake_file=m68k/t-m68kbare
2236 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
2237 extra_headers=math-68881.h
2240 m68020-*-elf* | m68k-*-elf*)
2241 tm_file="m68k/m68020-elf.h"
2242 xm_file=m68k/xm-m68kv.h
2243 tmake_file=m68k/t-m68kelf
2244 header_files=math-68881.h
2247 if test x$gas = xyes
2251 tm_file=m68k/lynx-ng.h
2253 xm_file=m68k/xm-lynx.h
2255 tmake_file=m68k/t-lynx
2256 extra_headers=math-68881.h
2260 tm_file=m68k/netbsd.h
2267 # we need collect2 until our bug is fixed...
2270 m68k-*-sysv3*) # Motorola m68k's running system V.3
2271 xm_file="xm-alloca.h ${xm_file}"
2273 xmake_file=m68k/x-m68kv
2274 extra_parts="crtbegin.o crtend.o"
2275 extra_headers=math-68881.h
2278 m68k-*-sysv4*) # Motorola m68k's running system V.4
2279 tm_file=m68k/m68kv4.h
2280 xm_file="xm-alloca.h ${xm_file}"
2283 extra_parts="crtbegin.o crtend.o"
2284 extra_headers=math-68881.h
2287 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
2290 tm_file=m68k/linux-aout.h
2291 tmake_file="t-linux-aout m68k/t-linux-aout"
2292 extra_headers=math-68881.h
2296 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
2297 # with ELF format using the
2298 # GNU/Linux C library 5
2300 tm_file=m68k/linux.h
2301 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
2302 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2303 extra_headers=math-68881.h
2307 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
2308 # with ELF format using glibc 2
2309 # aka the GNU/Linux C library 6.
2311 tm_file=m68k/linux.h
2312 tmake_file="t-linux m68k/t-linux"
2313 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2314 extra_headers=math-68881.h
2317 if test x$enable_threads = xyes; then
2322 tmake_file=m68k/t-m68kbare
2323 tm_file=m68k/m68k-psos.h
2324 extra_headers=math-68881.h
2328 tmake_file="m68k/t-m68kbare t-rtems"
2329 tm_file=m68k/rtems.h
2330 extra_headers=math-68881.h
2333 m68k-*-rtemself*|m68k-*-rtems*)
2334 tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
2335 tm_file=m68k/rtemself.h
2336 extra_headers=math-68881.h
2342 tm_file=m88k/dguxbcs.h
2343 tmake_file=m88k/t-dguxbcs
2347 tmake_file=m88k/t-dgux
2350 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
2351 xmake_file=m88k/x-dgux
2352 if test x$gas = xyes
2354 tmake_file=m88k/t-dgux-gas
2357 m88k-dolphin-sysv3*)
2358 tm_file=m88k/dolph.h
2359 extra_parts="crtbegin.o crtend.o"
2360 xm_file="m88k/xm-sysv3.h ${xm_file}"
2361 xmake_file=m88k/x-dolph
2362 if test x$gas = xyes
2364 tmake_file=m88k/t-m88k-gas
2367 m88k-tektronix-sysv3)
2368 tm_file=m88k/tekXD88.h
2369 extra_parts="crtbegin.o crtend.o"
2370 xm_file="m88k/xm-sysv3.h ${xm_file}"
2371 xmake_file=m88k/x-tekXD88
2372 if test x$gas = xyes
2374 tmake_file=m88k/t-m88k-gas
2378 tm_file=m88k/m88k-aout.h
2381 tm_file=m88k/m88k-coff.h
2382 tmake_file=m88k/t-bug
2386 extra_parts="crtbegin.o crtend.o"
2387 if test x$gas = xyes
2389 tmake_file=m88k/t-luna-gas
2391 tmake_file=m88k/t-luna
2395 tmake_file="${tmake_file} m88k/t-luna-gas"
2398 tm_file=m88k/sysv3.h
2399 extra_parts="crtbegin.o crtend.o"
2400 xm_file="m88k/xm-sysv3.h ${xm_file}"
2401 xmake_file=m88k/x-sysv3
2402 if test x$gas = xyes
2404 tmake_file=m88k/t-m88k-gas
2408 tm_file=m88k/sysv4.h
2409 extra_parts="crtbegin.o crtend.o"
2410 xmake_file=m88k/x-sysv4
2411 tmake_file=m88k/t-sysv4
2414 tm_file=mcore/mcore-elf.h
2415 tmake_file=mcore/t-mcore
2418 tm_file=mcore/mcore-pe.h
2419 tmake_file=mcore/t-mcore-pe
2421 mips-sgi-irix6*) # SGI System V.4., IRIX 6
2422 if test "x$gnu_ld" = xyes
2424 tm_file="mips/iris6.h mips/iris6gld.h"
2426 tm_file=mips/iris6.h
2428 tmake_file=mips/t-iris6
2429 xm_file=mips/xm-iris6.h
2430 xmake_file=mips/x-iris6
2431 # if test x$enable_threads = xyes; then
2432 # thread_file='irix'
2436 tm_file="mips/elf.h mips/vxworks.h"
2437 tmake_file=mips/t-ecoff
2440 extra_parts="crtbegin.o crtend.o"
2441 thread_file='vxworks'
2443 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
2444 tm_file="mips/iris6.h mips/cross64.h"
2446 xm_file="mips/xm-iris5.h"
2447 xmake_file=mips/x-iris
2448 tmake_file=mips/t-cross64
2449 # See comment in mips/iris[56].h files.
2451 # if test x$enable_threads = xyes; then
2452 # thread_file='irix'
2456 if test x$gas = xyes
2458 if test x$stabs = xyes
2460 tm_file=mips/iris5gdb.h
2462 tm_file="mips/sni-svr4.h mips/sni-gas.h"
2465 tm_file=mips/sni-svr4.h
2468 xmake_file=mips/x-sni-svr4
2469 tmake_file=mips/t-mips-gas
2470 if test x$gnu_ld != xyes
2475 mips-sgi-irix5*) # SGI System V.4., IRIX 5
2476 if test x$gas = xyes
2478 tm_file="mips/iris5.h mips/iris5gas.h"
2479 if test x$stabs = xyes
2481 tm_file="${tm_file} dbx.h"
2484 tm_file=mips/iris5.h
2487 xm_file="mips/xm-iris5.h"
2488 xmake_file=mips/x-iris
2489 # mips-tfile doesn't work yet
2490 tmake_file=mips/t-mips-gas
2491 # See comment in mips/iris5.h file.
2493 # if test x$enable_threads = xyes; then
2494 # thread_file='irix'
2497 mips-sgi-irix4loser*) # Mostly like a MIPS.
2498 tm_file="mips/iris4loser.h mips/iris3.h ${tm_file} mips/iris4.h"
2499 if test x$stabs = xyes; then
2500 tm_file="${tm_file} dbx.h"
2503 xmake_file=mips/x-iris
2504 if test x$gas = xyes
2506 tmake_file=mips/t-mips-gas
2508 extra_passes="mips-tfile mips-tdump"
2510 if test x$gnu_ld != xyes
2514 # if test x$enable_threads = xyes; then
2515 # thread_file='irix'
2518 mips-sgi-irix4*) # Mostly like a MIPS.
2519 tm_file="mips/iris3.h ${tm_file} mips/iris4.h"
2520 if test x$stabs = xyes; then
2521 tm_file="${tm_file} dbx.h"
2524 xmake_file=mips/x-iris
2525 if test x$gas = xyes
2527 tmake_file=mips/t-mips-gas
2529 extra_passes="mips-tfile mips-tdump"
2531 if test x$gnu_ld != xyes
2535 # if test x$enable_threads = xyes; then
2536 # thread_file='irix'
2539 mips-sgi-*) # Mostly like a MIPS.
2540 tm_file="mips/iris3.h ${tm_file}"
2541 if test x$stabs = xyes; then
2542 tm_file="${tm_file} dbx.h"
2545 xmake_file=mips/x-iris3
2546 if test x$gas = xyes
2548 tmake_file=mips/t-mips-gas
2550 extra_passes="mips-tfile mips-tdump"
2552 if test x$gnu_ld != xyes
2557 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
2558 tm_file="mips/osfrose.h ${tm_file}"
2559 xmake_file=mips/x-osfrose
2560 tmake_file=mips/t-osfrose
2561 extra_objs=halfpic.o
2564 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
2565 tm_file=mips/dec-osf1.h
2566 if test x$stabs = xyes; then
2567 tm_file="${tm_file} dbx.h"
2569 xmake_file=mips/x-dec-osf1
2570 if test x$gas = xyes
2572 tmake_file=mips/t-mips-gas
2574 tmake_file=mips/t-ultrix
2575 extra_passes="mips-tfile mips-tdump"
2577 if test x$gnu_ld != xyes
2582 mips-dec-bsd*) # Decstation running 4.4 BSD
2583 tm_file=mips/dec-bsd.h
2584 if test x$gas = xyes
2586 tmake_file=mips/t-mips-gas
2588 tmake_file=mips/t-ultrix
2589 extra_passes="mips-tfile mips-tdump"
2591 if test x$gnu_ld != xyes
2596 mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
2597 tm_file=mips/netbsd.h
2598 # On NetBSD, the headers are already okay, except for math.h.
2601 mips*-*-linux*) # Linux MIPS, either endian.
2604 mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;;
2605 *) tm_file="mips/elf.h mips/linux.h" ;;
2607 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2610 if test x$enable_threads = xyes; then
2614 mips*el-*-openbsd*) # mips little endian
2615 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2617 mips*-*-openbsd*) # mips big endian
2618 target_cpu_default="MASK_GAS|MASK_ABICALLS"
2619 tm_file="mips/openbsd-be.h ${tm_file}"
2621 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
2622 tm_file="mips/news4.h ${tm_file}"
2623 if test x$stabs = xyes; then
2624 tm_file="${tm_file} dbx.h"
2626 if test x$gas = xyes
2628 tmake_file=mips/t-mips-gas
2630 extra_passes="mips-tfile mips-tdump"
2632 if test x$gnu_ld != xyes
2636 xmake_file=mips/x-sony
2638 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
2639 # That is based on svr4.
2640 # t-svr4 is not right because this system doesn't use ELF.
2641 tm_file="mips/news5.h ${tm_file}"
2642 if test x$stabs = xyes; then
2643 tm_file="${tm_file} dbx.h"
2646 if test x$gas = xyes
2648 tmake_file=mips/t-mips-gas
2650 extra_passes="mips-tfile mips-tdump"
2652 if test x$gnu_ld != xyes
2657 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
2658 tm_file="mips/svr4-5.h mips/svr4-t.h"
2659 if test x$stabs = xyes; then
2660 tm_file="${tm_file} dbx.h"
2663 xmake_file=mips/x-sysv
2664 if test x$gas = xyes
2666 tmake_file=mips/t-mips-gas
2667 extra_parts="crtbegin.o crtend.o"
2669 tmake_file=mips/t-mips
2670 extra_passes="mips-tfile mips-tdump"
2672 if test x$gnu_ld != xyes
2677 mips-*-ultrix* | mips-dec-mach3) # Decstation.
2678 tm_file="mips/ultrix.h ${tm_file}"
2679 if test x$stabs = xyes; then
2680 tm_file="${tm_file} dbx.h"
2682 xmake_file=mips/x-ultrix
2683 if test x$gas = xyes
2685 tmake_file=mips/t-mips-gas
2687 tmake_file=mips/t-ultrix
2688 extra_passes="mips-tfile mips-tdump"
2690 if test x$gnu_ld != xyes
2696 mips-*-riscos[56789]bsd*)
2698 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
2699 if test x$stabs = xyes; then
2700 tm_file="${tm_file} dbx.h"
2702 if test x$gas = xyes
2704 tmake_file=mips/t-bsd-gas
2706 tmake_file=mips/t-bsd
2707 extra_passes="mips-tfile mips-tdump"
2709 if test x$gnu_ld != xyes
2715 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
2717 tm_file="mips/bsd-4.h ${tm_file}" # MIPS BSD 4.3, RISC-OS 4.0
2718 if test x$stabs = xyes; then
2719 tm_file="${tm_file} dbx.h"
2721 if test x$gas = xyes
2723 tmake_file=mips/t-bsd-gas
2725 tmake_file=mips/t-bsd
2726 extra_passes="mips-tfile mips-tdump"
2728 if test x$gnu_ld != xyes
2734 mips-*-riscos[56789]sysv4*)
2736 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
2737 if test x$stabs = xyes; then
2738 tm_file="${tm_file} dbx.h"
2740 xmake_file=mips/x-sysv
2741 if test x$gas = xyes
2743 tmake_file=mips/t-svr4-gas
2745 tmake_file=mips/t-svr4
2746 extra_passes="mips-tfile mips-tdump"
2748 if test x$gnu_ld != xyes
2754 mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
2756 tm_file="mips/svr4-4.h ${tm_file}"
2757 if test x$stabs = xyes; then
2758 tm_file="${tm_file} dbx.h"
2761 xmake_file=mips/x-sysv
2762 if test x$gas = xyes
2764 tmake_file=mips/t-svr4-gas
2766 tmake_file=mips/t-svr4
2767 extra_passes="mips-tfile mips-tdump"
2769 if test x$gnu_ld != xyes
2775 mips-*-riscos[56789]sysv*)
2777 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
2778 if test x$stabs = xyes; then
2779 tm_file="${tm_file} dbx.h"
2782 xmake_file=mips/x-sysv
2783 if test x$gas = xyes
2785 tmake_file=mips/t-svr3-gas
2787 tmake_file=mips/t-svr3
2788 extra_passes="mips-tfile mips-tdump"
2790 if test x$gnu_ld != xyes
2795 mips-*-sysv* | mips-*-riscos*sysv*)
2796 tm_file="mips/svr3-4.h ${tm_file}"
2797 if test x$stabs = xyes; then
2798 tm_file="${tm_file} dbx.h"
2801 xmake_file=mips/x-sysv
2802 if test x$gas = xyes
2804 tmake_file=mips/t-svr3-gas
2806 tmake_file=mips/t-svr3
2807 extra_passes="mips-tfile mips-tdump"
2809 if test x$gnu_ld != xyes
2815 mips-*-riscos[56789]*) # Default MIPS RISC-OS 5.0.
2817 tm_file=mips/mips-5.h
2818 if test x$stabs = xyes; then
2819 tm_file="${tm_file} dbx.h"
2821 if test x$gas = xyes
2823 tmake_file=mips/t-mips-gas
2825 extra_passes="mips-tfile mips-tdump"
2827 if test x$gnu_ld != xyes
2835 tm_file=mips/ecoffl.h
2836 if test x$stabs = xyes; then
2837 tm_file="${tm_file} dbx.h"
2839 tmake_file=mips/t-ecoff
2842 tm_file="gofast.h mips/ecoff.h"
2843 if test x$stabs = xyes; then
2844 tm_file="${tm_file} dbx.h"
2846 tmake_file=mips/t-ecoff
2849 tm_file="mips/elfl.h"
2850 tmake_file=mips/t-elf
2853 tm_file="mips/elf.h"
2854 tmake_file=mips/t-elf
2857 tm_file="mips/elfl64.h"
2858 tmake_file=mips/t-elf
2860 mips64orionel-*-elf*)
2861 tm_file="mips/elforion.h mips/elfl64.h"
2862 tmake_file=mips/t-elf
2865 tm_file="mips/elf64.h"
2866 tmake_file=mips/t-elf
2869 tm_file="mips/elforion.h mips/elf64.h"
2870 tmake_file=mips/t-elf
2872 mips64orion-*-rtems*)
2873 tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
2874 tmake_file="mips/t-elf t-rtems"
2877 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h"
2878 tmake_file=mips/t-r3900
2881 tm_file="mips/r3900.h mips/elf.h mips/abi64.h"
2882 tmake_file=mips/t-r3900
2884 mips-*-*) # Default MIPS RISC-OS 4.0.
2885 if test x$stabs = xyes; then
2886 tm_file="${tm_file} dbx.h"
2888 if test x$gas = xyes
2890 tmake_file=mips/t-mips-gas
2892 extra_passes="mips-tfile mips-tdump"
2894 if test x$gnu_ld != xyes
2902 tm_file="mn10200/mn10200.h"
2903 if test x$stabs = xyes
2905 tm_file="${tm_file} dbx.h"
2911 tm_file="mn10300/mn10300.h"
2912 if test x$stabs = xyes
2914 tm_file="${tm_file} dbx.h"
2919 tm_file=ns32k/encore.h
2923 tm_file=ns32k/sequent.h
2927 tm_file=ns32k/tek6100.h
2931 tm_file=ns32k/tek6200.h
2934 # This has not been updated to GCC 2.
2937 # xmake_file=ns32k/x-genix
2938 # tm_file=ns32k/genix.h
2942 tm_file=ns32k/merlin.h
2946 tm_file=ns32k/pc532-mach.h
2950 tm_file=ns32k/pc532-min.h
2951 xm_file="ns32k/xm-pc532-min.h ${xm-file}"
2956 tm_file=ns32k/netbsd.h
2957 xm_file="ns32k/xm-netbsd.h ${xm_file}"
2958 # On NetBSD, the headers are already okay, except for math.h.
2963 tm_file="${tm_file} pdp11/2bsd.h"
2972 # This has not been updated to GCC 2.
2975 # xmake_file=pyr/x-pyr
2980 tm_file="svr4.h pj/linux.h ${tm_file}"
2985 tm_file="svr4.h pj/pjl.h ${tm_file}"
2992 xmake_file=romp/x-mach
2999 tmake_file="${tmake_file} rs6000/t-rs6000 rs6000/t-openbsd"
3003 tm_file=rs6000/beos.h
3004 xm_file=rs6000/xm-beos.h
3005 tmake_file=rs6000/t-beos
3006 xmake_file=rs6000/x-beos
3009 tm_file=rs6000/sysv4.h
3010 xm_file="rs6000/xm-sysv4.h"
3011 xm_defines="USG POSIX"
3012 extra_headers=ppc-asm.h
3013 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3014 xmake_file=rs6000/x-sysv4
3017 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabiaix.h"
3018 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3019 extra_headers=ppc-asm.h
3022 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/eabisim.h"
3023 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3024 extra_headers=ppc-asm.h
3027 tm_file="rs6000/sysv4.h"
3028 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3029 extra_headers=ppc-asm.h
3032 tm_file="rs6000/sysv4.h rs6000/eabi.h"
3033 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3034 extra_headers=ppc-asm.h
3037 tm_file="rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h"
3038 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
3039 extra_headers=ppc-asm.h
3041 powerpc-*-linux-gnulibc1)
3042 tm_file="rs6000/sysv4.h rs6000/linux.h"
3043 xm_file=rs6000/xm-sysv4.h
3044 out_file=rs6000/rs6000.c
3045 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
3047 extra_headers=ppc-asm.h
3048 if test x$enable_threads = xyes; then
3052 powerpc-*-linux-gnu*)
3053 tm_file="rs6000/sysv4.h rs6000/linux.h"
3054 xm_file="rs6000/xm-sysv4.h"
3055 xm_defines="USG ${xm_defines}"
3056 out_file=rs6000/rs6000.c
3057 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
3059 extra_headers=ppc-asm.h
3060 if test x$enable_threads = xyes; then
3064 powerpc-wrs-vxworks*)
3066 xm_file="rs6000/xm-sysv4.h"
3067 xm_defines="USG POSIX"
3068 tm_file="rs6000/sysv4.h rs6000/vxppc.h"
3069 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3070 extra_headers=ppc-asm.h
3071 thread_file='vxworks'
3073 powerpcle-wrs-vxworks*)
3075 xm_file="rs6000/xm-sysv4.h"
3076 xm_defines="USG POSIX"
3077 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/vxppc.h"
3078 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3079 extra_headers=ppc-asm.h
3080 thread_file='vxworks'
3083 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3084 xm_file="rs6000/xm-sysv4.h"
3085 xm_defines="USG POSIX"
3086 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3087 xmake_file=rs6000/x-sysv4
3088 extra_headers=ppc-asm.h
3091 tm_file="rs6000/sysv4.h rs6000/sysv4le.h"
3092 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3093 extra_headers=ppc-asm.h
3095 powerpcle-*-eabisim*)
3096 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/eabisim.h"
3097 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3098 extra_headers=ppc-asm.h
3101 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h"
3102 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
3103 extra_headers=ppc-asm.h
3105 powerpcle-*-solaris2*)
3106 tm_file="rs6000/sysv4.h rs6000/sysv4le.h rs6000/sol2.h"
3107 xm_file="rs6000/xm-sysv4.h"
3108 xm_defines="USG POSIX"
3109 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
3110 xmake_file=rs6000/x-sysv4
3111 extra_headers=ppc-asm.h
3114 rs6000-ibm-aix3.[01]*)
3116 tm_file=rs6000/aix31.h
3117 xmake_file=rs6000/x-aix31
3122 rs6000-ibm-aix3.2.[456789]* | powerpc-ibm-aix3.2.[456789]*)
3124 tm_file=rs6000/aix3newas.h
3125 if test x$host != x$target
3127 tmake_file=rs6000/t-xnewas
3129 tmake_file=rs6000/t-newas
3135 rs6000-ibm-aix4.[12]* | powerpc-ibm-aix4.[12]*)
3137 tm_file=rs6000/aix41.h
3138 if test x$host != x$target
3140 tmake_file=rs6000/t-xnewas
3142 tmake_file=rs6000/t-newas
3144 if test "$gnu_ld" = yes
3146 xmake_file=rs6000/x-aix41-gld
3148 tmake_file="rs6000/t-newas rs6000/t-aix41"
3150 xmake_file=rs6000/x-aix41
3155 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
3157 tm_file=rs6000/aix43.h
3158 tmake_file=rs6000/t-aix43
3159 xmake_file=rs6000/x-aix41
3164 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
3166 tm_file=rs6000/aix43.h
3167 tmake_file=rs6000/t-aix43
3168 xmake_file=rs6000/x-aix41
3181 tm_file=rs6000/mach.h
3182 xm_file="${xm_file} rs6000/xm-mach.h"
3183 xmake_file=rs6000/x-mach
3187 tm_file=rs6000/lynx.h
3188 xm_file=rs6000/xm-lynx.h
3189 tmake_file=rs6000/t-rs6000
3190 xmake_file=rs6000/x-lynx
3198 tmake_file="sh/t-sh t-rtems"
3199 tm_file=sh/rtemself.h
3203 tmake_file="sh/t-sh t-rtems"
3212 xm_file="xm-alloca.h ${xm_file}"
3215 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
3216 tm_file=sparc/vxsparc.h
3217 tmake_file=sparc/t-vxsparc
3219 thread_file='vxworks'
3222 tmake_file=sparc/t-sparcbare
3223 tm_file="sparc/aout.h libgloss.h"
3226 tm_file=sparc/netbsd.h
3231 # we need collect2 until our bug is fixed...
3239 tmake_file=sparc/t-elf
3240 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3244 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
3245 xm_file="${xm_file} sparc/xm-linux.h"
3246 tm_file=sparc/linux-aout.h
3250 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
3251 xm_file="${xm_file} sparc/xm-linux.h"
3253 tm_file=sparc/linux.h
3254 tmake_file="t-linux t-linux-gnulibc1"
3255 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3259 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
3260 xm_file="${xm_file} sparc/xm-linux.h"
3262 tm_file=sparc/linux.h
3263 tmake_file="t-linux"
3264 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3266 if test x$enable_threads = xyes; then
3272 if test x$gas = xyes
3274 tm_file=sparc/lynx.h
3276 tm_file=sparc/lynx-ng.h
3278 xm_file=sparc/xm-lynx.h
3279 tmake_file=sparc/t-sunos41
3283 tmake_file="sparc/t-sparcbare t-rtems"
3284 tm_file=sparc/rtems.h
3286 sparc-*-rtems*|sparc-*-rtemself*)
3287 tm_file="sparc/rtemself.h"
3288 tmake_file="sparc/t-elf t-rtems"
3289 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
3293 sparcv9-*-solaris2*)
3294 if test x$gnu_ld = xyes
3296 tm_file=sparc/sol2-64.h
3298 tm_file=sparc/sol2-sld-64.h
3300 xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
3301 xm_defines="USG POSIX"
3302 tmake_file="sparc/t-sol2 sparc/t-sol2-64"
3303 xmake_file=sparc/x-sysv4
3304 extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
3306 if test x${enable_threads} = x ; then
3307 enable_threads=$have_pthread_h
3308 if test x${enable_threads} = x ; then
3309 enable_threads=$have_thread_h
3312 if test x${enable_threads} = xyes ; then
3313 if test x${have_pthread_h} = xyes ; then
3316 thread_file='solaris'
3320 sparc-hal-solaris2*)
3321 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3322 xm_defines="USG POSIX"
3323 tm_file="sparc/sol2.h sparc/hal.h"
3324 tmake_file="sparc/t-halos sparc/t-sol2"
3325 xmake_file=sparc/x-sysv4
3326 extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
3335 thread_file='solaris'
3338 if test x$gnu_ld = xyes
3340 tm_file=sparc/sol2.h
3342 tm_file=sparc/sol2-sld.h
3344 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3345 xm_defines="USG POSIX"
3346 tmake_file=sparc/t-sol2
3347 xmake_file=sparc/x-sysv4
3348 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
3351 *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) ;;
3354 if test x$gnu_ld = xyes
3356 tm_file=sparc/sol2-64.h
3358 tm_file=sparc/sol2-sld-64.h
3360 tmake_file="$tmake_file sparc/t-sol2-64"
3373 if test x${enable_threads} = x; then
3374 enable_threads=$have_pthread_h
3375 if test x${enable_threads} = x; then
3376 enable_threads=$have_thread_h
3379 if test x${enable_threads} = xyes; then
3380 if test x${have_pthread_h} = xyes; then
3383 thread_file='solaris'
3388 tm_file=sparc/sunos4.h
3389 tmake_file=sparc/t-sunos40
3393 tm_file=sparc/sunos4.h
3394 tmake_file=sparc/t-sunos41
3396 if test x$gas = xyes; then
3397 tm_file="${tm_file} sparc/sun4gas.h"
3401 tm_file=sparc/sun4o3.h
3405 tm_file=sparc/sysv4.h
3406 xm_file="sparc/xm-sysv4.h"
3407 xm_defines="USG POSIX"
3409 xmake_file=sparc/x-sysv4
3410 extra_parts="crtbegin.o crtend.o"
3413 xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
3414 xm_defines="USG POSIX"
3415 tm_file=sparc/vxsim.h
3416 tmake_file=sparc/t-vxsparc
3417 xmake_file=sparc/x-sysv4
3420 tm_file="sparc/splet.h libgloss.h"
3421 tmake_file=sparc/t-splet
3424 tm_file="sparc/litecoff.h libgloss.h"
3425 tmake_file=sparc/t-sparclite
3428 tm_file="sparc/lite.h aoutos.h libgloss.h"
3429 tmake_file=sparc/t-sparclite
3432 tm_file="sparc/liteelf.h"
3433 tmake_file=sparc/t-sparclite
3434 extra_parts="crtbegin.o crtend.o"
3437 tm_file="sparc/sp86x-aout.h aoutos.h libgloss.h"
3438 tmake_file=sparc/t-sp86x
3441 tm_file="sparc/sp86x-elf.h"
3442 tmake_file=sparc/t-sp86x
3443 extra_parts="crtbegin.o crtend.o"
3446 tmake_file=sparc/t-sp64
3447 tm_file=sparc/sp64-aout.h
3450 tmake_file=sparc/t-sp64
3451 tm_file=sparc/sp64-elf.h
3452 extra_parts="crtbegin.o crtend.o"
3454 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
3455 tmake_file="t-linux sparc/t-linux64"
3456 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
3457 tm_file=sparc/linux64.h
3459 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
3461 if test x$enable_threads = xyes; then
3466 # This hasn't been upgraded to GCC 2.
3467 # tahoe-harris-*) # Harris tahoe, using COFF.
3468 # tm_file=tahoe/harris.h
3470 # tahoe-*-bsd*) # tahoe running BSD
3475 *** The Thumb targets have been depreciated. The equivalent
3476 *** ARM based toolchain can now generated Thumb instructions
3477 *** when the -mthumb switch is given to the compiler.])
3479 # This hasn't been upgraded to GCC 2.
3486 tm_file="v850/rtems.h"
3487 xm_file="v850/xm-v850.h"
3488 tmake_file="v850/t-v850 t-rtems"
3489 if test x$stabs = xyes
3491 tm_file="${tm_file} dbx.h"
3496 target_cpu_default="TARGET_CPU_generic"
3498 tm_file="v850/v850.h"
3499 xm_file="v850/xm-v850.h"
3500 tmake_file=v850/t-v850
3501 if test x$stabs = xyes
3503 tm_file="${tm_file} dbx.h"
3507 vax-*-bsd*) # vaxen running BSD
3511 vax-*-sysv*) # vaxen running system V
3512 tm_file="${tm_file} vax/vaxv.h"
3517 tm_file="${tm_file} netbsd.h vax/netbsd.h"
3523 tmake_file="${tmake_file} vax/t-openbsd"
3525 vax-*-ultrix*) # vaxen running ultrix
3526 tm_file="${tm_file} vax/ultrix.h"
3530 vax-*-vms*) # vaxen running VMS
3531 xm_file=vax/xm-vms.h
3535 vax-*-*) # vax default entry
3539 xm_file="${xm_file} xm-svr3"
3543 echo "Configuration $machine not supported" 1>&2
3550 ;; # Existing GNU/Linux systems do not use the GNU setup.
3552 # On the GNU system, the setup is just about the same on
3553 # each different CPU. The specific machines that GNU
3554 # supports are matched above and just set $cpu_type.
3555 xm_file="xm-gnu.h ${xm_file}"
3556 tm_file=${cpu_type}/gnu.h
3557 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
3558 # GNU always uses ELF.
3560 # GNU tools are the only tools.
3563 xmake_file=x-linux # These details are the same as Linux.
3564 tmake_file=t-gnu # These are not.
3567 xmake_try_sysv=x-sysv
3568 install_headers_dir=install-headers-cpio
3571 install_headers_dir=install-headers-cpio
3575 # Distinguish i[34567]86
3576 # Also, do not run mips-tfile on MIPS if using gas.
3577 # Process --with-cpu= for PowerPC/rs6000
3578 target_cpu_default2=
3581 target_cpu_default2=1
3584 case $target_alias in
3586 target_cpu_default2=4
3589 target_cpu_default2=2
3593 i686-*-* | i786-*-*)
3594 target_cpu_default2=3
3601 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX|MASK_CIX"
3604 target_cpu_default2="MASK_CPU_EV6|MASK_BWX|MASK_MAX|MASK_FIX"
3607 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
3610 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
3613 target_cpu_default2="MASK_CPU_EV5"
3617 if test x$gas = xyes
3619 if test "$target_cpu_default2" = ""
3621 target_cpu_default2="MASK_GAS"
3623 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
3628 case "x$with_cpu" in
3631 target_cpu_default2="TARGET_CPU_generic"
3634 # Distinguish cores, and major variants
3635 # arm7m doesn't exist, but D & I don't affect code
3637 xarm[23678] | xarm250 | xarm[67][01]0 \
3638 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
3639 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
3640 | xstrongarm | xstrongarm110 | xstrongarm1100)
3642 target_cpu_default2="TARGET_CPU_$with_cpu"
3646 echo "--with-cpu must be passed a value" 1>&2
3651 if test x$pass2done = xyes
3653 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3660 mips*-*-ecoff* | mips*-*-elf*)
3661 if test x$gas = xyes
3663 if test x$gnu_ld = xyes
3665 target_cpu_default2=20
3667 target_cpu_default2=16
3672 if test x$gas = xyes
3674 target_cpu_default2=16
3677 powerpc*-*-* | rs6000-*-*)
3678 case "x$with_cpu" in
3682 xcommon | xpower | xpower2 | xpowerpc | xrios \
3683 | xrios1 | xrios2 | xrsc | xrsc1 \
3684 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
3685 | xec603e | x740 | x750 | x401 \
3686 | x403 | x505 | x801 | x821 | x823 | x860)
3687 target_cpu_default2="\"$with_cpu\""
3691 echo "--with-cpu must be passed a value" 1>&2
3696 if test x$pass2done = xyes
3698 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3705 case ".$with_cpu" in
3707 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
3709 .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9)
3710 target_cpu_default2="TARGET_CPU_$with_cpu"
3713 if test x$pass2done = xyes
3715 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
3723 if test "$target_cpu_default2" != ""
3725 if test "$target_cpu_default" != ""
3727 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
3729 target_cpu_default=$target_cpu_default2
3733 # No need for collect2 if we have the GNU linker.
3734 # Actually, there is now; GNU ld doesn't handle the EH info or
3735 # collecting for shared libraries.
3742 # Save data on machine being used to compile GCC in build_xm_file.
3743 # Save data on host machine in vars host_xm_file and host_xmake_file.
3744 if test x$pass1done = x
3746 if test x"$xm_file" = x
3747 then build_xm_file=$cpu_type/xm-$cpu_type.h
3748 else build_xm_file=$xm_file
3750 build_xm_defines=$xm_defines
3751 build_install_headers_dir=$install_headers_dir
3752 build_exeext=$exeext
3755 if test x$pass2done = x
3757 if test x"$xm_file" = x
3758 then host_xm_file=$cpu_type/xm-$cpu_type.h
3759 else host_xm_file=$xm_file
3761 host_xm_defines=$xm_defines
3762 if test x"$xmake_file" = x
3763 then xmake_file=$cpu_type/x-$cpu_type
3765 host_xmake_file="$xmake_file"
3766 host_truncate_target=$truncate_target
3767 host_extra_gcc_objs=$extra_gcc_objs
3768 host_extra_objs=$extra_host_objs
3775 extra_objs="${host_extra_objs} ${extra_objs}"
3777 # Default the target-machine variables that were not explicitly set.
3778 if test x"$tm_file" = x
3779 then tm_file=$cpu_type/$cpu_type.h; fi
3781 if test x$extra_headers = x
3782 then extra_headers=; fi
3784 if test x"$xm_file" = x
3785 then xm_file=$cpu_type/xm-$cpu_type.h; fi
3787 if test x$md_file = x
3788 then md_file=$cpu_type/$cpu_type.md; fi
3790 if test x$out_file = x
3791 then out_file=$cpu_type/$cpu_type.c; fi
3793 if test x"$tmake_file" = x
3794 then tmake_file=$cpu_type/t-$cpu_type
3797 if test x"$dwarf2" = xyes
3798 then tm_file="$tm_file tm-dwarf2.h"
3801 if test x$float_format = x
3802 then float_format=i64
3805 if test $float_format = none
3806 then float_h_file=Makefile.in
3807 else float_h_file=float-$float_format.h
3810 # Handle cpp installation.
3811 if test x$enable_cpp != xno
3813 tmake_file="$tmake_file t-install-cpp"
3816 # Say what files are being used for the output code and MD file.
3817 echo "Using \`$srcdir/config/$out_file' to output insns."
3818 echo "Using \`$srcdir/config/$md_file' as machine description file."
3821 for f in $tm_file; do
3824 if test $count = ax; then
3825 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
3827 echo "Using the following target machine macro files:"
3828 for f in $tm_file; do
3829 echo " $srcdir/config/$f"
3834 for f in $host_xm_file; do
3837 if test $count = ax; then
3838 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
3840 echo "Using the following host machine macro files:"
3841 for f in $host_xm_file; do
3842 echo " $srcdir/config/$f"
3846 if test "$host_xm_file" != "$build_xm_file"; then
3848 for f in $build_xm_file; do
3851 if test $count = ax; then
3852 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
3854 echo "Using the following build machine macro files:"
3855 for f in $build_xm_file; do
3856 echo " $srcdir/config/$f"
3861 if test x$thread_file = x; then
3862 if test x$target_thread_file != x; then
3863 thread_file=$target_thread_file
3865 thread_file='single'
3869 # Set up the header files.
3870 # $links is the list of header files to create.
3871 # $vars is the list of shell variables with file names to include.
3872 # auto-host.h is the file containing items generated by autoconf and is
3873 # the first file included by config.h.
3875 host_xm_file="auto-host.h gansidecl.h ${host_xm_file} hwint.h"
3877 # If host=build, it is correct to have hconfig include auto-host.h
3878 # as well. If host!=build, we are in error and need to do more
3879 # work to find out the build config parameters.
3880 if test x$host = x$build
3882 build_xm_file="auto-host.h gansidecl.h ${build_xm_file} hwint.h"
3884 # We create a subdir, then run autoconf in the subdir.
3885 # To prevent recursion we set host and build for the new
3886 # invocation of configure to the build for this invocation
3893 /*) realsrcdir=${srcdir};;
3894 *) realsrcdir=../${srcdir};;
3896 CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
3897 --target=$target --host=$build --build=$build
3899 # We just finished tests for the build machine, so rename
3900 # the file auto-build.h in the gcc directory.
3901 mv auto-host.h ../auto-build.h
3904 build_xm_file="auto-build.h gansidecl.h ${build_xm_file} hwint.h"
3907 xm_file="gansidecl.h ${xm_file}"
3908 tm_file="gansidecl.h ${tm_file}"
3910 vars="host_xm_file tm_file tm_p_file xm_file build_xm_file"
3911 links="config.h tm.h tm_p.h tconfig.h hconfig.h"
3912 defines="host_xm_defines null_defines null_defines xm_defines build_xm_defines"
3915 if test -f config.status; then mv -f config.status config.bak; fi
3918 while test -n "$vars"
3920 set $vars; var=$1; shift; vars=$*
3921 set $links; link=$1; shift; links=$*
3922 set $defines; define=$1; shift; defines=$*
3925 # Make sure the file is created, even if it is empty.
3928 # Define TARGET_CPU_DEFAULT if the system wants one.
3929 # This substitutes for lots of *.h files.
3930 if test "$target_cpu_default" != "" -a $link = tm.h
3932 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
3935 for file in `eval echo '$'$var`; do
3940 echo '#ifdef IN_GCC' >>$link
3943 echo "#include \"$file\"" >>$link
3948 echo '#endif' >>$link
3953 for def in `eval echo '$'$define`; do
3954 echo "#ifndef $def" >>$link
3955 echo "#define $def" >>$link
3956 echo "#endif" >>$link
3960 # Truncate the target if necessary
3961 if test x$host_truncate_target != x; then
3962 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3965 # Get the version trigger filename from the toplevel
3966 if test "${with_gcc_version_trigger+set}" = set; then
3967 gcc_version_trigger=$with_gcc_version_trigger
3969 gcc_version_trigger=${srcdir}/version.c
3972 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
3975 # Internationalization
3977 VERSION="$gcc_version"
3978 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
3979 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
3985 # NLS support is still experimental, so disable it by default for now.
3987 [ --enable-nls use Native Language Support (disabled by default)],
3991 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
3993 # Windows32 Registry support for specifying GCC installation paths.
3994 AC_ARG_ENABLE(win32-registry,
3995 [ --disable-win32-registry
3996 Disable lookup of installation paths in the
3997 Registry on Windows hosts.
3998 --enable-win32-registry Enable registry lookup (default).
3999 --enable-win32-registry=KEY
4000 Use KEY instead of GCC version as the last portion
4001 of the registry key.],,)
4003 AC_MSG_CHECKING(whether windows registry support is requested)
4004 if test x$enable_win32_registry != xno; then
4005 AC_DEFINE(ENABLE_WIN32_REGISTRY)
4011 # Check if user specified a different registry key.
4012 case x${enable_win32_registry} in
4015 gcc_cv_win32_registry_key="$VERSION"
4018 # no registry lookup.
4019 gcc_cv_win32_registry_key=''
4022 # user-specified key.
4023 gcc_cv_win32_registry_key="$enable_win32_registry"
4027 if test x$enable_win32_registry != xno; then
4028 AC_MSG_CHECKING(registry key on windows hosts)
4029 AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key")
4030 AC_MSG_RESULT($gcc_cv_win32_registry_key)
4033 # Get an absolute path to the GCC top-level source directory
4039 # Conditionalize the makefile for this host machine.
4040 # Make-host contains the concatenation of all host makefile fragments
4041 # [there can be more than one]. This file is built by configure.frag.
4042 host_overrides=Make-host
4043 dep_host_xmake_file=
4044 for f in .. ${host_xmake_file}
4046 if test -f ${srcdir}/config/$f
4048 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
4052 # Conditionalize the makefile for this target machine.
4053 # Make-target contains the concatenation of all host makefile fragments
4054 # [there can be more than one]. This file is built by configure.frag.
4055 target_overrides=Make-target
4057 for f in .. ${tmake_file}
4059 if test -f ${srcdir}/config/$f
4061 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
4065 # If the host doesn't support symlinks, modify CC in
4066 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
4067 # Otherwise, we can use "CC=$(CC)".
4069 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
4071 cc_set_by_configure="\$(CC)"
4072 quoted_cc_set_by_configure="\$(CC)"
4073 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
4076 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
4078 symbolic_link="cp -p"
4082 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
4083 quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
4084 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
4088 out_object_file=`basename $out_file .c`.o
4091 for f in $tm_file; do
4094 tm_file_list="${tm_file_list} $f" ;;
4095 *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;;
4100 for f in $host_xm_file; do
4102 auto-host.h | gansidecl.h | hwint.h )
4103 host_xm_file_list="${host_xm_file_list} $f" ;;
4104 *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;;
4109 for f in $build_xm_file; do
4111 auto-build.h | auto-host.h | gansidecl.h | hwint.h )
4112 build_xm_file_list="${build_xm_file_list} $f" ;;
4113 *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;;
4117 # Define macro CROSS_COMPILE in compilation
4118 # if this is a cross-compiler.
4119 # Also use all.cross instead of all.internal
4120 # and add cross-make to Makefile.
4121 cross_overrides="/dev/null"
4122 if test x$host != x$target
4124 cross_defines="CROSS=-DCROSS_COMPILE"
4125 cross_overrides="${topdir}/cross-make"
4128 # When building gcc with a cross-compiler, we need to fix a few things.
4129 # This must come after cross-make as we want all.build to override
4131 build_overrides="/dev/null"
4132 if test x$build != x$host
4134 build_overrides="${topdir}/build-make"
4137 # Expand extra_headers to include complete path.
4138 # This substitutes for lots of t-* files.
4140 if test "x$extra_headers" = x
4143 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
4144 for file in $extra_headers;
4146 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
4150 if test x$use_collect2 = xno; then
4154 # Add a definition of USE_COLLECT2 if system wants one.
4155 # Also tell toplev.c what to do.
4156 # This substitutes for lots of t-* files.
4157 if test x$use_collect2 = x
4162 will_use_collect2="collect2"
4163 maybe_use_collect2="-DUSE_COLLECT2"
4167 # Set MD_DEPS if the real md file is in md.pre-cpp.
4168 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
4169 # for line oriented comments, so we must always use a GNU cpp. If
4170 # building gcc with a cross compiler, use the cross compiler just
4171 # built. Otherwise, we can use the cpp just built.
4173 if test "x$md_cppflags" = x
4175 md_file_sub=$srcdir/config/$md_file
4180 # If we have gas in the build tree, make a link to it.
4181 if test -f ../gas/Makefile; then
4182 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
4185 # If we have nm in the build tree, make a link to it.
4186 if test -f ../binutils/Makefile; then
4187 rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
4190 # If we have ld in the build tree, make a link to it.
4191 if test -f ../ld/Makefile; then
4192 # if test x$use_collect2 = x; then
4193 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
4195 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
4199 # Figure out what assembler alignment features are present.
4200 AC_MSG_CHECKING(assembler alignment features)
4202 gcc_cv_as_alignment_features=
4203 gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
4204 if test -x "$DEFAULT_ASSEMBLER"; then
4205 gcc_cv_as="$DEFAULT_ASSEMBLER"
4206 elif test -x "$AS"; then
4208 elif test -x as$host_exeext; then
4209 # Build using assembler in the current directory.
4210 gcc_cv_as=./as$host_exeext
4211 elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
4212 # Single tree build which includes gas.
4213 for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
4216 gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
4218 if test x$gcc_cv_gas_version != x; then
4223 gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
4224 gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
4226 if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
4227 # Gas version 2.6 and later support for .balign and .p2align.
4228 # bytes to skip when using .p2align.
4229 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2; then
4230 gcc_cv_as_alignment_features=".balign and .p2align"
4231 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4233 # Gas version 2.8 and later support specifying the maximum
4234 # bytes to skip when using .p2align.
4235 if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2; then
4236 gcc_cv_as_alignment_features=".p2align including maximum skip"
4237 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4240 elif test x$host = x$target; then
4242 # Search the same directories that the installed compiler will
4243 # search. Else we may find the wrong assembler and lose. If we
4244 # do not find a suitable assembler binary, then try the user's
4247 # Also note we have to check MD_EXEC_PREFIX before checking the
4248 # user's path. Unfortunately, there is no good way to get at the
4249 # value of MD_EXEC_PREFIX here. So we do a brute force search
4250 # through all the known MD_EXEC_PREFIX values. Ugh. This needs
4251 # to be fixed as part of the make/configure rewrite too.
4253 if test "x$exec_prefix" = xNONE; then
4254 if test "x$prefix" = xNONE; then
4255 test_prefix=/usr/local
4260 test_prefix=$exec_prefix
4263 # If the loop below does not find an assembler, then use whatever
4264 # one we can find in the users's path.
4268 test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
4269 $test_prefix/lib/gcc-lib/$target \
4270 /usr/lib/gcc/$target/$gcc_version \
4271 /usr/lib/gcc/$target \
4272 $test_prefix/$target/bin/$target/$gcc_version \
4273 $test_prefix/$target/bin \
4278 /bsd43/usr/lib/cmplrs/cc \
4279 /usr/cross64/usr/bin \
4280 /usr/lib/cmplrs/cc \
4281 /sysv/usr/lib/cmplrs/cc \
4282 /svr4/usr/lib/cmplrs/cc \
4285 for dir in $test_dirs; do
4286 if test -f $dir/as$host_exeext; then
4287 gcc_cv_as=$dir/as$host_exeext
4292 if test x$gcc_cv_as != x; then
4293 # Check if we have .balign and .p2align
4294 echo ".balign 4" > conftest.s
4295 echo ".p2align 2" >> conftest.s
4296 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4297 gcc_cv_as_alignment_features=".balign and .p2align"
4298 AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
4300 rm -f conftest.s conftest.o
4301 # Check if specifying the maximum bytes to skip when
4302 # using .p2align is supported.
4303 echo ".p2align 4,,7" > conftest.s
4304 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4305 gcc_cv_as_alignment_features=".p2align including maximum skip"
4306 AC_DEFINE(HAVE_GAS_MAX_SKIP_P2ALIGN)
4308 rm -f conftest.s conftest.o
4310 AC_MSG_RESULT($gcc_cv_as_alignment_features)
4312 AC_MSG_CHECKING(assembler subsection support)
4313 gcc_cv_as_subsections=
4314 if test x$gcc_cv_as != x; then
4315 # Check if we have .subsection
4316 echo ".subsection 1" > conftest.s
4317 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4318 gcc_cv_as_subsections=".subsection"
4319 if test -x nm$host_exeext; then
4320 gcc_cv_nm=./nm$host_exeext
4321 elif test x$host = x$target; then
4323 gcc_cv_nm=nm$host_exeext
4325 if test x$gcc_cv_nm != x; then
4326 cat > conftest.s <<EOF
4327 conftest_label1: .word 0
4329 conftest_label2: .word 0
4332 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4333 $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1
4334 $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2
4335 if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then
4338 gcc_cv_as_subsections="working .subsection -1"
4339 AC_DEFINE(HAVE_GAS_SUBSECTION_ORDERING)
4344 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4346 AC_MSG_RESULT($gcc_cv_as_subsections)
4348 AC_MSG_CHECKING(assembler weak support)
4350 if test x$gcc_cv_as != x; then
4351 # Check if we have .weak
4352 echo " .weak foobar" > conftest.s
4353 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4354 AC_DEFINE(HAVE_GAS_WEAK)
4355 gcc_cv_as_weak="yes"
4357 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4359 AC_MSG_RESULT($gcc_cv_as_weak)
4361 AC_MSG_CHECKING(assembler hidden support)
4363 if test x$gcc_cv_as != x; then
4364 # Check if we have .hidden
4365 echo " .hidden foobar" > conftest.s
4366 echo "foobar:" >> conftest.s
4367 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4368 AC_DEFINE(HAVE_GAS_HIDDEN)
4369 gcc_cv_as_hidden="yes"
4371 rm -f conftest.s conftest.o conftest.nm1 conftest.nm2
4373 AC_MSG_RESULT($gcc_cv_as_hidden)
4377 AC_CACHE_CHECK([assembler .register pseudo-op support],
4378 gcc_cv_as_register_pseudo_op, [
4379 gcc_cv_as_register_pseudo_op=unknown
4380 if test x$gcc_cv_as != x; then
4381 # Check if we have .register
4382 echo ".register %g2, #scratch" > conftest.s
4383 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4384 gcc_cv_as_register_pseudo_op=yes
4386 gcc_cv_as_register_pseudo_op=no
4388 rm -f conftest.s conftest.o
4391 if test "x$gcc_cv_as_register_pseudo_op" = xyes; then
4392 AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP)
4397 AC_CACHE_CHECK([for 64 bit support in assembler ($gcc_cv_as)],
4398 gcc_cv_as_flags64, [
4399 if test -n "$gcc_cv_as"; then
4400 echo ".xword foo" > conftest.s
4401 gcc_cv_as_flags64=no
4402 for flag in "-xarch=v9" "-64 -Av9"; do
4403 if $gcc_cv_as $flag -o conftest.o conftest.s \
4404 > /dev/null 2>&1; then
4405 gcc_cv_as_flags64=$flag
4409 rm -f conftest.s conftest.o
4411 if test "$gas" = yes; then
4412 gcc_cv_as_flags64="-64 -Av9"
4414 gcc_cv_as_flags64="-xarch=v9"
4418 if test "x$gcc_cv_as_flags64" = xno; then
4420 tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4421 dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
4424 AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64")
4427 *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
4431 if test "x$gcc_cv_as_flags64" != xno; then
4432 AC_CACHE_CHECK([for assembler offsetable %lo() support],
4433 gcc_cv_as_offsetable_lo10, [
4434 gcc_cv_as_offsetable_lo10=unknown
4435 if test "x$gcc_cv_as" != x; then
4436 # Check if assembler has offsetable %lo()
4437 echo "or %g1, %lo(ab) + 12, %g1" > conftest.s
4438 echo "or %g1, %lo(ab + 12), %g1" > conftest1.s
4439 if $gcc_cv_as $gcc_cv_as_flags64 -o conftest.o conftest.s \
4441 $gcc_cv_as $gcc_cv_as_flags64 -o conftest1.o conftest1.s \
4442 > /dev/null 2>&1; then
4443 if cmp conftest.o conftest1.o > /dev/null 2>&1; then
4444 gcc_cv_as_offsetable_lo10=no
4446 gcc_cv_as_offsetable_lo10=yes
4449 gcc_cv_as_offsetable_lo10=no
4451 rm -f conftest.s conftest.o conftest1.s conftest1.o
4454 if test "x$gcc_cv_as_offsetable_lo10" = xyes; then
4455 AC_DEFINE(HAVE_AS_OFFSETABLE_LO10)
4463 AC_MSG_CHECKING(assembler instructions)
4464 gcc_cv_as_instructions=
4465 if test x$gcc_cv_as != x; then
4466 set "filds fists" "filds mem; fists mem"
4469 echo "$2" > conftest.s
4470 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
4471 gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" "
4472 AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$1" | tr '[a-z ]' '[A-Z_]'`)
4476 rm -f conftest.s conftest.o
4478 AC_MSG_RESULT($gcc_cv_as_instructions)
4482 # Figure out what language subdirectories are present.
4483 # Look if the user specified --enable-languages="..."; if not, use
4484 # the environment variable $LANGUAGES if defined. $LANGUAGES might
4486 if test x"${enable_languages+set}" != xset; then
4487 if test x"${LANGUAGES+set}" = xset; then
4488 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
4490 enable_languages=all
4494 for lang in ${srcdir}/*/config-lang.in ..
4498 # The odd quoting in the next line works around
4499 # an apparent bug in bash 1.12 on linux.
4501 ${srcdir}/[*]/config-lang.in) ;;
4503 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
4504 if test "x$lang_alias" = x
4506 echo "$lang doesn't set \$language." 1>&2
4509 if test x"${enable_languages}" = xall; then
4512 case "${enable_languages}" in
4513 ${lang_alias} | "${lang_alias},"* | *",${lang_alias},"* | *",${lang_alias}" )
4521 if test x"${add_this_lang}" = xyes; then
4523 ${srcdir}/ada/config-lang.in)
4524 if test x$gnat = xyes ; then
4525 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4529 subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
4538 # Make gthr-default.h if we have a thread file.
4540 if test $thread_file != single; then
4541 rm -f gthr-default.h
4542 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
4543 gthread_flags=-DHAVE_GTHR_DEFAULT
4545 AC_SUBST(gthread_flags)
4547 # Find out what GC implementation we want, or may, use.
4549 [ --with-gc={simple,page} Choose the garbage collection mechanism to use
4550 with the compiler.],
4556 AC_MSG_ERROR([$withval is an invalid option to --with-gc])
4559 [if test $ac_cv_func_mmap_anywhere = yes \
4560 || test $ac_cv_func_valloc = yes; then
4566 echo "Using $GGC for garbage collection."
4568 # Build a new-abi (c++) system
4569 AC_ARG_ENABLE(new-gxx-abi,
4570 [ --enable-new-gxx-abi
4571 select the new abi for g++. You must select an ABI
4572 at configuration time, so that the correct runtime
4573 support is built. You cannot mix ABIs.],
4574 [AC_DEFINE(ENABLE_NEW_GXX_ABI)
4575 GXX_ABI_FLAG='-fnew-abi'
4576 echo "Building a new-abi g++ compiler."
4578 AC_SUBST(GXX_ABI_FLAG)
4580 # Build a new-libstdc++ system (ie libstdc++-v3)
4581 AC_MSG_CHECKING([for libstdc++ to install])
4582 AC_ARG_ENABLE(libstdcxx-v3,
4583 [ --enable-libstdcxx-v3
4584 enable libstdc++-v3 for building and installation],
4585 [enable_libstdcxx_v3=yes], [enable_libstdcxx_v3=no])
4587 if test x$enable_libstdcxx_v3 = xyes; then
4589 AC_DEFINE(ENABLE_STD_NAMESPACE)
4595 # Make empty files to contain the specs and options for each language.
4596 # Then add #include lines to for a compiler that has specs and/or options.
4601 rm -f specs.h options.h gencheck.h
4602 touch specs.h options.h gencheck.h
4603 for subdir in . $subdirs
4605 if test -f $srcdir/$subdir/lang-specs.h; then
4606 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
4607 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
4609 if test -f $srcdir/$subdir/lang-options.h; then
4610 echo "#include \"$subdir/lang-options.h\"" >>options.h
4611 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
4613 if test -f $srcdir/$subdir/$subdir-tree.def; then
4614 echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
4615 lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
4619 # These (without "all_") are set in each config-lang.in.
4620 # `language' must be a single word so is spelled singularly.
4626 all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug'
4627 # List of language makefile fragments.
4632 # Add the language fragments.
4633 # Languages are added via two mechanisms. Some information must be
4634 # recorded in makefile variables, these are defined in config-lang.in.
4635 # We accumulate them and plug them into the main Makefile.
4636 # The other mechanism is a set of hooks for each of the main targets
4637 # like `clean', `install', etc.
4639 language_fragments="Make-lang"
4640 language_hooks="Make-hooks"
4643 for s in .. $subdirs
4655 . ${srcdir}/$s/config-lang.in
4656 if test "x$language" = x
4658 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
4661 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
4662 all_languages="$all_languages $language"
4663 if test "x$boot_language" = xyes
4665 all_boot_languages="$all_boot_languages $language"
4667 all_compilers="$all_compilers $compilers"
4668 all_stagestuff="$all_stagestuff $stagestuff"
4669 all_diff_excludes="$all_diff_excludes $diff_excludes"
4670 all_headers="$all_headers $headers"
4671 all_outputs="$all_outputs $outputs"
4672 if test x$outputs = x
4674 oldstyle_subdirs="$oldstyle_subdirs $s"
4676 all_lib2funcs="$all_lib2funcs $lib2funcs"
4680 # Since we can't use `::' targets, we link each language in
4681 # with a set of hooks, reached indirectly via lang.${target}.
4685 target_list="all.build all.cross start.encap rest.encap \
4687 install-normal install-common install-info install-man \
4689 mostlyclean clean distclean extraclean maintainer-clean \
4690 stage1 stage2 stage3 stage4"
4691 for t in $target_list
4694 for lang in .. $all_languages
4696 if test $lang != ".."; then
4700 echo "lang.$t: $x" >> Make-hooks
4703 # If we're not building in srcdir, create .gdbinit.
4705 if test ! -f Makefile.in; then
4706 echo "dir ." > .gdbinit
4707 echo "dir ${srcdir}" >> .gdbinit
4708 if test x$gdb_needs_out_file_path = xyes
4710 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
4712 if test "x$subdirs" != x; then
4715 echo "dir ${srcdir}/$s" >> .gdbinit
4718 echo "source ${srcdir}/.gdbinit" >> .gdbinit
4721 # Define variables host_canonical and build_canonical
4722 # because some Cygnus local changes in the Makefile depend on them.
4723 build_canonical=${build}
4724 host_canonical=${host}
4726 if test "${host}" != "${target}" ; then
4727 target_subdir=${target}/
4729 AC_SUBST(build_canonical)
4730 AC_SUBST(host_canonical)
4731 AC_SUBST(target_subdir)
4733 # If this is using newlib, then define inhibit_libc in
4734 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
4735 # libgcc.a, but that's OK because newib should have its own version of
4738 if test x$with_newlib = xyes; then
4739 inhibit_libc=-Dinhibit_libc
4741 AC_SUBST(inhibit_libc)
4743 # If $(exec_prefix) exists and is not the same as $(prefix), then compute an
4744 # absolute path for gcc_tooldir based on inserting the number of up-directory
4745 # movements required to get from $(exec_prefix) to $(prefix) into the basic
4746 # $(libsubdir)/@(unlibsubdir) based path.
4747 # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
4748 # make and thus we'd get different behavior depending on where we built the
4750 if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
4751 gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
4753 changequote(<<, >>)dnl
4754 # An explanation of the sed strings:
4755 # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
4756 # -e 's|/$||' match a trailing forward slash and eliminates it
4757 # -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
4758 # -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
4760 # (*) Note this pattern overwrites the first character of the string
4761 # with a forward slash if one is not already present. This is not a
4762 # problem because the exact names of the sub-directories concerned is
4763 # unimportant, just the number of them matters.
4765 # The practical upshot of these patterns is like this:
4767 # prefix exec_prefix result
4768 # ------ ----------- ------
4770 # /foo/ /foo/bar ../
4771 # /foo /foo/bar/ ../
4772 # /foo/ /foo/bar/ ../
4773 # /foo /foo/bar/ugg ../../
4776 gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)"
4777 changequote([, ])dnl
4779 AC_SUBST(gcc_tooldir)
4782 # Nothing to do for FLOAT_H, float_format already handled.
4786 # Process the language and host/target makefile fragments.
4787 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
4789 # Substitute configuration variables
4791 AC_SUBST(all_boot_languages)
4792 AC_SUBST(all_compilers)
4793 AC_SUBST(all_diff_excludes)
4794 AC_SUBST(all_headers)
4795 AC_SUBST(all_lang_makefiles)
4796 AC_SUBST(all_languages)
4797 AC_SUBST(all_lib2funcs)
4798 AC_SUBST(all_stagestuff)
4799 AC_SUBST(build_exeext)
4800 AC_SUBST(build_install_headers_dir)
4801 AC_SUBST(build_xm_file_list)
4802 AC_SUBST(cc_set_by_configure)
4803 AC_SUBST(quoted_cc_set_by_configure)
4804 AC_SUBST(cpp_install_dir)
4805 AC_SUBST(dep_host_xmake_file)
4806 AC_SUBST(dep_tmake_file)
4807 AC_SUBST(extra_c_flags)
4808 AC_SUBST(extra_c_objs)
4809 AC_SUBST(extra_cpp_objs)
4810 AC_SUBST(extra_cxx_objs)
4811 AC_SUBST(extra_headers_list)
4812 AC_SUBST(extra_objs)
4813 AC_SUBST(extra_parts)
4814 AC_SUBST(extra_passes)
4815 AC_SUBST(extra_programs)
4816 AC_SUBST(float_h_file)
4817 AC_SUBST(gcc_gxx_include_dir)
4818 AC_SUBST(gcc_version)
4819 AC_SUBST(gcc_version_trigger)
4820 AC_SUBST(host_exeext)
4821 AC_SUBST(host_extra_gcc_objs)
4822 AC_SUBST(host_xm_file_list)
4824 AC_SUBST(lang_options_files)
4825 AC_SUBST(lang_specs_files)
4826 AC_SUBST(lang_tree_files)
4827 AC_SUBST(local_prefix)
4828 AC_SUBST(maybe_use_collect2)
4830 AC_SUBST(objc_boehm_gc)
4832 AC_SUBST(out_object_file)
4833 AC_SUBST(stage_prefix_set_by_configure)
4834 AC_SUBST(symbolic_link)
4835 AC_SUBST(thread_file)
4836 AC_SUBST(tm_file_list)
4837 AC_SUBST(will_use_collect2)
4840 AC_SUBST_FILE(target_overrides)
4841 AC_SUBST_FILE(host_overrides)
4842 AC_SUBST(cross_defines)
4843 AC_SUBST_FILE(cross_overrides)
4844 AC_SUBST_FILE(build_overrides)
4845 AC_SUBST_FILE(language_fragments)
4846 AC_SUBST_FILE(language_hooks)
4848 # Echo that links are built
4849 if test x$host = x$target
4857 if test x$host != x$build
4859 str3=" on a $build system"
4862 if test "x$str2" != x || test "x$str3" != x
4867 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
4869 if test "x$str2" != x || test "x$str3" != x
4871 echo " ${str2}${str3}." 1>&2
4874 # Truncate the target if necessary
4875 if test x$host_truncate_target != x; then
4876 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
4879 # Configure the subdirectories
4880 # AC_CONFIG_SUBDIRS($subdirs)
4882 # Create the Makefile
4883 # and configure language subdirectories
4884 AC_OUTPUT($all_outputs,
4886 . $srcdir/configure.lang
4887 case x$CONFIG_HEADERS in
4888 xauto-host.h:config.in)
4891 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
4892 # bootstrapping and the installation procedure can still use
4893 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
4894 # FLAGS_TO_PASS has been modified to solve the problem there.
4895 # This is virtually a duplicate of what happens in configure.lang; we do
4896 # an extra check to make sure this only happens if ln -s can be used.
4897 if test "$symbolic_link" = "ln -s"; then
4898 for d in .. ${subdirs} ; do
4899 if test $d != ..; then
4902 for t in stage1 stage2 stage3 stage4 include
4905 $symbolic_link ../$t $t 2>/dev/null
4911 # Avoid having to add intl to our include paths.
4912 if test -f intl/libintl.h; then
4913 echo creating libintl.h
4914 echo '#include "intl/libintl.h"' >libintl.h
4921 target_alias='${target_alias}'
4923 subdirs='${subdirs}'
4924 oldstyle_subdirs='${oldstyle_subdirs}'
4925 symbolic_link='${symbolic_link}'
4926 program_transform_set='${program_transform_set}'
4927 program_transform_name='${program_transform_name}'
4928 dep_host_xmake_file='${dep_host_xmake_file}'
4929 host_xmake_file='${host_xmake_file}'
4930 dep_tmake_file='${dep_tmake_file}'
4931 tmake_file='${tmake_file}'
4932 thread_file='${thread_file}'
4933 gcc_version='${gcc_version}'
4934 gcc_version_trigger='${gcc_version_trigger}'
4935 local_prefix='${local_prefix}'
4936 build_install_headers_dir='${build_install_headers_dir}'
4937 build_exeext='${build_exeext}'
4938 host_exeext='${host_exeext}'
4939 out_file='${out_file}'
4940 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
4941 SET_MAKE='${SET_MAKE}'
4942 target_list='${target_list}'
4943 target_overrides='${target_overrides}'
4944 host_overrides='${host_overrides}'
4945 cross_defines='${cross_defines}'
4946 cross_overrides='${cross_overrides}'
4947 build_overrides='${build_overrides}'
4948 cpp_install_dir='${cpp_install_dir}'