From 9f8d52830ff3aceeb386491481a83333137d1013 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 23 Jul 2020 08:25:52 +0900 Subject: [PATCH] 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 --- tools/incdir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/incdir.c b/tools/incdir.c index 3737a0f83b..7d3c24ff29 100644 --- a/tools/incdir.c +++ b/tools/incdir.c @@ -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; } }