Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/, app-forensics/aflplusplus/
Date: Sun, 19 Sep 2021 07:28:45
Message-Id: 1632036512.6e00fd395a9b52480e6d0162f953249811620ad9.sam@gentoo
1 commit: 6e00fd395a9b52480e6d0162f953249811620ad9
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 19 07:28:03 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 19 07:28:32 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e00fd39
7
8 app-forensics/aflplusplus: detect failure in makefiles
9
10 Closes: https://bugs.gentoo.org/800941
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 ...3.14c-r1.ebuild => aflplusplus-3.14c-r2.ebuild} | 2 +-
14 ...lplusplus-3.14c-no-ignore-errors-makefile.patch | 62 ++++++++++++++++++++++
15 2 files changed, 63 insertions(+), 1 deletion(-)
16
17 diff --git a/app-forensics/aflplusplus/aflplusplus-3.14c-r1.ebuild b/app-forensics/aflplusplus/aflplusplus-3.14c-r2.ebuild
18 similarity index 97%
19 rename from app-forensics/aflplusplus/aflplusplus-3.14c-r1.ebuild
20 rename to app-forensics/aflplusplus/aflplusplus-3.14c-r2.ebuild
21 index 74e2f4d3a72..0bae6dec57a 100644
22 --- a/app-forensics/aflplusplus/aflplusplus-3.14c-r1.ebuild
23 +++ b/app-forensics/aflplusplus/aflplusplus-3.14c-r2.ebuild
24 @@ -45,6 +45,7 @@ QA_PREBUILT="/usr/share/afl/testcases/others/elf/small_exec.elf"
25 PATCHES=(
26 "${FILESDIR}/${PN}-3.0c-LDFLAGS.patch"
27 "${FILESDIR}/${PN}-3.13c-CFLAGS.patch"
28 + "${FILESDIR}/${PN}-3.14c-no-ignore-errors-makefile.patch"
29 )
30
31 llvm_check_deps() {
32 @@ -59,7 +60,6 @@ pkg_setup() {
33
34 src_prepare() {
35 default
36 -
37 sed -i -e 's/-O3 -fno-unroll-loops//' GNUmakefile || die
38 }
39
40
41 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
42 new file mode 100644
43 index 00000000000..0b029396390
44 --- /dev/null
45 +++ b/app-forensics/aflplusplus/files/aflplusplus-3.14c-no-ignore-errors-makefile.patch
46 @@ -0,0 +1,62 @@
47 +https://bugs.gentoo.org/800941
48 +
49 +--- a/GNUmakefile
50 ++++ b/GNUmakefile
51 +@@ -310,12 +310,12 @@ all: test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_bu
52 +
53 + .PHONY: llvm
54 + llvm:
55 +- -$(MAKE) -j -f GNUmakefile.llvm
56 ++ $(MAKE) -j -f GNUmakefile.llvm
57 + @test -e afl-cc || { echo "[-] Compiling afl-cc failed. You seem not to have a working compiler." ; exit 1; }
58 +
59 + .PHONY: gcc_plugin
60 + gcc_plugin:
61 +- -$(MAKE) -f GNUmakefile.gcc_plugin
62 ++ $(MAKE) -f GNUmakefile.gcc_plugin
63 +
64 + .PHONY: man
65 + man: $(MANPAGES)
66 +@@ -562,8 +562,8 @@ all_done: test_build
67 + .PHONY: clean
68 + clean:
69 + 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
70 +- -$(MAKE) -f GNUmakefile.llvm clean
71 +- -$(MAKE) -f GNUmakefile.gcc_plugin clean
72 ++ $(MAKE) -f GNUmakefile.llvm clean
73 ++ $(MAKE) -f GNUmakefile.gcc_plugin clean
74 + $(MAKE) -C utils/libdislocator clean
75 + $(MAKE) -C utils/libtokencap clean
76 + $(MAKE) -C utils/aflpp_driver clean
77 +@@ -618,8 +618,8 @@ binary-only: test_shm test_python ready $(PROGS)
78 +
79 + .PHONY: source-only
80 + source-only: all
81 +- -$(MAKE) -j -f GNUmakefile.llvm
82 +- -$(MAKE) -f GNUmakefile.gcc_plugin
83 ++ $(MAKE) -j -f GNUmakefile.llvm
84 ++ $(MAKE) -f GNUmakefile.gcc_plugin
85 + $(MAKE) -C utils/libdislocator
86 + $(MAKE) -C utils/libtokencap
87 +
88 +@@ -661,8 +661,8 @@ install: all $(MANPAGES)
89 + @if [ -f utils/afl_network_proxy/afl-network-server ]; then $(MAKE) -C utils/afl_network_proxy install; fi
90 + @if [ -f utils/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi
91 + @if [ -f utils/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi
92 +- -$(MAKE) -f GNUmakefile.llvm install
93 +- -$(MAKE) -f GNUmakefile.gcc_plugin install
94 ++ $(MAKE) -f GNUmakefile.llvm install
95 ++ $(MAKE) -f GNUmakefile.gcc_plugin install
96 + ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc
97 + ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++
98 + ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-clang
99 +--- a/GNUmakefile.llvm
100 ++++ b/GNUmakefile.llvm
101 +@@ -460,6 +460,7 @@ document:
102 + test_build: $(PROGS)
103 + @echo "[*] Testing the CC wrapper and instrumentation output..."
104 + 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)
105 ++ @test -e test-instr || { echo "[-] Testing CC wrapper failed. You seem not to have a working compiler." ; exit 1; }
106 + ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
107 + echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr
108 + @rm -f test-instr