Skip to content
Snippets Groups Projects
Commit d5a24acb authored by vanhauser-thc's avatar vanhauser-thc
Browse files

build afl-compiler-rt even with broken llvm

parent a47c3122
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ ifeq "$(SYS)" "SunOS" ...@@ -100,7 +100,7 @@ ifeq "$(SYS)" "SunOS"
endif endif
PROGS = ./afl-gcc-pass.so PROGS = ./afl-gcc-pass.so ./afl-compiler-rt.o ./afl-compiler-rt-32.o ./afl-compiler-rt-64.o
.PHONY: all .PHONY: all
all: test_shm test_deps $(PROGS) test_build all_done all: test_shm test_deps $(PROGS) test_build all_done
...@@ -130,6 +130,17 @@ test_deps: ...@@ -130,6 +130,17 @@ test_deps:
afl-common.o: ./src/afl-common.c afl-common.o: ./src/afl-common.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ $(LDFLAGS) $(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 $@
./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
./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
./afl-gcc-pass.so: instrumentation/afl-gcc-pass.so.cc | test_deps ./afl-gcc-pass.so: instrumentation/afl-gcc-pass.so.cc | test_deps
$(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@ $(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@
ln -sf afl-cc afl-gcc-fast ln -sf afl-cc afl-gcc-fast
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment