--- ccache.c.orig 2013-01-06 17:57:59.000000000 +0100 +++ ccache.c 2013-10-18 10:35:32.266543168 +0200 @@ -942,6 +942,13 @@ calculate_object_hash(struct args *args, continue; } + if (str_startswith(args->argv[i], "-fdebug-prefix-map=")) { + /* The -fdebug-prefix-map may be used with CCACHE_BASEDIR to reuse + compilation objects across multiple branches compiled in different + directories. Skip it from hashing. */ + continue; + } + /* When using the preprocessor, some arguments don't contribute to the hash. The theory is that these arguments will change the output of -E if they are going to have any effect at