From 867552957fc35828de8ce9fb3558e02adcdd8072 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 2 Jan 2020 18:53:00 +0100 Subject: [PATCH] openblas: fix static musl build --- pkgs/development/libraries/science/math/openblas/default.nix | 4 +++- pkgs/top-level/static.nix | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index bf9912f36e8..a26cf38a9d0 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -8,6 +8,7 @@ # See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt , target ? null , enableStatic ? false +, enableShared ? true }: with stdenv.lib; @@ -60,7 +61,7 @@ let TARGET = setTarget "ATHLON"; DYNAMIC_ARCH = true; NO_AVX512 = true; - USE_OPENMP = true; + USE_OPENMP = !stdenv.hostPlatform.isMusl; }; }; in @@ -129,6 +130,7 @@ stdenv.mkDerivation rec { NUM_THREADS = 64; INTERFACE64 = blas64; NO_STATIC = !enableStatic; + NO_SHARED = !enableShared; CROSS = stdenv.hostPlatform != stdenv.buildPlatform; HOSTCC = "cc"; # Makefile.system only checks defined status diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index fbffd8e08f5..e52818379fa 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -152,7 +152,10 @@ in { optipng = super.optipng.override { static = true; }; - openblas = super.openblas.override { enableStatic = true; }; + openblas = super.openblas.override { + enableStatic = true; + enableShared = false; + }; nix = super.nix.override { withAWS = false; }; # openssl 1.1 doesn't compile openssl = super.openssl_1_0_2.override {