Support for ARM in openblas
Attempting to build openblas on ARM resulted in the error "unsopported system: armv7l_linux". This PR resolves that issue and some other issues that pop up when trying to build openblas for ARM.
This commit is contained in:
parent
fd0d7229ff
commit
5f5f0614b0
@ -11,11 +11,12 @@ let blas64_ = blas64; in
|
|||||||
let local = config.openblas.preferLocalBuild or false;
|
let local = config.openblas.preferLocalBuild or false;
|
||||||
binary =
|
binary =
|
||||||
{ i686-linux = "32";
|
{ i686-linux = "32";
|
||||||
|
armv7l-linux = "32";
|
||||||
x86_64-linux = "64";
|
x86_64-linux = "64";
|
||||||
x86_64-darwin = "64";
|
x86_64-darwin = "64";
|
||||||
}."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
|
}."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
|
||||||
genericFlags =
|
genericFlags =
|
||||||
[ "DYNAMIC_ARCH=1"
|
[ "DYNAMIC_ARCH=${if stdenv.system == "armv7l-linux" then "0" else "1"}"
|
||||||
"NUM_THREADS=64"
|
"NUM_THREADS=64"
|
||||||
];
|
];
|
||||||
localFlags = config.openblas.flags or
|
localFlags = config.openblas.flags or
|
||||||
@ -65,7 +66,9 @@ stdenv.mkDerivation {
|
|||||||
"BINARY=${binary}"
|
"BINARY=${binary}"
|
||||||
"USE_OPENMP=${if stdenv.isDarwin then "0" else "1"}"
|
"USE_OPENMP=${if stdenv.isDarwin then "0" else "1"}"
|
||||||
"INTERFACE64=${if blas64 then "1" else "0"}"
|
"INTERFACE64=${if blas64 then "1" else "0"}"
|
||||||
];
|
]
|
||||||
|
++
|
||||||
|
optionals (stdenv.system == "armv7l-linux") ["TARGET=ARMV7"];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
checkTarget = "tests";
|
checkTarget = "tests";
|
||||||
|
Loading…
Reference in New Issue
Block a user