]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use hash_compiler for explicit --specs= options as well
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 5 Jan 2012 14:49:26 +0000 (15:49 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 5 Jan 2012 14:49:26 +0000 (15:49 +0100)
ccache.c

index 8b9b5f3906015deca2248a9c54dfea5fe301e350..cd9d08c0928c00bbd8b4d4d5fbb844f027abbdcc 100644 (file)
--- 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;
                }