ispc: fix build
This commit is contained in:
parent
5d6a4a6fa9
commit
311ddcbd7a
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "15qi22qvmlx3jrhrf3rwl0y77v66prpan6qb66a55dw3pw2d4jvn";
|
sha256 = "15qi22qvmlx3jrhrf3rwl0y77v66prpan6qb66a55dw3pw2d4jvn";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
@ -29,7 +29,10 @@ stdenv.mkDerivation rec {
|
|||||||
clang
|
clang
|
||||||
];
|
];
|
||||||
|
|
||||||
patchPhase = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile";
|
# https://github.com/ispc/ispc/pull/1190
|
||||||
|
patches = [ ./gcc5.patch ];
|
||||||
|
|
||||||
|
postPatch = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
22
pkgs/development/compilers/ispc/gcc5.patch
Normal file
22
pkgs/development/compilers/ispc/gcc5.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/cbackend.cpp b/cbackend.cpp
|
||||||
|
index 3552205..9c05824 100644
|
||||||
|
--- a/cbackend.cpp
|
||||||
|
+++ b/cbackend.cpp
|
||||||
|
@@ -1641,7 +1641,7 @@ void CWriter::printConstant(llvm::Constant *CPV, bool Static) {
|
||||||
|
V = Tmp.convertToDouble();
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (isnan(V)) {
|
||||||
|
+ if (std::isnan(V)) {
|
||||||
|
// The value is NaN
|
||||||
|
|
||||||
|
// FIXME the actual NaN bits should be emitted.
|
||||||
|
@@ -1665,7 +1665,7 @@ void CWriter::printConstant(llvm::Constant *CPV, bool Static) {
|
||||||
|
else
|
||||||
|
Out << "LLVM_NAN" << (Val == QuietNaN ? "" : "S") << "(\""
|
||||||
|
<< Buffer << "\") /*nan*/ ";
|
||||||
|
- } else if (isinf(V)) {
|
||||||
|
+ } else if (std::isinf(V)) {
|
||||||
|
// The value is Inf
|
||||||
|
if (V < 0) Out << '-';
|
||||||
|
Out << "LLVM_INF" <<
|
Loading…
x
Reference in New Issue
Block a user