From 15ca6e149e1bab50f4571d755613f1cc919f7f39 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 17 Feb 2017 15:47:44 -0600 Subject: [PATCH] souper: bump to latest--using LLVM 4 and custom KLEE. Add patch to fix the build when LLVM reports no system libs, llvm-config's behavior changed in LLVM r291285. Fixes #22920. --- .../compilers/souper/cmake-fix.patch | 14 +++++++++++++ pkgs/development/compilers/souper/default.nix | 20 ++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/compilers/souper/cmake-fix.patch diff --git a/pkgs/development/compilers/souper/cmake-fix.patch b/pkgs/development/compilers/souper/cmake-fix.patch new file mode 100644 index 000000000000..5ef289f53e93 --- /dev/null +++ b/pkgs/development/compilers/souper/cmake-fix.patch @@ -0,0 +1,14 @@ +--- souper-1be75fe6a96993b57dcba038798fe6d1c7d113eb-src/CMakeLists.txt.orig 2017-01-20 13:55:14.783632588 -0600 ++++ souper-1be75fe6a96993b57dcba038798fe6d1c7d113eb-src/CMakeLists.txt 2017-01-20 13:55:20.505728456 -0600 +@@ -33,7 +33,10 @@ + OUTPUT_VARIABLE LLVM_SYSTEM_LIBS + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +-set(LLVM_LIBS "${LLVM_LIBS} ${LLVM_SYSTEM_LIBS}") ++ ++if (LLVM_SYSTEM_LIBS) ++ set(LLVM_LIBS "${LLVM_LIBS} ${LLVM_SYSTEM_LIBS}") ++endif() + + execute_process( + COMMAND ${LLVM_CONFIG_EXECUTABLE} --ldflags diff --git a/pkgs/development/compilers/souper/default.nix b/pkgs/development/compilers/souper/default.nix index 74e1cbf68d30..6ea135ea9906 100644 --- a/pkgs/development/compilers/souper/default.nix +++ b/pkgs/development/compilers/souper/default.nix @@ -1,22 +1,22 @@ { stdenv, fetchFromGitHub, cmake, makeWrapper -, llvmPackages_39, hiredis, z3_opt, gtest +, llvmPackages_4, hiredis, z3_opt, gtest }: let klee = fetchFromGitHub { - owner = "klee"; + owner = "rsas"; repo = "klee"; - rev = "a743d7072d9ccf11f96e3df45f25ad07da6ad9d6"; - sha256 = "0qwzs029vlba8xz362n4b00hdm2z3lzhzmvix1r8kpbfrvs8vv91"; + rev = "57cd3d43056b029d9da3c6b3c666c4153554c04f"; + sha256 = "197wb7nbirlfpx2jr3afpjjhcj7slc4dxxi02j3kmazz9kcqaygz"; }; in stdenv.mkDerivation { - name = "souper-unstable-2017-01-05"; + name = "souper-unstable-2017-03-07"; src = fetchFromGitHub { owner = "google"; repo = "souper"; - rev = "1be75fe6a96993b57dcba038798fe6d1c7d113eb"; - sha256 = "0r8mjb88lwz9a3syx7gwsxlwfg0krffaml04ggaf3ad0cza2mvm8"; + rev = "5faed54ddc4a0e0e12647a0eac1da455a1067a47"; + sha256 = "1v8ml94ryw5wdls9syvicx4sc9l34yaq8r7cf7is6x7y1q677rps"; }; nativeBuildInputs = [ @@ -25,12 +25,14 @@ in stdenv.mkDerivation { ]; buildInputs = [ - llvmPackages_39.llvm - llvmPackages_39.clang-unwrapped + llvmPackages_4.llvm + llvmPackages_4.clang-unwrapped hiredis gtest ]; + patches = [ ./cmake-fix.patch ]; + enableParallelBuilding = true; preConfigure = ''