summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno Böck <hanno@gentoo.org>2021-12-27 20:14:07 +0100
committerHanno Böck <hanno@gentoo.org>2021-12-27 20:14:48 +0100
commit7507da323f5f09b0d6f60e4f7293e456c09f1ec6 (patch)
tree13fde0c2b8a7416cb57bda294ab7259a20c60b09
parentdev-python/black: Stabilize 21.12_beta0 ppc, #830121 (diff)
downloadgentoo-7507da323f5f09b0d6f60e4f7293e456c09f1ec6.tar.gz
gentoo-7507da323f5f09b0d6f60e4f7293e456c09f1ec6.tar.bz2
gentoo-7507da323f5f09b0d6f60e4f7293e456c09f1ec6.zip
app-forensics/afl: Disable clang-fast mode.
This is currently broken with latest clang/llvm versions and an upstream bug remained unanswered. We may re-enable this once it's fixed upstream. This should resolve all clang-related bugs. Also fix doc installation (bug #720194). Signed-off-by: Hanno Böck <hanno@gentoo.org> Closes: https://bugs.gentoo.org/720194 Closes: https://bugs.gentoo.org/695488 Closes: https://bugs.gentoo.org/708524 Closes: https://bugs.gentoo.org/821973 Closes: https://bugs.gentoo.org/827107 Closes: https://bugs.gentoo.org/828689 Package-Manager: Portage-3.0.30, Repoman-3.0.3
-rw-r--r--app-forensics/afl/afl-2.57b-r2.ebuild48
-rw-r--r--app-forensics/afl/files/afl-2.57b-install-readmemd.diff12
2 files changed, 60 insertions, 0 deletions
diff --git a/app-forensics/afl/afl-2.57b-r2.ebuild b/app-forensics/afl/afl-2.57b-r2.ebuild
new file mode 100644
index 000000000000..95bfacc4b55c
--- /dev/null
+++ b/app-forensics/afl/afl-2.57b-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib toolchain-funcs flag-o-matic
+
+# See https://github.com/google/AFL/pull/117
+PATCHES=( "${FILESDIR}/${P}-install-readmemd.diff" )
+
+DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
+HOMEPAGE="https://lcamtuf.coredump.cx/afl/"
+SRC_URI="https://github.com/google/AFL/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="sys-devel/gcc:*
+ !app-forensics/aflplusplus"
+RDEPEND="${DEPEND}"
+QA_PREBUILT="/usr/share/afl/testcases/others/elf/small_exec.elf"
+
+S="${WORKDIR}/AFL-${PV}"
+
+src_compile() {
+ emake CC="$(tc-getCC)" \
+ PREFIX="${EPREFIX}/usr" \
+ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}"
+# Not compatible with latest clang, see
+# https://github.com/google/AFL/issues/151
+#
+# CC="clang" CXX="clang++" strip-unsupported-flags
+# cd llvm_mode || die
+# emake \
+# PREFIX="${EPREFIX}/usr" \
+# HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+# DOC_PATH="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \
+ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \
+ install
+}
diff --git a/app-forensics/afl/files/afl-2.57b-install-readmemd.diff b/app-forensics/afl/files/afl-2.57b-install-readmemd.diff
new file mode 100644
index 000000000000..50b777413c19
--- /dev/null
+++ b/app-forensics/afl/files/afl-2.57b-install-readmemd.diff
@@ -0,0 +1,12 @@
+diff --git a/Makefile b/Makefile
+index 5e800db26..381931289 100644
+--- a/Makefile
++++ b/Makefile
+@@ -133,7 +133,7 @@ endif
+ set -e; for i in afl-g++ afl-clang afl-clang++; do ln -sf afl-gcc $${DESTDIR}$(BIN_PATH)/$$i; done
+ install -m 755 afl-as $${DESTDIR}$(HELPER_PATH)
+ ln -sf afl-as $${DESTDIR}$(HELPER_PATH)/as
+- install -m 644 docs/README docs/ChangeLog docs/*.txt $${DESTDIR}$(DOC_PATH)
++ install -m 644 README.md docs/ChangeLog docs/*.txt $${DESTDIR}$(DOC_PATH)
+ cp -r testcases/ $${DESTDIR}$(MISC_PATH)
+ cp -r dictionaries/ $${DESTDIR}$(MISC_PATH)