From fe5e07b521e49f6cca712c801e025fed13c23979 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Wed, 14 Jun 2017 19:32:59 +0100 Subject: [PATCH] gcc.hpp: Mingw has broken thread_local support. See https://sourceforge.net/p/mingw-w64/bugs/527/ --- include/boost/config/compiler/gcc.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index da05a63e..d1cfed7a 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -303,6 +303,13 @@ # define BOOST_FALLTHROUGH __attribute__((fallthrough)) #endif +#ifdef __MINGW32__ +// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see +// https://sourceforge.net/p/mingw-w64/bugs/527/ +// Not setting this causes program termination on thread exit. +#define BOOST_NO_CXX11_THREAD_LOCAL +#endif + // // Unused attribute: #if __GNUC__ >= 4