diff options
author | JinWang An <jinwang.an@samsung.com> | 2021-08-03 16:15:49 +0900 |
---|---|---|
committer | JinWang An <jinwang.an@samsung.com> | 2021-08-03 16:15:49 +0900 |
commit | 46d70c978f26cd1aa35e0dc158fd49fdc5a88686 (patch) | |
tree | 3a44d88606698b3ffdf2319860b4affbab360432 | |
parent | 78a414a1ef7c1819c98bdc8a28b05df7ad4cb2f9 (diff) | |
download | ccache-46d70c978f26cd1aa35e0dc158fd49fdc5a88686.tar.gz ccache-46d70c978f26cd1aa35e0dc158fd49fdc5a88686.tar.bz2 ccache-46d70c978f26cd1aa35e0dc158fd49fdc5a88686.zip |
Imported Upstream version 3.1.10upstream/3.1.10
-rw-r--r-- | AUTHORS.html | 59 | ||||
-rw-r--r-- | AUTHORS.txt | 5 | ||||
-rw-r--r-- | INSTALL.html | 50 | ||||
-rw-r--r-- | LICENSE.html | 76 | ||||
-rw-r--r-- | MANUAL.html | 76 | ||||
-rw-r--r-- | MANUAL.txt | 16 | ||||
-rw-r--r-- | NEWS.html | 510 | ||||
-rw-r--r-- | NEWS.txt | 534 | ||||
-rw-r--r-- | README.html | 52 | ||||
-rw-r--r-- | ccache.1 | 24 | ||||
-rw-r--r-- | ccache.c | 244 | ||||
-rw-r--r-- | ccache.h | 5 | ||||
-rw-r--r-- | compopt.c | 4 | ||||
-rwxr-xr-x | configure | 514 | ||||
-rw-r--r-- | execute.c | 52 | ||||
-rw-r--r-- | hashtable.c | 2 | ||||
-rw-r--r-- | manifest.c | 32 | ||||
-rw-r--r-- | stats.c | 14 | ||||
-rw-r--r-- | system.h | 5 | ||||
-rwxr-xr-x | test.sh | 108 | ||||
-rw-r--r-- | test/test_argument_processing.c | 19 | ||||
-rw-r--r-- | test/test_util.c | 6 | ||||
-rw-r--r-- | util.c | 36 | ||||
-rw-r--r-- | version.c | 2 |
24 files changed, 1415 insertions, 1030 deletions
diff --git a/AUTHORS.html b/AUTHORS.html index 1df9412..4585f50 100644 --- a/AUTHORS.html +++ b/AUTHORS.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>ccache authors</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p { ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content { }
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img { margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; } span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] { *
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody { @media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) { function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) { var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () { var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -736,7 +734,7 @@ asciidoc.install(2); <body class="article">
<div id="header">
<h1>ccache authors</h1>
-<span id="revnumber">version 3.1.9</span>
+<span id="revnumber">version 3.1.10</span>
<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> @@ -771,7 +769,7 @@ Andrew Tridgell <<a href="mailto:tridge@samba.org">tridge@samba.org</a>> </li>
<li>
<p>
-Bernhard Bauer <<a href="mailto:bauerb@google.com">bauerb@google.com</a>>
+Bernhard Bauer <<a href="mailto:bauerb@chromium.org">bauerb@chromium.org</a>>
</p>
</li>
<li>
@@ -841,6 +839,16 @@ Martin Pool <<a href="mailto:mbp@sourcefrog.net">mbp@sourcefrog.net</a>> </li>
<li>
<p>
+Michael Meeks <<a href="mailto:michael.meeks@suse.com">michael.meeks@suse.com</a>>
+</p>
+</li>
+<li>
+<p>
+Mike Frysinger <<a href="mailto:vapier@gentoo.org">vapier@gentoo.org</a>>
+</p>
+</li>
+<li>
+<p>
Owen Mann <<a href="mailto:owen@mann.org">owen@mann.org</a>>
</p>
</li>
@@ -894,6 +902,11 @@ William S Fulton <<a href="mailto:wsf@fultondesigns.co.uk">wsf@fultondesigns. Wilson Snyder <<a href="mailto:wsnyder@wsnyder.org">wsnyder@wsnyder.org</a>>
</p>
</li>
+<li>
+<p>
+Yiding Jia <<a href="mailto:yiding@fb.com">yiding@fb.com</a>>
+</p>
+</li>
</ul></div>
<div class="paragraph"><p>Thanks!</p></div>
</div>
@@ -902,8 +915,8 @@ Wilson Snyder <<a href="mailto:wsnyder@wsnyder.org">wsnyder@wsnyder.org</a>&g <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Version 3.1.9<br />
-Last updated 2013-01-06 17:56:05 CET
+Version 3.1.10<br />
+Last updated 2014-10-19 19:05:10 CEST
</div>
</div>
</body>
diff --git a/AUTHORS.txt b/AUTHORS.txt index c094277..7ce3afa 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -10,7 +10,7 @@ ccache is a collective work with contributions from many people, including: * Andrea Bittau <a.bittau@cs.ucl.ac.uk> * Andrew Stubbs <ams@codesourcery.com> * Andrew Tridgell <tridge@samba.org> -* Bernhard Bauer <bauerb@google.com> +* Bernhard Bauer <bauerb@chromium.org> * Björn Jacke <bj@sernet.de> * Bo Rydberg <bolry@hotmail.com> * Clemens Rabe <crabe@gmx.de> @@ -24,6 +24,8 @@ ccache is a collective work with contributions from many people, including: * Lars Gustäbel <lars@gustaebel.de> * Lubos Lunak <l.lunak@suse.cz> * Martin Pool <mbp@sourcefrog.net> +* Michael Meeks <michael.meeks@suse.com> +* Mike Frysinger <vapier@gentoo.org> * Owen Mann <owen@mann.org> * Patrick von Reth <vonreth@kde.org> * Paul Griffith <paulg@cse.yorku.ca> @@ -35,5 +37,6 @@ ccache is a collective work with contributions from many people, including: * Ville Skyttä <ville.skytta@iki.fi> * William S Fulton <wsf@fultondesigns.co.uk> * Wilson Snyder <wsnyder@wsnyder.org> +* Yiding Jia <yiding@fb.com> Thanks! diff --git a/INSTALL.html b/INSTALL.html index df37a57..f129d62 100644 --- a/INSTALL.html +++ b/INSTALL.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>ccache installation</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p { ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content { }
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img { margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; } span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] { *
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody { @media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) { function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) { var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () { var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -736,7 +734,7 @@ asciidoc.install(2); <body class="article">
<div id="header">
<h1>ccache installation</h1>
-<span id="revnumber">version 3.1.9</span>
+<span id="revnumber">version 3.1.10</span>
<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> @@ -771,9 +769,9 @@ zlib <a href="http://www.zlib.net">http://www.zlib.net</a> (if you don’t h <div class="paragraph"><p>To compile and install ccache, run these commands:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>./configure
+<pre><code>./configure
make
-make install</tt></pre>
+make install</code></pre>
</div></div>
<div class="paragraph"><p>You may set the installation directory and other parameters by options to
“./configure”. To see them, run “./configure --help”.</p></div>
@@ -787,11 +785,11 @@ path.</p></div> <div class="paragraph"><p>To install for the second method, do something like this:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>cp ccache /usr/local/bin/
+<pre><code>cp ccache /usr/local/bin/
ln -s ccache /usr/local/bin/gcc
ln -s ccache /usr/local/bin/g++
ln -s ccache /usr/local/bin/cc
-ln -s ccache /usr/local/bin/c++</tt></pre>
+ln -s ccache /usr/local/bin/c++</code></pre>
</div></div>
<div class="paragraph"><p>And so forth. This will work as long as “/usr/local/bin” comes before the
path to the compiler (which is usually in “/usr/bin”). After installing you
@@ -845,8 +843,8 @@ above.</p></div> <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Version 3.1.9<br />
-Last updated 2012-11-07 19:42:42 CET
+Version 3.1.10<br />
+Last updated 2014-10-19 19:02:09 CEST
</div>
</div>
</body>
diff --git a/LICENSE.html b/LICENSE.html index 71a3351..06a9df3 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>ccache copyright and license</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p { ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content { }
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img { margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; } span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] { *
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody { @media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) { function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) { var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () { var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -736,7 +734,7 @@ asciidoc.install(2); <body class="article">
<div id="header">
<h1>ccache copyright and license</h1>
-<span id="revnumber">version 3.1.9</span>
+<span id="revnumber">version 3.1.10</span>
<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> @@ -749,7 +747,7 @@ asciidoc.install(2); <div class="paragraph"><p>The license for ccache as a whole is as follows:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> This program is free software; you can redistribute it and/or modify it under
+<pre><code> 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 Software
Foundation; either version 3 of the License, or (at your option) any later
version.
@@ -760,7 +758,7 @@ asciidoc.install(2); You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
- Street, Fifth Floor, Boston, MA 02110-1301 USA</tt></pre>
+ Street, Fifth Floor, Boston, MA 02110-1301 USA</code></pre>
</div></div>
<div class="paragraph"><p>The full license text can be found in GPL-3.0.txt and at
<a href="http://www.gnu.org/licenses/gpl-3.0.html">http://www.gnu.org/licenses/gpl-3.0.html</a>.</p></div>
@@ -777,8 +775,8 @@ copyrights on their portions of the work.</p></div> <div class="paragraph"><p>The copyright for ccache as a whole is as follows:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> Copyright (C) 2002-2007 Andrew Tridgell
- Copyright (C) 2009-2011 Joel Rosdahl</tt></pre>
+<pre><code> Copyright (C) 2002-2007 Andrew Tridgell
+ Copyright (C) 2009-2011 Joel Rosdahl</code></pre>
</div></div>
</div>
</div>
@@ -792,11 +790,11 @@ the GPL: that is, if separated from the ccache sources, they may be usable under less restrictive terms.</p></div>
<div class="sect2">
<h3 id="_getopt_long_hc">getopt_long.[hc]</h3>
-<div class="paragraph"><p>This implementation of <tt>getopt_long()</tt> was copied from
+<div class="paragraph"><p>This implementation of <code>getopt_long()</code> was copied from
<a href="http://www.postgresql.org">PostgreSQL</a> and has the following license text:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> Portions Copyright (c) 1987, 1993, 1994
+<pre><code> Portions Copyright (c) 1987, 1993, 1994
The Regents of the University of California. All rights reserved.
Portions Copyright (c) 2003
@@ -824,7 +822,7 @@ under less restrictive terms.</p></div> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- SUCH DAMAGE.</tt></pre>
+ SUCH DAMAGE.</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -833,7 +831,7 @@ under less restrictive terms.</p></div> following license:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> Copyright (c) 2002, 2004, Christopher Clark
+<pre><code> Copyright (c) 2002, 2004, Christopher Clark
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -860,16 +858,16 @@ following license:</p></div> INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.</tt></pre>
+ POSSIBILITY OF SUCH DAMAGE.</code></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="_m4_feature_macros_m4">m4/feature_macros.m4</h3>
<div class="paragraph"><p>This Autoconf M4 snippet comes from <a href="http://www.python.org">Python</a> 2.6’s
-<tt>configure.in</tt> with the following license:</p></div>
+<code>configure.in</code> with the following license:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> A. HISTORY OF THE SOFTWARE
+<pre><code> A. HISTORY OF THE SOFTWARE
==========================
Python was created in the early 1990s by Guido van Rossum at Stichting
@@ -1142,7 +1140,7 @@ following license:</p></div> FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</tt></pre>
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -1152,11 +1150,11 @@ Appleby. See <a href="http://murmurhash.googlepages.com">http://murmurhash.googl </div>
<div class="sect2">
<h3 id="_snprintf_c_and_m4_snprintf_m4">snprintf.c and m4/snprintf.m4</h3>
-<div class="paragraph"><p>This implementation of <tt>snprintf()</tt> and similar functions was downloaded from
+<div class="paragraph"><p>This implementation of <code>snprintf()</code> and similar functions was downloaded from
<a href="http://www.jhweiss.de/software/snprintf.html">http://www.jhweiss.de/software/snprintf.html</a> and has the following license:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> Copyright (c) 1995 Patrick Powell.
+<pre><code> Copyright (c) 1995 Patrick Powell.
This code is based on code written by Patrick Powell <papowell@astart.com>.
It may be used for any purpose as long as this notice remains intact on all
@@ -1170,7 +1168,7 @@ Appleby. See <a href="http://murmurhash.googlepages.com">http://murmurhash.googl trivial code cleanups) would be sent back in order to let me include them in
the version available at <http://www.jhweiss.de/software/snprintf.html>.
However, this is not a requirement for using or redistributing (possibly
- modified) versions of this file, nor is leaving this notice intact mandatory.</tt></pre>
+ modified) versions of this file, nor is leaving this notice intact mandatory.</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -1179,7 +1177,7 @@ Appleby. See <a href="http://murmurhash.googlepages.com">http://murmurhash.googl following license:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+<pre><code> Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -1203,7 +1201,7 @@ following license:</p></div> The data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).</tt></pre>
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).</code></pre>
</div></div>
</div>
</div>
@@ -1212,8 +1210,8 @@ following license:</p></div> <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Version 3.1.9<br />
-Last updated 2013-01-06 17:46:13 CET
+Version 3.1.10<br />
+Last updated 2014-10-19 19:02:09 CEST
</div>
</div>
</body>
diff --git a/MANUAL.html b/MANUAL.html index be2c37e..494fd8a 100644 --- a/MANUAL.html +++ b/MANUAL.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>CCACHE(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p { ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content { }
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img { margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; } span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] { *
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody { @media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) { function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) { var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () { var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -736,7 +734,7 @@ asciidoc.install(2); <body class="article">
<div id="header">
<h1>CCACHE(1)</h1>
-<span id="revnumber">version 3.1.9</span>
+<span id="revnumber">version 3.1.10</span>
<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> @@ -850,14 +848,14 @@ ccache for all your compilations.</p></div> <div class="paragraph"><p>To use the symlinks method, do something like this:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>cp ccache /usr/local/bin/
+<pre><code>cp ccache /usr/local/bin/
ln -s ccache /usr/local/bin/gcc
ln -s ccache /usr/local/bin/g++
ln -s ccache /usr/local/bin/cc
-ln -s ccache /usr/local/bin/c++</tt></pre>
+ln -s ccache /usr/local/bin/c++</code></pre>
</div></div>
<div class="paragraph"><p>And so forth. This will work as long as the directory with symlinks comes
-before the path to the compiler (which is usually in <tt>/usr/bin</tt>). After
+before the path to the compiler (which is usually in <code>/usr/bin</code>). After
installing you may wish to run “which gcc” to make sure that the correct link
is being used.</p></div>
<div class="admonitionblock">
@@ -973,7 +971,10 @@ compiler options apply and you should refer to the compiler’s documentatio <div class="paragraph"><p>When run as a compiler, ccache usually just takes the same command line options
as the compiler you are using. The only exception to this is the option
<strong>--ccache-skip</strong>. That option can be used to tell ccache to avoid interpreting
-the next option in any way and to pass it along to the compiler as-is.</p></div>
+the next option in any way and to pass it along to the compiler as-is. <strong>Note</strong>:
+<strong>--ccache-skip</strong> currently only tells ccache not to interpret the next option as
+a special compiler option — the option will still be included in the direct
+mode hash.</p></div>
<div class="paragraph"><p>The reason this can be important is that ccache does need to parse the command
line and determine what is an input filename and what is a compiler option, as
it needs the input filename to determine the name of the resulting object file
@@ -1074,12 +1075,12 @@ cases you won’t need any of these as the defaults will be fine.</p></div> <div class="ulist"><ul>
<li>
<p>
-<tt>%compiler% -v</tt>
+<code>%compiler% -v</code>
</p>
</li>
<li>
<p>
-<tt>%compiler% -dumpmachine; %compiler% -dumpversion</tt>
+<code>%compiler% -dumpmachine; %compiler% -dumpversion</code>
</p>
</li>
</ul></div>
@@ -1322,6 +1323,15 @@ should consider continue using the <strong>mtime</strong> method in combination </p>
</dd>
<dt class="hdlist1">
+<strong>pch_defines</strong>
+</dt>
+<dd>
+<p>
+ Be sloppy about #defines when precompiling a header file. See
+ <a href="#_precompiled_headers">PRECOMPILED HEADERS</a> for more information.
+</p>
+</dd>
+<dt class="hdlist1">
<strong>time_macros</strong>
</dt>
<dd>
@@ -1617,7 +1627,7 @@ the <strong>CCACHE_BASEDIR</strong> variable to an absolute path to the director then rewrite absolute paths that are under the base directory (i.e., paths that
have the base directory as a prefix) to relative paths when constructing the
hash. A typical path to use as the base directory is your home directory or
-another directory that is a parent of your build directories. (Don’t use <tt>/</tt> as
+another directory that is a parent of your build directories. (Don’t use <code>/</code> as
the base directory since that will make ccache also rewrite paths to system
header files, which doesn’t gain anything.)</p></div>
<div class="paragraph"><p>The drawbacks of using <strong>CCACHE_BASEDIR</strong> are:</p></div>
@@ -1648,9 +1658,11 @@ things to make it work properly:</p></div> <div class="ulist"><ul>
<li>
<p>
-You must set <strong>CCACHE_SLOPPINESS</strong> to <strong>time_macros</strong>. The reason is that ccache
- can’t tell whether <strong>__TIME__</strong> or <strong>__DATE__</strong> is used when using a
- precompiled header.
+You must set <strong>CCACHE_SLOPPINESS</strong> to <strong>pch_defines,time_macros</strong>. The reason is
+ that ccache can’t tell whether <strong>__TIME__</strong> or <strong>__DATE__</strong> is used when
+ using a precompiled header. Further, it can’t detect changes in #defines in
+ the source code because of how preprocessing works in combination with
+ precompiled headers.
</p>
</li>
<li>
@@ -2002,8 +2014,8 @@ maintained by Joel Rosdahl. See AUTHORS.txt or AUTHORS.html and <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Version 3.1.9<br />
-Last updated 2013-01-06 17:46:13 CET
+Version 3.1.10<br />
+Last updated 2014-10-19 19:02:09 CEST
</div>
</div>
</body>
@@ -151,7 +151,10 @@ Extra options When run as a compiler, ccache usually just takes the same command line options as the compiler you are using. The only exception to this is the option *--ccache-skip*. That option can be used to tell ccache to avoid interpreting -the next option in any way and to pass it along to the compiler as-is. +the next option in any way and to pass it along to the compiler as-is. *Note*: +*--ccache-skip* currently only tells ccache not to interpret the next option as +a special compiler option -- the option will still be included in the direct +mode hash. The reason this can be important is that ccache does need to parse the command line and determine what is an input filename and what is a compiler option, as @@ -372,6 +375,9 @@ WRAPPERS>>. Ignore *\_\_FILE__* being present in the source. *include_file_mtime*:: Don't check the modification time of include files in the direct mode. +*pch_defines*:: + Be sloppy about #defines when precompiling a header file. See + <<_precompiled_headers,PRECOMPILED HEADERS>> for more information. *time_macros*:: Ignore *\_\_DATE\__* and *\_\_TIME__* being present in the source code. -- @@ -567,9 +573,11 @@ Precompiled headers ccache has support for GCC's precompiled headers. However, you have to do some things to make it work properly: -* You must set *CCACHE_SLOPPINESS* to *time_macros*. The reason is that ccache - can't tell whether *\_\_TIME\__* or *\_\_DATE__* is used when using a - precompiled header. +* You must set *CCACHE_SLOPPINESS* to *pch_defines,time_macros*. The reason is + that ccache can't tell whether *\_\_TIME\__* or *\_\_DATE__* is used when + using a precompiled header. Further, it can't detect changes in #defines in + the source code because of how preprocessing works in combination with + precompiled headers. * You must either: + -- @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>ccache news</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p { ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content { }
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img { margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; } span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] { *
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody { @media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) { function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) { var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () { var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -736,7 +734,7 @@ asciidoc.install(2); <body class="article">
<div id="header">
<h1>ccache news</h1>
-<span id="revnumber">version 3.1.9</span>
+<span id="revnumber">version 3.1.10</span>
<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> @@ -744,17 +742,109 @@ asciidoc.install(2); </div>
<div id="content">
<div class="sect1">
+<h2 id="_ccache_3_1_10">ccache 3.1.10</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Release date: 2014-10-19</p></div>
+<div class="sect2">
+<h3 id="_new_features_and_improvements">New features and improvements</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+Added support for the <code>-Xclang</code> compiler option.
+</p>
+</li>
+<li>
+<p>
+Improved handling of exit code of internally executed processes.
+</p>
+</li>
+<li>
+<p>
+Zero length object files in the cache are now rejected as invalid.
+</p>
+</li>
+<li>
+<p>
+Bail out on option <code>-gsplit-dwarf</code> (since it produces multiple output files).
+</p>
+</li>
+<li>
+<p>
+Compiler option <code>-fdebug-prefix-map</code> is now ignored (not part of the hash).
+ (The <code>-fdebug-prefix-map</code> option may be used in combination with
+ <code>CCACHE_BASEDIR</code> to reuse results across different directories.)
+</p>
+</li>
+<li>
+<p>
+Added note in documentation that <code>--ccache-skip</code> currently does not mean
+ “don’t hash the following option”.
+</p>
+</li>
+<li>
+<p>
+To enable support for precompiled headers (PCH), <code>CCACHE_SLOPPINESS</code> now also
+ needs to include the new <code>pch_defines</code> sloppiness. This is because ccache
+ can’t detect changes in the source code when only `#define`s have been
+ changed.
+</p>
+</li>
+<li>
+<p>
+Stale files in the internal temporary directory (<code><ccache_dir>/tmp</code>) are now
+ cleaned up if they are older than one hour.
+</p>
+</li>
+</ul></div>
+</div>
+<div class="sect2">
+<h3 id="_bug_fixes">Bug fixes</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+Fixed path canonicalization in <code>make_relative_path()</code> when path doesn’t
+ exist.
+</p>
+</li>
+<li>
+<p>
+Fixed bug in <code>common_dir_prefix_length()</code>. This corrects the <code>CCACHE_BASEDIR</code>
+ behavior.
+</p>
+</li>
+<li>
+<p>
+ccache no longer tries to create the cache directory when <code>CCACHE_DISABLE</code> is
+ set.
+</p>
+</li>
+<li>
+<p>
+Fixed bug when reading manifests with a very large number of file info
+ entries.
+</p>
+</li>
+<li>
+<p>
+Fixed problem with logging of current working directory.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_ccache_3_1_9">ccache 3.1.9</h2>
<div class="sectionbody">
<div class="paragraph"><p>Release date: 2013-01-06</p></div>
<div class="sect2">
-<h3 id="_bug_fixes">Bug fixes</h3>
+<h3 id="_bug_fixes_2">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
The EAGAIN signal is now handled correctly when emitting cached stderr
- output. This fixes a problem triggered by large error outputs from the
- compiler.
+ output. This fixes a problem triggered by large error outputs from the
+ compiler.
</p>
</li>
<li>
@@ -765,13 +855,13 @@ Subdirectories in the cache are no longer created in read-only mode. <li>
<p>
Fixed so that ccache’s log file descriptor is not made available to the
- compiler.
+ compiler.
</p>
</li>
<li>
<p>
-Improved error reporting when failing to create temporary stdout/stderr
- files when executing the compiler.
+Improved error reporting when failing to create temporary stdout/stderr files
+ when executing the compiler.
</p>
</li>
<li>
@@ -798,7 +888,7 @@ Fixed test suite to work on ecryptfs. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2012-08-11</p></div>
<div class="sect2">
-<h3 id="_new_features_and_improvements">New features and improvements</h3>
+<h3 id="_new_features_and_improvements_2">New features and improvements</h3>
<div class="ulist"><ul>
<li>
<p>
@@ -808,7 +898,7 @@ Made paths to dependency files relative in order to increase cache hits. <li>
<p>
Added work-around to make ccache work with buggy GCC 4.1 when creating a
- pre-compiled header.
+ pre-compiled header.
</p>
</li>
<li>
@@ -819,7 +909,7 @@ Clang plugins are now hashed to catch plugin upgrades. </ul></div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_2">Bug fixes</h3>
+<h3 id="_bug_fixes_3">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
@@ -834,13 +924,13 @@ Fixed crash when stderr is closed. <li>
<p>
Corrected a corner case when parsing backslash escapes in string
- literals.
+ literals.
</p>
</li>
<li>
<p>
-Paths are now correctly canonicalized when computing paths relative to
- the base directory.
+Paths are now correctly canonicalized when computing paths relative to the
+ base directory.
</p>
</li>
</ul></div>
@@ -850,13 +940,12 @@ Paths are now correctly canonicalized when computing paths relative to <div class="ulist"><ul>
<li>
<p>
-Made git version macro work when compiling outside of the source
- directory.
+Made git version macro work when compiling outside of the source directory.
</p>
</li>
<li>
<p>
-Fixed <tt>static_assert</tt> macro definition clash with GCC 4.7.
+Fixed <code>static_assert</code> macro definition clash with GCC 4.7.
</p>
</li>
</ul></div>
@@ -868,42 +957,41 @@ Fixed <tt>static_assert</tt> macro definition clash with GCC 4.7. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2012-01-08</p></div>
<div class="sect2">
-<h3 id="_bug_fixes_3">Bug fixes</h3>
+<h3 id="_bug_fixes_4">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-Non-writable <tt>CCACHE_DIR</tt> is now handled gracefully when
- <tt>CCACHE_READONLY</tt> is set.
+Non-writable <code>CCACHE_DIR</code> is now handled gracefully when <code>CCACHE_READONLY</code> is
+ set.
</p>
</li>
<li>
<p>
-Made failure to create files (typically due to bad directory permissions)
- in the cache directory fatal. Previously, such failures were silently and
- erroneously flagged as "compiler produced stdout".
+Made failure to create files (typically due to bad directory permissions) in
+ the cache directory fatal. Previously, such failures were silently and
+ erroneously flagged as "compiler produced stdout".
</p>
</li>
<li>
<p>
-Both the <tt>-specs=file</tt> and <tt>--specs=file</tt> forms are now recognized.
+Both the <code>-specs=file</code> and <code>--specs=file</code> forms are now recognized.
</p>
</li>
<li>
<p>
-Added recognition and hashing of GCC plugins specified with
- <tt>-fplugin=file</tt>.
+Added recognition and hashing of GCC plugins specified with <code>-fplugin=file</code>.
</p>
</li>
<li>
<p>
-<tt>CCACHE_COMPILERCHECK</tt> now also determines how to hash explicit specs
- files (<tt>-specs=file</tt>).
+<code>CCACHE_COMPILERCHECK</code> now also determines how to hash explicit specs files
+ (<code>-specs=file</code>).
</p>
</li>
<li>
<p>
-Added <tt>CPATH</tt>, <tt>C_INCLUDE_PATH</tt> and similar environment variables to the
- hash to avoid false cache hits when such variables have changed.
+Added <code>CPATH</code>, <code>C_INCLUDE_PATH</code> and similar environment variables to the hash
+ to avoid false cache hits when such variables have changed.
</p>
</li>
<li>
@@ -913,9 +1001,9 @@ Corrected log message when unify mode is enabled. </li>
<li>
<p>
-Reverted the GCC bug compatibility introduced in ccache 3.1.5 for
- <tt>-MT</tt>/<tt>-MQ</tt> options with concatenated arguments. (The bug is fixed in
- recent GCC versions.)
+Reverted the GCC bug compatibility introduced in ccache 3.1.5 for <code>-MT</code>/<code>-MQ</code>
+ options with concatenated arguments. (The bug is fixed in recent GCC
+ versions.)
</p>
</li>
</ul></div>
@@ -925,7 +1013,7 @@ Reverted the GCC bug compatibility introduced in ccache 3.1.5 for <div class="ulist"><ul>
<li>
<p>
-Corrected license header for <tt>mdfour.c</tt>.
+Corrected license header for <code>mdfour.c</code>.
</p>
</li>
<li>
@@ -942,21 +1030,21 @@ Improved documentation on how to fix bad object files in the cache. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2011-08-21</p></div>
<div class="sect2">
-<h3 id="_new_features_and_improvements_2">New features and improvements</h3>
+<h3 id="_new_features_and_improvements_3">New features and improvements</h3>
<div class="ulist"><ul>
<li>
<p>
-Rewrite argument to <tt>--sysroot</tt> if <tt>CCACHE_BASEDIR</tt> is used.
+Rewrite argument to <code>--sysroot</code> if <code>CCACHE_BASEDIR</code> is used.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_4">Bug fixes</h3>
+<h3 id="_bug_fixes_5">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-Don’t crash if <tt>getcwd()</tt> fails.
+Don’t crash if <code>getcwd()</code> fails.
</p>
</li>
<li>
@@ -973,7 +1061,7 @@ Fixed alignment of “called for preprocessing” counter. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2011-05-29</p></div>
<div class="sect2">
-<h3 id="_new_features_and_improvements_3">New features and improvements</h3>
+<h3 id="_new_features_and_improvements_4">New features and improvements</h3>
<div class="ulist"><ul>
<li>
<p>
@@ -983,7 +1071,7 @@ Added a new statistics counter named “called for preprocessing”. <li>
<p>
The original command line is now logged to the file specified with
- <tt>CCACHE_LOGFILE</tt>.
+ <code>CCACHE_LOGFILE</code>.
</p>
</li>
<li>
@@ -993,30 +1081,30 @@ Improved error logging when system calls fail. </li>
<li>
<p>
-Added support for rewriting absolute paths in <tt>-F</tt>/<tt>-iframework</tt> GCC
- options.
+Added support for rewriting absolute paths in <code>-F</code>/<code>-iframework</code> GCC
+ options.
</p>
</li>
<li>
<p>
-Improved order of statistics counters in <tt>ccache -s</tt> output.
+Improved order of statistics counters in <code>ccache -s</code> output.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_5">Bug fixes</h3>
+<h3 id="_bug_fixes_6">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-The <tt>-MF</tt>/<tt>-MT</tt>/<tt>-MQ</tt> options with concatenated argument are now handled
- correctly when they are last on the command line.
+The <code>-MF</code>/<code>-MT</code>/<code>-MQ</code> options with concatenated argument are now handled
+ correctly when they are last on the command line.
</p>
</li>
<li>
<p>
-ccache is now bug compatible with GCC for the <tt>-MT</tt>/<tt>-MQ</tt> options with
- concatenated arguments.
+ccache is now bug compatible with GCC for the <code>-MT</code>/<code>-MQ</code> options with
+ concatenated arguments.
</p>
</li>
<li>
@@ -1026,8 +1114,7 @@ Fixed a minor memory leak. </li>
<li>
<p>
-Systems that lack (and don’t need to be linked with) libm are now
- supported.
+Systems that lack (and don’t need to be linked with) libm are now supported.
</p>
</li>
</ul></div>
@@ -1039,17 +1126,17 @@ Systems that lack (and don’t need to be linked with) libm are now <div class="sectionbody">
<div class="paragraph"><p>Release date: 2011-01-09</p></div>
<div class="sect2">
-<h3 id="_bug_fixes_6">Bug fixes</h3>
+<h3 id="_bug_fixes_7">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-Made a work-around for a bug in gzputc() in zlib 1.2.5.
+Made a work-around for a bug in <code>gzputc()</code> in zlib 1.2.5.
</p>
</li>
<li>
<p>
-Corrupt manifest files are now removed so that they won’t block direct
- mode hits.
+Corrupt manifest files are now removed so that they won’t block direct mode
+ hits.
</p>
</li>
<li>
@@ -1059,8 +1146,8 @@ ccache now copes with file systems that don’t know about symbolic links. </li>
<li>
<p>
-The file handle in now correctly closed on write error when trying to
- create a cache dir tag.
+The file handle in now correctly closed on write error when trying to create
+ a cache dir tag.
</p>
</li>
</ul></div>
@@ -1072,12 +1159,12 @@ The file handle in now correctly closed on write error when trying to <div class="sectionbody">
<div class="paragraph"><p>Release date: 2010-11-28</p></div>
<div class="sect2">
-<h3 id="_bug_fixes_7">Bug fixes</h3>
+<h3 id="_bug_fixes_8">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-The -MFarg, -MTarg and -MQarg compiler options (i.e, without space
- between option and argument) are now handled correctly.
+The -MFarg, -MTarg and -MQarg compiler options (i.e, without space between
+ option and argument) are now handled correctly.
</p>
</li>
</ul></div>
@@ -1099,17 +1186,17 @@ Portability fixes for HP-UX 11.00 and other esoteric systems. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2010-11-21</p></div>
<div class="sect2">
-<h3 id="_bug_fixes_8">Bug fixes</h3>
+<h3 id="_bug_fixes_9">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-Bail out on too hard compiler options <tt>-fdump-*</tt>.
+Bail out on too hard compiler options <code>-fdump-*</code>.
</p>
</li>
<li>
<p>
NULL return values from malloc/calloc of zero bytes are now handled
- correctly.
+ correctly.
</p>
</li>
<li>
@@ -1130,7 +1217,7 @@ Improved documentation on which information is included in the hash sum. <li>
<p>
Made the “too new header file” test case work on file systems with
- unsynchronized clocks.
+ unsynchronized clocks.
</p>
</li>
<li>
@@ -1147,19 +1234,18 @@ The test suite now also works on systems that lack a /dev/zero. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2010-11-07</p></div>
<div class="sect2">
-<h3 id="_bug_fixes_9">Bug fixes</h3>
+<h3 id="_bug_fixes_10">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-ccache now falls back to preprocessor mode when a non-regular include
- file (device, socket, etc) has been detected so that potential hanging
- due to blocking reads is avoided.
+ccache now falls back to preprocessor mode when a non-regular include file
+ (device, socket, etc) has been detected so that potential hanging due to
+ blocking reads is avoided.
</p>
</li>
<li>
<p>
-CRC errors are now detected when decompressing compressed files in the
- cache.
+CRC errors are now detected when decompressing compressed files in the cache.
</p>
</li>
<li>
@@ -1180,7 +1266,7 @@ Fixed configure detection of ar. <li>
<p>
ccache development version (set by dev.mk) now works with gits whose
- <tt>describe</tt> command doesn’t understand <tt>--dirty</tt>.
+ <code>describe</code> command doesn’t understand <code>--dirty</code>.
</p>
</li>
</ul></div>
@@ -1202,29 +1288,28 @@ Minor debug log message improvements. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2010-09-16</p></div>
<div class="sect2">
-<h3 id="_new_features_and_improvements_4">New features and improvements</h3>
+<h3 id="_new_features_and_improvements_5">New features and improvements</h3>
<div class="ulist"><ul>
<li>
<p>
-Added support for hashing the output of a custom command (e.g.
- <tt>%compiler% --version</tt>) to identify the compiler instead of stat-ing or
- hashing the compiler binary. This can improve robustness when the
- compiler (as seen by ccache) actually isn’t the real compiler but another
- compiler wrapper.
+Added support for hashing the output of a custom command (e.g. <code>%compiler%
+ --version</code>) to identify the compiler instead of stat-ing or hashing the
+ compiler binary. This can improve robustness when the compiler (as seen by
+ ccache) actually isn’t the real compiler but another compiler wrapper.
</p>
</li>
<li>
<p>
-Added support for caching compilations that use precompiled headers. (See
- the manual for important instructions regarding this.)
+Added support for caching compilations that use precompiled headers. (See the
+ manual for important instructions regarding this.)
</p>
</li>
<li>
<p>
Locking of the files containing statistics counters is now done using
- symlinks instead of POSIX locks. This should make ccache behave a lot
- better on file systems where POSIX locks are slow or broken (e.g. NFS on
- some systems).
+ symlinks instead of POSIX locks. This should make ccache behave a lot better
+ on file systems where POSIX locks are slow or broken (e.g. NFS on some
+ systems).
</p>
</li>
<li>
@@ -1234,27 +1319,27 @@ Manifest files are now updated without the need of taking locks. </li>
<li>
<p>
-Updates of statistics counters are now always done in one of the
- sub-level statistics files. This reduces lock contention, which
- especially improves performance on slow NFS mounts.
+Updates of statistics counters are now always done in one of the sub-level
+ statistics files. This reduces lock contention, which especially improves
+ performance on slow NFS mounts.
</p>
</li>
<li>
<p>
-Reading and writing of statistics counters has been made
- forward-compatible (unknown counters are retained).
+Reading and writing of statistics counters has been made forward-compatible
+ (unknown counters are retained).
</p>
</li>
<li>
<p>
-Files are now read without using mmap(). This has two benefits: it’s more
- robust against file changes during reading and it improves performance on
- poor systems where mmap() doesn’t use the disk cache.
+Files are now read without using <code>mmap()</code>. This has two benefits: it’s more
+ robust against file changes during reading and it improves performance on
+ poor systems where <code>mmap()</code> doesn’t use the disk cache.
</p>
</li>
<li>
<p>
-Added <tt>.cp</tt> and <tt>.CP</tt> as known C++ suffixes.
+Added <code>.cp</code> and <code>.CP</code> as known C++ suffixes.
</p>
</li>
<li>
@@ -1264,29 +1349,28 @@ Improved logging. </li>
<li>
<p>
-Added <tt>-install_name</tt> as an option known to take an argument. (This
- improves statistics when using the Darwin linker.)
+Added <code>-install_name</code> as an option known to take an argument. (This improves
+ statistics when using the Darwin linker.)
</p>
</li>
</ul></div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_10">Bug fixes</h3>
+<h3 id="_bug_fixes_11">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
-Non-fatal error messages are now never printed to stderr but logged
- instead.
+Non-fatal error messages are now never printed to stderr but logged instead.
</p>
</li>
<li>
<p>
-Fixed a bug affecting failing commands when <tt>--ccache-skip</tt> is used.
+Fixed a bug affecting failing commands when <code>--ccache-skip</code> is used.
</p>
</li>
<li>
<p>
-Made <tt>--ccache-skip</tt> work for all options.
+Made <code>--ccache-skip</code> work for all options.
</p>
</li>
<li>
@@ -1301,20 +1385,20 @@ EINTR is now handled correctly. <div class="ulist"><ul>
<li>
<p>
-Work on porting ccache to win32 (native), mostly done by Ramiro Polla.
- The port is not yet finished, but will hopefully be complete in some
- subsequent release.
+Work on porting ccache to win32 (native), mostly done by Ramiro Polla. The
+ port is not yet finished, but will hopefully be complete in some subsequent
+ release.
</p>
</li>
<li>
<p>
-Added a <tt>--nostats</tt> flag to the performance benchmark program.
+Added a <code>--nostats</code> flag to the performance benchmark program.
</p>
</li>
<li>
<p>
Made the performance benchmark program more accurate when measuring cache
- hits.
+ hits.
</p>
</li>
<li>
@@ -1324,30 +1408,29 @@ Added a new test framework for unit tests written in C. </li>
<li>
<p>
-Got rid of <tt>configure-dev</tt>; dev mode is now given by <tt>dev.mk.in</tt>
- presence.
+Got rid of <code>configure-dev</code>; dev mode is now given by <code>dev.mk.in</code> presence.
</p>
</li>
<li>
<p>
-Improved documentation on how to combine ccache with other compiler
- wrappers (like <tt>distcc</tt>).
+Improved documentation on how to combine ccache with other compiler wrappers
+ (like <code>distcc</code>).
</p>
</li>
<li>
<p>
-New <tt>LICENSE.txt</tt> file with licensing and copyright details about bundled
- source code.
+New <code>LICENSE.txt</code> file with licensing and copyright details about bundled
+ source code.
</p>
</li>
<li>
<p>
-New <tt>AUTHORS.txt</tt> file with a list of ccache contributors.
+New <code>AUTHORS.txt</code> file with a list of ccache contributors.
</p>
</li>
<li>
<p>
-New <tt>HACKING.txt</tt> file with some notes about ccache code conventions.
+New <code>HACKING.txt</code> file with some notes about ccache code conventions.
</p>
</li>
</ul></div>
@@ -1359,12 +1442,12 @@ New <tt>HACKING.txt</tt> file with some notes about ccache code conventions. <div class="sectionbody">
<div class="paragraph"><p>Release date: 2010-07-15</p></div>
<div class="sect2">
-<h3 id="_bug_fixes_11">Bug fixes</h3>
+<h3 id="_bug_fixes_12">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
The statistics counter “called for link” is now correctly updated when
- linking with a single object file.
+ linking with a single object file.
</p>
</li>
<li>
@@ -1385,8 +1468,8 @@ Fixed a problem with out-of-source builds. <div class="ulist"><ul>
<li>
<p>
-ccache is now licensed under the GNU General Public License (GPL) version
- 3 or later.
+ccache is now licensed under the GNU General Public License (GPL) version 3
+ or later.
</p>
</li>
</ul></div>
@@ -1396,72 +1479,70 @@ ccache is now licensed under the GNU General Public License (GPL) version <div class="ulist"><ul>
<li>
<p>
-The way the hashes are calculated has changed, so you won’t get cache
- hits for compilation results stored by older ccache versions. Because of
- this, you might as well clear the old cache directory with <tt>ccache
- --clear</tt> if you want, unless you plan to keep using an older ccache
- version.
+The way the hashes are calculated has changed, so you won’t get cache hits
+ for compilation results stored by older ccache versions. Because of this, you
+ might as well clear the old cache directory with <code>ccache --clear</code> if you
+ want, unless you plan to keep using an older ccache version.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
-<h3 id="_new_features_and_improvements_5">New features and improvements</h3>
+<h3 id="_new_features_and_improvements_6">New features and improvements</h3>
<div class="ulist"><ul>
<li>
<p>
-ccache now has a “direct mode” where it computes a hash of the source
- code (including all included files) and compiler options without
- running the preprocessor. By not running the preprocessor, CPU usage is
- reduced; the speed is somewhere between 1 and 5 times that of ccache
- running in traditional mode, depending on the circumstances. The speedup
- will be higher when I/O is fast (e.g., when files are in the disk cache).
- The direct mode can be disabled by setting <tt>CCACHE_NODIRECT</tt>.
+ccache now has a “direct mode” where it computes a hash of the source code
+ (including all included files) and compiler options without running the
+ preprocessor. By not running the preprocessor, CPU usage is reduced; the
+ speed is somewhere between 1 and 5 times that of ccache running in
+ traditional mode, depending on the circumstances. The speedup will be higher
+ when I/O is fast (e.g., when files are in the disk cache). The direct mode
+ can be disabled by setting <code>CCACHE_NODIRECT</code>.
</p>
</li>
<li>
<p>
-Support has been added for rewriting absolute paths to relative paths
- when hashing, in order to increase cache hit rate when building the same
- source code in different directories even when compiling with <tt>-g</tt> and
- when using absolute include directory paths. This is done by setting the
- <tt>CCACHE_BASEDIR</tt> environment variable to an absolute path that specifies
- which paths to rewrite.
+Support has been added for rewriting absolute paths to relative paths when
+ hashing, in order to increase cache hit rate when building the same source
+ code in different directories even when compiling with <code>-g</code> and when using
+ absolute include directory paths. This is done by setting the
+ <code>CCACHE_BASEDIR</code> environment variable to an absolute path that specifies
+ which paths to rewrite.
</p>
</li>
<li>
<p>
-Object files are now optionally stored compressed in the cache. The
- runtime cost is negligible, and more files will fit in the ccache
- directory and in the disk cache. Set <tt>CCACHE_COMPRESS</tt> to enable object
- file compression. Note that you can’t use compression in combination with
- the hard link feature.
+Object files are now optionally stored compressed in the cache. The runtime
+ cost is negligible, and more files will fit in the ccache directory and in
+ the disk cache. Set <code>CCACHE_COMPRESS</code> to enable object file compression. Note
+ that you can’t use compression in combination with the hard link feature.
</p>
</li>
<li>
<p>
-A <tt>CCACHE_COMPILERCHECK</tt> option has been added. This option tells ccache
- what compiler-identifying information to hash to ensure that results
- retrieved from the cache are accurate. Possible values are: none (don’t
- hash anything), mtime (hash the compiler’s mtime and size) and content
- (hash the content of the compiler binary). The default is mtime.
+A <code>CCACHE_COMPILERCHECK</code> option has been added. This option tells ccache what
+ compiler-identifying information to hash to ensure that results retrieved
+ from the cache are accurate. Possible values are: none (don’t hash anything),
+ mtime (hash the compiler’s mtime and size) and content (hash the content of
+ the compiler binary). The default is mtime.
</p>
</li>
<li>
<p>
-It is now possible to specify extra files whose contents should be
- included in the hash sum by setting the <tt>CCACHE_EXTRAFILES</tt> option.
+It is now possible to specify extra files whose contents should be included
+ in the hash sum by setting the <code>CCACHE_EXTRAFILES</code> option.
</p>
</li>
<li>
<p>
Added support for Objective-C and Objective-C++. The statistics counter
- “not a C/C++ file” has been renamed to “unsupported source language”.
+ “not a C/C++ file” has been renamed to “unsupported source language”.
</p>
</li>
<li>
<p>
-Added support for the <tt>-x</tt> compiler option.
+Added support for the <code>-x</code> compiler option.
</p>
</li>
<li>
@@ -1471,65 +1552,63 @@ Added support for long command-line options. </li>
<li>
<p>
-A <tt>CACHEDIR.TAG</tt> file is now created in the cache directory. See
- <a href="http://www.brynosaurus.com/cachedir/">http://www.brynosaurus.com/cachedir/</a>.
+A <code>CACHEDIR.TAG</code> file is now created in the cache directory. See
+ <a href="http://www.brynosaurus.com/cachedir/">http://www.brynosaurus.com/cachedir/</a>.
</p>
</li>
<li>
<p>
-Messages printed to the debug log (specified by <tt>CCACHE_LOGFILE</tt>) have
- been improved.
+Messages printed to the debug log (specified by <code>CCACHE_LOGFILE</code>) have been
+ improved.
</p>
</li>
<li>
<p>
You can relax some checks that ccache does in direct mode by setting
- <tt>CCACHE_SLOPPINESS</tt>. See the manual for more information.
+ <code>CCACHE_SLOPPINESS</code>. See the manual for more information.
</p>
</li>
<li>
<p>
-<tt>CCACHE_TEMPDIR</tt> no longer needs to be on the same filesystem as
- <tt>CCACHE_DIR</tt>.
+<code>CCACHE_TEMPDIR</code> no longer needs to be on the same filesystem as
+ <code>CCACHE_DIR</code>.
</p>
</li>
<li>
<p>
-The default value of <tt>CCACHE_TEMPDIR</tt> has been changed to
- <tt>$CCACHE_DIR/tmp</tt> to avoid cluttering the top directory.
+The default value of <code>CCACHE_TEMPDIR</code> has been changed to <code>$CCACHE_DIR/tmp</code>
+ to avoid cluttering the top directory.
</p>
</li>
<li>
<p>
-Temporary files that later will be moved into the cache are now created
- in the cache directory they will end up in. This makes ccache more
- friendly to Linux’s directory layout.
+Temporary files that later will be moved into the cache are now created in
+ the cache directory they will end up in. This makes ccache more friendly to
+ Linux’s directory layout.
</p>
</li>
<li>
<p>
-Improved the test suite and added tests for most of the new
- functionality. It’s now also possible to specify a subset of tests to
- run.
+Improved the test suite and added tests for most of the new functionality.
+ It’s now also possible to specify a subset of tests to run.
</p>
</li>
<li>
<p>
-Standard error output from the compiler is now only stored in the cache
- if it’s non-empty.
+Standard error output from the compiler is now only stored in the cache if
+ it’s non-empty.
</p>
</li>
<li>
<p>
-If the compiler produces no object file or an empty object file, but
- gives a zero exit status (could be due to a file system problem, a buggy
- program specified by <tt>CCACHE_PREFIX</tt>, etc.), ccache copes with it
- properly.
+If the compiler produces no object file or an empty object file, but gives a
+ zero exit status (could be due to a file system problem, a buggy program
+ specified by <code>CCACHE_PREFIX</code>, etc.), ccache copes with it properly.
</p>
</li>
<li>
<p>
-Added <tt>installcheck</tt> and <tt>distcheck</tt> make targets.
+Added <code>installcheck</code> and <code>distcheck</code> make targets.
</p>
</li>
<li>
@@ -1545,15 +1624,14 @@ Improved display of cache max size values. <li>
<p>
The following options are no longer hashed in the preprocessor mode:
- <tt>-imacros</tt>, <tt>-imultilib</tt>, <tt>-iprefix</tt>, <tt>-iquote</tt>, <tt>-isysroot</tt>,
- <tt>-iwithprefix</tt>, <tt>-iwithprefixbefore</tt>, <tt>-nostdinc</tt>, <tt>-nostdinc++</tt> and
- <tt>-U</tt>.
+ <code>-imacros</code>, <code>-imultilib</code>, <code>-iprefix</code>, <code>-iquote</code>, <code>-isysroot</code>, <code>-iwithprefix</code>,
+ <code>-iwithprefixbefore</code>, <code>-nostdinc</code>, <code>-nostdinc++</code> and <code>-U</code>.
</p>
</li>
</ul></div>
</div>
<div class="sect2">
-<h3 id="_bug_fixes_12">Bug fixes</h3>
+<h3 id="_bug_fixes_13">Bug fixes</h3>
<div class="ulist"><ul>
<li>
<p>
@@ -1567,7 +1645,7 @@ Improved detection of home directory. </li>
<li>
<p>
-User-defined <tt>CPPFLAGS</tt> and <tt>LDFLAGS</tt> are now respected in the Makefile.
+User-defined <code>CPPFLAGS</code> and <code>LDFLAGS</code> are now respected in the Makefile.
</p>
</li>
<li>
@@ -1577,49 +1655,49 @@ Fixed NFS issues. </li>
<li>
<p>
-Computation of the hash sum has been improved to decrease the risk of
- hash collisions. For instance, the compiler options <tt>-X -Y</tt> and <tt>-X-Y</tt>
- previously contributed equally to the hash sum.
+Computation of the hash sum has been improved to decrease the risk of hash
+ collisions. For instance, the compiler options <code>-X -Y</code> and <code>-X-Y</code> previously
+ contributed equally to the hash sum.
</p>
</li>
<li>
<p>
-Bail out on too hard compiler options <tt>--coverage</tt>, <tt>-fprofile-arcs</tt>,
- <tt>-fprofile-generate</tt>, <tt>-fprofile-use</tt>, <tt>-frepo</tt>, <tt>-ftest-coverage</tt> and
- <tt>-save-temps</tt>. Also bail out on <tt>@file</tt> style options.
+Bail out on too hard compiler options <code>--coverage</code>, <code>-fprofile-arcs</code>,
+ <code>-fprofile-generate</code>, <code>-fprofile-use</code>, <code>-frepo</code>, <code>-ftest-coverage</code> and
+ <code>-save-temps</code>. Also bail out on <code>@file</code> style options.
</p>
</li>
<li>
<p>
-Errors when using multiple <tt>-arch</tt> compiler options are now noted as
- “unsupported compiler option”.
+Errors when using multiple <code>-arch</code> compiler options are now noted as
+ “unsupported compiler option”.
</p>
</li>
<li>
<p>
-<tt>-MD</tt>/<tt>-MMD</tt> options without <tt>-MT</tt>/<tt>-MF</tt> are now handled correctly.
+<code>-MD</code>/<code>-MMD</code> options without <code>-MT</code>/<code>-MF</code> are now handled correctly.
</p>
</li>
<li>
<p>
-The <tt>-finput-charset</tt> option is now handled correctly.
+The <code>-finput-charset</code> option is now handled correctly.
</p>
</li>
<li>
<p>
-Added support for <tt>-Wp,-MD</tt> and <tt>-Wp,-MMD</tt> options.
+Added support for <code>-Wp,-MD</code> and <code>-Wp,-MMD</code> options.
</p>
</li>
<li>
<p>
-The compiler options <tt>-Xassembler</tt>, <tt>-b</tt>, <tt>-G</tt> and <tt>-V</tt> are now correctly
- recognized as taking an argument.
+The compiler options <code>-Xassembler</code>, <code>-b</code>, <code>-G</code> and <code>-V</code> are now correctly
+ recognized as taking an argument.
</p>
</li>
<li>
<p>
Debug information containing line numbers of predefined and command-line
- macros (enabled with the compiler option <tt>-g3</tt>) will now be correct.
+ macros (enabled with the compiler option <code>-g3</code>) will now be correct.
</p>
</li>
<li>
@@ -1629,7 +1707,7 @@ Corrected LRU cleanup handling of object files. </li>
<li>
<p>
-<tt>utimes()</tt> is now used instead of <tt>utime()</tt> when available.
+<code>utimes()</code> is now used instead of <code>utime()</code> when available.
</p>
</li>
<li>
@@ -1649,7 +1727,7 @@ Fixed compilation warnings from GCC 4.3. </li>
<li>
<p>
-The command specified by <tt>CCACHE_PREFIX</tt> is no longer part of the hash.
+The command specified by <code>CCACHE_PREFIX</code> is no longer part of the hash.
</p>
</li>
<li>
@@ -1659,19 +1737,19 @@ Fixed bad memory access spotted by Valgrind. </li>
<li>
<p>
-Fixed a bug in <tt>x_realloc</tt>.
+Fixed a bug in <code>x_realloc</code>.
</p>
</li>
<li>
<p>
-Freed memory is no longer referenced when compiling a <tt>.i</tt>/<tt>.ii</tt> file and
- falling back to running the real compiler.
+Freed memory is no longer referenced when compiling a <code>.i</code>/<code>.ii</code> file and
+ falling back to running the real compiler.
</p>
</li>
<li>
<p>
-The test suite is now immune to external values of the <tt>CCACHE_*</tt>
- environment variables.
+The test suite is now immune to external values of the <code>CCACHE_*</code> environment
+ variables.
</p>
</li>
<li>
@@ -1687,7 +1765,7 @@ The ccache binary is now not unconditionally stripped when installing. <li>
<p>
Statistics counters are now correctly updated for -E option failures and
- internal errors.
+ internal errors.
</p>
</li>
</ul></div>
@@ -1698,8 +1776,8 @@ Statistics counters are now correctly updated for -E option failures and <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Version 3.1.9<br />
-Last updated 2013-01-06 17:55:15 CET
+Version 3.1.10<br />
+Last updated 2014-10-19 19:03:56 CEST
</div>
</div>
</body>
@@ -2,6 +2,56 @@ ccache news =========== +ccache 3.1.10 +------------- +Release date: 2014-10-19 + + +New features and improvements +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Added support for the `-Xclang` compiler option. + +- Improved handling of exit code of internally executed processes. + +- Zero length object files in the cache are now rejected as invalid. + +- Bail out on option `-gsplit-dwarf` (since it produces multiple output files). + +- Compiler option `-fdebug-prefix-map` is now ignored (not part of the hash). + (The `-fdebug-prefix-map` option may be used in combination with + `CCACHE_BASEDIR` to reuse results across different directories.) + +- Added note in documentation that `--ccache-skip` currently does not mean + ``don't hash the following option''. + +- To enable support for precompiled headers (PCH), `CCACHE_SLOPPINESS` now also + needs to include the new `pch_defines` sloppiness. This is because ccache + can't detect changes in the source code when only `#define`s have been + changed. + +- Stale files in the internal temporary directory (`<ccache_dir>/tmp`) are now + cleaned up if they are older than one hour. + + +Bug fixes +~~~~~~~~~ + +- Fixed path canonicalization in `make_relative_path()` when path doesn't + exist. + +- Fixed bug in `common_dir_prefix_length()`. This corrects the `CCACHE_BASEDIR` + behavior. + +- ccache no longer tries to create the cache directory when `CCACHE_DISABLE` is + set. + +- Fixed bug when reading manifests with a very large number of file info + entries. + +- Fixed problem with logging of current working directory. + + ccache 3.1.9 ------------ Release date: 2013-01-06 @@ -10,21 +60,25 @@ 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. +- 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. +- Fixed test suite to work on ecryptfs. ccache 3.1.8 @@ -35,29 +89,34 @@ Release date: 2012-08-11 New features and improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Made paths to dependency files relative in order to increase cache hits. - - Added work-around to make ccache work with buggy GCC 4.1 when creating a - pre-compiled header. - - Clang plugins are now hashed to catch plugin upgrades. +- Made paths to dependency files relative in order to increase cache hits. + +- Added work-around to make ccache work with buggy GCC 4.1 when creating a + pre-compiled header. + +- Clang plugins are now hashed to catch plugin upgrades. Bug fixes ~~~~~~~~~ - - Fixed crash when the current working directory has been removed. - - Fixed crash when stderr is closed. - - Corrected a corner case when parsing backslash escapes in string - literals. - - Paths are now correctly canonicalized when computing paths relative to - the base directory. +- Fixed crash when the current working directory has been removed. + +- Fixed crash when stderr is closed. + +- Corrected a corner case when parsing backslash escapes in string + literals. + +- Paths are now correctly canonicalized when computing paths relative to the + base directory. Other ~~~~~ - - Made git version macro work when compiling outside of the source - directory. - - Fixed `static_assert` macro definition clash with GCC 4.7. +- Made git version macro work when compiling outside of the source directory. + +- Fixed `static_assert` macro definition clash with GCC 4.7. ccache 3.1.7 @@ -68,29 +127,36 @@ Release date: 2012-01-08 Bug fixes ~~~~~~~~~ - - Non-writable `CCACHE_DIR` is now handled gracefully when - `CCACHE_READONLY` is set. - - Made failure to create files (typically due to bad directory permissions) - in the cache directory fatal. Previously, such failures were silently and - erroneously flagged as "compiler produced stdout". - - Both the `-specs=file` and `--specs=file` forms are now recognized. - - Added recognition and hashing of GCC plugins specified with - `-fplugin=file`. - - `CCACHE_COMPILERCHECK` now also determines how to hash explicit specs - files (`-specs=file`). - - Added `CPATH`, `C_INCLUDE_PATH` and similar environment variables to the - hash to avoid false cache hits when such variables have changed. - - Corrected log message when unify mode is enabled. - - Reverted the GCC bug compatibility introduced in ccache 3.1.5 for - `-MT`/`-MQ` options with concatenated arguments. (The bug is fixed in - recent GCC versions.) +- Non-writable `CCACHE_DIR` is now handled gracefully when `CCACHE_READONLY` is + set. + +- Made failure to create files (typically due to bad directory permissions) in + the cache directory fatal. Previously, such failures were silently and + erroneously flagged as "compiler produced stdout". + +- Both the `-specs=file` and `--specs=file` forms are now recognized. + +- Added recognition and hashing of GCC plugins specified with `-fplugin=file`. + +- `CCACHE_COMPILERCHECK` now also determines how to hash explicit specs files + (`-specs=file`). + +- Added `CPATH`, `C_INCLUDE_PATH` and similar environment variables to the hash + to avoid false cache hits when such variables have changed. + +- Corrected log message when unify mode is enabled. + +- Reverted the GCC bug compatibility introduced in ccache 3.1.5 for `-MT`/`-MQ` + options with concatenated arguments. (The bug is fixed in recent GCC + versions.) Other ~~~~~ - - Corrected license header for `mdfour.c`. - - Improved documentation on how to fix bad object files in the cache. +- Corrected license header for `mdfour.c`. + +- Improved documentation on how to fix bad object files in the cache. @@ -102,14 +168,15 @@ Release date: 2011-08-21 New features and improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Rewrite argument to `--sysroot` if `CCACHE_BASEDIR` is used. +- Rewrite argument to `--sysroot` if `CCACHE_BASEDIR` is used. Bug fixes ~~~~~~~~~ - - Don't crash if `getcwd()` fails. - - Fixed alignment of ``called for preprocessing'' counter. +- Don't crash if `getcwd()` fails. + +- Fixed alignment of ``called for preprocessing'' counter. ccache 3.1.5 @@ -120,25 +187,31 @@ Release date: 2011-05-29 New features and improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Added a new statistics counter named ``called for preprocessing''. - - The original command line is now logged to the file specified with - `CCACHE_LOGFILE`. - - Improved error logging when system calls fail. - - Added support for rewriting absolute paths in `-F`/`-iframework` GCC - options. - - Improved order of statistics counters in `ccache -s` output. +- Added a new statistics counter named ``called for preprocessing''. + +- The original command line is now logged to the file specified with + `CCACHE_LOGFILE`. + +- Improved error logging when system calls fail. + +- Added support for rewriting absolute paths in `-F`/`-iframework` GCC + options. + +- Improved order of statistics counters in `ccache -s` output. Bug fixes ~~~~~~~~~ - - The `-MF`/`-MT`/`-MQ` options with concatenated argument are now handled - correctly when they are last on the command line. - - ccache is now bug compatible with GCC for the `-MT`/`-MQ` options with - concatenated arguments. - - Fixed a minor memory leak. - - Systems that lack (and don't need to be linked with) libm are now - supported. +- The `-MF`/`-MT`/`-MQ` options with concatenated argument are now handled + correctly when they are last on the command line. + +- ccache is now bug compatible with GCC for the `-MT`/`-MQ` options with + concatenated arguments. + +- Fixed a minor memory leak. + +- Systems that lack (and don't need to be linked with) libm are now supported. ccache 3.1.4 @@ -149,15 +222,15 @@ Release date: 2011-01-09 Bug fixes ~~~~~~~~~ - - Made a work-around for a bug in gzputc() in zlib 1.2.5. +- Made a work-around for a bug in `gzputc()` in zlib 1.2.5. - - Corrupt manifest files are now removed so that they won't block direct - mode hits. +- Corrupt manifest files are now removed so that they won't block direct mode + hits. - - ccache now copes with file systems that don't know about symbolic links. +- ccache now copes with file systems that don't know about symbolic links. - - The file handle in now correctly closed on write error when trying to - create a cache dir tag. +- The file handle in now correctly closed on write error when trying to create + a cache dir tag. ccache 3.1.3 @@ -168,14 +241,14 @@ Release date: 2010-11-28 Bug fixes ~~~~~~~~~ - - The -MFarg, -MTarg and -MQarg compiler options (i.e, without space - between option and argument) are now handled correctly. +- The -MFarg, -MTarg and -MQarg compiler options (i.e, without space between + option and argument) are now handled correctly. Other ~~~~~ - - Portability fixes for HP-UX 11.00 and other esoteric systems. +- Portability fixes for HP-UX 11.00 and other esoteric systems. ccache 3.1.2 @@ -186,23 +259,23 @@ Release date: 2010-11-21 Bug fixes ~~~~~~~~~ - - Bail out on too hard compiler options `-fdump-*`. +- Bail out on too hard compiler options `-fdump-*`. - - NULL return values from malloc/calloc of zero bytes are now handled - correctly. +- NULL return values from malloc/calloc of zero bytes are now handled + correctly. - - Fixed issue when parsing precompiler output on AIX. +- Fixed issue when parsing precompiler output on AIX. Other ~~~~~ - - Improved documentation on which information is included in the hash sum. +- Improved documentation on which information is included in the hash sum. - - Made the ``too new header file'' test case work on file systems with - unsynchronized clocks. +- Made the ``too new header file'' test case work on file systems with + unsynchronized clocks. - - The test suite now also works on systems that lack a /dev/zero. +- The test suite now also works on systems that lack a /dev/zero. ccache 3.1.1 @@ -213,287 +286,282 @@ Release date: 2010-11-07 Bug fixes ~~~~~~~~~ - - ccache now falls back to preprocessor mode when a non-regular include - file (device, socket, etc) has been detected so that potential hanging - due to blocking reads is avoided. +- ccache now falls back to preprocessor mode when a non-regular include file + (device, socket, etc) has been detected so that potential hanging due to + blocking reads is avoided. - - CRC errors are now detected when decompressing compressed files in the - cache. +- CRC errors are now detected when decompressing compressed files in the cache. - - Fixed potential object file corruption race on NFS. +- Fixed potential object file corruption race on NFS. - - Minor documentation corrections. +- Minor documentation corrections. - - Fixed configure detection of ar. +- Fixed configure detection of ar. - - ccache development version (set by dev.mk) now works with gits whose - `describe` command doesn't understand `--dirty`. +- ccache development version (set by dev.mk) now works with gits whose + `describe` command doesn't understand `--dirty`. Other ~~~~~ - - Minor debug log message improvements. +- Minor debug log message improvements. ccache 3.1 ---------- Release date: 2010-09-16 + New features and improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Added support for hashing the output of a custom command (e.g. - `%compiler% --version`) to identify the compiler instead of stat-ing or - hashing the compiler binary. This can improve robustness when the - compiler (as seen by ccache) actually isn't the real compiler but another - compiler wrapper. +- Added support for hashing the output of a custom command (e.g. `%compiler% + --version`) to identify the compiler instead of stat-ing or hashing the + compiler binary. This can improve robustness when the compiler (as seen by + ccache) actually isn't the real compiler but another compiler wrapper. - - Added support for caching compilations that use precompiled headers. (See - the manual for important instructions regarding this.) +- Added support for caching compilations that use precompiled headers. (See the + manual for important instructions regarding this.) - - Locking of the files containing statistics counters is now done using - symlinks instead of POSIX locks. This should make ccache behave a lot - better on file systems where POSIX locks are slow or broken (e.g. NFS on - some systems). +- Locking of the files containing statistics counters is now done using + symlinks instead of POSIX locks. This should make ccache behave a lot better + on file systems where POSIX locks are slow or broken (e.g. NFS on some + systems). - - Manifest files are now updated without the need of taking locks. +- Manifest files are now updated without the need of taking locks. - - Updates of statistics counters are now always done in one of the - sub-level statistics files. This reduces lock contention, which - especially improves performance on slow NFS mounts. +- Updates of statistics counters are now always done in one of the sub-level + statistics files. This reduces lock contention, which especially improves + performance on slow NFS mounts. - - Reading and writing of statistics counters has been made - forward-compatible (unknown counters are retained). +- Reading and writing of statistics counters has been made forward-compatible + (unknown counters are retained). - - Files are now read without using mmap(). This has two benefits: it's more - robust against file changes during reading and it improves performance on - poor systems where mmap() doesn't use the disk cache. +- Files are now read without using `mmap()`. This has two benefits: it's more + robust against file changes during reading and it improves performance on + poor systems where `mmap()` doesn't use the disk cache. - - Added `.cp` and `.CP` as known C++ suffixes. +- Added `.cp` and `.CP` as known C++ suffixes. - - Improved logging. +- Improved logging. - - Added `-install_name` as an option known to take an argument. (This - improves statistics when using the Darwin linker.) +- Added `-install_name` as an option known to take an argument. (This improves + statistics when using the Darwin linker.) Bug fixes ~~~~~~~~~ - - Non-fatal error messages are now never printed to stderr but logged - instead. +- Non-fatal error messages are now never printed to stderr but logged instead. - - Fixed a bug affecting failing commands when `--ccache-skip` is used. +- Fixed a bug affecting failing commands when `--ccache-skip` is used. - - Made `--ccache-skip` work for all options. +- Made `--ccache-skip` work for all options. - - EINTR is now handled correctly. +- EINTR is now handled correctly. Other ~~~~~ - - Work on porting ccache to win32 (native), mostly done by Ramiro Polla. - The port is not yet finished, but will hopefully be complete in some - subsequent release. +- Work on porting ccache to win32 (native), mostly done by Ramiro Polla. The + port is not yet finished, but will hopefully be complete in some subsequent + release. - - Added a `--nostats` flag to the performance benchmark program. +- Added a `--nostats` flag to the performance benchmark program. - - Made the performance benchmark program more accurate when measuring cache - hits. +- Made the performance benchmark program more accurate when measuring cache + hits. - - Added a new test framework for unit tests written in C. +- Added a new test framework for unit tests written in C. - - Got rid of `configure-dev`; dev mode is now given by `dev.mk.in` - presence. +- Got rid of `configure-dev`; dev mode is now given by `dev.mk.in` presence. - - Improved documentation on how to combine ccache with other compiler - wrappers (like `distcc`). +- Improved documentation on how to combine ccache with other compiler wrappers + (like `distcc`). - - New `LICENSE.txt` file with licensing and copyright details about bundled - source code. +- New `LICENSE.txt` file with licensing and copyright details about bundled + source code. - - New `AUTHORS.txt` file with a list of ccache contributors. +- New `AUTHORS.txt` file with a list of ccache contributors. - - New `HACKING.txt` file with some notes about ccache code conventions. +- New `HACKING.txt` file with some notes about ccache code conventions. ccache 3.0.1 ------------ Release date: 2010-07-15 + Bug fixes ~~~~~~~~~ - - The statistics counter ``called for link'' is now correctly updated when - linking with a single object file. - - Fixed a problem with out-of-source builds. +- The statistics counter ``called for link'' is now correctly updated when + linking with a single object file. + +- Fixed a problem with out-of-source builds. ccache 3.0 ---------- Release date: 2010-06-20 + General ~~~~~~~ - - ccache is now licensed under the GNU General Public License (GPL) version - 3 or later. +- ccache is now licensed under the GNU General Public License (GPL) version 3 + or later. Upgrade notes ~~~~~~~~~~~~~ - - The way the hashes are calculated has changed, so you won't get cache - hits for compilation results stored by older ccache versions. Because of - this, you might as well clear the old cache directory with `ccache - --clear` if you want, unless you plan to keep using an older ccache - version. +- The way the hashes are calculated has changed, so you won't get cache hits + for compilation results stored by older ccache versions. Because of this, you + might as well clear the old cache directory with `ccache --clear` if you + want, unless you plan to keep using an older ccache version. New features and improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - ccache now has a ``direct mode'' where it computes a hash of the source - code (including all included files) and compiler options without - running the preprocessor. By not running the preprocessor, CPU usage is - reduced; the speed is somewhere between 1 and 5 times that of ccache - running in traditional mode, depending on the circumstances. The speedup - will be higher when I/O is fast (e.g., when files are in the disk cache). - The direct mode can be disabled by setting +CCACHE_NODIRECT+. +- ccache now has a ``direct mode'' where it computes a hash of the source code + (including all included files) and compiler options without running the + preprocessor. By not running the preprocessor, CPU usage is reduced; the + speed is somewhere between 1 and 5 times that of ccache running in + traditional mode, depending on the circumstances. The speedup will be higher + when I/O is fast (e.g., when files are in the disk cache). The direct mode + can be disabled by setting +CCACHE_NODIRECT+. - - Support has been added for rewriting absolute paths to relative paths - when hashing, in order to increase cache hit rate when building the same - source code in different directories even when compiling with `-g` and - when using absolute include directory paths. This is done by setting the - `CCACHE_BASEDIR` environment variable to an absolute path that specifies - which paths to rewrite. +- Support has been added for rewriting absolute paths to relative paths when + hashing, in order to increase cache hit rate when building the same source + code in different directories even when compiling with `-g` and when using + absolute include directory paths. This is done by setting the + `CCACHE_BASEDIR` environment variable to an absolute path that specifies + which paths to rewrite. - - Object files are now optionally stored compressed in the cache. The - runtime cost is negligible, and more files will fit in the ccache - directory and in the disk cache. Set `CCACHE_COMPRESS` to enable object - file compression. Note that you can't use compression in combination with - the hard link feature. +- Object files are now optionally stored compressed in the cache. The runtime + cost is negligible, and more files will fit in the ccache directory and in + the disk cache. Set `CCACHE_COMPRESS` to enable object file compression. Note + that you can't use compression in combination with the hard link feature. - - A `CCACHE_COMPILERCHECK` option has been added. This option tells ccache - what compiler-identifying information to hash to ensure that results - retrieved from the cache are accurate. Possible values are: none (don't - hash anything), mtime (hash the compiler's mtime and size) and content - (hash the content of the compiler binary). The default is mtime. +- A `CCACHE_COMPILERCHECK` option has been added. This option tells ccache what + compiler-identifying information to hash to ensure that results retrieved + from the cache are accurate. Possible values are: none (don't hash anything), + mtime (hash the compiler's mtime and size) and content (hash the content of + the compiler binary). The default is mtime. - - It is now possible to specify extra files whose contents should be - included in the hash sum by setting the `CCACHE_EXTRAFILES` option. +- It is now possible to specify extra files whose contents should be included + in the hash sum by setting the `CCACHE_EXTRAFILES` option. - - Added support for Objective-C and Objective-C\+\+. The statistics counter - ``not a C/C++ file'' has been renamed to ``unsupported source language''. +- Added support for Objective-C and Objective-C\+\+. The statistics counter + ``not a C/C++ file'' has been renamed to ``unsupported source language''. - - Added support for the `-x` compiler option. +- Added support for the `-x` compiler option. - - Added support for long command-line options. +- Added support for long command-line options. - - A `CACHEDIR.TAG` file is now created in the cache directory. See - <http://www.brynosaurus.com/cachedir/>. +- A `CACHEDIR.TAG` file is now created in the cache directory. See + <http://www.brynosaurus.com/cachedir/>. - - Messages printed to the debug log (specified by `CCACHE_LOGFILE`) have - been improved. +- Messages printed to the debug log (specified by `CCACHE_LOGFILE`) have been + improved. - - You can relax some checks that ccache does in direct mode by setting - `CCACHE_SLOPPINESS`. See the manual for more information. +- You can relax some checks that ccache does in direct mode by setting + `CCACHE_SLOPPINESS`. See the manual for more information. - - `CCACHE_TEMPDIR` no longer needs to be on the same filesystem as - `CCACHE_DIR`. +- `CCACHE_TEMPDIR` no longer needs to be on the same filesystem as + `CCACHE_DIR`. - - The default value of `CCACHE_TEMPDIR` has been changed to - `$CCACHE_DIR/tmp` to avoid cluttering the top directory. +- The default value of `CCACHE_TEMPDIR` has been changed to `$CCACHE_DIR/tmp` + to avoid cluttering the top directory. - - Temporary files that later will be moved into the cache are now created - in the cache directory they will end up in. This makes ccache more - friendly to Linux's directory layout. +- Temporary files that later will be moved into the cache are now created in + the cache directory they will end up in. This makes ccache more friendly to + Linux's directory layout. - - Improved the test suite and added tests for most of the new - functionality. It's now also possible to specify a subset of tests to - run. +- Improved the test suite and added tests for most of the new functionality. + It's now also possible to specify a subset of tests to run. - - Standard error output from the compiler is now only stored in the cache - if it's non-empty. +- Standard error output from the compiler is now only stored in the cache if + it's non-empty. - - If the compiler produces no object file or an empty object file, but - gives a zero exit status (could be due to a file system problem, a buggy - program specified by `CCACHE_PREFIX`, etc.), ccache copes with it - properly. +- If the compiler produces no object file or an empty object file, but gives a + zero exit status (could be due to a file system problem, a buggy program + specified by `CCACHE_PREFIX`, etc.), ccache copes with it properly. - - Added `installcheck` and `distcheck` make targets. +- Added `installcheck` and `distcheck` make targets. - - Clarified cache size limit options' and cleanup semantics. +- Clarified cache size limit options' and cleanup semantics. - - Improved display of cache max size values. +- Improved display of cache max size values. - - The following options are no longer hashed in the preprocessor mode: - `-imacros`, `-imultilib`, `-iprefix`, `-iquote`, `-isysroot`, - `-iwithprefix`, `-iwithprefixbefore`, `-nostdinc`, `-nostdinc++` and - `-U`. +- The following options are no longer hashed in the preprocessor mode: + `-imacros`, `-imultilib`, `-iprefix`, `-iquote`, `-isysroot`, `-iwithprefix`, + `-iwithprefixbefore`, `-nostdinc`, `-nostdinc++` and `-U`. Bug fixes ~~~~~~~~~ - - Various portability improvements. +- Various portability improvements. - - Improved detection of home directory. +- Improved detection of home directory. - - User-defined `CPPFLAGS` and `LDFLAGS` are now respected in the Makefile. +- User-defined `CPPFLAGS` and `LDFLAGS` are now respected in the Makefile. - - Fixed NFS issues. +- Fixed NFS issues. - - Computation of the hash sum has been improved to decrease the risk of - hash collisions. For instance, the compiler options `-X -Y` and `-X-Y` - previously contributed equally to the hash sum. +- Computation of the hash sum has been improved to decrease the risk of hash + collisions. For instance, the compiler options `-X -Y` and `-X-Y` previously + contributed equally to the hash sum. - - Bail out on too hard compiler options `--coverage`, `-fprofile-arcs`, - `-fprofile-generate`, `-fprofile-use`, `-frepo`, `-ftest-coverage` and - `-save-temps`. Also bail out on `@file` style options. +- Bail out on too hard compiler options `--coverage`, `-fprofile-arcs`, + `-fprofile-generate`, `-fprofile-use`, `-frepo`, `-ftest-coverage` and + `-save-temps`. Also bail out on `@file` style options. - - Errors when using multiple `-arch` compiler options are now noted as - ``unsupported compiler option''. +- Errors when using multiple `-arch` compiler options are now noted as + ``unsupported compiler option''. - - `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly. +- `-MD`/`-MMD` options without `-MT`/`-MF` are now handled correctly. - - The `-finput-charset` option is now handled correctly. +- The `-finput-charset` option is now handled correctly. - - Added support for `-Wp,-MD` and `-Wp,-MMD` options. +- Added support for `-Wp,-MD` and `-Wp,-MMD` options. - - The compiler options `-Xassembler`, `-b`, `-G` and `-V` are now correctly - recognized as taking an argument. +- The compiler options `-Xassembler`, `-b`, `-G` and `-V` are now correctly + recognized as taking an argument. - - Debug information containing line numbers of predefined and command-line - macros (enabled with the compiler option `-g3`) will now be correct. +- Debug information containing line numbers of predefined and command-line + macros (enabled with the compiler option `-g3`) will now be correct. - - Corrected LRU cleanup handling of object files. +- Corrected LRU cleanup handling of object files. - - `utimes()` is now used instead of `utime()` when available. +- `utimes()` is now used instead of `utime()` when available. - - Non-writable cache directories are now handled gracefully. +- Non-writable cache directories are now handled gracefully. - - Corrected documentation about sharing the cache directory. +- Corrected documentation about sharing the cache directory. - - Fixed compilation warnings from GCC 4.3. +- Fixed compilation warnings from GCC 4.3. - - The command specified by `CCACHE_PREFIX` is no longer part of the hash. +- The command specified by `CCACHE_PREFIX` is no longer part of the hash. - - Fixed bad memory access spotted by Valgrind. +- Fixed bad memory access spotted by Valgrind. - - Fixed a bug in `x_realloc`. +- Fixed a bug in `x_realloc`. - - Freed memory is no longer referenced when compiling a `.i`/`.ii` file and - falling back to running the real compiler. +- Freed memory is no longer referenced when compiling a `.i`/`.ii` file and + falling back to running the real compiler. - - The test suite is now immune to external values of the `CCACHE_*` - environment variables. +- The test suite is now immune to external values of the `CCACHE_*` environment + variables. - - Improved detection of recursive invocation. +- Improved detection of recursive invocation. - - The ccache binary is now not unconditionally stripped when installing. +- The ccache binary is now not unconditionally stripped when installing. - - Statistics counters are now correctly updated for -E option failures and - internal errors. +- Statistics counters are now correctly updated for -E option failures and + internal errors. diff --git a/README.html b/README.html index f58e224..00bd6f6 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>ccache README</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p { ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content { }
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img { margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; } span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] { *
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody { @media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) { function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) { var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () { var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -736,7 +734,7 @@ asciidoc.install(2); <body class="article">
<div id="header">
<h1>ccache README</h1>
-<span id="revnumber">version 3.1.9</span>
+<span id="revnumber">version 3.1.10</span>
<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> @@ -748,7 +746,7 @@ asciidoc.install(2); <div class="sectionbody">
<div class="paragraph"><p>ccache is a compiler cache. It speeds up recompilation by caching the result of
previous compilations and detecting when the same compilation is being done
-again. Supported languages are C, C<tt>, Objective-C and Objective-C</tt>.</p></div>
+again. Supported languages are C, C<code>, Objective-C and Objective-C</code>.</p></div>
<div class="paragraph"><p>Please see the manual page and documentation at <a href="http://ccache.samba.org">http://ccache.samba.org</a> for
more information.</p></div>
</div>
@@ -771,7 +769,7 @@ more information.</p></div> <div class="paragraph"><p>The main ccache web site is here:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://ccache.samba.org</tt></pre>
+<pre><code>http://ccache.samba.org</code></pre>
</div></div>
</div>
</div>
@@ -781,7 +779,7 @@ more information.</p></div> <div class="paragraph"><p>There is a mailing list for discussing usage and development of ccache:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://lists.samba.org/mailman/listinfo/ccache/</tt></pre>
+<pre><code>http://lists.samba.org/mailman/listinfo/ccache/</code></pre>
</div></div>
<div class="paragraph"><p>Anyone is welcome to join.</p></div>
</div>
@@ -793,7 +791,7 @@ more information.</p></div> page:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://ccache.samba.org/bugs.html</tt></pre>
+<pre><code>http://ccache.samba.org/bugs.html</code></pre>
</div></div>
</div>
</div>
@@ -804,12 +802,12 @@ page:</p></div> repository, use git:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>git clone git://git.samba.org/ccache.git</tt></pre>
+<pre><code>git clone git://git.samba.org/ccache.git</code></pre>
</div></div>
<div class="paragraph"><p>You can also browse the repository:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>http://gitweb.samba.org/?p=ccache.git</tt></pre>
+<pre><code>http://gitweb.samba.org/?p=ccache.git</code></pre>
</div></div>
</div>
</div>
@@ -832,7 +830,7 @@ Thiele’s “compilercache” (see <a href="http://www.erikyyy.de/c <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Version 3.1.9<br />
+Version 3.1.10<br />
Last updated 2012-11-07 19:42:42 CET
</div>
</div>
@@ -1,13 +1,13 @@ '\" t .\" Title: ccache .\" Author: [see the "Author" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 01/06/2013 +.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> +.\" Date: 10/19/2014 .\" Manual: ccache Manual -.\" Source: ccache 3.1.9 +.\" Source: ccache 3.1.10 .\" Language: English .\" -.TH "CCACHE" "1" "01/06/2013" "ccache 3\&.1\&.9" "ccache Manual" +.TH "CCACHE" "1" "10/19/2014" "ccache 3\&.1\&.10" "ccache Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -253,7 +253,7 @@ Zero the cache statistics (but not the configured limits)\&. .RE .SH "EXTRA OPTIONS" .sp -When run as a compiler, ccache usually just takes the same command line options as the compiler you are using\&. The only exception to this is the option \fB\-\-ccache\-skip\fR\&. That option can be used to tell ccache to avoid interpreting the next option in any way and to pass it along to the compiler as\-is\&. +When run as a compiler, ccache usually just takes the same command line options as the compiler you are using\&. The only exception to this is the option \fB\-\-ccache\-skip\fR\&. That option can be used to tell ccache to avoid interpreting the next option in any way and to pass it along to the compiler as\-is\&. \fBNote\fR: \fB\-\-ccache\-skip\fR currently only tells ccache not to interpret the next option as a special compiler option \(em the option will still be included in the direct mode hash\&. .sp The reason this can be important is that ccache does need to parse the command line and determine what is an input filename and what is a compiler option, as it needs the input filename to determine the name of the resulting object file (among other things)\&. The heuristic ccache uses when parsing the command line is that any argument that exists as a file is treated as an input file name\&. By using \fB\-\-ccache\-skip\fR you can force an option to not be treated as an input file name and instead be passed along to the compiler as a command line option\&. .sp @@ -314,7 +314,6 @@ Hash the standard output and standard error output of the specified command\&. T .sp -1 .IP \(bu 2.3 .\} - %compiler% \-v .RE .sp @@ -326,7 +325,6 @@ Hash the standard output and standard error output of the specified command\&. T .sp -1 .IP \(bu 2.3 .\} - %compiler% \-dumpmachine; %compiler% \-dumpversion .RE .sp @@ -493,6 +491,13 @@ being present in the source\&. Don\(cqt check the modification time of include files in the direct mode\&. .RE .PP +\fBpch_defines\fR +.RS 4 +Be sloppy about #defines when precompiling a header file\&. See +PRECOMPILED HEADERS +for more information\&. +.RE +.PP \fBtime_macros\fR .RS 4 Ignore @@ -793,7 +798,6 @@ and .sp -1 .IP \(bu 2.3 .\} - \fB\-Xpreprocessor\fR .RE .RE @@ -937,11 +941,11 @@ ccache has support for GCC\(cqs precompiled headers\&. However, you have to do s You must set \fBCCACHE_SLOPPINESS\fR to -\fBtime_macros\fR\&. The reason is that ccache can\(cqt tell whether +\fBpch_defines,time_macros\fR\&. The reason is that ccache can\(cqt tell whether \fB__TIME__\fR or \fB__DATE__\fR -is used when using a precompiled header\&. +is used when using a precompiled header\&. Further, it can\(cqt detect changes in #defines in the source code because of how preprocessing works in combination with precompiled headers\&. .RE .sp .RS 4 @@ -2,7 +2,7 @@ * ccache -- a fast C/C++ compiler cache * * Copyright (C) 2002-2007 Andrew Tridgell - * Copyright (C) 2009-2013 Joel Rosdahl + * Copyright (C) 2009-2014 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 @@ -197,6 +197,14 @@ enum fromcache_call_mode { FROMCACHE_COMPILED_MODE }; +struct pending_tmp_file { + char *path; + struct pending_tmp_file *next; +}; + +/* Temporary files to remove at program exit. */ +static struct pending_tmp_file *pending_tmp_files = NULL; + /* * This is a string that identifies the current "version" of the hash sum * computed by ccache. If, for any reason, we want to force the hash sum to be @@ -231,23 +239,87 @@ failed(void) } static void -clean_up_tmp_files() +add_pending_tmp_file(const char *path) +{ + struct pending_tmp_file *e = x_malloc(sizeof(*e)); + e->path = x_strdup(path); + e->next = pending_tmp_files; + pending_tmp_files = e; +} + +static void +clean_up_pending_tmp_files(void) { - /* delete intermediate pre-processor file if needed */ - if (i_tmpfile) { - if (!direct_i_file) { - tmp_unlink(i_tmpfile); + struct pending_tmp_file *p = pending_tmp_files; + while (p) { + tmp_unlink(p->path); + p = p->next; + /* Leak p->path and p here because clean_up_pending_tmp_files needs to be signal + * safe. */ + } +} + +static void +signal_handler(int signo) +{ + (void)signo; + clean_up_pending_tmp_files(); +} + +static void +clean_up_internal_tempdir(void) +{ + DIR *dir; + struct dirent *entry; + struct stat st; + time_t now = time(NULL); + + stat(cache_dir, &st); + if (st.st_mtime + 3600 >= now) { + /* No cleanup needed. */ + return; + } + + update_mtime(cache_dir); + + dir = opendir(temp_dir); + if (!dir) { + return; + } + + while ((entry = readdir(dir))) { + char *path; + + if (str_eq(entry->d_name, ".") || str_eq(entry->d_name, "..")) { + continue; + } + + path = format("%s/%s", temp_dir, entry->d_name); + if (lstat(path, &st) == 0 && st.st_mtime + 3600 < now) { + tmp_unlink(path); } - free(i_tmpfile); - i_tmpfile = NULL; + free(path); } - /* delete the cpp stderr file if necessary */ - if (cpp_stderr) { - tmp_unlink(cpp_stderr); - free(cpp_stderr); - cpp_stderr = NULL; + closedir(dir); +} + +static char * +get_current_working_dir(void) +{ + if (!current_working_dir) { + char *cwd = get_cwd(); + if (cwd) { + current_working_dir = x_realpath(cwd); + free(cwd); + } + if (!current_working_dir) { + cc_log("Unable to determine current working directory: %s", + strerror(errno)); + failed(); + } } + return current_working_dir; } /* @@ -380,42 +452,57 @@ ignore: } /* - * Make a relative path from current working directory to path if CCACHE_PREFIX - * is a prefix of path. Takes over ownership of path. Caller frees. + * Make a relative path from current working directory to path if + * CCACHE_BASEDIR is a prefix of path. Takes over ownership of path. Caller + * frees. */ static char * make_relative_path(char *path) { - char *relpath, *canon_path; + char *relpath, *canon_path, *path_suffix = NULL; + struct stat st; if (!base_dir || !str_startswith(path, base_dir)) { return path; } - if (!current_working_dir) { - char *cwd = get_cwd(); - if (cwd) { - current_working_dir = x_realpath(cwd); - free(cwd); - } - if (!current_working_dir) { - cc_log("Unable to determine current working directory: %s", - strerror(errno)); - failed(); - } + /* x_realpath only works for existing paths, so if path doesn't exist, try + * dirname(path) and assemble the path afterwards. We only bother to try + * canonicalizing one of these two paths since a compiler path argument + * typically only makes sense if path or dirname(path) exists. */ + if (stat(path, &st) != 0) { + /* path doesn't exist. */ + char *dir, *p; + dir = dirname(path); + if (stat(dir, &st) != 0) { + /* And neither does its parent directory, so no action to take. */ + free(dir); + return path; + } + path_suffix = basename(path); + p = path; + path = dirname(path); + free(p); } canon_path = x_realpath(path); if (canon_path) { free(path); - path = canon_path; + relpath = get_relative_path(get_current_working_dir(), canon_path); + free(canon_path); + if (path_suffix) { + path = format("%s/%s", relpath, path_suffix); + free(relpath); + free(path_suffix); + return path; + } else { + return relpath; + } } else { /* path doesn't exist, so leave it as it is. */ + free(path_suffix); + return path; } - - relpath = get_relative_path(current_working_dir, path); - free(path); - return relpath; } /* @@ -720,14 +807,16 @@ get_object_name_from_cpp(struct args *args, struct mdfour *hash) input_base[10] = 0; } - /* now the run */ - path_stdout = format("%s/%s.tmp.%s.%s", - temp_dir, input_base, tmp_string(), i_extension); path_stderr = format("%s/tmp.cpp_stderr.%s", temp_dir, tmp_string()); + add_pending_tmp_file(path_stderr); time_of_compilation = time(NULL); if (!direct_i_file) { + path_stdout = format("%s/%s.tmp.%s.%s", + temp_dir, input_base, tmp_string(), i_extension); + add_pending_tmp_file(path_stdout); + /* run cpp on the input file to obtain the .i */ args_add(args, "-E"); args_add(args, input_file); @@ -747,10 +836,6 @@ get_object_name_from_cpp(struct args *args, struct mdfour *hash) } if (status != 0) { - if (!direct_i_file) { - tmp_unlink(path_stdout); - } - tmp_unlink(path_stderr); cc_log("Preprocessor gave exit status %d", status); stats_update(STATS_PREPROCESSOR); failed(); @@ -767,7 +852,6 @@ get_object_name_from_cpp(struct args *args, struct mdfour *hash) hash_delimiter(hash, "unifycpp"); if (unify_hash(hash, path_stdout) != 0) { stats_update(STATS_ERROR); - tmp_unlink(path_stderr); cc_log("Failed to unify %s", path_stdout); failed(); } @@ -775,7 +859,6 @@ get_object_name_from_cpp(struct args *args, struct mdfour *hash) hash_delimiter(hash, "cpp"); if (!process_preprocessed_file(hash, path_stdout)) { stats_update(STATS_ERROR); - tmp_unlink(path_stderr); failed(); } } @@ -795,7 +878,6 @@ get_object_name_from_cpp(struct args *args, struct mdfour *hash) */ cpp_stderr = path_stderr; } else { - tmp_unlink(path_stderr); free(path_stderr); } @@ -942,6 +1024,13 @@ calculate_object_hash(struct args *args, struct mdfour *hash, int direct_mode) continue; } + /* The -fdebug-prefix-map option may be used in combination with + CCACHE_BASEDIR to reuse results across different directories. Skip it + from hashing. */ + if (str_startswith(args->argv[i], "-fdebug-prefix-map=")) { + continue; + } + /* When using the preprocessor, some arguments don't contribute to the hash. The theory is that these arguments will change the output of -E if they are going to have any effect at @@ -1077,6 +1166,16 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) } /* + * Occasionally, e.g. on hard reset, our cache ends up as just filesystem + * meta-data with no content catch an easy case of this. + */ + if (st.st_size == 0) { + cc_log("Invalid (empty) object file %s in cache", cached_obj); + x_unlink(cached_obj); + return; + } + + /* * (If mode != FROMCACHE_DIRECT_MODE, the dependency file is created by * gcc.) */ @@ -1207,12 +1306,12 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) /* log the cache hit */ switch (mode) { case FROMCACHE_DIRECT_MODE: - cc_log("Succeded getting cached result"); + cc_log("Succeeded getting cached result"); stats_update(STATS_CACHEHIT_DIR); break; case FROMCACHE_CPP_MODE: - cc_log("Succeded getting cached result"); + cc_log("Succeeded getting cached result"); stats_update(STATS_CACHEHIT_CPP); break; @@ -1660,8 +1759,8 @@ cc_process_args(struct args *orig_args, struct args **preprocessor_args, if (found_pch || found_fpch_preprocess) { using_precompiled_header = true; if (!(sloppiness & SLOPPY_TIME_MACROS)) { - cc_log("You have to specify \"time_macros\" sloppiness when using" - " precompiled headers to get direct hits"); + cc_log("You have to specify \"pch_defines,time_macros\" sloppiness when" + " using precompiled headers to get direct hits"); cc_log("Disabling direct mode"); stats_update(STATS_CANTUSEPCH); result = false; @@ -1688,6 +1787,14 @@ cc_process_args(struct args *orig_args, struct args **preprocessor_args, output_is_precompiled_header = actual_language && strstr(actual_language, "-header") != NULL; + if (output_is_precompiled_header && !(sloppiness & SLOPPY_PCH_DEFINES)) { + cc_log("You have to specify \"pch_defines,time_macros\" sloppiness when" + " creating precompiled headers"); + stats_update(STATS_CANTUSEPCH); + result = false; + goto out; + } + if (!found_c_opt) { if (output_is_precompiled_header) { args_add(stripped_args, "-c"); @@ -1894,6 +2001,10 @@ parse_sloppiness(char *p) cc_log("Being sloppy about __DATE__ and __TIME__"); result |= SLOPPY_TIME_MACROS; } + if (str_eq(word, "pch_defines")) { + cc_log("Being sloppy about PCH #defines"); + result |= SLOPPY_PCH_DEFINES; + } q = NULL; } free(p); @@ -1925,7 +2036,7 @@ setup_uncached_err(void) /* the main ccache driver function */ static void -ccache(int argc, char *argv[]) +ccache(char *argv[]) { bool put_object_in_manifest = false; struct file_hash *object_hash; @@ -1941,14 +2052,8 @@ ccache(int argc, char *argv[]) /* Arguments to send to the real compiler. */ struct args *compiler_args; - find_compiler(argc, argv); setup_uncached_err(); - if (getenv("CCACHE_DISABLE")) { - cc_log("ccache is disabled"); - failed(); - } - if (!getenv("CCACHE_READONLY")) { if (create_cachedirtag(cache_dir) != 0) { cc_log("failed to create %s/CACHEDIR.TAG (%s)\n", @@ -1961,7 +2066,7 @@ ccache(int argc, char *argv[]) cc_log_argv("Command line: ", argv); cc_log("Hostname: %s", get_hostname()); - cc_log("Working directory: %s", current_working_dir); + cc_log("Working directory: %s", get_current_working_dir()); if (base_dir) { cc_log("Base directory: %s", base_dir); @@ -2202,10 +2307,15 @@ ccache_main(int argc, char *argv[]) { char *p; char *program_name; + bool external_tempdir; + + signal(SIGHUP, signal_handler); + signal(SIGINT, signal_handler); + signal(SIGTERM, signal_handler); exitfn_init(); exitfn_add_nullary(stats_flush); - exitfn_add_nullary(clean_up_tmp_files); + exitfn_add_nullary(clean_up_pending_tmp_files); /* check for logging early so cc_log messages start working ASAP */ cache_logfile = getenv("CCACHE_LOGFILE"); @@ -2247,13 +2357,16 @@ ccache_main(int argc, char *argv[]) } free(program_name); - check_cache_dir(); + /* find_compiler sets up orig_args, needed by failed(), so do it early. */ + find_compiler(argc, argv); - temp_dir = getenv("CCACHE_TEMPDIR"); - if (!temp_dir) { - temp_dir = format("%s/tmp", cache_dir); + if (getenv("CCACHE_DISABLE")) { + cc_log("ccache is disabled"); + failed(); } + check_cache_dir(); + base_dir = getenv("CCACHE_BASEDIR"); if (base_dir && base_dir[0] != '/') { cc_log("Ignoring non-absolute base directory %s", base_dir); @@ -2271,6 +2384,13 @@ ccache_main(int argc, char *argv[]) } /* make sure the temp dir exists */ + temp_dir = getenv("CCACHE_TEMPDIR"); + if (temp_dir) { + external_tempdir = true; + } else { + temp_dir = format("%s/tmp", cache_dir); + external_tempdir = false; + } if (create_dir(temp_dir) != 0) { fprintf(stderr, "ccache: failed to create %s (%s)\n", @@ -2278,6 +2398,10 @@ ccache_main(int argc, char *argv[]) exit(1); } - ccache(argc, argv); + if (!external_tempdir) { + clean_up_internal_tempdir(); + } + + ccache(argv); return 1; } @@ -7,8 +7,10 @@ #ifdef __GNUC__ #define ATTR_FORMAT(x, y, z) __attribute__((format (x, y, z))) +#define ATTR_NORETURN __attribute__((noreturn)); #else #define ATTR_FORMAT(x, y, z) +#define ATTR_NORETURN #endif #ifndef MYNAME @@ -55,6 +57,7 @@ enum stats { #define SLOPPY_INCLUDE_FILE_MTIME 1 #define SLOPPY_FILE_MACRO 2 #define SLOPPY_TIME_MACROS 4 +#define SLOPPY_PCH_DEFINES 8 #define str_eq(s1, s2) (strcmp((s1), (s2)) == 0) #define str_startswith(s, p) (strncmp((s), (p), strlen((p))) == 0) @@ -100,7 +103,7 @@ bool hash_file(struct mdfour *md, const char *fname); void cc_log(const char *format, ...) ATTR_FORMAT(printf, 1, 2); void cc_log_argv(const char *prefix, char **argv); -void fatal(const char *format, ...) ATTR_FORMAT(printf, 1, 2); +void fatal(const char *format, ...) ATTR_FORMAT(printf, 1, 2) ATTR_NORETURN; void copy_fd(int fd_in, int fd_out); int copy_file(const char *src, const char *dest, int compress_dest); @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Joel Rosdahl + * Copyright (C) 2010, 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 @@ -49,6 +49,7 @@ static const struct compopt compopts[] = { {"-U", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG}, {"-V", TAKES_ARG}, {"-Xassembler", TAKES_ARG}, + {"-Xclang", TAKES_ARG}, {"-Xlinker", TAKES_ARG}, {"-Xpreprocessor", TOO_HARD_DIRECT | TAKES_ARG}, {"-aux-info", TAKES_ARG}, @@ -59,6 +60,7 @@ static const struct compopt compopts[] = { {"-fprofile-use", TOO_HARD}, {"-frepo", TOO_HARD}, {"-ftest-coverage", TOO_HARD}, + {"-gsplit-dwarf", TOO_HARD}, {"-idirafter", AFFECTS_CPP | TAKES_ARG | TAKES_PATH}, {"-iframework", AFFECTS_CPP | TAKES_ARG | TAKES_CONCAT_ARG | TAKES_PATH}, {"-imacros", AFFECTS_CPP | TAKES_ARG | TAKES_PATH}, @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -212,21 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -328,6 +356,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -504,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1125,8 +1145,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1352,9 +1370,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1467,7 +1485,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1828,7 +1846,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2211,7 +2229,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2251,7 +2269,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2304,7 +2322,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2345,7 +2363,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2403,7 +2421,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2447,7 +2465,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2893,8 +2911,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3182,7 +3199,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3255,7 +3272,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3295,7 +3312,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3347,7 +3364,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3387,7 +3404,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3801,7 +3818,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3867,7 +3884,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4052,60 +4069,60 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdbool.h> -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; + #include <stdbool.h> + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; int main () { - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); ; return 0; @@ -4120,7 +4137,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } -ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -4130,6 +4147,7 @@ _ACEOF fi + if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h @@ -4421,6 +4439,63 @@ done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes; then : hw_cv_func_vsnprintf=yes @@ -4519,75 +4594,47 @@ _ACEOF fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if test "$cross_compiling" = yes; then : ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <limits.h> - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int main () { long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_long_long_int=yes + else ac_cv_type_long_long_int=no fi @@ -4595,11 +4642,8 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -else - ac_cv_type_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } @@ -4615,7 +4659,9 @@ $as_echo_n "checking for unsigned long long int... " >&6; } if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many @@ -4648,12 +4694,13 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_type_unsigned_long_long_int=yes + else ac_cv_type_unsigned_long_long_int=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } @@ -4728,7 +4775,8 @@ int main () { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -4782,11 +4830,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -4803,8 +4851,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -4820,10 +4869,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -4930,11 +4979,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -4951,8 +5000,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -4968,10 +5018,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -5144,11 +5194,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -5165,8 +5215,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -5182,10 +5233,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -5255,11 +5306,11 @@ else int main () { -/* FIXME: Include the comments suggested by Paul. */ + #ifndef __cplusplus - /* Ultrix mips cc rejects this. */ + /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; - const charset cs; + const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; @@ -5276,8 +5327,9 @@ main () ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; + { /* SCO 3.2v4 cc rejects this sort of thing. */ + char tx; + char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; @@ -5293,10 +5345,10 @@ main () iptr p = 0; ++p; } - { /* AIX XL C 1.02.0.0 rejects this saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; + struct s { int j; const int *ap[3]; } bx; + struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; @@ -5982,16 +6034,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -6051,28 +6103,16 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -6094,7 +6134,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6156,10 +6196,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.68, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -6248,7 +6288,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -19,10 +19,6 @@ #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); @@ -170,37 +166,37 @@ int execute(char **argv, const char *path_stdout, const char *path_stderr) { pid_t pid; - int status; + int status, fd_out, fd_err; cc_log_argv("Executing ", argv); + tmp_unlink(path_stdout); + fd_out = open(path_stdout, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666); + if (fd_out == -1) { + fatal("Error creating %s: %s", path_stdout, strerror(errno)); + } + + tmp_unlink(path_stderr); + fd_err = open(path_stderr, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666); + if (fd_err == -1) { + fatal("Error creating %s: %s", path_stderr, strerror(errno)); + } + pid = fork(); if (pid == -1) fatal("Failed to fork: %s", strerror(errno)); if (pid == 0) { - int fd; - - tmp_unlink(path_stdout); - fd = open(path_stdout, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666); - if (fd == -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) { - cc_log("Error creating %s: %s", path_stderr, strerror(errno)); - exit(FAILED_TO_CREATE_STDERR); - } - dup2(fd, 2); - close(fd); - + /* Child. */ + dup2(fd_out, 1); + close(fd_out); + dup2(fd_err, 2); + close(fd_err); exit(execv(argv[0], argv)); } + close(fd_out); + close(fd_err); + if (waitpid(pid, &status, 0) != pid) { fatal("waitpid failed: %s", strerror(errno)); } @@ -209,12 +205,6 @@ execute(char **argv, const char *path_stdout, const char *path_stderr) 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 diff --git a/hashtable.c b/hashtable.c index 68d34e8..5340383 100644 --- a/hashtable.c +++ b/hashtable.c @@ -99,7 +99,7 @@ hash(struct hashtable *h, void *k) static int hashtable_expand(struct hashtable *h) { - /* Double the size of the table to accomodate more entries */ + /* Double the size of the table to accommodate more entries */ struct entry **newtable; struct entry *e; struct entry **pE; @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010, 2012 Joel Rosdahl + * Copyright (C) 2009-2014 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 @@ -65,6 +65,7 @@ static const uint32_t MAGIC = 0x63436d46U; static const uint8_t VERSION = 0; static const uint32_t MAX_MANIFEST_ENTRIES = 100; +static const uint32_t MAX_MANIFEST_FILE_INFO_ENTRIES = 10000; #define ccache_static_assert(e) \ do { enum { ccache_static_assert__ = 1/(e) }; } while (0) @@ -124,7 +125,7 @@ file_infos_equal(void *key1, void *key2) static void free_manifest(struct manifest *mf) { - uint16_t i; + uint32_t i; for (i = 0; i < mf->n_files; i++) { free(mf->files[i]); } @@ -137,6 +138,16 @@ free_manifest(struct manifest *mf) free(mf); } +#define READ_BYTE(var) \ + do { \ + int ch_; \ + ch_ = gzgetc(f); \ + if (ch_ == EOF) { \ + goto error; \ + } \ + (var) = ch_ & 0xFF; \ + } while (0) + #define READ_INT(size, var) \ do { \ int ch_; \ @@ -207,7 +218,7 @@ static struct manifest * read_manifest(gzFile f) { struct manifest *mf; - uint16_t i, j; + uint32_t i, j; uint32_t magic; uint8_t version; uint16_t dummy; @@ -220,14 +231,14 @@ read_manifest(gzFile f) free_manifest(mf); return NULL; } - READ_INT(1, version); + READ_BYTE(version); if (version != VERSION) { cc_log("Manifest file has unknown version %u", version); free_manifest(mf); return NULL; } - READ_INT(1, mf->hash_size); + READ_BYTE(mf->hash_size); if (mf->hash_size != 16) { /* Temporary measure until we support different hash algorithms. */ cc_log("Manifest file has unsupported hash size %u", mf->hash_size); @@ -305,7 +316,7 @@ error: static int write_manifest(gzFile f, const struct manifest *mf) { - uint16_t i, j; + uint32_t i, j; WRITE_INT(4, MAGIC); WRITE_INT(1, VERSION); @@ -630,6 +641,15 @@ manifest_put(const char *manifest_path, struct file_hash *object_hash, MAX_MANIFEST_ENTRIES); free_manifest(mf); mf = create_empty_manifest(); + } else if (mf->n_file_infos > MAX_MANIFEST_FILE_INFO_ENTRIES) { + /* Rarely, file_info entries can grow large in pathological cases where + * many included files change, but the main file does not. This also puts + * an upper bound on the number of file_info entries. + */ + cc_log("More than %u file_info entries in manifest file; discarding", + MAX_MANIFEST_FILE_INFO_ENTRIES); + free_manifest(mf); + mf = create_empty_manifest(); } tmp_file = format("%s.tmp.%s", manifest_path, tmp_string()); @@ -1,6 +1,6 @@ /* * Copyright (C) 2002-2004 Andrew Tridgell - * Copyright (C) 2009-2011 Joel Rosdahl + * Copyright (C) 2009-2014 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 @@ -200,9 +200,13 @@ stats_flush(void) int i; extern char *cache_logfile; - if (getenv("CCACHE_NOSTATS")) return; + if (getenv("CCACHE_NOSTATS")) { + return; + } - init_counter_updates(); + if (!counter_updates) { + return; + } for (i = 0; i < STATS_END; ++i) { if (counter_updates->data[i] > 0) { @@ -210,7 +214,9 @@ stats_flush(void) break; } } - if (!should_flush) return; + if (!should_flush) { + return; + } if (!stats_file) { char *stats_dir; @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Joel Rosdahl + * Copyright (C) 2010-2014 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 @@ -37,13 +37,14 @@ #include <errno.h> #include <fcntl.h> #include <inttypes.h> +#include <signal.h> #include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> #include <time.h> +#include <unistd.h> #include <utime.h> #if !HAVE_VSNPRINTF @@ -3,7 +3,7 @@ # A simple test suite for ccache. # # Copyright (C) 2002-2007 Andrew Tridgell -# Copyright (C) 2009-2012 Joel Rosdahl +# Copyright (C) 2009-2014 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 Software @@ -216,7 +216,12 @@ base_tests() { checkstat 'no input file' 1 testname="CCACHE_DISABLE" + mv $CCACHE_DIR $CCACHE_DIR.saved CCACHE_DISABLE=1 $CCACHE_COMPILE -c test1.c 2> /dev/null + if [ -d $CCACHE_DIR ]; then + test_failed "$CCACHE_DIR created dispite CCACHE_DISABLE being set" + fi + mv $CCACHE_DIR.saved $CCACHE_DIR checkstat 'cache hit (preprocessed)' 3 $CCACHE_COMPILE -c test1.c checkstat 'cache hit (preprocessed)' 4 @@ -562,6 +567,12 @@ int test3; EOF backdate test1.h test2.h test3.h + $COMPILER -c -Wp,-MD,expected.d test.c + expected_d_content=`cat expected.d` + + $COMPILER -c -Wp,-MMD,expected_mmd.d test.c + expected_mmd_d_content=`cat expected_mmd.d` + ################################################################## # First compilation is a miss. testname="first compilation" @@ -677,7 +688,7 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_d_content" rm -f other.d @@ -685,7 +696,7 @@ EOF checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_d_content" rm -f other.d @@ -698,7 +709,7 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_mmd_d_content" rm -f other.d @@ -706,7 +717,7 @@ EOF checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_mmd_d_content" rm -f other.d @@ -760,7 +771,7 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile test.d "test.o: test.c test1.h test3.h test2.h" + checkfile test.d "$expected_d_content" rm -f test.d @@ -768,7 +779,7 @@ EOF checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile test.d "test.o: test.c test1.h test3.h test2.h" + checkfile test.d "$expected_d_content" ################################################################## # Check the scenario of running a ccache with direct mode on a cache @@ -780,7 +791,7 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile test.d "test.o: test.c test1.h test3.h test2.h" + checkfile test.d "$expected_d_content" rm -f test.d @@ -788,7 +799,7 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 1 checkstat 'cache miss' 1 - checkfile test.d "test.o: test.c test1.h test3.h test2.h" + checkfile test.d "$expected_d_content" rm -f test.d @@ -796,7 +807,7 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 2 checkstat 'cache miss' 1 - checkfile test.d "test.o: test.c test1.h test3.h test2.h" + checkfile test.d "$expected_d_content" rm -f test.d @@ -804,7 +815,7 @@ EOF checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 2 checkstat 'cache miss' 1 - checkfile test.d "test.o: test.c test1.h test3.h test2.h" + checkfile test.d "$expected_d_content" ################################################################## # Check that -MF works. @@ -815,7 +826,7 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_d_content" rm -f other.d @@ -823,7 +834,7 @@ EOF checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_d_content" ################################################################## # Check that a missing .d file in the cache is handled correctly. @@ -835,13 +846,13 @@ EOF checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_d_content" $CCACHE $COMPILER -c -MD test.c checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_d_content" find $CCACHE_DIR -name '*.d' -exec rm -f '{}' \; @@ -849,7 +860,7 @@ EOF checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 1 checkstat 'cache miss' 1 - checkfile other.d "test.o: test.c test1.h test3.h test2.h" + checkfile other.d "$expected_d_content" ################################################################## # Check that stderr from both the preprocessor and the compiler is emitted @@ -1091,11 +1102,11 @@ EOF #define time __TIME__ int test; EOF - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c time.c + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c time.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c time.c + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c time.c checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 @@ -1110,11 +1121,11 @@ EOF cat <<EOF >time_h.c #include "time.h" EOF - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c time_h.c + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c time_h.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c time_h.c + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c time_h.c checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 @@ -1701,18 +1712,39 @@ EOF fi ################################################################## - # Tests for creating a .gch. + # Tests for creating a .gch without opt-in. backdate pch.h - testname="create .gch, -c, no -o" + testname="create .gch, -c, no -o, without opt-in" $CCACHE -zC >/dev/null $CCACHE $COMPILER -c pch.h checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 + checkstat 'cache miss' 0 + checkstat "can't use precompiled header" 1 + + testname="create .gch, no -c, -o, without opt-in" + $CCACHE -Cz >/dev/null + $CCACHE $COMPILER pch.h -o pch.gch + checkstat 'cache hit (direct)' 0 + checkstat 'cache hit (preprocessed)' 0 + checkstat 'cache miss' 0 + checkstat "can't use precompiled header" 1 + + ################################################################## + # Tests for creating a .gch with opt-in. + + backdate pch.h + + testname="create .gch, -c, no -o, with opt-in" + $CCACHE -zC >/dev/null + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c pch.h + checkstat 'cache hit (direct)' 0 + checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 rm -f pch.h.gch - $CCACHE $COMPILER -c pch.h + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c pch.h checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 @@ -1720,13 +1752,13 @@ EOF test_failed "pch.h.gch missing" fi - testname="create .gch, no -c, -o" + testname="create .gch, no -c, -o, with opt-in" $CCACHE -Cz >/dev/null - $CCACHE $COMPILER pch.h -o pch.gch + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER pch.h -o pch.gch checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - $CCACHE $COMPILER pch.h -o pch.gch + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER pch.h -o pch.gch checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 @@ -1750,7 +1782,7 @@ EOF # trying to preprocess: checkstat 'preprocessor error' 1 - testname="no -fpch-preprocess, -include, no sloppy time macros" + testname="no -fpch-preprocess, -include, no sloppiness" $CCACHE -Cz >/dev/null $CCACHE $COMPILER -c -include pch.h pch2.c 2>/dev/null checkstat 'cache hit (direct)' 0 @@ -1761,16 +1793,16 @@ EOF testname="no -fpch-preprocess, -include" $CCACHE -Cz >/dev/null - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -include pch.h pch2.c 2>/dev/null + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -include pch.h pch2.c 2>/dev/null checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -include pch.h pch2.c 2>/dev/null + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -include pch.h pch2.c 2>/dev/null checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - testname="-fpch-preprocess, #include, no sloppy time macros" + testname="-fpch-preprocess, #include, no sloppiness" $CCACHE -Cz >/dev/null $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 0 @@ -1778,13 +1810,13 @@ EOF # Must enable sloppy time macros: checkstat "can't use precompiled header" 1 - testname="-fpch-preprocess, #include, sloppy time macros" + testname="-fpch-preprocess, #include, sloppiness" $CCACHE -Cz >/dev/null - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 @@ -1792,18 +1824,18 @@ EOF testname="-fpch-preprocess, #include, file changed" echo "updated" >>pch.h.gch # GCC seems to cope with this... backdate pch.h.gch - CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c + CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 1 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 2 testname="preprocessor mode" $CCACHE -Cz >/dev/null - CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c + CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 0 checkstat 'cache miss' 1 - CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c + CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 1 checkstat 'cache miss' 1 @@ -1811,11 +1843,11 @@ EOF testname="preprocessor mode, file changed" echo "updated" >>pch.h.gch # GCC seems to cope with this... backdate pch.h.gch - CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c + CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 1 checkstat 'cache miss' 2 - CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c + CCACHE_NODIRECT=1 CCACHE_SLOPPINESS=pch_defines,time_macros $CCACHE $COMPILER -c -fpch-preprocess pch.c checkstat 'cache hit (direct)' 0 checkstat 'cache hit (preprocessed)' 2 checkstat 'cache miss' 2 diff --git a/test/test_argument_processing.c b/test/test_argument_processing.c index 94e46f4..6ed0daa 100644 --- a/test/test_argument_processing.c +++ b/test/test_argument_processing.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2012 Joel Rosdahl + * Copyright (C) 2010-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 @@ -90,20 +90,19 @@ TEST(sysroot_should_be_rewritten_if_basedir_is_used) { extern char *base_dir; extern char *current_working_dir; - struct args *orig = - args_init_from_string("cc --sysroot=/some/directory -c foo.c"); + char *arg_string; + struct args *orig; struct args *act_cpp = NULL, *act_cc = NULL; - create_file("foo.c", ""); - - CHECK(cc_process_args(orig, &act_cpp, &act_cc)); - CHECK_STR_EQ(act_cpp->argv[1], "--sysroot=/some/directory"); - cc_reset(); - base_dir = "/some"; + create_file("foo.c", ""); current_working_dir = get_cwd(); + arg_string = format("cc --sysroot=%s/foo -c foo.c", current_working_dir); + orig = args_init_from_string(arg_string); + + base_dir = "/"; CHECK(cc_process_args(orig, &act_cpp, &act_cc)); - CHECK(str_startswith(act_cpp->argv[1], "--sysroot=../")); + CHECK(str_startswith(act_cpp->argv[1], "--sysroot=./foo")); args_free(orig); base_dir = NULL; diff --git a/test/test_util.c b/test/test_util.c index 10478ba..258c327 100644 --- a/test/test_util.c +++ b/test/test_util.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010, 2012 Joel Rosdahl + * Copyright (C) 2010, 2012-2014 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 @@ -36,6 +36,8 @@ TEST(basename) TEST(dirname) { CHECK_STR_EQ_FREE2(".", dirname("foo.c")); + CHECK_STR_EQ_FREE2(".", dirname("")); + CHECK_STR_EQ_FREE2("/", dirname("/")); CHECK_STR_EQ_FREE2("dir1/dir2", dirname("dir1/dir2/foo.c")); CHECK_STR_EQ_FREE2("/dir", dirname("/dir/foo.c")); CHECK_STR_EQ_FREE2("dir1/dir2", dirname("dir1/dir2/")); @@ -51,6 +53,8 @@ TEST(common_dir_prefix_length) CHECK_UNS_EQ(2, common_dir_prefix_length("/a", "/a/b")); CHECK_UNS_EQ(2, common_dir_prefix_length("/a/b", "/a/c")); CHECK_UNS_EQ(4, common_dir_prefix_length("/a/b", "/a/b")); + CHECK_INT_EQ(2, common_dir_prefix_length("/a/bc", "/a/b")); + CHECK_INT_EQ(2, common_dir_prefix_length("/a/b", "/a/bc")); } TEST(get_relative_path) @@ -1,6 +1,6 @@ /* * Copyright (C) 2002 Andrew Tridgell - * Copyright (C) 2009-2013 Joel Rosdahl + * Copyright (C) 2009-2014 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 @@ -184,7 +184,7 @@ mkstemp(char *template) int copy_file(const char *src, const char *dest, int compress_dest) { - int fd_in = -1, fd_out = -1; + int fd_in, fd_out; gzFile gz_in = NULL, gz_out = NULL; char buf[10240]; int n, written; @@ -692,7 +692,9 @@ dirname(char *s) #endif if (p < p2) p = p2; - if (p) { + if (p == s) { + return s; + } else if (p) { *p = 0; return s; } else { @@ -984,24 +986,14 @@ common_dir_prefix_length(const char *s1, const char *s2) ++p1; ++p2; } - if (*p2 == '/') { - /* s2 starts with "s1/". */ - return p1 - s1; - } - if (!*p2) { - /* s2 is equal to s1. */ - if (p2 == s2 + 1) { - /* Special case for s1 and s2 both being "/". */ - return 0; - } else { - return p1 - s1; - } - } - /* Compute the common directory prefix */ - while (p1 > s1 && *p1 != '/') { + while ((*p1 && *p1 != '/') || (*p2 && *p2 != '/')) { p1--; p2--; } + if (!*p1 && !*p2 && p2 == s2 + 1) { + /* Special case for s1 and s2 both being "/". */ + return 0; + } return p1 - s1; } @@ -1149,13 +1141,6 @@ x_readlink(const char *path) long maxlen = path_max(path); ssize_t len; char *buf; -#ifdef PATH_MAX - maxlen = PATH_MAX; -#elif defined(MAXPATHLEN) - maxlen = MAXPATHLEN; -#elif defined(_PC_PATH_MAX) - maxlen = pathconf(path, _PC_PATH_MAX); -#endif if (maxlen < 4096) maxlen = 4096; buf = x_malloc(maxlen); @@ -1193,7 +1178,6 @@ read_file(const char *path, size_t size_hint, char **data, size_t *size) } allocated = size_hint; *data = x_malloc(allocated); - ret = 0; while (true) { if (pos > allocated / 2) { allocated *= 2; @@ -1 +1 @@ -const char CCACHE_VERSION[] = "3.1.9"; +const char CCACHE_VERSION[] = "3.1.10"; |