Unverified Commit f30d55a2 authored by Markus Kowalewski's avatar Markus Kowalewski Committed by GitHub
Browse files

dbcsr: fix libxsmm discovery (#337940)

parents a9139661 b588a759
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -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 = ''
+13 −0
Original line number Diff line number Diff line
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))
+0 −4
Original line number Diff line number Diff line
@@ -50,10 +50,6 @@ stdenv.mkDerivation rec {

  propagatedBuildInputs = [ mpi ];

  preConfigure = ''
    export PKG_CONFIG_PATH=${libxsmm}/lib
  '';

  cmakeFlags = [
    "-DUSE_OPENMP=ON"
    "-DUSE_SMM=libxsmm"