gnu: american-fuzzy-lop: Add support for non-Intel architectures.
* gnu/packages/debug.scm (americal-fuzzy-lop): Add qemu target for non-Intel targets. [arguments]: On non-Intel systems, add phase to disable non-Intel architecture warning and remove incompatible binaries.master
parent
721e1987d0
commit
aacefef222
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014, 2015, 2016, 2017 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2014, 2015, 2016, 2017 Eric Bavier <bavier@member.fsf.org>
|
||||||
|
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -166,6 +167,9 @@ tools that process C/C++ code.")
|
||||||
(%current-system))
|
(%current-system))
|
||||||
("x86_64-linux" "x86_64")
|
("x86_64-linux" "x86_64")
|
||||||
("i686-linux" "i386")
|
("i686-linux" "i386")
|
||||||
|
("aarch64-linux" "aarch64")
|
||||||
|
("armhf-linux" "arm")
|
||||||
|
("mips64el-linux" "mips64el")
|
||||||
;; Prevent errors when querying this package on unsupported
|
;; Prevent errors when querying this package on unsupported
|
||||||
;; platforms, e.g. when running "guix package --search="
|
;; platforms, e.g. when running "guix package --search="
|
||||||
(_ "UNSUPPORTED"))))
|
(_ "UNSUPPORTED"))))
|
||||||
|
@ -234,6 +238,20 @@ tools that process C/C++ code.")
|
||||||
"CC=gcc")
|
"CC=gcc")
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases (modify-phases %standard-phases
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
|
,@(if (string=? (%current-system) (or "x86_64-linux"
|
||||||
|
"i686-linux"))
|
||||||
|
'()
|
||||||
|
'((add-before 'build 'set-afl-flag
|
||||||
|
(lambda _ (setenv "AFL_NO_X86" "1") #t))
|
||||||
|
(add-after 'install 'remove-x86-programs
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(bin (string-append out "/bin/")))
|
||||||
|
(delete-file (string-append bin "afl-gcc"))
|
||||||
|
(delete-file (string-append bin "afl-g++"))
|
||||||
|
(delete-file (string-append bin "afl-clang"))
|
||||||
|
(delete-file (string-append bin "afl-clang++")))
|
||||||
|
#t))))
|
||||||
(add-after
|
(add-after
|
||||||
;; TODO: Build and install the afl-llvm tool.
|
;; TODO: Build and install the afl-llvm tool.
|
||||||
'install 'install-qemu
|
'install 'install-qemu
|
||||||
|
@ -243,10 +261,7 @@ tools that process C/C++ code.")
|
||||||
(symlink (string-append qemu "/bin/qemu-" ,machine)
|
(symlink (string-append qemu "/bin/qemu-" ,machine)
|
||||||
(string-append out "/bin/afl-qemu-trace"))
|
(string-append out "/bin/afl-qemu-trace"))
|
||||||
#t)))
|
#t)))
|
||||||
(delete 'check))))
|
(delete 'check)))) ; Tests are run during 'install phase.
|
||||||
(supported-systems (fold delete
|
|
||||||
%supported-systems
|
|
||||||
'("armhf-linux" "mips64el-linux")))
|
|
||||||
(home-page "http://lcamtuf.coredump.cx/afl")
|
(home-page "http://lcamtuf.coredump.cx/afl")
|
||||||
(synopsis "Security-oriented fuzzer")
|
(synopsis "Security-oriented fuzzer")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in New Issue