aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/compilers/ispc
diff options
context:
space:
mode:
authorPascal Wittmann <mail@pascal-wittmann.de>2016-03-24 18:12:49 +0100
committerPascal Wittmann <mail@pascal-wittmann.de>2016-03-24 20:54:59 +0100
commit311ddcbd7a77fbbf89da5403a0b095718b81d802 (patch)
treefd7e81b8ba272c4e6a3b263eba0a0dfe6dfb14d2 /pkgs/development/compilers/ispc
parent5d6a4a6fa9bc340e5e2daefd6b82cdd5b9f011e9 (diff)
ispc: fix build
Diffstat (limited to 'pkgs/development/compilers/ispc')
-rw-r--r--pkgs/development/compilers/ispc/default.nix7
-rw-r--r--pkgs/development/compilers/ispc/gcc5.patch22
2 files changed, 27 insertions, 2 deletions
diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix
index 1995923842f..08f0d7e06b1 100644
--- a/pkgs/development/compilers/ispc/default.nix
+++ b/pkgs/development/compilers/ispc/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
sha256 = "15qi22qvmlx3jrhrf3rwl0y77v66prpan6qb66a55dw3pw2d4jvn";
};
- enableParallelBuilding = true;
+ enableParallelBuilding = false;
doCheck = true;
@@ -29,7 +29,10 @@ stdenv.mkDerivation rec {
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 = ''
mkdir -p $out/bin
diff --git a/pkgs/development/compilers/ispc/gcc5.patch b/pkgs/development/compilers/ispc/gcc5.patch
new file mode 100644
index 00000000000..4f2b7b682fe
--- /dev/null
+++ b/pkgs/development/compilers/ispc/gcc5.patch
@@ -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" <<