[PATCH] Fix build issues with mingw toolchain
Eli Zaretskii
eliz@gnu.org
Tue May 14 19:19:18 GMT 2024
> Date: Tue, 14 May 2024 19:47:48 +0100
> Cc: tromey@adacore.com, ssbssa@yahoo.de, bernd.edlinger@hotmail.de,
> gdb-patches@sourceware.org
> From: Pedro Alves <pedro@palves.net>
>
> > I build GDB using mingw.org's MinGW, which does support XP (and older
> > versions as well), but its pthreads are a different matter -- I had
> > trouble with them and removed it from my system to avoid that. Plus,
> > I'm not sure mingw.org's libstc++ supports <thread> if you build for
> > Posix threading (it definitely does NOT support <thread> for w32
> > threading).
> >
> > So once again, we should actually try this before we conclude it's
> > possible.
>
> OK. I will have to leave that for someone who actually has such a system.
> I do not have one handy.
>
> There is also this:
>
> https://github.com/meganz/mingw-std-threads
>
> Described as:
>
> "mingw-std-threads
> Implementation of standard C++11 threading classes, which are currently still missing on MinGW GCC.
>
> Target Windows version
> This implementation should work with Windows XP (regardless of service pack), or newer. The library automatically
> detects the version of Windows that is being targeted (at compile time), and selects an implementation that
> takes advantage of available Windows features. (...)."
I know. But AFAIR integrating it with libstdc++ is not a simple job,
and no one has done that yet.
> >> Also, "--enable-threading=yes" silently ends up with threading disabled if std::thread
> >> doesn't work. I think that's a bug. If I explicitly request threading, and then
> >> configure detects std::thread doesn't work, it should error out.
> >
> > Agreed.
> >
>
> I sent a patch for that, now:
>
> https://inbox.sourceware.org/gdb-patches/20240514184341.1399428-1-pedro@palves.net/T/#u
Thanks.
More information about the Gdb-patches
mailing list