mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-12 07:10:26 +08:00
PR78968 add configure check for __cxa_thread_atexit in libc
PR libstdc++/78968 * config.h.in: Regenerate. * configure: Likewise. * configure.ac: Check for __cxa_thread_atexit. * libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]: Don't define __cxa_thread_atexit if libc provides it. From-SVN: r244057
This commit is contained in:
parent
4bf07f3f5f
commit
2a792efe7f
@ -1,3 +1,12 @@
|
||||
2017-01-04 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/78968
|
||||
* config.h.in: Regenerate.
|
||||
* configure: Likewise.
|
||||
* configure.ac: Check for __cxa_thread_atexit.
|
||||
* libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]:
|
||||
Don't define __cxa_thread_atexit if libc provides it.
|
||||
|
||||
2017-01-04 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
Implement 2801, Default-constructibility of unique_ptr.
|
||||
|
@ -700,6 +700,9 @@
|
||||
/* Define to 1 if you have the `_tanl' function. */
|
||||
#undef HAVE__TANL
|
||||
|
||||
/* Define to 1 if you have the `__cxa_thread_atexit' function. */
|
||||
#undef HAVE___CXA_THREAD_ATEXIT
|
||||
|
||||
/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */
|
||||
#undef HAVE___CXA_THREAD_ATEXIT_IMPL
|
||||
|
||||
|
10
libstdc++-v3/configure
vendored
10
libstdc++-v3/configure
vendored
@ -28031,12 +28031,14 @@ $as_echo "#define HAVE_TLS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
for ac_func in __cxa_thread_atexit_impl
|
||||
for ac_func in __cxa_thread_atexit_impl __cxa_thread_atexit
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "__cxa_thread_atexit_impl" "ac_cv_func___cxa_thread_atexit_impl"
|
||||
if test "x$ac_cv_func___cxa_thread_atexit_impl" = x""yes; then :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
eval as_val=\$$as_ac_var
|
||||
if test "x$as_val" = x""yes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE___CXA_THREAD_ATEXIT_IMPL 1
|
||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
@ -255,7 +255,7 @@ if $GLIBCXX_IS_NATIVE; then
|
||||
# For TLS support.
|
||||
GCC_CHECK_TLS
|
||||
|
||||
AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
|
||||
AC_CHECK_FUNCS(__cxa_thread_atexit_impl __cxa_thread_atexit)
|
||||
AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
|
||||
|
||||
# For iconv support.
|
||||
|
@ -30,7 +30,11 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
|
||||
#if _GLIBCXX_HAVE___CXA_THREAD_ATEXIT
|
||||
|
||||
// Libc provides __cxa_thread_atexit definition.
|
||||
|
||||
#elif _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL
|
||||
|
||||
extern "C" int __cxa_thread_atexit_impl (void (*func) (void *),
|
||||
void *arg, void *d);
|
||||
|
Loading…
x
Reference in New Issue
Block a user