commit: 6696c873e15013fe8b382bcd30cc2d2fcd31b4a0 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Tue Aug 26 08:27:31 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Aug 26 08:28:42 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6696c873
sci-libs/blis: Backport GCC 15 haswell hack Closes: https://bugs.gentoo.org/942334 Pull-Request: https://github.com/flame/blis/pull/874 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> sci-libs/blis/blis-1.0.ebuild | 6 ++- sci-libs/blis/files/blis-1.0-gcc15.patch | 93 ++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 2 deletions(-) diff --git a/sci-libs/blis/blis-1.0.ebuild b/sci-libs/blis/blis-1.0.ebuild index 348b809181a4..5ee07cc65716 100644 --- a/sci-libs/blis/blis-1.0.ebuild +++ b/sci-libs/blis/blis-1.0.ebuild @@ -1,9 +1,9 @@ -# Copyright 2019-2024 Gentoo Authors +# Copyright 2019-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..13} ) inherit python-any-r1 toolchain-funcs DESCRIPTION="BLAS-like Library Instantiation Software Framework" @@ -41,6 +41,8 @@ PATCHES=( "${FILESDIR}"/${PN}-0.8.1-pkg-config.patch "${FILESDIR}"/${PN}-0.9.0-rpath.patch "${FILESDIR}"/${PN}-1.0-no-helper-headers.patch + # https://github.com/flame/blis/pull/874 + "${FILESDIR}"/${P}-gcc15.patch ) get_confname() { diff --git a/sci-libs/blis/files/blis-1.0-gcc15.patch b/sci-libs/blis/files/blis-1.0-gcc15.patch new file mode 100644 index 000000000000..c5122e98ccf3 --- /dev/null +++ b/sci-libs/blis/files/blis-1.0-gcc15.patch @@ -0,0 +1,93 @@ +From 6b970700a6fa352d71e1ea14ca44c5f39ce1c770 Mon Sep 17 00:00:00 2001 +From: Devin Matthews <[email protected]> +Date: Tue, 24 Jun 2025 14:45:14 -0500 +Subject: [PATCH 1/2] Apply temporary fix for gcc 15. + +Details: +- As reported in #845, gcc 15 fails to build the haswell + gemmsup kernels due to the use of rbp. +- As a temporary fix, disable slp-tree-vectorization in just + the affected files. +- Thanks @loveshack for reporting and @chillenb for the suggested + fix. +- Eventually, the kernels should be rewritten to avoid using rbp. +--- + kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c | 7 +++++++ + kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c | 7 +++++++ + kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c | 7 +++++++ + kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c | 7 +++++++ + 4 files changed, 28 insertions(+) + +diff --git a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c +index 918ca6d46b..e71732de3c 100644 +--- a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c ++++ b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8m.c +@@ -33,6 +33,13 @@ + + */ + ++// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845). ++// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also ++// make sure the compiler isn't clang since it also confusingly defines __GNUC__ ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15 ++#pragma GCC optimize("-fno-tree-slp-vectorize") ++#endif ++ + #include "blis.h" + + #define BLIS_ASM_SYNTAX_ATT +diff --git a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c +index 3f49068786..880af4207a 100644 +--- a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c ++++ b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_d6x8n.c +@@ -33,6 +33,13 @@ + + */ + ++// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845). ++// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also ++// make sure the compiler isn't clang since it also confusingly defines __GNUC__ ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15 ++#pragma GCC optimize("-fno-tree-slp-vectorize") ++#endif ++ + #include "blis.h" + + #define BLIS_ASM_SYNTAX_ATT +diff --git a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c +index 2b4ee7a9ba..d0814d6d82 100644 +--- a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c ++++ b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16m.c +@@ -33,6 +33,13 @@ + + */ + ++// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845). ++// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also ++// make sure the compiler isn't clang since it also confusingly defines __GNUC__ ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15 ++#pragma GCC optimize("-fno-tree-slp-vectorize") ++#endif ++ + #include "blis.h" + + #define BLIS_ASM_SYNTAX_ATT +diff --git a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c +index cc47db8bc1..bc2d783e3b 100644 +--- a/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c ++++ b/kernels/haswell/3/sup/bli_gemmsup_rv_haswell_asm_s6x16n.c +@@ -33,6 +33,13 @@ + + */ + ++// This avoids a known issue with GCC15 ("error: bp cannot be used in asm here", #845). ++// Only check for version 15 since this may be fixed in 16 (**fingers crossed**), and also ++// make sure the compiler isn't clang since it also confusingly defines __GNUC__ ++#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 15 ++#pragma GCC optimize("-fno-tree-slp-vectorize") ++#endif ++ + #include "blis.h" + + #define BLIS_ASM_SYNTAX_ATT +
