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
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);
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
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;
+ }
+}
<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
<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>