diff options
Diffstat (limited to 'app-forensics')
-rw-r--r-- | app-forensics/Manifest.gz | bin | 4873 -> 4875 bytes | |||
-rw-r--r-- | app-forensics/aflplusplus/Manifest | 8 | ||||
-rw-r--r-- | app-forensics/aflplusplus/aflplusplus-4.02c.ebuild (renamed from app-forensics/aflplusplus/aflplusplus-4.00c.ebuild) | 40 | ||||
-rw-r--r-- | app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch | 122 | ||||
-rw-r--r-- | app-forensics/aflplusplus/files/aflplusplus-4.02c-no-ignore-errors-makefile.patch (renamed from app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch) | 90 | ||||
-rw-r--r-- | app-forensics/aflplusplus/files/aflplusplus-4.02c-respect-flags.patch | 200 |
6 files changed, 281 insertions, 179 deletions
diff --git a/app-forensics/Manifest.gz b/app-forensics/Manifest.gz Binary files differindex ae47e4d6a712..a0e2880b6096 100644 --- a/app-forensics/Manifest.gz +++ b/app-forensics/Manifest.gz diff --git a/app-forensics/aflplusplus/Manifest b/app-forensics/aflplusplus/Manifest index 40ead60cfa42..8576afae8da9 100644 --- a/app-forensics/aflplusplus/Manifest +++ b/app-forensics/aflplusplus/Manifest @@ -1,10 +1,10 @@ -AUX aflplusplus-4.00c-no-ignore-errors-makefile.patch 4990 BLAKE2B e3e4b734e4e2b6d6e6fa384ec3b92003b1ee2a1313ec76eb5b6c0e6a6552dc8d08bb2639add2a11c2203fc9b731deff18015f497531beaa27ef59a6dd8e83be2 SHA512 ccf75c622c9a0227b3bc916f182bb1ad5fa6453622773f3a63a9d697c2e11a8597cc1758b48a19546101c1ea9bd7dc5ec91e75e960ddb3aef580b0447cd5675c -AUX aflplusplus-4.00c-respect-flags.patch 7004 BLAKE2B a13695116d491e9dc0a05a3d2f3fa14fa9126350ea8debbd5e3664cac45c91969f34d1de6062f62adbbaf97c0fb485f74d6c367ff37464fe34f7b66db9663996 SHA512 2eb8e116fa690e08eb91ced2b760e87d4c623b020ac451409ca68501b32c9aee7773e237c0bdfeef09086b851e95a3b3fb216e7ca58681e64fc12a958994f7d1 AUX aflplusplus-4.01c-lld-detect.patch 516 BLAKE2B 44b32508dc04aee377eda714ec95e8fd149b6175376e9c7b64c1376dc3f09d5aa84366ec4788d7b5943925a537f359d62f608035388446766180c07ecfa87538 SHA512 0730a65448031f17e3afb6b0ed9760280483f2a07882900c66b6b40be4440fa73e2ccc077410f15472da809c447b864421a431ffe98b4eccd1e6b30a4028398b AUX aflplusplus-4.01c-no-ignore-errors-makefile.patch 5840 BLAKE2B a895ef0956539978c9f3f9c128149d6573e0f7750de9086bd9890f45b43bc76e934e0d0768b30d6a60832f931c351b060b772e9816f551191e8c90a29906af1b SHA512 0ad93eaad1da1472be6f402514c2fde832abbcfcf11e1350ea58109fe5c49f53a018e2c1d516714f3aab2e9917384e9bfae91630033476b295b023800a301b03 AUX aflplusplus-4.01c-respect-flags.patch 11669 BLAKE2B 1aa396a2283fd8b8efb40086c555155256c248be8b72aeaa64b1f9d439d669a5ac95bbf0286f76bfd235d189532d230505533030d6710d42c5d4132728093c5b SHA512 acdaad1e1a30e1e19f05823c15ecd459bd38bdcbcca21b3b9a953d29d7540136d7e4cd92d88836dce8d588f70d19d66756bdf61c0fa6e268d53926a6a1bdf13f -DIST aflplusplus-4.00c.tar.gz 2805041 BLAKE2B c1ce15aa9860fc02a7d6f608cae9dd8987b72253b465ea734c721d1b6927e482c31b907aeafe82c00618465227e2e140bfc595151ea5d73037638c3ee630872c SHA512 23a7a4260e581f7c212393e1e14704464bbbc3ff5465b3472db31c6c7f2cd25a9ecc5ad81fad8958c775fcd01b22269085e6c69419a07fbbdb9ec317a3e39beb +AUX aflplusplus-4.02c-no-ignore-errors-makefile.patch 5291 BLAKE2B 10bdf9571f60e775c8f9d72c14d4532cc2bf60fe614a893f99daf9790b7e35228573d55eead981e6428b2d981407375995b181021801d82850b72652d0df08c1 SHA512 667d815266c00ed217087aef0b3a22acb89ed4501f1c649bfe4257e1bcfcf23492525c2bb678c352e58fd6bbf10d08d140bd3f8c1b163f340976a785c84fb147 +AUX aflplusplus-4.02c-respect-flags.patch 11731 BLAKE2B 7f6d7f24abc1889b9738d418766e8f001e439d69c1916d2c3d1ac35f874bf58520cf7e8f94ef0a70e8d3d76d55cd647454a2217143c7fa98cc4a562af36282ca SHA512 ff758c186343cc9967e16b3ab40c32261a28fe1a6c4ddca2180ccf5e1acf95bb9ab18ef6d685bff969d69e31f5a3b818cb251b4cb6b48b5fbb9b5c21b8f9f1e7 DIST aflplusplus-4.01c.tar.gz 2818445 BLAKE2B f3699c4b2fabec0ab238277c3b2c7b19b35af7a0b82b14a57c34b8579121cfa0644ef432132cf4a3382547db3faf799d2ab601512ddfb469e4a2246cdb61aa7f SHA512 d2b03ab4ff9538fe0b52aa3ed4778a6e5657d64d6f0e5f75a99305bad69c5179d6b1c882650f19a884a740577acb73dab7cee3d5c9c7b06ff2326ffeba37d1fe -EBUILD aflplusplus-4.00c.ebuild 2071 BLAKE2B c511a90fae8a8e42a9e110208ab3dd840f65a203de8eb517713f4637930bda648bb271dc185124ccca34a795c7f34264e616e1a64068a63faa457a3d91a9ebba SHA512 66c28ea49e70fc058a6a953d927b3e75675b1254d3ca29bb12a37cb56462a8ce8235ee5c7d21535619902d482933ecc5f7c927d546f4126e75d13bd7577a0159 +DIST aflplusplus-4.02c.tar.gz 2828429 BLAKE2B 0c4d7937626a699bb6768e2f67f369508f7ec131d1170cd48f8650d8081135b466733de34e52f2ac2213c4bd13ab8936b17d3b0f8debf28e8a32ad87d9dcb55d SHA512 f5159a84e0ecd2c260d2d8ce7df33fe4704c664bdf06f193a7fef377d48646e4d921ee90d0b66c7dac02d16e6b1607c6569351aaeea9b2ee3968d22b3f583763 EBUILD aflplusplus-4.01c-r1.ebuild 2167 BLAKE2B cdf3a3e1bd5222426d0841693c262ea8406f21fcbd16f1518b5c15d04b72c31957e57b519b47be1002c1966b8ad64ab41a6cfde91f7dc1c168a5563b041fa5a7 SHA512 8f9d43230632d9d6df1ea420f79fed527da24f6660e189324b2ac99250c5f6a64488c23601f24721225515977e943117025bb0fa91b1e907d267e56b1f7b357f +EBUILD aflplusplus-4.02c.ebuild 1980 BLAKE2B a68bee38cb63e91eb54fc4eb4d5d1e22f7f86f82e1419785ad170b45a0dc15a62613c540d2097c1c88c9d550f3fda3fde59c213d64414203303e2a9774a52aa4 SHA512 91bc90e2790bf63b133cb52882ed96f6339ef35b846f4aa569ad1ca52adf206f4bba922a00d1cebce717afdfa838999245514e5cd6c2ac6bba4b3096e7233d92 MISC metadata.xml 328 BLAKE2B c9ad582740e9c2ad03a30fe0eaafb8ee19f0d9bc2e98cc7bcd14385a3407f84301479d324b92d3aecafdc1e5cfef1d2cfc8a15c2ecb5d8f2fa348d82de920128 SHA512 e56ce158f6764926c2ed4dc486f017ce75fa272ac8e6ad16e4a816f8c734d7313e3dc9cb007bab07efe73e59cab185312a02d6178296bfe25002719ce4975d14 diff --git a/app-forensics/aflplusplus/aflplusplus-4.00c.ebuild b/app-forensics/aflplusplus/aflplusplus-4.02c.ebuild index 3cc127a6a3d0..208b53026270 100644 --- a/app-forensics/aflplusplus/aflplusplus-4.00c.ebuild +++ b/app-forensics/aflplusplus/aflplusplus-4.02c.ebuild @@ -3,18 +3,18 @@ EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) -LLVM_MAX_SLOT=13 +PYTHON_COMPAT=( python3_{8..10} ) +LLVM_MAX_SLOT=14 inherit toolchain-funcs llvm optfeature python-single-r1 DESCRIPTION="A fork of AFL, the popular compile-time instrumentation fuzzer" HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus" SRC_URI="https://github.com/AFLplusplus/AFLplusplus/archive/${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/AFLplusplus-${PV}" +S="${WORKDIR}"/AFLplusplus-${PV} LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="amd64 arm64" +KEYWORDS="~amd64 ~arm64" IUSE="test" REQUIRED_USE="${PYTHON_REQUIRED_USE}" @@ -25,11 +25,10 @@ RESTRICT="test" # It turns out we need Clang too RDEPEND="${PYTHON_DEPS} - >=sys-devel/llvm-11:= + >=sys-devel/llvm-13:= || ( - sys-devel/clang:11 - sys-devel/clang:12 sys-devel/clang:13 + sys-devel/clang:${LLVM_MAX_SLOT} ) !app-forensics/afl" DEPEND="${RDEPEND} @@ -38,8 +37,9 @@ DEPEND="${RDEPEND} QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf" PATCHES=( - "${FILESDIR}"/${PN}-4.00c-respect-flags.patch - "${FILESDIR}"/${PN}-4.00c-no-ignore-errors-makefile.patch + "${FILESDIR}"/${PN}-4.02c-respect-flags.patch + "${FILESDIR}"/${PN}-4.02c-no-ignore-errors-makefile.patch + "${FILESDIR}"/${PN}-4.01c-lld-detect.patch ) llvm_check_deps() { @@ -52,33 +52,29 @@ pkg_setup() { python-single-r1_pkg_setup } -src_compile() { +mymake() { emake \ CC="$(tc-getCC)" \ CXX="$(tc-getCXX)" \ CFLAGS_FLTO="" \ + LLVM_CONFIG="$(get_llvm_prefix ${LLVM_MAX_SLOT})"/bin/llvm-config \ PREFIX="${EPREFIX}/usr" \ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \ MAN_PATH="${EPREFIX}/usr/share/man/man8" } +src_compile() { + mymake +} + src_test() { - emake \ - CC="$(tc-getCC)" \ - CXX="$(tc-getCXX)" + mymake test } src_install() { - emake \ - CC="$(tc-getCC)" \ - CXX="$(tc-getCXX)" \ - DESTDIR="${D}" \ - PREFIX="${EPREFIX}/usr" \ - HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \ - DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \ - MAN_PATH="${EPREFIX}/usr/share/man/man8" \ - install + mymake DESTDIR="${D}" install + dostrip -x /usr/share/afl/testcases/ } pkg_postinst() { diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch deleted file mode 100644 index 47ccbe008c89..000000000000 --- a/app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch +++ /dev/null @@ -1,122 +0,0 @@ ---- a/GNUmakefile -+++ b/GNUmakefile -@@ -420,7 +420,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) -Iinclude $(SPECIAL_PERFORMANCE) -O3 -fno-unroll-loops -c src/afl-performance.c -o src/afl-performance.o -+ $(CC) $(CFLAGS) -Iinclude $(SPECIAL_PERFORMANCE) -fno-unroll-loops -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 ---- a/GNUmakefile.gcc_plugin -+++ b/GNUmakefile.gcc_plugin -@@ -131,18 +131,18 @@ 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 -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!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; 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!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; 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!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; 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!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; 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 $@ -+ $(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 -@@ -438,20 +438,20 @@ 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 -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!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; 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!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; 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!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; 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!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi - - .PHONY: test_build - test_build: $(PROGS) ---- 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,5 +1,6 @@ - --CFLAGS = -g -O3 -funroll-loops -fPIC -fpermissive -std=c++11 -+CFLAGS ?= -g -O3 -+CFLAGS += -funroll-loops -fpermissive -std=c++11 -fPIC - #CFLAGS = -g -O0 -fPIC -fpermissive -std=c++11 - CXX ?= clang++ - ---- a/frida_mode/GNUmakefile -+++ b/frida_mode/GNUmakefile -@@ -17,7 +17,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 -@@ -7,7 +7,7 @@ ifneq "" "$(LLVM_BINDIR)" - LLVM_BINDIR := $(LLVM_BINDIR)/ - endif - --CFLAGS := -O3 -funroll-loops -g -fPIC -+CFLAGS ?= -O3 -funroll-loops -g -fPIC - - all: libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so - diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.02c-no-ignore-errors-makefile.patch index 50d9268ac9bb..8a2cccbcff8f 100644 --- a/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch +++ b/app-forensics/aflplusplus/files/aflplusplus-4.02c-no-ignore-errors-makefile.patch @@ -1,13 +1,19 @@ https://bugs.gentoo.org/800941 +(also don't override jobs for sub-makes) --- a/GNUmakefile +++ b/GNUmakefile -@@ -310,13 +310,13 @@ all: test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_bu +@@ -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) -j4 -f GNUmakefile.llvm -+ $(MAKE) -j4 -f GNUmakefile.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 @@ -18,19 +24,15 @@ https://bugs.gentoo.org/800941 endif .PHONY: man -@@ -565,19 +565,19 @@ all_done: test_build +@@ -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 + 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) -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/aflpp_driver clean - -$(MAKE) -C utils/afl_network_proxy clean - -$(MAKE) -C utils/socket_fuzzing clean - -$(MAKE) -C utils/argv_fuzzing clean @@ -39,6 +41,11 @@ https://bugs.gentoo.org/800941 - -$(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 @@ -50,54 +57,85 @@ https://bugs.gentoo.org/800941 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 -@@ -607,20 +607,20 @@ endif +@@ -613,21 +613,21 @@ endif .PHONY: distrib distrib: all -- -$(MAKE) -j4 -f GNUmakefile.llvm -+ $(MAKE) -j4 -f GNUmakefile.llvm +- -$(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 ++ # $(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" - -cd nyx_mode && ./build_nyx_support.sh -@@ -651,12 +651,12 @@ endif +@@ -677,13 +677,13 @@ endif .PHONY: source-only source-only: all -- -$(MAKE) -j4 -f GNUmakefile.llvm -+ $(MAKE) -j4 -f GNUmakefile.llvm +- -$(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 ++ # $(MAKE) -C utils/plot_ui ifeq "$(SYS)" "Linux" + ifndef NO_NYX -cd nyx_mode && ./build_nyx_support.sh -@@ -702,9 +702,9 @@ install: all $(MANPAGES) +@@ -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 @@ -109,13 +147,3 @@ https://bugs.gentoo.org/800941 endif ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++ ---- a/GNUmakefile.llvm -+++ b/GNUmakefile.llvm -@@ -457,6 +457,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 diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.02c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.02c-respect-flags.patch new file mode 100644 index 000000000000..65748a51c723 --- /dev/null +++ b/app-forensics/aflplusplus/files/aflplusplus-4.02c-respect-flags.patch @@ -0,0 +1,200 @@ +* 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 |