From: Anders Björklund Date: Sun, 30 Oct 2016 21:22:27 +0000 (+0100) Subject: Allow the pump wrapper from distcc to use stdout X-Git-Tag: v3.4~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6f506433bb7d4556fe0cf76b93e1501e5cd724d;p=thirdparty%2Fccache.git Allow the pump wrapper from distcc to use stdout The shell wrapper for "distcc-pump" outputs some useless progress information to stdout. Let it do that without failing the compile. --- diff --git a/ccache.c b/ccache.c index 9fbbdd7d4..a5adea8a4 100644 --- a/ccache.c +++ b/ccache.c @@ -1069,6 +1069,15 @@ void update_manifest_file(void) } } +static bool +compiler_is_pump(struct args *args) +{ + char *name = basename(args->argv[0]); + bool result = str_eq(name, "pump") || str_eq(name, "distcc-pump"); + free(name); + return result; +} + // Run the real compiler and put the result in cache. static void to_cache(struct args *args) @@ -1160,7 +1169,8 @@ to_cache(struct args *args) } failed(); } - if (st.st_size != 0) { + // distcc-pump outputs lines like "__________Using # distcc servers in pump mode" + if (st.st_size != 0 && !compiler_is_pump(args)) { cc_log("Compiler produced stdout"); stats_update(STATS_STDOUT); tmp_unlink(tmp_stdout);