diff options
author | van Hauser <vh@thc.org> | 2021-11-03 21:55:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 21:55:21 +0100 |
commit | f5535e348d37460daa4c6ea43063b451aa83d9cc (patch) | |
tree | 2339a99aa53f604cbe77b0dc88882f29ec9a6bf6 /src/afl-cc.c | |
parent | 25c947cd5ae93cb865081f9259255b4fdb3ca3ba (diff) | |
parent | 9278f27d749bcf0852ba2629caa319375c9a60e4 (diff) | |
download | afl++-f5535e348d37460daa4c6ea43063b451aa83d9cc.tar.gz |
Merge pull request #1142 from AFLplusplus/dev
Dev
Diffstat (limited to 'src/afl-cc.c')
-rw-r--r-- | src/afl-cc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c index e49addc4..e7f08aac 100644 --- a/src/afl-cc.c +++ b/src/afl-cc.c @@ -423,6 +423,8 @@ static void edit_params(u32 argc, char **argv, char **envp) { char *fplugin_arg = alloc_printf("-fplugin=%s/afl-gcc-pass.so", obj_path); cc_params[cc_par_cnt++] = fplugin_arg; + cc_params[cc_par_cnt++] = "-fno-if-conversion"; + cc_params[cc_par_cnt++] = "-fno-if-conversion2"; } @@ -735,6 +737,14 @@ static void edit_params(u32 argc, char **argv, char **envp) { } + if ((compiler_mode == GCC || compiler_mode == GCC_PLUGIN) && + !strncmp(cur, "-stdlib=", 8)) { + + if (!be_quiet) { WARNF("Found '%s' - stripping!", cur); } + continue; + + } + if ((!strncmp(cur, "-fsanitize=fuzzer-", strlen("-fsanitize=fuzzer-")) || !strncmp(cur, "-fsanitize-coverage", strlen("-fsanitize-coverage"))) && (strncmp(cur, "sanitize-coverage-allow", @@ -1007,7 +1017,11 @@ static void edit_params(u32 argc, char **argv, char **envp) { } // prevent unnecessary build errors - cc_params[cc_par_cnt++] = "-Wno-unused-command-line-argument"; + if (compiler_mode != GCC_PLUGIN && compiler_mode != GCC) { + + cc_params[cc_par_cnt++] = "-Wno-unused-command-line-argument"; + + } if (preprocessor_only || have_c) { |