summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-09-28 22:28:16 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-09-28 22:28:16 +0200
commite07daecbd4eab1c74726202e4bd0405f60fe354d (patch)
tree6af4fb033f7ce654e2d7b0534e0a26d263da3020
parent9cffdc692054fd0b3434d851aaefacf7e207efc5 (diff)
parentad8f790052c0ae97c6f5fd669fad7a0a0594b7b7 (diff)
downloadccache-e07daecbd4eab1c74726202e4bd0405f60fe354d.tar.gz
Merge branch '3.2-maint' into 3.3-maint
* 3.2-maint: Prepare for v3.2.9 Disable direct mode for "-Wp," with multiple preprocessor options
-rw-r--r--NEWS.txt16
-rw-r--r--ccache.c11
2 files changed, 25 insertions, 2 deletions
diff --git a/NEWS.txt b/NEWS.txt
index c33cd1c2..8d12214a 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -11,6 +11,10 @@ Bug fixes
dependency files when compiling identical source code but with different
source paths.
+- Fixed a regression in ccache 3.3.1: ccache could get confused when using the
+ compiler option `-Wp,` to pass multiple options to the preprocessor,
+ resulting in missing dependency files from direct mode cache hits.
+
ccache 3.3.1
------------
@@ -122,6 +126,18 @@ Bug fixes
- Fixed build and test for MinGW32 and Windows.
+ccache 3.2.9
+----------------
+Release date: 2016-09-28
+
+Bug fixes
+~~~~~~~~~
+
+- Fixed a regression in ccache 3.2.8: ccache could get confused when using the
+ compiler option `-Wp,` to pass multiple options to the preprocessor,
+ resulting in missing dependency files from direct mode cache hits.
+
+
ccache 3.2.8
------------
Release date: 2016-09-07
diff --git a/ccache.c b/ccache.c
index d91ecc3c..c4070ade 100644
--- a/ccache.c
+++ b/ccache.c
@@ -2445,8 +2445,15 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
// Treat it like -D.
args_add(cpp_args, argv[i] + 4);
continue;
- } else if (str_startswith(argv[i], "-Wp,-M")) {
- // -MF, -MP, -MQ, -MT, etc. TODO: Make argument to MF/MQ/MT relative.
+ } else if (str_eq(argv[i], "-Wp,-MP")
+ || (strlen(argv[i]) > 8
+ && str_startswith(argv[i], "-Wp,-M")
+ && argv[i][7] == ','
+ && (argv[i][6] == 'F'
+ || argv[i][6] == 'Q'
+ || argv[i][6] == 'T')
+ && !strchr(argv[i] + 8, ','))) {
+ // TODO: Make argument to MF/MQ/MT relative.
args_add(dep_args, argv[i]);
continue;
} else if (conf->direct_mode) {