Request for (i386) testing: american fuzzy lop

Jan Beich jbeich at
Thu Nov 20 16:53:22 UTC 2014

Fabian Keil <freebsd-listen at> writes:

> Vitaly Magerya <vmagerya at> wrote:
>> I don't know what this part is supposed to do:
>>     # Workaround to make sure clang isn't confused for gcc
>> ... but it seems to set CC to empty string on my machine; and I
>> get a whole bunch of this as the result:
> Interesting.
> It was supposed to set CC for gmake to either clang or gcc,
> otherwise a cc that is clang is treated as gcc.
> However clobbering CC directly is obviously wrong and on
> systems where cc is still gcc, the workaround shouldn't
> be necessary anyway.
> Does it work for you if you replace the line with:
> ?

USE_GCC becomes a nop while setting explicitly fails

  $ uname -rp
  11.0-CURRENT amd64

  $ echo CC=gcc49 >>/etc/.make.conf
  $ make
  ===>  Building for afl-0.60b
  gmake[2]: Entering directory '/work/afl-0.60b'
  [*] Checking for the ability to compile x86 code...
  [+] All done! Be sure to review README - it's pretty short and useful.
  gcc: not found

Why not patch the vendor Makefile? Here're my changes:

  - use $(CC) --version to detect clang
  - remove -g from CFLAGS (see WITH_DEBUG)
  - strip(1) binaries during install
  - global TESTing with generic option name

while poudriere caught Clang i386 failing

  [*] Testing the CC wrapper and instrumentation output...
  AFL_QUIET=1 AFL_INST_RATIO=100 AFL_PATH=. ./afl-clang -O2 -pipe  -fstack-protector -fno-strict-aliasing -Wall -D_FORTIFY_SOURCE=2 -Wno-pointer-sign -DAFL_PATH=\"/prefix/afl-0.60b/lib/afl\" -DDOC_PATH=\"/prefix/afl-0.60b/share/doc/afl\" -DVERSION=\"0.60b\" -Wno-format test-instr.c -o test-instr
  /tmp/.afl-19244-1416499444.s: Assembler messages:
  /tmp/.afl-19244-1416499444.s:222: Error: unknown pseudo-op: `.cfi_sections'
  clang: error: assembler command failed with exit code 1 (use -v to see invocation)

diff --git security/afl/Makefile security/afl/Makefile
index d7b2c93..bbe2992 100644
--- security/afl/Makefile
+++ security/afl/Makefile
@@ -9,10 +9,9 @@ MASTER_SITES=
 COMMENT=	Fast instrumented fuzzer
-USES=		compiler gmake tar:tgz
+USES=		gmake tar:tgz
-TEST_INSTRUMENTATION_DESC=	Execute tests expected to fail in jails
 ONLY_FOR_ARCHS=		amd64 i386
@@ -20,17 +19,17 @@ ONLY_FOR_ARCHS_REASON=	Uses binary instrumentation
 .include <>
-# Workaround to make sure clang isn't confused for gcc
 # afl needs shmget() which usually isn't available in jails. Disabling
 # the instrumentation tests makes sure building packages in jails works
 # by default anyway.
 	${REINPLACE_CMD} -e 's@^\(all.*\) test_build@\1@' ${WRKSRC}/Makefile
-	${REINPLACE_CMD} -e 's at -O3@@' ${WRKSRC}/Makefile
+	${REINPLACE_CMD} -e 's@ -O3@@; s@ -g@@' \
+		-e '/findstring clang/s@$$(CC)@$$(shell & --version)@' \
+		-e 's/install -m 755/${INSTALL_PROGRAM}/' \
+		${WRKSRC}/Makefile

------------------------------------------------- -
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  

More information about the freebsd-ports mailing list