openblas: fix static musl build

This commit is contained in:
Frederik Rietdijk 2020-01-02 18:53:00 +01:00 committed by Frederik Rietdijk
parent dd5fd3b1ff
commit 867552957f
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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 {