In the latest, the very basic programs not-using threads are also linked to pthread. The worse is the library is libpthread.dll.a in default, which requires libwinpthread-1.dll runtime.
Therefore, linking pthread statically is preferred. You can use -static of course, but I still wanted to use msvcrt.dll as C runtime.
I use the Ubuntu package of MinGW. So, to prevent dynamic library, I have done the following:
for dir in i686-w64-mingw32 x86_64-w64-mingw32; do