dbcsr: fix libxsmm discovery (#337940)

This commit is contained in:
Markus Kowalewski 2024-08-30 16:08:42 +02:00 committed by GitHub
commit f30d55a2b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 8 deletions

View File

@ -6,16 +6,20 @@
stdenv.mkDerivation rec {
pname = "libxsmm";
version = "1.16.3";
version = "1.17";
src = fetchFromGitHub {
owner = "hfp";
owner = "libxsmm";
repo = "libxsmm";
rev = version;
sha256 = "sha256-PpMiD/PeQ0pe5hqFG6VFHWpR8y3wnO2z1dJfHHeItlQ=";
sha256 = "sha256-s/NEFU4IwQPLyPLwMmrrpMDd73q22Sk2BNid/kedawY=";
};
# Fixes /build references in the rpath
patches = [ ./rpath.patch ];
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = [
gfortran
python3
@ -39,7 +43,7 @@ stdenv.mkDerivation rec {
mkdir -p $dev/lib/pkgconfig
mv $out/lib/*.pc $dev/lib/pkgconfig
moveToOutput "share/libxsmm" "$doc"
moveToOutput "share/libxsmm" ''${!outputDoc}
'';
prePatch = ''

View File

@ -0,0 +1,13 @@
diff --git a/Makefile.inc b/Makefile.inc
index 424d7b2e4..87934fee0 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -918,7 +918,7 @@ ifneq (Darwin,$(UNAME))
XLNKVERBOSE := --verbose
linkopt = $(if $1,$(XLNKOPT)$(if $2,$1=$(call quote,$2),$1))
abslibrpath = $(strip $(if $(findstring .$(ILIBEXT),$1)$(wildcard $1/), \
- $(call linkopt,--rpath,$(call qxdir,$(call qapath,$1)))))
+ $(call linkopt,--rpath,$(PREFIX)/lib)))
XGROUP_BEGIN := $(call linkopt,--start-group)
XGROUP_END := $(call linkopt,--end-group)
ifneq (0,$(ASNEEDED))

View File

@ -50,10 +50,6 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ mpi ];
preConfigure = ''
export PKG_CONFIG_PATH=${libxsmm}/lib
'';
cmakeFlags = [
"-DUSE_OPENMP=ON"
"-DUSE_SMM=libxsmm"