Mercurial > hg > CbC > CbC_gcc
comparison gcc/configure.ac @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | b7f97abdc517 |
children | 1b10fe6932e1 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 # configure.ac for GCC | 1 # configure.ac for GCC |
2 # Process this file with autoconf to generate a configuration script. | 2 # Process this file with autoconf to generate a configuration script. |
3 | 3 |
4 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | 4 # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
5 # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 5 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
6 | 6 |
7 #This file is part of GCC. | 7 #This file is part of GCC. |
8 | 8 |
9 #GCC is free software; you can redistribute it and/or modify it under | 9 #GCC is free software; you can redistribute it and/or modify it under |
10 #the terms of the GNU General Public License as published by the Free | 10 #the terms of the GNU General Public License as published by the Free |
301 # ------------------------- | 301 # ------------------------- |
302 | 302 |
303 AC_USE_SYSTEM_EXTENSIONS | 303 AC_USE_SYSTEM_EXTENSIONS |
304 AC_PROG_CPP | 304 AC_PROG_CPP |
305 AC_C_INLINE | 305 AC_C_INLINE |
306 | |
307 AC_SYS_LARGEFILE | |
306 | 308 |
307 # sizeof(char) is 1 by definition. | 309 # sizeof(char) is 1 by definition. |
308 AC_CHECK_SIZEOF(void *) | 310 AC_CHECK_SIZEOF(void *) |
309 AC_CHECK_SIZEOF(short) | 311 AC_CHECK_SIZEOF(short) |
310 AC_CHECK_SIZEOF(int) | 312 AC_CHECK_SIZEOF(int) |
585 AC_ARG_ENABLE(build-with-cxx, | 587 AC_ARG_ENABLE(build-with-cxx, |
586 [ --enable-build-with-cxx build with C++ compiler instead of C compiler], | 588 [ --enable-build-with-cxx build with C++ compiler instead of C compiler], |
587 ENABLE_BUILD_WITH_CXX=$enableval, | 589 ENABLE_BUILD_WITH_CXX=$enableval, |
588 ENABLE_BUILD_WITH_CXX=no) | 590 ENABLE_BUILD_WITH_CXX=no) |
589 AC_SUBST(ENABLE_BUILD_WITH_CXX) | 591 AC_SUBST(ENABLE_BUILD_WITH_CXX) |
592 if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then | |
593 AC_DEFINE(ENABLE_BUILD_WITH_CXX, 1, | |
594 [Define if building with C++.]) | |
595 fi | |
590 | 596 |
591 # With stabs | 597 # With stabs |
592 AC_ARG_WITH(stabs, | 598 AC_ARG_WITH(stabs, |
593 [ --with-stabs arrange to use stabs instead of host debug format], | 599 [ --with-stabs arrange to use stabs instead of host debug format], |
594 stabs="$with_stabs", | 600 stabs="$with_stabs", |
604 AC_ARG_ENABLE(__cxa_atexit, | 610 AC_ARG_ENABLE(__cxa_atexit, |
605 [ --enable-__cxa_atexit enable __cxa_atexit for C++], | 611 [ --enable-__cxa_atexit enable __cxa_atexit for C++], |
606 [], []) | 612 [], []) |
607 | 613 |
608 # Enable C extension for decimal float if target supports it. | 614 # Enable C extension for decimal float if target supports it. |
609 AC_ARG_ENABLE(decimal-float, | 615 GCC_AC_ENABLE_DECIMAL_FLOAT([$target]) |
610 [ --enable-decimal-float={no,yes,bid,dpd} | |
611 enable decimal float extension to C. Selecting 'bid' | |
612 or 'dpd' choses which decimal floating point format | |
613 to use], | |
614 [ | |
615 case $enable_decimal_float in | |
616 yes | no | bid | dpd) ;; | |
617 *) AC_MSG_ERROR(['$enable_decimal_float' is an invalid value for --enable-decimal-float. | |
618 Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;; | |
619 esac | |
620 ], | |
621 [ | |
622 case $target in | |
623 powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*) | |
624 enable_decimal_float=yes | |
625 ;; | |
626 *) | |
627 AC_MSG_WARN(decimal float is not supported for this target, ignored) | |
628 enable_decimal_float=no | |
629 ;; | |
630 esac | |
631 ]) | |
632 | 616 |
633 dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi` | 617 dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi` |
634 AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_FLOAT, $dfp, | 618 AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_FLOAT, $dfp, |
635 [Define to 1 to enable decimal float extension to C.]) | 619 [Define to 1 to enable decimal float extension to C.]) |
636 | 620 |
637 # x86's use BID format instead of DPD | 621 # Use default_decimal_float for dependency. |
638 case x$enable_decimal_float in | 622 enable_decimal_float=$default_decimal_float |
639 xyes) | |
640 case $target in | |
641 i?86*-*-linux* | x86_64*-*-linux*) | |
642 enable_decimal_float=bid | |
643 ;; | |
644 *) | |
645 enable_decimal_float=dpd | |
646 ;; | |
647 esac | |
648 ;; | |
649 xno) | |
650 # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper | |
651 # dependency on libdecnumber. | |
652 enable_decimal_float=dpd | |
653 ;; | |
654 esac | |
655 AC_SUBST(enable_decimal_float) | |
656 | 623 |
657 bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi` | 624 bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi` |
658 AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_BID_FORMAT, $bid, | 625 AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_BID_FORMAT, $bid, |
659 [Define to 1 to specify that we are using the BID decimal floating | 626 [Define to 1 to specify that we are using the BID decimal floating |
660 point format instead of DPD]) | 627 point format instead of DPD]) |
667 [ | 634 [ |
668 case $target in | 635 case $target in |
669 mips*-*-*) | 636 mips*-*-*) |
670 case $host in | 637 case $host in |
671 mips*-sgi-irix*) | 638 mips*-sgi-irix*) |
672 AC_MSG_WARN(fixed-point is not supported on IRIX, ignored) | 639 AC_MSG_WARN([fixed-point is not supported on IRIX, ignored]) |
673 enable_fixed_point=no | 640 enable_fixed_point=no |
674 ;; | 641 ;; |
675 *) | 642 *) |
676 enable_fixed_point=yes | 643 enable_fixed_point=yes |
677 ;; | 644 ;; |
678 esac | 645 esac |
679 ;; | 646 ;; |
680 *) | 647 *) |
681 AC_MSG_WARN(fixed-point is not supported for this target, ignored) | 648 AC_MSG_WARN([fixed-point is not supported for this target, ignored]) |
682 enable_fixed_point=no | 649 enable_fixed_point=no |
683 ;; | 650 ;; |
684 esac | 651 esac |
685 ]) | 652 ]) |
686 AC_SUBST(enable_fixed_point) | 653 AC_SUBST(enable_fixed_point) |
791 [CONFIGURE_SPECS=$withval], | 758 [CONFIGURE_SPECS=$withval], |
792 [CONFIGURE_SPECS=] | 759 [CONFIGURE_SPECS=] |
793 ) | 760 ) |
794 AC_SUBST(CONFIGURE_SPECS) | 761 AC_SUBST(CONFIGURE_SPECS) |
795 | 762 |
796 # Build with intermodule optimisations | |
797 AC_ARG_ENABLE(intermodule, | |
798 [ --enable-intermodule build the compiler in one step], | |
799 [case ${enable_intermodule} in | |
800 yes) onestep="-onestep";; | |
801 *) onestep="";; | |
802 esac], | |
803 [onestep=""]) | |
804 AC_SUBST(onestep) | |
805 | |
806 ACX_PKGVERSION([GCC]) | 763 ACX_PKGVERSION([GCC]) |
807 ACX_BUGURL([http://gcc.gnu.org/bugs.html]) | 764 ACX_BUGURL([http://gcc.gnu.org/bugs.html]) |
808 | 765 |
809 # Sanity check enable_languages in case someone does not run the toplevel | 766 # Sanity check enable_languages in case someone does not run the toplevel |
810 # configure # script. | 767 # configure # script. |
911 # check for build == host before using them. | 868 # check for build == host before using them. |
912 | 869 |
913 # NM | 870 # NM |
914 if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ | 871 if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
915 && test -d ../binutils ; then | 872 && test -d ../binutils ; then |
916 NM='$(objdir)/../binutils/nm-new' | 873 NM='${objdir}/../binutils/nm-new' |
917 else | 874 else |
918 AC_CHECK_PROG(NM, nm, nm, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm) | 875 AC_CHECK_PROG(NM, nm, nm, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm) |
919 fi | 876 fi |
920 | 877 |
921 # AR | 878 # AR |
922 if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ | 879 if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
923 && test -d ../binutils ; then | 880 && test -d ../binutils ; then |
924 AR='$(objdir)/../binutils/ar' | 881 AR='${objdir}/../binutils/ar' |
925 else | 882 else |
926 AC_CHECK_PROG(AR, ar, ar, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar) | 883 AC_CHECK_PROG(AR, ar, ar, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar) |
927 fi | 884 fi |
928 | 885 |
929 | 886 |
949 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=]) | 906 AC_CHECK_HEADER(pthread.h, [have_pthread_h=yes], [have_pthread_h=]) |
950 | 907 |
951 # These tests can't be done till we know if we have limits.h. | 908 # These tests can't be done till we know if we have limits.h. |
952 gcc_AC_C_CHAR_BIT | 909 gcc_AC_C_CHAR_BIT |
953 AC_C_BIGENDIAN | 910 AC_C_BIGENDIAN |
911 | |
912 # ---------------------- | |
913 # Checks for C++ headers | |
914 # ---------------------- | |
915 | |
916 dnl Autoconf will give an error in the configure script if there is no | |
917 dnl C++ preprocessor. Hack to prevent that. | |
918 m4_pushdef([AC_MSG_ERROR], m4_defn([AC_MSG_WARN]))[]dnl | |
919 AC_PROG_CXXCPP | |
920 m4_popdef([AC_MSG_ERROR])[]dnl | |
921 | |
922 AC_LANG_PUSH(C++) | |
923 | |
924 AC_CHECK_HEADERS(unordered_map) | |
925 AC_CHECK_HEADERS(tr1/unordered_map) | |
926 AC_CHECK_HEADERS(ext/hash_map) | |
927 | |
928 AC_LANG_POP(C++) | |
954 | 929 |
955 # -------- | 930 # -------- |
956 # UNSORTED | 931 # UNSORTED |
957 # -------- | 932 # -------- |
958 | 933 |
1019 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl | 994 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl |
1020 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl | 995 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl |
1021 putchar_unlocked putc_unlocked) | 996 putchar_unlocked putc_unlocked) |
1022 AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \ | 997 AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \ |
1023 sysconf strsignal getrusage nl_langinfo \ | 998 sysconf strsignal getrusage nl_langinfo \ |
1024 gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | 999 gettimeofday mbstowcs wcswidth mmap setlocale \ |
1025 gcc_UNLOCKED_FUNCS) | 1000 gcc_UNLOCKED_FUNCS) |
1026 | |
1027 save_CPPFLAGS="$CPPFLAGS" | |
1028 save_LIBS="$LIBS" | |
1029 LIBS="$LIBS $LIBELFLIBS" | |
1030 AC_CHECK_FUNCS(elf_getshdrstrndx,, | |
1031 [AC_CHECK_FUNCS(elf_getshstrndx, | |
1032 [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h> | |
1033 #include <libelf.h> | |
1034 int main() | |
1035 { | |
1036 return elf_getshstrndx (NULL, 0) == 0; | |
1037 }]])], AC_DEFINE(HAVE_ELF_GETSHSTRNDX_GABI, 1, | |
1038 [Define if elf_getshstrndx has gABI conformant return values.]))])] | |
1039 ) | |
1040 LIBS="$save_LIBS" | |
1041 CPPFLAGS="$save_CPPFLAGS" | |
1042 | 1001 |
1043 if test x$ac_cv_func_mbstowcs = xyes; then | 1002 if test x$ac_cv_func_mbstowcs = xyes; then |
1044 AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works, | 1003 AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works, |
1045 [ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h> | 1004 [ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h> |
1046 int main() | 1005 int main() |
1443 for this architecture.]) | 1402 for this architecture.]) |
1444 fi | 1403 fi |
1445 | 1404 |
1446 # Convert extra_options into a form suitable for Makefile use. | 1405 # Convert extra_options into a form suitable for Makefile use. |
1447 extra_opt_files= | 1406 extra_opt_files= |
1407 all_opt_files= | |
1448 for f in $extra_options; do | 1408 for f in $extra_options; do |
1449 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | 1409 extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" |
1410 all_opt_files="$all_opt_files $srcdir/config/$f" | |
1450 done | 1411 done |
1451 AC_SUBST(extra_opt_files) | 1412 AC_SUBST(extra_opt_files) |
1452 | 1413 |
1453 # auto-host.h is the file containing items generated by autoconf and is | 1414 # auto-host.h is the file containing items generated by autoconf and is |
1454 # the first file included by config.h. | 1415 # the first file included by config.h. |
1578 | 1539 |
1579 AC_ARG_ENABLE(cld, | 1540 AC_ARG_ENABLE(cld, |
1580 [ --enable-cld enable -mcld by default for 32bit x86], [], | 1541 [ --enable-cld enable -mcld by default for 32bit x86], [], |
1581 [enable_cld=no]) | 1542 [enable_cld=no]) |
1582 | 1543 |
1544 AC_ARG_ENABLE(frame-pointer, | |
1545 [ --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86], [], | |
1546 [ | |
1547 case $target_os in | |
1548 linux* | darwin[[8912]]*) | |
1549 # Enable -fomit-frame-pointer by default for Linux and Darwin with | |
1550 # DWARF2. | |
1551 enable_frame_pointer=no | |
1552 ;; | |
1553 *) | |
1554 enable_frame_pointer=yes | |
1555 ;; | |
1556 esac | |
1557 ]) | |
1558 | |
1583 # Windows32 Registry support for specifying GCC installation paths. | 1559 # Windows32 Registry support for specifying GCC installation paths. |
1584 AC_ARG_ENABLE(win32-registry, | 1560 AC_ARG_ENABLE(win32-registry, |
1585 [ --disable-win32-registry | 1561 [ --disable-win32-registry |
1586 disable lookup of installation paths in the | 1562 disable lookup of installation paths in the |
1587 Registry on Windows hosts | 1563 Registry on Windows hosts |
1641 tmake_file="${tmake_file_}" | 1617 tmake_file="${tmake_file_}" |
1642 | 1618 |
1643 out_object_file=`basename $out_file .c`.o | 1619 out_object_file=`basename $out_file .c`.o |
1644 | 1620 |
1645 tm_file_list="options.h" | 1621 tm_file_list="options.h" |
1646 tm_include_list="options.h" | 1622 tm_include_list="options.h insn-constants.h" |
1647 for f in $tm_file; do | 1623 for f in $tm_file; do |
1648 case $f in | 1624 case $f in |
1649 ./* ) | 1625 ./* ) |
1650 f=`echo $f | sed 's/^..//'` | 1626 f=`echo $f | sed 's/^..//'` |
1651 tm_file_list="${tm_file_list} $f" | 1627 tm_file_list="${tm_file_list} $f" |
1771 | 1747 |
1772 i?86-*-*,x86_64-*-* \ | 1748 i?86-*-*,x86_64-*-* \ |
1773 | powerpc*-*-*,powerpc64*-*-*) | 1749 | powerpc*-*-*,powerpc64*-*-*) |
1774 CROSS="$CROSS -DNATIVE_CROSS" ;; | 1750 CROSS="$CROSS -DNATIVE_CROSS" ;; |
1775 esac | 1751 esac |
1752 | |
1753 case $target in | |
1754 *-*-mingw*) | |
1755 if test "x$with_headers" = x; then | |
1756 with_headers=yes | |
1757 fi | |
1758 ;; | |
1759 *) | |
1760 ;; | |
1761 esac | |
1776 elif test "x$TARGET_SYSTEM_ROOT" != x; then | 1762 elif test "x$TARGET_SYSTEM_ROOT" != x; then |
1777 SYSTEM_HEADER_DIR=$build_system_header_dir | 1763 SYSTEM_HEADER_DIR=$build_system_header_dir |
1778 fi | 1764 fi |
1779 | 1765 |
1780 # If this is a cross-compiler that does not | 1766 # If this is a cross-compiler that does not |
1843 ;; | 1829 ;; |
1844 esac | 1830 esac |
1845 ;; | 1831 ;; |
1846 esac | 1832 esac |
1847 | 1833 |
1834 AC_DEFINE_UNQUOTED(LTOPLUGINSONAME,"${host_lto_plugin_soname}", | |
1835 [Define to the name of the LTO plugin DSO that must be | |
1836 passed to the linker's -plugin=LIB option.]) | |
1837 | |
1848 # --------------------------- | 1838 # --------------------------- |
1849 # Assembler & linker features | 1839 # Assembler & linker features |
1850 # --------------------------- | 1840 # --------------------------- |
1851 | 1841 |
1852 # During stage 2, ld is actually gcc/collect-ld, which is a small script to | 1842 # During stage 2, ld is actually gcc/collect-ld, which is a small script to |
1884 && test x$build = x$host; then | 1874 && test x$build = x$host; then |
1885 gcc_cv_as=../gas/as-new$build_exeext | 1875 gcc_cv_as=../gas/as-new$build_exeext |
1886 elif test -x as$build_exeext; then | 1876 elif test -x as$build_exeext; then |
1887 # Build using assembler in the current directory. | 1877 # Build using assembler in the current directory. |
1888 gcc_cv_as=./as$build_exeext | 1878 gcc_cv_as=./as$build_exeext |
1889 elif test -x $AS_FOR_TARGET; then | 1879 elif ( set dummy $AS_FOR_TARGET; test -x $[2] ); then |
1890 gcc_cv_as="$AS_FOR_TARGET" | 1880 gcc_cv_as="$AS_FOR_TARGET" |
1891 else | 1881 else |
1892 AC_PATH_PROG(gcc_cv_as, $AS_FOR_TARGET) | 1882 AC_PATH_PROG(gcc_cv_as, $AS_FOR_TARGET) |
1893 fi]) | 1883 fi]) |
1894 | 1884 |
1939 && test x$build = x$host; then | 1929 && test x$build = x$host; then |
1940 gcc_cv_ld=../ld/ld-new$build_exeext | 1930 gcc_cv_ld=../ld/ld-new$build_exeext |
1941 elif test -x collect-ld$build_exeext; then | 1931 elif test -x collect-ld$build_exeext; then |
1942 # Build using linker in the current directory. | 1932 # Build using linker in the current directory. |
1943 gcc_cv_ld=./collect-ld$build_exeext | 1933 gcc_cv_ld=./collect-ld$build_exeext |
1944 elif test -x $LD_FOR_TARGET; then | 1934 elif ( set dummy $LD_FOR_TARGET; test -x $[2] ); then |
1945 gcc_cv_ld="$LD_FOR_TARGET" | 1935 gcc_cv_ld="$LD_FOR_TARGET" |
1946 else | 1936 else |
1947 AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET) | 1937 AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET) |
1948 fi]) | 1938 fi]) |
1949 | 1939 |
2012 && test -f ../binutils/Makefile \ | 2002 && test -f ../binutils/Makefile \ |
2013 && test x$build = x$host; then | 2003 && test x$build = x$host; then |
2014 gcc_cv_nm=../binutils/nm-new$build_exeext | 2004 gcc_cv_nm=../binutils/nm-new$build_exeext |
2015 elif test -x nm$build_exeext; then | 2005 elif test -x nm$build_exeext; then |
2016 gcc_cv_nm=./nm$build_exeext | 2006 gcc_cv_nm=./nm$build_exeext |
2017 elif test -x $NM_FOR_TARGET; then | 2007 elif ( set dummy $NM_FOR_TARGET; test -x $[2] ); then |
2018 gcc_cv_nm="$NM_FOR_TARGET" | 2008 gcc_cv_nm="$NM_FOR_TARGET" |
2019 else | 2009 else |
2020 AC_PATH_PROG(gcc_cv_nm, $NM_FOR_TARGET) | 2010 AC_PATH_PROG(gcc_cv_nm, $NM_FOR_TARGET) |
2021 fi]) | 2011 fi]) |
2022 | 2012 |
2045 && test x$build = x$host; then | 2035 && test x$build = x$host; then |
2046 # Single tree build which includes binutils. | 2036 # Single tree build which includes binutils. |
2047 gcc_cv_objdump=../binutils/objdump$build_exeext | 2037 gcc_cv_objdump=../binutils/objdump$build_exeext |
2048 elif test -x objdump$build_exeext; then | 2038 elif test -x objdump$build_exeext; then |
2049 gcc_cv_objdump=./objdump$build_exeext | 2039 gcc_cv_objdump=./objdump$build_exeext |
2050 elif test -x $OBJDUMP_FOR_TARGET; then | 2040 elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $[2] ); then |
2051 gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | 2041 gcc_cv_objdump="$OBJDUMP_FOR_TARGET" |
2052 else | 2042 else |
2053 AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET) | 2043 AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET) |
2054 fi]) | 2044 fi]) |
2055 | 2045 |
2180 *) | 2170 *) |
2181 gcc_cv_as_hidden=yes | 2171 gcc_cv_as_hidden=yes |
2182 ;; | 2172 ;; |
2183 esac]) | 2173 esac]) |
2184 | 2174 |
2175 # gnu_indirect_function type is an extension proposed at | |
2176 # http://groups.google/com/group/generic-abi/files. It allows dynamic runtime | |
2177 # selection of function implementation | |
2178 AC_ARG_ENABLE(gnu-indirect-function, | |
2179 [AS_HELP_STRING([--enable-gnu-indirect-function], | |
2180 [enable the use of the @gnu_indirect_function to glibc systems])], | |
2181 [case $enable_gnu_indirect_function in | |
2182 yes | no) ;; | |
2183 *) AC_MSG_ERROR(['$enable_gnu_indirect_function' is an invalid value for --enable-gnu-indirect-function. | |
2184 Valid choices are 'yes' and 'no'.]) ;; | |
2185 esac], | |
2186 [enable_gnu_indirect_function="$default_gnu_indirect_function"]) | |
2187 if test x$enable_gnu_indirect_function = xyes; then | |
2188 AC_DEFINE(HAVE_GNU_INDIRECT_FUNCTION, 1, | |
2189 [Define if your system supports gnu indirect functions.]) | |
2190 fi | |
2191 | |
2185 changequote(,)dnl | 2192 changequote(,)dnl |
2186 if test $in_tree_ld != yes ; then | 2193 if test $in_tree_ld != yes ; then |
2187 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` | 2194 ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
2188 if test x"$ld_is_gold" = xyes; then | 2195 if test x"$ld_is_gold" = xyes; then |
2189 gcc_cv_ld_hidden=yes | 2196 gcc_cv_ld_hidden=yes |
2249 fi | 2256 fi |
2250 else | 2257 else |
2251 case "${target}" in | 2258 case "${target}" in |
2252 hppa64*-*-hpux* | ia64*-*-hpux*) | 2259 hppa64*-*-hpux* | ia64*-*-hpux*) |
2253 gcc_cv_ld_hidden=yes | 2260 gcc_cv_ld_hidden=yes |
2261 ;; | |
2262 *-*-solaris2.8*) | |
2263 # .hidden support was backported to Solaris 8, starting with ld | |
2264 # version 1.276. | |
2265 if test "$ld_vers_minor" -ge 276; then | |
2266 gcc_cv_ld_hidden=yes | |
2267 else | |
2268 gcc_cv_ld_hidden=no | |
2269 fi | |
2254 ;; | 2270 ;; |
2255 *-*-solaris2.9* | *-*-solaris2.1[0-9]*) | 2271 *-*-solaris2.9* | *-*-solaris2.1[0-9]*) |
2256 # Support for .hidden in Sun ld appeared in Solaris 9 FCS, but | 2272 # Support for .hidden in Sun ld appeared in Solaris 9 FCS, but |
2257 # .symbolic was only added in Solaris 9 12/02. | 2273 # .symbolic was only added in Solaris 9 12/02. |
2258 gcc_cv_ld_hidden=yes | 2274 gcc_cv_ld_hidden=yes |
2388 ;; | 2404 ;; |
2389 *-*-*) | 2405 *-*-*) |
2390 gcc_cv_as_cfi_directive=yes | 2406 gcc_cv_as_cfi_directive=yes |
2391 ;; | 2407 ;; |
2392 esac]) | 2408 esac]) |
2393 if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_readelf != x; then | 2409 if test $gcc_cv_as_cfi_directive = yes && test x$gcc_cv_objdump != x; then |
2394 gcc_GAS_CHECK_FEATURE([working cfi advance], gcc_cv_as_cfi_advance_working, | 2410 gcc_GAS_CHECK_FEATURE([working cfi advance], gcc_cv_as_cfi_advance_working, |
2395 ,, | 2411 ,, |
2396 [ .text | 2412 [ .text |
2397 .cfi_startproc | 2413 .cfi_startproc |
2398 .cfi_adjust_cfa_offset 64 | 2414 .cfi_adjust_cfa_offset 64 |
2399 .skip 75040, 0 | 2415 .skip 75040, 0 |
2400 .cfi_adjust_cfa_offset 128 | 2416 .cfi_adjust_cfa_offset 128 |
2401 .cfi_endproc], | 2417 .cfi_endproc], |
2402 [[ | 2418 [[ |
2403 if $gcc_cv_readelf -wf conftest.o 2>/dev/null \ | 2419 if $gcc_cv_objdump -Wf conftest.o 2>/dev/null \ |
2404 | grep 'DW_CFA_advance_loc[24]:[ ][ ]*75040[ ]' >/dev/null; then | 2420 | grep 'DW_CFA_advance_loc[24]:[ ][ ]*75040[ ]' >/dev/null; then |
2405 gcc_cv_as_cfi_advance_working=yes | 2421 gcc_cv_as_cfi_advance_working=yes |
2406 fi | 2422 fi |
2407 ]]) | 2423 ]]) |
2408 else | 2424 else |
2409 # no readelf, err on the side of caution | 2425 # no objdump, err on the side of caution |
2410 gcc_cv_as_cfi_advance_working=no | 2426 gcc_cv_as_cfi_advance_working=no |
2411 fi | 2427 fi |
2428 GCC_TARGET_TEMPLATE(HAVE_GAS_CFI_DIRECTIVE) | |
2412 AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_DIRECTIVE, | 2429 AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_DIRECTIVE, |
2413 [`if test $gcc_cv_as_cfi_directive = yes \ | 2430 [`if test $gcc_cv_as_cfi_directive = yes \ |
2414 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`], | 2431 && test $gcc_cv_as_cfi_advance_working = yes; then echo 1; else echo 0; fi`], |
2415 [Define 0/1 if your assembler supports CFI directives.]) | 2432 [Define 0/1 if your assembler supports CFI directives.]) |
2416 | 2433 |
2434 GCC_TARGET_TEMPLATE(HAVE_GAS_CFI_PERSONALITY_DIRECTIVE) | |
2417 gcc_GAS_CHECK_FEATURE([cfi personality directive], | 2435 gcc_GAS_CHECK_FEATURE([cfi personality directive], |
2418 gcc_cv_as_cfi_personality_directive, ,, | 2436 gcc_cv_as_cfi_personality_directive, ,, |
2419 [ .text | 2437 [ .text |
2420 .cfi_startproc | 2438 .cfi_startproc |
2421 .cfi_personality 0, symbol | 2439 .cfi_personality 0, symbol |
2428 gcc_GAS_CHECK_FEATURE([cfi sections directive], | 2446 gcc_GAS_CHECK_FEATURE([cfi sections directive], |
2429 gcc_cv_as_cfi_sections_directive, ,, | 2447 gcc_cv_as_cfi_sections_directive, ,, |
2430 [ .text | 2448 [ .text |
2431 .cfi_sections .debug_frame, .eh_frame | 2449 .cfi_sections .debug_frame, .eh_frame |
2432 .cfi_startproc | 2450 .cfi_startproc |
2433 .cfi_endproc]) | 2451 .cfi_endproc], |
2452 [case $target_os in | |
2453 win32 | pe | cygwin* | mingw32* | uwin*) | |
2454 # Need to check that we generated the correct relocation for the | |
2455 # .debug_frame section. This was fixed for binutils 2.21. | |
2456 gcc_cv_as_cfi_sections_directive=no | |
2457 if test "x$gcc_cv_objdump" != x; then | |
2458 if $gcc_cv_objdump -j .debug_frame -r conftest.o 2>/dev/null | \ | |
2459 grep secrel > /dev/null; then | |
2460 gcc_cv_as_cfi_sections_directive=yes | |
2461 fi | |
2462 fi | |
2463 ;; | |
2464 *) | |
2465 gcc_cv_as_cfi_sections_directive=yes | |
2466 ;; | |
2467 esac]) | |
2468 GCC_TARGET_TEMPLATE(HAVE_GAS_CFI_SECTIONS_DIRECTIVE) | |
2434 AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_SECTIONS_DIRECTIVE, | 2469 AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_SECTIONS_DIRECTIVE, |
2435 [`if test $gcc_cv_as_cfi_sections_directive = yes; | 2470 [`if test $gcc_cv_as_cfi_sections_directive = yes; |
2436 then echo 1; else echo 0; fi`], | 2471 then echo 1; else echo 0; fi`], |
2437 [Define 0/1 if your assembler supports .cfi_sections.]) | 2472 [Define 0/1 if your assembler supports .cfi_sections.]) |
2438 | 2473 |
2685 tls_first_major=2 | 2720 tls_first_major=2 |
2686 tls_first_minor=17 | 2721 tls_first_minor=17 |
2687 ;; | 2722 ;; |
2688 i[34567]86-*-*) | 2723 i[34567]86-*-*) |
2689 case "$target" in | 2724 case "$target" in |
2690 i[34567]86-*-solaris2.[89]*) | |
2691 # TLS was introduced in the Solaris 9 4/04 release but | |
2692 # we do not enable it by default on Solaris 9 either. | |
2693 if test "x$enable_tls" = xyes ; then | |
2694 on_solaris=yes | |
2695 else | |
2696 enable_tls=no; | |
2697 fi | |
2698 ;; | |
2699 i[34567]86-*-solaris2.*) | 2725 i[34567]86-*-solaris2.*) |
2700 on_solaris=yes | 2726 on_solaris=yes |
2727 tga_func=___tls_get_addr | |
2701 ;; | 2728 ;; |
2702 *) | 2729 *) |
2703 on_solaris=no | 2730 on_solaris=no |
2704 ;; | 2731 ;; |
2705 esac | 2732 esac |
2911 tls_first_minor=13 | 2938 tls_first_minor=13 |
2912 tls_as_opt=--fatal-warnings | 2939 tls_as_opt=--fatal-warnings |
2913 ;; | 2940 ;; |
2914 sparc*-*-*) | 2941 sparc*-*-*) |
2915 case "$target" in | 2942 case "$target" in |
2916 sparc*-sun-solaris2.[89]*) | |
2917 # TLS was introduced in the Solaris 9 4/04 release but | |
2918 # we do not enable it by default on Solaris 9 either. | |
2919 if test "x$enable_tls" = xyes ; then | |
2920 on_solaris=yes | |
2921 else | |
2922 enable_tls=no; | |
2923 fi | |
2924 ;; | |
2925 sparc*-sun-solaris2.*) | 2943 sparc*-sun-solaris2.*) |
2926 on_solaris=yes | 2944 on_solaris=yes |
2945 tga_func=__tls_get_addr | |
2927 ;; | 2946 ;; |
2928 *) | 2947 *) |
2929 on_solaris=no | 2948 on_solaris=no |
2930 ;; | 2949 ;; |
2931 esac | 2950 esac |
2932 if test x$on_solaris = xyes && test x$gas_flag = xno; then | 2951 if test x$on_solaris = xyes && test x$gas_flag = xno; then |
2933 conftest_s=' | 2952 conftest_s=' |
2934 .section ".tdata",#alloc,#write,#tls | 2953 .section ".tdata",#alloc,#write,#tls' |
2954 tls_first_major=0 | |
2955 tls_first_minor=0 | |
2956 else | |
2957 conftest_s=' | |
2958 .section ".tdata","awT",@progbits' | |
2959 tls_first_major=2 | |
2960 tls_first_minor=14 | |
2961 tls_as_opt="-32 --fatal-warnings" | |
2962 fi | |
2963 conftest_s="$conftest_s | |
2935 foo: .long 25 | 2964 foo: .long 25 |
2936 .text | 2965 .text |
2937 sethi %tgd_hi22(foo), %o0 | 2966 sethi %tgd_hi22(foo), %o0 |
2938 add %o0, %tgd_lo10(foo), %o1 | 2967 add %o0, %tgd_lo10(foo), %o1 |
2939 add %l7, %o1, %o0, %tgd_add(foo) | 2968 add %l7, %o1, %o0, %tgd_add(foo) |
2949 add %o3, %tie_lo10(foo), %o3 | 2978 add %o3, %tie_lo10(foo), %o3 |
2950 ld [%l7 + %o3], %o2, %tie_ld(foo) | 2979 ld [%l7 + %o3], %o2, %tie_ld(foo) |
2951 add %g7, %o2, %o4, %tie_add(foo) | 2980 add %g7, %o2, %o4, %tie_add(foo) |
2952 sethi %tle_hix22(foo), %l1 | 2981 sethi %tle_hix22(foo), %l1 |
2953 xor %l1, %tle_lox10(foo), %o5 | 2982 xor %l1, %tle_lox10(foo), %o5 |
2954 ld [%g7 + %o5], %o1' | 2983 ld [%g7 + %o5], %o1" |
2955 tls_first_major=0 | |
2956 tls_first_minor=0 | |
2957 else | |
2958 conftest_s=' | |
2959 .section ".tdata","awT",@progbits | |
2960 foo: .long 25 | |
2961 .text | |
2962 sethi %tgd_hi22(foo), %o0 | |
2963 add %o0, %tgd_lo10(foo), %o1 | |
2964 add %l7, %o1, %o0, %tgd_add(foo) | |
2965 call __tls_get_addr, %tgd_call(foo) | |
2966 sethi %tldm_hi22(foo), %l1 | |
2967 add %l1, %tldm_lo10(foo), %l2 | |
2968 add %l7, %l2, %o0, %tldm_add(foo) | |
2969 call __tls_get_addr, %tldm_call(foo) | |
2970 sethi %tldo_hix22(foo), %l3 | |
2971 xor %l3, %tldo_lox10(foo), %l4 | |
2972 add %o0, %l4, %l5, %tldo_add(foo) | |
2973 sethi %tie_hi22(foo), %o3 | |
2974 add %o3, %tie_lo10(foo), %o3 | |
2975 ld [%l7 + %o3], %o2, %tie_ld(foo) | |
2976 add %g7, %o2, %o4, %tie_add(foo) | |
2977 sethi %tle_hix22(foo), %l1 | |
2978 xor %l1, %tle_lox10(foo), %o5 | |
2979 ld [%g7 + %o5], %o1' | |
2980 tls_first_major=2 | |
2981 tls_first_minor=14 | |
2982 tls_as_opt="-32 --fatal-warnings" | |
2983 fi | |
2984 ;; | 2984 ;; |
2985 xtensa*-*-*) | 2985 xtensa*-*-*) |
2986 conftest_s=' | 2986 conftest_s=' |
2987 .section ".tdata","awT",@progbits | 2987 .section ".tdata","awT",@progbits |
2988 foo: .long 25 | 2988 foo: .long 25 |
3005 else | 3005 else |
3006 gcc_GAS_CHECK_FEATURE(thread-local storage support, gcc_cv_as_tls, | 3006 gcc_GAS_CHECK_FEATURE(thread-local storage support, gcc_cv_as_tls, |
3007 [$tls_first_major,$tls_first_minor,0], [$tls_as_opt], [$conftest_s],, | 3007 [$tls_first_major,$tls_first_minor,0], [$tls_as_opt], [$conftest_s],, |
3008 [set_have_as_tls=yes]) | 3008 [set_have_as_tls=yes]) |
3009 fi | 3009 fi |
3010 case "$target" in | |
3011 *-*-irix6*) | |
3012 # IRIX 6.5 rld and libc.so lack TLS support, so even if gas and gld | |
3013 # with TLS support are in use, native TLS cannot work. | |
3014 set_have_as_tls=no | |
3015 ;; | |
3016 *-*-osf*) | |
3017 # Tru64 UNIX loader and libc.so lack TLS support, so even if gas and | |
3018 # gld with TLS support are in use, native TLS cannot work. | |
3019 set_have_as_tls=no | |
3020 ;; | |
3021 # TLS was introduced in the Solaris 9 FCS release and backported to | |
3022 # Solaris 8 patches. Support for GNU-style TLS on x86 was only | |
3023 # introduced in Solaris 9 4/04, replacing the earlier Sun style that Sun | |
3024 # ld and GCC don't support any longer. | |
3025 *-*-solaris2.*) | |
3026 AC_MSG_CHECKING(linker and ld.so.1 TLS support) | |
3027 ld_tls_support=no | |
3028 # Check ld and ld.so.1 TLS support. | |
3029 if echo "$ld_ver" | grep GNU > /dev/null; then | |
3030 # Assume all interesting versions of GNU ld have TLS support. | |
3031 # FIXME: still need ld.so.1 support, i.e. ld version checks below. | |
3032 ld_tls_support=yes | |
3033 else | |
3034 case "$target" in | |
3035 # Solaris 8/x86 ld has GNU style TLS support since version 1.280. | |
3036 i?86-*-solaris2.8) | |
3037 min_tls_ld_vers_minor=280 | |
3038 ;; | |
3039 # Solaris 8/SPARC ld has TLS support since version 1.272. | |
3040 sparc*-*-solaris2.8) | |
3041 min_tls_ld_vers_minor=272 | |
3042 ;; | |
3043 # Solaris 9/x86 ld has GNU style TLS support since version 1.374. | |
3044 i?86-*-solaris2.9) | |
3045 min_tls_ld_vers_minor=374 | |
3046 ;; | |
3047 # Solaris 9/SPARC and Solaris 10+ ld have TLS support since FCS. | |
3048 sparc*-*-solaris2.9 | *-*-solaris2.1[[0-9]]*) | |
3049 min_tls_ld_vers_minor=343 | |
3050 ;; | |
3051 esac | |
3052 if test "$ld_vers_major" -gt 1 || \ | |
3053 test "$ld_vers_minor" -ge "$min_tls_ld_vers_minor"; then | |
3054 ld_tls_support=yes | |
3055 else | |
3056 set_have_as_tls=no | |
3057 fi | |
3058 fi | |
3059 AC_MSG_RESULT($ld_tls_support) | |
3060 | |
3061 save_LIBS="$LIBS" | |
3062 save_LDFLAGS="$LDFLAGS" | |
3063 LIBS= | |
3064 LDFLAGS= | |
3065 | |
3066 AC_MSG_CHECKING(alternate thread library) | |
3067 case "$target" in | |
3068 # TLS support was backported to Solaris 8 patches, but only lives in | |
3069 # the alternate thread library which became the default in Solaris 9. | |
3070 # We want to always use that, irrespective of TLS support. | |
3071 *-*-solaris2.8) | |
3072 # Take multilib subdir into account. There's no spec to handle | |
3073 # this. The 64 symlink exists since Solaris 8. | |
3074 lwp_dir=/usr/lib/lwp | |
3075 lwp_spec="-L$lwp_dir%{m64:/64} -R$lwp_dir%{m64:/64}" | |
3076 LDFLAGS="-L$lwp_dir -R$lwp_dir" | |
3077 ;; | |
3078 *-*-solaris2*) | |
3079 lwp_dir="none" | |
3080 lwp_spec="" | |
3081 ;; | |
3082 esac | |
3083 # Always define LIB_THREAD_LDFLAGS_SPEC, even without TLS support. | |
3084 AC_DEFINE_UNQUOTED(LIB_THREAD_LDFLAGS_SPEC, "$lwp_spec", | |
3085 [Define to the linker flags to use for -pthread.]) | |
3086 AC_MSG_RESULT($lwp_dir) | |
3087 | |
3088 AC_MSG_CHECKING(library containing $tga_func) | |
3089 # Before Solaris 10, __tls_get_addr (SPARC/x64) resp. ___tls_get_addr | |
3090 # (32-bit x86) only lived in libthread, so check for that. Keep | |
3091 # set_have_as_tls if found, disable if not. | |
3092 AC_SEARCH_LIBS([$tga_func], [thread],, [set_have_as_tls=no]) | |
3093 # Clear LIBS if we cannot support TLS. | |
3094 if test $set_have_as_tls = no; then | |
3095 LIBS= | |
3096 fi | |
3097 # Always define LIB_TLS_SPEC, even without TLS support. | |
3098 AC_DEFINE_UNQUOTED(LIB_TLS_SPEC, "$LIBS", | |
3099 [Define to the library containing __tls_get_addr/___tls_get_addr.]) | |
3100 AC_MSG_RESULT($LIBS) | |
3101 | |
3102 LIBS="$save_LIBS" | |
3103 LDFLAGS="$save_LDFLAGS" | |
3104 ;; | |
3105 esac | |
3010 if test $set_have_as_tls = yes ; then | 3106 if test $set_have_as_tls = yes ; then |
3011 AC_DEFINE(HAVE_AS_TLS, 1, | 3107 AC_DEFINE(HAVE_AS_TLS, 1, |
3012 [Define if your assembler supports thread-local storage.]) | 3108 [Define if your assembler and linker support thread-local storage.]) |
3013 fi | 3109 fi |
3014 | 3110 |
3015 # Target-specific assembler checks. | 3111 # Target-specific assembler checks. |
3016 | 3112 |
3017 AC_MSG_CHECKING(linker -Bstatic/-Bdynamic option) | 3113 AC_MSG_CHECKING(linker -Bstatic/-Bdynamic option) |
3018 gcc_cv_ld_static_dynamic=no | 3114 gcc_cv_ld_static_dynamic=no |
3115 gcc_cv_ld_static_option='-Bstatic' | |
3116 gcc_cv_ld_dynamic_option='-Bdynamic' | |
3019 if test $in_tree_ld = yes ; then | 3117 if test $in_tree_ld = yes ; then |
3020 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2; then | 3118 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10 -o "$gcc_cv_gld_major_version" -gt 2; then |
3021 gcc_cv_ld_static_dynamic=yes | 3119 gcc_cv_ld_static_dynamic=yes |
3022 fi | 3120 fi |
3023 elif test x$gcc_cv_ld != x; then | 3121 elif test x$gcc_cv_ld != x; then |
3024 # Check if linker supports -Bstatic/-Bdynamic option | 3122 # Check if linker supports -Bstatic/-Bdynamic option |
3025 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | 3123 if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ |
3026 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | 3124 && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then |
3027 gcc_cv_ld_static_dynamic=yes | 3125 gcc_cv_ld_static_dynamic=yes |
3028 fi | 3126 else |
3127 case "$target" in | |
3128 # Tru64 UNIX support -noso/-so_archive instead of -Bstatic/-Bdynamic. | |
3129 alpha*-dec-osf*) | |
3130 gcc_cv_ld_static_dynamic=yes | |
3131 gcc_cv_ld_static_option="-noso" | |
3132 gcc_cv_ld_dynamic_option="-so_archive" | |
3133 ;; | |
3134 # IRIX 6 ld supports -Bstatic/-Bdynamic. | |
3135 mips-sgi-irix6*) | |
3136 gcc_cv_ld_static_dynamic=yes | |
3137 ;; | |
3138 # Solaris 2 ld always supports -Bstatic/-Bdynamic. | |
3139 *-*-solaris2*) | |
3140 gcc_cv_ld_static_dynamic=yes | |
3141 ;; | |
3142 esac | |
3143 fi | |
3029 fi | 3144 fi |
3030 if test x"$gcc_cv_ld_static_dynamic" = xyes; then | 3145 if test x"$gcc_cv_ld_static_dynamic" = xyes; then |
3031 AC_DEFINE(HAVE_LD_STATIC_DYNAMIC, 1, | 3146 AC_DEFINE(HAVE_LD_STATIC_DYNAMIC, 1, |
3032 [Define if your linker supports -Bstatic/-Bdynamic option.]) | 3147 [Define if your linker supports -Bstatic/-Bdynamic or equivalent options.]) |
3148 AC_DEFINE_UNQUOTED(LD_STATIC_OPTION, "$gcc_cv_ld_static_option", | |
3149 [Define to the linker option to disable use of shared objects.]) | |
3150 AC_DEFINE_UNQUOTED(LD_DYNAMIC_OPTION, "$gcc_cv_ld_dynamic_option", | |
3151 [Define to the linker option to enable use of shared objects.]) | |
3033 fi | 3152 fi |
3034 AC_MSG_RESULT($gcc_cv_ld_static_dynamic) | 3153 AC_MSG_RESULT($gcc_cv_ld_static_dynamic) |
3035 | 3154 |
3036 if test x"$demangler_in_ld" = xyes; then | 3155 if test x"$demangler_in_ld" = xyes; then |
3037 AC_MSG_CHECKING(linker --demangle support) | 3156 AC_MSG_CHECKING(linker --demangle support) |
3050 AC_DEFINE(HAVE_LD_DEMANGLE, 1, | 3169 AC_DEFINE(HAVE_LD_DEMANGLE, 1, |
3051 [Define if your linker supports --demangle option.]) | 3170 [Define if your linker supports --demangle option.]) |
3052 fi | 3171 fi |
3053 AC_MSG_RESULT($gcc_cv_ld_demangle) | 3172 AC_MSG_RESULT($gcc_cv_ld_demangle) |
3054 fi | 3173 fi |
3174 | |
3175 AC_MSG_CHECKING(linker plugin support) | |
3176 gcc_cv_lto_plugin=no | |
3177 if test -f liblto_plugin.la; then | |
3178 if test $in_tree_ld = yes -a x"$ORIGINAL_PLUGIN_LD_FOR_TARGET=" = x"$gcc_cv_ld"; then | |
3179 if test x"$ld_is_gold" = xyes; then | |
3180 gcc_cv_lto_plugin=yes | |
3181 elif test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then \ | |
3182 gcc_cv_lto_plugin=yes | |
3183 fi | |
3184 # Check if the linker supports --plugin-opt option | |
3185 elif $ORIGINAL_PLUGIN_LD_FOR_TARGET --help 2>/dev/null | grep plugin-opt > /dev/null; then | |
3186 gcc_cv_lto_plugin=yes | |
3187 fi | |
3188 fi | |
3189 if test x"$gcc_cv_lto_plugin" = xyes; then | |
3190 AC_DEFINE(HAVE_LTO_PLUGIN, 1, | |
3191 [Define if your linker supports plugin.]) | |
3192 fi | |
3193 AC_MSG_RESULT($gcc_cv_lto_plugin) | |
3055 | 3194 |
3056 case "$target" in | 3195 case "$target" in |
3057 # All TARGET_ABI_OSF targets. | 3196 # All TARGET_ABI_OSF targets. |
3058 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | 3197 alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) |
3059 gcc_GAS_CHECK_FEATURE([explicit relocation support], | 3198 gcc_GAS_CHECK_FEATURE([explicit relocation support], |
3325 [Define true if the assembler supports '.long foo@GOTOFF'.]) | 3464 [Define true if the assembler supports '.long foo@GOTOFF'.]) |
3326 | 3465 |
3327 gcc_GAS_CHECK_FEATURE([rep and lock prefix], | 3466 gcc_GAS_CHECK_FEATURE([rep and lock prefix], |
3328 gcc_cv_as_ix86_rep_lock_prefix,,, | 3467 gcc_cv_as_ix86_rep_lock_prefix,,, |
3329 [rep movsl | 3468 [rep movsl |
3330 lock orl $0, (%esp)]) | 3469 lock addl %edi, (%eax,%esi) |
3331 AC_DEFINE_UNQUOTED(HAVE_AS_IX86_REP_LOCK_PREFIX, | 3470 lock orl $0, (%esp)],, |
3332 [`if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then echo 1; else echo 0; fi`], | 3471 [AC_DEFINE(HAVE_AS_IX86_REP_LOCK_PREFIX, 1, |
3333 [Define true if the assembler supports 'rep <insn>, lock <insn>'.]) | 3472 [Define if the assembler supports 'rep <insn>, lock <insn>'.])]) |
3334 | 3473 |
3335 ;; | 3474 ;; |
3336 | 3475 |
3337 ia64*-*-*) | 3476 ia64*-*-*) |
3338 gcc_GAS_CHECK_FEATURE([ltoffx and ldxmov relocs], | 3477 gcc_GAS_CHECK_FEATURE([ltoffx and ldxmov relocs], |
3580 .text | 3719 .text |
3581 .dtprelword x+0x8000],, | 3720 .dtprelword x+0x8000],, |
3582 [AC_DEFINE(HAVE_AS_DTPRELWORD, 1, | 3721 [AC_DEFINE(HAVE_AS_DTPRELWORD, 1, |
3583 [Define if your assembler supports .dtprelword.])]) | 3722 [Define if your assembler supports .dtprelword.])]) |
3584 | 3723 |
3724 gcc_GAS_CHECK_FEATURE([DSPR1 mult with four accumulators support], | |
3725 gcc_cv_as_mips_dspr1_mult,,, | |
3726 [ .set mips32r2 | |
3727 .set nodspr2 | |
3728 .set dsp | |
3729 madd $ac3,$4,$5 | |
3730 maddu $ac3,$4,$5 | |
3731 msub $ac3,$4,$5 | |
3732 msubu $ac3,$4,$5 | |
3733 mult $ac3,$4,$5 | |
3734 multu $ac3,$4,$5],, | |
3735 [AC_DEFINE(HAVE_AS_DSPR1_MULT, 1, | |
3736 [Define if your assembler supports DSPR1 mult.])]) | |
3737 | |
3585 AC_MSG_CHECKING(assembler and linker for explicit JALR relocation) | 3738 AC_MSG_CHECKING(assembler and linker for explicit JALR relocation) |
3586 gcc_cv_as_ld_jalr_reloc=no | 3739 gcc_cv_as_ld_jalr_reloc=no |
3587 if test $gcc_cv_as_mips_explicit_relocs = yes; then | 3740 if test $gcc_cv_as_mips_explicit_relocs = yes; then |
3588 if test $in_tree_ld = yes ; then | 3741 if test $in_tree_ld = yes ; then |
3589 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 20 -o "$gcc_cv_gld_major_version" -gt 2 \ | 3742 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 20 -o "$gcc_cv_gld_major_version" -gt 2 \ |
3599 echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s | 3752 echo ' .reloc 1f,R_MIPS_JALR,x' >> conftest.s |
3600 echo '1: jalr $25' >> conftest.s | 3753 echo '1: jalr $25' >> conftest.s |
3601 echo ' .end x' >> conftest.s | 3754 echo ' .end x' >> conftest.s |
3602 if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&AS_MESSAGE_LOG_FD \ | 3755 if $gcc_cv_as -o conftest.o conftest.s >/dev/null 2>&AS_MESSAGE_LOG_FD \ |
3603 && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&AS_MESSAGE_LOG_FD; then | 3756 && $gcc_cv_ld -shared -o conftest.so conftest.o >/dev/null 2>&AS_MESSAGE_LOG_FD; then |
3604 if $gcc_cv_objdump -d conftest.so | grep -q jalr \ | 3757 if $gcc_cv_objdump -d conftest.so | grep jalr >/dev/null 2>&1 \ |
3605 && $gcc_cv_objdump -d conftest.so | grep -q "bal.*<x>"; then | 3758 && $gcc_cv_objdump -d conftest.so | grep "bal.*<x>" >/dev/null 2>&1; then |
3606 gcc_cv_as_ld_jalr_reloc=yes | 3759 gcc_cv_as_ld_jalr_reloc=yes |
3607 fi | 3760 fi |
3608 fi | 3761 fi |
3609 rm -f conftest.* | 3762 rm -f conftest.* |
3610 fi | 3763 fi |
3686 # of gas. Moreover, we need to emit a valid instruction to trigger any | 3839 # of gas. Moreover, we need to emit a valid instruction to trigger any |
3687 # info to the output file. So, as supported targets are added to gas 2.11, | 3840 # info to the output file. So, as supported targets are added to gas 2.11, |
3688 # add some instruction here to (also) show we expect this might work. | 3841 # add some instruction here to (also) show we expect this might work. |
3689 # ??? Once 2.11 is released, probably need to add first known working | 3842 # ??? Once 2.11 is released, probably need to add first known working |
3690 # version to the per-target configury. | 3843 # version to the per-target configury. |
3691 case "$target" in | 3844 case "$cpu_type" in |
3692 i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ | 3845 alpha | arm | avr | bfin | cris | i386 | m32c | m68k | microblaze | mips \ |
3693 | x86_64*-*-* | hppa*-*-* | arm*-*-* \ | 3846 | pa | rs6000 | score | sparc | spu | xstormy16 | xtensa) |
3694 | xstormy16*-*-* | cris-*-* | crisv32-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \ | |
3695 | spu-*-* | fido*-*-* | m32c-*-*) | |
3696 insn="nop" | 3847 insn="nop" |
3697 ;; | 3848 ;; |
3698 ia64*-*-* | s390*-*-*) | 3849 ia64 | s390) |
3699 insn="nop 0" | 3850 insn="nop 0" |
3700 ;; | 3851 ;; |
3701 mmix-*-*) | 3852 mmix) |
3702 insn="swym 0" | 3853 insn="swym 0" |
3703 ;; | 3854 ;; |
3704 esac | 3855 esac |
3705 if test x"$insn" != x; then | 3856 if test x"$insn" != x; then |
3706 conftest_s="\ | 3857 conftest_s="\ |
3763 [.lcomm bar,4,16],, | 3914 [.lcomm bar,4,16],, |
3764 [AC_DEFINE(HAVE_GAS_LCOMM_WITH_ALIGNMENT, 1, | 3915 [AC_DEFINE(HAVE_GAS_LCOMM_WITH_ALIGNMENT, 1, |
3765 [Define if your assembler supports .lcomm with an alignment field.])]) | 3916 [Define if your assembler supports .lcomm with an alignment field.])]) |
3766 | 3917 |
3767 AC_ARG_ENABLE(gnu-unique-object, | 3918 AC_ARG_ENABLE(gnu-unique-object, |
3768 [ --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on | 3919 [AS_HELP_STRING([--enable-gnu-unique-object], |
3769 glibc systems], | 3920 [enable the use of the @gnu_unique_object ELF extension on glibc systems])], |
3770 [case $enable_gnu_unique_object in | 3921 [case $enable_gnu_unique_object in |
3771 yes | no) ;; | 3922 yes | no) ;; |
3772 *) AC_MSG_ERROR(['$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object. | 3923 *) AC_MSG_ERROR(['$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object. |
3773 Valid choices are 'yes' and 'no'.]) ;; | 3924 Valid choices are 'yes' and 'no'.]) ;; |
3774 esac], | 3925 esac], |
3775 [gcc_GAS_CHECK_FEATURE([gnu_unique_object], gcc_cv_as_gnu_unique_object, | 3926 [gcc_GAS_CHECK_FEATURE([gnu_unique_object], gcc_cv_as_gnu_unique_object, |
3776 [elf,2,19,52],, | 3927 [elf,2,19,52],, |
3777 [.type foo, @gnu_unique_object],, | 3928 [.type foo, @gnu_unique_object],, |
3778 # Also check for ld.so support, i.e. glibc 2.11 or higher. | 3929 # Also check for ld.so support, i.e. glibc 2.11 or higher. |
3779 [[if test x$host = x$build -a x$host = x$target && | 3930 [[if test x$host = x$build -a x$host = x$target && |
3931 ldd --version 2>/dev/null && | |
3780 glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then | 3932 glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then |
3781 glibcmajor=`expr "$glibcver" : "\([0-9]*\)"` | 3933 glibcmajor=`expr "$glibcver" : "\([0-9]*\)"` |
3782 glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"` | 3934 glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"` |
3783 glibcnum=`expr $glibcmajor \* 1000 + $glibcminor` | 3935 glibcnum=`expr $glibcmajor \* 1000 + $glibcminor` |
3784 if test "$glibcnum" -ge 2011 ; then | 3936 if test "$glibcnum" -ge 2011 ; then |
3820 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \ | 3972 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 \ |
3821 && test $in_tree_ld_is_elf = yes; then | 3973 && test $in_tree_ld_is_elf = yes; then |
3822 gcc_cv_ld_eh_frame_hdr=yes | 3974 gcc_cv_ld_eh_frame_hdr=yes |
3823 fi | 3975 fi |
3824 elif test x$gcc_cv_ld != x; then | 3976 elif test x$gcc_cv_ld != x; then |
3825 # Check if linker supports --eh-frame-hdr option | 3977 if echo "$ld_ver" | grep GNU > /dev/null; then |
3826 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | 3978 # Check if linker supports --eh-frame-hdr option |
3827 gcc_cv_ld_eh_frame_hdr=yes | 3979 if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then |
3828 fi | 3980 gcc_cv_ld_eh_frame_hdr=yes |
3981 fi | |
3982 else | |
3983 case "$target" in | |
3984 *-*-solaris2*) | |
3985 # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251. | |
3986 if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then | |
3987 gcc_cv_ld_eh_frame_hdr=yes | |
3988 fi | |
3989 ;; | |
3990 esac | |
3991 fi | |
3829 fi | 3992 fi |
3830 GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR]) | 3993 GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR]) |
3831 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | 3994 if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
3832 AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1, | 3995 AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1, |
3833 [Define if your linker supports --eh-frame-hdr option.]) | 3996 [Define if your linker supports .eh_frame_hdr.]) |
3834 fi | 3997 fi |
3835 AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr) | 3998 AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr) |
3836 | 3999 |
3837 AC_MSG_CHECKING(linker position independent executable support) | 4000 AC_MSG_CHECKING(linker position independent executable support) |
3838 gcc_cv_ld_pie=no | 4001 gcc_cv_ld_pie=no |
3932 [Define if your linker supports garbage collection of | 4095 [Define if your linker supports garbage collection of |
3933 sections in presence of EH frames.]) | 4096 sections in presence of EH frames.]) |
3934 fi | 4097 fi |
3935 AC_MSG_RESULT($gcc_cv_ld_eh_gc_sections) | 4098 AC_MSG_RESULT($gcc_cv_ld_eh_gc_sections) |
3936 | 4099 |
4100 AC_MSG_CHECKING(linker EH garbage collection of sections bug) | |
4101 gcc_cv_ld_eh_gc_sections_bug=no | |
4102 if test $in_tree_ld = yes ; then | |
4103 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -lt 19 -o "$gcc_cv_gld_major_version" -lt 2 \ | |
4104 && test $in_tree_ld_is_elf = yes; then | |
4105 gcc_cv_ld_eh_gc_sections_bug=yes | |
4106 fi | |
4107 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x -a x$gcc_cv_as_comdat_group = xyes; then | |
4108 gcc_cv_ld_eh_gc_sections_bug=yes | |
4109 cat > conftest.s <<EOF | |
4110 .section .text | |
4111 .globl _start | |
4112 .type _start, @function | |
4113 _start: | |
4114 .long foo | |
4115 .size _start, .-_start | |
4116 .section .text.startup.foo,"ax",@progbits | |
4117 .type foo, @function | |
4118 foo: | |
4119 .long 0 | |
4120 .size foo, .-foo | |
4121 .section .gcc_except_table.foo,"a",@progbits | |
4122 .L0: | |
4123 .long 0 | |
4124 .section .eh_frame,"a",@progbits | |
4125 .long .L0 | |
4126 EOF | |
4127 if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
4128 if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
4129 | grep "gc-sections option ignored" > /dev/null; then | |
4130 : | |
4131 elif $gcc_cv_objdump -h conftest 2> /dev/null \ | |
4132 | grep gcc_except_table > /dev/null; then | |
4133 gcc_cv_ld_eh_gc_sections_bug=no | |
4134 fi | |
4135 fi | |
4136 rm -f conftest.s conftest.o conftest | |
4137 fi | |
4138 if test x$gcc_cv_ld_eh_gc_sections_bug = xyes; then | |
4139 AC_DEFINE(HAVE_LD_EH_GC_SECTIONS_BUG, 1, | |
4140 [Define if your linker has buggy garbage collection of | |
4141 sections support when .text.startup.foo like sections are used.]) | |
4142 fi | |
4143 AC_MSG_RESULT($gcc_cv_ld_eh_gc_sections_bug) | |
4144 | |
3937 # -------- | 4145 # -------- |
3938 # UNSORTED | 4146 # UNSORTED |
3939 # -------- | 4147 # -------- |
3940 | 4148 |
3941 AC_CACHE_CHECK(linker --as-needed support, | 4149 AC_CACHE_CHECK(linker --as-needed support, |
3994 ]) | 4202 ]) |
3995 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | 4203 if test x"$gcc_cv_ld_no_dot_syms" = xyes; then |
3996 AC_DEFINE(HAVE_LD_NO_DOT_SYMS, 1, | 4204 AC_DEFINE(HAVE_LD_NO_DOT_SYMS, 1, |
3997 [Define if your PowerPC64 linker only needs function descriptor syms.]) | 4205 [Define if your PowerPC64 linker only needs function descriptor syms.]) |
3998 fi | 4206 fi |
4207 | |
4208 AC_CACHE_CHECK(linker large toc support, | |
4209 gcc_cv_ld_large_toc, | |
4210 [gcc_cv_ld_large_toc=no | |
4211 if test $in_tree_ld = yes ; then | |
4212 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 21 -o "$gcc_cv_gld_major_version" -gt 2; then | |
4213 gcc_cv_ld_large_toc=yes | |
4214 fi | |
4215 elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
4216 cat > conftest.s <<EOF | |
4217 .section ".tbss","awT",@nobits | |
4218 .align 3 | |
4219 ie0: .space 8 | |
4220 .global _start | |
4221 .text | |
4222 _start: | |
4223 addis 9,13,ie0@got@tprel@ha | |
4224 ld 9,ie0@got@tprel@l(9) | |
4225 EOF | |
4226 if $gcc_cv_as -a64 -o conftest.o conftest.s > /dev/null 2>&1 \ | |
4227 && $gcc_cv_ld -melf64ppc --no-toc-sort -o conftest conftest.o > /dev/null 2>&1; then | |
4228 gcc_cv_ld_large_toc=yes | |
4229 fi | |
4230 rm -f conftest conftest.o conftest.s | |
4231 fi | |
4232 ]) | |
4233 if test x"$gcc_cv_ld_large_toc" = xyes; then | |
4234 AC_DEFINE(HAVE_LD_LARGE_TOC, 1, | |
4235 [Define if your PowerPC64 linker supports a large TOC.]) | |
4236 fi | |
3999 ;; | 4237 ;; |
4000 esac | 4238 esac |
4001 | 4239 |
4002 AC_CACHE_CHECK(linker --build-id support, | 4240 AC_CACHE_CHECK(linker --build-id support, |
4003 gcc_cv_ld_buildid, | 4241 gcc_cv_ld_buildid, |
4032 else | 4270 else |
4033 AC_MSG_WARN(--build-id is not supported by your linker; --enable-linker-build-id ignored) | 4271 AC_MSG_WARN(--build-id is not supported by your linker; --enable-linker-build-id ignored) |
4034 fi | 4272 fi |
4035 fi | 4273 fi |
4036 | 4274 |
4275 # In binutils 2.21, GNU ld gained support for new emulations fully | |
4276 # supporting the Solaris 2 ABI. Detect their presence in the linker used. | |
4277 AC_CACHE_CHECK(linker *_sol2 emulation support, | |
4278 gcc_cv_ld_sol2_emulation, | |
4279 [gcc_cv_ld_sol2_emulation=no | |
4280 if test $in_tree_ld = yes ; then | |
4281 if test "$gcc_cv_gld_major_version" -eq 2 -a \ | |
4282 "$gcc_cv_gld_minor_version" -ge 21 -o \ | |
4283 "$gcc_cv_gld_major_version" -gt 2 \ | |
4284 && test $in_tree_ld_is_elf = yes; then | |
4285 gcc_cv_ld_sol2_emulation=yes | |
4286 fi | |
4287 elif test x$gcc_cv_ld != x; then | |
4288 if $gcc_cv_ld -V 2>/dev/null | sed -e '1,/Supported emulations/d;q' | \ | |
4289 grep _sol2 > /dev/null; then | |
4290 gcc_cv_ld_sol2_emulation=yes | |
4291 fi | |
4292 fi]) | |
4293 if test x"$gcc_cv_ld_sol2_emulation" = xyes; then | |
4294 AC_DEFINE(HAVE_LD_SOL2_EMULATION, 1, | |
4295 [Define if your linker supports the *_sol2 emulations.]) | |
4296 fi | |
4297 | |
4037 AC_CACHE_CHECK(linker --sysroot support, | 4298 AC_CACHE_CHECK(linker --sysroot support, |
4038 gcc_cv_ld_sysroot, | 4299 gcc_cv_ld_sysroot, |
4039 [gcc_cv_ld_sysroot=no | 4300 [gcc_cv_ld_sysroot=no |
4040 if test $in_tree_ld = yes ; then | 4301 if test $in_tree_ld = yes ; then |
4041 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then | 4302 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then |
4056 && test "$prefix" != "NONE"; then | 4317 && test "$prefix" != "NONE"; then |
4057 AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include", | 4318 AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include", |
4058 [Define to PREFIX/include if cpp should also search that directory.]) | 4319 [Define to PREFIX/include if cpp should also search that directory.]) |
4059 fi | 4320 fi |
4060 | 4321 |
4322 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
4323 if test "x$with_headers" != x; then | |
4324 target_header_dir=$with_headers | |
4325 elif test "x$with_sysroot" = x; then | |
4326 target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
4327 elif test "x$with_build_sysroot" != "x"; then | |
4328 target_header_dir="${with_build_sysroot}/usr/include" | |
4329 elif test "x$with_sysroot" = xyes; then | |
4330 target_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
4331 else | |
4332 target_header_dir="${with_sysroot}/usr/include" | |
4333 fi | |
4334 else | |
4335 target_header_dir=/usr/include | |
4336 fi | |
4337 | |
4061 # Test for stack protector support in target C library. | 4338 # Test for stack protector support in target C library. |
4062 AC_CACHE_CHECK(__stack_chk_fail in target C library, | 4339 AC_CACHE_CHECK(__stack_chk_fail in target C library, |
4063 gcc_cv_libc_provides_ssp, | 4340 gcc_cv_libc_provides_ssp, |
4064 [gcc_cv_libc_provides_ssp=no | 4341 [gcc_cv_libc_provides_ssp=no |
4065 case "$target" in | 4342 case "$target" in |
4066 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) | 4343 *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) |
4067 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
4068 if test "x$with_headers" != x; then | |
4069 glibc_header_dir=$with_headers | |
4070 elif test "x$with_sysroot" = x; then | |
4071 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
4072 elif test "x$with_build_sysroot" != "x"; then | |
4073 glibc_header_dir="${with_build_sysroot}/usr/include" | |
4074 elif test "x$with_sysroot" = xyes; then | |
4075 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
4076 else | |
4077 glibc_header_dir="${with_sysroot}/usr/include" | |
4078 fi | |
4079 else | |
4080 glibc_header_dir=/usr/include | |
4081 fi | |
4082 [# glibc 2.4 and later provides __stack_chk_fail and | 4344 [# glibc 2.4 and later provides __stack_chk_fail and |
4083 # either __stack_chk_guard, or TLS access to stack guard canary. | 4345 # either __stack_chk_guard, or TLS access to stack guard canary. |
4084 if test -f $glibc_header_dir/features.h \ | 4346 if test -f $target_header_dir/features.h \ |
4085 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | 4347 && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ |
4086 $glibc_header_dir/features.h > /dev/null; then | 4348 $target_header_dir/features.h > /dev/null; then |
4087 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | 4349 if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ |
4088 $glibc_header_dir/features.h > /dev/null; then | 4350 $target_header_dir/features.h > /dev/null; then |
4089 gcc_cv_libc_provides_ssp=yes | 4351 gcc_cv_libc_provides_ssp=yes |
4090 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | 4352 elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ |
4091 $glibc_header_dir/features.h > /dev/null \ | 4353 $target_header_dir/features.h > /dev/null \ |
4092 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | 4354 && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ |
4093 $glibc_header_dir/features.h > /dev/null; then | 4355 $target_header_dir/features.h > /dev/null; then |
4094 gcc_cv_libc_provides_ssp=yes | 4356 gcc_cv_libc_provides_ssp=yes |
4095 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ | 4357 elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ |
4096 $glibc_header_dir/features.h > /dev/null && \ | 4358 $target_header_dir/features.h > /dev/null && \ |
4097 test -f $glibc_header_dir/bits/uClibc_config.h && \ | 4359 test -f $target_header_dir/bits/uClibc_config.h && \ |
4098 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \ | 4360 $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \ |
4099 $glibc_header_dir/bits/uClibc_config.h > /dev/null; then | 4361 $target_header_dir/bits/uClibc_config.h > /dev/null; then |
4100 gcc_cv_libc_provides_ssp=yes | 4362 gcc_cv_libc_provides_ssp=yes |
4101 fi | 4363 fi |
4102 fi] | 4364 fi] |
4103 ;; | 4365 ;; |
4104 *-*-gnu*) | 4366 *-*-gnu*) |
4130 alpha*-*-linux*) | 4392 alpha*-*-linux*) |
4131 AC_ARG_WITH(long-double-128, | 4393 AC_ARG_WITH(long-double-128, |
4132 [ --with-long-double-128 Use 128-bit long double by default.], | 4394 [ --with-long-double-128 Use 128-bit long double by default.], |
4133 gcc_cv_target_ldbl128="$with_long_double_128", | 4395 gcc_cv_target_ldbl128="$with_long_double_128", |
4134 [[gcc_cv_target_ldbl128=no | 4396 [[gcc_cv_target_ldbl128=no |
4135 if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
4136 if test "x$with_sysroot" = x; then | |
4137 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
4138 elif test "x$with_build_sysroot" != "x"; then | |
4139 glibc_header_dir="${with_build_sysroot}/usr/include" | |
4140 elif test "x$with_sysroot" = xyes; then | |
4141 glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
4142 else | |
4143 glibc_header_dir="${with_sysroot}/usr/include" | |
4144 fi | |
4145 else | |
4146 glibc_header_dir=/usr/include | |
4147 fi | |
4148 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ | 4397 grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ |
4149 $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ | 4398 $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \ |
4150 && gcc_cv_target_ldbl128=yes | 4399 && gcc_cv_target_ldbl128=yes |
4151 ]]) | 4400 ]]) |
4152 ;; | 4401 ;; |
4153 esac | 4402 esac |
4154 if test x$gcc_cv_target_ldbl128 = xyes; then | 4403 if test x$gcc_cv_target_ldbl128 = xyes; then |
4155 AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1, | 4404 AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1, |
4156 [Define if TFmode long double should be the default]) | 4405 [Define if TFmode long double should be the default]) |
4157 fi | 4406 fi |
4407 | |
4408 AC_MSG_CHECKING(dl_iterate_phdr in target C library) | |
4409 gcc_cv_target_dl_iterate_phdr=unknown | |
4410 case "$target" in | |
4411 *-*-solaris2*) | |
4412 # <link.h> needs both a dl_iterate_phdr declaration and support for | |
4413 # compilation with largefile support. | |
4414 if grep dl_iterate_phdr $target_header_dir/link.h > /dev/null 2>&1 \ | |
4415 && grep 'large file capable' $target_header_dir/link.h > /dev/null 2>&1; then | |
4416 gcc_cv_target_dl_iterate_phdr=yes | |
4417 else | |
4418 gcc_cv_target_dl_iterate_phdr=no | |
4419 fi | |
4420 ;; | |
4421 esac | |
4422 GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) | |
4423 if test x$gcc_cv_target_dl_iterate_phdr = xyes; then | |
4424 AC_DEFINE(TARGET_DL_ITERATE_PHDR, 1, | |
4425 [Define if your target C library provides the `dl_iterate_phdr' function.]) | |
4426 fi | |
4427 AC_MSG_RESULT($gcc_cv_target_dl_iterate_phdr) | |
4158 | 4428 |
4159 # Find out what GC implementation we want, or may, use. | 4429 # Find out what GC implementation we want, or may, use. |
4160 AC_ARG_WITH(gc, | 4430 AC_ARG_WITH(gc, |
4161 [ --with-gc={page,zone} choose the garbage collection mechanism to use | 4431 [ --with-gc={page,zone} choose the garbage collection mechanism to use |
4162 with the compiler], | 4432 with the compiler], |
4227 lang_tree_files= | 4497 lang_tree_files= |
4228 # These (without "all_") are set in each config-lang.in. | 4498 # These (without "all_") are set in each config-lang.in. |
4229 # `language' must be a single word so is spelled singularly. | 4499 # `language' must be a single word so is spelled singularly. |
4230 all_languages= | 4500 all_languages= |
4231 all_compilers= | 4501 all_compilers= |
4232 all_outputs='Makefile gccbug' | 4502 all_outputs='Makefile' |
4233 # List of language makefile fragments. | 4503 # List of language makefile fragments. |
4234 all_lang_makefrags= | 4504 all_lang_makefrags= |
4235 # List of language subdirectory makefiles. Deprecated. | |
4236 all_lang_makefiles= | |
4237 # Additional files for gengtype | 4505 # Additional files for gengtype |
4238 all_gtfiles="$target_gtfiles" | 4506 all_gtfiles="$target_gtfiles" |
4239 | 4507 |
4240 # These are the languages that are set in --enable-languages, | 4508 # These are the languages that are set in --enable-languages, |
4241 # and are available in the GCC tree. | 4509 # and are available in the GCC tree. |
4321 $ok || continue | 4589 $ok || continue |
4322 | 4590 |
4323 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" | 4591 all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" |
4324 if test -f $srcdir/$gcc_subdir/lang.opt; then | 4592 if test -f $srcdir/$gcc_subdir/lang.opt; then |
4325 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" | 4593 lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" |
4594 all_opt_files="$all_opt_files $srcdir/$gcc_subdir/lang.opt" | |
4326 fi | 4595 fi |
4327 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then | 4596 if test -f $srcdir/$gcc_subdir/$subdir-tree.def; then |
4328 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def" | 4597 lang_tree_files="$lang_tree_files $srcdir/$gcc_subdir/$subdir-tree.def" |
4329 fi | |
4330 if test -f ${srcdir}/$gcc_subdir/Makefile.in | |
4331 then all_lang_makefiles="$gcc_subdir/Makefile" | |
4332 fi | 4598 fi |
4333 all_languages="$all_languages $language" | 4599 all_languages="$all_languages $language" |
4334 all_compilers="$all_compilers $compilers" | 4600 all_compilers="$all_compilers $compilers" |
4335 all_outputs="$all_outputs $outputs" | 4601 all_outputs="$all_outputs $outputs" |
4336 all_gtfiles="$all_gtfiles [[$subdir]] $gtfiles" | 4602 all_gtfiles="$all_gtfiles [[$subdir]] $gtfiles" |
4337 case ",$enable_languages," in | 4603 case ",$enable_languages," in |
4338 *,lto,*) | 4604 *,lto,*) |
4339 AC_DEFINE(ENABLE_LTO, 1, [Define to enable LTO support.]) | 4605 AC_DEFINE(ENABLE_LTO, 1, [Define to enable LTO support.]) |
4340 enable_lto=yes | 4606 enable_lto=yes |
4341 AC_SUBST(enable_lto) | 4607 AC_SUBST(enable_lto) |
4342 # LTO needs to speak the platform's object file format, and has a | |
4343 # number of implementations of the required binary file access APIs. | |
4344 # ELF is the most common, and default. We only link libelf if ELF | |
4345 # is indeed the selected format. | |
4346 LTO_BINARY_READER=${lto_binary_reader} | |
4347 LTO_USE_LIBELF=-lelf | |
4348 if test "x$lto_binary_reader" != "xlto-elf" ; then | |
4349 LTO_USE_LIBELF= | |
4350 fi | |
4351 AC_SUBST(LTO_BINARY_READER) | |
4352 AC_SUBST(LTO_USE_LIBELF) | |
4353 ;; | 4608 ;; |
4354 *) ;; | 4609 *) ;; |
4355 esac | 4610 esac |
4356 done | 4611 done |
4357 | 4612 |
4383 do | 4638 do |
4384 x="$x $lang.$t" | 4639 x="$x $lang.$t" |
4385 done | 4640 done |
4386 echo "lang.$t: $x" >> Make-hooks | 4641 echo "lang.$t: $x" >> Make-hooks |
4387 done | 4642 done |
4643 | |
4644 # -------- | |
4645 # Option include files | |
4646 # -------- | |
4647 | |
4648 ${AWK} -f $srcdir/opt-include.awk $all_opt_files > option-includes.mk | |
4649 option_includes="option-includes.mk" | |
4650 AC_SUBST_FILE(option_includes) | |
4388 | 4651 |
4389 # -------- | 4652 # -------- |
4390 # UNSORTED | 4653 # UNSORTED |
4391 # -------- | 4654 # -------- |
4392 | 4655 |
4433 AC_SUBST(subdirs) | 4696 AC_SUBST(subdirs) |
4434 AC_SUBST(srcdir) | 4697 AC_SUBST(srcdir) |
4435 AC_SUBST(all_compilers) | 4698 AC_SUBST(all_compilers) |
4436 AC_SUBST(all_gtfiles) | 4699 AC_SUBST(all_gtfiles) |
4437 AC_SUBST(all_lang_makefrags) | 4700 AC_SUBST(all_lang_makefrags) |
4438 AC_SUBST(all_lang_makefiles) | |
4439 AC_SUBST(all_languages) | 4701 AC_SUBST(all_languages) |
4440 AC_SUBST(all_selected_languages) | 4702 AC_SUBST(all_selected_languages) |
4441 AC_SUBST(build_exeext) | 4703 AC_SUBST(build_exeext) |
4442 AC_SUBST(build_install_headers_dir) | 4704 AC_SUBST(build_install_headers_dir) |
4443 AC_SUBST(build_xm_file_list) | 4705 AC_SUBST(build_xm_file_list) |
4450 AC_SUBST(tmake_file) | 4712 AC_SUBST(tmake_file) |
4451 AC_SUBST(TM_ENDIAN_CONFIG) | 4713 AC_SUBST(TM_ENDIAN_CONFIG) |
4452 AC_SUBST(TM_MULTILIB_CONFIG) | 4714 AC_SUBST(TM_MULTILIB_CONFIG) |
4453 AC_SUBST(TM_MULTILIB_EXCEPTIONS_CONFIG) | 4715 AC_SUBST(TM_MULTILIB_EXCEPTIONS_CONFIG) |
4454 AC_SUBST(extra_gcc_objs) | 4716 AC_SUBST(extra_gcc_objs) |
4717 AC_SUBST(user_headers_inc_next_pre) | |
4718 AC_SUBST(user_headers_inc_next_post) | |
4455 AC_SUBST(extra_headers_list) | 4719 AC_SUBST(extra_headers_list) |
4456 AC_SUBST(extra_objs) | 4720 AC_SUBST(extra_objs) |
4457 AC_SUBST(extra_parts) | 4721 AC_SUBST(extra_parts) |
4458 AC_SUBST(extra_passes) | 4722 AC_SUBST(extra_passes) |
4459 AC_SUBST(extra_programs) | 4723 AC_SUBST(extra_programs) |
4519 AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files]) | 4783 AC_ARG_VAR(CLOOGINC,[How to find CLOOG include files]) |
4520 if test "x${CLOOGLIBS}" != "x" ; then | 4784 if test "x${CLOOGLIBS}" != "x" ; then |
4521 AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.]) | 4785 AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.]) |
4522 fi | 4786 fi |
4523 | 4787 |
4524 AC_ARG_VAR(LIBELFLIBS,[How to link libelf]) | |
4525 AC_ARG_VAR(LIBELFINC,[How to find libelf include files]) | |
4526 if test "x${LIBELFLIBS}" != "x" ; then | |
4527 AC_DEFINE(HAVE_libelf, 1, [Define if libelf is in use.]) | |
4528 fi | |
4529 | |
4530 # Check for plugin support | 4788 # Check for plugin support |
4531 AC_ARG_ENABLE(plugin, | 4789 AC_ARG_ENABLE(plugin, |
4532 [ --enable-plugin enable plugin support], | 4790 [ --enable-plugin enable plugin support], |
4533 enable_plugin=$enableval, | 4791 enable_plugin=$enableval, |
4534 enable_plugin=yes; default_plugin=yes) | 4792 enable_plugin=yes; default_plugin=yes) |
4535 | 4793 |
4536 pluginlibs= | 4794 pluginlibs= |
4795 | |
4796 case "${host}" in | |
4797 *-*-darwin*) | |
4798 if test x$build = x$host; then | |
4799 export_sym_check="nm${exeext} -g" | |
4800 elif test x$host = x$target; then | |
4801 export_sym_check="$gcc_cv_nm -g" | |
4802 else | |
4803 export_sym_check= | |
4804 fi | |
4805 ;; | |
4806 *) | |
4807 if test x$build = x$host; then | |
4808 export_sym_check="objdump${exeext} -T" | |
4809 elif test x$host = x$target; then | |
4810 export_sym_check="$gcc_cv_objdump -T" | |
4811 else | |
4812 export_sym_check= | |
4813 fi | |
4814 ;; | |
4815 esac | |
4816 | |
4537 if test x"$enable_plugin" = x"yes"; then | 4817 if test x"$enable_plugin" = x"yes"; then |
4538 | 4818 |
4539 case "${host}" in | |
4540 *-*-darwin*) | |
4541 export_sym_check="$gcc_cv_nm -g" | |
4542 ;; | |
4543 *) | |
4544 export_sym_check="$gcc_cv_objdump -T" | |
4545 ;; | |
4546 esac | |
4547 AC_MSG_CHECKING([for exported symbols]) | 4819 AC_MSG_CHECKING([for exported symbols]) |
4548 echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c | 4820 if test "x$export_sym_check" != x; then |
4549 ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 | 4821 echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c |
4550 if $export_sym_check conftest | grep foobar > /dev/null; then | 4822 ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest > /dev/null 2>&1 |
4551 : # No need to use a flag | 4823 if $export_sym_check conftest | grep foobar > /dev/null; then |
4824 : # No need to use a flag | |
4825 AC_MSG_RESULT([yes]) | |
4826 else | |
4827 AC_MSG_RESULT([yes]) | |
4828 AC_MSG_CHECKING([for -rdynamic]) | |
4829 ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 | |
4830 if $export_sym_check conftest | grep foobar > /dev/null; then | |
4831 plugin_rdynamic=yes | |
4832 pluginlibs="-rdynamic" | |
4833 else | |
4834 plugin_rdynamic=no | |
4835 enable_plugin=no | |
4836 fi | |
4837 AC_MSG_RESULT([$plugin_rdynamic]) | |
4838 fi | |
4552 else | 4839 else |
4553 AC_MSG_CHECKING([for -rdynamic]) | 4840 AC_MSG_RESULT([unable to check]) |
4554 ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest > /dev/null 2>&1 | |
4555 if $export_sym_check conftest | grep foobar > /dev/null; then | |
4556 plugin_rdynamic=yes | |
4557 pluginlibs="-rdynamic" | |
4558 else | |
4559 plugin_rdynamic=no | |
4560 enable_plugin=no | |
4561 fi | |
4562 AC_MSG_RESULT([$plugin_rdynamic]) | |
4563 fi | 4841 fi |
4564 | 4842 |
4565 # Check -ldl | 4843 # Check -ldl |
4566 saved_LIBS="$LIBS" | 4844 saved_LIBS="$LIBS" |
4567 AC_SEARCH_LIBS([dlopen], [dl]) | 4845 AC_SEARCH_LIBS([dlopen], [dl]) |
4570 fi | 4848 fi |
4571 LIBS="$saved_LIBS" | 4849 LIBS="$saved_LIBS" |
4572 | 4850 |
4573 # Check that we can build shared objects with -fPIC -shared | 4851 # Check that we can build shared objects with -fPIC -shared |
4574 saved_LDFLAGS="$LDFLAGS" | 4852 saved_LDFLAGS="$LDFLAGS" |
4853 saved_CFLAGS="$CFLAGS" | |
4575 case "${host}" in | 4854 case "${host}" in |
4576 *-*-darwin*) | 4855 *-*-darwin*) |
4577 LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup" | 4856 CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` |
4857 CFLAGS="$CFLAGS -fPIC" | |
4858 LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" | |
4578 ;; | 4859 ;; |
4579 *) | 4860 *) |
4861 CFLAGS="$CFLAGS -fPIC" | |
4580 LDFLAGS="$LDFLAGS -fPIC -shared" | 4862 LDFLAGS="$LDFLAGS -fPIC -shared" |
4581 ;; | 4863 ;; |
4582 esac | 4864 esac |
4583 AC_MSG_CHECKING([for -fPIC -shared]) | 4865 AC_MSG_CHECKING([for -fPIC -shared]) |
4584 AC_TRY_LINK( | 4866 AC_TRY_LINK( |
4588 if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then | 4870 if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then |
4589 pluginlibs= | 4871 pluginlibs= |
4590 enable_plugin=no | 4872 enable_plugin=no |
4591 fi | 4873 fi |
4592 LDFLAGS="$saved_LDFLAGS" | 4874 LDFLAGS="$saved_LDFLAGS" |
4875 CFLAGS="$saved_CFLAGS" | |
4593 | 4876 |
4594 # If plugin support had been requested but not available, fail. | 4877 # If plugin support had been requested but not available, fail. |
4595 if test x"$enable_plugin" = x"no" ; then | 4878 if test x"$enable_plugin" = x"no" ; then |
4596 if test x"$default_plugin" != x"yes"; then | 4879 if test x"$default_plugin" != x"yes"; then |
4597 AC_MSG_ERROR([ | 4880 AC_MSG_ERROR([ |
4605 AC_SUBST(enable_plugin) | 4888 AC_SUBST(enable_plugin) |
4606 if test x"$enable_plugin" = x"yes"; then | 4889 if test x"$enable_plugin" = x"yes"; then |
4607 AC_DEFINE(ENABLE_PLUGIN, 1, [Define to enable plugin support.]) | 4890 AC_DEFINE(ENABLE_PLUGIN, 1, [Define to enable plugin support.]) |
4608 fi | 4891 fi |
4609 | 4892 |
4893 | |
4894 AC_ARG_ENABLE(libquadmath-support, | |
4895 [AS_HELP_STRING([--disable-libquadmath-support], | |
4896 [disable libquadmath support for Fortran])], | |
4897 ENABLE_LIBQUADMATH_SUPPORT=$enableval, | |
4898 ENABLE_LIBQUADMATH_SUPPORT=yes) | |
4899 if test "${ENABLE_LIBQUADMATH_SUPPORT}" != "no" ; then | |
4900 AC_DEFINE(ENABLE_LIBQUADMATH_SUPPORT, 1, | |
4901 [Define to 1 to enable libquadmath support]) | |
4902 fi | |
4903 | |
4904 | |
4610 # Configure the subdirectories | 4905 # Configure the subdirectories |
4611 # AC_CONFIG_SUBDIRS($subdirs) | 4906 # AC_CONFIG_SUBDIRS($subdirs) |
4612 | 4907 |
4613 # Create the Makefile | 4908 # Create the Makefile |
4614 # and configure language subdirectories | 4909 # and configure language subdirectories |
4619 case ${CONFIG_HEADERS} in | 4914 case ${CONFIG_HEADERS} in |
4620 *auto-host.h:config.in*) | 4915 *auto-host.h:config.in*) |
4621 echo > cstamp-h ;; | 4916 echo > cstamp-h ;; |
4622 esac | 4917 esac |
4623 # Make sure all the subdirs exist. | 4918 # Make sure all the subdirs exist. |
4624 for d in $subdirs doc build | 4919 for d in $subdirs doc build c-family |
4625 do | 4920 do |
4626 test -d $d || mkdir $d | 4921 test -d $d || mkdir $d |
4627 done | 4922 done |
4628 ], | 4923 ], |
4629 [subdirs='$subdirs']) | 4924 [subdirs='$subdirs']) |
4630 AC_OUTPUT | 4925 AC_OUTPUT |
4926 |