Merge pull request #2259 from AFLplusplus/removeoutdated

Remove outdated afl-gcc/afl-clang
This commit is contained in:
van Hauser
2024-12-02 14:54:58 +01:00
committed by GitHub
22 changed files with 95 additions and 1789 deletions

View File

@ -602,7 +602,6 @@ void compiler_mode_by_callname(aflcc_state_t *aflcc) {
if (strncmp(aflcc->callname, "afl-clang-fast", 14) == 0) {
/* afl-clang-fast is always created there by makefile
just like afl-clang, burdened with special purposes:
- If llvm-config is not available (i.e. LLVM_MAJOR is 0),
or too old, it falls back to LLVM-NATIVE mode and let
the actual compiler complain if doesn't work.
@ -1220,11 +1219,8 @@ void mode_final_checkout(aflcc_state_t *aflcc, int argc, char **argv) {
switch (aflcc->compiler_mode) {
case GCC:
if (!aflcc->have_gcc) FATAL("afl-gcc is not available on your platform!");
break;
case CLANG:
if (!aflcc->have_clang)
FATAL("afl-clang is not available on your platform!");
break;
case LLVM:
if (!aflcc->have_llvm)
@ -1564,7 +1560,6 @@ void add_defs_selective_instr(aflcc_state_t *aflcc) {
/*
Macro defs for persistent mode. As documented in
instrumentation/README.persistent_mode.md, deferred forkserver initialization
and persistent mode are not available in afl-gcc and afl-clang.
*/
void add_defs_persistent_mode(aflcc_state_t *aflcc) {
@ -2856,10 +2851,7 @@ static void maybe_usage(aflcc_state_t *aflcc, int argc, char **argv) {
" yes\n"
" [GCC_PLUGIN] gcc plugin: %s%s\n"
" CLASSIC DEFAULT no yes no no no "
"yes\n"
" [GCC/CLANG] simple gcc/clang: %s%s\n"
" CLASSIC DEFAULT no no no no no "
"no\n\n",
"yes\n\n",
aflcc->have_llvm ? "AVAILABLE " : "unavailable!",
aflcc->compiler_mode == LLVM ? " [SELECTED]" : "",
aflcc->have_llvm ? "AVAILABLE " : "unavailable!",
@ -2867,15 +2859,7 @@ static void maybe_usage(aflcc_state_t *aflcc, int argc, char **argv) {
aflcc->have_lto ? "AVAILABLE" : "unavailable!",
aflcc->compiler_mode == LTO ? " [SELECTED]" : "",
aflcc->have_gcc_plugin ? "AVAILABLE" : "unavailable!",
aflcc->compiler_mode == GCC_PLUGIN ? " [SELECTED]" : "",
aflcc->have_gcc && aflcc->have_clang
? "AVAILABLE"
: (aflcc->have_gcc
? "GCC ONLY "
: (aflcc->have_clang ? "CLANG ONLY" : "unavailable!")),
(aflcc->compiler_mode == GCC || aflcc->compiler_mode == CLANG)
? " [SELECTED]"
: "");
aflcc->compiler_mode == GCC_PLUGIN ? " [SELECTED]" : "");
SAYF(
"Modes:\n"
@ -3565,10 +3549,12 @@ int main(int argc, char **argv, char **envp) {
maybe_usage(aflcc, argc, argv);
if ((aflcc->compiler_mode == CLANG || aflcc->compiler_mode == GCC) &&
aflcc->need_aflpplib) {
if (aflcc->instrument_mode == INSTRUMENT_GCC || aflcc->instrument_mode ==
INSTRUMENT_CLANG) {
FATAL("afl-gcc/afl-clang cannot be used together with -fsanitize=fuzzer");
FATAL(
"afl-gcc/afl-clang are obsolete and has been removed. Use "
"afl-clang-fast/afl-gcc-fast for instrumentation instead.");
}
@ -3578,9 +3564,12 @@ int main(int argc, char **argv, char **envp) {
edit_params(aflcc, argc, argv, envp);
if (aflcc->debug)
if (aflcc->debug) {
debugf_args((s32)aflcc->cc_par_cnt, (char **)aflcc->cc_params);
}
if (aflcc->passthrough) {
argv[0] = aflcc->cc_params[0];