public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Test for __cxa_thread_atexit_impl when cross-compiling libstdc++ for GNU targets
@ 2015-10-09 23:19 Joseph Myers
  2015-10-12 17:04 ` Bernd Schmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Myers @ 2015-10-09 23:19 UTC (permalink / raw)
  To: gcc-patches, libstdc++

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.  OK to
commit?

2015-10-09  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.

Index: libstdc++-v3/crossconfig.m4
===================================================================
--- libstdc++-v3/crossconfig.m4	(revision 228601)
+++ libstdc++-v3/crossconfig.m4	(working copy)
@@ -156,6 +156,7 @@
     GLIBCXX_CHECK_STDLIB_SUPPORT
     AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
     GCC_CHECK_TLS
+    AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
     AM_ICONV
     ;;
   *-mingw32*)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test for __cxa_thread_atexit_impl when cross-compiling libstdc++ for GNU targets
  2015-10-09 23:19 Test for __cxa_thread_atexit_impl when cross-compiling libstdc++ for GNU targets Joseph Myers
@ 2015-10-12 17:04 ` Bernd Schmidt
  2015-10-12 23:00   ` Joseph Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Schmidt @ 2015-10-12 17:04 UTC (permalink / raw)
  To: Joseph Myers, gcc-patches, libstdc++

On 10/10/2015 01:18 AM, Joseph Myers wrote:
> 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.  OK to
> commit?
>
> 2015-10-09  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.

That looks ok.

> Index: libstdc++-v3/crossconfig.m4
> ===================================================================
> --- libstdc++-v3/crossconfig.m4	(revision 228601)
> +++ libstdc++-v3/crossconfig.m4	(working copy)
> @@ -156,6 +156,7 @@
>       GLIBCXX_CHECK_STDLIB_SUPPORT
>       AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
>       GCC_CHECK_TLS
> +    AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
>       AM_ICONV

A similar sequence of tests also occurs for *-aix*. I don't suppose the 
function is likely to exist there or on other non-glibc targets?


Bernd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Test for __cxa_thread_atexit_impl when cross-compiling libstdc++ for GNU targets
  2015-10-12 17:04 ` Bernd Schmidt
@ 2015-10-12 23:00   ` Joseph Myers
  0 siblings, 0 replies; 3+ messages in thread
From: Joseph Myers @ 2015-10-12 23:00 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: gcc-patches, libstdc++

On Mon, 12 Oct 2015, Bernd Schmidt wrote:

> A similar sequence of tests also occurs for *-aix*. I don't suppose the
> function is likely to exist there or on other non-glibc targets?

Given that the case there has "# We don't yet support AIX's TLS ABI." and 
GCC_CHECK_TLS commented out, I don't think this function (which is 
concerned with support for destructors of C++11 thread_local variables) is 
of any current relevance to that case.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-12 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 23:19 Test for __cxa_thread_atexit_impl when cross-compiling libstdc++ for GNU targets Joseph Myers
2015-10-12 17:04 ` Bernd Schmidt
2015-10-12 23:00   ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).