public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/
@ 2022-07-04 23:24 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-07-04 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     6c36e7b2994f088b837e6c6bbafba573ecd9ff50
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Mon Jul  4 16:56:28 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 23:24:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c36e7b2

app-forensics/aflplusplus: Disable LTO for runtime

Runtime files get installed as object files or static archives and
shouldn't contain IR. Otherwise, gcc/clang mismatches can cause failures.

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/aflplusplus-4.01c-respect-flags.patch           | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
index e4d56c25095e..ebe638f1a86c 100644
--- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
@@ -1,6 +1,7 @@
 * Respect CFLAGS everywhere when building.
 * Ignore build flags then when testing the CC wrappers (could contain
   incompatible flags).
+* Disable LTO for runtime objects, these shouldn't contain IR.
 
 --- a/GNUmakefile
 +++ b/GNUmakefile
@@ -29,17 +30,17 @@
  
  ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
 -	$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
-+	$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -c $< -o $@
++	$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
  
  ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 32-bit variant of the runtime (-m32)... "
 -	@$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 64-bit variant of the runtime (-m64)... "
 -	@$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  ./afl-gcc-pass.so: instrumentation/afl-gcc-pass.so.cc | test_deps
 -	$(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@
@@ -62,17 +63,17 @@
  
  ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
 -	$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
-+	$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -c $< -o $@
++	$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
  
  ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 32-bit variant of the runtime (-m32)... "
 -	@$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
  	@printf "[*] Building 64-bit variant of the runtime (-m64)... "
 -	@$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
++	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
  
  .PHONY: test_build
  test_build: $(PROGS)
@@ -136,7 +137,7 @@
  
 -CFLAGS := -O3 -funroll-loops -g -fPIC
 +CFLAGS ?= -O3 -funroll-loops -g
-+CFLAGS += -fPIC
++CFLAGS += -fPIC -fno-lto
  
  all:	libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so
  


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/
@ 2022-07-04 23:24 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-07-04 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     55dbef339a5303eea0c707b2c1b5fa9f523276ae
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Mon Jul  4 17:15:04 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 23:24:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55dbef33

app-forensics/aflplusplus: Respect CC and CPPFLAGS when building aflpp_driver

Note that using user's CFLAGS with hard-coded clang can cause trouble.

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/aflplusplus-4.01c-respect-flags.patch    | 47 +++++++++++++++++++++-
 1 file changed, 45 insertions(+), 2 deletions(-)

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
index ebe638f1a86c..1cfc03d5f42b 100644
--- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
@@ -1,4 +1,4 @@
-* Respect CFLAGS everywhere when building.
+* Respect CC, CFLAGS, CPPFLAGS, LDFLAGS everywhere when building.
 * Ignore build flags then when testing the CC wrappers (could contain
   incompatible flags).
 * Disable LTO for runtime objects, these shouldn't contain IR.
@@ -131,7 +131,7 @@
  
 --- a/utils/aflpp_driver/GNUmakefile
 +++ b/utils/aflpp_driver/GNUmakefile
-@@ -13,7 +13,8 @@ ifneq "" "$(LLVM_BINDIR)"
+@@ -13,40 +13,41 @@ ifneq "" "$(LLVM_BINDIR)"
    LLVM_BINDIR := $(LLVM_BINDIR)/
  endif
  
@@ -141,3 +141,46 @@
  
  all:	libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so
  
+ aflpp_driver.o:	aflpp_driver.c
+-	-$(LLVM_BINDIR)clang -I. -I../../include $(CFLAGS) -c aflpp_driver.c
++	$(CC) $(CPPFLAGS) -I. -I../../include $(CFLAGS) -c aflpp_driver.c
+ 
+ libAFLDriver.a:	aflpp_driver.o
+-	@ar rc libAFLDriver.a aflpp_driver.o
++	ar rc libAFLDriver.a aflpp_driver.o
+ 	@cp -vf libAFLDriver.a ../../
+ 
+ debug:
+-	$(LLVM_BINDIR)clang -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.o ../../src/afl-performance.c
+-	$(LLVM_BINDIR)clang -I../../include -D_DEBUG=\"1\" -g -funroll-loops -c aflpp_driver.c
++	$(CC) $(CPPFLAGS) -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.o ../../src/afl-performance.c
++	$(CC) $(CPPFLAGS) -I../../include -D_DEBUG=\"1\" $(CFLAGS) -g -funroll-loops -c aflpp_driver.c
+ 	#$(LLVM_BINDIR)clang -S -emit-llvm -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.ll ../../src/afl-performance.c
+ 	#$(LLVM_BINDIR)clang -S -emit-llvm -I../../include -D_DEBUG=\"1\" -g -funroll-loops -c aflpp_driver.c
+ 	ar rc libAFLDriver.a afl-performance.o aflpp_driver.o
+ 
+ aflpp_qemu_driver.o:	aflpp_qemu_driver.c
+-	-$(LLVM_BINDIR)clang $(CFLAGS) -O0 -funroll-loops -c aflpp_qemu_driver.c
++	$(CC) $(CPPFLAGS) $(CFLAGS) -O0 -funroll-loops -c aflpp_qemu_driver.c
+ 
+ libAFLQemuDriver.a:	aflpp_qemu_driver.o
+-	@-ar rc libAFLQemuDriver.a aflpp_qemu_driver.o
+-	@-cp -vf libAFLQemuDriver.a ../../
++	ar rc libAFLQemuDriver.a aflpp_qemu_driver.o
++	@cp -vf libAFLQemuDriver.a ../../
+ 
+ aflpp_qemu_driver_hook.so:	aflpp_qemu_driver_hook.o
+-	@-test -e aflpp_qemu_driver_hook.o && $(LLVM_BINDIR)clang $(LDFLAGS) -shared aflpp_qemu_driver_hook.o -o aflpp_qemu_driver_hook.so || echo "Note: Optional aflpp_qemu_driver_hook.so not built."
++	@test -e aflpp_qemu_driver_hook.o && $(CC) $(LDFLAGS) -shared aflpp_qemu_driver_hook.o -o aflpp_qemu_driver_hook.so || echo "Note: Optional aflpp_qemu_driver_hook.so not built."
+ 
+ aflpp_qemu_driver_hook.o:	aflpp_qemu_driver_hook.c
+-	@-test -e ../../qemu_mode/qemuafl/qemuafl/api.h && $(LLVM_BINDIR)clang $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c || echo "Note: Optional aflpp_qemu_driver_hook.o not built."
++	@test -e ../../qemu_mode/qemuafl/qemuafl/api.h && $(CC) $(CPPFLAGS) $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c || echo "Note: Optional aflpp_qemu_driver_hook.o not built."
+ 
+ test:	debug
+ 	#clang -S -emit-llvm -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test.ll aflpp_driver_test.c
+-	afl-clang-fast -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test aflpp_driver_test.c libAFLDriver.a afl-performance.o
++	../../afl-clang-fast -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test aflpp_driver_test.c libAFLDriver.a afl-performance.o
+ 
+ clean:
+ 	rm -f *.o libAFLDriver*.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so *~ core aflpp_driver_test


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/
@ 2022-07-04 23:24 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-07-04 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     b36373978816cbcf1840cc1f445d4602de2093f2
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Mon Jul  4 17:04:52 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 23:24:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3637397

app-forensics/aflplusplus: Don't override jobs parameter for sub-makes

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/aflplusplus-4.01c-no-ignore-errors-makefile.patch        | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
index 8a78e7d791d8..861835892bb5 100644
--- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
@@ -1,4 +1,5 @@
 https://bugs.gentoo.org/800941
+(also don't override jobs for sub-makes)
 
 --- a/GNUmakefile
 +++ b/GNUmakefile
@@ -12,7 +13,7 @@ https://bugs.gentoo.org/800941
  .PHONY: llvm
  llvm:
 -	-$(MAKE) -j4 -f GNUmakefile.llvm
-+	$(MAKE) -j4 -f GNUmakefile.llvm
++	$(MAKE) -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
@@ -60,7 +61,7 @@ https://bugs.gentoo.org/800941
  .PHONY: distrib
  distrib: all
 -	-$(MAKE) -j4 -f GNUmakefile.llvm
-+	$(MAKE) -j4 -f GNUmakefile.llvm
++	$(MAKE) -f GNUmakefile.llvm
  ifneq "$(SYS)" "Darwin"
 -	-$(MAKE) -f GNUmakefile.gcc_plugin
 +	$(MAKE) -f GNUmakefile.gcc_plugin
@@ -116,7 +117,7 @@ https://bugs.gentoo.org/800941
  .PHONY: source-only
  source-only: all
 -	-$(MAKE) -j4 -f GNUmakefile.llvm
-+	$(MAKE) -j4 -f GNUmakefile.llvm
++	$(MAKE) -f GNUmakefile.llvm
  ifneq "$(SYS)" "Darwin"
 -	-$(MAKE) -f GNUmakefile.gcc_plugin
 +	$(MAKE) -f GNUmakefile.gcc_plugin


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/
@ 2022-07-04 23:24 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-07-04 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     0a69da48bddc8566105c52fe6f23cfbabb615bc7
Author:     Alexander Miller <alex.miller <AT> gmx <DOT> de>
AuthorDate: Mon Jul  4 16:31:44 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 23:24:00 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a69da48

app-forensics/aflplusplus: Don't use *FLAGS when testing CC wrappers

The flags used to build the package could be incompatible with the wrapper
due to gcc vs. clang differences. Doesn't affect installed files.

Signed-off-by: Alexander Miller <alex.miller <AT> gmx.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...flplusplus-4.01c-no-ignore-errors-makefile.patch |  2 +-
 .../files/aflplusplus-4.01c-respect-flags.patch     | 21 ++++++++++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
index 95718bb3a32d..8a78e7d791d8 100644
--- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-no-ignore-errors-makefile.patch
@@ -147,7 +147,7 @@ https://bugs.gentoo.org/800941
 @@ -463,6 +463,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)
+ 	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 ./test-instr.c -o test-instr
 +	@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

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
index d22d582ecaa9..e4d56c25095e 100644
--- a/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
+++ b/app-forensics/aflplusplus/files/aflplusplus-4.01c-respect-flags.patch
@@ -1,3 +1,7 @@
+* Respect CFLAGS everywhere when building.
+* Ignore build flags then when testing the CC wrappers (could contain
+  incompatible flags).
+
 --- a/GNUmakefile
 +++ b/GNUmakefile
 @@ -423,7 +423,7 @@ afl-as: src/afl-as.c include/afl-as.h $(COMM_HDR) | test_x86
@@ -9,6 +13,15 @@
  
  src/afl-common.o : $(COMM_HDR) src/afl-common.c include/common.h
  	$(CC) $(CFLAGS) $(CFLAGS_FLTO) -c src/afl-common.c -o src/afl-common.o
+@@ -531,7 +531,7 @@ .PHONY: test_build
+ ifndef AFL_NO_X86
+ test_build: afl-cc afl-gcc afl-as afl-showmap
+ 	@echo "[*] Testing the CC wrapper afl-cc and its instrumentation output..."
+-	@unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c $(LDFLAGS) -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 )
++	@unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; 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
 --- a/GNUmakefile.gcc_plugin
 +++ b/GNUmakefile.gcc_plugin
 @@ -131,18 +131,18 @@ afl-common.o: ./src/afl-common.c
