1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997, 1998 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 # Initialization and defaults
25 AC_CONFIG_HEADER(auto-config.h:config.in)
33 # Check for additional parameters
37 [ --with-gnu-ld arrange to work with GNU ld.],
43 [ --with-gnu-as arrange to work with GNU as.],
49 [ --with-stabs arrange to use stabs instead of host debug format.],
55 [ --with-elf arrange to use ELF instead of host debug format.],
59 # Specify the local prefix
60 AC_ARG_WITH(local-prefix,
61 [ --with-local-prefix=DIR specifies directory to put local include.],
62 local_prefix=$with_local_prefix,
63 local_prefix=/usr/local)
65 # Default local prefix if it is empty
66 if [[ x$local_prefix = x ]]; then
67 local_prefix=/usr/local
70 # Specify the g++ header file directory
71 AC_ARG_WITH(gxx-include-dir,
72 [ --with-gxx-include-dir=DIR
73 specifies directory to put g++ header files.],
74 gxx_include_dir=$with_gxx_include_dir,
75 gxx_include_dir='${prefix}/include/g++')
77 # Default g++ header file directory if it is empty
78 if [[ x$gxx_include_dir = x ]]; then
79 gxx_include_dir='${prefix}/include/g++'
82 # Enable use of cpplib for C.
83 AC_ARG_ENABLE(c-cpplib,
84 [ --enable-c-cpplib Use cpplib for C.],
85 if [[[ x$enable_c_cpplib != xno ]]]; then
86 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
87 extra_c_flags=-DUSE_CPPLIB=1
91 # Pass with no value to take the default
92 # Pass with a value to specify a thread package
93 AC_ARG_ENABLE(threads,
94 [ --enable-threads enable thread usage for target GCC.
95 --enable-threads=LIB use LIB thread package for target GCC.],
96 if [[[ x$enable_threads = xno ]]]; then
101 # Check if a valid thread package
102 case x${enable_threads} in
111 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
113 thread_file=$enable_threads
116 echo "$enable_threads is an unknown thread package" 1>&2
121 # Determine the host, build, and target systems
124 # Find the native compiler
128 # Find some useful tools
137 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h)
139 # Use <inttypes.h> only if it exists,
140 # doesn't clash with <sys/types.h>, and declares intmax_t.
141 AC_MSG_CHECKING(for inttypes.h)
142 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
144 [#include <sys/types.h>
145 #include <inttypes.h>],
147 gcc_cv_header_inttypes_h=yes,
148 gcc_cv_header_inttypes_h=no)])
149 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
150 if test $gcc_cv_header_inttypes_h = yes; then
151 AC_DEFINE(HAVE_INTTYPES_H)
154 AC_CHECK_FUNCS(strerror)
155 AC_CHECK_FUNCS(putenv)
156 AC_CHECK_FUNCS(popen)
157 AC_CHECK_FUNCS(vprintf)
158 AC_CHECK_FUNCS(bcopy)
159 AC_CHECK_FUNCS(bzero)
161 AC_CHECK_FUNCS(index)
162 AC_CHECK_FUNCS(rindex)
164 AC_CHECK_FUNCS(getrlimit)
165 AC_CHECK_FUNCS(setrlimit)
166 AC_CHECK_FUNCS(sysconf)
168 GCC_NEED_DECLARATION(malloc)
169 GCC_NEED_DECLARATION(realloc)
170 GCC_NEED_DECLARATION(calloc)
171 GCC_NEED_DECLARATION(free)
172 GCC_NEED_DECLARATION(index)
173 GCC_NEED_DECLARATION(rindex)
174 GCC_NEED_DECLARATION(getenv)
175 GCC_NEED_DECLARATION(sbrk)
186 build_broken_install=
187 build_install_headers_dir=install-headers-tar
191 host_truncate_target=
193 # Decode the host machine, then the target machine.
194 # For the host machine, we save the xm_file variable as host_xm_file;
195 # then we decode the target machine and forget everything else
196 # that came from the host machine.
197 for machine in $build $host $target; do
210 # Set this to force installation and use of collect2.
212 # Set this to override the default target model.
214 # Set this to force use of install.sh.
216 # Set this to control which fixincludes program to use.
217 fixincludes=fixincludes
218 # Set this to control how the header file directory is installed.
219 install_headers_dir=install-headers-tar
220 # Set this to a non-empty list of args to pass to cpp if the target
221 # wants its .md file passed through cpp.
223 # Set this if directory names should be truncated to 14 characters.
225 # Set this if gdb needs a dir command with `dirname $out_file`
226 gdb_needs_out_file_path=
227 # Set this if the build machine requires executables to have a
231 # Set default cpu_type, tm_file and xm_file so it can be updated in
232 # each machine entry.
233 cpu_type=`echo $machine | sed 's/-.*$//'`
267 tm_file=${cpu_type}/${cpu_type}.h
268 xm_file=${cpu_type}/xm-${cpu_type}.h
271 # Support site-specific machine types.
273 cpu_type=`echo $machine | sed -e 's/-.*//'`
274 rest=`echo $machine | sed -e "s/$cpu_type-//"`
275 xm_file=${cpu_type}/xm-$rest.h
276 tm_file=${cpu_type}/$rest.h
277 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
278 then xmake_file=${cpu_type}/x-$rest; \
281 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
282 then tmake_file=${cpu_type}/t-$rest; \
288 a29k-*-bsd* | a29k-*-sym1*)
289 tm_file="${tm_file} a29k/unix.h"
290 xm_file=a29k/xm-unix.h
291 xmake_file=a29k/x-unix
294 a29k-*-udi | a29k-*-coff)
295 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
296 tmake_file=a29k/t-a29kbare
299 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
300 tmake_file=a29k/t-vx29k
301 extra_parts="crtbegin.o crtend.o"
303 a29k-*-*) # Default a29k environment.
306 alpha*-*-linux-gnuecoff*)
307 tm_file="${tm_file} alpha/linux.h"
308 xm_file="${xm_file} alpha/xm-linux.h"
309 target_cpu_default="MASK_GAS"
312 fixincludes=Makefile.in
315 alpha*-*-linux-gnulibc1*)
316 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
317 xm_file="${xm_file} alpha/xm-linux.h"
318 target_cpu_default="MASK_GAS"
319 tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux"
321 fixincludes=Makefile.in
323 if [[ x$enable_threads = xyes ]]; then
328 tm_file="${tm_file} alpha/linux.h alpha/elf.h"
329 xm_file="${xm_file} alpha/xm-linux.h"
330 target_cpu_default="MASK_GAS"
331 tmake_file="t-linux alpha/t-linux"
332 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
334 fixincludes=Makefile.in
336 if [[ x$enable_threads = xyes ]]; then
341 if [[ x$stabs = xyes ]]
343 tm_file="${tm_file} dbx.h"
345 if [[ x$gas != xyes ]]
347 extra_passes="mips-tfile mips-tdump"
353 tm_file="${tm_file} alpha/osf12.h alpha/osf2or3.h"
356 tm_file="${tm_file} alpha/osf2or3.h"
359 # Some versions of OSF4 (specifically X4.0-9 296.7) have
360 # a broken tar, so we use cpio instead.
361 install_headers_dir=install-headers-cpio
365 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
366 target_cpu_default=MASK_SUPPORT_ARCH
371 tm_file="${tm_file} alpha/win-nt.h"
372 target_cpu_default=MASK_WINDOWS_NT
373 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
375 xmake_file=winnt/x-winnt
376 extra_host_objs=oldnames.o
377 extra_gcc_objs="spawnv.o oldnames.o"
378 fixincludes=fixinc.winnt
379 if [[ x$gnu_ld != xyes ]]
381 extra_programs=ld.exe
383 if [[ x$enable_threads = xyes ]]; then
389 xm_file="${xm_file} alpha/xm-vms.h"
390 tmake_file=alpha/t-vms
391 fixincludes=Makefile.in
394 extra_parts="crtinit.o crtfini.o"
396 arm-*-coff* | armel-*-coff*)
398 tmake_file=arm/t-bare
400 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
401 tm_file=arm/riscix1-1.h
404 arm-*-riscix*) # Acorn RISC machine
405 if [[ x$gas = xyes ]]
407 tm_file=arm/rix-gas.h
411 xmake_file=arm/x-riscix
412 tmake_file=arm/t-riscix
415 arm-semi-aout | armel-semi-aout)
417 tmake_file=arm/t-semi
418 fixincludes=Makefile.in # There is nothing to fix
420 arm-semi-aof | armel-semi-aof)
421 tm_file=arm/semiaof.h
422 tmake_file=arm/t-semiaof
423 fixincludes=Makefile.in # There is nothing to fix
427 xm_file=arm/xm-netbsd.h
428 tmake_file="t-netbsd arm/t-netbsd"
429 # On NetBSD, the headers are already okay, except for math.h.
430 fixincludes=fixinc.math
432 arm-*-linux-gnuaout*) # ARM GNU/Linux
434 xm_file=arm/xm-linux.h
436 tm_file=arm/linux-gas.h
437 tmake_file=arm/t-linux
438 fixincludes=Makefile.in
444 tmake_file=arm/t-bare
446 c1-convex-*) # Convex C1
449 fixincludes=Makefile.in
451 c2-convex-*) # Convex C2
454 fixincludes=Makefile.in
459 fixincludes=Makefile.in
464 fixincludes=Makefile.in
467 target_cpu_default=16
469 fixincludes=Makefile.in
471 clipper-intergraph-clix*)
472 tm_file="${tm_file} svr3.h clipper/clix.h"
473 xm_file=clipper/xm-clix.h
474 xmake_file=clipper/x-clix
475 extra_headers=va-clipper.h
476 extra_parts="crtbegin.o crtend.o"
477 install_headers_dir=install-headers-cpio
485 # This hasn't been upgraded to GCC 2.
486 # fx80-alliant-*) # Alliant FX/80
492 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
493 xm_file=pa/xm-papro.h
498 tm_file="${tm_file} pa/pa-osf.h"
500 fixincludes=Makefile.in
503 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
504 xm_file=pa/xm-papro.h
508 tm_file="${tm_file} pa/pa-osf.h"
510 fixincludes=Makefile.in
515 fixincludes=Makefile.in
519 fixincludes=Makefile.in
522 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
523 xm_file=pa/xm-pahpux.h
524 xmake_file=pa/x-pa-hpux
525 if [[ x$gas = xyes ]]
527 tm_file="${tm_file} pa/gas.h"
530 install_headers_dir=install-headers-cpio
533 hppa1.0-*-hpux8.0[[0-2]]*)
534 tm_file="${tm_file} pa/pa-hpux.h"
535 xm_file=pa/xm-pahpux.h
536 xmake_file=pa/x-pa-hpux
537 if [[ x$gas = xyes ]]
539 tm_file="${tm_file} pa/pa-gas.h"
541 tm_file="pa/pa-oldas.h ${tm_file}"
544 install_headers_dir=install-headers-cpio
547 hppa1.1-*-hpux8.0[[0-2]]*)
549 tm_file="${tm_file} pa/pa-hpux.h"
550 xm_file=pa/xm-pahpux.h
551 xmake_file=pa/x-pa-hpux
552 if [[ x$gas = xyes ]]
554 tm_file="${tm_file} pa/pa-gas.h"
556 tm_file="pa/pa-oldas.h ${tm_file}"
559 install_headers_dir=install-headers-cpio
564 tm_file="${tm_file} pa/pa-hpux.h"
565 xm_file=pa/xm-pahpux.h
566 xmake_file=pa/x-pa-hpux
567 if [[ x$gas = xyes ]]
569 tm_file="${tm_file} pa/pa-gas.h"
572 install_headers_dir=install-headers-cpio
576 tm_file="${tm_file} pa/pa-hpux.h"
577 xm_file=pa/xm-pahpux.h
578 xmake_file=pa/x-pa-hpux
579 if [[ x$gas = xyes ]]
581 tm_file="${tm_file} pa/pa-gas.h"
584 install_headers_dir=install-headers-cpio
589 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
590 xm_file=pa/xm-pahpux.h
591 xmake_file=pa/x-pa-hpux
592 if [[ x$gas = xyes ]]
594 tm_file="${tm_file} pa/pa-gas.h"
597 install_headers_dir=install-headers-cpio
601 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
602 xm_file=pa/xm-pahpux.h
603 xmake_file=pa/x-pa-hpux
604 if [[ x$gas = xyes ]]
606 tm_file="${tm_file} pa/pa-gas.h"
609 install_headers_dir=install-headers-cpio
614 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
615 xm_file=pa/xm-pahpux.h
616 xmake_file=pa/x-pa-hpux
617 if [[ x$gas = xyes ]]
619 tm_file="${tm_file} pa/pa-gas.h"
622 install_headers_dir=install-headers-cpio
626 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
627 xm_file=pa/xm-pahpux.h
628 xmake_file=pa/x-pa-hpux
629 if [[ x$gas = xyes ]]
631 tm_file="${tm_file} pa/pa-gas.h"
634 install_headers_dir=install-headers-cpio
639 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
640 xm_file=pa/xm-pahpux.h
641 xmake_file=pa/x-pa-hpux
642 if [[ x$gas = xyes ]]
644 tm_file="${tm_file} pa/pa-gas.h"
647 install_headers_dir=install-headers-cpio
651 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
652 xm_file=pa/xm-pahpux.h
653 xmake_file=pa/x-pa-hpux
654 if [[ x$gas = xyes ]]
656 tm_file="${tm_file} pa/pa-gas.h"
659 install_headers_dir=install-headers-cpio
665 fixincludes=Makefile.in
669 i[[34567]]86-ibm-aix*) # IBM PS/2 running AIX
670 if [[ x$gas = xyes ]]
672 tm_file=i386/aix386.h
673 extra_parts="crtbegin.o crtend.o"
674 tmake_file=i386/t-crtstuff
676 tm_file=i386/aix386ng.h
679 xm_file=i386/xm-aix.h
680 xmake_file=i386/x-aix
683 i486-ncr-sysv4*) # NCR 3000 - i486 running system V.4
684 xm_file=i386/xm-sysv4.h
685 xmake_file=i386/x-ncr3000
686 if [[ x$stabs = xyes -a x$gas = xyes ]]
688 tm_file=i386/sysv4gdb.h
692 extra_parts="crtbegin.o crtend.o"
693 tmake_file=i386/t-crtpic
697 xm_file=i386/xm-next.h
698 tmake_file=i386/t-next
699 xmake_file=i386/x-next
700 extra_objs=nextstep.o
701 if [[ x$enable_threads = xyes ]]; then
705 i[[34567]]86-sequent-bsd*) # 80386 from Sequent
707 if [[ x$gas = xyes ]]
709 tm_file=i386/seq-gas.h
711 tm_file=i386/sequent.h
714 i[[34567]]86-sequent-ptx1*)
715 xm_file=i386/xm-sysv3.h
716 xmake_file=i386/x-sysv3
717 tm_file=i386/seq-sysv3.h
718 tmake_file=i386/t-crtstuff
719 fixincludes=fixinc.ptx
720 extra_parts="crtbegin.o crtend.o"
721 install_headers_dir=install-headers-cpio
724 i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
725 xm_file=i386/xm-sysv3.h
726 xmake_file=i386/x-sysv3
727 tm_file=i386/seq2-sysv3.h
728 tmake_file=i386/t-crtstuff
729 extra_parts="crtbegin.o crtend.o"
730 fixincludes=fixinc.ptx
731 install_headers_dir=install-headers-cpio
734 i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
735 xm_file=i386/xm-sysv4.h
737 tm_file=i386/ptx4-i.h
739 extra_parts="crtbegin.o crtend.o"
740 fixincludes=fixinc.ptx
741 install_headers_dir=install-headers-cpio
744 i386-sun-sunos*) # Sun i386 roadrunner
745 xm_file=i386/xm-sun.h
749 i[[34567]]86-*-aout*)
750 tm_file=i386/i386-aout.h
751 tmake_file=i386/t-i386bare
753 i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
754 tm_file=i386/bsd386.h
755 xm_file=i386/xm-bsd386.h
756 # tmake_file=t-libc-ok
759 tm_file=i386/386bsd.h
760 xm_file=i386/xm-bsd386.h
761 # tmake_file=t-libc-ok
762 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
765 i[[34567]]86-*-freebsdelf*)
766 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
767 # On FreeBSD, the headers are already ok, except for math.h.
768 fixincludes=fixinc.math
769 tmake_file=i386/t-freebsd
774 i[[34567]]86-*-freebsd*)
775 tm_file=i386/freebsd.h
776 # On FreeBSD, the headers are already ok, except for math.h.
777 fixincludes=fixinc.math
778 tmake_file=i386/t-freebsd
780 i[[34567]]86-*-netbsd*)
781 tm_file=i386/netbsd.h
782 # On NetBSD, the headers are already okay, except for math.h.
783 fixincludes=fixinc.math
786 i[[34567]]86-*-coff*)
787 tm_file=i386/i386-coff.h
788 tmake_file=i386/t-i386bare
790 i[[34567]]86-*-isc*) # 80386 running ISC system
791 xm_file=i386/xm-isc.h
793 i[[34567]]86-*-isc[[34]]*)
794 xmake_file=i386/x-isc3
797 xmake_file=i386/x-isc
800 if [[ x$gas = xyes -a x$stabs = xyes ]]
802 tm_file=i386/iscdbx.h
803 tmake_file=i386/t-svr3dbx
804 extra_parts="svr3.ifile svr3z.ifile"
806 tm_file=i386/isccoff.h
807 tmake_file=i386/t-crtstuff
808 extra_parts="crtbegin.o crtend.o"
810 install_headers_dir=install-headers-cpio
813 i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
814 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
815 xmake_file=x-linux-aout
816 tmake_file="t-linux-aout i386/t-crtstuff"
817 tm_file=i386/linux-oldld.h
818 fixincludes=Makefile.in
822 i[[34567]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
823 xm_file=i386/xm-linux.h # with a.out format
824 xmake_file=x-linux-aout
825 tmake_file="t-linux-aout i386/t-crtstuff"
826 tm_file=i386/linux-aout.h
827 fixincludes=Makefile.in #The headers are ok already.
831 i[[34567]]86-*-linux-gnulibc1)
832 xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
833 xmake_file=x-linux # with ELF format using the
834 tm_file=i386/linux.h # GNU/Linux C library 5
835 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
836 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
837 fixincludes=Makefile.in # The headers are ok already.
840 if [[ x$enable_threads = xyes ]]; then
844 i[[34567]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
845 xm_file=i386/xm-linux.h # with ELF format using glibc 2
846 xmake_file=x-linux # aka GNU/Linux C library 6
848 tmake_file="t-linux i386/t-crtstuff"
849 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
850 fixincludes=Makefile.in # The headers are ok already.
853 if [[ x$enable_threads = xyes ]]; then
859 i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
860 xm_file=i386/xm-go32.h
862 tmake_file=i386/t-go32
864 i[[34567]]86-pc-msdosdjgpp*)
865 xm_file=i386/xm-go32.h
867 tmake_file=i386/t-go32
871 i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
874 fixincludes=Makefile.in
878 i[[34567]]86-*-lynxos*)
879 if [[ x$gas = xyes ]]
883 tm_file=i386/lynx-ng.h
885 xm_file=i386/xm-lynx.h
886 tmake_file=i386/t-i386bare
889 i[[34567]]86-*-mach*)
891 # tmake_file=t-libc-ok
894 i[[34567]]86-*-osfrose*) # 386 using OSF/rose
895 if [[ x$elf = xyes ]]
897 tm_file=i386/osfelf.h
900 tm_file=i386/osfrose.h
903 xm_file=i386/xm-osf.h
904 xmake_file=i386/x-osfrose
905 tmake_file=i386/t-osf
908 i[[34567]]86-go32-rtems*)
910 xm_file=i386/xm-go32.h
911 tm_file=i386/go32-rtems.h
912 tmake_file="i386/t-go32 t-rtems"
914 i[[34567]]86-*-rtems*)
917 tmake_file="i386/t-i386bare t-rtems"
919 i[[34567]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
920 xm_file=i386/xm-sco5.h
921 xmake_file=i386/x-sco5
922 fixincludes=fixinc.sco
924 install_headers_dir=install-headers-cpio
926 tmake_file=i386/t-sco5
927 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
929 i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
930 xm_file=i386/xm-sco.h
931 xmake_file=i386/x-sco4
932 fixincludes=fixinc.sco
934 install_headers_dir=install-headers-cpio
935 if [[ x$stabs = xyes ]]
937 tm_file=i386/sco4dbx.h
938 tmake_file=i386/t-svr3dbx
939 extra_parts="svr3.ifile svr3z.rfile"
942 tmake_file=i386/t-crtstuff
943 extra_parts="crtbegin.o crtend.o"
947 i[[34567]]86-*-sco*) # 80386 running SCO system
948 xm_file=i386/xm-sco.h
949 xmake_file=i386/x-sco
951 install_headers_dir=install-headers-cpio
952 if [[ x$stabs = xyes ]]
954 tm_file=i386/scodbx.h
955 tmake_file=i386/t-svr3dbx
956 extra_parts="svr3.ifile svr3z.rfile"
959 extra_parts="crtbegin.o crtend.o"
960 tmake_file=i386/t-crtstuff
964 i[[34567]]86-*-solaris2*)
965 xm_file=i386/xm-sysv4.h
966 if [[ x$stabs = xyes ]]
968 tm_file=i386/sol2dbg.h
972 tmake_file=i386/t-sol2
973 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
975 fixincludes=fixinc.math
977 if [[ x$enable_threads = xyes ]]; then
978 thread_file='solaris'
981 i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
982 xm_file=i386/xm-sysv4.h
984 if [[ x$stabs = xyes ]]
986 tm_file="${tm_file} dbx.h"
988 tmake_file=i386/t-crtpic
990 extra_parts="crtbegin.o crtend.o"
992 i[[34567]]86-*-sysv*) # Intel 80386's running system V
993 xm_file=i386/xm-sysv3.h
994 xmake_file=i386/x-sysv3
995 if [[ x$gas = xyes ]]
997 if [[ x$stabs = xyes ]]
999 tm_file=i386/svr3dbx.h
1000 tmake_file=i386/t-svr3dbx
1001 extra_parts="svr3.ifile svr3z.rfile"
1003 tm_file=i386/svr3gas.h
1004 extra_parts="crtbegin.o crtend.o"
1005 tmake_file=i386/t-crtstuff
1008 tm_file=i386/sysv3.h
1009 extra_parts="crtbegin.o crtend.o"
1010 tmake_file=i386/t-crtstuff
1013 i386-*-vsta) # Intel 80386's running VSTa kernel
1014 xm_file=i386/xm-vsta.h
1016 tmake_file=i386/t-vsta
1017 xmake_file=i386/x-vsta
1019 i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
1020 xm_file="${xm_file} i386/xm-cygwin32.h"
1021 tmake_file=i386/t-cygwin32
1022 tm_file=i386/cygwin32.h
1023 xmake_file=i386/x-cygwin32
1025 fixincludes=Makefile.in
1026 if [[ x$enable_threads = xyes ]]; then
1031 i[[34567]]86-*-mingw32*)
1032 tm_file=i386/mingw32.h
1033 xm_file="${xm_file} i386/xm-mingw32.h"
1034 tmake_file=i386/t-cygwin32
1036 xmake_file=i386/x-cygwin32
1037 fixincludes=Makefile.in
1038 if [[ x$enable_threads = xyes ]]; then
1045 *minwg32crt* | *mingw32*)
1046 tm_file="${tm_file} i386/crtdll.h"
1050 i[[34567]]86-*-winnt3*)
1051 tm_file=i386/win-nt.h
1052 out_file=i386/i386.c
1053 xm_file=i386/xm-winnt.h
1054 xmake_file=winnt/x-winnt
1055 tmake_file=i386/t-winnt
1056 extra_host_objs="winnt.o oldnames.o"
1057 extra_gcc_objs="spawnv.o oldnames.o"
1058 fixincludes=fixinc.winnt
1059 if [[ x$gnu_ld != xyes ]]
1061 extra_programs=ld.exe
1063 if [[ x$enable_threads = xyes ]]; then
1067 i[[34567]]86-dg-dgux*)
1068 xm_file=i386/xm-dgux.h
1069 out_file=i386/dgux.c
1071 tmake_file=i386/t-dgux
1072 xmake_file=i386/x-dgux
1073 fixincludes=Makefile.in # There is nothing to fix
1074 install_headers_dir=install-headers-cpio
1076 i860-alliant-*) # Alliant FX/2800
1077 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1078 xm_file="${xm_file}"
1079 xmake_file=i860/x-fx2800
1080 tmake_file=i860/t-fx2800
1081 extra_parts="crtbegin.o crtend.o"
1084 tm_file="${tm_file} i860/bsd.h"
1085 if [[ x$gas = xyes ]]
1087 tm_file="${tm_file} i860/bsd-gas.h"
1092 tm_file="${tm_file} i860/mach.h"
1093 tmake_file=t-libc-ok
1095 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1096 tm_file="${tm_file} svr3.h i860/paragon.h"
1097 xm_file="${xm_file} xm-svr3.h"
1102 tm_file="${tm_file} svr3.h i860/sysv3.h"
1103 xm_file="${tm_file} xm-svr3.h"
1104 xmake_file=i860/x-sysv3
1105 extra_parts="crtbegin.o crtend.o"
1108 tm_file="${tm_file} svr4.h i860/sysv4.h"
1109 xm_file="${xm_file} xm-svr3.h"
1110 xmake_file=i860/x-sysv4
1112 extra_parts="crtbegin.o crtend.o"
1114 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1115 tm_file="${tm_file} i960/vx960.h"
1116 tmake_file=i960/t-vxworks960
1119 i960-wrs-vxworks5* | i960-wrs-vxworks)
1120 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1121 tmake_file=i960/t-vxworks960
1125 tm_file="${tm_file} i960/vx960.h"
1126 tmake_file=i960/t-vxworks960
1130 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1131 tmake_file=i960/t-960bare
1135 tmake_file="i960/t-960bare t-rtems"
1136 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1139 i960-*-*) # Default i960 environment.
1143 extra_parts="crtinit.o crtfini.o"
1145 m68000-convergent-sysv*)
1147 xm_file=m68k/xm-3b1.h
1149 extra_headers=math-68881.h
1151 m68000-hp-bsd*) # HP 9000/200 running BSD
1152 tm_file=m68k/hp2bsd.h
1153 xmake_file=m68k/x-hp2bsd
1155 extra_headers=math-68881.h
1157 m68000-hp-hpux*) # HP 9000 series 300
1158 xm_file=m68k/xm-hp320.h
1159 if [[ x$gas = xyes ]]
1161 xmake_file=m68k/x-hp320g
1162 tm_file=m68k/hp310g.h
1164 xmake_file=m68k/x-hp320
1165 tm_file=m68k/hp310.h
1168 install_headers_dir=install-headers-cpio
1170 extra_headers=math-68881.h
1175 extra_headers=math-68881.h
1178 tm_file=m68k/sun2o4.h
1180 extra_headers=math-68881.h
1183 xm_file=m68k/xm-3b1.h
1184 if [[ x$gas = xyes ]]
1191 extra_headers=math-68881.h
1193 m68k-apple-aux*) # Apple Macintosh running A/UX
1194 xm_file=m68k/xm-aux.h
1195 tmake_file=m68k/t-aux
1197 install_headers_dir=install-headers-cpio
1198 extra_headers=math-68881.h
1199 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1201 if [[ "$gnu_ld" = yes ]]
1203 tm_file="${tm_file} m68k/auxgld.h"
1205 tm_file="${tm_file} m68k/auxld.h"
1207 if [[ "$gas" = yes ]]
1209 tm_file="${tm_file} m68k/auxgas.h"
1211 tm_file="${tm_file} m68k/auxas.h"
1213 tm_file="${tm_file} m68k/a-ux.h"
1216 tm_file=m68k/apollo68.h
1217 xmake_file=m68k/x-apollo68
1219 extra_headers=math-68881.h
1221 m68k-altos-sysv*) # Altos 3068
1222 if [[ x$gas = xyes ]]
1224 tm_file=m68k/altos3068.h
1225 xm_file=m68k/xm-altos3068.h
1227 echo "The Altos is supported only with the GNU assembler" 1>&2
1230 extra_headers=math-68881.h
1232 m68k-bull-sysv*) # Bull DPX/2
1233 if [[ x$gas = xyes ]]
1235 if [[ x$stabs = xyes ]]
1237 tm_file=m68k/dpx2cdbx.h
1239 tm_file=m68k/dpx2g.h
1244 xm_file=m68k/xm-m68kv.h
1245 xmake_file=m68k/x-dpx2
1247 extra_headers=math-68881.h
1249 m68k-atari-sysv4*) # Atari variant of V.4.
1250 tm_file=m68k/atari.h
1251 xm_file=m68k/xm-atari.h
1253 extra_parts="crtbegin.o crtend.o"
1254 extra_headers=math-68881.h
1256 m68k-motorola-sysv*)
1257 tm_file=m68k/mot3300.h
1258 xm_file=m68k/xm-mot3300.h
1259 if [[ x$gas = xyes ]]
1261 xmake_file=m68k/x-mot3300-gas
1262 if [[ x$gnu_ld = xyes ]]
1264 tmake_file=m68k/t-mot3300-gald
1266 tmake_file=m68k/t-mot3300-gas
1270 xmake_file=m68k/x-mot3300
1271 if [[ x$gnu_ld = xyes ]]
1273 tmake_file=m68k/t-mot3300-gld
1275 tmake_file=m68k/t-mot3300
1279 gdb_needs_out_file_path=yes
1280 extra_parts="crt0.o mcrt0.o"
1281 extra_headers=math-68881.h
1283 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1284 tm_file=m68k/tower-as.h
1285 xm_file="${xm_file} xm-svr3.h"
1286 xmake_file=m68k/x-tower
1287 extra_parts="crtbegin.o crtend.o"
1288 extra_headers=math-68881.h
1291 tm_file=m68k/plexus.h
1292 xm_file=m68k/xm-plexus.h
1294 extra_headers=math-68881.h
1298 xm_file=m68k/xm-m68kv.h
1299 extra_headers=math-68881.h
1302 xm_file=m68k/xm-crds.h
1303 xmake_file=m68k/x-crds
1307 extra_headers=math-68881.h
1309 m68k-cbm-sysv4*) # Commodore variant of V.4.
1311 xm_file=m68k/xm-amix.h
1312 xmake_file=m68k/x-amix
1314 extra_parts="crtbegin.o crtend.o"
1315 extra_headers=math-68881.h
1318 tm_file=m68k/ccur-GAS.h
1319 xmake_file=m68k/x-ccur
1320 extra_headers=math-68881.h
1324 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1325 tm_file=m68k/hp3bsd44.h
1326 xmake_file=m68k/x-hp3bsd44
1328 extra_headers=math-68881.h
1330 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1331 tm_file=m68k/hp3bsd.h
1333 extra_headers=math-68881.h
1336 if [[ x$with_fp = xno ]]
1338 tm_file=m68k/isi-nfp.h
1343 extra_headers=math-68881.h
1345 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1346 xm_file=m68k/xm-hp320.h
1347 if [[ x$gas = xyes ]]
1349 xmake_file=m68k/x-hp320g
1350 tm_file=m68k/hp320g.h
1352 xmake_file=m68k/x-hp320
1353 tm_file=m68k/hpux7.h
1356 install_headers_dir=install-headers-cpio
1358 extra_headers=math-68881.h
1360 m68k-hp-hpux*) # HP 9000 series 300
1361 xm_file=m68k/xm-hp320.h
1362 if [[ x$gas = xyes ]]
1364 xmake_file=m68k/x-hp320g
1365 tm_file=m68k/hp320g.h
1367 xmake_file=m68k/x-hp320
1368 tm_file=m68k/hp320.h
1371 install_headers_dir=install-headers-cpio
1373 extra_headers=math-68881.h
1376 tm_file=m68k/sun3mach.h
1378 extra_headers=math-68881.h
1381 if [[ x$gas = xyes ]]
1383 tm_file=m68k/news3gas.h
1385 tm_file=m68k/news3.h
1388 extra_headers=math-68881.h
1390 m68k-sony-bsd* | m68k-sony-newsos*)
1391 if [[ x$gas = xyes ]]
1393 tm_file=m68k/newsgas.h
1398 extra_headers=math-68881.h
1400 m68k-next-nextstep2*)
1401 tm_file=m68k/next21.h
1402 xm_file=m68k/xm-next.h
1403 tmake_file=m68k/t-next
1404 xmake_file=m68k/x-next
1405 extra_objs=nextstep.o
1406 extra_headers=math-68881.h
1409 m68k-next-nextstep3*)
1411 xm_file=m68k/xm-next.h
1412 tmake_file=m68k/t-next
1413 xmake_file=m68k/x-next
1414 extra_objs=nextstep.o
1415 extra_headers=math-68881.h
1416 if [[ x$enable_threads = xyes ]]; then
1421 if [[ x$with_fp = xno ]]
1423 tm_file=m68k/sun3n3.h
1425 tm_file=m68k/sun3o3.h
1428 extra_headers=math-68881.h
1430 m68k-sun-sunos*) # For SunOS 4 (the default).
1431 if [[ x$with_fp = xno ]]
1433 tm_file=m68k/sun3n.h
1438 extra_headers=math-68881.h
1441 tm_file=m68k/vxm68k.h
1442 tmake_file=m68k/t-vxworks68
1443 extra_headers=math-68881.h
1446 tmake_file=m68k/t-m68kbare
1447 tm_file="m68k/m68k-aout.h libgloss.h"
1448 extra_headers=math-68881.h
1451 tmake_file=m68k/t-m68kbare
1452 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1453 extra_headers=math-68881.h
1456 if [[ x$gas = xyes ]]
1460 tm_file=m68k/lynx-ng.h
1462 xm_file=m68k/xm-lynx.h
1464 tmake_file=m68k/t-lynx
1465 extra_headers=math-68881.h
1468 tm_file=m68k/netbsd.h
1469 # On NetBSD, the headers are already okay, except for math.h.
1470 fixincludes=fixinc.math
1473 m68k-*-sysv3*) # Motorola m68k's running system V.3
1474 xm_file=m68k/xm-m68kv.h
1475 xmake_file=m68k/x-m68kv
1476 extra_parts="crtbegin.o crtend.o"
1477 extra_headers=math-68881.h
1479 m68k-*-sysv4*) # Motorola m68k's running system V.4
1480 tm_file=m68k/m68kv4.h
1481 xm_file=m68k/xm-m68kv.h
1483 extra_parts="crtbegin.o crtend.o"
1484 extra_headers=math-68881.h
1486 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1487 xm_file=m68k/xm-linux.h # with a.out format
1489 tm_file=m68k/linux-aout.h
1490 tmake_file="t-linux-aout m68k/t-linux-aout"
1491 fixincludes=Makefile.in # The headers are ok already.
1492 extra_headers=math-68881.h
1495 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1496 xm_file=m68k/xm-linux.h # with ELF format using the
1497 xmake_file=x-linux # GNU/Linux C library 5
1498 tm_file=m68k/linux.h
1499 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1500 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1501 fixincludes=Makefile.in # The headers are ok already.
1502 extra_headers=math-68881.h
1505 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1506 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1507 xmake_file=x-linux # aka the GNU/Linux C library 6.
1508 tm_file=m68k/linux.h
1509 tmake_file="t-linux m68k/t-linux"
1510 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1511 fixincludes=Makefile.in # The headers are ok already.
1512 extra_headers=math-68881.h
1514 if [[ x$enable_threads = xyes ]]; then
1519 tmake_file=m68k/t-m68kbare
1520 tm_file=m68k/m68k-psos.h
1521 extra_headers=math-68881.h
1524 tmake_file="m68k/t-m68kbare t-rtems"
1525 tm_file=m68k/rtems.h
1526 extra_headers=math-68881.h
1532 tm_file=m88k/dguxbcs.h
1533 tmake_file=m88k/t-dguxbcs
1537 tmake_file=m88k/t-dgux
1540 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1542 xmake_file=m88k/x-dgux
1543 if [[ x$gas = xyes ]]
1545 tmake_file=m88k/t-dgux-gas
1547 fixincludes=fixinc.dgux
1549 m88k-dolphin-sysv3*)
1550 tm_file=m88k/dolph.h
1551 extra_parts="crtbegin.o crtend.o"
1552 xm_file=m88k/xm-sysv3.h
1553 xmake_file=m88k/x-dolph
1554 if [[ x$gas = xyes ]]
1556 tmake_file=m88k/t-m88k-gas
1559 m88k-tektronix-sysv3)
1560 tm_file=m88k/tekXD88.h
1561 extra_parts="crtbegin.o crtend.o"
1562 xm_file=m88k/xm-sysv3.h
1563 xmake_file=m88k/x-tekXD88
1564 if [[ x$gas = xyes ]]
1566 tmake_file=m88k/t-m88k-gas
1570 tm_file=m88k/m88k-aout.h
1573 tm_file=m88k/m88k-coff.h
1574 tmake_file=m88k/t-bug
1578 extra_parts="crtbegin.o crtend.o"
1579 if [[ x$gas = xyes ]]
1581 tmake_file=m88k/t-luna-gas
1583 tmake_file=m88k/t-luna
1587 tm_file=m88k/sysv3.h
1588 extra_parts="crtbegin.o crtend.o"
1589 xm_file=m88k/xm-sysv3.h
1590 xmake_file=m88k/x-sysv3
1591 if [[ x$gas = xyes ]]
1593 tmake_file=m88k/t-m88k-gas
1597 tm_file=m88k/sysv4.h
1598 extra_parts="crtbegin.o crtend.o"
1599 xmake_file=m88k/x-sysv4
1600 tmake_file=m88k/t-sysv4
1602 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1603 tm_file=mips/iris6.h
1604 xm_file=mips/xm-iris6.h
1606 fixincludes=fixinc.irix
1607 xmake_file=mips/x-iris6
1608 tmake_file=mips/t-iris6
1609 if [[ x$enable_threads = xyes ]]; then
1613 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1614 tm_file=mips/cross64.h
1615 xm_file=mips/xm-iris5.h
1617 fixincludes=Makefile.in
1618 xmake_file=mips/x-iris
1619 tmake_file=mips/t-cross64
1620 # See comment in mips/iris[56].h files.
1622 if [[ x$enable_threads = xyes ]]; then
1627 if [[ x$gas = xyes ]]
1629 if [[ x$stabs = xyes ]]
1631 tm_file=mips/iris5gdb.h
1633 tm_file=mips/sni-gas.h
1636 tm_file=mips/sni-svr4.h
1638 xm_file=mips/xm-sysv.h
1639 xmake_file=mips/x-sni-svr4
1640 tmake_file=mips/t-mips-gas
1641 if [[ x$gnu_ld != xyes ]]
1647 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1648 if [[ x$gas = xyes ]]
1650 tm_file=mips/iris5gas.h
1651 if [[ x$stabs = xyes ]]
1653 tm_file="${tm_file} dbx.h"
1656 tm_file=mips/iris5.h
1658 xm_file=mips/xm-iris5.h
1660 fixincludes=fixinc.irix
1661 xmake_file=mips/x-iris
1662 # mips-tfile doesn't work yet
1663 tmake_file=mips/t-mips-gas
1664 # See comment in mips/iris5.h file.
1666 if [[ x$enable_threads = xyes ]]; then
1670 mips-sgi-irix4loser*) # Mostly like a MIPS.
1671 tm_file=mips/iris4loser.h
1672 if [[ x$stabs = xyes ]]; then
1673 tm_file="${tm_file} dbx.h"
1675 xm_file=mips/xm-iris4.h
1677 xmake_file=mips/x-iris
1678 if [[ x$gas = xyes ]]
1680 tmake_file=mips/t-mips-gas
1682 extra_passes="mips-tfile mips-tdump"
1684 if [[ x$gnu_ld != xyes ]]
1688 if [[ x$enable_threads = xyes ]]; then
1692 mips-sgi-irix4*) # Mostly like a MIPS.
1693 tm_file=mips/iris4.h
1694 if [[ x$stabs = xyes ]]; then
1695 tm_file="${tm_file} dbx.h"
1697 xm_file=mips/xm-iris4.h
1699 xmake_file=mips/x-iris
1700 if [[ x$gas = xyes ]]
1702 tmake_file=mips/t-mips-gas
1704 extra_passes="mips-tfile mips-tdump"
1706 if [[ x$gnu_ld != xyes ]]
1710 if [[ x$enable_threads = xyes ]]; then
1714 mips-sgi-*) # Mostly like a MIPS.
1715 tm_file=mips/iris3.h
1716 if [[ x$stabs = xyes ]]; then
1717 tm_file="${tm_file} dbx.h"
1719 xm_file=mips/xm-iris3.h
1721 xmake_file=mips/x-iris3
1722 if [[ x$gas = xyes ]]
1724 tmake_file=mips/t-mips-gas
1726 extra_passes="mips-tfile mips-tdump"
1728 if [[ x$gnu_ld != xyes ]]
1733 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1734 tm_file=mips/osfrose.h
1735 xmake_file=mips/x-osfrose
1736 tmake_file=mips/t-osfrose
1737 extra_objs=halfpic.o
1740 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1741 tm_file=mips/dec-osf1.h
1742 if [[ x$stabs = xyes ]]; then
1743 tm_file="${tm_file} dbx.h"
1745 xmake_file=mips/x-dec-osf1
1746 if [[ x$gas = xyes ]]
1748 tmake_file=mips/t-mips-gas
1750 tmake_file=mips/t-ultrix
1751 extra_passes="mips-tfile mips-tdump"
1753 if [[ x$gnu_ld != xyes ]]
1758 mips-dec-bsd*) # Decstation running 4.4 BSD
1759 tm_file=mips/dec-bsd.h
1761 if [[ x$gas = xyes ]]
1763 tmake_file=mips/t-mips-gas
1765 tmake_file=mips/t-ultrix
1766 extra_passes="mips-tfile mips-tdump"
1768 if [[ x$gnu_ld != xyes ]]
1773 mips-dec-netbsd*) # Decstation running NetBSD
1774 tm_file=mips/netbsd.h
1775 # On NetBSD, the headers are already okay, except for math.h.
1776 fixincludes=fixinc.math
1778 if [[ x$prefix = xNONE ]]; then
1779 prefix=$native_prefix
1782 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1783 tm_file=mips/news4.h
1784 if [[ x$stabs = xyes ]]; then
1785 tm_file="${tm_file} dbx.h"
1787 if [[ x$gas = xyes ]]
1789 tmake_file=mips/t-mips-gas
1791 extra_passes="mips-tfile mips-tdump"
1793 if [[ x$gnu_ld != xyes ]]
1797 xmake_file=mips/x-sony
1799 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1800 # That is based on svr4.
1801 # t-svr4 is not right because this system doesn't use ELF.
1802 tm_file=mips/news5.h
1803 if [[ x$stabs = xyes ]]; then
1804 tm_file="${tm_file} dbx.h"
1806 xm_file=mips/xm-news.h
1807 if [[ x$gas = xyes ]]
1809 tmake_file=mips/t-mips-gas
1811 extra_passes="mips-tfile mips-tdump"
1813 if [[ x$gnu_ld != xyes ]]
1818 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1819 tm_file=mips/svr4-t.h
1820 if [[ x$stabs = xyes ]]; then
1821 tm_file="${tm_file} dbx.h"
1823 xm_file=mips/xm-sysv4.h
1824 xmake_file=mips/x-sysv
1825 if [[ x$gas = xyes ]]
1827 tmake_file=mips/t-mips-gas
1828 extra_parts="crtbegin.o crtend.o"
1830 tmake_file=mips/t-mips
1831 extra_passes="mips-tfile mips-tdump"
1833 if [[ x$gnu_ld != xyes ]]
1839 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1840 tm_file=mips/ultrix.h
1841 if [[ x$stabs = xyes ]]; then
1842 tm_file="${tm_file} dbx.h"
1844 xmake_file=mips/x-ultrix
1845 if [[ x$gas = xyes ]]
1847 tmake_file=mips/t-mips-gas
1849 tmake_file=mips/t-ultrix
1850 extra_passes="mips-tfile mips-tdump"
1852 if [[ x$gnu_ld != xyes ]]
1857 mips-*-riscos[[56789]]bsd*)
1858 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1859 if [[ x$stabs = xyes ]]; then
1860 tm_file="${tm_file} dbx.h"
1862 if [[ x$gas = xyes ]]
1864 tmake_file=mips/t-bsd-gas
1866 tmake_file=mips/t-bsd
1867 extra_passes="mips-tfile mips-tdump"
1869 if [[ x$gnu_ld != xyes ]]
1875 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1876 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1877 if [[ x$stabs = xyes ]]; then
1878 tm_file="${tm_file} dbx.h"
1880 if [[ x$gas = xyes ]]
1882 tmake_file=mips/t-bsd-gas
1884 tmake_file=mips/t-bsd
1885 extra_passes="mips-tfile mips-tdump"
1887 if [[ x$gnu_ld != xyes ]]
1893 mips-*-riscos[[56789]]sysv4*)
1894 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1895 if [[ x$stabs = xyes ]]; then
1896 tm_file="${tm_file} dbx.h"
1898 xm_file=mips/xm-sysv4.h
1899 xmake_file=mips/x-sysv
1900 if [[ x$gas = xyes ]]
1902 tmake_file=mips/t-svr4-gas
1904 tmake_file=mips/t-svr4
1905 extra_passes="mips-tfile mips-tdump"
1907 if [[ x$gnu_ld != xyes ]]
1913 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1914 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1915 if [[ x$stabs = xyes ]]; then
1916 tm_file="${tm_file} dbx.h"
1918 xm_file=mips/xm-sysv.h
1919 xmake_file=mips/x-sysv
1920 if [[ x$gas = xyes ]]
1922 tmake_file=mips/t-svr4-gas
1924 tmake_file=mips/t-svr4
1925 extra_passes="mips-tfile mips-tdump"
1927 if [[ x$gnu_ld != xyes ]]
1933 mips-*-riscos[[56789]]sysv*)
1934 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1935 if [[ x$stabs = xyes ]]; then
1936 tm_file="${tm_file} dbx.h"
1938 xm_file=mips/xm-sysv.h
1939 xmake_file=mips/x-sysv
1940 if [[ x$gas = xyes ]]
1942 tmake_file=mips/t-svr3-gas
1944 tmake_file=mips/t-svr3
1945 extra_passes="mips-tfile mips-tdump"
1947 if [[ x$gnu_ld != xyes ]]
1953 mips-*-sysv* | mips-*-riscos*sysv*)
1954 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1955 if [[ x$stabs = xyes ]]; then
1956 tm_file="${tm_file} dbx.h"
1958 xm_file=mips/xm-sysv.h
1959 xmake_file=mips/x-sysv
1960 if [[ x$gas = xyes ]]
1962 tmake_file=mips/t-svr3-gas
1964 tmake_file=mips/t-svr3
1965 extra_passes="mips-tfile mips-tdump"
1967 if [[ x$gnu_ld != xyes ]]
1973 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1974 tm_file=mips/mips-5.h
1975 if [[ x$stabs = xyes ]]; then
1976 tm_file="${tm_file} dbx.h"
1978 if [[ x$gas = xyes ]]
1980 tmake_file=mips/t-mips-gas
1982 extra_passes="mips-tfile mips-tdump"
1984 if [[ x$gnu_ld != xyes ]]
1993 tm_file=mips/ecoffl.h
1994 if [[ x$stabs = xyes ]]; then
1995 tm_file="${tm_file} dbx.h"
1997 tmake_file=mips/t-ecoff
2000 tm_file=mips/ecoff.h
2001 if [[ x$stabs = xyes ]]; then
2002 tm_file="${tm_file} dbx.h"
2004 tmake_file=mips/t-ecoff
2008 tm_file="mips/elfl.h libgloss.h"
2009 tmake_file=mips/t-ecoff
2012 tm_file="mips/elf.h libgloss.h"
2013 tmake_file=mips/t-ecoff
2016 tm_file="mips/elfl64.h libgloss.h"
2017 tmake_file=mips/t-ecoff
2019 mips64orionel-*-elf*)
2020 tm_file="mips/elflorion.h libgloss.h"
2021 tmake_file=mips/t-ecoff
2024 tm_file="mips/elf64.h libgloss.h"
2025 tmake_file=mips/t-ecoff
2028 tm_file="mips/elforion.h libgloss.h"
2029 tmake_file=mips/t-ecoff
2031 mips64orion-*-rtems*)
2032 tm_file=mips/rtems64.h
2033 tmake_file="mips/t-ecoff t-rtems"
2036 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2037 tmake_file=mips/t-ecoff
2040 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2041 tmake_file=mips/t-ecoff
2043 mips-*-*) # Default MIPS RISC-OS 4.0.
2044 if [[ x$stabs = xyes ]]; then
2045 tm_file="${tm_file} dbx.h"
2047 if [[ x$gas = xyes ]]
2049 tmake_file=mips/t-mips-gas
2051 extra_passes="mips-tfile mips-tdump"
2053 if [[ x$gnu_ld != xyes ]]
2060 tm_file="mn10200/mn10200.h"
2061 if [[ x$stabs = xyes ]]
2063 tm_file="${tm_file} dbx.h"
2069 tm_file="mn10300/mn10300.h"
2070 if [[ x$stabs = xyes ]]
2072 tm_file="${tm_file} dbx.h"
2077 tm_file=ns32k/encore.h
2081 tm_file=ns32k/sequent.h
2085 tm_file=ns32k/tek6100.h
2090 tm_file=ns32k/tek6200.h
2094 # This has not been updated to GCC 2.
2096 # xm_file=ns32k/xm-genix.h
2097 # xmake_file=ns32k/x-genix
2098 # tm_file=ns32k/genix.h
2099 # broken_install=yes
2103 tm_file=ns32k/merlin.h
2107 tm_file=ns32k/pc532-mach.h
2111 tm_file=ns32k/pc532-min.h
2112 xm_file=ns32k/xm-pc532-min.h
2115 ns32k-pc532-netbsd*)
2116 tm_file=ns32k/netbsd.h
2117 # On NetBSD, the headers are already okay, except for math.h.
2118 fixincludes=fixinc.math
2122 tm_file="${tm_file} pdp11/2bsd.h"
2128 xmake_file=pyr/x-pyr
2135 xmake_file=romp/x-mach
2138 powerpc-*-sysv* | powerpc-*-elf*)
2139 tm_file=rs6000/sysv4.h
2140 xm_file=rs6000/xm-sysv4.h
2141 extra_headers=ppc-asm.h
2142 if [[ x$gas = xyes ]]
2144 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2146 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2148 xmake_file=rs6000/x-sysv4
2151 tm_file=rs6000/eabiaix.h
2152 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2153 fixincludes=Makefile.in
2154 extra_headers=ppc-asm.h
2157 tm_file=rs6000/eabisim.h
2158 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2159 fixincludes=Makefile.in
2160 extra_headers=ppc-asm.h
2163 tm_file=rs6000/eabi.h
2164 if [[ x$gas = xyes ]]
2166 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2168 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2170 fixincludes=Makefile.in
2171 extra_headers=ppc-asm.h
2174 tm_file=rs6000/rtems.h
2175 if [[ x$gas = xyes ]]
2177 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2179 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2181 fixincludes=Makefile.in
2182 extra_headers=ppc-asm.h
2184 powerpc-*-linux-gnu*)
2185 tm_file=rs6000/linux.h
2186 xm_file=rs6000/xm-sysv4.h
2187 out_file=rs6000/rs6000.c
2188 if [[ x$gas = xyes ]]
2190 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2192 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2195 fixincludes=Makefile.in
2196 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2197 extra_headers=ppc-asm.h
2198 if [[ x$enable_threads = xyes ]]; then
2204 xm_file=rs6000/xm-sysv4.h
2205 tm_file=rs6000/vxppc.h
2206 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2207 extra_headers=ppc-asm.h
2209 powerpcle-*-sysv* | powerpcle-*-elf*)
2210 tm_file=rs6000/sysv4le.h
2211 xm_file=rs6000/xm-sysv4.h
2212 if [[ x$gas = xyes ]]
2214 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2216 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2218 xmake_file=rs6000/x-sysv4
2219 extra_headers=ppc-asm.h
2221 powerpcle-*-eabisim*)
2222 tm_file=rs6000/eabilesim.h
2223 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2224 fixincludes=Makefile.in
2225 extra_headers=ppc-asm.h
2228 tm_file=rs6000/eabile.h
2229 if [[ x$gas = xyes ]]
2231 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2233 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2235 fixincludes=Makefile.in
2236 extra_headers=ppc-asm.h
2238 powerpcle-*-winnt* )
2239 tm_file=rs6000/win-nt.h
2240 tmake_file=rs6000/t-winnt
2242 fixincludes=Makefile.in
2243 if [[ x$enable_threads = xyes ]]; then
2246 extra_headers=ppc-asm.h
2248 powerpcle-*-pe | powerpcle-*-cygwin32)
2249 tm_file=rs6000/cygwin32.h
2250 xm_file=rs6000/xm-cygwin32.h
2251 tmake_file=rs6000/t-winnt
2252 xmake_file=rs6000/x-cygwin32
2254 fixincludes=Makefile.in
2255 if [[ x$enable_threads = xyes ]]; then
2259 extra_headers=ppc-asm.h
2261 powerpcle-*-solaris2*)
2262 tm_file=rs6000/sol2.h
2263 xm_file=rs6000/xm-sysv4.h
2264 if [[ x$gas = xyes ]]
2266 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2268 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2270 xmake_file=rs6000/x-sysv4
2271 fixincludes=fixinc.math
2272 extra_headers=ppc-asm.h
2274 rs6000-ibm-aix3.[[01]]*)
2275 tm_file=rs6000/aix31.h
2276 xmake_file=rs6000/x-aix31
2279 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2280 tm_file=rs6000/aix3newas.h
2281 if [[ x$host != x$target ]]
2283 tmake_file=rs6000/t-xnewas
2285 tmake_file=rs6000/t-newas
2289 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2290 tm_file=rs6000/aix41.h
2291 if [[ x$host != x$target ]]
2293 tmake_file=rs6000/t-xnewas
2295 tmake_file=rs6000/t-newas
2297 xmake_file=rs6000/x-aix31
2307 tm_file=rs6000/mach.h
2308 xm_file=rs6000/xm-mach.h
2309 xmake_file=rs6000/x-mach
2313 tm_file=rs6000/lynx.h
2314 xm_file=rs6000/xm-lynx.h
2315 tmake_file=rs6000/t-rs6000
2316 xmake_file=rs6000/x-lynx
2324 tmake_file="sh/t-sh t-rtems"
2333 xm_file=sparc/xm-pbd.h
2335 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2336 tm_file=sparc/vxsparc.h
2337 tmake_file=sparc/t-vxsparc
2341 tmake_file=sparc/t-sparcbare
2342 tm_file="sparc/aout.h libgloss.h"
2345 tm_file=sparc/netbsd.h
2346 # On NetBSD, the headers are already okay, except for math.h.
2347 fixincludes=fixinc.math
2355 tmake_file=sparc/t-elf
2356 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2360 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2361 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2362 tm_file=sparc/linux-aout.h
2364 fixincludes=Makefile.in # The headers are ok already.
2368 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2369 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2371 tm_file=sparc/linux.h
2372 tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
2373 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2374 fixincludes=Makefile.in # The headers are ok already.
2378 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2379 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2381 tm_file=sparc/linux.h
2382 tmake_file="t-linux sparc/t-linux"
2383 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2384 fixincludes=Makefile.in # The headers are ok already.
2387 if [[ x$enable_threads = xyes ]]; then
2392 if [[ x$gas = xyes ]]
2394 tm_file=sparc/lynx.h
2396 tm_file=sparc/lynx-ng.h
2398 xm_file=sparc/xm-lynx.h
2399 tmake_file=sparc/t-sunos41
2403 tmake_file="sparc/t-sparcbare t-rtems"
2404 tm_file=sparc/rtems.h
2407 if [[ x$gnu_ld = xyes ]]
2409 tm_file=sparc/sol2.h
2411 tm_file=sparc/sol2-sld.h
2413 xm_file=sparc/xm-sol2.h
2414 tmake_file=sparc/t-sol2
2415 xmake_file=sparc/x-sysv4
2416 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2417 fixincludes=fixinc.math
2420 if [[ x$enable_threads = xyes ]]; then
2421 thread_file='solaris'
2425 tm_file=sparc/sunos4.h
2426 tmake_file=sparc/t-sunos40
2430 tm_file=sparc/sunos4.h
2431 tmake_file=sparc/t-sunos41
2433 if [[ x$gas = xyes ]]; then
2434 tm_file="${tm_file} sparc/sun4gas.h"
2438 tm_file=sparc/sun4o3.h
2442 tm_file=sparc/sysv4.h
2443 xm_file=sparc/xm-sysv4.h
2445 xmake_file=sparc/x-sysv4
2446 extra_parts="crtbegin.o crtend.o"
2449 xm_file=sparc/xm-sol2.h
2450 tm_file=sparc/vxsim.h
2451 tmake_file=sparc/t-vxsparc
2452 xmake_file=sparc/x-sysv4
2455 tm_file="sparc/splet.h libgloss.h"
2456 tmake_file=sparc/t-splet
2459 tm_file="sparc/litecoff.h libgloss.h"
2460 tmake_file=sparc/t-sparclite
2463 tm_file="sparc/lite.h aoutos.h libgloss.h"
2464 tmake_file=sparc/t-sparclite
2467 tmake_file=sparc/t-sp64
2468 tm_file=sparc/sp64-aout.h
2471 tmake_file=sparc/t-sp64
2472 tm_file=sparc/sp64-elf.h
2473 extra_parts="crtbegin.o crtend.o"
2475 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2476 tmake_file=sparc/t-sp64
2477 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2478 tm_file=sparc/linux64.h
2480 fixincludes=Makefile.in # The headers are ok already.
2483 # This hasn't been upgraded to GCC 2.
2484 # tahoe-harris-*) # Harris tahoe, using COFF.
2485 # tm_file=tahoe/harris.h
2487 # tahoe-*-bsd*) # tahoe running BSD
2489 # This hasn't been upgraded to GCC 2.
2496 tm_file="v850/v850.h"
2497 xm_file="v850/xm-v850.h"
2498 if [[ x$stabs = xyes ]]
2500 tm_file="${tm_file} dbx.h"
2504 vax-*-bsd*) # vaxen running BSD
2508 vax-*-sysv*) # vaxen running system V
2509 tm_file="${tm_file} vax/vaxv.h"
2510 xm_file="${xm_file} vax/xm-vaxv.h"
2514 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2515 # On NetBSD, the headers are already okay, except for math.h.
2516 fixincludes=fixinc.math
2520 vax-*-ultrix*) # vaxen running ultrix
2521 tm_file="${tm_file} vax/ultrix.h"
2525 vax-*-vms*) # vaxen running VMS
2526 xm_file=vax/xm-vms.h
2530 vax-*-*) # vax default entry
2534 xm_file="${xm_file} xm-svr3"
2538 echo "Configuration $machine not supported" 1>&2
2545 ;; # Existing Linux/GNU systems do not use the GNU setup.
2547 # On the GNU system, the setup is just about the same on
2548 # each different CPU. The specific machines that GNU
2549 # supports are matched above and just set $cpu_type.
2550 xm_file=${cpu_type}/xm-gnu.h
2551 tm_file=${cpu_type}/gnu.h
2552 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2553 # GNU always uses ELF.
2555 # GNU tools are the only tools.
2558 # On GNU, the headers are already okay.
2559 fixincludes=Makefile.in
2560 xmake_file=x-linux # These details are the same as Linux.
2561 tmake_file=t-gnu # These are not.
2564 fixincludes=fixinc.svr4
2565 xmake_try_sysv=x-sysv
2567 install_headers_dir=install-headers-cpio
2571 install_headers_dir=install-headers-cpio
2575 # Distinguish i[34567]86
2576 # Also, do not run mips-tfile on MIPS if using gas.
2577 # Process --with-cpu= for PowerPC/rs6000
2578 target_cpu_default2=
2581 target_cpu_default2=1
2584 target_cpu_default2=2
2586 i686-*-* | i786-*-*)
2587 target_cpu_default2=3
2592 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2595 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|TASK_MAX"
2598 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2601 target_cpu_default2="MASK_CPU_EV5"
2605 if [[ x$gas = xyes ]]
2607 if [[ x$target_cpu_default2 = x ]]
2609 target_cpu_default2="MASK_GAS"
2611 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2616 case "x$with_cpu" in
2619 target_cpu_default2="TARGET_CPU_generic"
2622 # Distinguish cores, and major variants
2623 # arm7m doesn't exist, but D & I don't affect code
2624 xarm[23678] | xarm250 | xarm[67][01]0 \
2625 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2626 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2627 | xstrongarm | xstrongarm110)
2628 target_cpu_default2="TARGET_CPU_$with_cpu"
2632 echo "--with-cpu must be passed a value" 1>&2
2637 if [[ x$pass2done = xyes ]]
2639 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2646 mips*-*-ecoff* | mips*-*-elf*)
2647 if [[ x$gas = xyes ]]
2649 if [[ x$gnu_ld = xyes ]]
2651 target_cpu_default2=20
2653 target_cpu_default2=16
2658 if [[ x$gas = xyes ]]
2660 target_cpu_default2=16
2663 powerpc*-*-* | rs6000-*-*)
2664 case "x$with_cpu" in
2668 xcommon | xpower | xpower2 | xpowerpc | xrios \
2669 | xrios1 | xrios2 | xrsc | xrsc1 \
2670 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2671 | x403 | x505 | x801 | x821 | x823 | x860)
2672 target_cpu_default2="\"$with_cpu\""
2676 echo "--with-cpu must be passed a value" 1>&2
2681 if [[ x$pass2done = xyes ]]
2683 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2690 case ".$with_cpu" in
2692 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2694 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2695 target_cpu_default2="TARGET_CPU_$with_cpu"
2698 if [[ x$pass2done = xyes ]]
2700 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2708 if [[ x$target_cpu_default2 != x ]]
2710 if [[ x$target_cpu_default != x ]]
2712 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2714 target_cpu_default=$target_cpu_default2
2718 # No need for collect2 if we have the GNU linker.
2725 # Save data on machine being used to compile GCC in build_xm_file.
2726 # Save data on host machine in vars host_xm_file and host_xmake_file.
2727 if [[ x$pass1done = x ]]
2729 if [[ x"$xm_file" = x ]]
2730 then build_xm_file=$cpu_type/xm-$cpu_type.h
2731 else build_xm_file=$xm_file
2733 build_broken_install=$broken_install
2734 build_install_headers_dir=$install_headers_dir
2735 build_exeext=$exeext
2738 if [[ x$pass2done = x ]]
2740 if [[ x"$xm_file" = x ]]
2741 then host_xm_file=$cpu_type/xm-$cpu_type.h
2742 else host_xm_file=$xm_file
2744 if [[ x"$xmake_file" = x ]]
2745 then xmake_file=$cpu_type/x-$cpu_type
2747 host_xmake_file="$xmake_file"
2748 host_truncate_target=$truncate_target
2749 host_extra_gcc_objs=$extra_gcc_objs
2750 host_extra_objs=$extra_host_objs
2756 extra_objs="${host_extra_objs} ${extra_objs}"
2758 # Default the target-machine variables that were not explicitly set.
2759 if [[ x"$tm_file" = x ]]
2760 then tm_file=$cpu_type/$cpu_type.h; fi
2762 if [[ x$extra_headers = x ]]
2763 then extra_headers=; fi
2765 if [[ x"$xm_file" = x ]]
2766 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2768 md_file=$cpu_type/$cpu_type.md
2770 if [[ x$out_file = x ]]
2771 then out_file=$cpu_type/$cpu_type.c; fi
2773 if [[ x"$tmake_file" = x ]]
2774 then tmake_file=$cpu_type/t-$cpu_type
2777 if [[ x$float_format = x ]]
2778 then float_format=i64
2781 # Say what files are being used for the output code and MD file.
2782 echo "Using \`$srcdir/config/$out_file' to output insns."
2783 echo "Using \`$srcdir/config/$md_file' as machine description file."
2786 for f in $tm_file; do
2789 if [[ $count = ax ]]; then
2790 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2792 echo "Using the following target machine macro files:"
2793 for f in $tm_file; do
2794 echo " $srcdir/config/$f"
2799 for f in $host_xm_file; do
2802 if [[ $count = ax ]]; then
2803 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2805 echo "Using the following host machine macro files:"
2806 for f in $host_xm_file; do
2807 echo " $srcdir/config/$f"
2811 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2813 for f in $build_xm_file; do
2816 if [[ $count = ax ]]; then
2817 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2819 echo "Using the following build machine macro files:"
2820 for f in $build_xm_file; do
2821 echo " $srcdir/config/$f"
2826 if [[ x$thread_file = x ]]
2827 then thread_file='single'
2830 # Set up the header files.
2831 # $links is the list of header files to create.
2832 # $vars is the list of shell variables with file names to include.
2833 # auto-conf.h is the file containing items generated by autoconf and is
2834 # the first file included by config.h.
2835 host_xm_file="auto-config.h ${host_xm_file}"
2836 vars="host_xm_file tm_file xm_file build_xm_file"
2837 links="config.h tm.h tconfig.h hconfig.h"
2840 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2843 while [[ -n "$vars" ]]
2845 # set file to car of files, files to cdr of files
2846 set $vars; var=$1; shift; vars=$*
2847 set $links; link=$1; shift; links=$*
2851 # Define TARGET_CPU_DEFAULT if the system wants one.
2852 # This substitutes for lots of *.h files.
2853 if [[ x$target_cpu_default != x -a $link = tm.h ]]
2855 echo "#define TARGET_CPU_DEFAULT $target_cpu_default" >>$link
2858 for file in `eval echo '$'$var`; do
2859 echo "#include \"$file\"" >>$link
2863 # If we have a CVS directory, set up a rule so verion.c will be made
2864 # from CVS tag information and use a dummy version number here if we
2865 # don't have version.c.
2868 if [[ -d $srcdir/CVS ]]; then
2869 version_dep=ChangeLog
2872 if [[ ! -f $srcdir/version.c -a -d $srcdir/CVS ]]
2876 # Get the version number from the toplevel
2877 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
2880 # Are we using gcc as the native compiler?
2882 *linux* | *cygwin32* | *mingw32*)
2883 if [[ x$prefix = xNONE ]]; then
2884 prefix=$native_prefix
2889 # Get an absolute path to the GCC top-level source directory
2895 # Conditionalize the makefile for this host machine.
2896 # Make-host contains the concatenation of all host makefile fragments
2897 # [there can be more than one]. This file is built by configure.frag.
2898 host_overrides=Make-host
2899 dep_host_xmake_file=
2900 for f in .. ${host_xmake_file}
2902 if [[ -f ${srcdir}/config/$f ]]
2904 dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f"
2908 # Conditionalize the makefile for this target machine.
2909 # Make-target contains the concatenation of all host makefile fragments
2910 # [there can be more than one]. This file is built by configure.frag.
2911 target_overrides=Make-target
2913 for f in .. ${tmake_file}
2915 if [[ -f ${srcdir}/config/$f ]]
2917 dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f"
2921 # If the host doesn't support symlinks, modify CC in
2922 # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
2923 # Otherwise, we can use "CC=$(CC)".
2925 if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
2927 cc_set_by_configure="\$(CC)"
2928 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2931 if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
2933 symbolic_link="cp -p"
2937 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2938 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2942 out_object_file=`basename $out_file .c`.o
2945 for f in $tm_file; do
2946 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2950 for f in $host_xm_file; do
2951 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2955 for f in $build_xm_file; do
2956 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2959 # Define macro CROSS_COMPILE in compilation
2960 # if this is a cross-compiler.
2961 # Also use all.cross instead of all.internal
2962 # and add cross-make to Makefile.
2963 cross_overrides="/dev/null"
2964 if [[ x$host != x$target ]]
2966 cross_defines="CROSS=-DCROSS_COMPILE"
2967 cross_overrides="${topdir}/cross-make"
2970 # When building gcc with a cross-compiler, we need to fix a few things.
2971 # This must come after cross-make as we want all.build to override
2973 build_overrides="/dev/null"
2974 if [[ x$build != x$host ]]
2976 build_overrides="${topdir}/build-make"
2979 # Expand extra_headers to include complete path.
2980 # This substitutes for lots of t-* files.
2982 if [[ "x$extra_headers" = x ]]
2985 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2986 for file in $extra_headers;
2988 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2992 # Add a definition of USE_COLLECT2 if system wants one.
2993 # Also tell toplev.c what to do.
2994 # This substitutes for lots of t-* files.
2995 if [[ x$use_collect2 = x ]]
3000 will_use_collect2="ld"
3001 maybe_use_collect2="-DUSE_COLLECT2"
3005 # Set MD_DEPS if the real md file is in md.pre-cpp.
3006 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
3007 # for line oriented comments, so we must always use a GNU cpp. If
3008 # building gcc with a cross compiler, use the cross compiler just
3009 # built. Otherwise, we can use the cpp just built.
3011 if [[ "x$md_cppflags" = x ]]
3013 md_file_sub=$srcdir/config/$md_file
3018 # If we have gas in the build tree, make a link to it.
3019 if [[ -f ../gas/Makefile ]]; then
3020 rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
3023 # If we have ld in the build tree, make a link to it.
3024 if [[ -f ../ld/Makefile ]]; then
3025 if [[ x$use_collect2 = x ]]; then
3026 rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
3028 rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
3032 # Figure out what language subdirectories are present.
3034 for lang in ${srcdir}/*/config-lang.in ..
3038 # The odd quoting in the next line works around
3039 # an apparent bug in bash 1.12 on linux.
3040 ${srcdir}/[[*]]/config-lang.in) ;;
3041 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3045 # Make empty files to contain the specs and options for each language.
3046 # Then add #include lines to for a compiler that has specs and/or options.
3050 rm -f specs.h options.h
3051 touch specs.h options.h
3052 for subdir in . $subdirs
3054 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3055 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3056 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3058 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3059 echo "#include \"$subdir/lang-options.h\"" >>options.h
3060 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3064 # These (without "all_") are set in each config-lang.in.
3065 # `language' must be a single word so is spelled singularly.
3071 all_outputs=Makefile
3072 # List of language makefile fragments.
3077 # Add the language fragments.
3078 # Languages are added via two mechanisms. Some information must be
3079 # recorded in makefile variables, these are defined in config-lang.in.
3080 # We accumulate them and plug them into the main Makefile.
3081 # The other mechanism is a set of hooks for each of the main targets
3082 # like `clean', `install', etc.
3084 language_fragments="Make-lang"
3085 language_hooks="Make-hooks"
3088 for s in .. $subdirs
3100 . ${srcdir}/$s/config-lang.in
3101 if [[ "x$language" = x ]]
3103 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3106 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3107 all_languages="$all_languages $language"
3108 if [[ "x$boot_language" = xyes ]]
3110 all_boot_languages="$all_boot_languages $language"
3112 all_compilers="$all_compilers $compilers"
3113 all_stagestuff="$all_stagestuff $stagestuff"
3114 all_diff_excludes="$all_diff_excludes $diff_excludes"
3115 all_headers="$all_headers $headers"
3116 all_outputs="$all_outputs $outputs"
3117 if [[ x$outputs = x ]]
3119 oldstyle_subdirs="$oldstyle_subdirs $s"
3121 all_lib2funcs="$all_lib2funcs $lib2funcs"
3125 # Since we can't use `::' targets, we link each language in
3126 # with a set of hooks, reached indirectly via lang.${target}.
3130 target_list="all.build all.cross start.encap rest.encap \
3132 install-normal install-common install-info install-man \
3134 mostlyclean clean distclean extraclean maintainer-clean \
3135 stage1 stage2 stage3 stage4"
3136 for t in $target_list
3139 for l in .. $all_languages
3141 if [[ $l != ".." ]]; then
3145 echo "lang.$t: $x" >> Make-hooks
3148 # If we're not building in srcdir, create .gdbinit.
3150 if [[ ! -f Makefile.in ]]; then
3151 echo "dir ." > .gdbinit
3152 echo "dir ${srcdir}" >> .gdbinit
3153 if [[ x$gdb_needs_out_file_path = xyes ]]
3155 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3157 if [[ "x$subdirs" != x ]]; then
3160 echo "dir ${srcdir}/$s" >> .gdbinit
3163 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3166 # Process the language and host/target makefile fragments.
3167 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3169 # Substitute configuration variables
3171 AC_SUBST(all_languages)
3172 AC_SUBST(all_boot_languages)
3173 AC_SUBST(all_compilers)
3174 AC_SUBST(all_lang_makefiles)
3175 AC_SUBST(all_stagestuff)
3176 AC_SUBST(all_diff_excludes)
3177 AC_SUBST(all_lib2funcs)
3178 AC_SUBST(all_headers)
3179 AC_SUBST(extra_passes)
3180 AC_SUBST(extra_programs)
3181 AC_SUBST(extra_parts)
3182 AC_SUBST(extra_c_objs)
3183 AC_SUBST(extra_c_flags)
3184 AC_SUBST(extra_objs)
3185 AC_SUBST(host_extra_gcc_objs)
3186 AC_SUBST(extra_headers_list)
3187 AC_SUBST(dep_host_xmake_file)
3188 AC_SUBST(dep_tmake_file)
3190 AC_SUBST(out_object_file)
3192 AC_SUBST(tm_file_list)
3193 AC_SUBST(build_xm_file_list)
3194 AC_SUBST(host_xm_file_list)
3195 AC_SUBST(lang_specs_files)
3196 AC_SUBST(lang_options_files)
3197 AC_SUBST(thread_file)
3199 AC_SUBST(local_prefix)
3200 AC_SUBST(gxx_include_dir)
3201 AC_SUBST(fixincludes)
3202 AC_SUBST(build_install_headers_dir)
3203 AC_SUBST(build_exeext)
3204 AC_SUBST(float_format)
3205 AC_SUBST(will_use_collect2)
3206 AC_SUBST(maybe_use_collect2)
3207 AC_SUBST(cc_set_by_configure)
3208 AC_SUBST(stage_prefix_set_by_configure)
3209 AC_SUBST(symbolic_link)
3210 AC_SUBST(version_dep)
3212 AC_SUBST_FILE(target_overrides)
3213 AC_SUBST_FILE(host_overrides)
3214 AC_SUBST(cross_defines)
3215 AC_SUBST_FILE(cross_overrides)
3216 AC_SUBST_FILE(build_overrides)
3217 AC_SUBST_FILE(language_fragments)
3218 AC_SUBST_FILE(language_hooks)
3220 # Echo that links are built
3221 if [[ x$host = x$target ]]
3229 if [[ x$host != x$build ]]
3231 str3=" on a $build system"
3234 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3239 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3241 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3243 echo " ${str2}${str3}." 1>&2
3246 # Truncate the target if necessary
3247 if [[ x$host_truncate_target != x ]]; then
3248 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
3251 # Configure the subdirectories
3252 # AC_CONFIG_SUBDIRS($subdirs)
3254 # Create the Makefile
3255 # and configure language subdirectories
3256 AC_OUTPUT($all_outputs,
3258 . $srcdir/configure.lang
3259 case x$CONFIG_HEADERS in
3260 xauto-config.h:config.in)
3263 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3264 # bootstrapping and the installation procedure can still use
3265 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3266 # FLAGS_TO_PASS has been modified to solve the problem there.
3267 # This is virtually a duplicate of what happens in configure.lang; we do
3268 # an extra check to make sure this only happens if ln -s can be used.
3269 if [[ "$symbolic_link" = "ln -s" ]]; then
3270 for d in .. ${subdirs} ; do
3271 if [[ $d != .. ]]; then
3274 for t in stage1 stage2 stage3 stage4 include
3277 $symbolic_link ../$t $t 2>/dev/null
3288 target_alias='${target_alias}'
3290 subdirs='${subdirs}'
3291 oldstyle_subdirs='${oldstyle_subdirs}'
3292 symbolic_link='${symbolic_link}'
3293 version_dep='${version_dep}'
3294 program_transform_set='${program_transform_set}'
3295 program_transform_name='${program_transform_name}'
3296 dep_host_xmake_file='${dep_host_xmake_file}'
3297 host_xmake_file='${host_xmake_file}'
3298 dep_tmake_file='${dep_tmake_file}'
3299 tmake_file='${tmake_file}'
3300 thread_file='${thread_file}'
3301 version='${version}'
3302 local_prefix='${local_prefix}'
3303 build_install_headers_dir='${build_install_headers_dir}'
3304 build_exeext='${build_exeext}'
3305 out_file='${out_file}'
3306 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3307 SET_MAKE='${SET_MAKE}'
3308 build_broken_install='${build_broken_install}'
3309 target_list='${target_list}'
3310 target_overrides='${target_overrides}'
3311 host_overrides='${host_overrides}'
3312 cross_defines='${cross_defines}'
3313 cross_overrides='${cross_overrides}'
3314 build_overrides='${build_overrides}'