Merge pull request #380 from xantares/mingw_tls

Allow thread_local on mingw with gcc>=11
This commit is contained in:
jzmaddock
2021-07-04 19:11:36 +01:00
committed by GitHub

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