Menu ▾ ▴

#928 clang identified as MSVC because of cl* match in mingw-w64-libraries/winpthreads/configure

v1.0 (example)
open
nobody
None
5
2022-01-23
2022-01-22
No

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.

Discussion

  • Brecht Sanders

    Brecht Sanders - 2022-01-22

    A similar match with cl* happens in mingw-w64-libraries/winpthreads/m4/libtool.m4

     
  • Jonathan Yong

    Jonathan Yong - 2022-01-23

    Please file a bug report at Bug-libtool@gnu.org, this is a libtool issue.

     

Log in to post a comment.