diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-12-24 07:41:16 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-12-24 07:41:16 +0000 |
commit | 3e3aa158fd100df495010eed7915f012d5c9bcaa (patch) | |
tree | eec12007aef38a8d8dbffd66d0e186f005fdc65c /sci-mathematics/flint/files | |
parent | 4560e1a95e1072b051371c59aec78b15e4787ded (diff) |
gentoo auto-resync : 24:12:2023 - 07:41:16
Diffstat (limited to 'sci-mathematics/flint/files')
-rw-r--r-- | sci-mathematics/flint/files/flint-3.0.1-find-cblas.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sci-mathematics/flint/files/flint-3.0.1-find-cblas.patch b/sci-mathematics/flint/files/flint-3.0.1-find-cblas.patch new file mode 100644 index 000000000000..77a9ed2e888f --- /dev/null +++ b/sci-mathematics/flint/files/flint-3.0.1-find-cblas.patch @@ -0,0 +1,44 @@ +From 5cb3535b911c78adb9c8a908104fc4be3ffbfe51 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Sat, 23 Dec 2023 14:38:46 -0500 +Subject: [PATCH 1/1] CMake/FindCBLAS.cmake: search only for cblas + +On Gentoo, users can "eselect cblas" to choose a cblas implementation +at runtime. Packages build against the reference cblas, but the others +are (by design) compatible, so we can force one to take precedence at +runtime with an ld.so.conf entry. But that only works when consumers +link to libcblas.so. If they link directly to (say) openblas, then +changing how libcblas.so resolves won't help. + +When Flint tries to find "cblas," it looks for accelerate and openblas +before plain cblas. That runs afoul of the scheme described above. To +remedy it, we patch the search function so that only "cblas" is +considered. Since virtual/cblas always pulls in the reference +implementation, there'd be no point in altering the search order to +consider e.g. openblas after cblas. +--- + CMake/FindCBLAS.cmake | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/CMake/FindCBLAS.cmake b/CMake/FindCBLAS.cmake +index f5b5b1c..f4919f4 100644 +--- a/CMake/FindCBLAS.cmake ++++ b/CMake/FindCBLAS.cmake +@@ -11,13 +11,11 @@ + find_path(CBLAS_INCLUDE_DIRS NAMES cblas.h + HINTS CBLAS_ROOT ENV CBLAS_ROOT + PATHS ${INCLUDE_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/include +- PATH_SUFFIXES openblas cblas blis flexiblas + ) + +-find_library(CBLAS_LIBRARIES NAMES accelerate openblas cblas blas blis flexiblas ++find_library(CBLAS_LIBRARIES NAMES cblas + HINTS CBLAS_ROOT ENV CBLAS_ROOT + PATHS ${LIB_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/lib +- PATH_SUFFIXES openblas cblas blis flexiblas + ) + + include(FindPackageHandleStandardArgs) +-- +2.41.0 + |