From: Rasmus Villemoes Date: Fri, 5 Nov 2021 14:37:33 +0000 (+0100) Subject: libstdc++: only define _GLIBCXX_HAVE_TLS for VxWorks >= 6.6 X-Git-Tag: basepoints/gcc-13~3300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc6b8cd9a21b363815998b11e5cc7529557a9ce5;p=thirdparty%2Fgcc.git 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 --git a/libstdc++-v3/config/os/vxworks/os_defines.h b/libstdc++-v3/config/os/vxworks/os_defines.h index c881b2b4b9e3..75a68bc605b3 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