public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6
@ 2021-11-08  9:56 Rasmus Villemoes
  2021-11-08 16:59 ` Olivier Hainque
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2021-11-08  9:56 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jerome Lambourg, Olivier Hainque, Rasmus Villemoes

According to
https://gcc.gnu.org/legacy-ml/gcc-patches/2008-03/msg01698.html, the
TLS support, including the __tls_lookup function, was added to VxWorks
in 6.6.

It certainly doesn't exist on our VxWorks 5 platform, but the fallback
code in eh_globals.cc using __gthread_key_create() etc. used to work
just fine.

libstdc++-v3/ChangeLog:

	* config/os/vxworks/os_defines.h (_GLIBCXX_HAVE_TLS): Only
	define for VxWorks >= 6.6.
---
 libstdc++-v3/config/os/vxworks/os_defines.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/config/os/vxworks/os_defines.h b/libstdc++-v3/config/os/vxworks/os_defines.h
index c881b2b4b9e..75a68bc605b 100644
--- a/libstdc++-v3/config/os/vxworks/os_defines.h
+++ b/libstdc++-v3/config/os/vxworks/os_defines.h
@@ -45,8 +45,10 @@
 #define _GLIBCXX_USE_WEAK_REF 0
 #endif
 
-// We support TLS on VxWorks (either directly or with emutls)
+// We support TLS on VxWorks >= 6.6 (either directly or with emutls)
+#if !_VXWORKS_PRE(6, 6)
 #define _GLIBCXX_HAVE_TLS 1
+#endif
 
 // VxWorks7 comes with a DinkumWare library and the system headers which we
 // are going to include for libstdc++ have a few related intrinsic
-- 
2.31.1


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

* Re: [PATCH] libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6
  2021-11-08  9:56 [PATCH] libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6 Rasmus Villemoes
@ 2021-11-08 16:59 ` Olivier Hainque
  0 siblings, 0 replies; 2+ messages in thread
From: Olivier Hainque @ 2021-11-08 16:59 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: Olivier Hainque, gcc-patches, Jerome Lambourg, Rasmus Villemoes



> On 8 Nov 2021, at 10:56, Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote:
> 
> According to
> https://gcc.gnu.org/legacy-ml/gcc-patches/2008-03/msg01698.html, the
> TLS support, including the __tls_lookup function, was added to VxWorks
> in 6.6.
> 
> It certainly doesn't exist on our VxWorks 5 platform, but the fallback
> code in eh_globals.cc using __gthread_key_create() etc. used to work
> just fine.
> 
> libstdc++-v3/ChangeLog:
> 
> 	* config/os/vxworks/os_defines.h (_GLIBCXX_HAVE_TLS): Only
> 	define for VxWorks >= 6.6.

Good for me, thanks Rasmus.

Cheers,

Olivier



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

end of thread, other threads:[~2021-11-08 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08  9:56 [PATCH] libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6 Rasmus Villemoes
2021-11-08 16:59 ` Olivier Hainque

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).