]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdbsupport/parallel-for.h
Fix --disable-threading build
authorTom Tromey <tromey@adacore.com>
Mon, 9 May 2022 17:48:40 +0000 (11:48 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 10 May 2022 14:15:40 +0000 (08:15 -0600)
commit20c4eb4226997c0de0a47d5d4c6c2eed21ed9af4
treedb0fd93a83d261b61d2a107d823212a4e8c6c271
parentc7d029ea9cc566b8d3c50b08ef12d98394adf1b1
Fix --disable-threading build

PR build/29110 points out that GDB fails to build on mingw when the
"win32" thread model is in use.  It turns out that the Fedora cross
tools using the "posix" thread model, which somehow manages to support
std::future, whereas the win32 model does not.

While looking into this, I found that the configuring with
--disable-threading will also cause a build failure.

This patch fixes this build by introducing a compatibility wrapper for
std::future.

I am not able to test the win32 thread model build, but I'm going to
ask the reporter to try this patch.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29110
gdb/dwarf2/cooked-index.h
gdbsupport/parallel-for.h
gdbsupport/thread-pool.cc
gdbsupport/thread-pool.h