@@ -36,7 +49,7 @@
  	ln -sf afl-cc.8 afl-gcc-fast.8
 --- a/GNUmakefile.llvm
 +++ b/GNUmakefile.llvm
-@@ -444,20 +444,20 @@ afl-llvm-dict2file.so:	instrumentation/afl-llvm-dict2file.so.cc instrumentation/
+@@ -444,25 +444,25 @@ afl-llvm-dict2file.so:	instrumentation/afl-llvm-dict2file.so.cc instrumentation/
  
  .PHONY: document
  document:
@@ -63,6 +76,12 @@
  
  .PHONY: test_build
  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)
++	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 ./test-instr.c -o test-instr
+ 	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
 --- a/custom_mutators/honggfuzz/Makefile
 +++ b/custom_mutators/honggfuzz/Makefile
 @@ -1,5 +1,6 @@


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/
@ 2022-12-21 19:29 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-12-21 19:29 UTC (permalink / raw
  To: gentoo-commits

commit:     1ad0b7190e4149293a914d24e20f6478f216ca01
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Wed Dec 21 17:42:55 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 21 19:29:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ad0b719

app-forensics/aflplusplus: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/28738
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...lplusplus-4.02c-no-ignore-errors-makefile.patch | 149 ---------------
 .../files/aflplusplus-4.02c-respect-flags.patch    | 200 ---------------------
 2 files changed, 349 deletions(-)

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.02c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.02c-no-ignore-errors-makefile.patch
deleted file mode 100644
index 8a2cccbcff8f..000000000000
--- a/app-forensics/aflplusplus/files/aflplusplus-4.02c-no-ignore-errors-makefile.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-https://bugs.gentoo.org/800941
-(also don't override jobs for sub-makes)
-
---- a/GNUmakefile
-+++ b/GNUmakefile
-@@ -308,17 +308,17 @@ endif
- 
- .PHONY: all
- all:	test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_build all_done
--	-$(MAKE) -C utils/aflpp_driver
-+	$(MAKE) -C utils/aflpp_driver
- 
- .PHONY: llvm
- llvm:
--	-$(MAKE) -j$(nproc) -f GNUmakefile.llvm
-+	$(MAKE) -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:
- ifneq "$(SYS)" "Darwin"
--	-$(MAKE) -f GNUmakefile.gcc_plugin
-+	$(MAKE) -f GNUmakefile.gcc_plugin
- endif
- 
- .PHONY: man
-@@ -571,19 +571,19 @@ all_done: test_build
- .PHONY: clean
- clean:
- 	rm -rf $(PROGS) 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-cs-proxy afl-qemu-trace afl-gcc-fast 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 *.dSYM lib*.a
--	-$(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
--	-$(MAKE) -C utils/afl_network_proxy clean
--	-$(MAKE) -C utils/socket_fuzzing clean
--	-$(MAKE) -C utils/argv_fuzzing clean
--	-$(MAKE) -C utils/plot_ui clean
--	-$(MAKE) -C qemu_mode/unsigaction clean
--	-$(MAKE) -C qemu_mode/libcompcov clean
--	-$(MAKE) -C qemu_mode/libqasan clean
--	-$(MAKE) -C frida_mode 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
-+	$(MAKE) -C utils/afl_network_proxy clean
-+	$(MAKE) -C utils/socket_fuzzing clean
-+	$(MAKE) -C utils/argv_fuzzing clean
-+	$(MAKE) -C utils/plot_ui clean
-+	$(MAKE) -C qemu_mode/unsigaction clean
-+	$(MAKE) -C qemu_mode/libcompcov clean
-+	$(MAKE) -C qemu_mode/libqasan clean
-+	$(MAKE) -C frida_mode clean
- 	rm -rf nyx_mode/packer/linux_initramfs/init.cpio.gz nyx_mode/libnyx/libnyx/target/release/* nyx_mode/QEMU-Nyx/x86_64-softmmu/qemu-system-x86_64
- ifeq "$(IN_REPO)" "1"
- 	-test -e coresight_mode/coresight-trace/Makefile && $(MAKE) -C coresight_mode/coresight-trace clean || true
-@@ -613,21 +613,21 @@ endif
- 
- .PHONY: distrib
- distrib: all
--	-$(MAKE) -j$(nproc) -f GNUmakefile.llvm
-+	$(MAKE) -f GNUmakefile.llvm
- ifneq "$(SYS)" "Darwin"
--	-$(MAKE) -f GNUmakefile.gcc_plugin
--endif
--	-$(MAKE) -C utils/libdislocator
--	-$(MAKE) -C utils/libtokencap
--	-$(MAKE) -C utils/afl_network_proxy
--	-$(MAKE) -C utils/socket_fuzzing
--	-$(MAKE) -C utils/argv_fuzzing
--	# -$(MAKE) -C utils/plot_ui
--	-$(MAKE) -C frida_mode
-+	$(MAKE) -f GNUmakefile.gcc_plugin
-+endif
-+	$(MAKE) -C utils/libdislocator
-+	$(MAKE) -C utils/libtokencap
-+	$(MAKE) -C utils/afl_network_proxy
-+	$(MAKE) -C utils/socket_fuzzing
-+	$(MAKE) -C utils/argv_fuzzing
-+	# $(MAKE) -C utils/plot_ui
-+	$(MAKE) -C frida_mode
- ifneq "$(SYS)" "Darwin"
- ifeq "$(ARCH)" "aarch64"
-   ifndef NO_CORESIGHT
--	-$(MAKE) -C coresight_mode
-+	$(MAKE) -C coresight_mode
-   endif
- endif
- ifeq "$(SYS)" "Linux"
-@@ -647,17 +647,17 @@ endif
- 
- .PHONY: binary-only
- binary-only: test_shm test_python ready $(PROGS)
--	-$(MAKE) -C utils/libdislocator
--	-$(MAKE) -C utils/libtokencap
--	-$(MAKE) -C utils/afl_network_proxy
--	-$(MAKE) -C utils/socket_fuzzing
--	-$(MAKE) -C utils/argv_fuzzing
--	# -$(MAKE) -C utils/plot_ui
--	-$(MAKE) -C frida_mode
-+	$(MAKE) -C utils/libdislocator
-+	$(MAKE) -C utils/libtokencap
-+	$(MAKE) -C utils/afl_network_proxy
-+	$(MAKE) -C utils/socket_fuzzing
-+	$(MAKE) -C utils/argv_fuzzing
-+	# $(MAKE) -C utils/plot_ui
-+	$(MAKE) -C frida_mode
- ifneq "$(SYS)" "Darwin"
- ifeq "$(ARCH)" "aarch64"
-   ifndef NO_CORESIGHT
--	-$(MAKE) -C coresight_mode
-+	$(MAKE) -C coresight_mode
-   endif
- endif
- ifeq "$(SYS)" "Linux"
-@@ -677,13 +677,13 @@ endif
- 
- .PHONY: source-only
- source-only: all
--	-$(MAKE) -j$(nproc) -f GNUmakefile.llvm
-+	$(MAKE) -f GNUmakefile.llvm
- ifneq "$(SYS)" "Darwin"
--	-$(MAKE) -f GNUmakefile.gcc_plugin
-+	$(MAKE) -f GNUmakefile.gcc_plugin
- endif
--	-$(MAKE) -C utils/libdislocator
--	-$(MAKE) -C utils/libtokencap
--	# -$(MAKE) -C utils/plot_ui
-+	$(MAKE) -C utils/libdislocator
-+	$(MAKE) -C utils/libtokencap
-+	# $(MAKE) -C utils/plot_ui
- ifeq "$(SYS)" "Linux"
- ifndef NO_NYX
- 	-cd nyx_mode && ./build_nyx_support.sh
-@@ -731,9 +731,9 @@ 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.llvm install
- ifneq "$(SYS)" "Darwin"
--	-$(MAKE) -f GNUmakefile.gcc_plugin install
-+	$(MAKE) -f GNUmakefile.gcc_plugin install
- endif
- 	ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc
- 	ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++

diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.02c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.02c-respect-flags.patch
deleted file mode 100644
index 65748a51c723..000000000000
--- a/app-forensics/aflplusplus/files/aflplusplus-4.02c-respect-flags.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-* Respect AR, CC, CFLAGS, CPPFLAGS, LDFLAGS everywhere when building.
-* Ignore build flags then when testing the CC wrappers (could contain
-  incompatible flags).
-* Disable LTO for runtime objects, these shouldn't contain IR.
-
---- a/GNUmakefile
-+++ b/GNUmakefile
-@@ -426,7 +426,7 @@ afl-as: src/afl-as.c include/afl-as.h $(COMM_HDR) | test_x86
- 	@ln -sf afl-as as
- 
- src/afl-performance.o : $(COMM_HDR) src/afl-performance.c include/hash.h
--	$(CC) $(CFLAGS) $(CFLAGS_OPT) -Iinclude -c src/afl-performance.c -o src/afl-performance.o
-+	$(CC) $(CFLAGS) -Iinclude -c src/afl-performance.c -o src/afl-performance.o
- 
- src/afl-common.o : $(COMM_HDR) src/afl-common.c include/common.h
- 	$(CC) $(CFLAGS) $(CFLAGS_FLTO) -c src/afl-common.c -o src/afl-common.o
-@@ -534,7 +534,7 @@ code-format:
- ifndef AFL_NO_X86
- test_build: afl-cc afl-gcc afl-as afl-showmap
- 	@echo "[*] Testing the CC wrapper afl-cc and its instrumentation output..."
--	@unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c $(LDFLAGS) -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; exit 1 )
-+	@unset AFL_MAP_SIZE AFL_USE_UBSAN AFL_USE_CFISAN AFL_USE_LSAN AFL_USE_ASAN AFL_USE_MSAN; ASAN_OPTIONS=detect_leaks=0 AFL_INST_RATIO=100 AFL_PATH=. ./afl-cc test-instr.c -o test-instr 2>&1 || (echo "Oops, afl-cc failed"; 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
---- a/GNUmakefile.gcc_plugin
-+++ b/GNUmakefile.gcc_plugin
-@@ -133,20 +133,20 @@ afl-common.o: ./src/afl-common.c
- 	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ $(LDFLAGS)
- 
- ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
--	$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
-+	$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
- 
- ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
- 	@printf "[*] Building 32-bit variant of the runtime (-m32)... "
--	@$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
- 
- ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
- 	@printf "[*] Building 64-bit variant of the runtime (-m64)... "
--	@$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
- 
- $(PASSES): instrumentation/afl-gcc-common.h
- 
- ./afl-gcc-pass.so: instrumentation/afl-gcc-pass.so.cc | test_deps
--	$(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@
-+	$(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@ $(LDFLAGS)
- 	ln -sf afl-cc afl-gcc-fast
- 	ln -sf afl-cc afl-g++-fast
- 	ln -sf afl-cc.8 afl-gcc-fast.8
---- a/GNUmakefile.llvm
-+++ b/GNUmakefile.llvm
-@@ -410,7 +410,7 @@ endif
- 
- ./afl-ld-lto: src/afl-ld-lto.c
- ifeq "$(LLVM_LTO)" "1"
--	$(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@
-+	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $< -o $@
- endif
- 
- ./SanitizerCoverageLTO.so: instrumentation/SanitizerCoverageLTO.so.cc instrumentation/afl-llvm-common.o
-@@ -444,25 +444,25 @@ afl-llvm-dict2file.so:	instrumentation/afl-llvm-dict2file.so.cc instrumentation/
- 
- .PHONY: document
- document:
--	$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o
--	@$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
--	@$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o
-+	@$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
- 
- ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c
--	$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@
-+	$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -fno-lto -c $< -o $@
- 
- ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c
- 	@printf "[*] Building 32-bit variant of the runtime (-m32)... "
--	@$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
- 
- ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c
- 	@printf "[*] Building 64-bit variant of the runtime (-m64)... "
--	@$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
-+	@$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -fno-lto -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi
- 
- .PHONY: test_build
- 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)
-+	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 ./test-instr.c -o test-instr
- 	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
---- a/custom_mutators/honggfuzz/Makefile
-+++ b/custom_mutators/honggfuzz/Makefile
-@@ -1,5 +1,6 @@
- 
--CFLAGS = -O3 -funroll-loops -fPIC -Wl,-Bsymbolic
-+CFLAGS ?= -O3
-+CFLAGS += -funroll-loops -fPIC -Wl,-Bsymbolic
- 
- all: honggfuzz-mutator.so
- 
---- a/custom_mutators/libfuzzer/Makefile
-+++ b/custom_mutators/libfuzzer/Makefile
-@@ -1,6 +1,6 @@
- 
--CFLAGS = -g -O3 -funroll-loops -fPIC -fpermissive -std=c++11
--#CFLAGS = -g -O0 -fPIC -fpermissive -std=c++11
-+CFLAGS ?= -g -O3
-+CFLAGS += -funroll-loops -fpermissive -std=c++11 -fPIC
- CXX ?= clang++
- 
- ifdef INTROSPECTION
---- a/frida_mode/GNUmakefile
-+++ b/frida_mode/GNUmakefile
-@@ -27,7 +27,6 @@ CFLAGS+=-fPIC \
- 		-D_GNU_SOURCE \
- 		-D_FORTIFY_SOURCE=2 \
- 		-g \
--		-O3 \
- 		-funroll-loops \
- 		-ffunction-sections \
- 
---- a/frida_mode/test/png/persistent/hook/GNUmakefile
-+++ b/frida_mode/test/png/persistent/hook/GNUmakefile
-@@ -5,11 +5,9 @@ BUILD_DIR:=$(PWD)build/
- AFLPP_FRIDA_DRIVER_HOOK_OBJ=$(ROOT)frida_mode/build/frida_hook.so
- AFLPP_QEMU_DRIVER_HOOK_OBJ=$(ROOT)frida_mode/build/qemu_hook.so
- 
--CFLAGS+=-O3 \
--		-funroll-loops \
-+CFLAGS+= -funroll-loops \
- 		-g \
--		-fPIC \
--		-funroll-loops \
-+		-fPIC
- 
- LDFLAGS+=-shared \
- 
---- a/utils/aflpp_driver/GNUmakefile
-+++ b/utils/aflpp_driver/GNUmakefile
-@@ -13,40 +13,42 @@ ifneq "" "$(LLVM_BINDIR)"
-   LLVM_BINDIR := $(LLVM_BINDIR)/
- endif
- 
--CFLAGS := -O3 -funroll-loops -g -fPIC
-+AR ?= ar
-+CFLAGS ?= -O3 -funroll-loops -g
-+CFLAGS += -fPIC -fno-lto
- 
- all:	libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so
- 
- aflpp_driver.o:	aflpp_driver.c
--	-$(LLVM_BINDIR)clang -I. -I../../include $(CFLAGS) -c aflpp_driver.c
-+	$(CC) $(CPPFLAGS) -I. -I../../include $(CFLAGS) -c aflpp_driver.c
- 
- libAFLDriver.a:	aflpp_driver.o
--	@ar rc libAFLDriver.a aflpp_driver.o
-+	$(AR) rc libAFLDriver.a aflpp_driver.o
- 	@cp -vf libAFLDriver.a ../../
- 
- debug:
--	$(LLVM_BINDIR)clang -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.o ../../src/afl-performance.c
--	$(LLVM_BINDIR)clang -I../../include -D_DEBUG=\"1\" -g -funroll-loops -c aflpp_driver.c
-+	$(CC) $(CPPFLAGS) -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.o ../../src/afl-performance.c
-+	$(CC) $(CPPFLAGS) -I../../include -D_DEBUG=\"1\" $(CFLAGS) -g -funroll-loops -c aflpp_driver.c
- 	#$(LLVM_BINDIR)clang -S -emit-llvm -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.ll ../../src/afl-performance.c
- 	#$(LLVM_BINDIR)clang -S -emit-llvm -I../../include -D_DEBUG=\"1\" -g -funroll-loops -c aflpp_driver.c
--	ar rc libAFLDriver.a afl-performance.o aflpp_driver.o
-+	$(AR) rc libAFLDriver.a afl-performance.o aflpp_driver.o
- 
- aflpp_qemu_driver.o:	aflpp_qemu_driver.c
--	-$(LLVM_BINDIR)clang $(CFLAGS) -O0 -funroll-loops -c aflpp_qemu_driver.c
-+	$(CC) $(CPPFLAGS) $(CFLAGS) -O0 -funroll-loops -c aflpp_qemu_driver.c
- 
- libAFLQemuDriver.a:	aflpp_qemu_driver.o
--	@-ar rc libAFLQemuDriver.a aflpp_qemu_driver.o
--	@-cp -vf libAFLQemuDriver.a ../../
-+	$(AR) rc libAFLQemuDriver.a aflpp_qemu_driver.o
-+	@cp -vf libAFLQemuDriver.a ../../
- 
- aflpp_qemu_driver_hook.so:	aflpp_qemu_driver_hook.o
--	@-test -e aflpp_qemu_driver_hook.o && $(LLVM_BINDIR)clang $(LDFLAGS) -shared aflpp_qemu_driver_hook.o -o aflpp_qemu_driver_hook.so || echo "Note: Optional aflpp_qemu_driver_hook.so not built."
-+	@test -e aflpp_qemu_driver_hook.o && $(CC) $(LDFLAGS) -shared aflpp_qemu_driver_hook.o -o aflpp_qemu_driver_hook.so || echo "Note: Optional aflpp_qemu_driver_hook.so not built."
- 
- aflpp_qemu_driver_hook.o:	aflpp_qemu_driver_hook.c
--	@-test -e ../../qemu_mode/qemuafl/qemuafl/api.h && $(LLVM_BINDIR)clang $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c || echo "Note: Optional aflpp_qemu_driver_hook.o not built."
-+	@test -e ../../qemu_mode/qemuafl/qemuafl/api.h && $(CC) $(CPPFLAGS) $(CFLAGS) -funroll-loops -c aflpp_qemu_driver_hook.c || echo "Note: Optional aflpp_qemu_driver_hook.o not built."
- 
- test:	debug
- 	#clang -S -emit-llvm -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test.ll aflpp_driver_test.c
--	afl-clang-fast -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test aflpp_driver_test.c libAFLDriver.a afl-performance.o
-+	../../afl-clang-fast -D_DEBUG=\"1\" -I../../include -Wl,--allow-multiple-definition -funroll-loops -o aflpp_driver_test aflpp_driver_test.c libAFLDriver.a afl-performance.o
- 
- clean:
- 	rm -f *.o libAFLDriver*.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so *~ core aflpp_driver_test


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-21 19:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-04 23:24 [gentoo-commits] repo/gentoo:master commit in: app-forensics/aflplusplus/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-12-21 19:29 Sam James
2022-07-04 23:24 Sam James
2022-07-04 23:24 Sam James
2022-07-04 23:24 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox