From: Joel Rosdahl Date: Wed, 8 Jan 2014 19:29:33 +0000 (+0100) Subject: Don't hash compiler option -fdebug-prefix-map= X-Git-Tag: v3.1.10~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc2a53afb44cb083b64d3e6ef46a42d5ebabe4e0;p=thirdparty%2Fccache.git Don't hash compiler option -fdebug-prefix-map= The -fdebug-prefix-map option may be used in combination with CCACHE_BASEDIR to reuse results across different directories. Based on a patch by Pawel Sikora. --- diff --git a/ccache.c b/ccache.c index 73d86eda9..6069584a6 100644 --- a/ccache.c +++ b/ccache.c @@ -2,7 +2,7 @@ * ccache -- a fast C/C++ compiler cache * * Copyright (C) 2002-2007 Andrew Tridgell - * Copyright (C) 2009-2013 Joel Rosdahl + * Copyright (C) 2009-2014 Joel Rosdahl * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -971,6 +971,13 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode) continue; } + /* The -fdebug-prefix-map option may be used in combination with + CCACHE_BASEDIR to reuse results across different directories. Skip it + from hashing. */ + if (str_startswith(args->argv[i], "-fdebug-prefix-map=")) { + 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