diff --git a/pkgs/by-name/su/superlu/package.nix b/pkgs/by-name/su/superlu/package.nix index 6b2455c92f37..13c8a51830ca 100644 --- a/pkgs/by-name/su/superlu/package.nix +++ b/pkgs/by-name/su/superlu/package.nix @@ -34,6 +34,11 @@ stdenv.mkDerivation (finalAttrs: { }) ]; + # Prevent clang from crashing when compiling slatms.c from SuperLU’s matgen test code. + postPatch = lib.optionalString stdenv.cc.isClang '' + echo 'target_compile_options(matgen PRIVATE -fno-vectorize)' >> TESTING/MATGEN/CMakeLists.txt + ''; + nativeBuildInputs = [ cmake ninja