aboutsummaryrefslogtreecommitdiff
path: root/security/afl++/Makefile
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-06-25 04:13:33 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-06-25 04:13:33 +0000
commit31702b371998599c9a01d99e2f28073fa4ada223 (patch)
treecb1957c42d14181869794ec40f1fb74972bce103 /security/afl++/Makefile
parent6885ac26f01faaaa471fb3ac7182b2b186032eaf (diff)
downloadports-31702b371998599c9a01d99e2f28073fa4ada223.tar.gz
ports-31702b371998599c9a01d99e2f28073fa4ada223.zip
security/afl++: Unlock build on aarch64
In theory it might work on other archs but that has not been tested. While here - Install missing docs - Do not install afl-system-config since it is Linux only - Add CONFLICTS_INSTALL to security/afl (forgotten in r505008)
Notes
Notes: svn path=/head/; revision=505067
Diffstat (limited to 'security/afl++/Makefile')
-rw-r--r--security/afl++/Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/security/afl++/Makefile b/security/afl++/Makefile
index 8db52cde084f..23395c6fd34d 100644
--- a/security/afl++/Makefile
+++ b/security/afl++/Makefile
@@ -3,6 +3,7 @@
PORTNAME= afl
PORTVERSION= 2.52c
+PORTREVISION= 1
CATEGORIES= security
PKGNAMESUFFIX= ++
@@ -12,10 +13,10 @@ COMMENT= Fast instrumented fuzzer
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/docs/COPYING
-# In theory afl supports other architectures with the LLVM plugin.
-# It has to be compiled with AFL_NO_X86=1 in that case.
-ONLY_FOR_ARCHS= amd64 i386
-ONLY_FOR_ARCHS_REASON= Uses binary instrumentation
+# In theory afl supports non-x86 architectures with the LLVM plugin.
+# This has only been run tested on aarch64 so far.
+ONLY_FOR_ARCHS= aarch64 amd64 i386
+ONLY_FOR_ARCHS_REASON= uses x86-only instrumentation or requires complete LLVM support
USES= gmake tar:tgz
USE_GITHUB= yes
@@ -29,6 +30,8 @@ CONFLICTS_INSTALL= afl
OPTIONS_DEFINE= DEBUG DOCS LLVM
OPTIONS_DEFAULT= LLVM
+# On non-x86 architectures LLVM is mandatory
+OPTIONS_SLAVE= ${ARCH:Namd64:Ni386:S/${ARCH}/LLVM/}
OPTIONS_SUB= yes
LLVM_DESC= LLVM-based instrumentation
@@ -43,6 +46,13 @@ LLVM_VARS= CC=clang${LLVM_DEFAULT} \
.include <bsd.port.options.mk>
+.if ${ARCH} == "i386" || ${ARCH} == "amd64"
+PLIST_SUB+= X86=""
+.else
+MAKE_ARGS+= AFL_NO_X86=1
+PLIST_SUB+= X86="@comment "
+.endif
+
.if ${ARCH} == "i386"
# Clang i386 emits .cfi_sections which base as(1) doesn't understand
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
@@ -83,7 +93,8 @@ post-install:
post-install-LLVM-on:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/afl/*.so \
${STAGEDIR}${PREFIX}/bin/afl-clang-fast
- ${INSTALL_DATA} ${WRKSRC}/llvm_mode/README.llvm \
+ ${INSTALL_MAN} ${WRKSRC}/llvm_mode/README.laf-intel \
+ ${WRKSRC}/llvm_mode/README.llvm \
${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>