From: Joel Rosdahl Date: Sun, 9 May 2010 18:03:08 +0000 (+0200) Subject: Detect recursive execution of ccache due to misnamed ccache binary X-Git-Tag: v3.0pre1~14 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=24e6033df724ded801bcfc5ae72148dbb9c0d16b;p=thirdparty%2Fccache.git Detect recursive execution of ccache due to misnamed ccache binary --- diff --git a/ccache.c b/ccache.c index fbc8555ca..1c25f7247 100644 --- a/ccache.c +++ b/ccache.c @@ -1167,6 +1167,10 @@ static void find_compiler(int argc, char **argv) stats_update(STATS_COMPILER); fatal("Could not find compiler \"%s\" in PATH", base); } + if (strcmp(compiler, argv[0]) == 0) { + fatal("Recursive invocation (the name of the ccache binary" + " must be \"%s\")", MYNAME); + } orig_args->argv[0] = compiler; }