forked from Imagelibrary/binutils-gdb
Fix build issues with mingw toolchain
With a x86_64-pc-mingw32 toolchain there is a build issue whether or not the --disable-threading option is used. The problem happens because _WIN32_WINNT is defined to 0x501 before #include <mutex> which makes the compilation abort due to missing support for __gthread_cond_t in std_mutex.h, which is conditional on _WIN32_WINNT >= 0x600. Fix the case when --disable-threading is used, by only including <mutex> in gdb/complaints.c when STD_CXX_THREAD is defined. Additionally make the configure script try to #include <mutex> to automatically select --disable-threading when the header file is not able to compile. Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
1
gdbsupport/configure
vendored
1
gdbsupport/configure
vendored
@@ -12335,6 +12335,7 @@ else
|
||||
# endif
|
||||
#endif /* __MINGW32__ || __CYGWIN__ */
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
void callback() { }
|
||||
int
|
||||
main ()
|
||||
|
||||
Reference in New Issue
Block a user