rhash: disable compile-time SHA-NI for x86_64 compatibility

Since e5b0cb6e70 rhash,
by default, hardcodes SHA-NI instructions at compile time.
However, these instructions are not available on older x86_64 CPUs.

In particular, rhash is a dependency of cmake, meaning that no cmake builds can run on CPUs
without SHA-NI instructions with the default configuration.

This patch disables SHA-NI in rhash.

Fixes https://github.com/NixOS/nixpkgs/issues/519825.

See also the parallel Debian fix:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1113938
This commit is contained in:
roconnor 2026-05-22 15:00:55 -04:00
commit c18979f7b2

View file

@ -29,6 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
configureFlags = [
"--ar=${stdenv.cc.targetPrefix}ar"
"--target=${stdenv.hostPlatform.config}"
"--disable-shani"
(lib.enableFeature enableStatic "static")
(lib.enableFeature enableStatic "lib-static")
];