public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Rasmus Villemoes <villemoes@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-5013] libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6
Date: Tue,  9 Nov 2021 08:52:37 +0000 (GMT)	[thread overview]
Message-ID: <20211109085237.D60E63858D39@sourceware.org> (raw)

https://gcc.gnu.org/g:cc6b8cd9a21b363815998b11e5cc7529557a9ce5

commit r12-5013-gcc6b8cd9a21b363815998b11e5cc7529557a9ce5
Author: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Date:   Fri Nov 5 15:37:33 2021 +0100

    libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6
    
    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.

Diff:
---
 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


                 reply	other threads:[~2021-11-09  8:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211109085237.D60E63858D39@sourceware.org \
    --to=villemoes@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).