When building MinGW-w64 with clang I ran into issues compiling winpthreads.
Somehow libtool would would always built as if the compiler was MSVC (.lib instead of .a, MSVC-style linker flags).
After digging into what caused this I found that mingw-w64-libraries/winpthreads/configure matches the compiler with cl* to detect MSVC (cl.exe) but as I'm using clang.exe this also matches.
The MinGW-w64 LLVM/Clang build at https://github.com/mstorsjo/llvm-mingw works around this issue by using a wrapper gcc.exe that actually calls clang.exe, but it would be cleaner if you could fix it in the source.
Especially with Windows on ARM more people will be building MinGW-w64 with LLVM clang in the future, so it would be great if you could fix this.
A similar match with
cl*happens inmingw-w64-libraries/winpthreads/m4/libtool.m4Please file a bug report at Bug-libtool@gnu.org, this is a libtool issue.
Bug reported here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53479