tools/incdir: Assume GCC compatibility for unknown compilers

A use case:
    intercept-build --override-compiler make CC=intercept-cc
    cf. https://github.com/rizsotto/scan-build
This commit is contained in:
YAMAMOTO Takashi 2020-07-23 08:25:52 +09:00 committed by Xiang Xiao
parent ac34ac9f5c
commit 9f8d52830f
1 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,6 @@ static enum compiler_e get_compiler(char *ccname, enum os_e os)
if (strstr(ccname, "gcc") != NULL ||
strstr(ccname, "g++") != NULL ||
strcmp(ccname, "cc") == 0 ||
strncmp(ccname, "cc.", 3) == 0)
{
return COMPILER_GCC;
@ -204,8 +203,9 @@ static enum compiler_e get_compiler(char *ccname, enum os_e os)
}
else
{
fprintf(stderr, "ERROR: Unknown compiler: %s\n", ccname);
return COMPILER_UNKNOWN;
/* Unknown compiler. Assume GCC-compatible */
return COMPILER_GCC;
}
}