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:
parent
5f19ec3bc4
commit
d478d7a65b
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, stdenvNoCC, fetchFromGitHub, callPackage, makeWrapper
|
{ 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
|
, file, wine ? null, fetchpatch
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -29,16 +29,16 @@ let
|
||||||
|
|
||||||
# Note: libcgroup isn't needed for building, just for the afl-cgroup
|
# Note: libcgroup isn't needed for building, just for the afl-cgroup
|
||||||
# script.
|
# script.
|
||||||
nativeBuildInputs = [ makeWrapper which clang_9 gcc ];
|
nativeBuildInputs = [ makeWrapper which clang gcc ];
|
||||||
buildInputs = [ llvm_9 python gmp ]
|
buildInputs = [ llvm python gmp ]
|
||||||
++ stdenv.lib.optional (wine != null) python.pkgs.wrapPython;
|
++ stdenv.lib.optional (wine != null) python.pkgs.wrapPython;
|
||||||
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Replace the CLANG_BIN variables with the correct path
|
# Replace the CLANG_BIN variables with the correct path
|
||||||
substituteInPlace llvm_mode/afl-clang-fast.c \
|
substituteInPlace llvm_mode/afl-clang-fast.c \
|
||||||
--replace "CLANGPP_BIN" '"${clang_9}/bin/clang++"' \
|
--replace "CLANGPP_BIN" '"${clang}/bin/clang++"' \
|
||||||
--replace "CLANG_BIN" '"${clang_9}/bin/clang"' \
|
--replace "CLANG_BIN" '"${clang}/bin/clang"' \
|
||||||
--replace 'getenv("AFL_PATH")' "(getenv(\"AFL_PATH\") ? getenv(\"AFL_PATH\") : \"$out/lib/afl\")"
|
--replace 'getenv("AFL_PATH")' "(getenv(\"AFL_PATH\") ? getenv(\"AFL_PATH\") : \"$out/lib/afl\")"
|
||||||
|
|
||||||
# Replace "gcc" and friends with full paths in afl-gcc
|
# Replace "gcc" and friends with full paths in afl-gcc
|
||||||
|
|
|
@ -588,7 +588,8 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
aflplusplus = callPackage ../tools/security/aflplusplus {
|
aflplusplus = callPackage ../tools/security/aflplusplus {
|
||||||
stdenv = clangStdenv;
|
clang = clang_9;
|
||||||
|
llvm = llvm_9;
|
||||||
python = python37;
|
python = python37;
|
||||||
wine = null;
|
wine = null;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue