
John Maddock wrote:
It looks as though _GLIBCXX_HAVE_GTHR_DEFAULT is defined by the std lib when it's in thread safe mode, so I'm leaning towards adding:
#ifdef __GLIBCXX__ // gcc 3.4 and greater: #ifdef _GLIBCXX_HAVE_GTHR_DEFAULT #define BOOST_HAS_THREADS #else #define BOOST_DISABLE_THREADS #endif #endif
To our libstdcpp3.hpp config file, which I think will take care of it, albeit not in a way that everyone will appreciate (it will force threading on whenever the std lib is also thread safe).
Ehm... I don't think Linux has single-threaded and multi-threaded versions of libstdc++ -- there's only one library installed and it's sure will be multi-threaded. So, for single threaded builds 1. Boost will think it's MT build and call pthread_* functions. 2. Toolset won't add '-pthread' to linker command line Bottom like: you'll get link failures for single-thread builds. - Volodya