From f90df7f3ceac962ec342b40ed0a8a6f2080e4cd9 Mon Sep 17 00:00:00 2001 From: qbisi Date: Sat, 4 Oct 2025 09:00:44 +0800 Subject: [PATCH] superlu: fix build with clang21 --- pkgs/by-name/su/superlu/package.nix | 5 +++++ 1 file changed, 5 insertions(+) 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