openblas: Allow setting DYNAMIC_ARCH
This commit is contained in:
parent
e424c9118b
commit
60ed2deee5
@ -15,6 +15,8 @@
|
|||||||
# Select a specific optimization target (other than the default)
|
# Select a specific optimization target (other than the default)
|
||||||
# See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt
|
# See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt
|
||||||
, target ? null
|
, target ? null
|
||||||
|
# Select whether DYNAMIC_ARCH is enabled or not.
|
||||||
|
, dynamicArch ? null
|
||||||
, enableStatic ? stdenv.hostPlatform.isStatic
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
@ -25,27 +27,28 @@ let blas64_ = blas64; in
|
|||||||
|
|
||||||
let
|
let
|
||||||
setTarget = x: if target == null then x else target;
|
setTarget = x: if target == null then x else target;
|
||||||
|
setDynamicArch = x: if dynamicArch == null then x else dynamicArch;
|
||||||
|
|
||||||
# To add support for a new platform, add an element to this set.
|
# To add support for a new platform, add an element to this set.
|
||||||
configs = {
|
configs = {
|
||||||
armv6l-linux = {
|
armv6l-linux = {
|
||||||
BINARY = 32;
|
BINARY = 32;
|
||||||
TARGET = setTarget "ARMV6";
|
TARGET = setTarget "ARMV6";
|
||||||
DYNAMIC_ARCH = false;
|
DYNAMIC_ARCH = setDynamicArch false;
|
||||||
USE_OPENMP = true;
|
USE_OPENMP = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
armv7l-linux = {
|
armv7l-linux = {
|
||||||
BINARY = 32;
|
BINARY = 32;
|
||||||
TARGET = setTarget "ARMV7";
|
TARGET = setTarget "ARMV7";
|
||||||
DYNAMIC_ARCH = false;
|
DYNAMIC_ARCH = setDynamicArch false;
|
||||||
USE_OPENMP = true;
|
USE_OPENMP = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
aarch64-darwin = {
|
aarch64-darwin = {
|
||||||
BINARY = 64;
|
BINARY = 64;
|
||||||
TARGET = setTarget "VORTEX";
|
TARGET = setTarget "VORTEX";
|
||||||
DYNAMIC_ARCH = true;
|
DYNAMIC_ARCH = setDynamicArch true;
|
||||||
USE_OPENMP = false;
|
USE_OPENMP = false;
|
||||||
MACOSX_DEPLOYMENT_TARGET = "11.0";
|
MACOSX_DEPLOYMENT_TARGET = "11.0";
|
||||||
};
|
};
|
||||||
@ -53,21 +56,21 @@ let
|
|||||||
aarch64-linux = {
|
aarch64-linux = {
|
||||||
BINARY = 64;
|
BINARY = 64;
|
||||||
TARGET = setTarget "ARMV8";
|
TARGET = setTarget "ARMV8";
|
||||||
DYNAMIC_ARCH = true;
|
DYNAMIC_ARCH = setDynamicArch true;
|
||||||
USE_OPENMP = true;
|
USE_OPENMP = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
i686-linux = {
|
i686-linux = {
|
||||||
BINARY = 32;
|
BINARY = 32;
|
||||||
TARGET = setTarget "P2";
|
TARGET = setTarget "P2";
|
||||||
DYNAMIC_ARCH = true;
|
DYNAMIC_ARCH = setDynamicArch true;
|
||||||
USE_OPENMP = true;
|
USE_OPENMP = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
x86_64-darwin = {
|
x86_64-darwin = {
|
||||||
BINARY = 64;
|
BINARY = 64;
|
||||||
TARGET = setTarget "ATHLON";
|
TARGET = setTarget "ATHLON";
|
||||||
DYNAMIC_ARCH = true;
|
DYNAMIC_ARCH = setDynamicArch true;
|
||||||
USE_OPENMP = false;
|
USE_OPENMP = false;
|
||||||
MACOSX_DEPLOYMENT_TARGET = "10.7";
|
MACOSX_DEPLOYMENT_TARGET = "10.7";
|
||||||
};
|
};
|
||||||
@ -75,14 +78,14 @@ let
|
|||||||
x86_64-linux = {
|
x86_64-linux = {
|
||||||
BINARY = 64;
|
BINARY = 64;
|
||||||
TARGET = setTarget "ATHLON";
|
TARGET = setTarget "ATHLON";
|
||||||
DYNAMIC_ARCH = true;
|
DYNAMIC_ARCH = setDynamicArch true;
|
||||||
USE_OPENMP = !stdenv.hostPlatform.isMusl;
|
USE_OPENMP = !stdenv.hostPlatform.isMusl;
|
||||||
};
|
};
|
||||||
|
|
||||||
powerpc64le-linux = {
|
powerpc64le-linux = {
|
||||||
BINARY = 64;
|
BINARY = 64;
|
||||||
TARGET = setTarget "POWER5";
|
TARGET = setTarget "POWER5";
|
||||||
DYNAMIC_ARCH = true;
|
DYNAMIC_ARCH = setDynamicArch true;
|
||||||
USE_OPENMP = !stdenv.hostPlatform.isMusl;
|
USE_OPENMP = !stdenv.hostPlatform.isMusl;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user