summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-09-19 08:28:03 +0100
committerSam James <sam@gentoo.org>2021-09-19 08:28:32 +0100
commit6e00fd395a9b52480e6d0162f953249811620ad9 (patch)
treec799be4f48d6d9f6961c477f47015b19914040b1 /app-forensics
parentdev-db/mongodb: Remove old (diff)
downloadgentoo-6e00fd395a9b52480e6d0162f953249811620ad9.tar.gz
gentoo-6e00fd395a9b52480e6d0162f953249811620ad9.tar.bz2
gentoo-6e00fd395a9b52480e6d0162f953249811620ad9.zip
app-forensics/aflplusplus: detect failure in makefiles
Closes: https://bugs.gentoo.org/800941 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-forensics')
-rw-r--r--app-forensics/aflplusplus/aflplusplus-3.14c-r2.ebuild (renamed from app-forensics/aflplusplus/aflplusplus-3.14c-r1.ebuild)2
-rw-r--r--app-forensics/aflplusplus/files/aflplusplus-3.14c-no-ignore-errors-makefile.patch62
2 files changed, 63 insertions, 1 deletions
diff --git a/app-forensics/aflplusplus/aflplusplus-3.14c-r1.ebuild b/app-forensics/aflplusplus/aflplusplus-3.14c-r2.ebuild
index 74e2f4d3a725..0bae6dec57a2 100644
--- a/app-forensics/aflplusplus/aflplusplus-3.14c-r1.ebuild
+++ b/app-forensics/aflplusplus/aflplusplus-3.14c-r2.ebuild
@@ -45,6 +45,7 @@ QA_PREBUILT="/usr/share/afl/testcases/others/elf/small_exec.elf"
PATCHES=(
"${FILESDIR}/${PN}-3.0c-LDFLAGS.patch"
"${FILESDIR}/${PN}-3.13c-CFLAGS.patch"
+ "${FILESDIR}/${PN}-3.14c-no-ignore-errors-makefile.patch"
)
llvm_check_deps() {
@@ -59,7 +60,6 @@ pkg_setup() {
src_prepare() {
default
-
sed -i -e 's/-O3 -fno-unroll-loops//' GNUmakefile || die
}
diff --git a/app-forensics/aflplusplus/files/aflplusplus-3.14c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-3.14c-no-ignore-errors-makefile.patch
new file mode 100644
index 000000000000..0b029396390c
--- /dev/null
+++ b/app-forensics/aflplusplus/files/aflplusplus-3.14c-no-ignore-errors-makefile.patch
@@ -0,0 +1,62 @@
+https://bugs.gentoo.org/800941
+
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -310,12 +310,12 @@ all: test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_bu
+
+ .PHONY: llvm
+ llvm:
+- -$(MAKE) -j -f GNUmakefile.llvm
++ $(MAKE) -j -f GNUmakefile.llvm
+ @test -e afl-cc || { echo "[-] Compiling afl-cc failed. You seem not to have a working compiler." ; exit 1; }
+
+ .PHONY: gcc_plugin
+ gcc_plugin:
+- -$(MAKE) -f GNUmakefile.gcc_plugin
++ $(MAKE) -f GNUmakefile.gcc_plugin
+
+ .PHONY: man
+ man: $(MANPAGES)
+@@ -562,8 +562,8 @@ all_done: test_build
+ .PHONY: clean
+ clean:
+ rm -f $(PROGS) libradamsa.so afl-fuzz-document afl-as as afl-g++ afl-clang afl-clang++ *.o src/*.o *~ a.out core core.[1-9][0-9]* *.stackdump .test .test1 .test2 test-instr .test-instr0 .test-instr1 afl-qemu-trace afl-gcc-fast afl-gcc-pass.so afl-g++-fast ld *.so *.8 test/unittests/*.o test/unittests/unit_maybe_alloc test/unittests/preallocable .afl-* afl-gcc afl-g++ afl-clang afl-clang++ test/unittests/unit_hash test/unittests/unit_rand
+- -$(MAKE) -f GNUmakefile.llvm clean
+- -$(MAKE) -f GNUmakefile.gcc_plugin clean
++ $(MAKE) -f GNUmakefile.llvm clean
++ $(MAKE) -f GNUmakefile.gcc_plugin clean
+ $(MAKE) -C utils/libdislocator clean
+ $(MAKE) -C utils/libtokencap clean
+ $(MAKE) -C utils/aflpp_driver clean
+@@ -618,8 +618,8 @@ binary-only: test_shm test_python ready $(PROGS)
+
+ .PHONY: source-only
+ source-only: all
+- -$(MAKE) -j -f GNUmakefile.llvm
+- -$(MAKE) -f GNUmakefile.gcc_plugin
++ $(MAKE) -j -f GNUmakefile.llvm
++ $(MAKE) -f GNUmakefile.gcc_plugin
+ $(MAKE) -C utils/libdislocator
+ $(MAKE) -C utils/libtokencap
+
+@@ -661,8 +661,8 @@ install: all $(MANPAGES)
+ @if [ -f utils/afl_network_proxy/afl-network-server ]; then $(MAKE) -C utils/afl_network_proxy install; fi
+ @if [ -f utils/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi
+ @if [ -f utils/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi
+- -$(MAKE) -f GNUmakefile.llvm install
+- -$(MAKE) -f GNUmakefile.gcc_plugin install
++ $(MAKE) -f GNUmakefile.llvm install
++ $(MAKE) -f GNUmakefile.gcc_plugin install
+ ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc
+ ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++
+ ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-clang
+--- a/GNUmakefile.llvm
++++ b/GNUmakefile.llvm
+@@ -460,6 +460,7 @@ document:
+ test_build: $(PROGS)
+ @echo "[*] Testing the CC wrapper and instrumentation output..."
+ unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc $(CFLAGS) $(CPPFLAGS) ./test-instr.c -o test-instr $(LDFLAGS)
++ @test -e test-instr || { echo "[-] Testing CC wrapper failed. You seem not to have a working compiler." ; exit 1; }
+ ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
+ echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr
+ @rm -f test-instr