summary refs log tree commit diff
path: root/pkgs/tools/security/afl
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-02-10 07:21:23 +0000
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-02-19 19:59:28 +0200
commit0565e1e73200063832b587fe00ec9344b2cefaca (patch)
tree9d10882cbbb96b700dd2565ec4a6c18ce5883330 /pkgs/tools/security/afl
parent2aeafe7ef47a27dd578045c9d290c1bd31b0ba25 (diff)
downloadnixpkgs-0565e1e73200063832b587fe00ec9344b2cefaca.tar
nixpkgs-0565e1e73200063832b587fe00ec9344b2cefaca.tar.gz
nixpkgs-0565e1e73200063832b587fe00ec9344b2cefaca.tar.bz2
nixpkgs-0565e1e73200063832b587fe00ec9344b2cefaca.tar.lz
nixpkgs-0565e1e73200063832b587fe00ec9344b2cefaca.tar.xz
nixpkgs-0565e1e73200063832b587fe00ec9344b2cefaca.tar.zst
nixpkgs-0565e1e73200063832b587fe00ec9344b2cefaca.zip
afl: fix build, by switch to gcc as compiler
Apparently they set CFLAGS incompatible with clang.
Also only provide a default value for AFL_CC/AFL_CXX for afl-clang-fast:
User might want to overriding, but this is not a PATH variable that can
be prepended with :.
Diffstat (limited to 'pkgs/tools/security/afl')
-rw-r--r--pkgs/tools/security/afl/default.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/tools/security/afl/default.nix b/pkgs/tools/security/afl/default.nix
index 51701590b8e..8e894884bdb 100644
--- a/pkgs/tools/security/afl/default.nix
+++ b/pkgs/tools/security/afl/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   # Note: libcgroup isn't needed for building, just for the afl-cgroup
   # script.
-  buildInputs  = [ makeWrapper clang llvm which ];
+  buildInputs  = [ makeWrapper llvm which ];
 
   buildPhase   = ''
     make PREFIX=$out
@@ -53,8 +53,7 @@ stdenv.mkDerivation rec {
     for x in $out/bin/afl-clang-fast $out/bin/afl-clang-fast++; do
       wrapProgram $x \
         --prefix AFL_PATH : "$out/lib/afl" \
-        --prefix AFL_CC   : "${clang}/bin/clang" \
-        --prefix AFL_CXX  : "${clang}/bin/clang++"
+        --run 'export AFL_CC=''${AFL_CC:-${clang}/bin/clang} AFL_CXX=''${AFL_CXX:-${clang}/bin/clang++}'
     done
   '';