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)
This commit is contained in:
Tobias Kortkamp 2019-06-25 04:13:33 +00:00
parent 6885ac26f0
commit 31702b3719
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=505067
3 changed files with 27 additions and 13 deletions

View File

@ -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>

View File

@ -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
@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

View File

@ -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