Allow thread_local on mingw with gcc>=11

This commit is contained in:
Michel Zou
2021-06-09 15:35:34 +02:00
parent 9f14f02813
commit 98c3ac8158

View File

@ -323,9 +323,10 @@
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
#endif
#if defined(__MINGW32__) && !defined(__MINGW64__)
// Currently (March 2019) thread_local is broken on mingw for all current 32bit compiler releases, see
#if (__GNUC__ < 11) && defined(__MINGW32__) && !defined(__MINGW64__)
// thread_local was broken on mingw for all 32bit compiler releases prior to 11.x, see
// https://sourceforge.net/p/mingw-w64/bugs/527/
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83562
// Not setting this causes program termination on thread exit.
#define BOOST_NO_CXX11_THREAD_LOCAL
#endif