From 092ef6150fff663eb94cc44412a5190da8b6fd4f Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Fri, 24 Jul 2020 20:18:22 +0200 Subject: [PATCH] Look for the correct phrase when detecting unsupported GCC color option MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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). --- src/ccache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.47.3