gcc plugin little update proposal.

like its llvm counterpart, passing the compiler chain used
to avoid using necessarily AFL_CC/AFL_CXX.
This commit is contained in:
David Carlier
2019-11-12 09:13:13 +00:00
parent 760d4991f3
commit 8f188194c1
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ test_deps:
@echo "[+] All set and ready to build." @echo "[+] All set and ready to build."
../afl-gcc-fast: afl-gcc-fast.c | test_deps ../afl-gcc-fast: afl-gcc-fast.c | test_deps
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(CC) -DAFL_GCC_CC=\"$(CC)\" -DAFL_GCC_CXX=\"$(CXX)\" $(CFLAGS) $< -o $@ $(LDFLAGS)
ln -sf afl-gcc-fast ../afl-g++-fast ln -sf afl-gcc-fast ../afl-g++-fast
../afl-gcc-pass.so: afl-gcc-pass.so.cc | test_deps ../afl-gcc-pass.so: afl-gcc-pass.so.cc | test_deps

View File

@ -119,12 +119,12 @@ static void edit_params(u32 argc, char** argv) {
if (!strcmp(name, "afl-g++-fast")) { if (!strcmp(name, "afl-g++-fast")) {
u8* alt_cxx = getenv("AFL_CXX"); u8* alt_cxx = getenv("AFL_CXX");
cc_params[0] = alt_cxx ? alt_cxx : (u8*)"g++"; cc_params[0] = alt_cxx ? alt_cxx : (u8*)AFL_GCC_CXX;
} else { } else {
u8* alt_cc = getenv("AFL_CC"); u8* alt_cc = getenv("AFL_CC");
cc_params[0] = alt_cc ? alt_cc : (u8*)"gcc"; cc_params[0] = alt_cc ? alt_cc : (u8*)AFL_GCC_CC;
} }