From: Joel Rosdahl Date: Fri, 24 Jul 2020 18:18:22 +0000 (+0200) Subject: Look for the correct phrase when detecting unsupported GCC color option X-Git-Tag: v4.0~303 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=092ef6150fff663eb94cc44412a5190da8b6fd4f;p=thirdparty%2Fccache.git Look for the correct phrase when detecting unsupported GCC color option The implementation from #596 uses the spelling “command-line” instead of “command line” (which is what is actually emitted by GCC and specified in #224). --- diff --git a/src/ccache.cpp b/src/ccache.cpp index f7f27ef3b..fa2c257b8 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -712,7 +712,7 @@ execute(Context& ctx, if (status != 0 && !ctx.diagnostics_color_failed && ctx.guessed_compiler == GuessedCompiler::gcc) { auto errors = Util::read_file(stderr_path); - if (errors.find("unrecognized command-line option") != std::string::npos + if (errors.find("unrecognized command line option") != std::string::npos && errors.find("-fdiagnostics-color") != std::string::npos) { // Old versions of GCC did not support colored diagnostics. cc_log("-fdiagnostics-color is unsupported; trying again without it");