gcc plugin little update proposal.
like its llvm counterpart, passing the compiler chain used
to avoid using necessarily AFL_CC/AFL_CXX.
MODIFY
gcc_plugin/Makefile
gcc_plugin/Makefile
@@ -80,7 +80,7 @@ test_deps:
@echo "[+] All set and ready to build."
../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
../afl-gcc-pass.so: afl-gcc-pass.so.cc | test_deps

MODIFY
gcc_plugin/afl-gcc-fast.c
gcc_plugin/afl-gcc-fast.c
@@ -119,12 +119,12 @@ static void edit_params(u32 argc, char** argv) {
if (!strcmp(name, "afl-g++-fast")) {
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 {
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;
}

gcc plugin little update proposal.

like its llvm counterpart, passing the compiler chain used
to avoid using necessarily AFL_CC/AFL_CXX.