summaryrefslogtreecommitdiff
path: root/pcr/aflplusplus/PKGBUILD
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-05-31 16:43:02 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-05-31 16:58:52 +0200
commit482ca93be8af5c9d23594c7d56fc98c26d950ec5 (patch)
tree38f950bb840caaf3dc6f10c4abdc93324ebe20d5 /pcr/aflplusplus/PKGBUILD
parent9d550db31666d7becfc22a3e30488dc65e7bd374 (diff)
downloadabslibre-482ca93be8af5c9d23594c7d56fc98c26d950ec5.tar.gz
abslibre-482ca93be8af5c9d23594c7d56fc98c26d950ec5.tar.bz2
abslibre-482ca93be8af5c9d23594c7d56fc98c26d950ec5.zip
pcr: Add aflplusplus
The AFL website[1] states the following: Note: AFL hasn't been updated for a couple of years; while it should still work fine, a more complex fork with a variety of improvements and additional features, known as AFL++, is available from other members of the community and might be worth checking out. [1]https://lcamtuf.coredump.cx/afl/ Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'pcr/aflplusplus/PKGBUILD')
-rw-r--r--pcr/aflplusplus/PKGBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/pcr/aflplusplus/PKGBUILD b/pcr/aflplusplus/PKGBUILD
new file mode 100644
index 000000000..fb6b0da3b
--- /dev/null
+++ b/pcr/aflplusplus/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer (Aur): GI Jack <GI_Jack@hackermail.com>
+# Maintainers: Parabola hackers <dev@lists.parabola.nu>
+
+# parabola changes and rationale:
+# - Added armv7h and i686 architectures
+# - Added workaround for -fvar-tracking-assignments being in the
+# default /etc/makepkg.conf
+
+pkgname=aflplusplus
+pkgver=4.00c
+pkgrel=1
+pkgdesc="afl++ is afl with community patches, AFLfast power schedules, qemu 3.1 upgrade + laf-intel support, MOpt mutators, InsTrim instrumentation, unicorn_mode and a lot more!"
+arch=('armv7h' 'i686' 'x86_64')
+url="https://github.com/AFLplusplus/AFLplusplus"
+license=('Apache')
+provides=('afl')
+conflicts=('afl')
+optdepends=('qemu: use QEMU with afl')
+source=("https://github.com/AFLplusplus/AFLplusplus/archive/${pkgver}.tar.gz")
+sha256sums=('f427294ed674e37d34a1b756a2190de17937e046ef21abb3ae37bba018a760f1')
+
+# The Arch Linux wiki page on clang[1] has the following:
+# "If you are building with debug, also remove
+# -fvar-tracking-assignments from DEBUG_CFLAGS and DEBUG_CXXFLAGS as
+# Clang does not support it."
+# [1]https://wiki.archlinux.org/title/Clang
+# And -fvar-tracking-assignments is by default in /etc/makepkg.conf
+#
+# And without that fix we have the following compilation error:
+# clang-13: error: unknown argument: '-fvar-tracking-assignments'
+# [...]
+# [-] Compiling afl-cc failed. You seem not to have a working compiler.
+# [...]
+# ==> ERROR: A failure occurred in build().
+#
+DEBUG_CFLAGS="$(echo ${DEBUG_CFLAGS} | sed 's/-fvar-tracking-assignments//')"
+DEBUG_CXXFLAGS="$(echo ${DEBUG_CXXFLAGS} | sed 's/-fvar-tracking-assignments//')"
+
+export DEBUG_CFLAGS
+export DEBUG_CXXFLAGS
+
+prepare() {
+ cd "AFLplusplus-${pkgver}"
+ make clean
+}
+
+build() {
+ cd "AFLplusplus-${pkgver}"
+ make PREFIX="/usr"
+}
+
+package() {
+ cd "AFLplusplus-${pkgver}"
+ make install PREFIX="/usr" DESTDIR="${pkgdir}"
+}
+