From: Joel Rosdahl Date: Thu, 5 Jan 2012 14:49:26 +0000 (+0100) Subject: Use hash_compiler for explicit --specs= options as well X-Git-Tag: v3.1.7~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bb275a22bf9cbfe3d18db6eb86a1bc8524810f8;p=thirdparty%2Fccache.git Use hash_compiler for explicit --specs= options as well --- diff --git a/ccache.c b/ccache.c index 8b9b5f390..cd9d08c09 100644 --- a/ccache.c +++ b/ccache.c @@ -927,14 +927,12 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode) } } - if (str_startswith(args->argv[i], "--specs=") && - stat(args->argv[i] + 8, &st) == 0) { - /* If given a explicit specs file, then hash that file, + if (str_startswith(args->argv[i], "--specs=") + && stat(args->argv[i] + 8, &st) == 0) { + /* If given an explicit specs file, then hash that file, but don't include the path to it in the hash. */ hash_delimiter(hash, "specs"); - if (!hash_file(hash, args->argv[i] + 8)) { - failed(); - } + hash_compiler(hash, &st, args->argv[i] + 8, false); continue; }