Mercurial > hg > CbC > CbC_gcc
comparison gcc/configure.ac @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | ab0bcb71f44d 84e7813d76e9 |
children | 351920fa3827 |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
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 (C) 1997-2017 Free Software Foundation, Inc. | 4 # Copyright (C) 1997-2018 Free Software Foundation, Inc. |
5 | 5 |
6 #This file is part of GCC. | 6 #This file is part of GCC. |
7 | 7 |
8 #GCC is free software; you can redistribute it and/or modify it under | 8 #GCC is free software; you can redistribute it and/or modify it under |
9 #the terms of the GNU General Public License as published by the Free | 9 #the terms of the GNU General Public License as published by the Free |
203 yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;; | 203 yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;; |
204 no) ;; | 204 no) ;; |
205 *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | 205 *) gcc_gxx_include_dir=$with_gxx_include_dir ;; |
206 esac]) | 206 esac]) |
207 | 207 |
208 # If both --with-sysroot and --with-gxx-include-dir are passed, we interpolate | |
209 # the former in the latter and, upon success, compute gcc_gxx_include_dir as | |
210 # relative to the sysroot. | |
211 gcc_gxx_include_dir_add_sysroot=0 | |
212 | |
208 # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. | 213 # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. |
209 if test x${gcc_gxx_include_dir} = x; then | 214 if test x${gcc_gxx_include_dir} = x; then |
210 if test x${enable_version_specific_runtime_libs} = xyes; then | 215 if test x${enable_version_specific_runtime_libs} = xyes; then |
211 gcc_gxx_include_dir='${libsubdir}/include/c++' | 216 gcc_gxx_include_dir='${libsubdir}/include/c++' |
212 else | 217 else |
214 if test x$host != x$target; then | 219 if test x$host != x$target; then |
215 libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | 220 libstdcxx_incdir="$target_alias/$libstdcxx_incdir" |
216 fi | 221 fi |
217 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" | 222 gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" |
218 fi | 223 fi |
219 fi | 224 elif test "${with_sysroot+set}" = set; then |
220 | |
221 gcc_gxx_include_dir_add_sysroot=0 | |
222 if test "${with_sysroot+set}" = set; then | |
223 gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` | 225 gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` |
224 if test "${gcc_gxx_without_sysroot}"; then | 226 if test "${gcc_gxx_without_sysroot}"; then |
225 if test x${with_sysroot} != x/; then | 227 gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" |
226 gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" | |
227 fi | |
228 gcc_gxx_include_dir_add_sysroot=1 | 228 gcc_gxx_include_dir_add_sysroot=1 |
229 fi | 229 fi |
230 fi | 230 fi |
231 | 231 |
232 AC_ARG_WITH(cpp_install_dir, | 232 AC_ARG_WITH(cpp_install_dir, |
738 unused parts of the compiler. With LEVEL, specify | 738 unused parts of the compiler. With LEVEL, specify |
739 optimization. Values are opt, noopt, | 739 optimization. Values are opt, noopt, |
740 default is noopt])], | 740 default is noopt])], |
741 [case "${enableval}" in | 741 [case "${enableval}" in |
742 yes|noopt) | 742 yes|noopt) |
743 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | 743 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0 -fkeep-static-functions" |
744 ;; | 744 ;; |
745 opt) | 745 opt) |
746 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | 746 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2 -fkeep-static-functions" |
747 ;; | 747 ;; |
748 no) | 748 no) |
749 # a.k.a. --disable-coverage | 749 # a.k.a. --disable-coverage |
750 coverage_flags="" | 750 coverage_flags="" |
751 ;; | 751 ;; |
820 AC_MSG_RESULT($enable_multiarch$ma_msg_suffix) | 820 AC_MSG_RESULT($enable_multiarch$ma_msg_suffix) |
821 | 821 |
822 # needed for setting the multiarch name for soft-float/hard-float ABIs | 822 # needed for setting the multiarch name for soft-float/hard-float ABIs |
823 AC_SUBST(with_cpu) | 823 AC_SUBST(with_cpu) |
824 AC_SUBST(with_float) | 824 AC_SUBST(with_float) |
825 | |
826 # default stack clash protection guard size as power of twos in bytes. | |
827 # Please keep these in sync with params.def. | |
828 stk_clash_min=12 | |
829 stk_clash_max=30 | |
830 | |
831 # Keep the default value when the option is not used to 0, this allows us to | |
832 # distinguish between the cases where the user specifially set a value via | |
833 # configure and when the normal default value is used. | |
834 AC_ARG_WITH(stack-clash-protection-guard-size, | |
835 [AS_HELP_STRING([--with-stack-clash-protection-guard-size=size], | |
836 [Set the default stack clash protection guard size for specific targets as a power of two in bytes.])], | |
837 [DEFAULT_STK_CLASH_GUARD_SIZE="$with_stack_clash_protection_guard_size"], [DEFAULT_STK_CLASH_GUARD_SIZE=0]) | |
838 if test $DEFAULT_STK_CLASH_GUARD_SIZE -ne 0 \ | |
839 && (test $DEFAULT_STK_CLASH_GUARD_SIZE -lt $stk_clash_min \ | |
840 || test $DEFAULT_STK_CLASH_GUARD_SIZE -gt $stk_clash_max); then | |
841 AC_MSG_ERROR(m4_normalize([ | |
842 Invalid value $DEFAULT_STK_CLASH_GUARD_SIZE for --with-stack-clash-protection-guard-size. \ | |
843 Must be between $stk_clash_min and $stk_clash_max.])) | |
844 fi | |
845 | |
846 AC_DEFINE_UNQUOTED(DEFAULT_STK_CLASH_GUARD_SIZE, $DEFAULT_STK_CLASH_GUARD_SIZE, | |
847 [Define to larger than zero set the default stack clash protector size.]) | |
825 | 848 |
826 # Enable __cxa_atexit for C++. | 849 # Enable __cxa_atexit for C++. |
827 AC_ARG_ENABLE(__cxa_atexit, | 850 AC_ARG_ENABLE(__cxa_atexit, |
828 [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])], | 851 [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])], |
829 [], []) | 852 [], []) |
930 IFS="$ac_save_ifs" | 953 IFS="$ac_save_ifs" |
931 ;; | 954 ;; |
932 esac | 955 esac |
933 ], [enable_shared=yes]) | 956 ], [enable_shared=yes]) |
934 AC_SUBST(enable_shared) | 957 AC_SUBST(enable_shared) |
958 | |
959 AC_ARG_ENABLE(gcov, | |
960 [ --disable-gcov don't provide libgcov and related host tools], | |
961 [], [enable_gcov=yes]) | |
962 AC_SUBST(enable_gcov) | |
935 | 963 |
936 AC_ARG_WITH(specs, | 964 AC_ARG_WITH(specs, |
937 [AS_HELP_STRING([--with-specs=SPECS], | 965 [AS_HELP_STRING([--with-specs=SPECS], |
938 [add SPECS to driver command-line processing])], | 966 [add SPECS to driver command-line processing])], |
939 [CONFIGURE_SPECS=$withval], | 967 [CONFIGURE_SPECS=$withval], |
1749 changequote(,)dnl | 1777 changequote(,)dnl |
1750 # Compile in configure arguments. | 1778 # Compile in configure arguments. |
1751 if test -f configargs.h ; then | 1779 if test -f configargs.h ; then |
1752 # Being re-configured. | 1780 # Being re-configured. |
1753 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` | 1781 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
1754 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" | 1782 gcc_reconf_arguments=`echo "$gcc_config_arguments" | sed -e 's/^.*\( : (reconfigured) .*$\)/\1/'` |
1783 if [ "$gcc_reconf_arguments" != " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" ]; then | |
1784 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" | |
1785 fi | |
1755 else | 1786 else |
1756 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | 1787 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" |
1757 fi | 1788 fi |
1758 | 1789 |
1759 # Double all backslashes and backslash all quotes to turn | 1790 # Double all backslashes and backslash all quotes to turn |
1830 [],[enable_mingw_wildcard=platform]) | 1861 [],[enable_mingw_wildcard=platform]) |
1831 AS_IF([test x"$enable_mingw_wildcard" != xplatform ], | 1862 AS_IF([test x"$enable_mingw_wildcard" != xplatform ], |
1832 [AC_DEFINE_UNQUOTED(MINGW_DOWILDCARD, | 1863 [AC_DEFINE_UNQUOTED(MINGW_DOWILDCARD, |
1833 $(test x"$enable_mingw_wildcard" = xno; echo $?), | 1864 $(test x"$enable_mingw_wildcard" = xno; echo $?), |
1834 [Value to set mingw's _dowildcard to.])]) | 1865 [Value to set mingw's _dowildcard to.])]) |
1866 | |
1867 AC_ARG_ENABLE(large-address-aware, | |
1868 [AS_HELP_STRING([--enable-large-address-aware], | |
1869 [Link mingw executables with --large-address-aware])]) | |
1870 AS_IF([test x"$enable_large_address_aware" = xyes], | |
1871 [AC_DEFINE([MINGW_DEFAULT_LARGE_ADDR_AWARE], 1, | |
1872 [Define if we should link mingw executables with --large-address-aware])]) | |
1835 | 1873 |
1836 AC_ARG_ENABLE(leading-mingw64-underscores, | 1874 AC_ARG_ENABLE(leading-mingw64-underscores, |
1837 AS_HELP_STRING([--enable-leading-mingw64-underscores], | 1875 AS_HELP_STRING([--enable-leading-mingw64-underscores], |
1838 [enable leading underscores on 64 bit mingw targets]), | 1876 [enable leading underscores on 64 bit mingw targets]), |
1839 [],[]) | 1877 [],[]) |
2597 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | 2635 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` |
2598 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | 2636 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` |
2599 else | 2637 else |
2600 case "${target}" in | 2638 case "${target}" in |
2601 *-*-solaris2*) | 2639 *-*-solaris2*) |
2602 # See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number | 2640 # Solaris 2 ld -V output looks like this for a regular version: |
2603 # format. | |
2604 # | 2641 # |
2605 # Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than | 2642 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 |
2606 # /usr/ccs/bin/ld has been configured. | 2643 # |
2644 # but test versions add stuff at the end: | |
2645 # | |
2646 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 | |
2647 # | |
2648 # In Solaris 11.4, this was changed to | |
2649 # | |
2650 # ld: Solaris ELF Utilities: 11.4-1.3123 | |
2651 # | |
2652 # ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version | |
2653 # numbers can be used in ld.so.1 feature checks even if a different | |
2654 # linker is configured. | |
2607 ld_ver=`$gcc_cv_ld -V 2>&1` | 2655 ld_ver=`$gcc_cv_ld -V 2>&1` |
2608 if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then | 2656 if echo "$ld_ver" | $EGREP 'Solaris Link Editors|Solaris ELF Utilities' > /dev/null; then |
2609 ld_vers=`echo $ld_ver | sed -n \ | 2657 ld_vers=`echo $ld_ver | sed -n \ |
2610 -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` | 2658 -e 's,^.*: \(5\|1[0-9]\)\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\2,p'` |
2611 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | 2659 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
2612 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | 2660 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` |
2613 fi | 2661 fi |
2614 ;; | 2662 ;; |
2615 esac | 2663 esac |
2754 [AC_DEFINE(HAVE_AS_LEB128, 1, | 2802 [AC_DEFINE(HAVE_AS_LEB128, 1, |
2755 [Define if your assembler supports .sleb128 and .uleb128.])], | 2803 [Define if your assembler supports .sleb128 and .uleb128.])], |
2756 [AC_DEFINE(HAVE_AS_LEB128, 0, | 2804 [AC_DEFINE(HAVE_AS_LEB128, 0, |
2757 [Define if your assembler supports .sleb128 and .uleb128.])]) | 2805 [Define if your assembler supports .sleb128 and .uleb128.])]) |
2758 | 2806 |
2807 # Determine if an .eh_frame section is read-only. | |
2808 gcc_fn_eh_frame_ro () { | |
2809 $gcc_cv_as $1 -o conftest.o conftest.s > /dev/null 2>&1 && \ | |
2810 $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
2811 sed -e '/.eh_frame/!d' -e N | grep READONLY > /dev/null | |
2812 } | |
2813 | |
2759 # Check if we have assembler support for unwind directives. | 2814 # Check if we have assembler support for unwind directives. |
2760 gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive, | 2815 gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive, |
2761 ,, | 2816 ,, |
2762 [ .text | 2817 [ .text |
2763 .cfi_startproc | 2818 .cfi_startproc |
2769 [case "$target" in | 2824 [case "$target" in |
2770 *-*-solaris*) | 2825 *-*-solaris*) |
2771 # If the linker used on Solaris (like Sun ld) isn't capable of merging | 2826 # If the linker used on Solaris (like Sun ld) isn't capable of merging |
2772 # read-only and read-write sections, we need to make sure that the | 2827 # read-only and read-write sections, we need to make sure that the |
2773 # assembler used emits read-write .eh_frame sections. | 2828 # assembler used emits read-write .eh_frame sections. |
2774 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then | 2829 if test "x$gcc_cv_ld_ro_rw_mix" = xread-write; then |
2775 if test "x$gcc_cv_objdump" != x; then | 2830 gcc_cv_as_cfi_directive=yes |
2776 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | 2831 elif test "x$gcc_cv_objdump" = x; then |
2777 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then | 2832 # No objdump, err on the side of caution. |
2778 gcc_cv_as_cfi_directive=no | 2833 gcc_cv_as_cfi_directive=no |
2779 else | 2834 else |
2780 case "$target" in | 2835 if test x$gas = xyes; then |
2781 i?86-*-solaris2.1[[0-9]]* | x86_64-*-solaris2.1[[0-9]]*) | 2836 as_32_opt="--32" |
2782 # On Solaris/x86, make sure that GCC and assembler agree on using | 2837 as_64_opt="--64" |
2783 # read-only .eh_frame sections for 64-bit. | |
2784 if test x$gas = xyes; then | |
2785 as_ix86_64_opt="--64" | |
2786 else | |
2787 as_ix86_64_opt="-xarch=amd64" | |
2788 fi | |
2789 if $gcc_cv_as $as_ix86_64_opt -o conftest.o conftest.s > /dev/null 2>&1 && \ | |
2790 $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
2791 sed -e /.eh_frame/!d -e N | \ | |
2792 grep READONLY > /dev/null; then | |
2793 gcc_cv_as_cfi_directive=yes | |
2794 else | |
2795 gcc_cv_as_cfi_directive=no | |
2796 fi | |
2797 ;; | |
2798 *) | |
2799 gcc_cv_as_cfi_directive=yes | |
2800 ;; | |
2801 esac | |
2802 fi | |
2803 else | 2838 else |
2804 # no objdump, err on the side of caution | 2839 as_32_opt="-m32" |
2805 gcc_cv_as_cfi_directive=no | 2840 as_64_opt="-m64" |
2806 fi | 2841 fi |
2807 else | 2842 case "$target" in |
2808 gcc_cv_as_cfi_directive=yes | 2843 sparc*-*-solaris2.*) |
2844 # On Solaris/SPARC, .eh_frame sections should always be read-write. | |
2845 if gcc_fn_eh_frame_ro $as_32_opt \ | |
2846 || gcc_fn_eh_frame_ro $as_64_opt; then | |
2847 gcc_cv_as_cfi_directive=no | |
2848 else | |
2849 gcc_cv_as_cfi_directive=yes | |
2850 fi | |
2851 ;; | |
2852 i?86-*-solaris2.* | x86_64-*-solaris2.*) | |
2853 # On Solaris/x86, make sure that GCC and assembler agree on using | |
2854 # read-only .eh_frame sections for 64-bit. | |
2855 if gcc_fn_eh_frame_ro $as_32_opt; then | |
2856 gcc_cv_as_cfi_directive=no | |
2857 elif gcc_fn_eh_frame_ro $as_64_opt; then | |
2858 gcc_cv_as_cfi_directive=yes | |
2859 else | |
2860 gcc_cv_as_cfi_directive=no | |
2861 fi | |
2862 ;; | |
2863 esac | |
2809 fi | 2864 fi |
2810 ;; | 2865 ;; |
2811 *-*-*) | 2866 *-*-*) |
2812 gcc_cv_as_cfi_directive=yes | 2867 gcc_cv_as_cfi_directive=yes |
2813 ;; | 2868 ;; |
2946 if test $gcc_cv_as_eh_frame = buggy; then | 3001 if test $gcc_cv_as_eh_frame = buggy; then |
2947 AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1, | 3002 AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1, |
2948 [Define if your assembler mis-optimizes .eh_frame data.]) | 3003 [Define if your assembler mis-optimizes .eh_frame data.]) |
2949 fi | 3004 fi |
2950 | 3005 |
3006 # Test if the assembler supports the section flag 'e' or #exclude for | |
3007 # specifying an excluded section. | |
3008 gcc_GAS_CHECK_FEATURE([section exclude flag], gcc_cv_as_section_exclude_e, | |
3009 [2,22,51], [--fatal-warnings], | |
3010 [.section foo1,"e" | |
3011 .byte 0,0,0,0]) | |
3012 if test $gcc_cv_as_section_exclude_e = no; then | |
3013 case "${target}" in | |
3014 # Solaris as uses #exclude instead. | |
3015 *-*-solaris2*) | |
3016 case "${target}" in | |
3017 sparc*-*-solaris2*) | |
3018 conftest_s='.section "foo1", #exclude' | |
3019 ;; | |
3020 i?86-*-solaris2* | x86_64-*-solaris2*) | |
3021 conftest_s='.section foo1, #exclude' | |
3022 ;; | |
3023 esac | |
3024 ;; | |
3025 esac | |
3026 gcc_GAS_CHECK_FEATURE([section exclude flag], gcc_cv_as_section_exclude_hash,,, | |
3027 [$conftest_s | |
3028 .byte 0,0,0,0]) | |
3029 fi | |
3030 AC_DEFINE_UNQUOTED(HAVE_GAS_SECTION_EXCLUDE, | |
3031 [`if test $gcc_cv_as_section_exclude_e = yes || test $gcc_cv_as_section_exclude_hash = yes; then echo 1; else echo 0; fi`], | |
3032 [Define if your assembler supports specifying the exclude section flag.]) | |
3033 | |
2951 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, | 3034 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, |
2952 [elf,2,12,0], [--fatal-warnings], | 3035 [elf,2,12,0], [--fatal-warnings], |
2953 [.section .rodata.str, "aMS", @progbits, 1]) | 3036 [.section .rodata.str, "aMS", @progbits, 1]) |
2954 if test $gcc_cv_as_shf_merge = no; then | 3037 if test $gcc_cv_as_shf_merge = no; then |
2955 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, | 3038 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, |
2956 [elf,2,12,0], [--fatal-warnings], | 3039 [elf,2,12,0], [--fatal-warnings], |
2957 [.section .rodata.str, "aMS", %progbits, 1]) | 3040 [.section .rodata.str, "aMS", %progbits, 1]) |
2958 fi | 3041 fi |
3042 case "$target" in | |
3043 i?86-*-solaris2.10* | x86_64-*-solaris2.10*) | |
3044 # SHF_MERGE support in Solaris 10/x86 ld is broken. | |
3045 if test x"$gnu_ld" = xno; then | |
3046 gcc_cv_as_shf_merge=no | |
3047 fi | |
3048 ;; | |
3049 esac | |
2959 AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE, | 3050 AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE, |
2960 [`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`], | 3051 [`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`], |
2961 [Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.]) | 3052 [Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.]) |
3053 | |
3054 gcc_cv_ld_aligned_shf_merge=yes | |
3055 case "$target" in | |
3056 # While Solaris 10/SPARC ld isn't affected, disable to avoid problems | |
3057 # relinking on Solaris 11 < 11.4. | |
3058 sparc*-*-solaris2.10*) | |
3059 if test x"$gnu_ld" = xno; then | |
3060 gcc_cv_ld_aligned_shf_merge=no | |
3061 fi | |
3062 ;; | |
3063 # SHF_MERGE support is broken in Solaris ld up to Solaris 11.3/SPARC for | |
3064 # alignment > 1. | |
3065 sparc*-*-solaris2.11*) | |
3066 if test x"$gnu_ld" = xno \ | |
3067 && test "$ld_vers_major" -lt 2 && test "$ld_vers_minor" -lt 3159; then | |
3068 gcc_cv_ld_aligned_shf_merge=no | |
3069 fi | |
3070 ;; | |
3071 esac | |
3072 AC_DEFINE_UNQUOTED(HAVE_LD_ALIGNED_SHF_MERGE, | |
3073 [`if test $gcc_cv_ld_aligned_shf_merge = yes; then echo 1; else echo 0; fi`], | |
3074 [Define 0/1 if your linker supports the SHF_MERGE flag with section alignment > 1.]) | |
2962 | 3075 |
2963 gcc_GAS_CHECK_FEATURE([stabs directive], gcc_cv_as_stabs_directive, ,, | 3076 gcc_GAS_CHECK_FEATURE([stabs directive], gcc_cv_as_stabs_directive, ,, |
2964 [.stabs "gcc2_compiled.",60,0,0,0],, | 3077 [.stabs "gcc2_compiled.",60,0,0,0],, |
2965 [AC_DEFINE(HAVE_AS_STABS_DIRECTIVE, 1, | 3078 [AC_DEFINE(HAVE_AS_STABS_DIRECTIVE, 1, |
2966 [Define if your assembler supports .stabs.])]) | 3079 [Define if your assembler supports .stabs.])]) |
3069 AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP, | 3182 AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP, |
3070 [`if test $gcc_cv_as_comdat_group = yes \ | 3183 [`if test $gcc_cv_as_comdat_group = yes \ |
3071 || test $gcc_cv_as_comdat_group_percent = yes \ | 3184 || test $gcc_cv_as_comdat_group_percent = yes \ |
3072 || test $gcc_cv_as_comdat_group_group = yes; then echo 1; else echo 0; fi`], | 3185 || test $gcc_cv_as_comdat_group_group = yes; then echo 1; else echo 0; fi`], |
3073 [Define 0/1 if your assembler and linker support COMDAT groups.]) | 3186 [Define 0/1 if your assembler and linker support COMDAT groups.]) |
3187 | |
3188 # Restrict this test to Solaris/x86: other targets define this statically. | |
3189 case "${target}" in | |
3190 i?86-*-solaris2* | x86_64-*-solaris2*) | |
3191 AC_MSG_CHECKING(support for hidden thunks in linkonce sections) | |
3192 if test $in_tree_ld = yes || echo "$ld_ver" | grep GNU > /dev/null; then | |
3193 hidden_linkonce=yes | |
3194 else | |
3195 case "${target}" in | |
3196 # Full support for hidden thunks in linkonce sections only appeared in | |
3197 # Solaris 11/OpenSolaris. | |
3198 *-*-solaris2.1[[1-9]]*) | |
3199 hidden_linkonce=yes | |
3200 ;; | |
3201 *) | |
3202 hidden_linkonce=no | |
3203 ;; | |
3204 esac | |
3205 fi | |
3206 AC_MSG_RESULT($hidden_linkonce) | |
3207 AC_DEFINE_UNQUOTED(USE_HIDDEN_LINKONCE, | |
3208 [`if test $hidden_linkonce = yes; then echo 1; else echo 0; fi`], | |
3209 [Define 0/1 if your linker supports hidden thunks in linkonce sections.]) | |
3210 ;; | |
3211 esac | |
3212 | |
3213 gcc_GAS_CHECK_FEATURE([line table is_stmt support], | |
3214 gcc_cv_as_is_stmt, | |
3215 [2,16,92],, | |
3216 [ .text | |
3217 .file 1 "conf.c" | |
3218 .loc 1 1 0 is_stmt 1],, | |
3219 [AC_DEFINE(HAVE_GAS_LOC_STMT, 1, | |
3220 [Define if your assembler supports the .loc is_stmt sub-directive.])]) | |
3074 | 3221 |
3075 gcc_GAS_CHECK_FEATURE([line table discriminator support], | 3222 gcc_GAS_CHECK_FEATURE([line table discriminator support], |
3076 gcc_cv_as_discriminator, | 3223 gcc_cv_as_discriminator, |
3077 [2,19,51],, | 3224 [2,19,51],, |
3078 [ .text | 3225 [ .text |
3615 AC_DEFINE_UNQUOTED(LD_DYNAMIC_OPTION, "$gcc_cv_ld_dynamic_option", | 3762 AC_DEFINE_UNQUOTED(LD_DYNAMIC_OPTION, "$gcc_cv_ld_dynamic_option", |
3616 [Define to the linker option to enable use of shared objects.]) | 3763 [Define to the linker option to enable use of shared objects.]) |
3617 fi | 3764 fi |
3618 AC_MSG_RESULT($gcc_cv_ld_static_dynamic) | 3765 AC_MSG_RESULT($gcc_cv_ld_static_dynamic) |
3619 | 3766 |
3767 AC_MSG_CHECKING(linker --version-script option) | |
3768 gcc_cv_ld_version_script=no | |
3769 ld_version_script_option='' | |
3770 if test $in_tree_ld = yes || test x"$gnu_ld" = xyes; then | |
3771 gcc_cv_ld_version_script=yes | |
3772 ld_version_script_option='--version-script' | |
3773 elif test x$gcc_cv_ld != x; then | |
3774 case "$target" in | |
3775 # Solaris 2 ld always supports -M. It also supports a subset of | |
3776 # --version-script since Solaris 11.4, but requires | |
3777 # -z gnu-version-script-compat to activate. | |
3778 *-*-solaris2*) | |
3779 gcc_cv_ld_version_script=yes | |
3780 ld_version_script_option='-M' | |
3781 ;; | |
3782 esac | |
3783 fi | |
3784 # Don't AC_DEFINE result, only used in jit/Make-lang.in so far. | |
3785 AC_MSG_RESULT($gcc_cv_ld_version_script) | |
3786 AC_SUBST(ld_version_script_option) | |
3787 | |
3788 AC_MSG_CHECKING(linker soname option) | |
3789 gcc_cv_ld_soname=no | |
3790 if test $in_tree_ld = yes || test x"$gnu_ld" = xyes; then | |
3791 gcc_cv_ld_soname=yes | |
3792 ld_soname_option='-soname' | |
3793 elif test x$gcc_cv_ld != x; then | |
3794 case "$target" in | |
3795 *-*-darwin*) | |
3796 gcc_cv_ld_soname=yes | |
3797 ld_soname_option='-install_name' | |
3798 ;; | |
3799 # Solaris 2 ld always supports -h. It also supports --soname for GNU | |
3800 # ld compatiblity since some Solaris 10 update. | |
3801 *-*-solaris2*) | |
3802 gcc_cv_ld_soname=yes | |
3803 ld_soname_option='-h' | |
3804 ;; | |
3805 esac | |
3806 fi | |
3807 # Don't AC_DEFINE result, only used in jit/Make-lang.in so far. | |
3808 AC_MSG_RESULT($gcc_cv_ld_soname) | |
3809 AC_SUBST(ld_soname_option) | |
3810 | |
3620 if test x"$demangler_in_ld" = xyes; then | 3811 if test x"$demangler_in_ld" = xyes; then |
3621 AC_MSG_CHECKING(linker --demangle support) | 3812 AC_MSG_CHECKING(linker --demangle support) |
3622 gcc_cv_ld_demangle=no | 3813 gcc_cv_ld_demangle=no |
3623 if test $in_tree_ld = yes; then | 3814 if test $in_tree_ld = yes; then |
3624 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \ | 3815 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \ |
4118 gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,, | 4309 gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,, |
4119 [-xbrace_comment=no], [.text],, | 4310 [-xbrace_comment=no], [.text],, |
4120 [AC_DEFINE(HAVE_AS_XBRACE_COMMENT_OPTION, 1, | 4311 [AC_DEFINE(HAVE_AS_XBRACE_COMMENT_OPTION, 1, |
4121 [Define if your assembler supports -xbrace_comment option.])]) | 4312 [Define if your assembler supports -xbrace_comment option.])]) |
4122 | 4313 |
4123 # Test if the assembler supports the section flag 'e' for specifying | |
4124 # an excluded section. | |
4125 gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e, | |
4126 [2,22,51], [--fatal-warnings], | |
4127 [.section foo1,"e" | |
4128 .byte 0,0,0,0]) | |
4129 AC_DEFINE_UNQUOTED(HAVE_GAS_SECTION_EXCLUDE, | |
4130 [`if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi`], | |
4131 [Define if your assembler supports specifying the section flag e.]) | |
4132 | |
4133 gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], | 4314 gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], |
4134 gcc_cv_as_ix86_filds,,, | 4315 gcc_cv_as_ix86_filds,,, |
4135 [filds (%ebp); fists (%ebp)],, | 4316 [filds (%ebp); fists (%ebp)],, |
4136 [AC_DEFINE(HAVE_AS_IX86_FILDS, 1, | 4317 [AC_DEFINE(HAVE_AS_IX86_FILDS, 1, |
4137 [Define if your assembler uses filds and fists mnemonics.])]) | 4318 [Define if your assembler uses filds and fists mnemonics.])]) |
4405 [$conftest_s],, | 4586 [$conftest_s],, |
4406 [AC_DEFINE(HAVE_AS_MFCRF, 1, | 4587 [AC_DEFINE(HAVE_AS_MFCRF, 1, |
4407 [Define if your assembler supports mfcr field.])]) | 4588 [Define if your assembler supports mfcr field.])]) |
4408 | 4589 |
4409 case $target in | 4590 case $target in |
4410 *-*-aix*) conftest_s=' .machine "pwr5" | |
4411 .csect .text[[PR]] | |
4412 popcntb 3,3';; | |
4413 *) conftest_s=' .machine power5 | |
4414 .text | |
4415 popcntb 3,3';; | |
4416 esac | |
4417 | |
4418 gcc_GAS_CHECK_FEATURE([popcntb support], | |
4419 gcc_cv_as_powerpc_popcntb, [2,17,0],, | |
4420 [$conftest_s],, | |
4421 [AC_DEFINE(HAVE_AS_POPCNTB, 1, | |
4422 [Define if your assembler supports popcntb field.])]) | |
4423 | |
4424 case $target in | |
4425 *-*-aix*) conftest_s=' .machine "pwr5x" | |
4426 .csect .text[[PR]] | |
4427 frin 1,1';; | |
4428 *) conftest_s=' .machine power5 | |
4429 .text | |
4430 frin 1,1';; | |
4431 esac | |
4432 | |
4433 gcc_GAS_CHECK_FEATURE([fp round support], | |
4434 gcc_cv_as_powerpc_fprnd, [2,17,0],, | |
4435 [$conftest_s],, | |
4436 [AC_DEFINE(HAVE_AS_FPRND, 1, | |
4437 [Define if your assembler supports fprnd.])]) | |
4438 | |
4439 case $target in | |
4440 *-*-aix*) conftest_s=' .machine "pwr6" | |
4441 .csect .text[[PR]] | |
4442 mffgpr 1,3';; | |
4443 *) conftest_s=' .machine power6 | |
4444 .text | |
4445 mffgpr 1,3';; | |
4446 esac | |
4447 | |
4448 gcc_GAS_CHECK_FEATURE([move fp gpr support], | |
4449 gcc_cv_as_powerpc_mfpgpr, [2,19,2],, | |
4450 [$conftest_s],, | |
4451 [AC_DEFINE(HAVE_AS_MFPGPR, 1, | |
4452 [Define if your assembler supports mffgpr and mftgpr.])]) | |
4453 | |
4454 case $target in | |
4455 *-*-aix*) conftest_s=' .csect .text[[PR]] | 4591 *-*-aix*) conftest_s=' .csect .text[[PR]] |
4456 LCF..0: | 4592 LCF..0: |
4457 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | 4593 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; |
4458 *-*-darwin*) | 4594 *-*-darwin*) |
4459 conftest_s=' .text | 4595 conftest_s=' .text |
4469 [$conftest_s],, | 4605 [$conftest_s],, |
4470 [AC_DEFINE(HAVE_AS_REL16, 1, | 4606 [AC_DEFINE(HAVE_AS_REL16, 1, |
4471 [Define if your assembler supports R_PPC_REL16 relocs.])]) | 4607 [Define if your assembler supports R_PPC_REL16 relocs.])]) |
4472 | 4608 |
4473 case $target in | 4609 case $target in |
4474 *-*-aix*) conftest_s=' .machine "pwr6" | |
4475 .csect .text[[PR]] | |
4476 cmpb 3,4,5';; | |
4477 *) conftest_s=' .machine power6 | |
4478 .text | |
4479 cmpb 3,4,5';; | |
4480 esac | |
4481 | |
4482 gcc_GAS_CHECK_FEATURE([compare bytes support], | |
4483 gcc_cv_as_powerpc_cmpb, [2,19,2], -a32, | |
4484 [$conftest_s],, | |
4485 [AC_DEFINE(HAVE_AS_CMPB, 1, | |
4486 [Define if your assembler supports cmpb.])]) | |
4487 | |
4488 case $target in | |
4489 *-*-aix*) conftest_s=' .machine "pwr6" | |
4490 .csect .text[[PR]] | |
4491 dadd 1,2,3';; | |
4492 *) conftest_s=' .machine power6 | |
4493 .text | |
4494 dadd 1,2,3';; | |
4495 esac | |
4496 | |
4497 gcc_GAS_CHECK_FEATURE([decimal float support], | |
4498 gcc_cv_as_powerpc_dfp, [2,19,2], -a32, | |
4499 [$conftest_s],, | |
4500 [AC_DEFINE(HAVE_AS_DFP, 1, | |
4501 [Define if your assembler supports DFP instructions.])]) | |
4502 | |
4503 case $target in | |
4504 *-*-aix*) conftest_s=' .machine "pwr7" | 4610 *-*-aix*) conftest_s=' .machine "pwr7" |
4505 .csect .text[[PR]] | 4611 .csect .text[[PR]] |
4506 lxvd2x 1,2,3';; | 4612 lxvd2x 1,2,3';; |
4507 *) conftest_s=' .machine power7 | 4613 *) conftest_s=' .machine power7 |
4508 .text | 4614 .text |
4512 gcc_GAS_CHECK_FEATURE([vector-scalar support], | 4618 gcc_GAS_CHECK_FEATURE([vector-scalar support], |
4513 gcc_cv_as_powerpc_vsx, [2,19,2], -a32, | 4619 gcc_cv_as_powerpc_vsx, [2,19,2], -a32, |
4514 [$conftest_s],, | 4620 [$conftest_s],, |
4515 [AC_DEFINE(HAVE_AS_VSX, 1, | 4621 [AC_DEFINE(HAVE_AS_VSX, 1, |
4516 [Define if your assembler supports VSX instructions.])]) | 4622 [Define if your assembler supports VSX instructions.])]) |
4517 | |
4518 case $target in | |
4519 *-*-aix*) conftest_s=' .machine "pwr7" | |
4520 .csect .text[[PR]] | |
4521 popcntd 3,3';; | |
4522 *) conftest_s=' .machine power7 | |
4523 .text | |
4524 popcntd 3,3';; | |
4525 esac | |
4526 | |
4527 gcc_GAS_CHECK_FEATURE([popcntd support], | |
4528 gcc_cv_as_powerpc_popcntd, [2,19,2], -a32, | |
4529 [$conftest_s],, | |
4530 [AC_DEFINE(HAVE_AS_POPCNTD, 1, | |
4531 [Define if your assembler supports POPCNTD instructions.])]) | |
4532 | |
4533 case $target in | |
4534 *-*-aix*) conftest_s=' .machine "pwr8" | |
4535 .csect .text[[PR]]';; | |
4536 *) conftest_s=' .machine power8 | |
4537 .text';; | |
4538 esac | |
4539 | |
4540 gcc_GAS_CHECK_FEATURE([power8 support], | |
4541 gcc_cv_as_powerpc_power8, [2,19,2], -a32, | |
4542 [$conftest_s],, | |
4543 [AC_DEFINE(HAVE_AS_POWER8, 1, | |
4544 [Define if your assembler supports POWER8 instructions.])]) | |
4545 | |
4546 case $target in | |
4547 *-*-aix*) conftest_s=' .machine "pwr9" | |
4548 .csect .text[[PR]]';; | |
4549 *) conftest_s=' .machine power9 | |
4550 .text';; | |
4551 esac | |
4552 | |
4553 gcc_GAS_CHECK_FEATURE([power9 support], | |
4554 gcc_cv_as_powerpc_power9, [2,19,2], -a32, | |
4555 [$conftest_s],, | |
4556 [AC_DEFINE(HAVE_AS_POWER9, 1, | |
4557 [Define if your assembler supports POWER9 instructions.])]) | |
4558 | |
4559 case $target in | |
4560 *-*-aix*) conftest_s=' .csect .text[[PR]] | |
4561 lwsync';; | |
4562 *) conftest_s=' .text | |
4563 lwsync';; | |
4564 esac | |
4565 | |
4566 gcc_GAS_CHECK_FEATURE([lwsync support], | |
4567 gcc_cv_as_powerpc_lwsync, [2,19,2], -a32, | |
4568 [$conftest_s],, | |
4569 [AC_DEFINE(HAVE_AS_LWSYNC, 1, | |
4570 [Define if your assembler supports LWSYNC instructions.])]) | |
4571 | |
4572 case $target in | |
4573 *-*-aix*) conftest_s=' .machine "476" | |
4574 .csect .text[[PR]] | |
4575 dci 0';; | |
4576 *) conftest_s=' .machine "476" | |
4577 .text | |
4578 dci 0';; | |
4579 esac | |
4580 | |
4581 gcc_GAS_CHECK_FEATURE([data cache invalidate support], | |
4582 gcc_cv_as_powerpc_dci, [9,99,0], -a32, | |
4583 [$conftest_s],, | |
4584 [AC_DEFINE(HAVE_AS_DCI, 1, | |
4585 [Define if your assembler supports the DCI/ICI instructions.])]) | |
4586 | 4623 |
4587 gcc_GAS_CHECK_FEATURE([.gnu_attribute support], | 4624 gcc_GAS_CHECK_FEATURE([.gnu_attribute support], |
4588 gcc_cv_as_powerpc_gnu_attribute, [2,18,0],, | 4625 gcc_cv_as_powerpc_gnu_attribute, [2,18,0],, |
4589 [.gnu_attribute 4,1],, | 4626 [.gnu_attribute 4,1],, |
4590 [AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1, | 4627 [AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1, |
4825 # info to the output file. So, as supported targets are added to gas 2.11, | 4862 # info to the output file. So, as supported targets are added to gas 2.11, |
4826 # add some instruction here to (also) show we expect this might work. | 4863 # add some instruction here to (also) show we expect this might work. |
4827 # ??? Once 2.11 is released, probably need to add first known working | 4864 # ??? Once 2.11 is released, probably need to add first known working |
4828 # version to the per-target configury. | 4865 # version to the per-target configury. |
4829 case "$cpu_type" in | 4866 case "$cpu_type" in |
4830 aarch64 | alpha | arc | arm | avr | bfin | cris | i386 | m32c | m68k \ | 4867 aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | m32c | m68k \ |
4831 | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu \ | 4868 | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu \ |
4832 | tilegx | tilepro | visium | xstormy16 | xtensa) | 4869 | tilegx | tilepro | visium | xstormy16 | xtensa) |
4833 insn="nop" | 4870 insn="nop" |
4834 ;; | 4871 ;; |
4835 ia64 | s390) | 4872 ia64 | s390) |
4862 [ .file 1 "foo.s" | 4899 [ .file 1 "foo.s" |
4863 .file 1 "bar.s"]) | 4900 .file 1 "bar.s"]) |
4864 | 4901 |
4865 if test $gcc_cv_as_dwarf2_debug_line = yes \ | 4902 if test $gcc_cv_as_dwarf2_debug_line = yes \ |
4866 && test $gcc_cv_as_dwarf2_file_buggy = no; then | 4903 && test $gcc_cv_as_dwarf2_file_buggy = no; then |
4867 AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1, | 4904 AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1, |
4868 [Define if your assembler supports dwarf2 .file/.loc directives, | 4905 [Define if your assembler supports dwarf2 .file/.loc directives, |
4869 and preserves file table indices exactly as given.]) | 4906 and preserves file table indices exactly as given.]) |
4907 | |
4908 if test $gcc_cv_as_leb128 = yes; then | |
4909 conftest_s="\ | |
4910 .file 1 \"conftest.s\" | |
4911 .loc 1 3 0 view .LVU1 | |
4912 $insn | |
4913 .data | |
4914 .uleb128 .LVU1 | |
4915 .uleb128 .LVU1 | |
4916 " | |
4917 gcc_GAS_CHECK_FEATURE([dwarf2 debug_view support], | |
4918 gcc_cv_as_dwarf2_debug_view, | |
4919 [elf,2,27,0],,[$conftest_s],, | |
4920 [AC_DEFINE(HAVE_AS_DWARF2_DEBUG_VIEW, 1, | |
4921 [Define if your assembler supports views in dwarf2 .loc directives.])]) | |
4922 fi | |
4870 fi | 4923 fi |
4871 | 4924 |
4872 gcc_GAS_CHECK_FEATURE([--gdwarf2 option], | 4925 gcc_GAS_CHECK_FEATURE([--gdwarf2 option], |
4873 gcc_cv_as_gdwarf2_flag, | 4926 gcc_cv_as_gdwarf2_flag, |
4874 [elf,2,11,0], [--gdwarf2], [$insn],, | 4927 [elf,2,11,0], [--gdwarf2], [$insn],, |
5106 ;; | 5159 ;; |
5107 esac | 5160 esac |
5108 else | 5161 else |
5109 case "$target" in | 5162 case "$target" in |
5110 *-*-solaris2.1[[1-9]]*) | 5163 *-*-solaris2.1[[1-9]]*) |
5111 # Solaris 11.x and Solaris 12 added PIE support. | 5164 # Solaris 11.3 added PIE support. |
5112 if $gcc_cv_ld -z help 2>&1 | grep -- type.*pie > /dev/null; then | 5165 if $gcc_cv_ld -z help 2>&1 | grep -- type.*pie > /dev/null; then |
5113 gcc_cv_ld_pie=yes | 5166 gcc_cv_ld_pie=yes |
5114 fi | 5167 fi |
5115 ;; | 5168 ;; |
5116 esac | 5169 esac |
5417 gcc_cv_ld_no_as_needed_option='--no-as-needed' | 5470 gcc_cv_ld_no_as_needed_option='--no-as-needed' |
5418 if test $in_tree_ld = yes ; then | 5471 if test $in_tree_ld = yes ; then |
5419 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 \ | 5472 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 \ |
5420 && test $in_tree_ld_is_elf = yes; then | 5473 && test $in_tree_ld_is_elf = yes; then |
5421 gcc_cv_ld_as_needed=yes | 5474 gcc_cv_ld_as_needed=yes |
5475 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 28; then | |
5476 gcc_cv_ld_as_needed_option='--push-state --as-needed' | |
5477 gcc_cv_ld_no_as_needed_option='--pop-state' | |
5478 fi | |
5422 fi | 5479 fi |
5423 elif test x$gcc_cv_ld != x; then | 5480 elif test x$gcc_cv_ld != x; then |
5424 # Check if linker supports --as-needed and --no-as-needed options | 5481 # Check if linker supports --as-needed and --no-as-needed options |
5425 if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then | 5482 if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then |
5426 gcc_cv_ld_as_needed=yes | 5483 gcc_cv_ld_as_needed=yes |
5484 if $gcc_cv_ld --help 2>&1 | grep push-state > /dev/null \ | |
5485 && $gcc_cv_ld --help 2>&1 | grep pop-state > /dev/null \ | |
5486 && echo "$ld_ver" | grep GNU > /dev/null \ | |
5487 && test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -ge 28; then | |
5488 # Use these options only when both ld.bfd and ld.gold support | |
5489 # --push-state/--pop-state, which unfortunately wasn't added | |
5490 # at the same time. | |
5491 gcc_cv_ld_as_needed_option='--push-state --as-needed' | |
5492 gcc_cv_ld_no_as_needed_option='--pop-state' | |
5493 fi | |
5427 fi | 5494 fi |
5428 case "$target:$gnu_ld" in | 5495 case "$target:$gnu_ld" in |
5429 *-*-solaris2*:no) | 5496 *-*-solaris2*:no) |
5430 # Solaris 2 ld always supports -z ignore/-z record. Prefer the native | 5497 # Solaris 2 ld always supports -z ignore/-z record. Prefer the native |
5431 # forms. | 5498 # forms. |
5766 if test x$gcc_cv_solaris_crts = xyes; then | 5833 if test x$gcc_cv_solaris_crts = xyes; then |
5767 AC_DEFINE(HAVE_SOLARIS_CRTS, 1, | 5834 AC_DEFINE(HAVE_SOLARIS_CRTS, 1, |
5768 [Define if the system-provided CRTs are present on Solaris.]) | 5835 [Define if the system-provided CRTs are present on Solaris.]) |
5769 fi | 5836 fi |
5770 | 5837 |
5838 AC_ARG_ENABLE(libssp, | |
5839 [AS_HELP_STRING([--enable-libssp], [enable linking against libssp])], | |
5840 [case "${enableval}" in | |
5841 yes|no) | |
5842 ;; | |
5843 *) | |
5844 AC_MSG_ERROR([unknown libssp setting $enableval]) | |
5845 ;; | |
5846 esac], []) | |
5847 | |
5771 # Test for stack protector support in target C library. | 5848 # Test for stack protector support in target C library. |
5772 AC_CACHE_CHECK(__stack_chk_fail in target C library, | 5849 AC_CACHE_CHECK(__stack_chk_fail in target C library, |
5773 gcc_cv_libc_provides_ssp, | 5850 gcc_cv_libc_provides_ssp, |
5774 [gcc_cv_libc_provides_ssp=no | 5851 [gcc_cv_libc_provides_ssp=no |
5852 if test "x$enable_libssp" = "xno"; then | |
5853 gcc_cv_libc_provides_ssp=yes | |
5854 elif test "x$enable_libssp" = "xyes"; then | |
5855 gcc_cv_libc_provides_ssp=no | |
5856 else | |
5775 case "$target" in | 5857 case "$target" in |
5776 *-*-musl*) | 5858 *-*-musl*) |
5777 # All versions of musl provide stack protector | 5859 # All versions of musl provide stack protector |
5778 gcc_cv_libc_provides_ssp=yes;; | 5860 gcc_cv_libc_provides_ssp=yes;; |
5779 *-*-linux* | *-*-kfreebsd*-gnu) | 5861 *-*-linux* | *-*-kfreebsd*-gnu) |
5806 gcc_cv_libc_provides_ssp=yes;; | 5888 gcc_cv_libc_provides_ssp=yes;; |
5807 *-*-darwin* | *-*-freebsd* | *-*-netbsd*) | 5889 *-*-darwin* | *-*-freebsd* | *-*-netbsd*) |
5808 AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], | 5890 AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], |
5809 [echo "no __stack_chk_fail on this target"]) | 5891 [echo "no __stack_chk_fail on this target"]) |
5810 ;; | 5892 ;; |
5811 *) gcc_cv_libc_provides_ssp=no ;; | 5893 *) gcc_cv_libc_provides_ssp=no ;; |
5812 esac]) | 5894 esac |
5895 fi]) | |
5813 | 5896 |
5814 if test x$gcc_cv_libc_provides_ssp = xyes; then | 5897 if test x$gcc_cv_libc_provides_ssp = xyes; then |
5815 AC_DEFINE(TARGET_LIBC_PROVIDES_SSP, 1, | 5898 AC_DEFINE(TARGET_LIBC_PROVIDES_SSP, 1, |
5816 [Define if your target C library provides stack protector support]) | 5899 [Define if your target C library provides stack protector support]) |
5817 fi | 5900 fi |
5868 esac | 5951 esac |
5869 if test x$gcc_cv_target_ldbl128 = xyes; then | 5952 if test x$gcc_cv_target_ldbl128 = xyes; then |
5870 AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1, | 5953 AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1, |
5871 [Define if TFmode long double should be the default]) | 5954 [Define if TFmode long double should be the default]) |
5872 fi | 5955 fi |
5956 | |
5957 # Check if TFmode long double target should use the IBM extended double or IEEE | |
5958 # 128-bit floating point formats if long doubles are 128-bits long. The long | |
5959 # double type can only be switched on powerpc64 bit Linux systems where VSX is | |
5960 # supported. Other PowerPC systems do not build the IEEE 128-bit emulator in | |
5961 # libgcc. | |
5962 AC_ARG_WITH([long-double-format], | |
5963 [AS_HELP_STRING([--with-long-double-format={ieee,ibm}] | |
5964 [Specify whether PowerPC long double uses IEEE or IBM format])],[ | |
5965 case "$target:$with_long_double_format" in | |
5966 powerpc64le-*-linux*:ieee | powerpc64le-*-linux*:ibm) | |
5967 : | |
5968 ;; | |
5969 powerpc64-*-linux*:ieee | powerpc64-*-linux*:ibm) | |
5970 # IEEE 128-bit emulation is only built on 64-bit VSX Linux systems | |
5971 case "$with_cpu" in | |
5972 power7 | power8 | power9 | power1*) | |
5973 : | |
5974 ;; | |
5975 *) | |
5976 AC_MSG_ERROR([Configuration option --with-long-double-format is only \ | |
5977 supported if the default cpu is power7 or newer]) | |
5978 with_long_double_format="" | |
5979 ;; | |
5980 esac | |
5981 ;; | |
5982 xpowerpc64*-*-linux*:*) | |
5983 AC_MSG_ERROR([--with-long-double-format argument should be ibm or ieee]) | |
5984 with_long_double_format="" | |
5985 ;; | |
5986 *) | |
5987 AC_MSG_ERROR([Configure option --with-long-double-format is only supported \ | |
5988 on 64-bit PowerPC VSX Linux systems]) | |
5989 with_long_double_format="" | |
5990 ;; | |
5991 esac], | |
5992 []) | |
5873 | 5993 |
5874 # Check if the target LIBC supports exporting the AT_PLATFORM and AT_HWCAP | 5994 # Check if the target LIBC supports exporting the AT_PLATFORM and AT_HWCAP |
5875 # values in the TCB. Currently, only GLIBC 2.23 and later support this. | 5995 # values in the TCB. Currently, only GLIBC 2.23 and later support this. |
5876 gcc_cv_libc_provides_hwcap_in_tcb=no | 5996 gcc_cv_libc_provides_hwcap_in_tcb=no |
5877 case "$target" in | 5997 case "$target" in |
6106 for language in $all_selected_languages | 6226 for language in $all_selected_languages |
6107 do | 6227 do |
6108 check_languages="$check_languages check-$language" | 6228 check_languages="$check_languages check-$language" |
6109 done | 6229 done |
6110 | 6230 |
6231 selftest_languages= | |
6232 for language in $all_selected_languages | |
6233 do | |
6234 selftest_languages="$selftest_languages selftest-$language" | |
6235 done | |
6236 | |
6111 # We link each language in with a set of hooks, reached indirectly via | 6237 # We link each language in with a set of hooks, reached indirectly via |
6112 # lang.${target}. Only do so for selected languages. | 6238 # lang.${target}. Only do so for selected languages. |
6113 | 6239 |
6114 rm -f Make-hooks | 6240 rm -f Make-hooks |
6115 touch Make-hooks | 6241 touch Make-hooks |
6189 AC_SUBST(build_xm_file_list) | 6315 AC_SUBST(build_xm_file_list) |
6190 AC_SUBST(build_xm_include_list) | 6316 AC_SUBST(build_xm_include_list) |
6191 AC_SUBST(build_xm_defines) | 6317 AC_SUBST(build_xm_defines) |
6192 AC_SUBST(build_file_translate) | 6318 AC_SUBST(build_file_translate) |
6193 AC_SUBST(check_languages) | 6319 AC_SUBST(check_languages) |
6320 AC_SUBST(selftest_languages) | |
6194 AC_SUBST(cpp_install_dir) | 6321 AC_SUBST(cpp_install_dir) |
6195 AC_SUBST(xmake_file) | 6322 AC_SUBST(xmake_file) |
6196 AC_SUBST(tmake_file) | 6323 AC_SUBST(tmake_file) |
6197 AC_SUBST(TM_ENDIAN_CONFIG) | 6324 AC_SUBST(TM_ENDIAN_CONFIG) |
6198 AC_SUBST(TM_MULTILIB_CONFIG) | 6325 AC_SUBST(TM_MULTILIB_CONFIG) |
6346 AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT, | 6473 AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT, |
6347 [The default for -fdiagnostics-color option]) | 6474 [The default for -fdiagnostics-color option]) |
6348 | 6475 |
6349 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit | 6476 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit |
6350 # of jit/jit-playback.c. | 6477 # of jit/jit-playback.c. |
6478 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"` | |
6479 echo "gcc_driver_version: ${gcc_driver_version}" | |
6351 cat > gcc-driver-name.h <<EOF | 6480 cat > gcc-driver-name.h <<EOF |
6352 #define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_BASEVER}${exeext}" | 6481 #define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_driver_version}${exeext}" |
6353 EOF | 6482 EOF |
6354 | 6483 |
6355 # Check whether --enable-default-pie was given. | 6484 # Check whether --enable-default-pie was given. |
6356 AC_ARG_ENABLE(default-pie, | 6485 AC_ARG_ENABLE(default-pie, |
6357 [AS_HELP_STRING([--enable-default-pie], | 6486 [AS_HELP_STRING([--enable-default-pie], |