aflplusplus: remove clang_9 and llvm_9 specificity

i've successfully built this with llvm 8 and 6 now - make this easier to
override
This commit is contained in:
Robert Scott 2020-05-16 22:13:56 +01:00
parent 5f19ec3bc4
commit d478d7a65b
2 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, stdenvNoCC, fetchFromGitHub, callPackage, makeWrapper
, clang_9, llvm_9, gcc, which, libcgroup, python, perl, gmp
, clang, llvm, gcc, which, libcgroup, python, perl, gmp
, file, wine ? null, fetchpatch
}:
@ -29,16 +29,16 @@ let
# Note: libcgroup isn't needed for building, just for the afl-cgroup
# script.
nativeBuildInputs = [ makeWrapper which clang_9 gcc ];
buildInputs = [ llvm_9 python gmp ]
nativeBuildInputs = [ makeWrapper which clang gcc ];
buildInputs = [ llvm python gmp ]
++ stdenv.lib.optional (wine != null) python.pkgs.wrapPython;
postPatch = ''
# Replace the CLANG_BIN variables with the correct path
substituteInPlace llvm_mode/afl-clang-fast.c \
--replace "CLANGPP_BIN" '"${clang_9}/bin/clang++"' \
--replace "CLANG_BIN" '"${clang_9}/bin/clang"' \
--replace "CLANGPP_BIN" '"${clang}/bin/clang++"' \
--replace "CLANG_BIN" '"${clang}/bin/clang"' \
--replace 'getenv("AFL_PATH")' "(getenv(\"AFL_PATH\") ? getenv(\"AFL_PATH\") : \"$out/lib/afl\")"
# Replace "gcc" and friends with full paths in afl-gcc

View File

@ -588,7 +588,8 @@ in
};
aflplusplus = callPackage ../tools/security/aflplusplus {
stdenv = clangStdenv;
clang = clang_9;
llvm = llvm_9;
python = python37;
wine = null;
};