Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

ispc: fix build

+27 -2
+5 -2
pkgs/development/compilers/ispc/default.nix
··· 15 15 sha256 = "15qi22qvmlx3jrhrf3rwl0y77v66prpan6qb66a55dw3pw2d4jvn"; 16 16 }; 17 17 18 - enableParallelBuilding = true; 18 + enableParallelBuilding = false; 19 19 20 20 doCheck = true; 21 21 ··· 29 29 clang 30 30 ]; 31 31 32 - patchPhase = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile"; 32 + # https://github.com/ispc/ispc/pull/1190 33 + patches = [ ./gcc5.patch ]; 34 + 35 + postPatch = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile"; 33 36 34 37 installPhase = '' 35 38 mkdir -p $out/bin
+22
pkgs/development/compilers/ispc/gcc5.patch
··· 1 + diff --git a/cbackend.cpp b/cbackend.cpp 2 + index 3552205..9c05824 100644 3 + --- a/cbackend.cpp 4 + +++ b/cbackend.cpp 5 + @@ -1641,7 +1641,7 @@ void CWriter::printConstant(llvm::Constant *CPV, bool Static) { 6 + V = Tmp.convertToDouble(); 7 + } 8 + 9 + - if (isnan(V)) { 10 + + if (std::isnan(V)) { 11 + // The value is NaN 12 + 13 + // FIXME the actual NaN bits should be emitted. 14 + @@ -1665,7 +1665,7 @@ void CWriter::printConstant(llvm::Constant *CPV, bool Static) { 15 + else 16 + Out << "LLVM_NAN" << (Val == QuietNaN ? "" : "S") << "(\"" 17 + << Buffer << "\") /*nan*/ "; 18 + - } else if (isinf(V)) { 19 + + } else if (std::isinf(V)) { 20 + // The value is Inf 21 + if (V < 0) Out << '-'; 22 + Out << "LLVM_INF" <<