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_WCHAR_T, test $enable_wchar_t = yes)
- GLIBCXX_CONDITIONAL(GLIBCXX_TEST_THREAD, test $enable_thread = yes)
- GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes)
])
in <cmath> in namespace std.])
fi
- # Check for the existence of <complex.h> complex functions.
+ # Check for the existence of <complex.h> complex math functions.
# This is necessary even though libstdc++ uses the builtin versions
# of these functions, because if the builtin cannot be used, a reference
# to the library function is emitted.
- # In addition, need to explicitly specify "C" compilation for this
- # one, or else the backwards C++ <complex.h> include will be selected.
- save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -x c"
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
ac_c99_complex=no;
if test x"$ac_has_complex_h" = x"yes"; then
ccosf(tmpf);
ccoshf(tmpf);
cexpf(tmpf);
+ clogf(tmpf);
csinf(tmpf);
csinhf(tmpf);
csqrtf(tmpf);
ccos(tmpd);
ccosh(tmpd);
cexp(tmpd);
+ clog(tmpd);
csin(tmpd);
csinh(tmpd);
csqrt(tmpd);
ccosl(tmpld);
ccoshl(tmpld);
cexpl(tmpld);
+ clogl(tmpld);
csinl(tmpld);
csinhl(tmpld);
csqrtl(tmpld);
cpowl(tmpld, tmpld);
],[ac_c99_complex=yes], [ac_c99_complex=no])
fi
- CXXFLAGS="$save_CXXFLAGS"
AC_MSG_RESULT($ac_c99_complex)
if test x"$ac_c99_complex" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99_COMPLEX, 1,
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
AC_CACHE_VAL(ac_c99_stdlib, [
AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp;
- strtof("gnu", &tmp);
+ [char* tmp;
+ strtof("gnu", &tmp);
strtold("gnu", &tmp);
- llabs(10);
- lldiv(10,1);
- atoll("10");
+ strtoll("gnu", &tmp, 10);
+ strtoull("gnu", &tmp, 10);
+ llabs(10);
+ lldiv(10,1);
+ atoll("10");
_Exit(0);
lldiv_t mydivt;],[ac_c99_stdlib=yes], [ac_c99_stdlib=no])
])
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
+# 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)
GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)