about summary refs log tree commit diff
path: root/pkgs/development/compilers/ispc
diff options
context:
space:
mode:
authorAristid Breitkreuz <aristidb@gmail.com>2016-09-04 12:20:03 +0200
committerAristid Breitkreuz <aristidb@gmail.com>2016-09-04 14:08:40 +0200
commitc4b0d80cba6375069db956f34022e3fa9ac1c564 (patch)
treeeb05e612427ef9008133f5fe8315fb581bc3f59b /pkgs/development/compilers/ispc
parentdd3b6ef357b18a5fd1793c803f4d54ec080f70a0 (diff)
ispc: 20151128 -> 1.9.1, fix build
Diffstat (limited to 'pkgs/development/compilers/ispc')
-rw-r--r--pkgs/development/compilers/ispc/default.nix21
-rw-r--r--pkgs/development/compilers/ispc/gcc5.patch22
2 files changed, 10 insertions, 33 deletions
diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix
index 08f0d7e06b131..c71f39749c36c 100644
--- a/pkgs/development/compilers/ispc/default.nix
+++ b/pkgs/development/compilers/ispc/default.nix
@@ -1,10 +1,10 @@
-{stdenv, fetchFromGitHub, which, m4, python, bison, flex, llvmPackages}:
+{stdenv, fetchFromGitHub, which, m4, python, bison, flex, llvmPackages, clangWrapSelf}:
 
-# TODO: patch LLVM so Knights Landing works better (patch included in ispc github)
+# TODO: patch LLVM so Skylake-EX works better (patch included in ispc github) - needed for LLVM 3.9?
 
 stdenv.mkDerivation rec {
-  version = "20151128";
-  rev = "d3020580ff18836de2d4cae18901980b551d9d01";
+  version = "1.9.1";
+  rev = "v${version}";
 
   name = "ispc-${version}";
 
@@ -12,10 +12,10 @@ stdenv.mkDerivation rec {
     owner = "ispc";
     repo = "ispc";
     inherit rev;
-    sha256 = "15qi22qvmlx3jrhrf3rwl0y77v66prpan6qb66a55dw3pw2d4jvn";
+    sha256 = "1wwsyvn44hd5iyi5779l5378x096307slpyl29wrsmfp66796693";
   };
 
-  enableParallelBuilding = false;
+  enableParallelBuilding = true;
 
   doCheck = true;
 
@@ -26,12 +26,9 @@ stdenv.mkDerivation rec {
     bison
     flex
     llvm
-    clang
+    llvmPackages.clang-unwrapped # we need to link against libclang, so we need the unwrapped
   ];
 
-  # https://github.com/ispc/ispc/pull/1190
-  patches = [ ./gcc5.patch ];
-
   postPatch = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile";
 
   installPhase = ''
@@ -41,10 +38,12 @@ stdenv.mkDerivation rec {
 
   checkPhase = ''
     export ISPC_HOME=$PWD
-    python run_tests.py
+    PATH=${llvmPackages.clang}/bin:$PATH python run_tests.py --non-interactive
   '';
 
   makeFlags = [
+    "CXX=${llvmPackages.clang}/bin/clang++"
+    "CLANG=${llvmPackages.clang}/bin/clang"
     "CLANG_INCLUDE=${llvmPackages.clang-unwrapped}/include"
     ];
 
diff --git a/pkgs/development/compilers/ispc/gcc5.patch b/pkgs/development/compilers/ispc/gcc5.patch
deleted file mode 100644
index 4f2b7b682fee6..0000000000000
--- a/pkgs/development/compilers/ispc/gcc5.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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" <<