From: Joel Rosdahl Date: Sun, 9 May 2010 18:02:37 +0000 (+0200) Subject: Improve compiler detection error message X-Git-Tag: v3.0pre1~15 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3314ffe5521c4154a9ce8b8dc567258eff02442;p=thirdparty%2Fccache.git Improve compiler detection error message --- diff --git a/ccache.c b/ccache.c index fe229814f..fbc8555ca 100644 --- a/ccache.c +++ b/ccache.c @@ -1138,6 +1138,7 @@ static void find_compiler(int argc, char **argv) { char *base; char *path; + char *compiler; orig_args = args_init(argc, argv); @@ -1159,14 +1160,14 @@ static void find_compiler(int argc, char **argv) base = strdup(path); } - orig_args->argv[0] = find_executable(base, MYNAME); + compiler = find_executable(base, MYNAME); /* can't find the compiler! */ - if (!orig_args->argv[0]) { + if (!compiler) { stats_update(STATS_COMPILER); - perror(base); - exit(1); + fatal("Could not find compiler \"%s\" in PATH", base); } + orig_args->argv[0] = compiler; }