Skip to content

Commit

Permalink
m4ri: do not autodetect some SIMD cpuflags
Browse files Browse the repository at this point in the history
Co-authored-by: Reno Dakota <[email protected]>
  • Loading branch information
collares and paparodeo committed Jan 13, 2025
1 parent ed4a395 commit 5939649
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pkgs/by-name/m4/m4ri/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,35 @@ stdenv.mkDerivation rec {
hash = "sha256-untwo0go8O8zNO0EyZ4n/n7mngSXLr3Z/FSkXA8ptnU=";
};

# based on the list in m4/m4_ax_ext.m4
configureFlags = builtins.map (s: "ax_cv_have_${s}_cpu_ext=no") (
[
"sha"
"xop"
]
++ lib.optional (!stdenv.hostPlatform.sse3Support) "sse3"
++ lib.optional (!stdenv.hostPlatform.ssse3Support) "ssse3"
++ lib.optional (!stdenv.hostPlatform.sse4_1Support) "sse41"
++ lib.optional (!stdenv.hostPlatform.sse4_2Support) "sse42"
++ lib.optional (!stdenv.hostPlatform.sse4_aSupport) "sse4a"
++ lib.optional (!stdenv.hostPlatform.aesSupport) "aes"
++ lib.optional (!stdenv.hostPlatform.avxSupport) "avx"
++ lib.optional (!stdenv.hostPlatform.fmaSupport) "fma3"
++ lib.optional (!stdenv.hostPlatform.fma4Support) "fma4"
++ lib.optional (!stdenv.hostPlatform.avx2Support) "avx2"
++ lib.optionals (!stdenv.hostPlatform.avx512Support) [
"avx512f"
"avx512cd"
"avx512pf"
"avx512er"
"avx512vl"
"avx512bw"
"avx512dq"
"avx512ifma"
"avx512vbmi"
]
);

doCheck = true;

nativeBuildInputs = [
Expand Down

0 comments on commit 5939649

Please sign in to comment.