HomeFreeBSD

security/libgcrypt: Fix build on hardware lacking SM4-EVEX

Description

security/libgcrypt: Fix build on hardware lacking SM4-EVEX

The failure comes from cipher/sm4-intel-avx512-amd64.S, which uses the
EVEX-encoded (zmm) SM4 instructions. The base system assembler only
knows the VEX/ymm forms, and configure's SM4 probe only tests those, so
the AVX512 implementation is assembled anyway and breaks.

This patch extends the probe with the zmm forms, so the Intel SM4
assembly is disabled automatically where the assembler lacks SM4-EVEX.
GFNI-based SM4 and all other AVX512 code remain enabled, and the check
heals itself once LLVM gains these instructions.

PR: 297987

Details

Provenance
joneumAuthored on Aug 27 2026, 12:13 PM
cyCommitted on Aug 27 2026, 1:05 PM
Parents
R11:1198cc78a23b: devel/maven39: Update to 3.9.16
Branches
Unknown
Tags
Unknown
Reverted By
R11:4798540d0163: Revert "security/libgcrypt: Fix build on hardware lacking SM4-EVEX"