apple fixes

This commit is contained in:
vanhauser-thc
2024-01-19 15:51:57 +01:00
parent de561b730a
commit ab0823cd3b

View File

@ -611,26 +611,18 @@ void compiler_mode_by_callname(aflcc_state_t *aflcc) {
aflcc->compiler_mode = GCC_PLUGIN;
#if defined(__x86_64__)
} else if (strncmp(aflcc->callname, "afl-gcc", 7) == 0 ||
strncmp(aflcc->callname, "afl-g++", 7) == 0) {
aflcc->compiler_mode = GCC;
#endif
#if defined(__x86_64__)
} else if (strcmp(aflcc->callname, "afl-clang") == 0 ||
strcmp(aflcc->callname, "afl-clang++") == 0) {
aflcc->compiler_mode = CLANG;
#endif
}
}
@ -675,22 +667,14 @@ void compiler_mode_by_environ(aflcc_state_t *aflcc) {
aflcc->compiler_mode = GCC_PLUGIN;
#if defined(__x86_64__)
} else if (strcasecmp(ptr, "GCC") == 0) {
aflcc->compiler_mode = GCC;
#endif
#if defined(__x86_64__)
} else if (strcasecmp(ptr, "CLANG") == 0) {
aflcc->compiler_mode = CLANG;
#endif
} else
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;
#if defined(__x86_64__)
} else if (strcasecmp(ptr, "GCC") == 0) {
aflcc->compiler_mode = GCC;
#endif
#if defined(__x86_64__)
} else if (strncasecmp(ptr, "CLANG", 5) == 0) {
aflcc->compiler_mode = CLANG;
#endif
} else
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 (!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 (!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 ||
strncasecmp(ptr2, "kctx-", strlen("c-ctx-")) == 0 ||
strncasecmp(ptr2, "k-ctx-", strlen("k-ctx-")) == 0) {