在 2025-10-23 21:50, accelerator0099 写道:
Hello I encountered errors about inline assembly with clang 20.1Configured with:CC=clang CXX=clang++ CFLAGS="--target=x86_64-windows-gnu -fuse-ld=lld --sysroot=/tmp/mingw/x86_64- windows-gnu" CXXFLAGS="--target=x86_64-windows-gnu -fuse-ld=lld --sysroot=/tmp/mingw/x86_64-windows- gnu" /mnt/src/mingw-w64/mingw-w64-crt/configure --host=x86_64-w64-mingw32 --prefix=/tmp/mingw/x86_64- windows-gnu --enable-lib64 LD=lld NM=llvm-nm RANLIB=llvm-ranlib AR=llvm-ar DLLTOOL=llvm-dlltool AS=llvm- as STRIP=llvm-strip OBJDUMP=llvm-objdump WINDRES=llvm-windresAnd it gives output:/mnt/src/mingw-w64/mingw-w64-crt/misc/_invoke_watson.c:52:9: error: inline assembly requires more registers than available52 | "mov %%eax, %0\n\t" | ^ 1 error generated. Note that if I replace line 50 in _invoke_watson.c to: #if 0 It compiles with no error.
This code is for x86-32 only, so there seems to be something wrong in your configuration.`--target=` is seldom useful; when building a compiler it specifies the target of the new compiler, and when building a non-compiler it mostly means nothing. And the triplet seems incorrect.
When cross-compiling mingw-w64 you need to specify `--build=x86_64-pc-linux-gnu --host=x86_64-w64-mingw32`. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
