svn commit: r505067 - in head/security: afl afl++
Tobias Kortkamp
tobik at FreeBSD.org
Tue Jun 25 04:13:35 UTC 2019
Author: tobik
Date: Tue Jun 25 04:13:33 2019
New Revision: 505067
URL: https://svnweb.freebsd.org/changeset/ports/505067
Log:
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)
Modified:
head/security/afl++/Makefile
head/security/afl++/pkg-plist
head/security/afl/Makefile
Modified: head/security/afl++/Makefile
==============================================================================
--- head/security/afl++/Makefile Tue Jun 25 00:44:56 2019 (r505066)
+++ head/security/afl++/Makefile Tue Jun 25 04:13:33 2019 (r505067)
@@ -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>
Modified: head/security/afl++/pkg-plist
==============================================================================
--- head/security/afl++/pkg-plist Tue Jun 25 00:44:56 2019 (r505066)
+++ head/security/afl++/pkg-plist Tue Jun 25 04:13:33 2019 (r505067)
@@ -1,24 +1,24 @@
bin/afl-analyze
-bin/afl-clang
-bin/afl-clang++
+%%X86%%bin/afl-clang
+%%X86%%bin/afl-clang++
%%LLVM%%bin/afl-clang-fast
%%LLVM%%bin/afl-clang-fast++
bin/afl-cmin
bin/afl-fuzz
-bin/afl-g++
-bin/afl-gcc
+%%X86%%bin/afl-g++
+%%X86%%bin/afl-gcc
bin/afl-gotcpu
bin/afl-plot
bin/afl-showmap
-bin/afl-system-config
+ at comment bin/afl-system-config
bin/afl-tmin
bin/afl-whatsup
-lib/afl/afl-as
+%%X86%%lib/afl/afl-as
%%LLVM%%lib/afl/afl-llvm-pass.so
-%%LLVM%%lib/afl/afl-llvm-rt-32.o
+%%X86%%%%LLVM%%lib/afl/afl-llvm-rt-32.o
%%LLVM%%lib/afl/afl-llvm-rt-64.o
%%LLVM%%lib/afl/afl-llvm-rt.o
-lib/afl/as
+%%X86%%lib/afl/as
%%LLVM%%lib/afl/compare-transform-pass.so
lib/afl/libdislocator.so
%%LLVM%%lib/afl/split-compares-pass.so
@@ -79,6 +79,7 @@ lib/afl/libdislocator.so
%%PORTDOCS%%%%DOCSDIR%%/QuickStartGuide.txt
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.dislocator
+%%LLVM%%%%PORTDOCS%%%%DOCSDIR%%/README.laf-intel
%%LLVM%%%%PORTDOCS%%%%DOCSDIR%%/README.llvm
%%PORTDOCS%%%%DOCSDIR%%/env_variables.txt
%%PORTDOCS%%%%DOCSDIR%%/historical_notes.txt
Modified: head/security/afl/Makefile
==============================================================================
--- head/security/afl/Makefile Tue Jun 25 00:44:56 2019 (r505066)
+++ head/security/afl/Makefile Tue Jun 25 04:13:33 2019 (r505067)
@@ -24,6 +24,8 @@ USES= gmake tar:tgz
ALL_TARGET= all libdislocator
TEST_TARGET= test_build
+CONFLICTS_INSTALL= afl++
+
OPTIONS_DEFINE= DEBUG DOCS LLVM
OPTIONS_DEFAULT= LLVM
OPTIONS_SUB= yes
More information about the svn-ports-all
mailing list