Strip -Wl,-no-undefined during compilation (#1952)

Make the compiler wrapper stripping `-Wl,-no-undefined` in addition to `-Wl,--no-undefined`.
Both versions of the flag are accepted by clang and, therefore, used by building systems in the wild (e.g., samba will not build without this fix).
This commit is contained in:
Nils Bars
2024-01-11 11:45:26 +01:00
committed by GitHub
parent 4e9c6050d0
commit 9d3c25ac81

View File

@ -1962,8 +1962,8 @@ param_st parse_linking_params(aflcc_state_t *aflcc, u8 *cur_argv, u8 scan,
}
} else if (!strcmp(cur_argv, "-Wl,-z,defs") ||
!strcmp(cur_argv, "-Wl,--no-undefined") ||
!strcmp(cur_argv, "-Wl,-no-undefined") ||
!strcmp(cur_argv, "--no-undefined") ||
strstr(cur_argv, "afl-compiler-rt") ||
strstr(cur_argv, "afl-llvm-rt")) {
@ -3030,4 +3030,3 @@ int main(int argc, char **argv, char **envp) {
return 0;
}