From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: 67399@debbugs.gnu.org
Cc: "Denis 'GNUtoo' Carikli" <GNUtoo@cyberdimension.org>
Subject: [bug#67399] [PATCH v2 3/3] gnu: aflplusplus: Build afl-gcc/g++-fast
Date: Thu, 23 Nov 2023 15:52:52 +0100 [thread overview]
Message-ID: <b52a0ec129defb832bc03e69a12259d6d3563676.1694747596.git.GNUtoo@cyberdimension.org> (raw)
In-Reply-To: <08dda007d354a5857a348d8d001c06216c940893.1694747596.git.GNUtoo@cyberdimension.org>
* gnu/packages/debug.scm (aflplusplus): [inputs]: Add gcc, gmp.
---
gnu/packages/debug.scm | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 04458d0220..c9fdca8c8b 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -50,6 +50,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gdb)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
@@ -59,6 +60,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages multiprecision)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ninja)
#:use-module (gnu packages perl)
@@ -473,7 +475,35 @@ (define-public aflplusplus
(sha256
(base32
"01hxj65if6rkjrj1fqcgq0jl95dirhkn00mi2k65mff6bckaamxg"))))
- (inputs (list python qemu))
+ (arguments
+ (substitute-keyword-arguments (package-arguments american-fuzzy-lop)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; TODO: Enable to cross compile aflplusplus by also enabling qemu
+ ;; to be cross compiled and by fixing the use-build-gcc phase below.
+ (add-before 'build 'use-build-gcc
+ (lambda _
+ ;; We need to patch it to select the build-time gcc else we get
+ ;; something like that:
+ ;; $ afl-gcc-fast main.c
+ ;; afl-cc++4.08c by [...] - mode: GCC_PLUGIN-DEFAULT
+ ;; cc1: error: cannot load plugin
+ ;; /gnu/[...]-aflplusplus-4.08c/bin/../lib/afl//afl-gcc-pass.so:
+ ;; /gnu/[...]-aflplusplus-4.08c/bin/../lib/afl//afl-gcc-pass.so:
+ ;; undefined symbol:
+ ;; _Z30gimple_build_call_internal_vec11internal_fn3vecIP9tree_node7va_heap6vl_ptrE
+ (substitute* "src/afl-cc.c"
+ (("alt_cc = \"gcc\";")
+ (string-append "alt_cc = \""
+ (which "gcc") "\";"))
+ (("alt_cxx = \"g\\+\\+\";")
+ (string-append "alt_cxx = \""
+ (which "g++") "\";")))))))))
+ ;; afl-gcc and g++-fast require gcc and gmp. The gcc-11 input is used
+ ;; instead of gcc because in the Dockerfile inside aflplusplus source code
+ ;; has the following comment: "GCC 12 is producing compile errors for some
+ ;; targets so we stay at GCC 11".
+ (inputs (list gcc-11 gmp python qemu))
(home-page "https://aflplus.plus")
(description
"AFLplusplus is a security-oriented fuzzer that employs a novel type of
--
2.41.0
next prev parent reply other threads:[~2023-11-23 14:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 11:18 [bug#67399] [PATCH 0/8] Coreboot related patches Denis 'GNUtoo' Carikli
2023-11-23 14:52 ` [bug#67399] [PATCH] gnu: Add grub-coreboot Denis 'GNUtoo' Carikli
2023-11-23 14:52 ` [bug#67399] [PATCH] gnu: libressl: Update to 3.8.0 [fixes CVE-2023-35784] Denis 'GNUtoo' Carikli
2023-11-23 14:52 ` [bug#67399] [PATCH] gnu: aflplusplus: Add python support Denis 'GNUtoo' Carikli
2023-11-23 14:52 ` Denis 'GNUtoo' Carikli
2023-11-23 14:52 ` [bug#67399] [PATCH v2 1/3] gnu: Add aflplusplus Denis 'GNUtoo' Carikli
2023-11-23 14:52 ` [bug#67399] [PATCH v2 2/3] gnu: aflplusplus: Add python support Denis 'GNUtoo' Carikli
2023-11-23 14:52 ` Denis 'GNUtoo' Carikli [this message]
2023-11-23 15:07 ` [bug#67399] (no subject) Denis 'GNUtoo' Carikli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b52a0ec129defb832bc03e69a12259d6d3563676.1694747596.git.GNUtoo@cyberdimension.org \
--to=gnutoo@cyberdimension.org \
--cc=67399@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.