Mercurial > hg > CbC > CbC_gcc
comparison configure.ac @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | 1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
2 # 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, | 2 # 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, |
3 # 2014, 2015, 2016 Free Software Foundation, Inc. | 3 # 2014, 2015, 2016, 2019 Free Software Foundation, Inc. |
4 # | 4 # |
5 # This file is free software; you can redistribute it and/or modify it | 5 # This file is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License as published by | 6 # under the terms of the GNU General Public License as published by |
7 # the Free Software Foundation; either version 3 of the License, or | 7 # the Free Software Foundation; either version 3 of the License, or |
8 # (at your option) any later version. | 8 # (at your option) any later version. |
29 m4_include([ltversion.m4]) | 29 m4_include([ltversion.m4]) |
30 m4_include([lt~obsolete.m4]) | 30 m4_include([lt~obsolete.m4]) |
31 m4_include([config/isl.m4]) | 31 m4_include([config/isl.m4]) |
32 | 32 |
33 AC_INIT(move-if-change) | 33 AC_INIT(move-if-change) |
34 AC_PREREQ(2.64) | |
35 AC_DISABLE_OPTION_CHECKING | 34 AC_DISABLE_OPTION_CHECKING |
36 | 35 |
37 progname=$0 | 36 progname=$0 |
38 # if PWD already has a value, it is probably wrong. | 37 # if PWD already has a value, it is probably wrong. |
39 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi | 38 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi |
130 # these tools are built for the build environment | 129 # these tools are built for the build environment |
131 build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes" | 130 build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes" |
132 | 131 |
133 # these libraries are used by various programs built for the host environment | 132 # these libraries are used by various programs built for the host environment |
134 #f | 133 #f |
135 host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv" | 134 host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv libctf" |
136 | 135 |
137 # these tools are built for the host environment | 136 # these tools are built for the host environment |
138 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to | 137 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to |
139 # know that we are building the simulator. | 138 # know that we are building the simulator. |
140 # binutils, gas and ld appear in that order because it makes sense to run | 139 # binutils, gas and ld appear in that order because it makes sense to run |
161 target-libquadmath \ | 160 target-libquadmath \ |
162 target-libgfortran \ | 161 target-libgfortran \ |
163 target-libffi \ | 162 target-libffi \ |
164 target-libobjc \ | 163 target-libobjc \ |
165 target-libada \ | 164 target-libada \ |
166 target-libgo" | 165 target-libgo \ |
166 target-libphobos \ | |
167 target-zlib" | |
167 | 168 |
168 # these tools are built using the target libraries, and are intended to | 169 # these tools are built using the target libraries, and are intended to |
169 # run only in the target environment | 170 # run only in the target environment |
170 # | 171 # |
171 # note: any program that *uses* libraries that are in the "target_libraries" | 172 # note: any program that *uses* libraries that are in the "target_libraries" |
635 case "${target}" in | 636 case "${target}" in |
636 avr-*-*) | 637 avr-*-*) |
637 # No hosted I/O support. | 638 # No hosted I/O support. |
638 noconfigdirs="$noconfigdirs target-libssp" | 639 noconfigdirs="$noconfigdirs target-libssp" |
639 ;; | 640 ;; |
641 bpf-*-*) | |
642 noconfigdirs="$noconfigdirs target-libssp" | |
643 ;; | |
640 powerpc-*-aix* | rs6000-*-aix*) | 644 powerpc-*-aix* | rs6000-*-aix*) |
645 noconfigdirs="$noconfigdirs target-libssp" | |
646 ;; | |
647 pru-*-*) | |
648 # No hosted I/O support. | |
641 noconfigdirs="$noconfigdirs target-libssp" | 649 noconfigdirs="$noconfigdirs target-libssp" |
642 ;; | 650 ;; |
643 rl78-*-*) | 651 rl78-*-*) |
644 # libssp uses a misaligned load to trigger a fault, but the RL78 | 652 # libssp uses a misaligned load to trigger a fault, but the RL78 |
645 # doesn't fault for those - instead, it gives a build-time error | 653 # doesn't fault for those - instead, it gives a build-time error |
665 noconfigdirs="$noconfigdirs target-libstdc++-v3" | 673 noconfigdirs="$noconfigdirs target-libstdc++-v3" |
666 ;; | 674 ;; |
667 avr-*-*) | 675 avr-*-*) |
668 noconfigdirs="$noconfigdirs target-libstdc++-v3" | 676 noconfigdirs="$noconfigdirs target-libstdc++-v3" |
669 ;; | 677 ;; |
678 bpf-*-*) | |
679 noconfigdirs="$noconfigdirs target-libstdc++-v3" | |
680 ;; | |
670 ft32-*-*) | 681 ft32-*-*) |
671 noconfigdirs="$noconfigdirs target-libstdc++-v3" | 682 noconfigdirs="$noconfigdirs target-libstdc++-v3" |
672 ;; | 683 ;; |
673 esac | 684 esac |
685 fi | |
686 | |
687 # Disable C++ on systems where it is known to not work. | |
688 # For testing, you can override this with --enable-languages=c++. | |
689 case ,${enable_languages}, in | |
690 *,c++,*) | |
691 ;; | |
692 *) | |
693 case "${target}" in | |
694 bpf-*-*) | |
695 unsupported_languages="$unsupported_languages c++" | |
696 ;; | |
697 esac | |
698 ;; | |
699 esac | |
700 | |
701 # Disable Objc on systems where it is known to not work. | |
702 # For testing, you can override this with --enable-languages=objc. | |
703 case ,${enable_languages}, in | |
704 *,objc,*) | |
705 ;; | |
706 *) | |
707 case "${target}" in | |
708 bpf-*-*) | |
709 unsupported_languages="$unsupported_languages objc" | |
710 ;; | |
711 esac | |
712 ;; | |
713 esac | |
714 | |
715 # Disable D on systems where it is known to not work. | |
716 # For testing, you can override this with --enable-languages=d. | |
717 case ,${enable_languages}, in | |
718 *,d,*) | |
719 ;; | |
720 *) | |
721 case "${target}" in | |
722 *-*-darwin*) | |
723 unsupported_languages="$unsupported_languages d" | |
724 ;; | |
725 bpf-*-*) | |
726 unsupported_languages="$unsupported_languages d" | |
727 ;; | |
728 esac | |
729 ;; | |
730 esac | |
731 | |
732 # Disable libphobos on unsupported systems. | |
733 # For testing, you can override this with --enable-libphobos. | |
734 if test -d ${srcdir}/libphobos; then | |
735 if test x$enable_libphobos = x; then | |
736 AC_MSG_CHECKING([for libphobos support]) | |
737 if (srcdir=${srcdir}/libphobos; \ | |
738 . ${srcdir}/configure.tgt; \ | |
739 test "$LIBPHOBOS_SUPPORTED" != "yes") | |
740 then | |
741 AC_MSG_RESULT([no]) | |
742 noconfigdirs="$noconfigdirs target-libphobos" | |
743 else | |
744 AC_MSG_RESULT([yes]) | |
745 fi | |
746 fi | |
674 fi | 747 fi |
675 | 748 |
676 # Disable Fortran for some systems. | 749 # Disable Fortran for some systems. |
677 case "${target}" in | 750 case "${target}" in |
678 mmix-*-*) | 751 mmix-*-*) |
679 # See <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html>. | 752 # See <http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00572.html>. |
680 unsupported_languages="$unsupported_languages fortran" | 753 unsupported_languages="$unsupported_languages fortran" |
681 ;; | 754 ;; |
755 bpf-*-*) | |
756 unsupported_languages="$unsupported_languages fortran" | |
757 ;; | |
682 esac | 758 esac |
683 | 759 |
684 # Disable libffi for some systems. | 760 # Disable libffi for some systems. |
685 case "${target}" in | 761 case "${target}" in |
686 powerpc-*-darwin*) | 762 powerpc-*-darwin*) |
721 ;; | 797 ;; |
722 arm-wince-pe) | 798 arm-wince-pe) |
723 noconfigdirs="$noconfigdirs target-libffi" | 799 noconfigdirs="$noconfigdirs target-libffi" |
724 ;; | 800 ;; |
725 arm*-*-symbianelf*) | 801 arm*-*-symbianelf*) |
802 noconfigdirs="$noconfigdirs target-libffi" | |
803 ;; | |
804 bpf-*-*) | |
726 noconfigdirs="$noconfigdirs target-libffi" | 805 noconfigdirs="$noconfigdirs target-libffi" |
727 ;; | 806 ;; |
728 cris-*-* | crisv32-*-*) | 807 cris-*-* | crisv32-*-*) |
729 case "${target}" in | 808 case "${target}" in |
730 *-*-linux*) | 809 *-*-linux*) |
769 esac | 848 esac |
770 | 849 |
771 # Disable the go frontend on systems where it is known to not work. Please keep | 850 # Disable the go frontend on systems where it is known to not work. Please keep |
772 # this in sync with contrib/config-list.mk. | 851 # this in sync with contrib/config-list.mk. |
773 case "${target}" in | 852 case "${target}" in |
774 *-*-darwin* | *-*-cygwin* | *-*-mingw*) | 853 *-*-darwin* | *-*-cygwin* | *-*-mingw* | bpf-* ) |
775 unsupported_languages="$unsupported_languages go" | 854 unsupported_languages="$unsupported_languages go" |
776 ;; | 855 ;; |
777 esac | 856 esac |
778 | 857 |
779 # Disable libgo for some systems where it is known to not work. | 858 # Disable libgo for some systems where it is known to not work. |
785 noconfigdirs="$noconfigdirs target-libgo" | 864 noconfigdirs="$noconfigdirs target-libgo" |
786 ;; | 865 ;; |
787 *-*-cygwin* | *-*-mingw*) | 866 *-*-cygwin* | *-*-mingw*) |
788 noconfigdirs="$noconfigdirs target-libgo" | 867 noconfigdirs="$noconfigdirs target-libgo" |
789 ;; | 868 ;; |
869 bpf-*-*) | |
870 noconfigdirs="$noconfigdirs target-libgo" | |
871 ;; | |
790 esac | 872 esac |
791 fi | 873 fi |
792 | 874 |
793 # Default libgloss CPU subdirectory. | 875 # Default libgloss CPU subdirectory. |
794 libgloss_dir="$target_cpu" | 876 libgloss_dir="$target_cpu" |
821 mips*-*-*) | 903 mips*-*-*) |
822 libgloss_dir=mips | 904 libgloss_dir=mips |
823 ;; | 905 ;; |
824 powerpc*-*-*) | 906 powerpc*-*-*) |
825 libgloss_dir=rs6000 | 907 libgloss_dir=rs6000 |
908 ;; | |
909 pru-*-*) | |
910 libgloss_dir=pru | |
826 ;; | 911 ;; |
827 sparc*-*-*) | 912 sparc*-*-*) |
828 libgloss_dir=sparc | 913 libgloss_dir=sparc |
829 ;; | 914 ;; |
830 esac | 915 esac |
853 noconfigdirs="$noconfigdirs target-newlib target-libgloss" | 938 noconfigdirs="$noconfigdirs target-newlib target-libgloss" |
854 ;; | 939 ;; |
855 sparc-*-sunos4*) | 940 sparc-*-sunos4*) |
856 noconfigdirs="$noconfigdirs target-newlib target-libgloss" | 941 noconfigdirs="$noconfigdirs target-newlib target-libgloss" |
857 ;; | 942 ;; |
943 bpf-*-*) | |
944 noconfigdirs="$noconfigdirs target-newlib target-libgloss" | |
945 ;; | |
858 *-*-aix*) | 946 *-*-aix*) |
859 noconfigdirs="$noconfigdirs target-newlib target-libgloss" | 947 noconfigdirs="$noconfigdirs target-newlib target-libgloss" |
860 ;; | 948 ;; |
861 *-*-beos*) | 949 *-*-beos*) |
862 noconfigdirs="$noconfigdirs target-newlib target-libgloss" | 950 noconfigdirs="$noconfigdirs target-newlib target-libgloss" |
901 ;; | 989 ;; |
902 aarch64-*-darwin*) | 990 aarch64-*-darwin*) |
903 noconfigdirs="$noconfigdirs ld gas gdb gprof" | 991 noconfigdirs="$noconfigdirs ld gas gdb gprof" |
904 noconfigdirs="$noconfigdirs sim target-rda" | 992 noconfigdirs="$noconfigdirs sim target-rda" |
905 ;; | 993 ;; |
994 amdgcn*-*-*) | |
995 ;; | |
906 arm-*-darwin*) | 996 arm-*-darwin*) |
907 noconfigdirs="$noconfigdirs ld gas gdb gprof" | 997 noconfigdirs="$noconfigdirs ld gas gdb gprof" |
908 noconfigdirs="$noconfigdirs sim target-rda" | 998 noconfigdirs="$noconfigdirs sim target-rda" |
909 ;; | 999 ;; |
910 powerpc-*-darwin*) | 1000 powerpc-*-darwin*) |
963 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" | 1053 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" |
964 ;; | 1054 ;; |
965 alpha*-*-*) | 1055 alpha*-*-*) |
966 # newlib is not 64 bit ready | 1056 # newlib is not 64 bit ready |
967 noconfigdirs="$noconfigdirs target-newlib target-libgloss" | 1057 noconfigdirs="$noconfigdirs target-newlib target-libgloss" |
1058 ;; | |
1059 bpf-*-*) | |
1060 noconfigdirs="$noconfigdirs target-libobjc target-libbacktrace" | |
968 ;; | 1061 ;; |
969 sh*-*-pe|mips*-*-pe|*arm-wince-pe) | 1062 sh*-*-pe|mips*-*-pe|*arm-wince-pe) |
970 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim" | 1063 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim" |
971 ;; | 1064 ;; |
972 arc*-*-*) | 1065 arc*-*-*) |
1233 AS_FOR_BUILD=${AS_FOR_BUILD-as} | 1326 AS_FOR_BUILD=${AS_FOR_BUILD-as} |
1234 CC_FOR_BUILD=${CC_FOR_BUILD-gcc} | 1327 CC_FOR_BUILD=${CC_FOR_BUILD-gcc} |
1235 CXX_FOR_BUILD=${CXX_FOR_BUILD-g++} | 1328 CXX_FOR_BUILD=${CXX_FOR_BUILD-g++} |
1236 GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran} | 1329 GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran} |
1237 GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo} | 1330 GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo} |
1331 GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc} | |
1238 DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool} | 1332 DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool} |
1239 LD_FOR_BUILD=${LD_FOR_BUILD-ld} | 1333 LD_FOR_BUILD=${LD_FOR_BUILD-ld} |
1240 NM_FOR_BUILD=${NM_FOR_BUILD-nm} | 1334 NM_FOR_BUILD=${NM_FOR_BUILD-nm} |
1241 RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib} | 1335 RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib} |
1242 WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres} | 1336 WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres} |
1246 AS_FOR_BUILD="\$(AS)" | 1340 AS_FOR_BUILD="\$(AS)" |
1247 CC_FOR_BUILD="\$(CC)" | 1341 CC_FOR_BUILD="\$(CC)" |
1248 CXX_FOR_BUILD="\$(CXX)" | 1342 CXX_FOR_BUILD="\$(CXX)" |
1249 GFORTRAN_FOR_BUILD="\$(GFORTRAN)" | 1343 GFORTRAN_FOR_BUILD="\$(GFORTRAN)" |
1250 GOC_FOR_BUILD="\$(GOC)" | 1344 GOC_FOR_BUILD="\$(GOC)" |
1345 GDC_FOR_BUILD="\$(GDC)" | |
1251 DLLTOOL_FOR_BUILD="\$(DLLTOOL)" | 1346 DLLTOOL_FOR_BUILD="\$(DLLTOOL)" |
1252 LD_FOR_BUILD="\$(LD)" | 1347 LD_FOR_BUILD="\$(LD)" |
1253 NM_FOR_BUILD="\$(NM)" | 1348 NM_FOR_BUILD="\$(NM)" |
1254 RANLIB_FOR_BUILD="\$(RANLIB)" | 1349 RANLIB_FOR_BUILD="\$(RANLIB)" |
1255 WINDRES_FOR_BUILD="\$(WINDRES)" | 1350 WINDRES_FOR_BUILD="\$(WINDRES)" |
1284 saved_LDFLAGS="$LDFLAGS" | 1379 saved_LDFLAGS="$LDFLAGS" |
1285 | 1380 |
1286 LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" | 1381 LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc" |
1287 AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) | 1382 AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc]) |
1288 AC_LANG_PUSH(C++) | 1383 AC_LANG_PUSH(C++) |
1289 AC_LINK_IFELSE([ | 1384 AC_LINK_IFELSE([AC_LANG_SOURCE([ |
1290 #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) | 1385 #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) |
1291 #error -static-libstdc++ not implemented | 1386 #error -static-libstdc++ not implemented |
1292 #endif | 1387 #endif |
1293 int main() {}], | 1388 int main() {}])], |
1294 [AC_MSG_RESULT([yes]); have_static_libs=yes], | 1389 [AC_MSG_RESULT([yes]); have_static_libs=yes], |
1295 [AC_MSG_RESULT([no])]) | 1390 [AC_MSG_RESULT([no])]) |
1296 AC_LANG_POP(C++) | 1391 AC_LANG_POP(C++) |
1297 | 1392 |
1298 LDFLAGS="$saved_LDFLAGS" | 1393 LDFLAGS="$saved_LDFLAGS" |
1504 if test x"$have_gmp" = xyes; then | 1599 if test x"$have_gmp" = xyes; then |
1505 # Check for the recommended and required versions of MPFR. | 1600 # Check for the recommended and required versions of MPFR. |
1506 AC_MSG_CHECKING([for the correct version of mpfr.h]) | 1601 AC_MSG_CHECKING([for the correct version of mpfr.h]) |
1507 AC_TRY_COMPILE([#include <gmp.h> | 1602 AC_TRY_COMPILE([#include <gmp.h> |
1508 #include <mpfr.h>],[ | 1603 #include <mpfr.h>],[ |
1509 #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,0) | 1604 #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,0) |
1510 choke me | 1605 choke me |
1511 #endif | 1606 #endif |
1512 ], [AC_TRY_COMPILE([#include <gmp.h> | 1607 ], [AC_TRY_COMPILE([#include <gmp.h> |
1513 #include <mpfr.h>],[ | 1608 #include <mpfr.h>],[ |
1514 #if MPFR_VERSION < MPFR_VERSION_NUM(2,4,2) | 1609 #if MPFR_VERSION < MPFR_VERSION_NUM(3,1,6) |
1515 choke me | 1610 choke me |
1516 #endif | 1611 #endif |
1517 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])], | 1612 ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])], |
1518 [AC_MSG_RESULT([no]); have_gmp=no]) | 1613 [AC_MSG_RESULT([no]); have_gmp=no]) |
1519 fi | 1614 fi |
1544 mpfr_t x; | 1639 mpfr_t x; |
1545 mpc_t c; | 1640 mpc_t c; |
1546 int t; | 1641 int t; |
1547 mpfr_init (n); | 1642 mpfr_init (n); |
1548 mpfr_init (x); | 1643 mpfr_init (x); |
1549 mpfr_atan2 (n, n, x, GMP_RNDN); | 1644 mpfr_atan2 (n, n, x, MPFR_RNDN); |
1550 mpfr_erfc (n, x, GMP_RNDN); | 1645 mpfr_erfc (n, x, MPFR_RNDN); |
1551 mpfr_subnormalize (x, t, GMP_RNDN); | 1646 mpfr_subnormalize (x, t, MPFR_RNDN); |
1552 mpfr_clear(n); | 1647 mpfr_clear(n); |
1553 mpfr_clear(x); | 1648 mpfr_clear(x); |
1554 mpc_init2 (c, 53); | 1649 mpc_init2 (c, 53); |
1555 mpc_set_ui_ui (c, 1, 1, MPC_RNDNN); | 1650 mpc_set_ui_ui (c, 1, 1, MPC_RNDNN); |
1556 mpc_cosh (c, c, MPC_RNDNN); | 1651 mpc_cosh (c, c, MPC_RNDNN); |
1564 CFLAGS="$saved_CFLAGS" | 1659 CFLAGS="$saved_CFLAGS" |
1565 | 1660 |
1566 # The library versions listed in the error message below should match | 1661 # The library versions listed in the error message below should match |
1567 # the HARD-minimums enforced above. | 1662 # the HARD-minimums enforced above. |
1568 if test x$have_gmp != xyes; then | 1663 if test x$have_gmp != xyes; then |
1569 AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. | 1664 AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+. |
1570 Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify | 1665 Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify |
1571 their locations. Source code for these libraries can be found at | 1666 their locations. Source code for these libraries can be found at |
1572 their respective hosting sites as well as at | 1667 their respective hosting sites as well as at |
1573 ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also | 1668 https://gcc.gnu.org/pub/gcc/infrastructure/. See also |
1574 http://gcc.gnu.org/install/prerequisites.html for additional info. If | 1669 http://gcc.gnu.org/install/prerequisites.html for additional info. If |
1575 you obtained GMP, MPFR and/or MPC from a vendor distribution package, | 1670 you obtained GMP, MPFR and/or MPC from a vendor distribution package, |
1576 make sure that you have installed both the libraries and the header | 1671 make sure that you have installed both the libraries and the header |
1577 files. They may be located in separate packages.]) | 1672 files. They may be located in separate packages.]) |
1578 fi | 1673 fi |
1594 else | 1689 else |
1595 stage1_libs=$withval | 1690 stage1_libs=$withval |
1596 fi], | 1691 fi], |
1597 [stage1_libs=]) | 1692 [stage1_libs=]) |
1598 AC_SUBST(stage1_libs) | 1693 AC_SUBST(stage1_libs) |
1694 | |
1695 # Whether or not to use -static-libstdc++ and -static-libgcc. The | |
1696 # default is yes if gcc is being built; no otherwise. The reason for | |
1697 # this default is that gdb is sometimes linked against GNU Source | |
1698 # Highlight, which is a shared library that uses C++ exceptions. In | |
1699 # this case, -static-libstdc++ will cause crashes. | |
1700 AC_ARG_WITH(static-standard-libraries, | |
1701 [AS_HELP_STRING([--with-static-standard-libraries], | |
1702 [use -static-libstdc++ and -static-libgcc (default=auto)])], | |
1703 [], [with_static_standard_libraries=auto]) | |
1704 if test "$with_static_standard_libraries" = auto; then | |
1705 with_static_standard_libraries=$have_compiler | |
1706 fi | |
1599 | 1707 |
1600 # Linker flags to use for stage1 or when not bootstrapping. | 1708 # Linker flags to use for stage1 or when not bootstrapping. |
1601 AC_ARG_WITH(stage1-ldflags, | 1709 AC_ARG_WITH(stage1-ldflags, |
1602 [AS_HELP_STRING([--with-stage1-ldflags=FLAGS], [linker flags for stage1])], | 1710 [AS_HELP_STRING([--with-stage1-ldflags=FLAGS], [linker flags for stage1])], |
1603 [if test "$withval" = "no" -o "$withval" = "yes"; then | 1711 [if test "$withval" = "no" -o "$withval" = "yes"; then |
1607 fi], | 1715 fi], |
1608 [stage1_ldflags= | 1716 [stage1_ldflags= |
1609 # In stage 1, default to linking libstdc++ and libgcc statically with GCC | 1717 # In stage 1, default to linking libstdc++ and libgcc statically with GCC |
1610 # if supported. But if the user explicitly specified the libraries to use, | 1718 # if supported. But if the user explicitly specified the libraries to use, |
1611 # trust that they are doing what they want. | 1719 # trust that they are doing what they want. |
1612 if test "$stage1_libs" = "" -a "$have_static_libs" = yes; then | 1720 if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ |
1721 -a "$have_static_libs" = yes; then | |
1613 stage1_ldflags="-static-libstdc++ -static-libgcc" | 1722 stage1_ldflags="-static-libstdc++ -static-libgcc" |
1614 fi]) | 1723 fi]) |
1615 AC_SUBST(stage1_ldflags) | 1724 AC_SUBST(stage1_ldflags) |
1616 | 1725 |
1617 # Libraries to use for stage2 and later builds. | 1726 # Libraries to use for stage2 and later builds. |
2705 ;; | 2814 ;; |
2706 esac | 2815 esac |
2707 CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g` | 2816 CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g` |
2708 INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` | 2817 INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` |
2709 | 2818 |
2819 # gdb depends on gnulib, but as nothing else does, only include it if | |
2820 # gdb is built. | |
2821 if echo " ${configdirs} " | grep " gdb " > /dev/null 2>&1 ; then | |
2822 # The Makefile provides the ordering, so it's enough here to add | |
2823 # gnulib to the list. | |
2824 configdirs="${configdirs} gnulib" | |
2825 fi | |
2826 | |
2710 # Strip out unwanted targets. | 2827 # Strip out unwanted targets. |
2711 | 2828 |
2712 # While at that, we remove Makefiles if we were started for recursive | 2829 # While at that, we remove Makefiles if we were started for recursive |
2713 # configuration, so that the top-level Makefile reconfigures them, | 2830 # configuration, so that the top-level Makefile reconfigures them, |
2714 # like we used to do when configure itself was recursive. | 2831 # like we used to do when configure itself was recursive. |
3233 AC_SUBST(CXXFLAGS_FOR_BUILD) | 3350 AC_SUBST(CXXFLAGS_FOR_BUILD) |
3234 AC_SUBST(CXX_FOR_BUILD) | 3351 AC_SUBST(CXX_FOR_BUILD) |
3235 AC_SUBST(DLLTOOL_FOR_BUILD) | 3352 AC_SUBST(DLLTOOL_FOR_BUILD) |
3236 AC_SUBST(GFORTRAN_FOR_BUILD) | 3353 AC_SUBST(GFORTRAN_FOR_BUILD) |
3237 AC_SUBST(GOC_FOR_BUILD) | 3354 AC_SUBST(GOC_FOR_BUILD) |
3355 AC_SUBST(GDC_FOR_BUILD) | |
3238 AC_SUBST(LDFLAGS_FOR_BUILD) | 3356 AC_SUBST(LDFLAGS_FOR_BUILD) |
3239 AC_SUBST(LD_FOR_BUILD) | 3357 AC_SUBST(LD_FOR_BUILD) |
3240 AC_SUBST(NM_FOR_BUILD) | 3358 AC_SUBST(NM_FOR_BUILD) |
3241 AC_SUBST(RANLIB_FOR_BUILD) | 3359 AC_SUBST(RANLIB_FOR_BUILD) |
3242 AC_SUBST(WINDMC_FOR_BUILD) | 3360 AC_SUBST(WINDMC_FOR_BUILD) |
3318 NCN_STRICT_CHECK_TOOLS(STRIP, strip, true) | 3436 NCN_STRICT_CHECK_TOOLS(STRIP, strip, true) |
3319 NCN_STRICT_CHECK_TOOLS(WINDRES, windres) | 3437 NCN_STRICT_CHECK_TOOLS(WINDRES, windres) |
3320 NCN_STRICT_CHECK_TOOLS(WINDMC, windmc) | 3438 NCN_STRICT_CHECK_TOOLS(WINDMC, windmc) |
3321 NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy) | 3439 NCN_STRICT_CHECK_TOOLS(OBJCOPY, objcopy) |
3322 NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump) | 3440 NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump) |
3441 NCN_STRICT_CHECK_TOOLS(OTOOL, otool) | |
3323 NCN_STRICT_CHECK_TOOLS(READELF, readelf) | 3442 NCN_STRICT_CHECK_TOOLS(READELF, readelf) |
3324 AC_SUBST(CC) | 3443 AC_SUBST(CC) |
3325 AC_SUBST(CXX) | 3444 AC_SUBST(CXX) |
3326 AC_SUBST(CFLAGS) | 3445 AC_SUBST(CFLAGS) |
3327 AC_SUBST(CXXFLAGS) | 3446 AC_SUBST(CXXFLAGS) |
3342 NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc) | 3461 NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc) |
3343 NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx) | 3462 NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx) |
3344 NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET}) | 3463 NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET}) |
3345 NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran) | 3464 NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran) |
3346 NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo) | 3465 NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo) |
3466 NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc) | |
3347 | 3467 |
3348 ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar) | 3468 ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar) |
3349 ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as) | 3469 ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as) |
3350 ACX_CHECK_INSTALLED_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool) | 3470 ACX_CHECK_INSTALLED_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool) |
3351 ACX_CHECK_INSTALLED_TARGET_TOOL(LD_FOR_TARGET, ld) | 3471 ACX_CHECK_INSTALLED_TARGET_TOOL(LD_FOR_TARGET, ld) |
3352 ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo) | 3472 ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo) |
3353 ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm) | 3473 ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm) |
3354 ACX_CHECK_INSTALLED_TARGET_TOOL(OBJCOPY_FOR_TARGET, objcopy) | 3474 ACX_CHECK_INSTALLED_TARGET_TOOL(OBJCOPY_FOR_TARGET, objcopy) |
3355 ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump) | 3475 ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump) |
3476 ACX_CHECK_INSTALLED_TARGET_TOOL(OTOOL_FOR_TARGET, otool) | |
3356 ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib) | 3477 ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib) |
3357 ACX_CHECK_INSTALLED_TARGET_TOOL(READELF_FOR_TARGET, readelf) | 3478 ACX_CHECK_INSTALLED_TARGET_TOOL(READELF_FOR_TARGET, readelf) |
3358 ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip) | 3479 ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip) |
3359 ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres) | 3480 ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres) |
3360 ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc) | 3481 ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc) |
3375 GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/]) | 3496 GCC_TARGET_TOOL(gcc, GCC_FOR_TARGET, , [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/]) |
3376 GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN, | 3497 GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN, |
3377 [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran) | 3498 [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran) |
3378 GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC, | 3499 GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC, |
3379 [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go) | 3500 [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go) |
3501 GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC, | |
3502 [gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d) | |
3380 GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new]) | 3503 GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new]) |
3381 GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO) | 3504 GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO) |
3382 GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new]) | 3505 GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new]) |
3383 GCC_TARGET_TOOL(objcopy, OBJCOPY_FOR_TARGET, OBJCOPY, [binutils/objcopy]) | 3506 GCC_TARGET_TOOL(objcopy, OBJCOPY_FOR_TARGET, OBJCOPY, [binutils/objcopy]) |
3384 GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump]) | 3507 GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump]) |
3508 GCC_TARGET_TOOL(otool, OTOOL_FOR_TARGET, OTOOL) | |
3385 GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib]) | 3509 GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib]) |
3386 GCC_TARGET_TOOL(readelf, READELF_FOR_TARGET, READELF, [binutils/readelf]) | 3510 GCC_TARGET_TOOL(readelf, READELF_FOR_TARGET, READELF, [binutils/readelf]) |
3387 GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip-new]) | 3511 GCC_TARGET_TOOL(strip, STRIP_FOR_TARGET, STRIP, [binutils/strip-new]) |
3388 GCC_TARGET_TOOL(windres, WINDRES_FOR_TARGET, WINDRES, [binutils/windres]) | 3512 GCC_TARGET_TOOL(windres, WINDRES_FOR_TARGET, WINDRES, [binutils/windres]) |
3389 GCC_TARGET_TOOL(windmc, WINDMC_FOR_TARGET, WINDMC, [binutils/windmc]) | 3513 GCC_TARGET_TOOL(windmc, WINDMC_FOR_TARGET, WINDMC, [binutils/windmc]) |
3502 # Specify what files to not compare during bootstrap. | 3626 # Specify what files to not compare during bootstrap. |
3503 | 3627 |
3504 compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" | 3628 compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" |
3505 case "$target" in | 3629 case "$target" in |
3506 hppa*64*-*-hpux*) ;; | 3630 hppa*64*-*-hpux*) ;; |
3507 hppa*-*-hpux*) compare_exclusions="gcc/cc*-checksum\$(objext) | */libgcc/lib2funcs* | gcc/ada/*tools/* | gcc/function-tests.o" ;; | 3631 hppa*-*-hpux*) compare_exclusions="$compare_exclusions | */libgcc/lib2funcs* | gcc/function-tests.o" ;; |
3508 powerpc*-ibm-aix*) compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/* | *libgomp*\$(objext)" ;; | 3632 powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;; |
3509 esac | 3633 esac |
3510 AC_SUBST(compare_exclusions) | 3634 AC_SUBST(compare_exclusions) |
3511 | 3635 |
3512 AC_CONFIG_FILES([Makefile], | 3636 AC_CONFIG_FILES([Makefile], |
3513 [sed "$extrasub_build" Makefile | | 3637 [sed "$extrasub_build" Makefile | |