Mercurial > hg > CbC > CbC_gcc
comparison gcc/configure.ac @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | d34655255c78 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
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, |
726 unused parts of the compiler. With LEVEL, specify | 726 unused parts of the compiler. With LEVEL, specify |
727 optimization. Values are opt, noopt, | 727 optimization. Values are opt, noopt, |
728 default is noopt])], | 728 default is noopt])], |
729 [case "${enableval}" in | 729 [case "${enableval}" in |
730 yes|noopt) | 730 yes|noopt) |
731 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | 731 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0 -fkeep-static-functions" |
732 ;; | 732 ;; |
733 opt) | 733 opt) |
734 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | 734 coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2 -fkeep-static-functions" |
735 ;; | 735 ;; |
736 no) | 736 no) |
737 # a.k.a. --disable-coverage | 737 # a.k.a. --disable-coverage |
738 coverage_flags="" | 738 coverage_flags="" |
739 ;; | 739 ;; |
808 AC_MSG_RESULT($enable_multiarch$ma_msg_suffix) | 808 AC_MSG_RESULT($enable_multiarch$ma_msg_suffix) |
809 | 809 |
810 # needed for setting the multiarch name for soft-float/hard-float ABIs | 810 # needed for setting the multiarch name for soft-float/hard-float ABIs |
811 AC_SUBST(with_cpu) | 811 AC_SUBST(with_cpu) |
812 AC_SUBST(with_float) | 812 AC_SUBST(with_float) |
813 | |
814 # default stack clash protection guard size as power of twos in bytes. | |
815 # Please keep these in sync with params.def. | |
816 stk_clash_min=12 | |
817 stk_clash_max=30 | |
818 | |
819 # Keep the default value when the option is not used to 0, this allows us to | |
820 # distinguish between the cases where the user specifially set a value via | |
821 # configure and when the normal default value is used. | |
822 AC_ARG_WITH(stack-clash-protection-guard-size, | |
823 [AS_HELP_STRING([--with-stack-clash-protection-guard-size=size], | |
824 [Set the default stack clash protection guard size for specific targets as a power of two in bytes.])], | |
825 [DEFAULT_STK_CLASH_GUARD_SIZE="$with_stack_clash_protection_guard_size"], [DEFAULT_STK_CLASH_GUARD_SIZE=0]) | |
826 if test $DEFAULT_STK_CLASH_GUARD_SIZE -ne 0 \ | |
827 && (test $DEFAULT_STK_CLASH_GUARD_SIZE -lt $stk_clash_min \ | |
828 || test $DEFAULT_STK_CLASH_GUARD_SIZE -gt $stk_clash_max); then | |
829 AC_MSG_ERROR(m4_normalize([ | |
830 Invalid value $DEFAULT_STK_CLASH_GUARD_SIZE for --with-stack-clash-protection-guard-size. \ | |
831 Must be between $stk_clash_min and $stk_clash_max.])) | |
832 fi | |
833 | |
834 AC_DEFINE_UNQUOTED(DEFAULT_STK_CLASH_GUARD_SIZE, $DEFAULT_STK_CLASH_GUARD_SIZE, | |
835 [Define to larger than zero set the default stack clash protector size.]) | |
813 | 836 |
814 # Enable __cxa_atexit for C++. | 837 # Enable __cxa_atexit for C++. |
815 AC_ARG_ENABLE(__cxa_atexit, | 838 AC_ARG_ENABLE(__cxa_atexit, |
816 [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])], | 839 [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])], |
817 [], []) | 840 [], []) |
918 IFS="$ac_save_ifs" | 941 IFS="$ac_save_ifs" |
919 ;; | 942 ;; |
920 esac | 943 esac |
921 ], [enable_shared=yes]) | 944 ], [enable_shared=yes]) |
922 AC_SUBST(enable_shared) | 945 AC_SUBST(enable_shared) |
946 | |
947 AC_ARG_ENABLE(gcov, | |
948 [ --disable-gcov don't provide libgcov and related host tools], | |
949 [], [enable_gcov=yes]) | |
950 AC_SUBST(enable_gcov) | |
923 | 951 |
924 AC_ARG_WITH(specs, | 952 AC_ARG_WITH(specs, |
925 [AS_HELP_STRING([--with-specs=SPECS], | 953 [AS_HELP_STRING([--with-specs=SPECS], |
926 [add SPECS to driver command-line processing])], | 954 [add SPECS to driver command-line processing])], |
927 [CONFIGURE_SPECS=$withval], | 955 [CONFIGURE_SPECS=$withval], |
1737 changequote(,)dnl | 1765 changequote(,)dnl |
1738 # Compile in configure arguments. | 1766 # Compile in configure arguments. |
1739 if test -f configargs.h ; then | 1767 if test -f configargs.h ; then |
1740 # Being re-configured. | 1768 # Being re-configured. |
1741 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` | 1769 gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
1742 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" | 1770 gcc_reconf_arguments=`echo "$gcc_config_arguments" | sed -e 's/^.*\( : (reconfigured) .*$\)/\1/'` |
1771 if [ "$gcc_reconf_arguments" != " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" ]; then | |
1772 gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" | |
1773 fi | |
1743 else | 1774 else |
1744 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | 1775 gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" |
1745 fi | 1776 fi |
1746 | 1777 |
1747 # Double all backslashes and backslash all quotes to turn | 1778 # Double all backslashes and backslash all quotes to turn |
1818 [],[enable_mingw_wildcard=platform]) | 1849 [],[enable_mingw_wildcard=platform]) |
1819 AS_IF([test x"$enable_mingw_wildcard" != xplatform ], | 1850 AS_IF([test x"$enable_mingw_wildcard" != xplatform ], |
1820 [AC_DEFINE_UNQUOTED(MINGW_DOWILDCARD, | 1851 [AC_DEFINE_UNQUOTED(MINGW_DOWILDCARD, |
1821 $(test x"$enable_mingw_wildcard" = xno; echo $?), | 1852 $(test x"$enable_mingw_wildcard" = xno; echo $?), |
1822 [Value to set mingw's _dowildcard to.])]) | 1853 [Value to set mingw's _dowildcard to.])]) |
1854 | |
1855 AC_ARG_ENABLE(large-address-aware, | |
1856 [AS_HELP_STRING([--enable-large-address-aware], | |
1857 [Link mingw executables with --large-address-aware])]) | |
1858 AS_IF([test x"$enable_large_address_aware" = xyes], | |
1859 [AC_DEFINE([MINGW_DEFAULT_LARGE_ADDR_AWARE], 1, | |
1860 [Define if we should link mingw executables with --large-address-aware])]) | |
1823 | 1861 |
1824 AC_ARG_ENABLE(leading-mingw64-underscores, | 1862 AC_ARG_ENABLE(leading-mingw64-underscores, |
1825 AS_HELP_STRING([--enable-leading-mingw64-underscores], | 1863 AS_HELP_STRING([--enable-leading-mingw64-underscores], |
1826 [enable leading underscores on 64 bit mingw targets]), | 1864 [enable leading underscores on 64 bit mingw targets]), |
1827 [],[]) | 1865 [],[]) |
2585 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | 2623 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` |
2586 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | 2624 ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` |
2587 else | 2625 else |
2588 case "${target}" in | 2626 case "${target}" in |
2589 *-*-solaris2*) | 2627 *-*-solaris2*) |
2590 # See acinclude.m4 (gcc_SUN_LD_VERSION) for the version number | 2628 # Solaris 2 ld -V output looks like this for a regular version: |
2591 # format. | |
2592 # | 2629 # |
2593 # Don't reuse gcc_gv_sun_ld_vers_* in case a linker other than | 2630 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1699 |
2594 # /usr/ccs/bin/ld has been configured. | 2631 # |
2632 # but test versions add stuff at the end: | |
2633 # | |
2634 # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 | |
2635 # | |
2636 # In Solaris 11.4, this was changed to | |
2637 # | |
2638 # ld: Solaris ELF Utilities: 11.4-1.3123 | |
2639 # | |
2640 # ld and ld.so.1 are guaranteed to be updated in lockstep, so ld version | |
2641 # numbers can be used in ld.so.1 feature checks even if a different | |
2642 # linker is configured. | |
2595 ld_ver=`$gcc_cv_ld -V 2>&1` | 2643 ld_ver=`$gcc_cv_ld -V 2>&1` |
2596 if echo "$ld_ver" | grep 'Solaris Link Editors' > /dev/null; then | 2644 if echo "$ld_ver" | $EGREP 'Solaris Link Editors|Solaris ELF Utilities' > /dev/null; then |
2597 ld_vers=`echo $ld_ver | sed -n \ | 2645 ld_vers=`echo $ld_ver | sed -n \ |
2598 -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'` | 2646 -e 's,^.*: \(5\|1[0-9]\)\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\2,p'` |
2599 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | 2647 ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
2600 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | 2648 ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` |
2601 fi | 2649 fi |
2602 ;; | 2650 ;; |
2603 esac | 2651 esac |
2742 [AC_DEFINE(HAVE_AS_LEB128, 1, | 2790 [AC_DEFINE(HAVE_AS_LEB128, 1, |
2743 [Define if your assembler supports .sleb128 and .uleb128.])], | 2791 [Define if your assembler supports .sleb128 and .uleb128.])], |
2744 [AC_DEFINE(HAVE_AS_LEB128, 0, | 2792 [AC_DEFINE(HAVE_AS_LEB128, 0, |
2745 [Define if your assembler supports .sleb128 and .uleb128.])]) | 2793 [Define if your assembler supports .sleb128 and .uleb128.])]) |
2746 | 2794 |
2795 # Determine if an .eh_frame section is read-only. | |
2796 gcc_fn_eh_frame_ro () { | |
2797 $gcc_cv_as $1 -o conftest.o conftest.s > /dev/null 2>&1 && \ | |
2798 $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
2799 sed -e '/.eh_frame/!d' -e N | grep READONLY > /dev/null | |
2800 } | |
2801 | |
2747 # Check if we have assembler support for unwind directives. | 2802 # Check if we have assembler support for unwind directives. |
2748 gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive, | 2803 gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive, |
2749 ,, | 2804 ,, |
2750 [ .text | 2805 [ .text |
2751 .cfi_startproc | 2806 .cfi_startproc |
2757 [case "$target" in | 2812 [case "$target" in |
2758 *-*-solaris*) | 2813 *-*-solaris*) |
2759 # If the linker used on Solaris (like Sun ld) isn't capable of merging | 2814 # If the linker used on Solaris (like Sun ld) isn't capable of merging |
2760 # read-only and read-write sections, we need to make sure that the | 2815 # read-only and read-write sections, we need to make sure that the |
2761 # assembler used emits read-write .eh_frame sections. | 2816 # assembler used emits read-write .eh_frame sections. |
2762 if test "x$gcc_cv_ld_ro_rw_mix" != xread-write; then | 2817 if test "x$gcc_cv_ld_ro_rw_mix" = xread-write; then |
2763 if test "x$gcc_cv_objdump" != x; then | 2818 gcc_cv_as_cfi_directive=yes |
2764 if $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | 2819 elif test "x$gcc_cv_objdump" = x; then |
2765 sed -e /.eh_frame/!d -e N | grep READONLY > /dev/null; then | 2820 # No objdump, err on the side of caution. |
2766 gcc_cv_as_cfi_directive=no | 2821 gcc_cv_as_cfi_directive=no |
2767 else | 2822 else |
2768 case "$target" in | 2823 if test x$gas = xyes; then |
2769 i?86-*-solaris2.1[[0-9]]* | x86_64-*-solaris2.1[[0-9]]*) | 2824 as_32_opt="--32" |
2770 # On Solaris/x86, make sure that GCC and assembler agree on using | 2825 as_64_opt="--64" |
2771 # read-only .eh_frame sections for 64-bit. | |
2772 if test x$gas = xyes; then | |
2773 as_ix86_64_opt="--64" | |
2774 else | |
2775 as_ix86_64_opt="-xarch=amd64" | |
2776 fi | |
2777 if $gcc_cv_as $as_ix86_64_opt -o conftest.o conftest.s > /dev/null 2>&1 && \ | |
2778 $gcc_cv_objdump -h conftest.o 2>/dev/null | \ | |
2779 sed -e /.eh_frame/!d -e N | \ | |
2780 grep READONLY > /dev/null; then | |
2781 gcc_cv_as_cfi_directive=yes | |
2782 else | |
2783 gcc_cv_as_cfi_directive=no | |
2784 fi | |
2785 ;; | |
2786 *) | |
2787 gcc_cv_as_cfi_directive=yes | |
2788 ;; | |
2789 esac | |
2790 fi | |
2791 else | 2826 else |
2792 # no objdump, err on the side of caution | 2827 as_32_opt="-m32" |
2793 gcc_cv_as_cfi_directive=no | 2828 as_64_opt="-m64" |
2794 fi | 2829 fi |
2795 else | 2830 case "$target" in |
2796 gcc_cv_as_cfi_directive=yes | 2831 sparc*-*-solaris2.*) |
2832 # On Solaris/SPARC, .eh_frame sections should always be read-write. | |
2833 if gcc_fn_eh_frame_ro $as_32_opt \ | |
2834 || gcc_fn_eh_frame_ro $as_64_opt; then | |
2835 gcc_cv_as_cfi_directive=no | |
2836 else | |
2837 gcc_cv_as_cfi_directive=yes | |
2838 fi | |
2839 ;; | |
2840 i?86-*-solaris2.* | x86_64-*-solaris2.*) | |
2841 # On Solaris/x86, make sure that GCC and assembler agree on using | |
2842 # read-only .eh_frame sections for 64-bit. | |
2843 if gcc_fn_eh_frame_ro $as_32_opt; then | |
2844 gcc_cv_as_cfi_directive=no | |
2845 elif gcc_fn_eh_frame_ro $as_64_opt; then | |
2846 gcc_cv_as_cfi_directive=yes | |
2847 else | |
2848 gcc_cv_as_cfi_directive=no | |
2849 fi | |
2850 ;; | |
2851 esac | |
2797 fi | 2852 fi |
2798 ;; | 2853 ;; |
2799 *-*-*) | 2854 *-*-*) |
2800 gcc_cv_as_cfi_directive=yes | 2855 gcc_cv_as_cfi_directive=yes |
2801 ;; | 2856 ;; |
2934 if test $gcc_cv_as_eh_frame = buggy; then | 2989 if test $gcc_cv_as_eh_frame = buggy; then |
2935 AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1, | 2990 AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1, |
2936 [Define if your assembler mis-optimizes .eh_frame data.]) | 2991 [Define if your assembler mis-optimizes .eh_frame data.]) |
2937 fi | 2992 fi |
2938 | 2993 |
2994 # Test if the assembler supports the section flag 'e' or #exclude for | |
2995 # specifying an excluded section. | |
2996 gcc_GAS_CHECK_FEATURE([section exclude flag], gcc_cv_as_section_exclude_e, | |
2997 [2,22,51], [--fatal-warnings], | |
2998 [.section foo1,"e" | |
2999 .byte 0,0,0,0]) | |
3000 if test $gcc_cv_as_section_exclude_e = no; then | |
3001 case "${target}" in | |
3002 # Solaris as uses #exclude instead. | |
3003 *-*-solaris2*) | |
3004 case "${target}" in | |
3005 sparc*-*-solaris2*) | |
3006 conftest_s='.section "foo1", #exclude' | |
3007 ;; | |
3008 i?86-*-solaris2* | x86_64-*-solaris2*) | |
3009 conftest_s='.section foo1, #exclude' | |
3010 ;; | |
3011 esac | |
3012 ;; | |
3013 esac | |
3014 gcc_GAS_CHECK_FEATURE([section exclude flag], gcc_cv_as_section_exclude_hash,,, | |
3015 [$conftest_s | |
3016 .byte 0,0,0,0]) | |
3017 fi | |
3018 AC_DEFINE_UNQUOTED(HAVE_GAS_SECTION_EXCLUDE, | |
3019 [`if test $gcc_cv_as_section_exclude_e = yes || test $gcc_cv_as_section_exclude_hash = yes; then echo 1; else echo 0; fi`], | |
3020 [Define if your assembler supports specifying the exclude section flag.]) | |
3021 | |
2939 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, | 3022 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, |
2940 [elf,2,12,0], [--fatal-warnings], | 3023 [elf,2,12,0], [--fatal-warnings], |
2941 [.section .rodata.str, "aMS", @progbits, 1]) | 3024 [.section .rodata.str, "aMS", @progbits, 1]) |
2942 if test $gcc_cv_as_shf_merge = no; then | 3025 if test $gcc_cv_as_shf_merge = no; then |
2943 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, | 3026 gcc_GAS_CHECK_FEATURE(section merging support, gcc_cv_as_shf_merge, |
2944 [elf,2,12,0], [--fatal-warnings], | 3027 [elf,2,12,0], [--fatal-warnings], |
2945 [.section .rodata.str, "aMS", %progbits, 1]) | 3028 [.section .rodata.str, "aMS", %progbits, 1]) |
2946 fi | 3029 fi |
3030 case "$target" in | |
3031 i?86-*-solaris2.10* | x86_64-*-solaris2.10*) | |
3032 # SHF_MERGE support in Solaris 10/x86 ld is broken. | |
3033 if test x"$gnu_ld" = xno; then | |
3034 gcc_cv_as_shf_merge=no | |
3035 fi | |
3036 ;; | |
3037 esac | |
2947 AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE, | 3038 AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE, |
2948 [`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`], | 3039 [`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`], |
2949 [Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.]) | 3040 [Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.]) |
3041 | |
3042 gcc_cv_ld_aligned_shf_merge=yes | |
3043 case "$target" in | |
3044 # While Solaris 10/SPARC ld isn't affected, disable to avoid problems | |
3045 # relinking on Solaris 11 < 11.4. | |
3046 sparc*-*-solaris2.10*) | |
3047 if test x"$gnu_ld" = xno; then | |
3048 gcc_cv_ld_aligned_shf_merge=no | |
3049 fi | |
3050 ;; | |
3051 # SHF_MERGE support is broken in Solaris ld up to Solaris 11.3/SPARC for | |
3052 # alignment > 1. | |
3053 sparc*-*-solaris2.11*) | |
3054 if test x"$gnu_ld" = xno \ | |
3055 && test "$ld_vers_major" -lt 2 && test "$ld_vers_minor" -lt 3159; then | |
3056 gcc_cv_ld_aligned_shf_merge=no | |
3057 fi | |
3058 ;; | |
3059 esac | |
3060 AC_DEFINE_UNQUOTED(HAVE_LD_ALIGNED_SHF_MERGE, | |
3061 [`if test $gcc_cv_ld_aligned_shf_merge = yes; then echo 1; else echo 0; fi`], | |
3062 [Define 0/1 if your linker supports the SHF_MERGE flag with section alignment > 1.]) | |
2950 | 3063 |
2951 gcc_GAS_CHECK_FEATURE([stabs directive], gcc_cv_as_stabs_directive, ,, | 3064 gcc_GAS_CHECK_FEATURE([stabs directive], gcc_cv_as_stabs_directive, ,, |
2952 [.stabs "gcc2_compiled.",60,0,0,0],, | 3065 [.stabs "gcc2_compiled.",60,0,0,0],, |
2953 [AC_DEFINE(HAVE_AS_STABS_DIRECTIVE, 1, | 3066 [AC_DEFINE(HAVE_AS_STABS_DIRECTIVE, 1, |
2954 [Define if your assembler supports .stabs.])]) | 3067 [Define if your assembler supports .stabs.])]) |
3057 AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP, | 3170 AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP, |
3058 [`if test $gcc_cv_as_comdat_group = yes \ | 3171 [`if test $gcc_cv_as_comdat_group = yes \ |
3059 || test $gcc_cv_as_comdat_group_percent = yes \ | 3172 || test $gcc_cv_as_comdat_group_percent = yes \ |
3060 || test $gcc_cv_as_comdat_group_group = yes; then echo 1; else echo 0; fi`], | 3173 || test $gcc_cv_as_comdat_group_group = yes; then echo 1; else echo 0; fi`], |
3061 [Define 0/1 if your assembler and linker support COMDAT groups.]) | 3174 [Define 0/1 if your assembler and linker support COMDAT groups.]) |
3175 | |
3176 # Restrict this test to Solaris/x86: other targets define this statically. | |
3177 case "${target}" in | |
3178 i?86-*-solaris2* | x86_64-*-solaris2*) | |
3179 AC_MSG_CHECKING(support for hidden thunks in linkonce sections) | |
3180 if test $in_tree_ld = yes || echo "$ld_ver" | grep GNU > /dev/null; then | |
3181 hidden_linkonce=yes | |
3182 else | |
3183 case "${target}" in | |
3184 # Full support for hidden thunks in linkonce sections only appeared in | |
3185 # Solaris 11/OpenSolaris. | |
3186 *-*-solaris2.1[[1-9]]*) | |
3187 hidden_linkonce=yes | |
3188 ;; | |
3189 *) | |
3190 hidden_linkonce=no | |
3191 ;; | |
3192 esac | |
3193 fi | |
3194 AC_MSG_RESULT($hidden_linkonce) | |
3195 AC_DEFINE_UNQUOTED(USE_HIDDEN_LINKONCE, | |
3196 [`if test $hidden_linkonce = yes; then echo 1; else echo 0; fi`], | |
3197 [Define 0/1 if your linker supports hidden thunks in linkonce sections.]) | |
3198 ;; | |
3199 esac | |
3200 | |
3201 gcc_GAS_CHECK_FEATURE([line table is_stmt support], | |
3202 gcc_cv_as_is_stmt, | |
3203 [2,16,92],, | |
3204 [ .text | |
3205 .file 1 "conf.c" | |
3206 .loc 1 1 0 is_stmt 1],, | |
3207 [AC_DEFINE(HAVE_GAS_LOC_STMT, 1, | |
3208 [Define if your assembler supports the .loc is_stmt sub-directive.])]) | |
3062 | 3209 |
3063 gcc_GAS_CHECK_FEATURE([line table discriminator support], | 3210 gcc_GAS_CHECK_FEATURE([line table discriminator support], |
3064 gcc_cv_as_discriminator, | 3211 gcc_cv_as_discriminator, |
3065 [2,19,51],, | 3212 [2,19,51],, |
3066 [ .text | 3213 [ .text |
3603 AC_DEFINE_UNQUOTED(LD_DYNAMIC_OPTION, "$gcc_cv_ld_dynamic_option", | 3750 AC_DEFINE_UNQUOTED(LD_DYNAMIC_OPTION, "$gcc_cv_ld_dynamic_option", |
3604 [Define to the linker option to enable use of shared objects.]) | 3751 [Define to the linker option to enable use of shared objects.]) |
3605 fi | 3752 fi |
3606 AC_MSG_RESULT($gcc_cv_ld_static_dynamic) | 3753 AC_MSG_RESULT($gcc_cv_ld_static_dynamic) |
3607 | 3754 |
3755 AC_MSG_CHECKING(linker --version-script option) | |
3756 gcc_cv_ld_version_script=no | |
3757 ld_version_script_option='' | |
3758 if test $in_tree_ld = yes || test x"$gnu_ld" = xyes; then | |
3759 gcc_cv_ld_version_script=yes | |
3760 ld_version_script_option='--version-script' | |
3761 elif test x$gcc_cv_ld != x; then | |
3762 case "$target" in | |
3763 # Solaris 2 ld always supports -M. It also supports a subset of | |
3764 # --version-script since Solaris 11.4, but requires | |
3765 # -z gnu-version-script-compat to activate. | |
3766 *-*-solaris2*) | |
3767 gcc_cv_ld_version_script=yes | |
3768 ld_version_script_option='-M' | |
3769 ;; | |
3770 esac | |
3771 fi | |
3772 # Don't AC_DEFINE result, only used in jit/Make-lang.in so far. | |
3773 AC_MSG_RESULT($gcc_cv_ld_version_script) | |
3774 AC_SUBST(ld_version_script_option) | |
3775 | |
3776 AC_MSG_CHECKING(linker soname option) | |
3777 gcc_cv_ld_soname=no | |
3778 if test $in_tree_ld = yes || test x"$gnu_ld" = xyes; then | |
3779 gcc_cv_ld_soname=yes | |
3780 ld_soname_option='-soname' | |
3781 elif test x$gcc_cv_ld != x; then | |
3782 case "$target" in | |
3783 *-*-darwin*) | |
3784 gcc_cv_ld_soname=yes | |
3785 ld_soname_option='-install_name' | |
3786 ;; | |
3787 # Solaris 2 ld always supports -h. It also supports --soname for GNU | |
3788 # ld compatiblity since some Solaris 10 update. | |
3789 *-*-solaris2*) | |
3790 gcc_cv_ld_soname=yes | |
3791 ld_soname_option='-h' | |
3792 ;; | |
3793 esac | |
3794 fi | |
3795 # Don't AC_DEFINE result, only used in jit/Make-lang.in so far. | |
3796 AC_MSG_RESULT($gcc_cv_ld_soname) | |
3797 AC_SUBST(ld_soname_option) | |
3798 | |
3608 if test x"$demangler_in_ld" = xyes; then | 3799 if test x"$demangler_in_ld" = xyes; then |
3609 AC_MSG_CHECKING(linker --demangle support) | 3800 AC_MSG_CHECKING(linker --demangle support) |
3610 gcc_cv_ld_demangle=no | 3801 gcc_cv_ld_demangle=no |
3611 if test $in_tree_ld = yes; then | 3802 if test $in_tree_ld = yes; then |
3612 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 \ | 3803 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 \ |
4106 gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,, | 4297 gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,, |
4107 [-xbrace_comment=no], [.text],, | 4298 [-xbrace_comment=no], [.text],, |
4108 [AC_DEFINE(HAVE_AS_XBRACE_COMMENT_OPTION, 1, | 4299 [AC_DEFINE(HAVE_AS_XBRACE_COMMENT_OPTION, 1, |
4109 [Define if your assembler supports -xbrace_comment option.])]) | 4300 [Define if your assembler supports -xbrace_comment option.])]) |
4110 | 4301 |
4111 # Test if the assembler supports the section flag 'e' for specifying | |
4112 # an excluded section. | |
4113 gcc_GAS_CHECK_FEATURE([.section with e], gcc_cv_as_section_has_e, | |
4114 [2,22,51], [--fatal-warnings], | |
4115 [.section foo1,"e" | |
4116 .byte 0,0,0,0]) | |
4117 AC_DEFINE_UNQUOTED(HAVE_GAS_SECTION_EXCLUDE, | |
4118 [`if test $gcc_cv_as_section_has_e = yes; then echo 1; else echo 0; fi`], | |
4119 [Define if your assembler supports specifying the section flag e.]) | |
4120 | |
4121 gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], | 4302 gcc_GAS_CHECK_FEATURE([filds and fists mnemonics], |
4122 gcc_cv_as_ix86_filds,,, | 4303 gcc_cv_as_ix86_filds,,, |
4123 [filds (%ebp); fists (%ebp)],, | 4304 [filds (%ebp); fists (%ebp)],, |
4124 [AC_DEFINE(HAVE_AS_IX86_FILDS, 1, | 4305 [AC_DEFINE(HAVE_AS_IX86_FILDS, 1, |
4125 [Define if your assembler uses filds and fists mnemonics.])]) | 4306 [Define if your assembler uses filds and fists mnemonics.])]) |
4393 [$conftest_s],, | 4574 [$conftest_s],, |
4394 [AC_DEFINE(HAVE_AS_MFCRF, 1, | 4575 [AC_DEFINE(HAVE_AS_MFCRF, 1, |
4395 [Define if your assembler supports mfcr field.])]) | 4576 [Define if your assembler supports mfcr field.])]) |
4396 | 4577 |
4397 case $target in | 4578 case $target in |
4398 *-*-aix*) conftest_s=' .machine "pwr5" | |
4399 .csect .text[[PR]] | |
4400 popcntb 3,3';; | |
4401 *) conftest_s=' .machine power5 | |
4402 .text | |
4403 popcntb 3,3';; | |
4404 esac | |
4405 | |
4406 gcc_GAS_CHECK_FEATURE([popcntb support], | |
4407 gcc_cv_as_powerpc_popcntb, [2,17,0],, | |
4408 [$conftest_s],, | |
4409 [AC_DEFINE(HAVE_AS_POPCNTB, 1, | |
4410 [Define if your assembler supports popcntb field.])]) | |
4411 | |
4412 case $target in | |
4413 *-*-aix*) conftest_s=' .machine "pwr5x" | |
4414 .csect .text[[PR]] | |
4415 frin 1,1';; | |
4416 *) conftest_s=' .machine power5 | |
4417 .text | |
4418 frin 1,1';; | |
4419 esac | |
4420 | |
4421 gcc_GAS_CHECK_FEATURE([fp round support], | |
4422 gcc_cv_as_powerpc_fprnd, [2,17,0],, | |
4423 [$conftest_s],, | |
4424 [AC_DEFINE(HAVE_AS_FPRND, 1, | |
4425 [Define if your assembler supports fprnd.])]) | |
4426 | |
4427 case $target in | |
4428 *-*-aix*) conftest_s=' .machine "pwr6" | |
4429 .csect .text[[PR]] | |
4430 mffgpr 1,3';; | |
4431 *) conftest_s=' .machine power6 | |
4432 .text | |
4433 mffgpr 1,3';; | |
4434 esac | |
4435 | |
4436 gcc_GAS_CHECK_FEATURE([move fp gpr support], | |
4437 gcc_cv_as_powerpc_mfpgpr, [2,19,2],, | |
4438 [$conftest_s],, | |
4439 [AC_DEFINE(HAVE_AS_MFPGPR, 1, | |
4440 [Define if your assembler supports mffgpr and mftgpr.])]) | |
4441 | |
4442 case $target in | |
4443 *-*-aix*) conftest_s=' .csect .text[[PR]] | 4579 *-*-aix*) conftest_s=' .csect .text[[PR]] |
4444 LCF..0: | 4580 LCF..0: |
4445 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | 4581 addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; |
4446 *-*-darwin*) | 4582 *-*-darwin*) |
4447 conftest_s=' .text | 4583 conftest_s=' .text |
4457 [$conftest_s],, | 4593 [$conftest_s],, |
4458 [AC_DEFINE(HAVE_AS_REL16, 1, | 4594 [AC_DEFINE(HAVE_AS_REL16, 1, |
4459 [Define if your assembler supports R_PPC_REL16 relocs.])]) | 4595 [Define if your assembler supports R_PPC_REL16 relocs.])]) |
4460 | 4596 |
4461 case $target in | 4597 case $target in |
4462 *-*-aix*) conftest_s=' .machine "pwr6" | |
4463 .csect .text[[PR]] | |
4464 cmpb 3,4,5';; | |
4465 *) conftest_s=' .machine power6 | |
4466 .text | |
4467 cmpb 3,4,5';; | |
4468 esac | |
4469 | |
4470 gcc_GAS_CHECK_FEATURE([compare bytes support], | |
4471 gcc_cv_as_powerpc_cmpb, [2,19,2], -a32, | |
4472 [$conftest_s],, | |
4473 [AC_DEFINE(HAVE_AS_CMPB, 1, | |
4474 [Define if your assembler supports cmpb.])]) | |
4475 | |
4476 case $target in | |
4477 *-*-aix*) conftest_s=' .machine "pwr6" | |
4478 .csect .text[[PR]] | |
4479 dadd 1,2,3';; | |
4480 *) conftest_s=' .machine power6 | |
4481 .text | |
4482 dadd 1,2,3';; | |
4483 esac | |
4484 | |
4485 gcc_GAS_CHECK_FEATURE([decimal float support], | |
4486 gcc_cv_as_powerpc_dfp, [2,19,2], -a32, | |
4487 [$conftest_s],, | |
4488 [AC_DEFINE(HAVE_AS_DFP, 1, | |
4489 [Define if your assembler supports DFP instructions.])]) | |
4490 | |
4491 case $target in | |
4492 *-*-aix*) conftest_s=' .machine "pwr7" | 4598 *-*-aix*) conftest_s=' .machine "pwr7" |
4493 .csect .text[[PR]] | 4599 .csect .text[[PR]] |
4494 lxvd2x 1,2,3';; | 4600 lxvd2x 1,2,3';; |
4495 *) conftest_s=' .machine power7 | 4601 *) conftest_s=' .machine power7 |
4496 .text | 4602 .text |
4500 gcc_GAS_CHECK_FEATURE([vector-scalar support], | 4606 gcc_GAS_CHECK_FEATURE([vector-scalar support], |
4501 gcc_cv_as_powerpc_vsx, [2,19,2], -a32, | 4607 gcc_cv_as_powerpc_vsx, [2,19,2], -a32, |
4502 [$conftest_s],, | 4608 [$conftest_s],, |
4503 [AC_DEFINE(HAVE_AS_VSX, 1, | 4609 [AC_DEFINE(HAVE_AS_VSX, 1, |
4504 [Define if your assembler supports VSX instructions.])]) | 4610 [Define if your assembler supports VSX instructions.])]) |
4505 | |
4506 case $target in | |
4507 *-*-aix*) conftest_s=' .machine "pwr7" | |
4508 .csect .text[[PR]] | |
4509 popcntd 3,3';; | |
4510 *) conftest_s=' .machine power7 | |
4511 .text | |
4512 popcntd 3,3';; | |
4513 esac | |
4514 | |
4515 gcc_GAS_CHECK_FEATURE([popcntd support], | |
4516 gcc_cv_as_powerpc_popcntd, [2,19,2], -a32, | |
4517 [$conftest_s],, | |
4518 [AC_DEFINE(HAVE_AS_POPCNTD, 1, | |
4519 [Define if your assembler supports POPCNTD instructions.])]) | |
4520 | |
4521 case $target in | |
4522 *-*-aix*) conftest_s=' .machine "pwr8" | |
4523 .csect .text[[PR]]';; | |
4524 *) conftest_s=' .machine power8 | |
4525 .text';; | |
4526 esac | |
4527 | |
4528 gcc_GAS_CHECK_FEATURE([power8 support], | |
4529 gcc_cv_as_powerpc_power8, [2,19,2], -a32, | |
4530 [$conftest_s],, | |
4531 [AC_DEFINE(HAVE_AS_POWER8, 1, | |
4532 [Define if your assembler supports POWER8 instructions.])]) | |
4533 | |
4534 case $target in | |
4535 *-*-aix*) conftest_s=' .machine "pwr9" | |
4536 .csect .text[[PR]]';; | |
4537 *) conftest_s=' .machine power9 | |
4538 .text';; | |
4539 esac | |
4540 | |
4541 gcc_GAS_CHECK_FEATURE([power9 support], | |
4542 gcc_cv_as_powerpc_power9, [2,19,2], -a32, | |
4543 [$conftest_s],, | |
4544 [AC_DEFINE(HAVE_AS_POWER9, 1, | |
4545 [Define if your assembler supports POWER9 instructions.])]) | |
4546 | |
4547 case $target in | |
4548 *-*-aix*) conftest_s=' .csect .text[[PR]] | |
4549 lwsync';; | |
4550 *) conftest_s=' .text | |
4551 lwsync';; | |
4552 esac | |
4553 | |
4554 gcc_GAS_CHECK_FEATURE([lwsync support], | |
4555 gcc_cv_as_powerpc_lwsync, [2,19,2], -a32, | |
4556 [$conftest_s],, | |
4557 [AC_DEFINE(HAVE_AS_LWSYNC, 1, | |
4558 [Define if your assembler supports LWSYNC instructions.])]) | |
4559 | |
4560 case $target in | |
4561 *-*-aix*) conftest_s=' .machine "476" | |
4562 .csect .text[[PR]] | |
4563 dci 0';; | |
4564 *) conftest_s=' .machine "476" | |
4565 .text | |
4566 dci 0';; | |
4567 esac | |
4568 | |
4569 gcc_GAS_CHECK_FEATURE([data cache invalidate support], | |
4570 gcc_cv_as_powerpc_dci, [9,99,0], -a32, | |
4571 [$conftest_s],, | |
4572 [AC_DEFINE(HAVE_AS_DCI, 1, | |
4573 [Define if your assembler supports the DCI/ICI instructions.])]) | |
4574 | 4611 |
4575 gcc_GAS_CHECK_FEATURE([.gnu_attribute support], | 4612 gcc_GAS_CHECK_FEATURE([.gnu_attribute support], |
4576 gcc_cv_as_powerpc_gnu_attribute, [2,18,0],, | 4613 gcc_cv_as_powerpc_gnu_attribute, [2,18,0],, |
4577 [.gnu_attribute 4,1],, | 4614 [.gnu_attribute 4,1],, |
4578 [AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1, | 4615 [AC_DEFINE(HAVE_AS_GNU_ATTRIBUTE, 1, |
4813 # info to the output file. So, as supported targets are added to gas 2.11, | 4850 # info to the output file. So, as supported targets are added to gas 2.11, |
4814 # add some instruction here to (also) show we expect this might work. | 4851 # add some instruction here to (also) show we expect this might work. |
4815 # ??? Once 2.11 is released, probably need to add first known working | 4852 # ??? Once 2.11 is released, probably need to add first known working |
4816 # version to the per-target configury. | 4853 # version to the per-target configury. |
4817 case "$cpu_type" in | 4854 case "$cpu_type" in |
4818 aarch64 | alpha | arc | arm | avr | bfin | cris | i386 | m32c | m68k \ | 4855 aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | m32c | m68k \ |
4819 | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu \ | 4856 | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu \ |
4820 | tilegx | tilepro | visium | xstormy16 | xtensa) | 4857 | tilegx | tilepro | visium | xstormy16 | xtensa) |
4821 insn="nop" | 4858 insn="nop" |
4822 ;; | 4859 ;; |
4823 ia64 | s390) | 4860 ia64 | s390) |
4850 [ .file 1 "foo.s" | 4887 [ .file 1 "foo.s" |
4851 .file 1 "bar.s"]) | 4888 .file 1 "bar.s"]) |
4852 | 4889 |
4853 if test $gcc_cv_as_dwarf2_debug_line = yes \ | 4890 if test $gcc_cv_as_dwarf2_debug_line = yes \ |
4854 && test $gcc_cv_as_dwarf2_file_buggy = no; then | 4891 && test $gcc_cv_as_dwarf2_file_buggy = no; then |
4855 AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1, | 4892 AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1, |
4856 [Define if your assembler supports dwarf2 .file/.loc directives, | 4893 [Define if your assembler supports dwarf2 .file/.loc directives, |
4857 and preserves file table indices exactly as given.]) | 4894 and preserves file table indices exactly as given.]) |
4895 | |
4896 if test $gcc_cv_as_leb128 = yes; then | |
4897 conftest_s="\ | |
4898 .file 1 \"conftest.s\" | |
4899 .loc 1 3 0 view .LVU1 | |
4900 $insn | |
4901 .data | |
4902 .uleb128 .LVU1 | |
4903 .uleb128 .LVU1 | |
4904 " | |
4905 gcc_GAS_CHECK_FEATURE([dwarf2 debug_view support], | |
4906 gcc_cv_as_dwarf2_debug_view, | |
4907 [elf,2,27,0],,[$conftest_s],, | |
4908 [AC_DEFINE(HAVE_AS_DWARF2_DEBUG_VIEW, 1, | |
4909 [Define if your assembler supports views in dwarf2 .loc directives.])]) | |
4910 fi | |
4858 fi | 4911 fi |
4859 | 4912 |
4860 gcc_GAS_CHECK_FEATURE([--gdwarf2 option], | 4913 gcc_GAS_CHECK_FEATURE([--gdwarf2 option], |
4861 gcc_cv_as_gdwarf2_flag, | 4914 gcc_cv_as_gdwarf2_flag, |
4862 [elf,2,11,0], [--gdwarf2], [$insn],, | 4915 [elf,2,11,0], [--gdwarf2], [$insn],, |
5094 ;; | 5147 ;; |
5095 esac | 5148 esac |
5096 else | 5149 else |
5097 case "$target" in | 5150 case "$target" in |
5098 *-*-solaris2.1[[1-9]]*) | 5151 *-*-solaris2.1[[1-9]]*) |
5099 # Solaris 11.x and Solaris 12 added PIE support. | 5152 # Solaris 11.3 added PIE support. |
5100 if $gcc_cv_ld -z help 2>&1 | grep -- type.*pie > /dev/null; then | 5153 if $gcc_cv_ld -z help 2>&1 | grep -- type.*pie > /dev/null; then |
5101 gcc_cv_ld_pie=yes | 5154 gcc_cv_ld_pie=yes |
5102 fi | 5155 fi |
5103 ;; | 5156 ;; |
5104 esac | 5157 esac |
5405 gcc_cv_ld_no_as_needed_option='--no-as-needed' | 5458 gcc_cv_ld_no_as_needed_option='--no-as-needed' |
5406 if test $in_tree_ld = yes ; then | 5459 if test $in_tree_ld = yes ; then |
5407 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 \ | 5460 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 \ |
5408 && test $in_tree_ld_is_elf = yes; then | 5461 && test $in_tree_ld_is_elf = yes; then |
5409 gcc_cv_ld_as_needed=yes | 5462 gcc_cv_ld_as_needed=yes |
5463 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 28; then | |
5464 gcc_cv_ld_as_needed_option='--push-state --as-needed' | |
5465 gcc_cv_ld_no_as_needed_option='--pop-state' | |
5466 fi | |
5410 fi | 5467 fi |
5411 elif test x$gcc_cv_ld != x; then | 5468 elif test x$gcc_cv_ld != x; then |
5412 # Check if linker supports --as-needed and --no-as-needed options | 5469 # Check if linker supports --as-needed and --no-as-needed options |
5413 if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then | 5470 if $gcc_cv_ld --help 2>&1 | grep as-needed > /dev/null; then |
5414 gcc_cv_ld_as_needed=yes | 5471 gcc_cv_ld_as_needed=yes |
5472 if $gcc_cv_ld --help 2>&1 | grep push-state > /dev/null \ | |
5473 && $gcc_cv_ld --help 2>&1 | grep pop-state > /dev/null \ | |
5474 && echo "$ld_ver" | grep GNU > /dev/null \ | |
5475 && test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -ge 28; then | |
5476 # Use these options only when both ld.bfd and ld.gold support | |
5477 # --push-state/--pop-state, which unfortunately wasn't added | |
5478 # at the same time. | |
5479 gcc_cv_ld_as_needed_option='--push-state --as-needed' | |
5480 gcc_cv_ld_no_as_needed_option='--pop-state' | |
5481 fi | |
5415 fi | 5482 fi |
5416 case "$target:$gnu_ld" in | 5483 case "$target:$gnu_ld" in |
5417 *-*-solaris2*:no) | 5484 *-*-solaris2*:no) |
5418 # Solaris 2 ld always supports -z ignore/-z record. Prefer the native | 5485 # Solaris 2 ld always supports -z ignore/-z record. Prefer the native |
5419 # forms. | 5486 # forms. |
5754 if test x$gcc_cv_solaris_crts = xyes; then | 5821 if test x$gcc_cv_solaris_crts = xyes; then |
5755 AC_DEFINE(HAVE_SOLARIS_CRTS, 1, | 5822 AC_DEFINE(HAVE_SOLARIS_CRTS, 1, |
5756 [Define if the system-provided CRTs are present on Solaris.]) | 5823 [Define if the system-provided CRTs are present on Solaris.]) |
5757 fi | 5824 fi |
5758 | 5825 |
5826 AC_ARG_ENABLE(libssp, | |
5827 [AS_HELP_STRING([--enable-libssp], [enable linking against libssp])], | |
5828 [case "${enableval}" in | |
5829 yes|no) | |
5830 ;; | |
5831 *) | |
5832 AC_MSG_ERROR([unknown libssp setting $enableval]) | |
5833 ;; | |
5834 esac], []) | |
5835 | |
5759 # Test for stack protector support in target C library. | 5836 # Test for stack protector support in target C library. |
5760 AC_CACHE_CHECK(__stack_chk_fail in target C library, | 5837 AC_CACHE_CHECK(__stack_chk_fail in target C library, |
5761 gcc_cv_libc_provides_ssp, | 5838 gcc_cv_libc_provides_ssp, |
5762 [gcc_cv_libc_provides_ssp=no | 5839 [gcc_cv_libc_provides_ssp=no |
5840 if test "x$enable_libssp" = "xno"; then | |
5841 gcc_cv_libc_provides_ssp=yes | |
5842 elif test "x$enable_libssp" = "xyes"; then | |
5843 gcc_cv_libc_provides_ssp=no | |
5844 else | |
5763 case "$target" in | 5845 case "$target" in |
5764 *-*-musl*) | 5846 *-*-musl*) |
5765 # All versions of musl provide stack protector | 5847 # All versions of musl provide stack protector |
5766 gcc_cv_libc_provides_ssp=yes;; | 5848 gcc_cv_libc_provides_ssp=yes;; |
5767 *-*-linux* | *-*-kfreebsd*-gnu) | 5849 *-*-linux* | *-*-kfreebsd*-gnu) |
5794 gcc_cv_libc_provides_ssp=yes;; | 5876 gcc_cv_libc_provides_ssp=yes;; |
5795 *-*-darwin* | *-*-freebsd* | *-*-netbsd*) | 5877 *-*-darwin* | *-*-freebsd* | *-*-netbsd*) |
5796 AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], | 5878 AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], |
5797 [echo "no __stack_chk_fail on this target"]) | 5879 [echo "no __stack_chk_fail on this target"]) |
5798 ;; | 5880 ;; |
5799 *) gcc_cv_libc_provides_ssp=no ;; | 5881 *) gcc_cv_libc_provides_ssp=no ;; |
5800 esac]) | 5882 esac |
5883 fi]) | |
5801 | 5884 |
5802 if test x$gcc_cv_libc_provides_ssp = xyes; then | 5885 if test x$gcc_cv_libc_provides_ssp = xyes; then |
5803 AC_DEFINE(TARGET_LIBC_PROVIDES_SSP, 1, | 5886 AC_DEFINE(TARGET_LIBC_PROVIDES_SSP, 1, |
5804 [Define if your target C library provides stack protector support]) | 5887 [Define if your target C library provides stack protector support]) |
5805 fi | 5888 fi |
5856 esac | 5939 esac |
5857 if test x$gcc_cv_target_ldbl128 = xyes; then | 5940 if test x$gcc_cv_target_ldbl128 = xyes; then |
5858 AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1, | 5941 AC_DEFINE(TARGET_DEFAULT_LONG_DOUBLE_128, 1, |
5859 [Define if TFmode long double should be the default]) | 5942 [Define if TFmode long double should be the default]) |
5860 fi | 5943 fi |
5944 | |
5945 # Check if TFmode long double target should use the IBM extended double or IEEE | |
5946 # 128-bit floating point formats if long doubles are 128-bits long. The long | |
5947 # double type can only be switched on powerpc64 bit Linux systems where VSX is | |
5948 # supported. Other PowerPC systems do not build the IEEE 128-bit emulator in | |
5949 # libgcc. | |
5950 AC_ARG_WITH([long-double-format], | |
5951 [AS_HELP_STRING([--with-long-double-format={ieee,ibm}] | |
5952 [Specify whether PowerPC long double uses IEEE or IBM format])],[ | |
5953 case "$target:$with_long_double_format" in | |
5954 powerpc64le-*-linux*:ieee | powerpc64le-*-linux*:ibm) | |
5955 : | |
5956 ;; | |
5957 powerpc64-*-linux*:ieee | powerpc64-*-linux*:ibm) | |
5958 # IEEE 128-bit emulation is only built on 64-bit VSX Linux systems | |
5959 case "$with_cpu" in | |
5960 power7 | power8 | power9 | power1*) | |
5961 : | |
5962 ;; | |
5963 *) | |
5964 AC_MSG_ERROR([Configuration option --with-long-double-format is only \ | |
5965 supported if the default cpu is power7 or newer]) | |
5966 with_long_double_format="" | |
5967 ;; | |
5968 esac | |
5969 ;; | |
5970 xpowerpc64*-*-linux*:*) | |
5971 AC_MSG_ERROR([--with-long-double-format argument should be ibm or ieee]) | |
5972 with_long_double_format="" | |
5973 ;; | |
5974 *) | |
5975 AC_MSG_ERROR([Configure option --with-long-double-format is only supported \ | |
5976 on 64-bit PowerPC VSX Linux systems]) | |
5977 with_long_double_format="" | |
5978 ;; | |
5979 esac], | |
5980 []) | |
5861 | 5981 |
5862 # Check if the target LIBC supports exporting the AT_PLATFORM and AT_HWCAP | 5982 # Check if the target LIBC supports exporting the AT_PLATFORM and AT_HWCAP |
5863 # values in the TCB. Currently, only GLIBC 2.23 and later support this. | 5983 # values in the TCB. Currently, only GLIBC 2.23 and later support this. |
5864 gcc_cv_libc_provides_hwcap_in_tcb=no | 5984 gcc_cv_libc_provides_hwcap_in_tcb=no |
5865 case "$target" in | 5985 case "$target" in |
6094 for language in $all_selected_languages | 6214 for language in $all_selected_languages |
6095 do | 6215 do |
6096 check_languages="$check_languages check-$language" | 6216 check_languages="$check_languages check-$language" |
6097 done | 6217 done |
6098 | 6218 |
6219 selftest_languages= | |
6220 for language in $all_selected_languages | |
6221 do | |
6222 selftest_languages="$selftest_languages selftest-$language" | |
6223 done | |
6224 | |
6099 # We link each language in with a set of hooks, reached indirectly via | 6225 # We link each language in with a set of hooks, reached indirectly via |
6100 # lang.${target}. Only do so for selected languages. | 6226 # lang.${target}. Only do so for selected languages. |
6101 | 6227 |
6102 rm -f Make-hooks | 6228 rm -f Make-hooks |
6103 touch Make-hooks | 6229 touch Make-hooks |
6177 AC_SUBST(build_xm_file_list) | 6303 AC_SUBST(build_xm_file_list) |
6178 AC_SUBST(build_xm_include_list) | 6304 AC_SUBST(build_xm_include_list) |
6179 AC_SUBST(build_xm_defines) | 6305 AC_SUBST(build_xm_defines) |
6180 AC_SUBST(build_file_translate) | 6306 AC_SUBST(build_file_translate) |
6181 AC_SUBST(check_languages) | 6307 AC_SUBST(check_languages) |
6308 AC_SUBST(selftest_languages) | |
6182 AC_SUBST(cpp_install_dir) | 6309 AC_SUBST(cpp_install_dir) |
6183 AC_SUBST(xmake_file) | 6310 AC_SUBST(xmake_file) |
6184 AC_SUBST(tmake_file) | 6311 AC_SUBST(tmake_file) |
6185 AC_SUBST(TM_ENDIAN_CONFIG) | 6312 AC_SUBST(TM_ENDIAN_CONFIG) |
6186 AC_SUBST(TM_MULTILIB_CONFIG) | 6313 AC_SUBST(TM_MULTILIB_CONFIG) |
6334 AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT, | 6461 AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT, |
6335 [The default for -fdiagnostics-color option]) | 6462 [The default for -fdiagnostics-color option]) |
6336 | 6463 |
6337 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit | 6464 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit |
6338 # of jit/jit-playback.c. | 6465 # of jit/jit-playback.c. |
6466 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"` | |
6467 echo "gcc_driver_version: ${gcc_driver_version}" | |
6339 cat > gcc-driver-name.h <<EOF | 6468 cat > gcc-driver-name.h <<EOF |
6340 #define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_BASEVER}${exeext}" | 6469 #define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_driver_version}${exeext}" |
6341 EOF | 6470 EOF |
6342 | 6471 |
6343 # Check whether --enable-default-pie was given. | 6472 # Check whether --enable-default-pie was given. |
6344 AC_ARG_ENABLE(default-pie, | 6473 AC_ARG_ENABLE(default-pie, |
6345 [AS_HELP_STRING([--enable-default-pie], | 6474 [AS_HELP_STRING([--enable-default-pie], |