> I was able to successfully build gcc-trunk using the provided patch.
> moreover, I was able to successfully build all of the packages used in
> the toolchain!
> (gmp, mpfr, mpc, isl, libgnurx, bzip2, termcap, libffi, expat, ncurses,
> readline, gdbm, tcl, tk, openssl, xz-utils, sqlite, python3, binutils,
> gdb, make)

Great!  Did you check that C++ threads are enabled in your build?  If they 
are, you must be able to run the attached C++ test; if they are not (because 
the MinGW64 build is configured for older versions of Windows), you need to 
configure the compiler with the option --enable-libstdcxx-threads.

-- 
Eric Botcazou
#include <iostream>
#include <vector>
#include <mutex>
#include <condition_variable>
#include <thread>

#define NUM_THREADS 4

std::condition_variable cond;
std::mutex mx;
int started = 0;

void
do_thread ()
{
  std::unique_lock<std::mutex> lock(mx);
  std::cout << "Start thread " << started << std::endl;
  if(++started >= NUM_THREADS)
    cond.notify_all();
  else
    cond.wait(lock);
}

int
main ()
{
  std::vector<std::thread> vec;
  for (int i = 0; i < NUM_THREADS; ++i)
    vec.emplace_back(&do_thread);
  for (int i = 0; i < NUM_THREADS; ++i)
    vec[i].join();
  vec.clear();
  return 0;
}

Reply via email to