diff --git a/GNUmakefile.gcc_plugin b/GNUmakefile.gcc_plugin index 0682c071..9cf16cfb 100644 --- a/GNUmakefile.gcc_plugin +++ b/GNUmakefile.gcc_plugin @@ -148,7 +148,7 @@ afl-common.o: ./src/afl-common.c $(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 diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm index 73ec7cf7..ed91deaa 100644 --- a/GNUmakefile.llvm +++ b/GNUmakefile.llvm @@ -470,7 +470,7 @@ endif ./afl-ld-lto: src/afl-ld-lto.c ifeq "$(LLVM_LTO)" "1" - $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ + $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LDFLAGS) ifdef IS_IOS @ldid -Sentitlements.plist $@ && echo "[+] Signed $@" || { echo "[-] Failed to sign $@"; } endif diff --git a/utils/aflpp_driver/GNUmakefile b/utils/aflpp_driver/GNUmakefile index fd39094c..3c8c637e 100644 --- a/utils/aflpp_driver/GNUmakefile +++ b/utils/aflpp_driver/GNUmakefile @@ -18,7 +18,8 @@ ifneq "" "$(LLVM_BINDIR)" endif endif -CFLAGS := -O3 -funroll-loops -g -fPIC +CFLAGS := -O3 -funroll-loops -g -fPIC -fno-lto +AR ?= ar ifdef IOS_SDK_PATH CFLAGS += -isysroot $(IOS_SDK_PATH) @@ -30,7 +31,7 @@ aflpp_driver.o: aflpp_driver.c -$(CC) -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: @@ -38,13 +39,13 @@ debug: $(CC) -I../../include -D_DEBUG=\"1\" -g -funroll-loops -c aflpp_driver.c #$(CC) -S -emit-llvm -Wno-deprecated -I../../include $(CFLAGS) -D_DEBUG=\"1\" -c -o afl-performance.ll ../../src/afl-performance.c #$(CC) -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 -$(CC) $(CFLAGS) -O0 -funroll-loops -c aflpp_qemu_driver.c libAFLQemuDriver.a: aflpp_qemu_driver.o - @-ar rc libAFLQemuDriver.a aflpp_qemu_driver.o + @-$(AR) rc libAFLQemuDriver.a aflpp_qemu_driver.o @-cp -vf libAFLQemuDriver.a ../../ aflpp_qemu_driver_hook.so: aflpp_qemu_driver_hook.o