AC_CANONICAL_HOST
AC_CANONICAL_TARGET
+# Determine the noncanonical host name, for Ada.
+ACX_NONCANONICAL_HOST
+
# Determine the noncanonical target name, for directory use.
ACX_NONCANONICAL_TARGET
]], [[X<int64_t>::t x;]])],[],[AC_MSG_ERROR([error verifying int64_t uses long long])])
fi
+AC_CACHE_CHECK(for std::swap in <utility>, ac_cv_std_swap_in_utility, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+]], [[int a, b; std::swap(a,b);]])],[ac_cv_std_swap_in_utility=yes],[ac_cv_std_swap_in_utility=no])])
+if test $ac_cv_std_swap_in_utility = yes; then
+ AC_DEFINE(HAVE_SWAP_IN_UTILITY, 1,
+ [Define if <utility> defines std::swap.])
+fi
+
# Check whether compiler is affected by placement new aliasing bug (PR 29286).
# If the host compiler is affected by the bug, and we build with optimization
# enabled (which happens e.g. when cross-compiling), the pool allocator may
[enable expensive run-time checks. With LIST,
enable only specific categories of checks.
Categories are: yes,no,all,none,release.
- Flags are: assert,df,fold,gc,gcac,gimple,misc,
+ Flags are: assert,df,extra,fold,gc,gcac,gimple,misc,
rtlflag,rtl,runtime,tree,valgrind,types])],
[ac_checking_flags="${enableval}"],[
# Determine the default checks.
if test x$is_release = x ; then
- ac_checking_flags=yes
+ ac_checking_flags=yes,extra
else
ac_checking_flags=release
fi])
case $check in
# these set all the flags to specific states
yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ;
- ac_fold_checking= ; ac_gc_checking=1 ;
+ ac_fold_checking= ; ac_gc_checking=1 ; ac_extra_checking= ;
ac_gc_always_collect= ; ac_gimple_checking=1 ; ac_rtl_checking= ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
ac_tree_checking=1 ; ac_valgrind_checking= ;
ac_types_checking=1 ;;
no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ;
- ac_fold_checking= ; ac_gc_checking= ;
+ ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_checking= ;
ac_tree_checking= ; ac_valgrind_checking= ;
ac_types_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ;
- ac_fold_checking=1 ; ac_gc_checking=1 ;
+ ac_fold_checking=1 ; ac_gc_checking=1 ; ac_extra_checking=1 ;
ac_gc_always_collect=1 ; ac_gimple_checking=1 ; ac_rtl_checking=1 ;
ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
ac_tree_checking=1 ; ac_valgrind_checking= ;
ac_types_checking=1 ;;
release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ;
- ac_fold_checking= ; ac_gc_checking= ;
+ ac_fold_checking= ; ac_gc_checking= ; ac_extra_checking= ;
ac_gc_always_collect= ; ac_gimple_checking= ; ac_rtl_checking= ;
ac_rtlflag_checking= ; ac_runtime_checking=1 ;
ac_tree_checking= ; ac_valgrind_checking= ;
ac_types_checking= ;;
# these enable particular checks
assert) ac_assert_checking=1 ;;
- df) ac_df_checking=1 ;;
+ df) ac_df_checking=1 ;;
+ extra) ac_extra_checking=1 ;;
fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;;
gcac) ac_gc_always_collect=1 ;;
nocommon_flag=""
if test x$ac_checking != x ; then
- AC_DEFINE(CHECKING_P, 1,
+ if test x$ac_extra_checking != x ; then
+ ac_checking=2
+ fi
+ AC_DEFINE_UNQUOTED(CHECKING_P, $ac_checking,
[Define to 1 if you want more run-time sanity checks. This one gets a grab
- bag of miscellaneous but relatively cheap checks.])
+ bag of miscellaneous but relatively cheap checks. Define to 2 if you want
+ also extra run-time checking that might affect code generation.])
nocommon_flag=-fno-common
else
AC_DEFINE(CHECKING_P, 0)
esac
], [enable_tls=''])
+AC_ARG_ENABLE(vtable-verify,
+[AS_HELP_STRING([--enable-vtable-verify],
+ [enable vtable verification feature])],,
+[enable_vtable_verify=no])
+vtable_verify=`if test x$enable_vtable_verify = xyes; then echo 1; else echo 0; fi`
+AC_DEFINE_UNQUOTED(ENABLE_VTABLE_VERIFY, $vtable_verify,
+[Define 0/1 if vtable verification feature is enabled.])
+
AC_ARG_ENABLE(objc-gc,
[AS_HELP_STRING([--enable-objc-gc],
[enable the use of Boehm's garbage collector with
fi
if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
- if test "x$with_headers" != x; then
+ if test "x$with_headers" != x && test "x$with_headers" != xyes; then
target_header_dir=$with_headers
elif test "x$with_sysroot" = x; then
target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
tls_first_minor=13
tls_as_opt=--fatal-warnings
;;
+ arc*-*-*)
+ conftest_s='
+ add_s r0,r0, @foo@tpoff'
+ tls_first_major=2
+ tls_first_minor=23
+ ;;
cris-*-*|crisv32-*-*)
conftest_s='
.section ".tdata","awT",@progbits
[AC_DEFINE(HAVE_AS_SPARC4, 1,
[Define if your assembler supports SPARC4 instructions.])])
+ gcc_GAS_CHECK_FEATURE([SPARC5 and VIS 4.0 instructions],
+ gcc_cv_as_sparc_sparc5,,
+ [-xarch=sparc5],
+ [.text
+ .register %g2, #scratch
+ .register %g3, #scratch
+ .align 4
+ subxc %g1, %g2, %g3
+ fpadd8 %f0, %f2, %f4],,
+ [AC_DEFINE(HAVE_AS_SPARC5_VIS4, 1,
+ [Define if your assembler supports SPARC5 and VIS 4.0 instructions.])])
+
gcc_GAS_CHECK_FEATURE([LEON instructions],
gcc_cv_as_sparc_leon,,
[-Aleon],
;;
powerpc*-*-*)
+
case $target in
- *-*-aix*) conftest_s=' .machine "pwr5"
- .csect .text[[PR]]
- mfcr 3,128';;
*-*-darwin*)
gcc_GAS_CHECK_FEATURE([.machine directive support],
gcc_cv_as_machine_directive,,,
echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2
test x$build = x$target && exit 1
fi
- conftest_s=' .text
+ ;;
+ esac
+
+ case $target in
+ *-*-aix*) conftest_s=' .machine "pwr5"
+ .csect .text[[PR]]
+ mfcr 3,128';;
+ *-*-darwin*) conftest_s=' .text
mfcr r3,128';;
*) conftest_s=' .machine power4
.text
case $target in
*-*-aix*)
- gcc_GAS_CHECK_FEATURE([.ref support],
+ gcc_GAS_CHECK_FEATURE([AIX .ref support],
gcc_cv_as_aix_ref, [2,21,0],,
[ .csect stuff[[rw]]
stuff:
],,
[AC_DEFINE(HAVE_AS_REF, 1,
[Define if your assembler supports .ref])])
- ;;
- esac
- case $target in
- *-*-aix*)
- gcc_GAS_CHECK_FEATURE([dwarf location lists section support],
+ gcc_GAS_CHECK_FEATURE([AIX DWARF location lists section support],
gcc_cv_as_aix_dwloc, [2,21,0],,
- [ .dwsect 0xB0000
+ [ .dwsect 0xA0000
+ Lframe..0:
+ .vbyte 4,Lframe..0:
],,
[AC_DEFINE(HAVE_XCOFF_DWARF_EXTRAS, 1,
- [Define if your assembler supports .dwsect 0xB0000])])
+ [Define if your assembler supports AIX debug frame section label reference.])])
;;
esac
;;
# realistically usable GNU/Hurd configurations.
# All supported versions of musl provide it as well
gcc_cv_libc_provides_ssp=yes;;
- *-*-darwin* | *-*-freebsd*)
+ *-*-darwin* | *-*-freebsd* | *-*-netbsd*)
AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
[echo "no __stack_chk_fail on this target"])
;;
[Define if TFmode long double should be the default])
fi
+# Check if the target LIBC supports exporting the AT_PLATFORM and AT_HWCAP
+# values in the TCB. Currently, only GLIBC 2.23 and later support this.
+gcc_cv_libc_provides_hwcap_in_tcb=no
+case "$target" in
+ powerpc*-*-linux*)
+ GCC_GLIBC_VERSION_GTE_IFELSE([2], [23], [gcc_cv_libc_provides_hwcap_in_tcb=yes], )
+ ;;
+esac
+if test x$gcc_cv_libc_provides_hwcap_in_tcb = xyes; then
+ AC_DEFINE(TARGET_LIBC_PROVIDES_HWCAP_IN_TCB, 1,
+ [Define if your target C Library provides the AT_HWCAP value in the TCB])
+fi
+
AC_MSG_CHECKING(dl_iterate_phdr in target C library)
gcc_cv_target_dl_iterate_phdr=unknown
case "$target" in