From 3785b5ed5ea33519411be3f8d035d0137cccf3c8 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 7 Dec 2025 13:47:39 -0800 Subject: [PATCH] amd-blis: backport fix for GCC 15 build error Build was failing with error: 'asm' operand has impossible constraints or there are not enough register Upstream issue: https://github.com/amd/blis/issues/34 --- pkgs/by-name/am/amd-blis/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/am/amd-blis/package.nix b/pkgs/by-name/am/amd-blis/package.nix index 0e59a24ed3f6..fae23b5f4b8d 100644 --- a/pkgs/by-name/am/amd-blis/package.nix +++ b/pkgs/by-name/am/amd-blis/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, perl, python3, @@ -36,6 +37,18 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # Set the date stamp to $SOURCE_DATE_EPOCH ./build-date.patch + # backporting a fix for a GCC15 build error + # ./frame/include/bli_x86_asm_macros.h:102:21: error: 'asm' operand has impossible constraints or there are not enough registers + (fetchpatch { + name = "amd-blis-gcc-15-fix-1.patch"; + url = "https://github.com/amd/blis/commit/14e46ad83bac5fd82569a43c7cbd3e791a1eacc8.patch"; + hash = "sha256-3vk9NSnhT64J6PUabeP58Gn7p1zheGbPxSRjVEX7WNg="; + }) + (fetchpatch { + name = "amd-blis-gcc-15-fix-2.patch"; + url = "https://github.com/amd/blis/commit/30c42202d78fd5ee5e54d50ad57348e5e541a7d5.patch"; + hash = "sha256-FCMWQzfzQxCQqngULoXfh35BFGaNTu732iu3HctNcFM="; + }) ]; inherit blas64;