aboutsummaryrefslogtreecommitdiffstats
path: root/community/afl++/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/afl++/APKBUILD')
-rw-r--r--community/afl++/APKBUILD74
1 files changed, 50 insertions, 24 deletions
diff --git a/community/afl++/APKBUILD b/community/afl++/APKBUILD
index 02d6a185217..fa8d3a8ece1 100644
--- a/community/afl++/APKBUILD
+++ b/community/afl++/APKBUILD
@@ -1,58 +1,69 @@
# Contributor: Marian <marian.buschsieweke@ovgu.de>
# Maintainer: Marian <marian.buschsieweke@ovgu.de>
pkgname=afl++
-pkgver=4.00c
+pkgver=4.20c
pkgrel=0
pkgdesc="Fuzzer relying on genetic algorithms instead of brute force"
url="https://aflplus.plus/"
# s390x: blocked by missing lld
# x86: basic unit tests fails
-arch="all !s390x !x86"
+# 32-bit: unlikely anyone is doing fuzzing here
+arch="all !armhf !armv7 !s390x !x86"
license="Apache-2.0"
# afl-cmin requires stat
+_llvmver=17
+# llvm LTO test fails on riscv64
+# https://github.com/AFLplusplus/AFLplusplus/issues/2064
+case "$CARCH" in
+ riscv64) options="$options !check";;
+esac
depends="
- clang
- cmd:stat
- lld
- llvm
+ clang$_llvmver
+ compiler-rt
+ lld~$_llvmver
+ llvm$_llvmver
python3
"
+# install -T
makedepends="
- clang-dev
+ clang$_llvmver-dev
gmp-dev
grep
- llvm-dev
+ llvm$_llvmver-dev
python3-dev
"
checkdepends="
bash
cmocka-dev
+ coreutils
+ grep
+ "
+subpackages="
+ $pkgname-doc
+ afl++-tools
"
-subpackages="$pkgname-doc"
provides="
afl=$pkgver-r$pkgrel
afl-clang=$pkgver-r$pkgrel
afl-gcc=$pkgver-r$pkgrel
"
source="
- $pkgname-$pkgver.tar.gz::https://github.com/AFLplusplus/AFLplusplus/archive/refs/tags/$pkgver.tar.gz
-
- 0001-fix-missing-max-path-define.patch
- 0002-fix-bin-dir.patch
- 0003-fix-wrong-format-specifier.patch
+ $pkgname-$pkgver.tar.gz::https://github.com/AFLplusplus/AFLplusplus/archive/refs/tags/v$pkgver.tar.gz
"
builddir="$srcdir/AFLplusplus-$pkgver"
build() {
- # AFL++ is expecting clang, clang++ and ld.lld in LLVM_BINDIR,
- # which is set to `llvm-config --bindir` by default, which points
- # to /usr/lib/llvm13/bin rather than /usr/bin
- export LLVM_BINDIR=/usr/bin
- make AFL_NO_X86=1 LLVM_LTO=1 PREFIX=/usr all
+ export PATH="$PATH:/usr/lib/llvm$_llvmver/bin"
+ export NO_NYX=1
+ export AFL_NO_X86=1
+ export LLVM_LTO=1
+ make PREFIX=/usr all
}
check() {
- make AFL_NO_X86=1 test
+ # Unset our CFLAGS/CXXFLAGS for the tests since these may
+ # interact in unexpected ways with afl-cc instrumentation.
+ CFLAGS= CXXFLAGS= make AFL_NO_X86=1 test
}
package() {
@@ -61,11 +72,26 @@ package() {
# Test cases contain x86 binaries that cause trouble with strip on non-x86
# architectures, so just drop the test cases here.
rm -rf "$pkgdir"/usr/share/afl/testcases/
+
+ # afl-cmin.bash is the same as afl-cmin, but implemented differently making
+ # use of bash features. No need for the same functionality twice.
+ rm "$pkgdir"/usr/bin/afl-cmin.bash
+}
+
+tools() {
+ pkgdesc="AFL++ tools and utilities"
+ depends="
+ afl++
+ coreutils
+ grep
+ "
+
+ amove usr/bin/afl-cmin
+ amove usr/bin/afl-plot
+ amove usr/bin/afl-showmap
+ amove usr/bin/afl-tmin
}
sha512sums="
-23a7a4260e581f7c212393e1e14704464bbbc3ff5465b3472db31c6c7f2cd25a9ecc5ad81fad8958c775fcd01b22269085e6c69419a07fbbdb9ec317a3e39beb afl++-4.00c.tar.gz
-f12285163797823d820029b7bc4591fa040aac137724611e3643a77fcf49f04f59efb0e2e95863966636299dd92862bc5319d4434d4543289dfb8392dc39b97a 0001-fix-missing-max-path-define.patch
-b4f7b81c1ecfdf9b400fc66b8279457feb7fc878e2e3da6653d8b1ae938979bd27f4f0e378df024f61fb12c1350f5faa5f8b1f991f53ae896d029862d8f33c09 0002-fix-bin-dir.patch
-29063f71feff74bb7c74d7e11da654d120d76b178532321ee6c40bf766e3a8834cc09458fc0afdade96c2119fb2fbbb5fd8e01ae5df08ea615688872797380e1 0003-fix-wrong-format-specifier.patch
+b126b65d5a3054d1ea0a28333e81ae47e1bb2fb2f411e9b8edbe547b2962d8e58e1dbede7ea957c0572cc91d2912f3e5465f1e835e1ae072e3ccc31b33e555f5 afl++-4.20c.tar.gz
"