From: Joel Rosdahl Date: Thu, 4 Mar 2010 20:39:34 +0000 (+0100) Subject: Don't compile preprocessed source code when using -g3 X-Git-Tag: v3.0pre1~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=574ab5a9af08b0639d38b623b2fb7d882272db50;p=thirdparty%2Fccache.git Don't compile preprocessed source code when using -g3 This fixes bug #7190. --- diff --git a/NEWS b/NEWS index b4e1cbe89..937e07c43 100644 --- a/NEWS +++ b/NEWS @@ -98,6 +98,9 @@ Changes since ccache 2.4: - Added support for -Wp,-MD and -Wp,-MMD options. + - Debug information containing line numbers of predefined and command-line + macros (enabled with the compiler option -g3) will now be correct. + - Corrected LRU cleanup handling of object files. - utimes() is now used instead of utime() when available. diff --git a/ccache.c b/ccache.c index 970d7c96f..883493801 100644 --- a/ccache.c +++ b/ccache.c @@ -1248,6 +1248,13 @@ static void process_args(int argc, char **argv) if (strcmp(argv[i], "-g0") != 0) { enable_unify = 0; } + if (strcmp(argv[i], "-g3") == 0) { + /* + * Fix for bug 7190 ("commandline macros (-D) + * have non-zero lineno when using -g3"). + */ + compile_preprocessed_source_code = 0; + } continue; }