dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this.
dnl
dnl Sets:
-dnl enable_abi_check / GLIBCXX_TEST_ABI
+dnl enable_abi_check
dnl GLIBCXX_TEST_WCHAR_T
dnl GLIBCXX_TEST_THREAD
dnl Substs:
dnl baseline_dir
dnl
AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [
- if $GLIBCXX_IS_NATIVE && test $is_hosted = yes; then
+ if $GLIBCXX_IS_NATIVE && test $is_hosted = yes &&
+ test $enable_symvers != no; then
# Do checks for resource limit functions.
GLIBCXX_CHECK_SETRLIMIT
# CXX_FOR_BUILD.
enable_abi_check=no
fi
-
+
# Export file names for ABI checking.
baseline_dir="$glibcxx_srcdir/config/abi/${abi_baseline_pair}\$(MULTISUBDIR)"
AC_SUBST(baseline_dir)
-
- GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
])
enable_sjlj_exceptions=yes
elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
enable_sjlj_exceptions=no
+ elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
+ enable_sjlj_exceptions=no
fi
fi
CXXFLAGS="$old_CXXFLAGS"
# For GNU ld, we need at least this version. The format is described in
# GLIBCXX_CHECK_LINKER_FEATURES above.
glibcxx_min_gnu_ld_version=21400
-# XXXXXXXXXXX glibcxx_gnu_ld_version=21390
# Check to see if unspecified "yes" value can win, given results above.
# Change "yes" into either "no" or a style name.
AC_MSG_WARN(=== $glibcxx_min_gnu_ld_version or later and rebuild GCC.)
if test $glibcxx_gnu_ld_version -ge 21200 ; then
# Globbing fix is present, proper block support is not.
- dnl AC_MSG_WARN([=== Dude, you are soooo close. Maybe we can fake it.])
- dnl enable_symvers=???
AC_MSG_WARN([=== Symbol versioning will be disabled.])
enable_symvers=no
else
;;
esac
-AH_VERBATIM([_GLIBCXX_SYMVERextra],
-[/* Define symbol versioning in assember directives. If symbol
- versioning is being used, and the assembler supports this kind of
- thing, then use it.
-
- NB: _GLIBCXX_AT_AT is a hack to work around quoting issues in m4. */
-
-#if _GLIBCXX_SYMVER
- #define _GLIBCXX_ASM_SYMVER(cur, old, version) \
- asm (".symver " #cur "," #old _GLIBCXX_AT_AT #version);
-#else
- #define _GLIBCXX_ASM_SYMVER(cur, old, version)
-#endif])
+# In addition, need this to deal with std::size_t mangling in
+# src/compatibility.cc. In a perfect world, could use
+# typeid(std::size_t).name()[0] to do direct substitution.
+AC_MSG_CHECKING([for size_t as unsigned int])
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="-Werror"
+AC_TRY_COMPILE(, [__SIZE_TYPE__* stp; unsigned int* uip; stp = uip;],
+ [glibcxx_size_t_is_i=yes], [glibcxx_size_t_is_i=no])
+CFLAGS=$ac_save_CFLAGS
+if test "$glibcxx_size_t_is_i" = yes; then
+ AC_DEFINE(_GLIBCXX_SIZE_T_IS_UINT, 1, [Define if size_t is unsigned int.])
+fi
+AC_MSG_RESULT([$glibcxx_size_t_is_i])
+
+AC_MSG_CHECKING([for ptrdiff_t as int])
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS="-Werror"
+AC_TRY_COMPILE(, [__PTRDIFF_TYPE__* ptp; int* ip; ptp = ip;],
+ [glibcxx_ptrdiff_t_is_i=yes], [glibcxx_ptrdiff_t_is_i=no])
+CFLAGS=$ac_save_CFLAGS
+if test "$glibcxx_ptrdiff_t_is_i" = yes; then
+ AC_DEFINE(_GLIBCXX_PTRDIFF_T_IS_INT, 1, [Define if ptrdiff_t is int.])
+fi
+AC_MSG_RESULT([$glibcxx_ptrdiff_t_is_i])
AC_SUBST(SYMVER_MAP)
AC_SUBST(port_specific_symbol_files)