<body class="article">\r
<div id="header">\r
<h1>ccache authors</h1>\r
-<span id="revnumber">version 3.1.8</span>\r
+<span id="revnumber">version 3.1.9</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div class="ulist"><ul>\r
<li>\r
<p>\r
+Alfred Landrum <<a href="mailto:alfred.landrum@riverbed.com">alfred.landrum@riverbed.com</a>>\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
Andrea Bittau <<a href="mailto:a.bittau@cs.ucl.ac.uk">a.bittau@cs.ucl.ac.uk</a>>\r
</p>\r
</li>\r
<li>\r
<p>\r
+Andrew Stubbs <<a href="mailto:ams@codesourcery.com">ams@codesourcery.com</a>>\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
Andrew Tridgell <<a href="mailto:tridge@samba.org">tridge@samba.org</a>>\r
</p>\r
</li>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.8<br />\r
-Last updated 2012-08-11 10:57:17 CEST\r
+Version 3.1.9<br />\r
+Last updated 2013-01-06 17:56:05 CET\r
</div>\r
</div>\r
</body>\r
ccache is a collective work with contributions from many people, including:
+* Alfred Landrum <alfred.landrum@riverbed.com>
* Andrea Bittau <a.bittau@cs.ucl.ac.uk>
+* Andrew Stubbs <ams@codesourcery.com>
* Andrew Tridgell <tridge@samba.org>
* Bernhard Bauer <bauerb@google.com>
* Björn Jacke <bj@sernet.de>
<body class="article">\r
<div id="header">\r
<h1>ccache installation</h1>\r
-<span id="revnumber">version 3.1.8</span>\r
+<span id="revnumber">version 3.1.9</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.8<br />\r
-Last updated 2012-01-09 20:53:18 CET\r
+Version 3.1.9<br />\r
+Last updated 2012-11-07 19:42:42 CET\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>ccache copyright and license</h1>\r
-<span id="revnumber">version 3.1.8</span>\r
+<span id="revnumber">version 3.1.9</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.8<br />\r
-Last updated 2012-08-11 10:57:17 CEST\r
+Version 3.1.9<br />\r
+Last updated 2013-01-06 17:46:13 CET\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>CCACHE(1)</h1>\r
-<span id="revnumber">version 3.1.8</span>\r
+<span id="revnumber">version 3.1.9</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.8<br />\r
-Last updated 2012-08-11 10:57:17 CEST\r
+Version 3.1.9<br />\r
+Last updated 2013-01-06 17:46:13 CET\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>ccache news</h1>\r
-<span id="revnumber">version 3.1.8</span>\r
+<span id="revnumber">version 3.1.9</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>\r
<div id="content">\r
<div class="sect1">\r
+<h2 id="_ccache_3_1_9">ccache 3.1.9</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>Release date: 2013-01-06</p></div>\r
+<div class="sect2">\r
+<h3 id="_bug_fixes">Bug fixes</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+The EAGAIN signal is now handled correctly when emitting cached stderr\r
+ output. This fixes a problem triggered by large error outputs from the\r
+ compiler.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Subdirectories in the cache are no longer created in read-only mode.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Fixed so that ccache’s log file descriptor is not made available to the\r
+ compiler.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Improved error reporting when failing to create temporary stdout/stderr\r
+ files when executing the compiler.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Disappearing temporary stdout/stderr files are now handled gracefully.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_other">Other</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Fixed test suite to work on ecryptfs.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
<h2 id="_ccache_3_1_8">ccache 3.1.8</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2012-08-11</p></div>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes">Bug fixes</h3>\r
+<h3 id="_bug_fixes_2">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_other">Other</h3>\r
+<h3 id="_other_2">Other</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2012-01-08</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_2">Bug fixes</h3>\r
+<h3 id="_bug_fixes_3">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_other_2">Other</h3>\r
+<h3 id="_other_3">Other</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_3">Bug fixes</h3>\r
+<h3 id="_bug_fixes_4">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_4">Bug fixes</h3>\r
+<h3 id="_bug_fixes_5">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2011-01-09</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_5">Bug fixes</h3>\r
+<h3 id="_bug_fixes_6">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-28</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_6">Bug fixes</h3>\r
+<h3 id="_bug_fixes_7">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_other_3">Other</h3>\r
+<h3 id="_other_4">Other</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-21</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_7">Bug fixes</h3>\r
+<h3 id="_bug_fixes_8">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_other_4">Other</h3>\r
+<h3 id="_other_5">Other</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-07</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_8">Bug fixes</h3>\r
+<h3 id="_bug_fixes_9">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_other_5">Other</h3>\r
+<h3 id="_other_6">Other</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_9">Bug fixes</h3>\r
+<h3 id="_bug_fixes_10">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_other_6">Other</h3>\r
+<h3 id="_other_7">Other</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-07-15</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_10">Bug fixes</h3>\r
+<h3 id="_bug_fixes_11">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_11">Bug fixes</h3>\r
+<h3 id="_bug_fixes_12">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.8<br />\r
-Last updated 2012-08-11 10:57:17 CEST\r
+Version 3.1.9<br />\r
+Last updated 2013-01-06 17:55:15 CET\r
</div>\r
</div>\r
</body>\r
===========
+ccache 3.1.9
+------------
+Release date: 2013-01-06
+
+
+Bug fixes
+~~~~~~~~~
+
+ - The EAGAIN signal is now handled correctly when emitting cached stderr
+ output. This fixes a problem triggered by large error outputs from the
+ compiler.
+ - Subdirectories in the cache are no longer created in read-only mode.
+ - Fixed so that ccache's log file descriptor is not made available to the
+ compiler.
+ - Improved error reporting when failing to create temporary stdout/stderr
+ files when executing the compiler.
+ - Disappearing temporary stdout/stderr files are now handled gracefully.
+
+
+Other
+~~~~~
+
+ - Fixed test suite to work on ecryptfs.
+
+
ccache 3.1.8
------------
Release date: 2012-08-11
<body class="article">\r
<div id="header">\r
<h1>ccache README</h1>\r
-<span id="revnumber">version 3.1.8</span>\r
+<span id="revnumber">version 3.1.9</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.8<br />\r
-Last updated 2012-01-09 20:53:18 CET\r
+Version 3.1.9<br />\r
+Last updated 2012-11-07 19:42:42 CET\r
</div>\r
</div>\r
</body>\r
.\" Title: ccache
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
-.\" Date: 08/11/2012
+.\" Date: 01/06/2013
.\" Manual: ccache Manual
-.\" Source: ccache 3.1.8
+.\" Source: ccache 3.1.9
.\" Language: English
.\"
-.TH "CCACHE" "1" "08/11/2012" "ccache 3\&.1\&.8" "ccache Manual"
+.TH "CCACHE" "1" "01/06/2013" "ccache 3\&.1\&.9" "ccache Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
* ccache -- a fast C/C++ compiler cache
*
* Copyright (C) 2002-2007 Andrew Tridgell
- * Copyright (C) 2009-2012 Joel Rosdahl
+ * Copyright (C) 2009-2013 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
char *p = format("%s/%c", path, name[i]);
free(path);
path = p;
- if (create_dir(path) != 0) {
+ if (!getenv("CCACHE_READONLY") && create_dir(path) != 0) {
fatal("Failed to create %s: %s", path, strerror(errno));
}
}
args_pop(args, 3);
if (stat(tmp_stdout, &st) != 0) {
- fatal("Could not create %s (permission denied?)", tmp_stdout);
+ /* The stdout file was removed - cleanup in progress? Better bail out. */
+ cc_log("%s not found: %s", tmp_stdout, strerror(errno));
+ stats_update(STATS_MISSING);
+ tmp_unlink(tmp_stdout);
+ tmp_unlink(tmp_stderr);
+ tmp_unlink(tmp_obj);
+ failed();
}
if (st.st_size != 0) {
cc_log("Compiler produced stdout");
#include "ccache.h"
+/* Let's hope no compiler uses these exit statuses. */
+#define FAILED_TO_CREATE_STDOUT 212
+#define FAILED_TO_CREATE_STDERR 213
+
static char *
find_executable_in_path(const char *name, const char *exclude_name, char *path);
tmp_unlink(path_stdout);
fd = open(path_stdout, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666);
if (fd == -1) {
- exit(1);
+ cc_log("Error creating %s: %s", path_stdout, strerror(errno));
+ exit(FAILED_TO_CREATE_STDOUT);
}
dup2(fd, 1);
close(fd);
tmp_unlink(path_stderr);
fd = open(path_stderr, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666);
if (fd == -1) {
- exit(1);
+ cc_log("Error creating %s: %s", path_stderr, strerror(errno));
+ exit(FAILED_TO_CREATE_STDERR);
}
dup2(fd, 2);
close(fd);
return -1;
}
+ if (status == FAILED_TO_CREATE_STDOUT) {
+ fatal("Could not create %s (permission denied?)", path_stdout);
+ } else if (status == FAILED_TO_CREATE_STDERR) {
+ fatal("Could not create %s (permission denied?)", path_stderr);
+ }
+
return WEXITSTATUS(status);
}
#endif
link_suite() {
if [ `dirname $COMPILER` = . ]; then
- ln -s ../ccache $COMPILER
+ ln -s "$CCACHE" $COMPILER
CCACHE_COMPILE="./$COMPILER"
base_tests
else
# Make the cache readonly
# Check that readonly mode finds the result.
testname="cache hit"
- rm -f test.o
+ rm -f test.o test2.o
chmod -R a-w $CCACHE_DIR
- CCACHE_READONLY=1 CCACHE_TEMPDIR=/tmp CCACHE_PREFIX=false $CCACHE $COMPILER -c test.c -o test.o
- status=$?
+ CCACHE_READONLY=1 CCACHE_TEMPDIR=/tmp CCACHE_PREFIX=false $CCACHE $COMPILER -c test.c -o test.o >/dev/null 2>&1
+ status1=$?
+ # Check that fallback to the real compiler works for a cache miss.
+ CCACHE_READONLY=1 CCACHE_TEMPDIR=/tmp $CCACHE $COMPILER -c test2.c -o test2.o >/dev/null 2>&1
+ status2=$?
chmod -R a+w $CCACHE_DIR
- if [ $status -ne 0 ]; then
+ if [ $status1 -ne 0 ]; then
test_failed "failure when compiling test.c readonly"
fi
+ if [ $status2 -ne 0 ]; then
+ test_failed "failure when compiling test2.c readonly"
+ fi
if [ ! -f test.o ]; then
test_failed "test.o missing"
fi
+ if [ ! -f test2.o ]; then
+ test_failed "test2.o missing"
+ fi
# Check that readonly mode doesn't try to store new results.
testname="cache miss"
fi
done
+ # Warning: this test is known to fail on filesystems that have
+ # unusual block sizes, including ecryptfs. The workaround is
+ # to place the test directory elsewhere:
+ # cd /tmp
+ # CCACHE=$DIR/ccache $DIR/test.sh
testname="forced cleanup, size limit"
$CCACHE -C >/dev/null
prepare_cleanup_test $CCACHE_DIR/a
/*
* Copyright (C) 2002 Andrew Tridgell
- * Copyright (C) 2009-2012 Joel Rosdahl
+ * Copyright (C) 2009-2013 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
}
logfile = fopen(cache_logfile, "a");
if (logfile) {
+ int fd = fileno(logfile);
+ int flags = fcntl(fd, F_GETFD, 0);
+ if (flags >= 0) {
+ fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
+ }
return true;
} else {
return false;
ssize_t count, written = 0;
do {
count = write(fd_out, buf + written, n - written);
- if (count == -1 && errno != EINTR) {
- fatal("Failed to copy fd");
+ if (count == -1) {
+ if (errno != EAGAIN && errno != EINTR) {
+ fatal("Failed to copy fd");
+ }
+ } else {
+ written += count;
}
- written += count;
} while (written < n);
}
* file. We don't care if the temp file is trashed, so it's always safe to
* unlink it first.
*/
- char* tmp_name = format("%s.%s.rmXXXXXX", path, tmp_string());
+ char *tmp_name = format("%s.tmp.rm.%s", path, tmp_string());
int result = 0;
cc_log("Unlink %s via %s", path, tmp_name);
if (x_rename(path, tmp_name) == -1) {
-const char CCACHE_VERSION[] = "3.1.8";
+const char CCACHE_VERSION[] = "3.1.9";