mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-22 06:18:04 +00:00
apple fixes
This commit is contained in:
30
src/afl-cc.c
30
src/afl-cc.c
@ -611,26 +611,18 @@ void compiler_mode_by_callname(aflcc_state_t *aflcc) {
|
|||||||
|
|
||||||
aflcc->compiler_mode = GCC_PLUGIN;
|
aflcc->compiler_mode = GCC_PLUGIN;
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
|
|
||||||
} else if (strncmp(aflcc->callname, "afl-gcc", 7) == 0 ||
|
} else if (strncmp(aflcc->callname, "afl-gcc", 7) == 0 ||
|
||||||
|
|
||||||
strncmp(aflcc->callname, "afl-g++", 7) == 0) {
|
strncmp(aflcc->callname, "afl-g++", 7) == 0) {
|
||||||
|
|
||||||
aflcc->compiler_mode = GCC;
|
aflcc->compiler_mode = GCC;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
|
|
||||||
} else if (strcmp(aflcc->callname, "afl-clang") == 0 ||
|
} else if (strcmp(aflcc->callname, "afl-clang") == 0 ||
|
||||||
|
|
||||||
strcmp(aflcc->callname, "afl-clang++") == 0) {
|
strcmp(aflcc->callname, "afl-clang++") == 0) {
|
||||||
|
|
||||||
aflcc->compiler_mode = CLANG;
|
aflcc->compiler_mode = CLANG;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -675,22 +667,14 @@ void compiler_mode_by_environ(aflcc_state_t *aflcc) {
|
|||||||
|
|
||||||
aflcc->compiler_mode = GCC_PLUGIN;
|
aflcc->compiler_mode = GCC_PLUGIN;
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
|
|
||||||
} else if (strcasecmp(ptr, "GCC") == 0) {
|
} else if (strcasecmp(ptr, "GCC") == 0) {
|
||||||
|
|
||||||
aflcc->compiler_mode = GCC;
|
aflcc->compiler_mode = GCC;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
|
|
||||||
} else if (strcasecmp(ptr, "CLANG") == 0) {
|
} else if (strcasecmp(ptr, "CLANG") == 0) {
|
||||||
|
|
||||||
aflcc->compiler_mode = CLANG;
|
aflcc->compiler_mode = CLANG;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
||||||
FATAL("Unknown AFL_CC_COMPILER mode: %s\n", ptr);
|
FATAL("Unknown AFL_CC_COMPILER mode: %s\n", ptr);
|
||||||
@ -774,22 +758,14 @@ void compiler_mode_by_cmdline(aflcc_state_t *aflcc, int argc, char **argv) {
|
|||||||
|
|
||||||
aflcc->compiler_mode = GCC_PLUGIN;
|
aflcc->compiler_mode = GCC_PLUGIN;
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
|
|
||||||
} else if (strcasecmp(ptr, "GCC") == 0) {
|
} else if (strcasecmp(ptr, "GCC") == 0) {
|
||||||
|
|
||||||
aflcc->compiler_mode = GCC;
|
aflcc->compiler_mode = GCC;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
|
|
||||||
} else if (strncasecmp(ptr, "CLANG", 5) == 0) {
|
} else if (strncasecmp(ptr, "CLANG", 5) == 0) {
|
||||||
|
|
||||||
aflcc->compiler_mode = CLANG;
|
aflcc->compiler_mode = CLANG;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
||||||
FATAL("Unknown --afl-... compiler mode: %s\n", argv[i]);
|
FATAL("Unknown --afl-... compiler mode: %s\n", argv[i]);
|
||||||
@ -960,7 +936,6 @@ static void instrument_mode_new_environ(aflcc_state_t *aflcc) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
if (strcasecmp(ptr2, "gcc") == 0) {
|
if (strcasecmp(ptr2, "gcc") == 0) {
|
||||||
|
|
||||||
if (!aflcc->instrument_mode || aflcc->instrument_mode == INSTRUMENT_GCC)
|
if (!aflcc->instrument_mode || aflcc->instrument_mode == INSTRUMENT_GCC)
|
||||||
@ -975,9 +950,6 @@ static void instrument_mode_new_environ(aflcc_state_t *aflcc) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__x86_64__)
|
|
||||||
if (strcasecmp(ptr2, "clang") == 0) {
|
if (strcasecmp(ptr2, "clang") == 0) {
|
||||||
|
|
||||||
if (!aflcc->instrument_mode || aflcc->instrument_mode == INSTRUMENT_CLANG)
|
if (!aflcc->instrument_mode || aflcc->instrument_mode == INSTRUMENT_CLANG)
|
||||||
@ -992,8 +964,6 @@ static void instrument_mode_new_environ(aflcc_state_t *aflcc) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (strncasecmp(ptr2, "ctx-", strlen("ctx-")) == 0 ||
|
if (strncasecmp(ptr2, "ctx-", strlen("ctx-")) == 0 ||
|
||||||
strncasecmp(ptr2, "kctx-", strlen("c-ctx-")) == 0 ||
|
strncasecmp(ptr2, "kctx-", strlen("c-ctx-")) == 0 ||
|
||||||
strncasecmp(ptr2, "k-ctx-", strlen("k-ctx-")) == 0) {
|
strncasecmp(ptr2, "k-ctx-", strlen("k-ctx-")) == 0) {
|
||||||
|
Reference in New Issue
Block a user