diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix index 08f0d7e06b1..c71f39749c3 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 4f2b7b682fe..00000000000 --- 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" << diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 083d9b42acd..039de85708b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7760,7 +7760,7 @@ in isocodes = callPackage ../development/libraries/iso-codes { }; ispc = callPackage ../development/compilers/ispc { - llvmPackages = llvmPackages_37; + llvmPackages = llvmPackages_39; }; itk = callPackage ../development/libraries/itk { };