]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
added CCACHE_HASHDIR option
authorAndrew Tridgell <tridge@samba.org>
Tue, 7 Jan 2003 05:39:37 +0000 (06:39 +0100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 7 Jan 2003 05:39:37 +0000 (06:39 +0100)
updated ready for 2.0 release

ccache.1
ccache.h
ccache.yo
util.c
web/ccache-man.html
web/index.html

index aafb3bba018d4ac3b27ce22e868be6bd0801c85c..8bada69e15fb6a6b5e0c23c21b3b7d53f2b820bf 100644 (file)
--- a/ccache.1
+++ b/ccache.1
@@ -179,6 +179,17 @@ This forces ccache to not use any cached
 results, even if it finds them\&. New results are still cached, but
 existing cache entries are ignored\&.
 .IP 
+.IP "\fBCCACHE_HASHDIR\fP" 
+This tells ccache to hash the current working
+directory when calculating the hash that is used to distinguish two
+compiles\&. This prevents a problem with the storage of the current
+working directory in the debug info of a object file, which can lead
+ccache to give a cached object file that has the working directory in
+the debug info set incorrectly\&. This option is off by default as the
+incorrect setting of this debug info rarely causes problems\&. If you
+strike problems with gdb not using the correct directory then enable
+this option\&.
+.IP 
 .IP "\fBCCACHE_UNIFY\fP" 
 If you set the environment variable CCACHE_UNIFY
 then ccache will use the C/C++ unifier when hashing the pre-processor
index f90505d054894294941b8f1a993997efe8c04f1b..1fbd9a2f72ea11d8b0e9bf1a7766997c2950405e 100644 (file)
--- a/ccache.h
+++ b/ccache.h
@@ -89,6 +89,7 @@ int lock_fd(int fd);
 size_t file_size(struct stat *st);
 int safe_open(const char *fname);
 char *x_realpath(const char *path);
+char *gnu_getcwd(void);
 
 void stats_update(enum stats stat);
 void stats_zero(void);
index 7b1731e6aeee1edcd768e0340442cf1c52553bc0..e9ee7499913679632d411c1c6c6bdebee9fd1445 100644 (file)
--- a/ccache.yo
+++ b/ccache.yo
@@ -152,6 +152,16 @@ dit(bf(CCACHE_RECACHE)) This forces ccache to not use any cached
 results, even if it finds them. New results are still cached, but
 existing cache entries are ignored.
 
+dit(bf(CCACHE_HASHDIR)) This tells ccache to hash the current working
+directory when calculating the hash that is used to distinguish two
+compiles. This prevents a problem with the storage of the current
+working directory in the debug info of a object file, which can lead
+ccache to give a cached object file that has the working directory in
+the debug info set incorrectly. This option is off by default as the
+incorrect setting of this debug info rarely causes problems. If you
+strike problems with gdb not using the correct directory then enable
+this option.
+
 dit(bf(CCACHE_UNIFY)) If you set the environment variable CCACHE_UNIFY
 then ccache will use the C/C++ unifier when hashing the pre-processor
 output if -g is not used in the compile. The unifier is slower than a
diff --git a/util.c b/util.c
index c42a792878b7fccc2faf40659315f08210b7a877..7e4c240b1cf3d4d6e8c9788d1f62dd89b337e651 100644 (file)
--- a/util.c
+++ b/util.c
@@ -343,3 +343,21 @@ char *x_realpath(const char *path)
        free(ret);
        return NULL;
 }
+
+/* a getcwd that will returns an allocated buffer */
+char *gnu_getcwd(void)
+{
+       unsigned size = 128;
+
+       while (1) {
+               char *buffer = (char *)x_malloc(size);
+               if (getcwd(buffer, size) == buffer) {
+                       return buffer;
+               }
+               free(buffer);
+               if (errno != ERANGE) {
+                       return 0;
+               }
+               size *= 2;
+       }
+}
index 27d73d7c0fcc671214f63ec3736293bdb6084bb0..c80dea509867ee3176efc476d0928a0d1d32a40c 100644 (file)
@@ -143,6 +143,15 @@ the same compilation in a different directory.
 <p><p></p><dt><strong><strong>CCACHE_RECACHE</strong></strong><dd> This forces ccache to not use any cached
 results, even if it finds them. New results are still cached, but
 existing cache entries are ignored.
+<p><p></p><dt><strong><strong>CCACHE_HASHDIR</strong></strong><dd> This tells ccache to hash the current working
+directory when calculating the hash that is used to distinguish two
+compiles. This prevents a problem with the storage of the current
+working directory in the debug info of a object file, which can lead
+ccache to give a cached object file that has the working directory in
+the debug info set incorrectly. This option is off by default as the
+incorrect setting of this debug info rarely causes problems. If you
+strike problems with gdb not using the correct directory then enable
+this option.
 <p><p></p><dt><strong><strong>CCACHE_UNIFY</strong></strong><dd> If you set the environment variable CCACHE_UNIFY
 then ccache will use the C/C++ unifier when hashing the pre-processor
 output if -g is not used in the compile. The unifier is slower than a
index f6d9a74fe71fc04cbe527b645882a0b463ead7ff..6c76ee22eb19d2499bdd82e061ca842cd6b7bf34 100644 (file)
@@ -18,12 +18,26 @@ in C with more features and better performance.<p>
 
 <h2>Latest release</h2>
 
-The latest release is ccache 1.9. This release adds:
+The latest release is ccache 2.0. This release adds:
 
 <ul>
-<li>fixed cpp warning output in CPP2 optimisation
+<li>minor Makefile install fixes
+<li>fixed some compilation warnings
+<li>added -C option for 'clear cache completely'
+<li>added CCACHE_CC option
+<li>added CCACHE_RECACHE option
+<li>added CCACHE_EXTENSION option
+<li>added CCACHE_HASHDIR option
+<li>embed the hostname in temporary file names for NFS sharing
+<li>better handling of the various -M compiler options
+<li>handle attempts to compile to stdout
+<li>set default max cache size to 1GB
+<li>better signal handling
 </ul>
 
+See the <a href="/ccache/ccache-man.html">manual page</a> for details
+on the new options.
+
 You can get this release from the <a href="/ftp/ccache/">download directory</a> 
 
 <h2>Why bother?</h2>