aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/compilers/ispc/default.nix
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-05-20 01:39:43 +0200
committerKatharina Fey <kookie@spacekookie.de>2020-05-20 01:39:43 +0200
commit1849de11ec1e32e9eebb83f24d5339bea88b7ed7 (patch)
tree0aaf3cead09c2d55c67c6f6a86ad20af399797d8 /nixpkgs/pkgs/development/compilers/ispc/default.nix
parent304c06d7a7ea3f5c84031d325ece8d38b8c1d829 (diff)
parent0f5ce2fac0c726036ca69a5524c59a49e2973dd4 (diff)
Merge commit '0f5ce2fac0c726036ca69a5524c59a49e2973dd4'
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/ispc/default.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/ispc/default.nix69
1 files changed, 36 insertions, 33 deletions
diff --git a/nixpkgs/pkgs/development/compilers/ispc/default.nix b/nixpkgs/pkgs/development/compilers/ispc/default.nix
index 022651a3c0e..01e1eaca6e1 100644
--- a/nixpkgs/pkgs/development/compilers/ispc/default.nix
+++ b/nixpkgs/pkgs/development/compilers/ispc/default.nix
@@ -1,42 +1,44 @@
-{stdenv, fetchFromGitHub, cmake, which, m4, python, bison, flex, llvmPackages,
-testedTargets ? ["sse2"] # the default test target is sse4, but that is not supported by all Hydra agents
+{ stdenv, fetchFromGitHub
+, cmake, which, m4, python3, bison, flex, llvmPackages
+
+ # the default test target is sse4, but that is not supported by all Hydra agents
+, testedTargets ? [ "sse2" ]
}:
stdenv.mkDerivation rec {
- version = "1.10.0";
- rev = "v${version}";
-
- inherit testedTargets;
-
- pname = "ispc";
+ pname = "ispc";
+ version = "1.13.0";
src = fetchFromGitHub {
- owner = "ispc";
- repo = "ispc";
- inherit rev;
- sha256 = "1x07n2gaff3v32yvddrb659mx5gg12bnbsqbyfimp396wn04w60b";
+ owner = pname;
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1l74xkpwwxc38k2ngg7mpvswziiy91yxslgfad6688hh1n5jvayd";
};
- doCheck = stdenv.isLinux;
-
- nativeBuildInputs = [ cmake ];
+ nativeBuildInputs = [ cmake which m4 bison flex python3 ];
buildInputs = with llvmPackages; [
- which
- m4
- python
- bison
- flex
- llvm
- llvmPackages.clang-unwrapped # we need to link against libclang, so we need the unwrapped
+ # we need to link against libclang, so we need the unwrapped
+ llvm llvmPackages.clang-unwrapped
];
- postPatch = "sed -i -e 's/curses/ncurses/g' CMakeLists.txt";
+ postPatch = ''
+ substituteInPlace CMakeLists.txt \
+ --replace curses ncurses
+ substituteInPlace cmake/GenerateBuiltins.cmake \
+ --replace 'bit 32 64' 'bit 64'
+ '';
+
+ inherit testedTargets;
- # TODO: this correctly catches errors early, but also some things that are just weird and don't seem to be real
- # errors
- #configurePhase = ''
- # makeFlagsArray=( SHELL="${bash}/bin/bash -o pipefail" )
- #'';
+ # needs 'transcendentals' executable, which is only on linux
+ doCheck = stdenv.isLinux;
+
+ # the compiler enforces -Werror, and -fno-strict-overflow makes it mad.
+ # hilariously this is something of a double negative: 'disable' the
+ # 'strictoverflow' hardening protection actually means we *allow* the compiler
+ # to do strict overflow optimization. somewhat misleading...
+ hardeningDisable = [ "strictoverflow" ];
checkPhase = ''
export ISPC_HOME=$PWD/bin
@@ -55,13 +57,14 @@ stdenv.mkDerivation rec {
"-DCLANG_EXECUTABLE=${llvmPackages.clang}/bin/clang"
"-DISPC_INCLUDE_EXAMPLES=OFF"
"-DISPC_INCLUDE_UTILS=OFF"
- ];
+ "-DARM_ENABLED=FALSE"
+ ];
meta = with stdenv.lib; {
- homepage = "https://ispc.github.io/";
+ homepage = "https://ispc.github.io/";
description = "Intel 'Single Program, Multiple Data' Compiler, a vectorised language";
- license = licenses.bsd3;
- platforms = ["x86_64-linux" "x86_64-darwin"]; # TODO: buildable on more platforms?
- maintainers = [ maintainers.aristid ];
+ license = licenses.bsd3;
+ platforms = [ "x86_64-linux" "x86_64-darwin" ]; # TODO: buildable on more platforms?
+ maintainers = with maintainers; [ aristid thoughtpolice ];
};
}