git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitcfc43138cb2d906b9b24563a4487949efb106532 authorMatthew Bauer <mjbauer95@gmail.com> dateSun 10 Feb 2019, 18:49 (8 years ago) parent2926b6e
1 file changed+5−11
pkgs/development/libraries/science/math/openblas/default.nix+5−11
pkgs/development/libraries/science/math/openblas/default.nix+5−11
@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, fetchpatch, gfortran, perl, which, config, coreutils
1+{ stdenv, fetchFromGitHub, fetchpatch, gfortran, perl, which, config
22# Most packages depending on openblas expect integer width to match
33# pointer width, but some expect to use 32-bit integers always
44# (for compatibility with reference BLAS).
@@ -102,24 +102,18 @@ stdenv.mkDerivation rec {
102102 "relro" "bindnow"
103103 ];
104104
105− nativeBuildInputs = [
106− perl
107− which
108− buildPackages.gfortran
109− buildPackages.stdenv.cc
110− ] ++ optionals stdenv.isDarwin [
111− coreutils
112− ];
105+ depsBuildBuild = [ buildPackages.stdenv.cc ];
106+ nativeBuildInputs = [ perl which gfortran ];
113107
114108 makeFlags = mapAttrsToList (var: val: "${var}=${toString val}") (config // {
115109 FC = "${stdenv.cc.targetPrefix}gfortran";
116− CC = "${stdenv.cc.targetPrefix}cc";
110+ CC = "${stdenv.cc.targetPrefix}${if stdenv.cc.isClang then "clang" else "cc"}";
117111 PREFIX = placeholder "out";
118112 NUM_THREADS = 64;
119113 INTERFACE64 = blas64;
120114 NO_STATIC = true;
121115 CROSS = stdenv.hostPlatform != stdenv.buildPlatform;
122− HOSTCC = "${buildPackages.stdenv.cc.targetPrefix}cc";
116+ HOSTCC = "cc";
123117 NO_BINARY_MODE = stdenv.hostPlatform != stdenv.buildPlatform;
124118 });
125119