ports/devel/ccache/files/patch-ccache.c
Alex Dupre 4fbf6452a6 - Add CCACHE_CACHE_COMPILER patch
- Improve examples
- Add two new scripts to enhance buildworld/buildkernel

ccache may now be used safely and effectively to build the FreeBSD source tree.
Follow the pkg-message tips to exploit it.

Approved by:	maintainer
2006-03-21 15:06:15 +00:00

17 lines
466 B
C

--- ccache.c.orig 2004/09/13 10:19:06 1.96
+++ ccache.c 2005/11/24 21:54:09 1.98
@@ -331,8 +331,12 @@
hash_string(str_basename(args->argv[0]));
}
- hash_int(st.st_size);
- hash_int(st.st_mtime);
+ if (getenv("CCACHE_HASH_COMPILER")) {
+ hash_file(args->argv[0]);
+ } else if (!getenv("CCACHE_NOHASH_SIZE_MTIME")) {
+ hash_int(st.st_size);
+ hash_int(st.st_mtime);
+ }
/* possibly hash the current working directory */
if (getenv("CCACHE_HASHDIR")) {