1 # configure.in for GNU CC
2 # Process this file with autoconf to generate a configuration script.
4 # Copyright (C) 1997, 1998 Free Software Foundation, Inc.
6 #This file is part of GNU CC.
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 #GNU General Public License for more details.
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING. If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
23 # Initialization and defaults
25 AC_CONFIG_HEADER(auto-config.h:config.in)
32 # Check for additional parameters
36 [ --with-gnu-ld arrange to work with GNU ld.],
42 [ --with-gnu-as arrange to work with GNU as.],
48 [ --with-stabs arrange to use stabs instead of host debug format.],
54 [ --with-elf arrange to use ELF instead of host debug format.],
58 # Specify the local prefix
59 AC_ARG_WITH(local-prefix,
60 [ --with-local-prefix=DIR specifies directory to put local include.],
61 local_prefix=$with_local_prefix,
62 local_prefix=/usr/local)
64 # Default local prefix if it is empty
65 if [[ x$local_prefix = x ]]; then
66 local_prefix=/usr/local
69 # Specify the g++ header file directory
70 AC_ARG_WITH(gxx-include-dir,
71 [ --with-gxx-include-dir=DIR
72 specifies directory to put g++ header files.],
73 gxx_include_dir=$with_gxx_include_dir,
74 gxx_include_dir='${prefix}/include/g++')
76 # Default g++ header file directory if it is empty
77 if [[ x$gxx_include_dir = x ]]; then
78 gxx_include_dir='${prefix}/include/g++'
81 # Enable use of cpplib for C.
82 AC_ARG_ENABLE(c-cpplib,
83 [ --enable-c-cpplib Use cpplib for C.],
84 if [[[ x$enable_c_cpplib != xno ]]]; then
85 extra_c_objs="${extra_c_objs} cpplib.o cppexp.o cpphash.o cpperror.o"
86 extra_c_flags=-DUSE_CPPLIB=1
89 # Enable Haifa scheduler.
91 [ --enable-haifa Use the experimental scheduler.
92 --disable-haifa Don't use the experimental scheduler for the
93 targets which normally enable it.])
96 # Pass with no value to take the default
97 # Pass with a value to specify a thread package
98 AC_ARG_ENABLE(threads,
99 [ --enable-threads enable thread usage for target GCC.
100 --enable-threads=LIB use LIB thread package for target GCC.],
101 if [[[ x$enable_threads = xno ]]]; then
106 # Check if a valid thread package
107 case x${enable_threads} in
110 target_thread_file='single'
114 target_thread_file=''
116 xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
117 xsolaris | xwin32 | xdce)
118 target_thread_file=$enable_threads
121 echo "$enable_threads is an unknown thread package" 1>&2
126 # Determine the host, build, and target systems
129 # Find the native compiler
133 # Find some useful tools
144 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h)
146 # Check for thread headers.
147 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
148 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=])
150 # See if the system preprocessor understands the ANSI C preprocessor
151 # stringification operator.
152 AC_MSG_CHECKING(whether cpp understands the stringify operator)
153 AC_CACHE_VAL(gcc_cv_c_have_stringify,
156 char *test = S(foo);],
157 gcc_cv_c_have_stringify=yes, gcc_cv_c_have_stringify=no)])
158 AC_MSG_RESULT($gcc_cv_c_have_stringify)
159 if test $gcc_cv_c_have_stringify = yes; then
160 AC_DEFINE(HAVE_CPP_STRINGIFY)
163 # Use <inttypes.h> only if it exists,
164 # doesn't clash with <sys/types.h>, and declares intmax_t.
165 AC_MSG_CHECKING(for inttypes.h)
166 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
168 [#include <sys/types.h>
169 #include <inttypes.h>],
171 [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
172 gcc_cv_header_inttypes_h=yes],
173 gcc_cv_header_inttypes_h=no)])
174 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
176 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen vprintf bcopy bzero bcmp \
177 index rindex kill getrlimit setrlimit atoll atoq)
181 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
182 index rindex getenv atol sbrk abort)
193 build_install_headers_dir=install-headers-tar
197 host_truncate_target=
200 # Decode the host machine, then the target machine.
201 # For the host machine, we save the xm_file variable as host_xm_file;
202 # then we decode the target machine and forget everything else
203 # that came from the host machine.
204 for machine in $build $host $target; do
217 # Set this to force installation and use of collect2.
219 # Set this to override the default target model.
221 # Set this to control which fixincludes program to use.
222 fixincludes=fixincludes
223 # Set this to control how the header file directory is installed.
224 install_headers_dir=install-headers-tar
225 # Set this to a non-empty list of args to pass to cpp if the target
226 # wants its .md file passed through cpp.
228 # Set this if directory names should be truncated to 14 characters.
230 # Set this if gdb needs a dir command with `dirname $out_file`
231 gdb_needs_out_file_path=
232 # Set this if the build machine requires executables to have a
235 # Set this to control which thread package will be used.
238 # Set default cpu_type, tm_file and xm_file so it can be updated in
239 # each machine entry.
240 cpu_type=`echo $machine | sed 's/-.*$//'`
274 tm_file=${cpu_type}/${cpu_type}.h
275 xm_file=${cpu_type}/xm-${cpu_type}.h
278 # Support site-specific machine types.
280 cpu_type=`echo $machine | sed -e 's/-.*//'`
281 rest=`echo $machine | sed -e "s/$cpu_type-//"`
282 xm_file=${cpu_type}/xm-$rest.h
283 tm_file=${cpu_type}/$rest.h
284 if [[ -f $srcdir/config/${cpu_type}/x-$rest ]] ; \
285 then xmake_file=${cpu_type}/x-$rest; \
288 if [[ -f $srcdir/config/${cpu_type}/t-$rest ]] ; \
289 then tmake_file=${cpu_type}/t-$rest; \
295 a29k-*-bsd* | a29k-*-sym1*)
296 tm_file="${tm_file} a29k/unix.h"
297 xm_file=a29k/xm-unix.h
298 xmake_file=a29k/x-unix
301 a29k-*-udi | a29k-*-coff)
302 tm_file="${tm_file} dbxcoff.h a29k/udi.h"
303 tmake_file=a29k/t-a29kbare
306 tm_file="${tm_file} dbxcoff.h a29k/udi.h a29k/vx29k.h"
307 tmake_file=a29k/t-vx29k
308 extra_parts="crtbegin.o crtend.o"
310 a29k-*-*) # Default a29k environment.
313 alpha*-*-linux-gnuecoff*)
314 tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
315 xm_file="${xm_file} alpha/xm-linux.h"
318 fixincludes=Makefile.in
321 alpha*-*-linux-gnulibc1*)
322 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
323 xm_file="${xm_file} alpha/xm-linux.h"
324 tmake_file="t-linux t-linux-gnulibc1"
326 fixincludes=Makefile.in
328 if [[ x$enable_threads = xyes ]]; then
333 tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
334 xm_file="${xm_file} alpha/xm-linux.h"
337 fixincludes=Makefile.in
339 if [[ x$enable_threads = xyes ]]; then
344 if [[ x$stabs = xyes ]]
346 tm_file="${tm_file} dbx.h"
348 if [[ x$gas != xyes ]]
350 extra_passes="mips-tfile mips-tdump"
355 tm_file="${tm_file} alpha/osf.h alpha/osf12.h alpha/osf2or3.h"
358 tm_file="${tm_file} alpha/osf.h alpha/osf2or3.h"
361 tm_file="${tm_file} alpha/osf.h"
362 # Some versions of OSF4 (specifically X4.0-9 296.7) have
363 # a broken tar, so we use cpio instead.
364 install_headers_dir=install-headers-cpio
367 tm_file="${tm_file} alpha/osf.h"
371 *-*-osf4.0[[b-z]] | *-*-osf4.[[1-9]]*)
372 target_cpu_default=MASK_SUPPORT_ARCH
377 tm_file="${tm_file} alpha/win-nt.h"
378 xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
380 xmake_file=winnt/x-winnt
381 extra_host_objs=oldnames.o
382 extra_gcc_objs="spawnv.o oldnames.o"
383 fixincludes=fixinc.winnt
384 if [[ x$gnu_ld != xyes ]]
386 extra_programs=ld.exe
388 if [[ x$enable_threads = xyes ]]; then
394 xm_file="${xm_file} alpha/xm-vms.h"
395 tmake_file=alpha/t-vms
396 fixincludes=Makefile.in
399 extra_parts="crtinit.o crtfini.o"
401 arm-*-coff* | armel-*-coff*)
403 tmake_file=arm/t-bare
405 arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
406 tm_file=arm/riscix1-1.h
409 arm-*-riscix*) # Acorn RISC machine
410 if [[ x$gas = xyes ]]
412 tm_file=arm/rix-gas.h
416 xmake_file=arm/x-riscix
417 tmake_file=arm/t-riscix
420 arm-semi-aout | armel-semi-aout)
422 tmake_file=arm/t-semi
423 fixincludes=Makefile.in # There is nothing to fix
425 arm-semi-aof | armel-semi-aof)
426 tm_file=arm/semiaof.h
427 tmake_file=arm/t-semiaof
428 fixincludes=Makefile.in # There is nothing to fix
432 xm_file=arm/xm-netbsd.h
433 tmake_file="t-netbsd arm/t-netbsd"
434 # On NetBSD, the headers are already okay, except for math.h.
435 fixincludes=fixinc.math
437 arm-*-linux-gnuaout*) # ARM GNU/Linux
439 xm_file=arm/xm-linux.h
441 tm_file=arm/linux-gas.h
442 tmake_file=arm/t-linux
443 fixincludes=Makefile.in
448 tmake_file=arm/t-bare
450 c1-convex-*) # Convex C1
453 fixincludes=Makefile.in
455 c2-convex-*) # Convex C2
458 fixincludes=Makefile.in
463 fixincludes=Makefile.in
468 fixincludes=Makefile.in
471 target_cpu_default=16
473 fixincludes=Makefile.in
475 clipper-intergraph-clix*)
476 tm_file="${tm_file} svr3.h clipper/clix.h"
477 xm_file=clipper/xm-clix.h
478 xmake_file=clipper/x-clix
479 extra_headers=va-clipper.h
480 extra_parts="crtbegin.o crtend.o"
481 install_headers_dir=install-headers-cpio
488 # This hasn't been upgraded to GCC 2.
489 # fx80-alliant-*) # Alliant FX/80
495 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
496 xm_file=pa/xm-papro.h
501 tm_file="${tm_file} pa/pa-osf.h"
503 fixincludes=Makefile.in
506 tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h pa/rtems.h"
507 xm_file=pa/xm-papro.h
511 tm_file="${tm_file} pa/pa-osf.h"
513 fixincludes=Makefile.in
518 fixincludes=Makefile.in
522 fixincludes=Makefile.in
525 tm_file="pa/pa-oldas.h ${tm_file} pa/pa-hpux7.h"
526 xm_file=pa/xm-pahpux.h
527 xmake_file=pa/x-pa-hpux
528 if [[ x$gas = xyes ]]
530 tm_file="${tm_file} pa/gas.h"
532 install_headers_dir=install-headers-cpio
535 hppa1.0-*-hpux8.0[[0-2]]*)
536 tm_file="${tm_file} pa/pa-hpux.h"
537 xm_file=pa/xm-pahpux.h
538 xmake_file=pa/x-pa-hpux
539 if [[ x$gas = xyes ]]
541 tm_file="${tm_file} pa/pa-gas.h"
543 tm_file="pa/pa-oldas.h ${tm_file}"
545 install_headers_dir=install-headers-cpio
548 hppa1.1-*-hpux8.0[[0-2]]*)
550 tm_file="${tm_file} pa/pa-hpux.h"
551 xm_file=pa/xm-pahpux.h
552 xmake_file=pa/x-pa-hpux
553 if [[ x$gas = xyes ]]
555 tm_file="${tm_file} pa/pa-gas.h"
557 tm_file="pa/pa-oldas.h ${tm_file}"
559 install_headers_dir=install-headers-cpio
564 tm_file="${tm_file} pa/pa-hpux.h"
565 xm_file=pa/xm-pahpux.h
566 xmake_file=pa/x-pa-hpux
567 if [[ x$gas = xyes ]]
569 tm_file="${tm_file} pa/pa-gas.h"
571 install_headers_dir=install-headers-cpio
575 tm_file="${tm_file} pa/pa-hpux.h"
576 xm_file=pa/xm-pahpux.h
577 xmake_file=pa/x-pa-hpux
578 if [[ x$gas = xyes ]]
580 tm_file="${tm_file} pa/pa-gas.h"
582 install_headers_dir=install-headers-cpio
587 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
588 xm_file=pa/xm-pahpux.h
589 xmake_file=pa/x-pa-hpux
591 if [[ x$gas = xyes ]]
593 tm_file="${tm_file} pa/pa-gas.h"
595 if [[ x$enable_threads = x ]]; then
596 enable_threads=$have_pthread_h
598 if [[ x$enable_threads = xyes ]]; then
600 tmake_file="${tmake_file} pa/t-dce-thr"
602 install_headers_dir=install-headers-cpio
606 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux10.h"
607 xm_file=pa/xm-pahpux.h
608 xmake_file=pa/x-pa-hpux
609 if [[ x$gas = xyes ]]
611 tm_file="${tm_file} pa/pa-gas.h"
613 if [[ x$enable_threads = x ]]; then
614 enable_threads=$have_pthread_h
616 if [[ x$enable_threads = xyes ]]; then
618 tmake_file="${tmake_file} pa/t-dce-thr"
620 install_headers_dir=install-headers-cpio
625 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
626 xm_file=pa/xm-pahpux.h
627 xmake_file=pa/x-pa-hpux
628 if [[ x$gas = xyes ]]
630 tm_file="${tm_file} pa/pa-gas.h"
632 install_headers_dir=install-headers-cpio
636 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hpux9.h"
637 xm_file=pa/xm-pahpux.h
638 xmake_file=pa/x-pa-hpux
639 if [[ x$gas = xyes ]]
641 tm_file="${tm_file} pa/pa-gas.h"
643 install_headers_dir=install-headers-cpio
648 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
649 xm_file=pa/xm-pahpux.h
650 xmake_file=pa/x-pa-hpux
651 if [[ x$gas = xyes ]]
653 tm_file="${tm_file} pa/pa-gas.h"
655 install_headers_dir=install-headers-cpio
659 tm_file="${tm_file} pa/pa-hpux.h pa/pa-hiux.h"
660 xm_file=pa/xm-pahpux.h
661 xmake_file=pa/x-pa-hpux
662 if [[ x$gas = xyes ]]
664 tm_file="${tm_file} pa/pa-gas.h"
666 install_headers_dir=install-headers-cpio
672 fixincludes=Makefile.in
676 i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
677 if [[ x$gas = xyes ]]
679 tm_file=i386/aix386.h
680 extra_parts="crtbegin.o crtend.o"
681 tmake_file=i386/t-crtstuff
683 tm_file=i386/aix386ng.h
686 xm_file=i386/xm-aix.h
687 xmake_file=i386/x-aix
689 i[[456]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
690 xm_file=i386/xm-sysv4.h
691 xmake_file=i386/x-ncr3000
692 if [[ x$stabs = xyes -a x$gas = xyes ]]
694 tm_file=i386/sysv4gdb.h
698 extra_parts="crtbegin.o crtend.o"
699 tmake_file=i386/t-crtpic
703 xm_file=i386/xm-next.h
704 tmake_file=i386/t-next
705 xmake_file=i386/x-next
706 extra_objs=nextstep.o
707 if [[ x$enable_threads = xyes ]]; then
711 i[[3456]]86-sequent-bsd*) # 80386 from Sequent
713 if [[ x$gas = xyes ]]
715 tm_file=i386/seq-gas.h
717 tm_file=i386/sequent.h
720 i[[3456]]86-sequent-ptx1*)
721 xm_file=i386/xm-sysv3.h
722 xmake_file=i386/x-sysv3
723 tm_file=i386/seq-sysv3.h
724 tmake_file=i386/t-crtstuff
725 fixincludes=fixinc.ptx
726 extra_parts="crtbegin.o crtend.o"
727 install_headers_dir=install-headers-cpio
729 i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
730 xm_file=i386/xm-sysv3.h
731 xmake_file=i386/x-sysv3
732 tm_file=i386/seq2-sysv3.h
733 tmake_file=i386/t-crtstuff
734 extra_parts="crtbegin.o crtend.o"
735 fixincludes=fixinc.ptx
736 install_headers_dir=install-headers-cpio
738 i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
739 xm_file=i386/xm-sysv4.h
741 tm_file=i386/ptx4-i.h
743 extra_parts="crtbegin.o crtend.o"
744 fixincludes=fixinc.ptx
745 install_headers_dir=install-headers-cpio
747 i386-sun-sunos*) # Sun i386 roadrunner
748 xm_file=i386/xm-sun.h
752 i[[3456]]86-wrs-vxworks*)
753 tm_file=i386/vxi386.h
754 tmake_file=i386/t-i386bare
757 tm_file=i386/i386-aout.h
758 tmake_file=i386/t-i386bare
760 i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
761 tm_file=i386/bsd386.h
762 xm_file=i386/xm-bsd386.h
763 # tmake_file=t-libc-ok
766 tm_file=i386/386bsd.h
767 xm_file=i386/xm-bsd386.h
768 # tmake_file=t-libc-ok
769 # Next line turned off because both 386BSD and BSD/386 use GNU ld.
772 i[[3456]]86-*-freebsdelf*)
773 tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
774 # On FreeBSD, the headers are already ok, except for math.h.
775 fixincludes=fixinc.math
776 tmake_file=i386/t-freebsd
781 i[[3456]]86-*-freebsd*)
782 tm_file=i386/freebsd.h
783 # On FreeBSD, the headers are already ok, except for math.h.
784 fixincludes=fixinc.math
785 tmake_file=i386/t-freebsd
787 i[[3456]]86-*-netbsd*)
788 tm_file=i386/netbsd.h
789 # On NetBSD, the headers are already okay, except for math.h.
790 fixincludes=fixinc.math
794 tm_file=i386/i386-coff.h
795 tmake_file=i386/t-i386bare
797 i[[3456]]86-*-isc*) # 80386 running ISC system
798 xm_file=i386/xm-isc.h
800 i[[345]]86-*-isc[[34]]*)
801 xmake_file=i386/x-isc3
804 xmake_file=i386/x-isc
807 if [[ x$gas = xyes -a x$stabs = xyes ]]
809 tm_file=i386/iscdbx.h
810 tmake_file=i386/t-svr3dbx
811 extra_parts="svr3.ifile svr3z.ifile"
813 tm_file=i386/isccoff.h
814 tmake_file=i386/t-crtstuff
815 extra_parts="crtbegin.o crtend.o"
817 install_headers_dir=install-headers-cpio
819 i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
820 xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
821 xmake_file=x-linux-aout
822 tmake_file="t-linux-aout i386/t-crtstuff"
823 tm_file=i386/linux-oldld.h
824 fixincludes=Makefile.in #On Linux, the headers are ok already.
827 i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
828 xm_file=i386/xm-linux.h # with a.out format
829 xmake_file=x-linux-aout
830 tmake_file="t-linux-aout i386/t-crtstuff"
831 tm_file=i386/linux-aout.h
832 fixincludes=Makefile.in #On Linux, the headers are ok already.
835 i[[3456]]86-*-linux-gnulibc1)
836 xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
837 xmake_file=x-linux # with ELF format using the
838 tm_file=i386/linux.h # GNU/Linux C library 5
839 tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff"
840 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
841 fixincludes=Makefile.in #On Linux, the headers are ok already.
843 if [[ x$enable_threads = xyes ]]; then
847 i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
848 xm_file=i386/xm-linux.h # with ELF format using glibc 2
849 xmake_file=x-linux # aka GNU/Linux C library 6
851 tmake_file="t-linux i386/t-crtstuff"
852 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
853 fixincludes=Makefile.in #On Linux, the headers are ok already.
855 if [[ x$enable_threads = xyes ]]; then
861 i[[3456]]86-go32-msdos | i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
862 xm_file=i386/xm-go32.h
864 tmake_file=i386/t-go32
866 i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
869 fixincludes=Makefile.in
873 i[[3456]]86-*-lynxos*)
874 if [[ x$gas = xyes ]]
878 tm_file=i386/lynx-ng.h
880 xm_file=i386/xm-lynx.h
881 tmake_file=i386/t-i386bare
886 # tmake_file=t-libc-ok
889 i[[3456]]86-*-osfrose*) # 386 using OSF/rose
890 if [[ x$elf = xyes ]]
892 tm_file=i386/osfelf.h
895 tm_file=i386/osfrose.h
898 xm_file=i386/xm-osf.h
899 xmake_file=i386/x-osfrose
900 tmake_file=i386/t-osf
903 i[[345]]86-go32-rtems*)
905 xm_file=i386/xm-go32.h
906 tm_file=i386/go32-rtems.h
907 tmake_file="i386/t-go32 t-rtems"
912 tmake_file="i386/t-i386bare t-rtems"
914 i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
915 xm_file=i386/xm-sco5.h
916 xmake_file=i386/x-sco5
917 fixincludes=fixinc.sco
918 install_headers_dir=install-headers-cpio
920 tmake_file=i386/t-sco5
921 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
923 i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
924 xm_file=i386/xm-sco.h
925 xmake_file=i386/x-sco4
926 fixincludes=fixinc.sco
927 install_headers_dir=install-headers-cpio
928 if [[ x$stabs = xyes ]]
930 tm_file=i386/sco4dbx.h
931 tmake_file=i386/t-svr3dbx
932 extra_parts="svr3.ifile svr3z.rfile"
935 tmake_file=i386/t-crtstuff
936 extra_parts="crtbegin.o crtend.o"
940 i[[3456]]86-*-sco*) # 80386 running SCO system
941 xm_file=i386/xm-sco.h
942 xmake_file=i386/x-sco
943 install_headers_dir=install-headers-cpio
944 if [[ x$stabs = xyes ]]
946 tm_file=i386/scodbx.h
947 tmake_file=i386/t-svr3dbx
948 extra_parts="svr3.ifile svr3z.rfile"
951 extra_parts="crtbegin.o crtend.o"
952 tmake_file=i386/t-crtstuff
956 i[[3456]]86-*-solaris2*)
957 xm_file=i386/xm-sysv4.h
958 if [[ x$stabs = xyes ]]
960 tm_file=i386/sol2dbg.h
964 tmake_file=i386/t-sol2
965 extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
967 fixincludes=fixinc.svr4
969 if [[ x$enable_threads = xyes ]]; then
970 thread_file='solaris'
973 i[[3456]]86-*-sysv5*) # Intel x86 on System V Release 5
974 xm_file=i386/xm-sysv4.h
976 if [[ x$stabs = xyes ]]
978 tm_file="${tm_file} dbx.h"
980 tmake_file=i386/t-crtpic
982 extra_parts="crtbegin.o crtend.o"
983 fixincludes=Makefile.in # The headers are just fine, thank you.
985 i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
986 xm_file=i386/xm-sysv4.h
988 if [[ x$stabs = xyes ]]
990 tm_file="${tm_file} dbx.h"
992 tmake_file=i386/t-crtpic
994 extra_parts="crtbegin.o crtend.o"
996 i[[3456]]86-*-sysv*) # Intel 80386's running system V
997 xm_file=i386/xm-sysv3.h
998 xmake_file=i386/x-sysv3
999 if [[ x$gas = xyes ]]
1001 if [[ x$stabs = xyes ]]
1003 tm_file=i386/svr3dbx.h
1004 tmake_file=i386/t-svr3dbx
1005 extra_parts="svr3.ifile svr3z.rfile"
1007 tm_file=i386/svr3gas.h
1008 extra_parts="crtbegin.o crtend.o"
1009 tmake_file=i386/t-crtstuff
1012 tm_file=i386/sysv3.h
1013 extra_parts="crtbegin.o crtend.o"
1014 tmake_file=i386/t-crtstuff
1017 i386-*-vsta) # Intel 80386's running VSTa kernel
1018 xm_file=i386/xm-vsta.h
1020 tmake_file=i386/t-vsta
1021 xmake_file=i386/x-vsta
1023 i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
1024 xm_file="${xm_file} i386/xm-cygwin32.h"
1025 tmake_file=i386/t-cygwin32
1026 tm_file=i386/cygwin32.h
1027 xmake_file=i386/x-cygwin32
1029 fixincludes=Makefile.in
1030 if [[ x$enable_threads = xyes ]]; then
1035 i[[3456]]86-*-mingw32)
1036 tm_file=i386/mingw32.h
1037 xm_file="${xm_file} i386/xm-mingw32.h"
1038 tmake_file=i386/t-cygwin32
1040 xmake_file=i386/x-cygwin32
1041 fixincludes=Makefile.in
1042 if [[ x$enable_threads = xyes ]]; then
1047 i[[3456]]86-*-winnt*)
1048 tm_file=i386/win-nt.h
1049 out_file=i386/i386.c
1050 xm_file=i386/xm-winnt.h
1051 xmake_file=winnt/x-winnt
1052 tmake_file=i386/t-winnt
1053 extra_host_objs="winnt.o oldnames.o"
1054 extra_gcc_objs="spawnv.o oldnames.o"
1055 fixincludes=fixinc.winnt
1056 if [[ x$gnu_ld != xyes ]]
1058 extra_programs=ld.exe
1060 if [[ x$enable_threads = xyes ]]; then
1064 i[[3456]]86-dg-dgux)
1065 xm_file=i386/xm-dgux.h
1066 out_file=i386/dgux.c
1068 tmake_file=i386/t-dgux
1069 xmake_file=i386/x-dgux
1070 fixincludes=fixinc.dgux
1071 install_headers_dir=install-headers-cpio
1073 i860-alliant-*) # Alliant FX/2800
1074 tm_file="${tm_file} svr4.h i860/sysv4.h i860/fx2800.h"
1075 xm_file="${xm_file}"
1076 xmake_file=i860/x-fx2800
1077 tmake_file=i860/t-fx2800
1078 extra_parts="crtbegin.o crtend.o"
1081 tm_file="${tm_file} i860/bsd.h"
1082 if [[ x$gas = xyes ]]
1084 tm_file="${tm_file} i860/bsd-gas.h"
1089 tm_file="${tm_file} i860/mach.h"
1090 tmake_file=t-libc-ok
1092 i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
1093 tm_file="${tm_file} svr3.h i860/paragon.h"
1094 xm_file="${xm_file} xm-svr3.h"
1098 tm_file="${tm_file} svr3.h i860/sysv3.h"
1099 xm_file="${tm_file} xm-svr3.h"
1100 xmake_file=i860/x-sysv3
1101 extra_parts="crtbegin.o crtend.o"
1104 tm_file="${tm_file} svr4.h i860/sysv4.h"
1105 xm_file="${xm_file} xm-svr3.h"
1106 xmake_file=i860/x-sysv4
1108 extra_parts="crtbegin.o crtend.o"
1110 i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
1111 tm_file="${tm_file} i960/vx960.h"
1112 tmake_file=i960/t-vxworks960
1115 i960-wrs-vxworks5* | i960-wrs-vxworks)
1116 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
1117 tmake_file=i960/t-vxworks960
1121 tm_file="${tm_file} i960/vx960.h"
1122 tmake_file=i960/t-vxworks960
1126 tm_file="${tm_file} dbxcoff.h i960/i960-coff.h libgloss.h"
1127 tmake_file=i960/t-960bare
1131 tmake_file="i960/t-960bare t-rtems"
1132 tm_file="${tm_file} dbxcoff.h i960/rtems.h"
1135 i960-*-*) # Default i960 environment.
1139 extra_parts="crtinit.o crtfini.o"
1141 m68000-convergent-sysv*)
1143 xm_file=m68k/xm-3b1.h
1145 extra_headers=math-68881.h
1147 m68000-hp-bsd*) # HP 9000/200 running BSD
1148 tm_file=m68k/hp2bsd.h
1149 xmake_file=m68k/x-hp2bsd
1151 extra_headers=math-68881.h
1153 m68000-hp-hpux*) # HP 9000 series 300
1154 xm_file=m68k/xm-hp320.h
1155 if [[ x$gas = xyes ]]
1157 xmake_file=m68k/x-hp320g
1158 tm_file=m68k/hp310g.h
1160 xmake_file=m68k/x-hp320
1161 tm_file=m68k/hp310.h
1163 install_headers_dir=install-headers-cpio
1165 extra_headers=math-68881.h
1170 extra_headers=math-68881.h
1173 tm_file=m68k/sun2o4.h
1175 extra_headers=math-68881.h
1178 xm_file=m68k/xm-3b1.h
1179 if [[ x$gas = xyes ]]
1186 extra_headers=math-68881.h
1188 m68k-apple-aux*) # Apple Macintosh running A/UX
1189 xm_file=m68k/xm-aux.h
1190 tmake_file=m68k/t-aux
1191 install_headers_dir=install-headers-cpio
1192 extra_headers=math-68881.h
1193 extra_parts="crt1.o mcrt1.o maccrt1.o crt2.o crtn.o"
1195 if [[ "$gnu_ld" = yes ]]
1197 tm_file="${tm_file} m68k/auxgld.h"
1199 tm_file="${tm_file} m68k/auxld.h"
1201 if [[ "$gas" = yes ]]
1203 tm_file="${tm_file} m68k/auxgas.h"
1205 tm_file="${tm_file} m68k/auxas.h"
1207 tm_file="${tm_file} m68k/a-ux.h"
1210 tm_file=m68k/apollo68.h
1211 xmake_file=m68k/x-apollo68
1213 extra_headers=math-68881.h
1215 m68k-altos-sysv*) # Altos 3068
1216 if [[ x$gas = xyes ]]
1218 tm_file=m68k/altos3068.h
1219 xm_file=m68k/xm-altos3068.h
1221 echo "The Altos is supported only with the GNU assembler" 1>&2
1224 extra_headers=math-68881.h
1226 m68k-bull-sysv*) # Bull DPX/2
1227 if [[ x$gas = xyes ]]
1229 if [[ x$stabs = xyes ]]
1231 tm_file=m68k/dpx2cdbx.h
1233 tm_file=m68k/dpx2g.h
1238 xm_file=m68k/xm-m68kv.h
1239 xmake_file=m68k/x-dpx2
1241 extra_headers=math-68881.h
1243 m68k-atari-sysv4*) # Atari variant of V.4.
1244 tm_file=m68k/atari.h
1245 xm_file=m68k/xm-atari.h
1247 extra_parts="crtbegin.o crtend.o"
1248 extra_headers=math-68881.h
1250 m68k-motorola-sysv*)
1251 tm_file=m68k/mot3300.h
1252 xm_file=m68k/xm-mot3300.h
1253 if [[ x$gas = xyes ]]
1255 xmake_file=m68k/x-mot3300-gas
1256 if [[ x$gnu_ld = xyes ]]
1258 tmake_file=m68k/t-mot3300-gald
1260 tmake_file=m68k/t-mot3300-gas
1264 xmake_file=m68k/x-mot3300
1265 if [[ x$gnu_ld = xyes ]]
1267 tmake_file=m68k/t-mot3300-gld
1269 tmake_file=m68k/t-mot3300
1273 gdb_needs_out_file_path=yes
1274 extra_parts="crt0.o mcrt0.o"
1275 extra_headers=math-68881.h
1277 m68k-ncr-sysv*) # NCR Tower 32 SVR3
1278 tm_file=m68k/tower-as.h
1279 xm_file="${xm_file} xm-svr3.h"
1280 xmake_file=m68k/x-tower
1281 extra_parts="crtbegin.o crtend.o"
1282 extra_headers=math-68881.h
1285 tm_file=m68k/plexus.h
1286 xm_file=m68k/xm-plexus.h
1288 extra_headers=math-68881.h
1292 xm_file=m68k/xm-m68kv.h
1293 extra_headers=math-68881.h
1296 xm_file=m68k/xm-crds.h
1297 xmake_file=m68k/x-crds
1300 extra_headers=math-68881.h
1302 m68k-cbm-sysv4*) # Commodore variant of V.4.
1304 xm_file=m68k/xm-amix.h
1305 xmake_file=m68k/x-amix
1307 extra_parts="crtbegin.o crtend.o"
1308 extra_headers=math-68881.h
1311 tm_file=m68k/ccur-GAS.h
1312 xmake_file=m68k/x-ccur
1313 extra_headers=math-68881.h
1316 m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
1317 tm_file=m68k/hp3bsd44.h
1318 xmake_file=m68k/x-hp3bsd44
1320 extra_headers=math-68881.h
1322 m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
1323 tm_file=m68k/hp3bsd.h
1325 extra_headers=math-68881.h
1328 if [[ x$with_fp = xno ]]
1330 tm_file=m68k/isi-nfp.h
1335 extra_headers=math-68881.h
1337 m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
1338 xm_file=m68k/xm-hp320.h
1339 if [[ x$gas = xyes ]]
1341 xmake_file=m68k/x-hp320g
1342 tm_file=m68k/hp320g.h
1344 xmake_file=m68k/x-hp320
1345 tm_file=m68k/hpux7.h
1347 install_headers_dir=install-headers-cpio
1349 extra_headers=math-68881.h
1351 m68k-hp-hpux*) # HP 9000 series 300
1352 xm_file=m68k/xm-hp320.h
1353 if [[ x$gas = xyes ]]
1355 xmake_file=m68k/x-hp320g
1356 tm_file=m68k/hp320g.h
1358 xmake_file=m68k/x-hp320
1359 tm_file=m68k/hp320.h
1361 install_headers_dir=install-headers-cpio
1363 extra_headers=math-68881.h
1366 tm_file=m68k/sun3mach.h
1368 extra_headers=math-68881.h
1371 if [[ x$gas = xyes ]]
1373 tm_file=m68k/news3gas.h
1375 tm_file=m68k/news3.h
1378 extra_headers=math-68881.h
1380 m68k-sony-bsd* | m68k-sony-newsos*)
1381 if [[ x$gas = xyes ]]
1383 tm_file=m68k/newsgas.h
1388 extra_headers=math-68881.h
1390 m68k-next-nextstep2*)
1391 tm_file=m68k/next21.h
1392 xm_file=m68k/xm-next.h
1393 tmake_file=m68k/t-next
1394 xmake_file=m68k/x-next
1395 extra_objs=nextstep.o
1396 extra_headers=math-68881.h
1399 m68k-next-nextstep3*)
1401 xm_file=m68k/xm-next.h
1402 tmake_file=m68k/t-next
1403 xmake_file=m68k/x-next
1404 extra_objs=nextstep.o
1405 extra_headers=math-68881.h
1406 if [[ x$enable_threads = xyes ]]; then
1411 if [[ x$with_fp = xno ]]
1413 tm_file=m68k/sun3n3.h
1415 tm_file=m68k/sun3o3.h
1418 extra_headers=math-68881.h
1420 m68k-sun-sunos*) # For SunOS 4 (the default).
1421 if [[ x$with_fp = xno ]]
1423 tm_file=m68k/sun3n.h
1428 extra_headers=math-68881.h
1431 tm_file=m68k/vxm68k.h
1432 tmake_file=m68k/t-vxworks68
1433 extra_headers=math-68881.h
1436 tmake_file=m68k/t-m68kbare
1437 tm_file="m68k/m68k-aout.h libgloss.h"
1438 extra_headers=math-68881.h
1441 tmake_file=m68k/t-m68kbare
1442 tm_file="m68k/m68k-coff.h dbx.h libgloss.h"
1443 extra_headers=math-68881.h
1446 if [[ x$gas = xyes ]]
1450 tm_file=m68k/lynx-ng.h
1452 xm_file=m68k/xm-lynx.h
1454 tmake_file=m68k/t-lynx
1455 extra_headers=math-68881.h
1458 tm_file=m68k/netbsd.h
1459 # On NetBSD, the headers are already okay, except for math.h.
1460 fixincludes=fixinc.math
1463 m68k-*-sysv3*) # Motorola m68k's running system V.3
1464 xm_file=m68k/xm-m68kv.h
1465 xmake_file=m68k/x-m68kv
1466 extra_parts="crtbegin.o crtend.o"
1467 extra_headers=math-68881.h
1469 m68k-*-sysv4*) # Motorola m68k's running system V.4
1470 tm_file=m68k/m68kv4.h
1471 xm_file=m68k/xm-m68kv.h
1473 extra_parts="crtbegin.o crtend.o"
1474 extra_headers=math-68881.h
1476 m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
1477 xm_file=m68k/xm-linux.h # with a.out format
1479 tm_file=m68k/linux-aout.h
1480 tmake_file="t-linux-aout m68k/t-linux-aout"
1481 fixincludes=Makefile.in # The headers are ok already.
1482 extra_headers=math-68881.h
1485 m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
1486 xm_file=m68k/xm-linux.h # with ELF format using the
1487 xmake_file=x-linux # GNU/Linux C library 5
1488 tm_file=m68k/linux.h
1489 tmake_file="t-linux t-linux-gnulibc1 m68k/t-linux"
1490 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1491 fixincludes=Makefile.in # The headers are ok already.
1492 extra_headers=math-68881.h
1495 m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
1496 xm_file=m68k/xm-linux.h # with ELF format using glibc 2
1497 xmake_file=x-linux # aka the GNU/Linux C library 6.
1498 tm_file=m68k/linux.h
1499 tmake_file="t-linux m68k/t-linux"
1500 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
1501 fixincludes=Makefile.in # The headers are ok already.
1502 extra_headers=math-68881.h
1504 if [[ x$enable_threads = xyes ]]; then
1509 tmake_file=m68k/t-m68kbare
1510 tm_file=m68k/m68k-psos.h
1511 extra_headers=math-68881.h
1514 tmake_file="m68k/t-m68kbare t-rtems"
1515 tm_file=m68k/rtems.h
1516 extra_headers=math-68881.h
1522 tm_file=m88k/dguxbcs.h
1523 tmake_file=m88k/t-dguxbcs
1527 tmake_file=m88k/t-dgux
1530 extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
1531 xmake_file=m88k/x-dgux
1532 if [[ x$gas = xyes ]]
1534 tmake_file=m88k/t-dgux-gas
1536 fixincludes=fixinc.dgux
1538 m88k-dolphin-sysv3*)
1539 tm_file=m88k/dolph.h
1540 extra_parts="crtbegin.o crtend.o"
1541 xm_file=m88k/xm-sysv3.h
1542 xmake_file=m88k/x-dolph
1543 if [[ x$gas = xyes ]]
1545 tmake_file=m88k/t-m88k-gas
1548 m88k-tektronix-sysv3)
1549 tm_file=m88k/tekXD88.h
1550 extra_parts="crtbegin.o crtend.o"
1551 xm_file=m88k/xm-sysv3.h
1552 xmake_file=m88k/x-tekXD88
1553 if [[ x$gas = xyes ]]
1555 tmake_file=m88k/t-m88k-gas
1559 tm_file=m88k/m88k-aout.h
1562 tm_file=m88k/m88k-coff.h
1563 tmake_file=m88k/t-bug
1567 extra_parts="crtbegin.o crtend.o"
1568 if [[ x$gas = xyes ]]
1570 tmake_file=m88k/t-luna-gas
1572 tmake_file=m88k/t-luna
1576 tm_file=m88k/sysv3.h
1577 extra_parts="crtbegin.o crtend.o"
1578 xm_file=m88k/xm-sysv3.h
1579 xmake_file=m88k/x-sysv3
1580 if [[ x$gas = xyes ]]
1582 tmake_file=m88k/t-m88k-gas
1586 tm_file=m88k/sysv4.h
1587 extra_parts="crtbegin.o crtend.o"
1588 xmake_file=m88k/x-sysv4
1589 tmake_file=m88k/t-sysv4
1591 mips-sgi-irix6*) # SGI System V.4., IRIX 6
1592 tm_file=mips/iris6.h
1593 xm_file=mips/xm-iris6.h
1594 fixincludes=fixinc.irix
1595 xmake_file=mips/x-iris6
1596 tmake_file=mips/t-iris6
1597 if [[ x$enable_threads = xyes ]]; then
1601 mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
1602 tm_file=mips/cross64.h
1603 xm_file=mips/xm-iris5.h
1604 fixincludes=Makefile.in
1605 xmake_file=mips/x-iris
1606 tmake_file=mips/t-cross64
1607 # See comment in mips/iris[56].h files.
1609 if [[ x$enable_threads = xyes ]]; then
1614 if [[ x$gas = xyes ]]
1616 if [[ x$stabs = xyes ]]
1618 tm_file=mips/iris5gdb.h
1620 tm_file=mips/sni-gas.h
1623 tm_file=mips/sni-svr4.h
1625 xm_file=mips/xm-sysv.h
1626 xmake_file=mips/x-sni-svr4
1627 tmake_file=mips/t-mips-gas
1628 if [[ x$gnu_ld != xyes ]]
1633 mips-sgi-irix5*) # SGI System V.4., IRIX 5
1634 if [[ x$gas = xyes ]]
1636 tm_file=mips/iris5gas.h
1637 if [[ x$stabs = xyes ]]
1639 tm_file="${tm_file} dbx.h"
1642 tm_file=mips/iris5.h
1644 xm_file=mips/xm-iris5.h
1645 fixincludes=fixinc.irix
1646 xmake_file=mips/x-iris
1647 # mips-tfile doesn't work yet
1648 tmake_file=mips/t-mips-gas
1649 # See comment in mips/iris5.h file.
1651 if [[ x$enable_threads = xyes ]]; then
1655 mips-sgi-irix4loser*) # Mostly like a MIPS.
1656 tm_file=mips/iris4loser.h
1657 if [[ x$stabs = xyes ]]; then
1658 tm_file="${tm_file} dbx.h"
1660 xm_file=mips/xm-iris4.h
1661 xmake_file=mips/x-iris
1662 if [[ x$gas = xyes ]]
1664 tmake_file=mips/t-mips-gas
1666 extra_passes="mips-tfile mips-tdump"
1668 if [[ x$gnu_ld != xyes ]]
1672 if [[ x$enable_threads = xyes ]]; then
1676 mips-sgi-irix4*) # Mostly like a MIPS.
1677 tm_file=mips/iris4.h
1678 if [[ x$stabs = xyes ]]; then
1679 tm_file="${tm_file} dbx.h"
1681 xm_file=mips/xm-iris4.h
1682 xmake_file=mips/x-iris
1683 if [[ x$gas = xyes ]]
1685 tmake_file=mips/t-mips-gas
1687 extra_passes="mips-tfile mips-tdump"
1689 if [[ x$gnu_ld != xyes ]]
1693 if [[ x$enable_threads = xyes ]]; then
1697 mips-sgi-*) # Mostly like a MIPS.
1698 tm_file=mips/iris3.h
1699 if [[ x$stabs = xyes ]]; then
1700 tm_file="${tm_file} dbx.h"
1702 xm_file=mips/xm-iris3.h
1703 xmake_file=mips/x-iris3
1704 if [[ x$gas = xyes ]]
1706 tmake_file=mips/t-mips-gas
1708 extra_passes="mips-tfile mips-tdump"
1710 if [[ x$gnu_ld != xyes ]]
1715 mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
1716 tm_file=mips/osfrose.h
1717 xmake_file=mips/x-osfrose
1718 tmake_file=mips/t-osfrose
1719 extra_objs=halfpic.o
1722 mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
1723 tm_file=mips/dec-osf1.h
1724 if [[ x$stabs = xyes ]]; then
1725 tm_file="${tm_file} dbx.h"
1727 xmake_file=mips/x-dec-osf1
1728 if [[ x$gas = xyes ]]
1730 tmake_file=mips/t-mips-gas
1732 tmake_file=mips/t-ultrix
1733 extra_passes="mips-tfile mips-tdump"
1735 if [[ x$gnu_ld != xyes ]]
1740 mips-dec-bsd*) # Decstation running 4.4 BSD
1741 tm_file=mips/dec-bsd.h
1743 if [[ x$gas = xyes ]]
1745 tmake_file=mips/t-mips-gas
1747 tmake_file=mips/t-ultrix
1748 extra_passes="mips-tfile mips-tdump"
1750 if [[ x$gnu_ld != xyes ]]
1755 mips-dec-netbsd*) # Decstation running NetBSD
1756 tm_file=mips/netbsd.h
1757 # On NetBSD, the headers are already okay, except for math.h.
1758 fixincludes=fixinc.math
1761 mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
1762 tm_file=mips/news4.h
1763 if [[ x$stabs = xyes ]]; then
1764 tm_file="${tm_file} dbx.h"
1766 if [[ x$gas = xyes ]]
1768 tmake_file=mips/t-mips-gas
1770 extra_passes="mips-tfile mips-tdump"
1772 if [[ x$gnu_ld != xyes ]]
1776 xmake_file=mips/x-sony
1778 mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
1779 # That is based on svr4.
1780 # t-svr4 is not right because this system doesn't use ELF.
1781 tm_file=mips/news5.h
1782 if [[ x$stabs = xyes ]]; then
1783 tm_file="${tm_file} dbx.h"
1785 xm_file=mips/xm-news.h
1786 if [[ x$gas = xyes ]]
1788 tmake_file=mips/t-mips-gas
1790 extra_passes="mips-tfile mips-tdump"
1792 if [[ x$gnu_ld != xyes ]]
1797 mips-tandem-sysv4*) # Tandem S2 running NonStop UX
1798 tm_file=mips/svr4-t.h
1799 if [[ x$stabs = xyes ]]; then
1800 tm_file="${tm_file} dbx.h"
1802 xm_file=mips/xm-sysv4.h
1803 xmake_file=mips/x-sysv
1804 if [[ x$gas = xyes ]]
1806 tmake_file=mips/t-mips-gas
1807 extra_parts="crtbegin.o crtend.o"
1809 tmake_file=mips/t-mips
1810 extra_passes="mips-tfile mips-tdump"
1812 if [[ x$gnu_ld != xyes ]]
1817 mips-*-ultrix* | mips-dec-mach3) # Decstation.
1818 tm_file=mips/ultrix.h
1819 if [[ x$stabs = xyes ]]; then
1820 tm_file="${tm_file} dbx.h"
1822 xmake_file=mips/x-ultrix
1823 if [[ x$gas = xyes ]]
1825 tmake_file=mips/t-mips-gas
1827 tmake_file=mips/t-ultrix
1828 extra_passes="mips-tfile mips-tdump"
1830 if [[ x$gnu_ld != xyes ]]
1835 mips-*-riscos[[56789]]bsd*)
1836 tm_file=mips/bsd-5.h # MIPS BSD 4.3, RISC-OS 5.0
1837 if [[ x$stabs = xyes ]]; then
1838 tm_file="${tm_file} dbx.h"
1840 if [[ x$gas = xyes ]]
1842 tmake_file=mips/t-bsd-gas
1844 tmake_file=mips/t-bsd
1845 extra_passes="mips-tfile mips-tdump"
1847 if [[ x$gnu_ld != xyes ]]
1852 mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
1853 tm_file=mips/bsd-4.h # MIPS BSD 4.3, RISC-OS 4.0
1854 if [[ x$stabs = xyes ]]; then
1855 tm_file="${tm_file} dbx.h"
1857 if [[ x$gas = xyes ]]
1859 tmake_file=mips/t-bsd-gas
1861 tmake_file=mips/t-bsd
1862 extra_passes="mips-tfile mips-tdump"
1864 if [[ x$gnu_ld != xyes ]]
1869 mips-*-riscos[[56789]]sysv4*)
1870 tm_file=mips/svr4-5.h # MIPS System V.4., RISC-OS 5.0
1871 if [[ x$stabs = xyes ]]; then
1872 tm_file="${tm_file} dbx.h"
1874 xm_file=mips/xm-sysv4.h
1875 xmake_file=mips/x-sysv
1876 if [[ x$gas = xyes ]]
1878 tmake_file=mips/t-svr4-gas
1880 tmake_file=mips/t-svr4
1881 extra_passes="mips-tfile mips-tdump"
1883 if [[ x$gnu_ld != xyes ]]
1888 mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
1889 tm_file=mips/svr4-4.h # MIPS System V.4. RISC-OS 4.0
1890 if [[ x$stabs = xyes ]]; then
1891 tm_file="${tm_file} dbx.h"
1893 xm_file=mips/xm-sysv.h
1894 xmake_file=mips/x-sysv
1895 if [[ x$gas = xyes ]]
1897 tmake_file=mips/t-svr4-gas
1899 tmake_file=mips/t-svr4
1900 extra_passes="mips-tfile mips-tdump"
1902 if [[ x$gnu_ld != xyes ]]
1907 mips-*-riscos[[56789]]sysv*)
1908 tm_file=mips/svr3-5.h # MIPS System V.3, RISC-OS 5.0
1909 if [[ x$stabs = xyes ]]; then
1910 tm_file="${tm_file} dbx.h"
1912 xm_file=mips/xm-sysv.h
1913 xmake_file=mips/x-sysv
1914 if [[ x$gas = xyes ]]
1916 tmake_file=mips/t-svr3-gas
1918 tmake_file=mips/t-svr3
1919 extra_passes="mips-tfile mips-tdump"
1921 if [[ x$gnu_ld != xyes ]]
1926 mips-*-sysv* | mips-*-riscos*sysv*)
1927 tm_file=mips/svr3-4.h # MIPS System V.3, RISC-OS 4.0
1928 if [[ x$stabs = xyes ]]; then
1929 tm_file="${tm_file} dbx.h"
1931 xm_file=mips/xm-sysv.h
1932 xmake_file=mips/x-sysv
1933 if [[ x$gas = xyes ]]
1935 tmake_file=mips/t-svr3-gas
1937 tmake_file=mips/t-svr3
1938 extra_passes="mips-tfile mips-tdump"
1940 if [[ x$gnu_ld != xyes ]]
1945 mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
1946 tm_file=mips/mips-5.h
1947 if [[ x$stabs = xyes ]]; then
1948 tm_file="${tm_file} dbx.h"
1950 if [[ x$gas = xyes ]]
1952 tmake_file=mips/t-mips-gas
1954 extra_passes="mips-tfile mips-tdump"
1956 if [[ x$gnu_ld != xyes ]]
1964 tm_file=mips/ecoffl.h
1965 if [[ x$stabs = xyes ]]; then
1966 tm_file="${tm_file} dbx.h"
1968 tmake_file=mips/t-ecoff
1971 tm_file=mips/ecoff.h
1972 if [[ x$stabs = xyes ]]; then
1973 tm_file="${tm_file} dbx.h"
1975 tmake_file=mips/t-ecoff
1978 tm_file="mips/elfl.h libgloss.h"
1979 tmake_file=mips/t-ecoff
1982 tm_file="mips/elf.h libgloss.h"
1983 tmake_file=mips/t-ecoff
1986 tm_file="mips/elfl64.h libgloss.h"
1987 tmake_file=mips/t-ecoff
1989 mips64orionel-*-elf*)
1990 tm_file="mips/elflorion.h libgloss.h"
1991 tmake_file=mips/t-ecoff
1994 tm_file="mips/elf64.h libgloss.h"
1995 tmake_file=mips/t-ecoff
1998 tm_file="mips/elforion.h libgloss.h"
1999 tmake_file=mips/t-ecoff
2001 mips64orion-*-rtems*)
2002 tm_file=mips/rtems64.h
2003 tmake_file="mips/t-ecoff t-rtems"
2006 tm_file="mips/r3900.h mips/elfl.h mips/abi64.h libgloss.h"
2007 tmake_file=mips/t-r3900
2010 tm_file="mips/r3900.h mips/elf.h mips/abi64.h libgloss.h"
2011 tmake_file=mips/t-r3900
2013 mips-*-*) # Default MIPS RISC-OS 4.0.
2014 if [[ x$stabs = xyes ]]; then
2015 tm_file="${tm_file} dbx.h"
2017 if [[ x$gas = xyes ]]
2019 tmake_file=mips/t-mips-gas
2021 extra_passes="mips-tfile mips-tdump"
2023 if [[ x$gnu_ld != xyes ]]
2030 tm_file="mn10200/mn10200.h"
2031 if [[ x$stabs = xyes ]]
2033 tm_file="${tm_file} dbx.h"
2039 tm_file="mn10300/mn10300.h"
2040 if [[ x$stabs = xyes ]]
2042 tm_file="${tm_file} dbx.h"
2047 tm_file=ns32k/encore.h
2051 tm_file=ns32k/sequent.h
2055 tm_file=ns32k/tek6100.h
2059 tm_file=ns32k/tek6200.h
2062 # This has not been updated to GCC 2.
2064 # xm_file=ns32k/xm-genix.h
2065 # xmake_file=ns32k/x-genix
2066 # tm_file=ns32k/genix.h
2070 tm_file=ns32k/merlin.h
2074 tm_file=ns32k/pc532-mach.h
2078 tm_file=ns32k/pc532-min.h
2079 xm_file=ns32k/xm-pc532-min.h
2082 ns32k-pc532-netbsd*)
2083 tm_file=ns32k/netbsd.h
2084 # On NetBSD, the headers are already okay, except for math.h.
2085 fixincludes=fixinc.math
2089 tm_file="${tm_file} pdp11/2bsd.h"
2095 xmake_file=pyr/x-pyr
2102 xmake_file=romp/x-mach
2107 tm_file=rs6000/beos.h
2108 xm_file=rs6000/xm-beos.h
2109 tmake_file=rs6000/t-beos
2110 xmake_file=rs6000/x-beos
2112 powerpc-*-sysv* | powerpc-*-elf*)
2113 tm_file=rs6000/sysv4.h
2114 xm_file=rs6000/xm-sysv4.h
2115 extra_headers=ppc-asm.h
2116 if [[ x$gas = xyes ]]
2118 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2120 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2122 xmake_file=rs6000/x-sysv4
2125 tm_file=rs6000/eabiaix.h
2126 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2127 fixincludes=Makefile.in
2128 extra_headers=ppc-asm.h
2131 tm_file=rs6000/eabisim.h
2132 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2133 fixincludes=Makefile.in
2134 extra_headers=ppc-asm.h
2137 tm_file=rs6000/eabi.h
2138 if [[ x$gas = xyes ]]
2140 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2142 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2144 fixincludes=Makefile.in
2145 extra_headers=ppc-asm.h
2148 tm_file=rs6000/rtems.h
2149 if [[ x$gas = xyes ]]
2151 tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
2153 tmake_file="rs6000/t-ppc t-rtems rs6000/t-ppccomm"
2155 fixincludes=Makefile.in
2156 extra_headers=ppc-asm.h
2158 powerpc-*-linux-gnulibc1)
2159 tm_file=rs6000/linux.h
2160 xm_file=rs6000/xm-sysv4.h
2161 out_file=rs6000/rs6000.c
2162 if [[ x$gas = xyes ]]
2164 tmake_file="rs6000/t-ppcos t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2166 tmake_file="rs6000/t-ppc t-linux t-linux-gnulibc1 rs6000/t-ppccomm"
2169 fixincludes=Makefile.in
2170 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2171 extra_headers=ppc-asm.h
2172 if [[ x$enable_threads = xyes ]]; then
2176 powerpc-*-linux-gnu*)
2177 tm_file=rs6000/linux.h
2178 xm_file=rs6000/xm-sysv4.h
2179 out_file=rs6000/rs6000.c
2180 if [[ x$gas = xyes ]]
2182 tmake_file="rs6000/t-ppcos t-linux rs6000/t-ppccomm"
2184 tmake_file="rs6000/t-ppc t-linux rs6000/t-ppccomm"
2187 fixincludes=Makefile.in
2188 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2189 extra_headers=ppc-asm.h
2190 if [[ x$enable_threads = xyes ]]; then
2196 xm_file=rs6000/xm-sysv4.h
2197 tm_file=rs6000/vxppc.h
2198 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2199 extra_headers=ppc-asm.h
2201 powerpcle-*-sysv* | powerpcle-*-elf*)
2202 tm_file=rs6000/sysv4le.h
2203 xm_file=rs6000/xm-sysv4.h
2204 if [[ x$gas = xyes ]]
2206 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2208 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2210 xmake_file=rs6000/x-sysv4
2211 extra_headers=ppc-asm.h
2213 powerpcle-*-eabisim*)
2214 tm_file=rs6000/eabilesim.h
2215 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2216 fixincludes=Makefile.in
2217 extra_headers=ppc-asm.h
2220 tm_file=rs6000/eabile.h
2221 if [[ x$gas = xyes ]]
2223 tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
2225 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2227 fixincludes=Makefile.in
2228 extra_headers=ppc-asm.h
2230 powerpcle-*-winnt* )
2231 tm_file=rs6000/win-nt.h
2232 tmake_file=rs6000/t-winnt
2234 fixincludes=Makefile.in
2235 if [[ x$enable_threads = xyes ]]; then
2238 extra_headers=ppc-asm.h
2240 powerpcle-*-pe | powerpcle-*-cygwin32)
2241 tm_file=rs6000/cygwin32.h
2242 xm_file=rs6000/xm-cygwin32.h
2243 tmake_file=rs6000/t-winnt
2244 xmake_file=rs6000/x-cygwin32
2246 fixincludes=Makefile.in
2247 if [[ x$enable_threads = xyes ]]; then
2251 extra_headers=ppc-asm.h
2253 powerpcle-*-solaris2*)
2254 tm_file=rs6000/sol2.h
2255 xm_file=rs6000/xm-sysv4.h
2256 if [[ x$gas = xyes ]]
2258 tmake_file="rs6000/t-ppcos rs6000/t-ppccomm"
2260 tmake_file="rs6000/t-ppc rs6000/t-ppccomm"
2262 xmake_file=rs6000/x-sysv4
2263 fixincludes=fixinc.math
2264 extra_headers=ppc-asm.h
2266 rs6000-ibm-aix3.[[01]]*)
2267 tm_file=rs6000/aix31.h
2268 xmake_file=rs6000/x-aix31
2271 rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
2272 tm_file=rs6000/aix3newas.h
2273 if [[ x$host != x$target ]]
2275 tmake_file=rs6000/t-xnewas
2277 tmake_file=rs6000/t-newas
2281 rs6000-ibm-aix[[456789]].* | powerpc-ibm-aix[[456789]].*)
2282 tm_file=rs6000/aix41.h
2283 if [[ x$host != x$target ]]
2285 tmake_file=rs6000/t-xnewas
2287 tmake_file=rs6000/t-newas
2289 xmake_file=rs6000/x-aix31
2299 tm_file=rs6000/mach.h
2300 xm_file=rs6000/xm-mach.h
2301 xmake_file=rs6000/x-mach
2305 tm_file=rs6000/lynx.h
2306 xm_file=rs6000/xm-lynx.h
2307 tmake_file=rs6000/t-rs6000
2308 xmake_file=rs6000/x-lynx
2316 tmake_file="sh/t-sh t-rtems"
2325 xm_file=sparc/xm-pbd.h
2327 sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
2328 tm_file=sparc/vxsparc.h
2329 tmake_file=sparc/t-vxsparc
2333 tmake_file=sparc/t-sparcbare
2334 tm_file="sparc/aout.h libgloss.h"
2337 tm_file=sparc/netbsd.h
2338 # On NetBSD, the headers are already okay, except for math.h.
2339 fixincludes=fixinc.math
2347 tmake_file=sparc/t-elf
2348 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
2352 sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
2353 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2354 tm_file=sparc/linux-aout.h
2356 fixincludes=Makefile.in #On Linux, the headers are ok already.
2359 sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
2360 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2362 tm_file=sparc/linux.h
2363 tmake_file="t-linux t-linux-gnulibc1"
2364 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2365 fixincludes=Makefile.in #On Linux, the headers are ok already.
2368 sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
2369 xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
2371 tm_file=sparc/linux.h
2372 tmake_file="t-linux"
2373 extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
2374 fixincludes=Makefile.in #On Linux, the headers are ok already.
2376 if [[ x$enable_threads = xyes ]]; then
2381 if [[ x$gas = xyes ]]
2383 tm_file=sparc/lynx.h
2385 tm_file=sparc/lynx-ng.h
2387 xm_file=sparc/xm-lynx.h
2388 tmake_file=sparc/t-sunos41
2392 tmake_file="sparc/t-sparcbare t-rtems"
2393 tm_file=sparc/rtems.h
2396 if [[ x$gnu_ld = xyes ]]
2398 tm_file=sparc/sol2.h
2400 tm_file=sparc/sol2-sld.h
2402 xm_file=sparc/xm-sol2.h
2403 tmake_file=sparc/t-sol2
2404 xmake_file=sparc/x-sysv4
2405 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
2406 fixincludes=fixinc.svr4
2409 if [[ x${enable_threads} = x ]]; then
2410 enable_threads=$have_pthread_h
2411 if [[ x${enable_threads} = x ]]; then
2412 enable_threads=$have_thread_h
2415 if [[ x${enable_threads} = xyes ]]; then
2416 if [[ x${have_pthread_h} = xyes ]]; then
2419 thread_file='solaris'
2424 tm_file=sparc/sunos4.h
2425 tmake_file=sparc/t-sunos40
2429 tm_file=sparc/sunos4.h
2430 tmake_file=sparc/t-sunos41
2432 if [[ x$gas = xyes ]]; then
2433 tm_file="${tm_file} sparc/sun4gas.h"
2437 tm_file=sparc/sun4o3.h
2441 tm_file=sparc/sysv4.h
2442 xm_file=sparc/xm-sysv4.h
2444 xmake_file=sparc/x-sysv4
2445 extra_parts="crtbegin.o crtend.o"
2448 xm_file=sparc/xm-sol2.h
2449 tm_file=sparc/vxsim.h
2450 tmake_file=sparc/t-vxsparc
2451 xmake_file=sparc/x-sysv4
2454 tm_file="sparc/splet.h libgloss.h"
2455 tmake_file=sparc/t-splet
2458 tm_file="sparc/litecoff.h libgloss.h"
2459 tmake_file=sparc/t-sparclite
2462 tm_file="sparc/lite.h aoutos.h libgloss.h"
2463 tmake_file=sparc/t-sparclite
2466 tmake_file=sparc/t-sp64
2467 tm_file=sparc/sp64-aout.h
2470 tmake_file=sparc/t-sp64
2471 tm_file=sparc/sp64-elf.h
2472 extra_parts="crtbegin.o crtend.o"
2474 sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
2475 tmake_file=sparc/t-sp64
2476 xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
2477 tm_file=sparc/linux64.h
2479 fixincludes=Makefile.in # The headers are ok already.
2482 # This hasn't been upgraded to GCC 2.
2483 # tahoe-harris-*) # Harris tahoe, using COFF.
2484 # tm_file=tahoe/harris.h
2486 # tahoe-*-bsd*) # tahoe running BSD
2488 # This hasn't been upgraded to GCC 2.
2495 tm_file="v850/v850.h"
2496 xm_file="v850/xm-v850.h"
2497 if [[ x$stabs = xyes ]]
2499 tm_file="${tm_file} dbx.h"
2503 vax-*-bsd*) # vaxen running BSD
2507 vax-*-sysv*) # vaxen running system V
2508 tm_file="${tm_file} vax/vaxv.h"
2509 xm_file="${xm_file} vax/xm-vaxv.h"
2513 tm_file="${tm_file} netbsd.h vax/netbsd.h"
2514 # On NetBSD, the headers are already okay, except for math.h.
2515 fixincludes=fixinc.math
2519 vax-*-ultrix*) # vaxen running ultrix
2520 tm_file="${tm_file} vax/ultrix.h"
2524 vax-*-vms*) # vaxen running VMS
2525 xm_file=vax/xm-vms.h
2529 vax-*-*) # vax default entry
2533 xm_file="${xm_file} xm-svr3"
2537 echo "Configuration $machine not supported" 1>&2
2544 ;; # Existing Linux/GNU systems do not use the GNU setup.
2546 # On the GNU system, the setup is just about the same on
2547 # each different CPU. The specific machines that GNU
2548 # supports are matched above and just set $cpu_type.
2549 xm_file=${cpu_type}/xm-gnu.h
2550 tm_file=${cpu_type}/gnu.h
2551 extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
2552 # GNU always uses ELF.
2554 # GNU tools are the only tools.
2557 # On GNU, the headers are already okay.
2558 fixincludes=Makefile.in
2559 xmake_file=x-linux # These details are the same as Linux.
2560 tmake_file=t-gnu # These are not.
2563 fixincludes=fixinc.svr4
2564 xmake_try_sysv=x-sysv
2565 install_headers_dir=install-headers-cpio
2568 install_headers_dir=install-headers-cpio
2572 # Distinguish i[3456]86
2573 # Also, do not run mips-tfile on MIPS if using gas.
2574 # Process --with-cpu= for PowerPC/rs6000
2575 target_cpu_default2=
2578 target_cpu_default2=1
2581 target_cpu_default2=2
2584 target_cpu_default2=3
2589 target_cpu_default2="MASK_CPU_EV6|MASK_BXW|MASK_CIX|MASK_MAX"
2592 target_cpu_default2="MASK_CPU_EV5|MASK_BWX|MASK_MAX"
2595 target_cpu_default2="MASK_CPU_EV5|MASK_BWX"
2598 target_cpu_default2="MASK_CPU_EV5"
2602 if [[ x$gas = xyes ]]
2604 if [[ "$target_cpu_default2" = "" ]]
2606 target_cpu_default2="MASK_GAS"
2608 target_cpu_default2="${target_cpu_default2}|MASK_GAS"
2613 case "x$with_cpu" in
2616 target_cpu_default2="TARGET_CPU_generic"
2619 # Distinguish cores, and major variants
2620 # arm7m doesn't exist, but D & I don't affect code
2621 xarm[23678] | xarm250 | xarm[67][01]0 \
2622 | xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
2623 | xarm7100 | xarm7500 | xarm7500fe | xarm810 \
2624 | xstrongarm | xstrongarm110)
2625 target_cpu_default2="TARGET_CPU_$with_cpu"
2629 echo "--with-cpu must be passed a value" 1>&2
2634 if [[ x$pass2done = xyes ]]
2636 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2643 mips*-*-ecoff* | mips*-*-elf*)
2644 if [[ x$gas = xyes ]]
2646 if [[ x$gnu_ld = xyes ]]
2648 target_cpu_default2=20
2650 target_cpu_default2=16
2655 if [[ x$gas = xyes ]]
2657 target_cpu_default2=16
2660 powerpc*-*-* | rs6000-*-*)
2661 case "x$with_cpu" in
2665 xcommon | xpower | xpower2 | xpowerpc | xrios \
2666 | xrios1 | xrios2 | xrsc | xrsc1 \
2667 | x601 | x602 | x603 | x603e | x604 | x604e | x620 \
2668 | x403 | x505 | x801 | x821 | x823 | x860)
2669 target_cpu_default2="\"$with_cpu\""
2673 echo "--with-cpu must be passed a value" 1>&2
2678 if [[ x$pass2done = xyes ]]
2680 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2687 case ".$with_cpu" in
2689 target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`"
2691 .supersparc | .ultrasparc | .v7 | .v8 | .v9)
2692 target_cpu_default2="TARGET_CPU_$with_cpu"
2695 if [[ x$pass2done = xyes ]]
2697 echo "Unknown cpu used with --with-cpu=$with_cpu" 1>&2
2705 if [[ "$target_cpu_default2" != "" ]]
2707 if [[ "$target_cpu_default" != "" ]]
2709 target_cpu_default="(${target_cpu_default}|${target_cpu_default2})"
2711 target_cpu_default=$target_cpu_default2
2715 # No need for collect2 if we have the GNU linker.
2722 # Save data on machine being used to compile GCC in build_xm_file.
2723 # Save data on host machine in vars host_xm_file and host_xmake_file.
2724 if [[ x$pass1done = x ]]
2726 if [[ x"$xm_file" = x ]]
2727 then build_xm_file=$cpu_type/xm-$cpu_type.h
2728 else build_xm_file=$xm_file
2730 build_install_headers_dir=$install_headers_dir
2731 build_exeext=$exeext
2734 if [[ x$pass2done = x ]]
2736 if [[ x"$xm_file" = x ]]
2737 then host_xm_file=$cpu_type/xm-$cpu_type.h
2738 else host_xm_file=$xm_file
2740 if [[ x"$xmake_file" = x ]]
2741 then xmake_file=$cpu_type/x-$cpu_type
2743 host_xmake_file="$xmake_file"
2744 host_truncate_target=$truncate_target
2745 host_extra_gcc_objs=$extra_gcc_objs
2746 host_extra_objs=$extra_host_objs
2753 extra_objs="${host_extra_objs} ${extra_objs}"
2755 # Default the target-machine variables that were not explicitly set.
2756 if [[ x"$tm_file" = x ]]
2757 then tm_file=$cpu_type/$cpu_type.h; fi
2759 if [[ x$extra_headers = x ]]
2760 then extra_headers=; fi
2762 if [[ x"$xm_file" = x ]]
2763 then xm_file=$cpu_type/xm-$cpu_type.h; fi
2765 md_file=$cpu_type/$cpu_type.md
2767 if [[ x$out_file = x ]]
2768 then out_file=$cpu_type/$cpu_type.c; fi
2770 if [[ x"$tmake_file" = x ]]
2771 then tmake_file=$cpu_type/t-$cpu_type
2774 if [[ x$float_format = x ]]
2775 then float_format=i64
2778 if [[ x$enable_haifa = x ]]
2781 alpha*-* | hppa1.?-* | powerpc*-* | rs6000-*)
2786 # Say what files are being used for the output code and MD file.
2787 echo "Using \`$srcdir/config/$out_file' to output insns."
2788 echo "Using \`$srcdir/config/$md_file' as machine description file."
2791 for f in $tm_file; do
2794 if [[ $count = ax ]]; then
2795 echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
2797 echo "Using the following target machine macro files:"
2798 for f in $tm_file; do
2799 echo " $srcdir/config/$f"
2804 for f in $host_xm_file; do
2807 if [[ $count = ax ]]; then
2808 echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
2810 echo "Using the following host machine macro files:"
2811 for f in $host_xm_file; do
2812 echo " $srcdir/config/$f"
2816 if [[ "$host_xm_file" != "$build_xm_file" ]]; then
2818 for f in $build_xm_file; do
2821 if [[ $count = ax ]]; then
2822 echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
2824 echo "Using the following build machine macro files:"
2825 for f in $build_xm_file; do
2826 echo " $srcdir/config/$f"
2831 if [[ x$thread_file = x ]]; then
2832 if [[ x$target_thread_file != x ]]; then
2833 thread_file=$target_thread_file
2835 thread_file='single'
2839 # Set up the header files.
2840 # $links is the list of header files to create.
2841 # $vars is the list of shell variables with file names to include.
2842 # auto-conf.h is the file containing items generated by autoconf and is
2843 # the first file included by config.h.
2844 host_xm_file="auto-config.h ${host_xm_file}"
2846 # If host=build, it is correct to have hconfig include auto-conf.h
2847 # as well. If host!=build, we are in error and need to do more
2848 # work to find out the build config parameters.
2849 if [[ x$host = x$build ]]
2851 build_xm_file="auto-config.h ${build_xm_file}"
2854 vars="host_xm_file tm_file xm_file build_xm_file"
2855 links="config.h tm.h tconfig.h hconfig.h"
2858 if [[ -f config.status ]]; then mv -f config.status config.bak; fi
2861 while [[ -n "$vars" ]]
2863 # set file to car of files, files to cdr of files
2864 set $vars; var=$1; shift; vars=$*
2865 set $links; link=$1; shift; links=$*
2869 # Define TARGET_CPU_DEFAULT if the system wants one.
2870 # This substitutes for lots of *.h files.
2871 if [[ "$target_cpu_default" != "" -a $link = tm.h ]]
2873 echo "#define TARGET_CPU_DEFAULT ($target_cpu_default)" >>$link
2876 for file in `eval echo '$'$var`; do
2877 echo "#include \"$file\"" >>$link
2881 # Truncate the target if necessary
2882 if [[ x$host_truncate_target != x ]]; then
2883 target=`echo $target | sed -e 's/\(..............\).*/\1/'`
2886 # Get the version number from the toplevel
2887 version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
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 symtest1.tem symtest.tem 2>/dev/null
2927 cc_set_by_configure="\$(CC)"
2928 stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
2930 symbolic_link="cp -p"
2931 cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
2932 stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
2936 out_object_file=`basename $out_file .c`.o
2939 for f in $tm_file; do
2940 tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
2944 for f in $host_xm_file; do
2945 if test $f != "auto-config.h"; then
2946 host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
2948 host_xm_file_list="${host_xm_file_list} auto-config.h"
2953 for f in $build_xm_file; do
2954 if test $f != "auto-config.h"; then
2955 build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
2957 build_xm_file_list="${build_xm_file_list} auto-config.h"
2961 # Define macro CROSS_COMPILE in compilation
2962 # if this is a cross-compiler.
2963 # Also use all.cross instead of all.internal
2964 # and add cross-make to Makefile.
2965 cross_overrides="/dev/null"
2966 if [[ x$host != x$target ]]
2968 cross_defines="CROSS=-DCROSS_COMPILE"
2969 cross_overrides="${topdir}/cross-make"
2972 # When building gcc with a cross-compiler, we need to fix a few things.
2973 # This must come after cross-make as we want all.build to override
2975 build_overrides="/dev/null"
2976 if [[ x$build != x$host ]]
2978 build_overrides="${topdir}/build-make"
2981 # Expand extra_headers to include complete path.
2982 # This substitutes for lots of t-* files.
2984 if [[ "x$extra_headers" = x ]]
2987 # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
2988 for file in $extra_headers;
2990 extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
2994 # Add a definition of USE_COLLECT2 if system wants one.
2995 # Also tell toplev.c what to do.
2996 # This substitutes for lots of t-* files.
2997 if [[ x$use_collect2 = x ]]
3002 will_use_collect2="ld"
3003 maybe_use_collect2="-DUSE_COLLECT2"
3007 # Set MD_DEPS if the real md file is in md.pre-cpp.
3008 # Set MD_CPP to the cpp to pass the md file through. Md files use ';'
3009 # for line oriented comments, so we must always use a GNU cpp. If
3010 # building gcc with a cross compiler, use the cross compiler just
3011 # built. Otherwise, we can use the cpp just built.
3013 if [[ "x$md_cppflags" = x ]]
3015 md_file_sub=$srcdir/config/$md_file
3020 # If we have gas in the build tree, make a link to it.
3021 if [[ -f ../gas/Makefile ]]; then
3022 rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
3025 # If we have ld in the build tree, make a link to it.
3026 if [[ -f ../ld/Makefile ]]; then
3027 # if [[ x$use_collect2 = x ]]; then
3028 # rm -f ld; $symbolic_link ../ld/ld-new$host_exeext ld$host_exeext 2>/dev/null
3030 rm -f collect-ld; $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext 2>/dev/null
3034 # Figure out what language subdirectories are present.
3036 for lang in ${srcdir}/*/config-lang.in ..
3040 # The odd quoting in the next line works around
3041 # an apparent bug in bash 1.12 on linux.
3042 ${srcdir}/[[*]]/config-lang.in) ;;
3043 *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([[^/]]*\)/config-lang.in$,\1,'`" ;;
3047 # Make gthr-default.h if we have a thread file.
3049 if [[ $thread_file != single ]]; then
3050 rm -f gthr-default.h
3051 echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h
3052 gthread_flags=-DHAVE_GTHR_DEFAULT
3054 AC_SUBST(gthread_flags)
3056 # Make empty files to contain the specs and options for each language.
3057 # Then add #include lines to for a compiler that has specs and/or options.
3061 rm -f specs.h options.h
3062 touch specs.h options.h
3063 for subdir in . $subdirs
3065 if [[ -f $srcdir/$subdir/lang-specs.h ]]; then
3066 echo "#include \"$subdir/lang-specs.h\"" >>specs.h
3067 lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
3069 if [[ -f $srcdir/$subdir/lang-options.h ]]; then
3070 echo "#include \"$subdir/lang-options.h\"" >>options.h
3071 lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
3075 # These (without "all_") are set in each config-lang.in.
3076 # `language' must be a single word so is spelled singularly.
3082 all_outputs=Makefile
3083 # List of language makefile fragments.
3088 # Add the language fragments.
3089 # Languages are added via two mechanisms. Some information must be
3090 # recorded in makefile variables, these are defined in config-lang.in.
3091 # We accumulate them and plug them into the main Makefile.
3092 # The other mechanism is a set of hooks for each of the main targets
3093 # like `clean', `install', etc.
3095 language_fragments="Make-lang"
3096 language_hooks="Make-hooks"
3099 for s in .. $subdirs
3111 . ${srcdir}/$s/config-lang.in
3112 if [[ "x$language" = x ]]
3114 echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2
3117 all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in ${srcdir}/$s/Makefile.in"
3118 all_languages="$all_languages $language"
3119 if [[ "x$boot_language" = xyes ]]
3121 all_boot_languages="$all_boot_languages $language"
3123 all_compilers="$all_compilers $compilers"
3124 all_stagestuff="$all_stagestuff $stagestuff"
3125 all_diff_excludes="$all_diff_excludes $diff_excludes"
3126 all_headers="$all_headers $headers"
3127 all_outputs="$all_outputs $outputs"
3128 if [[ x$outputs = x ]]
3130 oldstyle_subdirs="$oldstyle_subdirs $s"
3132 all_lib2funcs="$all_lib2funcs $lib2funcs"
3136 # Since we can't use `::' targets, we link each language in
3137 # with a set of hooks, reached indirectly via lang.${target}.
3141 target_list="all.build all.cross start.encap rest.encap \
3143 install-normal install-common install-info install-man \
3145 mostlyclean clean distclean extraclean maintainer-clean \
3146 stage1 stage2 stage3 stage4"
3147 for t in $target_list
3150 for l in .. $all_languages
3152 if [[ $l != ".." ]]; then
3156 echo "lang.$t: $x" >> Make-hooks
3159 # If we're not building in srcdir, create .gdbinit.
3161 if [[ ! -f Makefile.in ]]; then
3162 echo "dir ." > .gdbinit
3163 echo "dir ${srcdir}" >> .gdbinit
3164 if [[ x$gdb_needs_out_file_path = xyes ]]
3166 echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
3168 if [[ "x$subdirs" != x ]]; then
3171 echo "dir ${srcdir}/$s" >> .gdbinit
3174 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3177 # If this is using newlib, then define inhibit_libc in
3178 # LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
3179 # libgcc.a, but that's OK because newib should have its own version of
3182 if [[ x$with_newlib = xyes ]]; then
3183 inhibit_libc=-Dinhibit_libc
3185 AC_SUBST(inhibit_libc)
3187 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
3190 if [[ x$enable_haifa = xyes ]]; then
3191 echo "Using the Haifa scheduler."
3193 sched_cflags=-DHAIFA
3195 AC_SUBST(sched_prefix)
3196 AC_SUBST(sched_cflags)
3197 if [[ x$enable_haifa != x ]]; then
3198 # Explicitly remove files that need to be recompiled for the Haifa scheduler.
3199 for x in genattrtab.o toplev.o loop.o unroll.o *sched.o; do
3200 if [[ -f $x ]]; then
3207 # Process the language and host/target makefile fragments.
3208 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
3210 # Substitute configuration variables
3212 AC_SUBST(all_languages)
3213 AC_SUBST(all_boot_languages)
3214 AC_SUBST(all_compilers)
3215 AC_SUBST(all_lang_makefiles)
3216 AC_SUBST(all_stagestuff)
3217 AC_SUBST(all_diff_excludes)
3218 AC_SUBST(all_lib2funcs)
3219 AC_SUBST(all_headers)
3220 AC_SUBST(extra_passes)
3221 AC_SUBST(extra_programs)
3222 AC_SUBST(extra_parts)
3223 AC_SUBST(extra_c_objs)
3224 AC_SUBST(extra_c_flags)
3225 AC_SUBST(extra_objs)
3226 AC_SUBST(host_extra_gcc_objs)
3227 AC_SUBST(extra_headers_list)
3228 AC_SUBST(dep_host_xmake_file)
3229 AC_SUBST(dep_tmake_file)
3231 AC_SUBST(out_object_file)
3233 AC_SUBST(tm_file_list)
3234 AC_SUBST(build_xm_file_list)
3235 AC_SUBST(host_xm_file_list)
3236 AC_SUBST(lang_specs_files)
3237 AC_SUBST(lang_options_files)
3238 AC_SUBST(thread_file)
3240 AC_SUBST(local_prefix)
3241 AC_SUBST(gxx_include_dir)
3242 AC_SUBST(fixincludes)
3243 AC_SUBST(build_install_headers_dir)
3244 AC_SUBST(build_exeext)
3245 AC_SUBST(host_exeext)
3246 AC_SUBST(float_format)
3247 AC_SUBST(will_use_collect2)
3248 AC_SUBST(maybe_use_collect2)
3249 AC_SUBST(cc_set_by_configure)
3250 AC_SUBST(stage_prefix_set_by_configure)
3252 AC_SUBST(symbolic_link)
3254 AC_SUBST_FILE(target_overrides)
3255 AC_SUBST_FILE(host_overrides)
3256 AC_SUBST(cross_defines)
3257 AC_SUBST_FILE(cross_overrides)
3258 AC_SUBST_FILE(build_overrides)
3259 AC_SUBST_FILE(language_fragments)
3260 AC_SUBST_FILE(language_hooks)
3262 # Echo that links are built
3263 if [[ x$host = x$target ]]
3271 if [[ x$host != x$build ]]
3273 str3=" on a $build system"
3276 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3281 echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2
3283 if [[ "x$str2" != x ]] || [[ "x$str3" != x ]]
3285 echo " ${str2}${str3}." 1>&2
3288 # Configure the subdirectories
3289 # AC_CONFIG_SUBDIRS($subdirs)
3291 # Create the Makefile
3292 # and configure language subdirectories
3293 AC_OUTPUT($all_outputs,
3295 . $srcdir/configure.lang
3296 case x$CONFIG_HEADERS in
3297 xauto-config.h:config.in)
3300 # If the host supports symlinks, point stage[1234] at ../stage[1234] so
3301 # bootstrapping and the installation procedure can still use
3302 # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
3303 # FLAGS_TO_PASS has been modified to solve the problem there.
3304 # This is virtually a duplicate of what happens in configure.lang; we do
3305 # an extra check to make sure this only happens if ln -s can be used.
3306 if [[ "$symbolic_link" = "ln -s" ]]; then
3307 for d in .. ${subdirs} ; do
3308 if [[ $d != .. ]]; then
3311 for t in stage1 stage2 stage3 stage4 include
3314 $symbolic_link ../$t $t 2>/dev/null
3325 target_alias='${target_alias}'
3327 subdirs='${subdirs}'
3328 oldstyle_subdirs='${oldstyle_subdirs}'
3329 symbolic_link='${symbolic_link}'
3330 program_transform_set='${program_transform_set}'
3331 program_transform_name='${program_transform_name}'
3332 dep_host_xmake_file='${dep_host_xmake_file}'
3333 host_xmake_file='${host_xmake_file}'
3334 dep_tmake_file='${dep_tmake_file}'
3335 tmake_file='${tmake_file}'
3336 thread_file='${thread_file}'
3337 version='${version}'
3338 local_prefix='${local_prefix}'
3339 build_install_headers_dir='${build_install_headers_dir}'
3340 build_exeext='${build_exeext}'
3341 host_exeext='${host_exeext}'
3342 out_file='${out_file}'
3343 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
3344 SET_MAKE='${SET_MAKE}'
3345 target_list='${target_list}'
3346 target_overrides='${target_overrides}'
3347 host_overrides='${host_overrides}'
3348 cross_defines='${cross_defines}'
3349 cross_overrides='${cross_overrides}'
3350 build_overrides='${build_overrides}'