diff --git a/NEWS b/NEWS index b4e1cbe..937e07c 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 970d7c9..8834938 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; }