ispc: 20151128 -> 1.9.1, fix build

This commit is contained in:
Aristid Breitkreuz 2016-09-04 12:20:03 +02:00
parent dd3b6ef357
commit c4b0d80cba
3 changed files with 11 additions and 34 deletions

View File

@ -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"
];

View File

@ -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" <<

View File

@ -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 { };