mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
openblas: fix on darwin
The openblas script relies on CC=clang for succesfully compiling on Darwin systems. This seems like bad behavior, but we get things like https://hydra.nixos.org/build/87657058 otherwise. Fixes #55536.
This commit is contained in:
parent
2926b6e11f
commit
cfc43138cb
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, fetchpatch, gfortran, perl, which, config, coreutils
|
||||
{ stdenv, fetchFromGitHub, fetchpatch, gfortran, perl, which, config
|
||||
# Most packages depending on openblas expect integer width to match
|
||||
# pointer width, but some expect to use 32-bit integers always
|
||||
# (for compatibility with reference BLAS).
|
||||
@ -102,24 +102,18 @@ stdenv.mkDerivation rec {
|
||||
"relro" "bindnow"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
perl
|
||||
which
|
||||
buildPackages.gfortran
|
||||
buildPackages.stdenv.cc
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
coreutils
|
||||
];
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ perl which gfortran ];
|
||||
|
||||
makeFlags = mapAttrsToList (var: val: "${var}=${toString val}") (config // {
|
||||
FC = "${stdenv.cc.targetPrefix}gfortran";
|
||||
CC = "${stdenv.cc.targetPrefix}cc";
|
||||
CC = "${stdenv.cc.targetPrefix}${if stdenv.cc.isClang then "clang" else "cc"}";
|
||||
PREFIX = placeholder "out";
|
||||
NUM_THREADS = 64;
|
||||
INTERFACE64 = blas64;
|
||||
NO_STATIC = true;
|
||||
CROSS = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
HOSTCC = "${buildPackages.stdenv.cc.targetPrefix}cc";
|
||||
HOSTCC = "cc";
|
||||
NO_BINARY_MODE = stdenv.hostPlatform != stdenv.buildPlatform;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user