summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-forensics/aflplusplus')
-rw-r--r--app-forensics/aflplusplus/Manifest4
-rw-r--r--app-forensics/aflplusplus/aflplusplus-4.07c-r1.ebuild (renamed from app-forensics/aflplusplus/aflplusplus-4.00c.ebuild)64
-rw-r--r--app-forensics/aflplusplus/aflplusplus-4.08c-r1.ebuild99
-rw-r--r--app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch121
-rw-r--r--app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch122
5 files changed, 136 insertions, 274 deletions
diff --git a/app-forensics/aflplusplus/Manifest b/app-forensics/aflplusplus/Manifest
index a99f8f055073..1d808f455616 100644
--- a/app-forensics/aflplusplus/Manifest
+++ b/app-forensics/aflplusplus/Manifest
@@ -1 +1,3 @@
-DIST aflplusplus-4.00c.tar.gz 2805041 BLAKE2B c1ce15aa9860fc02a7d6f608cae9dd8987b72253b465ea734c721d1b6927e482c31b907aeafe82c00618465227e2e140bfc595151ea5d73037638c3ee630872c SHA512 23a7a4260e581f7c212393e1e14704464bbbc3ff5465b3472db31c6c7f2cd25a9ecc5ad81fad8958c775fcd01b22269085e6c69419a07fbbdb9ec317a3e39beb
+DIST aflplusplus-4.07c-patches.tar.xz 4788 BLAKE2B de109198fbabfce2554459fee6a14f66002a952f5584ff265a6ff7d7646f520ed53a6d9c8c125a05eb5a4aa0c1cc675dca82647ad4c0965cdab10d3aa2f09467 SHA512 0ea4279b261d55cf209e32ca4b7fd7dc1181ec902dd7e4c7f36854d84f14037e643a543dcbb849927b41919c527303fc5877c9fab5b09c8988fbfab499b8f8bc
+DIST aflplusplus-4.07c.tar.gz 2878659 BLAKE2B c3c4c5507e29ed8015784378a13a55cb6b389dec915979749b1869496c16366ce876f1eecc91eb09d51cc58266a92296218cd5eda2a201f5cf4faaa2ea61942f SHA512 c62fce112d59ef5ffb847adab9a7ff8486d44e6316a391392979da19a8160b55f9af7f75fd39cdc98997b3e166f4f6a33ddf31b827c9414a1392657701ecb5e8
+DIST aflplusplus-4.08c.tar.gz 2894794 BLAKE2B 5576ec54969c7ae10b05fe10320581b348f989c1bc412bd63b2ca7ecb3bd1782a90c2660d971375667f6dd820f9035d7abb2207f59a1aaa5e7640d352eaa5757 SHA512 52c35ed544db8be778b79a64977fcc74092b541c4c07a788b20f4b9e8db95ff9c52c997ebf6f5a1056f962f3551df06a5eca02679bc2b71bb9d8944c1f77984a
diff --git a/app-forensics/aflplusplus/aflplusplus-4.00c.ebuild b/app-forensics/aflplusplus/aflplusplus-4.07c-r1.ebuild
index 3cc127a6a3d0..81389b9c438e 100644
--- a/app-forensics/aflplusplus/aflplusplus-4.00c.ebuild
+++ b/app-forensics/aflplusplus/aflplusplus-4.07c-r1.ebuild
@@ -1,45 +1,52 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{8,9,10} )
-LLVM_MAX_SLOT=13
+PYTHON_COMPAT=( python3_{10..11} )
+LLVM_MAX_SLOT=16
inherit toolchain-funcs llvm optfeature python-single-r1
+AFL_PATCHSET="${PN}-4.07c-patches"
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}"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${AFL_PATCHSET}.tar.xz"
+S="${WORKDIR}"/AFLplusplus-${PV}
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 arm64"
IUSE="test"
-
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# Tests involve heavy use of LD_PRELOAD in some cases
# This isn't compatible with sandbox
RESTRICT="test"
-# It turns out we need Clang too
-RDEPEND="${PYTHON_DEPS}
- >=sys-devel/llvm-11:=
+RDEPEND="
+ ${PYTHON_DEPS}
+ <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
|| (
- sys-devel/clang:11
- sys-devel/clang:12
- sys-devel/clang:13
+ sys-devel/clang:14
+ sys-devel/clang:15
+ sys-devel/clang:${LLVM_MAX_SLOT}
)
- !app-forensics/afl"
-DEPEND="${RDEPEND}
- test? ( dev-util/cmocka )"
+ !app-forensics/afl
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka )
+"
+QA_FLAGS_IGNORED="
+ usr/lib.*/afl/afl-gcc-cmplog-pass.so
+ usr/lib.*/afl/afl-gcc-cmptrs-pass.so
+"
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
+ "${WORKDIR}"/${AFL_PATCHSET}
)
llvm_check_deps() {
@@ -52,33 +59,30 @@ 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"
+ 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/aflplusplus-4.08c-r1.ebuild b/app-forensics/aflplusplus/aflplusplus-4.08c-r1.ebuild
new file mode 100644
index 000000000000..f4311f8fd156
--- /dev/null
+++ b/app-forensics/aflplusplus/aflplusplus-4.08c-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+LLVM_MAX_SLOT=17
+LLVM_MIN_SLOT=14
+inherit toolchain-funcs llvm optfeature python-single-r1
+
+AFL_PATCHSET="${PN}-4.07c-patches"
+DESCRIPTION="Fork of AFL, the popular compile-time instrumentation fuzzer"
+HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus"
+SRC_URI="https://github.com/AFLplusplus/AFLplusplus/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${AFL_PATCHSET}.tar.xz"
+S="${WORKDIR}"/AFLplusplus-${PV}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 arm64"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Tests involve heavy use of LD_PRELOAD in some cases
+# This isn't compatible with sandbox
+RESTRICT="test"
+
+LLVM_DEPS="
+ <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=
+ || (
+"
+# We go downwards as Portage prefers left-most in || ( .. )
+for ((i=${LLVM_MAX_SLOT}; i >= ${LLVM_MIN_SLOT}; i--)) ; do
+ LLVM_DEPS+=" sys-devel/clang:${i}"
+done
+LLVM_DEPS+=" )"
+unset i
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ ${LLVM_DEPS}
+ !app-forensics/afl
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka )
+"
+
+QA_FLAGS_IGNORED="
+ usr/lib.*/afl/afl-gcc-cmplog-pass.so
+ usr/lib.*/afl/afl-gcc-cmptrs-pass.so
+"
+QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf"
+
+PATCHES=(
+ "${WORKDIR}"/${AFL_PATCHSET}
+)
+
+llvm_check_deps() {
+ has_version -b "sys-devel/clang:${LLVM_SLOT}" && \
+ has_version -b "sys-devel/llvm:${LLVM_SLOT}"
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+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() {
+ mymake test
+}
+
+src_install() {
+ mymake DESTDIR="${D}" install
+ dostrip -x /usr/share/afl/testcases/
+}
+
+pkg_postinst() {
+ # TODO: Any others?
+ optfeature "fuzzing with AFL_USE_ASAN" sys-libs/compiler-rt-sanitizers[asan]
+ optfeature "fuzzing with AFL_USE_MSAN" sys-libs/compiler-rt-sanitizers[msan]
+}
diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch
deleted file mode 100644
index 50d9268ac9bb..000000000000
--- a/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-https://bugs.gentoo.org/800941
-
---- a/GNUmakefile
-+++ b/GNUmakefile
-@@ -310,13 +310,13 @@ all: test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_bu
-
- .PHONY: llvm
- llvm:
-- -$(MAKE) -j4 -f GNUmakefile.llvm
-+ $(MAKE) -j4 -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
-@@ -565,19 +565,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
-- -$(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/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) -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
-@@ -607,20 +607,20 @@ endif
-
- .PHONY: distrib
- distrib: all
-- -$(MAKE) -j4 -f GNUmakefile.llvm
-+ $(MAKE) -j4 -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/afl_network_proxy
-- -$(MAKE) -C utils/socket_fuzzing
-- -$(MAKE) -C utils/argv_fuzzing
-+ $(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 frida_mode
- ifneq "$(SYS)" "Darwin"
- ifeq "$(ARCH)" "aarch64"
-- -$(MAKE) -C coresight_mode
-+ $(MAKE) -C coresight_mode
- endif
- ifeq "$(SYS)" "Linux"
- -cd nyx_mode && ./build_nyx_support.sh
-@@ -651,12 +651,12 @@ endif
-
- .PHONY: source-only
- source-only: all
-- -$(MAKE) -j4 -f GNUmakefile.llvm
-+ $(MAKE) -j4 -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/libdislocator
-+ $(MAKE) -C utils/libtokencap
- # -$(MAKE) -C utils/plot_ui
- ifeq "$(SYS)" "Linux"
- -cd nyx_mode && ./build_nyx_support.sh
-@@ -702,9 +702,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++
---- 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.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
-