Page MenuHome GnuPG

libgcrypt 1.11.0 fails to build on 32bit Windows with Clang
Closed, ResolvedPublic

Description

1.10.3 builds fine with the same toolchain

1.11.0 fails with:

hwf-x86.c:60:14: error: this directive must appear between .cfi_startproc and .cfi_endproc directives
   60 |     ("pushf\n\t"                 /* Copy flags to EAX.  */
      |              ^

Downstream issue: https://github.com/msys2/MINGW-packages/pull/21202

Full build log: https://gist.github.com/lazka/82f0efc163b9b62beb5375c04501d381

Details

Version
1.11.0

Event Timeline

Hm, CFI directives should not be used on WIN32 target. This patch should solve the issue for now:

I tried to reproduce issue with clang/w32 toolchain from https://github.com/mstorsjo/llvm-mingw but there build worked even with CFI directives.

werner added projects: libgcrypt, Windows, clang.
werner added a subscriber: werner.

Using clang for Windows is not tested or suggested. Thus low priority.

Hm, CFI directives should not be used on WIN32 target. This patch should solve the issue for now:

Thanks, I can confirm that this fixes things.

jukivili claimed this task.