]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Don't compile preprocessed source code when using -g3
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 4 Mar 2010 20:39:34 +0000 (21:39 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 4 Mar 2010 20:39:34 +0000 (21:39 +0100)
This fixes bug #7190.

NEWS
ccache.c

diff --git a/NEWS b/NEWS
index b4e1cbe896afcc97b30679aa7edc845f754a4664..937e07c43113ae422500db50130f5da7bfc23e25 100644 (file)
--- 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.
index 970d7c96fcfcf769a808c07130755574796c0c59..883493801ae1d74ed4f2e8af90abc5c7a3ef34b3 100644 (file)
--- 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;
                }