On Mon, 15 Jun 2020 09:25:07 +0000 Tal Shnaiderman <tal...@mellanox.com> wrote:
> > Subject: Re: MinGW guide > > > > On Sat, 13 Jun 2020 10:55:14 +0200 > > Thomas Monjalon <tho...@monjalon.net> wrote: > > [snip] > > > > Then when installing mingw-w64-install.exe, a choice must be done > > > between threads POSIX or Win32. > > > If I understand well, POSIX must be chosen? > > > > Yes. DPDK config/meson.build now links with pthread if linker is not > > link.exe. > > > > Where do we actually use pthread in Windows? Nowhere indeed. Probably it was my mistake to link with it when adding MinGW support. Shim is always used anyway. > > > Note that maybe this can be relaxed (test needed!), i. e. link with pthread > > if > > it is found, otherwise use shim. Benefit, if this works: no runtime > > dependency on "libwinpthread-1.dll" for Windows. > > I was sure, since we create the threads with Win32 API (CreateThread), the > correct option is Win32. > My mingw-w64 is installed with that option and I didn't see issues with it. Then I'm totally wrong. Your way MinGW-w64 produces an executable without dependencies (apart from system libraries), so this should be preferred. I tried and it works for me. -- Dmitry Kozlyuk