diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-11 22:34:28 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-11 22:34:28 +0000 |
commit | 1ced3412f04ff1598fab8591fa18001a52fa8da2 (patch) | |
tree | 50f20998f70802ec884331157bb342cfdf6b2bd6 /libstdc++-v3 | |
parent | ebd1056dbb7f83f4135440e59d3c54227d32128e (diff) | |
download | gcc-1ced3412f04ff1598fab8591fa18001a52fa8da2.tar.gz |
Test for __cxa_thread_atexit_impl when cross-compiling libstdc++ for GNU targets.
I noticed that when testing glibc with a cross compiler I got
UNSUPPORTED: nptl/tst-thread_local1
because the libstdc++-v3 configuration for cross compiling defaulted
to __cxa_thread_atexit_impl not being available. This patch fixes
GLIBCXX_CROSSCONFIG to run the same test (for the case covering
targets with glibc) for __cxa_thread_atexit_impl as for native
compilation, just as it runs most of the other tests done for native
compilation (for these targets, it's not possible to build libstdc++
without already having built libc, so link tests are OK).
Tested with no regressions for cross to arm-none-linux-gnueabi.
* crossconfig.m4 (GLIBCXX_CROSSCONFIG) <*-linux* | *-uclinux* |
*-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*>: Check for
__cxa_thread_atexit_impl.
* configure: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 11 | ||||
-rw-r--r-- | libstdc++-v3/crossconfig.m4 | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a6bb000996c..e3061efca4f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2015-10-11 Joseph Myers <joseph@codesourcery.com> + + * crossconfig.m4 (GLIBCXX_CROSSCONFIG) <*-linux* | *-uclinux* | + *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*>: Check for + __cxa_thread_atexit_impl. + * configure: Regenerate. + 2015-10-09 Jonathan Wakely <jwakely@redhat.com> * include/experimental/erase_if.h: Move to ... diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 73d45b1a680..1eb6db4ec4c 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -58893,6 +58893,17 @@ $as_echo "$gcc_cv_have_tls" >&6; } $as_echo "#define HAVE_TLS 1" >>confdefs.h fi + for ac_func in __cxa_thread_atexit_impl +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 : + cat >>confdefs.h <<_ACEOF +#define HAVE___CXA_THREAD_ATEXIT_IMPL 1 +_ACEOF + +fi +done + diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index 10247f940b5..ece12567794 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -156,6 +156,7 @@ case "${host}" in GLIBCXX_CHECK_STDLIB_SUPPORT AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1) GCC_CHECK_TLS + AC_CHECK_FUNCS(__cxa_thread_atexit_impl) AM_ICONV ;; *-mingw32*) |