commit:     5713308aaacf4a4f3df3ba689ed1b145b3bb6619
Author:     Hanno Böck <hanno <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  2 19:29:46 2023 +0000
Commit:     Hanno Böck <hanno <AT> gentoo <DOT> org>
CommitDate: Wed Aug  2 19:29:46 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5713308a

app-forensics/afl: clang 16 fix

Fix missing function type int in Makefile check.
Remove unused inherits.

Signed-off-by: Hanno Böck <hanno <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/32146
Closes: https://bugs.gentoo.org/894514

 app-forensics/afl/afl-2.57b-r2.ebuild                      |  9 ++++++---
 .../afl/files/afl-2.57b-implicit-int-clang16.patch         | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/app-forensics/afl/afl-2.57b-r2.ebuild 
b/app-forensics/afl/afl-2.57b-r2.ebuild
index 95bfacc4b55c..1d63aae81046 100644
--- a/app-forensics/afl/afl-2.57b-r2.ebuild
+++ b/app-forensics/afl/afl-2.57b-r2.ebuild
@@ -1,12 +1,15 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit multilib toolchain-funcs flag-o-matic
+inherit toolchain-funcs
 
 # See https://github.com/google/AFL/pull/117
-PATCHES=( "${FILESDIR}/${P}-install-readmemd.diff" )
+PATCHES=(
+       "${FILESDIR}/${P}-install-readmemd.diff"
+       "${FILESDIR}/${P}-implicit-int-clang16.patch"
+)
 
 DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer"
 HOMEPAGE="https://lcamtuf.coredump.cx/afl/";

diff --git a/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch 
b/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch
new file mode 100644
index 000000000000..dc432c5c08c4
--- /dev/null
+++ b/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch
@@ -0,0 +1,14 @@
+Bug: https://bugs.gentoo.org/894514
+diff --git a/Makefile b/Makefile
+index 3819312..536c20b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -50,7 +50,7 @@ ifndef AFL_NO_X86
+ 
+ test_x86:
+       @echo "[*] Checking for the ability to compile x86 code..."
+-      @echo 'main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o .test 
|| ( echo; echo "Oops, looks like your compiler can't generate x86 code."; 
echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see 
docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try 
again.)"; echo; exit 1 )
++      @echo 'int main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o 
.test || ( echo; echo "Oops, looks like your compiler can't generate x86 
code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see 
docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try 
again.)"; echo; exit 1 )
+       @rm -f .test
+       @echo "[+] Everything seems to be working, ready to compile."
+ 

Reply via email to