Imported Upstream version 3.3.4 upstream/3.3.4
authorJinWang An <jinwang.an@samsung.com>
Tue, 3 Aug 2021 07:18:11 +0000 (16:18 +0900)
committerJinWang An <jinwang.an@samsung.com>
Tue, 3 Aug 2021 07:18:11 +0000 (16:18 +0900)
16 files changed:
AUTHORS.html
AUTHORS.txt
LICENSE.html
LICENSE.txt
MANUAL.html
MANUAL.txt
NEWS.html
NEWS.txt
ccache.1
ccache.c
configure
configure.ac
manifest.c
murmurhashneutral2.c
test.sh
version.c

index bf9e4c02bd23c5503722e986254dd2e3c186cd35..5079e1ff197902c2a9cdee496547c6965b45f904 100644 (file)
@@ -734,7 +734,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>ccache authors</h1>\r
-<span id="revnumber">version 3.3.3</span>\r
+<span id="revnumber">version 3.3.4</span>\r
 <div id="toc">
   <div id="toctitle">Table of Contents</div>
   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
@@ -754,7 +754,7 @@ Alfred Landrum &lt;<a href="mailto:alfred.landrum@riverbed.com">alfred.landrum@r
 </li>\r
 <li>\r
 <p>\r
-Anders Björklund &lt;<a href="mailto:anders@itension.se">anders@itension.se</a>&gt;\r
+Anders Björklund &lt;<a href="mailto:anders@psqr.se">anders@psqr.se</a>&gt;\r
 </p>\r
 </li>\r
 <li>\r
@@ -999,6 +999,11 @@ Pavel Boldin &lt;<a href="mailto:pboldin@cloudlinux.com">pboldin@cloudlinux.com<
 </li>\r
 <li>\r
 <p>\r
+Philippe Proulx &lt;<a href="mailto:eeppeliteloop@gmail.com">eeppeliteloop@gmail.com</a>&gt;\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
 RW &lt;<a href="mailto:fbsd06@mlists.homeunix.com">fbsd06@mlists.homeunix.com</a>&gt;\r
 </p>\r
 </li>\r
@@ -1065,9 +1070,9 @@ Yiding Jia &lt;<a href="mailto:yiding@fb.com">yiding@fb.com</a>&gt;
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Version 3.3.3<br />\r
+Version 3.3.4<br />\r
 Last updated\r
- 2016-10-26 23:04:27 CEST\r
+ 2017-02-17 22:27:14 CET\r
 </div>\r
 </div>\r
 </body>\r
index f6dffa4716e6353b92731ced9a3a2797d45057ac..ec52d852b9cb753849d789ddf8d8695347ede17b 100644 (file)
@@ -7,7 +7,7 @@ maintained by Joel Rosdahl.
 ccache is a collective work with contributions from many people, including:
 
 * Alfred Landrum <alfred.landrum@riverbed.com>
-* Anders Björklund <anders@itension.se>
+* Anders Björklund <anders@psqr.se>
 * Andrea Bittau <a.bittau@cs.ucl.ac.uk>
 * Andrew P Boie <andrew.p.boie@intel.com>
 * Andrew Stubbs <ams@codesourcery.com>
@@ -56,6 +56,7 @@ ccache is a collective work with contributions from many people, including:
 * Patrick von Reth <vonreth@kde.org>
 * Paul Griffith <paulg@cse.yorku.ca>
 * Pavel Boldin <pboldin@cloudlinux.com>
+* Philippe Proulx <eeppeliteloop@gmail.com>
 * RW <fbsd06@mlists.homeunix.com>
 * Ramiro Polla <ramiro.polla@gmail.com>
 * Robin H. Johnson <robbat2@gentoo.org>
index 65cebd120591e514b9d68556ebe89e61726a0c27..6b43c897afebab3c882bcac694fcf8513d14feac 100644 (file)
@@ -734,7 +734,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>ccache copyright and license</h1>\r
-<span id="revnumber">version 3.3.3</span>\r
+<span id="revnumber">version 3.3.4</span>\r
 <div id="toc">
   <div id="toctitle">Table of Contents</div>
   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
@@ -776,7 +776,7 @@ copyrights on their portions of the work.</p></div>
 <div class="listingblock">\r
 <div class="content">\r
 <pre><code>  Copyright (C) 2002-2007 Andrew Tridgell\r
-  Copyright (C) 2009-2016 Joel Rosdahl</code></pre>\r
+  Copyright (C) 2009-2017 Joel Rosdahl</code></pre>\r
 </div></div>\r
 </div>\r
 </div>\r
@@ -1205,9 +1205,9 @@ following license:</p></div>
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Version 3.3.3<br />\r
+Version 3.3.4<br />\r
 Last updated\r
- 2016-10-26 23:04:27 CEST\r
+ 2017-02-17 22:27:14 CET\r
 </div>\r
 </div>\r
 </body>\r
index a84107298853fa0657c70b82d4240a457410ff11..5bf7883953095759c1852235427e206324a9c4c7 100644 (file)
@@ -38,7 +38,7 @@ The copyright for ccache as a whole is as follows:
 
 -------------------------------------------------------------------------------
   Copyright (C) 2002-2007 Andrew Tridgell
-  Copyright (C) 2009-2016 Joel Rosdahl
+  Copyright (C) 2009-2017 Joel Rosdahl
 -------------------------------------------------------------------------------
 
 
index 1ac466f6da08adc23b087cf8b57b4ebd5457208a..1f2e5d9899ac89313bc947044660fabdc16aa3c6 100644 (file)
@@ -734,7 +734,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>CCACHE(1)</h1>\r
-<span id="revnumber">version 3.3.3</span>\r
+<span id="revnumber">version 3.3.4</span>\r
 <div id="toc">
   <div id="toctitle">Table of Contents</div>
   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
@@ -991,10 +991,17 @@ compiler options apply and you should refer to the compiler&#8217;s documentatio
 <div class="paragraph"><p>When run as a compiler, ccache usually just takes the same command line options\r
 as the compiler you are using. The only exception to this is the option\r
 <strong>--ccache-skip</strong>. That option can be used to tell ccache to avoid interpreting\r
-the next option in any way and to pass it along to the compiler as-is. <strong>Note</strong>:\r
-<strong>--ccache-skip</strong> currently only tells ccache not to interpret the next option as\r
-a special compiler option&#8201;&#8212;&#8201;the option will still be included in the direct\r
-mode hash.</p></div>\r
+the next option in any way and to pass it along to the compiler as-is.</p></div>\r
+<div class="admonitionblock">\r
+<table><tr>\r
+<td class="icon">\r
+<div class="title">Note</div>\r
+</td>\r
+<td class="content"><strong>--ccache-skip</strong> currently only tells ccache not to interpret the next\r
+option as a special compiler option&#8201;&#8212;&#8201;the option will still be included in the\r
+direct mode hash.</td>\r
+</tr></table>\r
+</div>\r
 <div class="paragraph"><p>The reason this can be important is that ccache does need to parse the command\r
 line and determine what is an input filename and what is a compiler option, as\r
 it needs the input filename to determine the name of the resulting object file\r
@@ -1183,18 +1190,14 @@ setting key.</p></div>
 </p>\r
 <div class="openblock">\r
 <div class="content">\r
-<div class="ulist"><ul>\r
-<li>\r
-<p>\r
-<code>%compiler% -v</code>\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
-<code>%compiler% -dumpmachine; %compiler% -dumpversion</code>\r
-</p>\r
-</li>\r
-</ul></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><code>%compiler% -v</code></pre>\r
+</div></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><code>%compiler% -dumpmachine; %compiler% -dumpversion</code></pre>\r
+</div></div>\r
 <div class="paragraph"><p>You should make sure that the specified command is as fast as possible since it\r
 will be run once for each ccache invocation.</p></div>\r
 <div class="paragraph"><p>Identifying the compiler using a command is useful if you want to avoid cache\r
@@ -1300,19 +1303,13 @@ the <strong>prefix_command</strong> setting if possible. See
     Exception: The CWD will not be included in the hash if <strong>base_dir</strong> is set\r
     (and matches the CWD) and the compiler option <strong>-fdebug-prefix-map</strong> is used.\r
 </p>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><code>The reason for including the CWD in the hash by default is to prevent a\r
-problem with the storage of the current working directory in the debug info\r
-of an object file, which can lead ccache to return a cached object file\r
-that has the working directory in the debug info set incorrectly.</code></pre>\r
-</div></div>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><code>You can disable this setting to get cache hits when compiling the same\r
-source code in different directories if you don't mind that CWD in the\r
-debug info might be incorrect.</code></pre>\r
-</div></div>\r
+<div class="paragraph"><p>The reason for including the CWD in the hash by default is to prevent a problem\r
+with the storage of the current working directory in the debug info of an\r
+object file, which can lead ccache to return a cached object file that has the\r
+working directory in the debug info set incorrectly.</p></div>\r
+<div class="paragraph"><p>You can disable this setting to get cache hits when compiling the same source\r
+code in different directories if you don&#8217;t mind that CWD in the debug info\r
+might be incorrect.</p></div>\r
 </dd>\r
 <dt class="hdlist1">\r
 <strong>ignore_headers_in_manifest</strong> (<strong>CCACHE_IGNOREHEADERS</strong>)\r
@@ -1443,15 +1440,12 @@ debug info might be incorrect.</code></pre>
     cache miss run the compiler on the source code to get hold of the object\r
     file. This is the default.\r
 </p>\r
-<div class="literalblock">\r
-<div class="content">\r
-<pre><code>If false, ccache will first run preprocessor to preprocess the source code\r
-and then on a cache miss run the compiler on the _preprocessed source code_\r
-instead of the original source code. This makes cache misses slightly\r
-faster since the source code only has to be preprocessed once. The downside\r
-is that some compilers won't produce the same result (for instance\r
-diagnostics warnings) when compiling preprocessed source code.</code></pre>\r
-</div></div>\r
+<div class="paragraph"><p>If false, ccache will first run preprocessor to preprocess the source code and\r
+then on a cache miss run the compiler on the <em>preprocessed source code</em> instead\r
+of the original source code. This makes cache misses slightly faster since the\r
+source code only has to be preprocessed once. The downside is that some\r
+compilers won&#8217;t produce the same result (for instance diagnostics warnings)\r
+when compiling preprocessed source code.</p></div>\r
 </dd>\r
 <dt class="hdlist1">\r
 <strong>sloppiness</strong> (<strong>CCACHE_SLOPPINESS</strong>)\r
@@ -1616,6 +1610,155 @@ the compression level with <strong>compression_level</strong>.</p></div>
 </div>\r
 </div>\r
 <div class="sect1">\r
+<h2 id="_cache_statistics">Cache statistics</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p><strong>ccache -s/--show-stats</strong> can show the following statistics:</p></div>\r
+<div class="tableblock">\r
+<table rules="all"\r
+width="100%"\r
+frame="border"\r
+cellspacing="0" cellpadding="4">\r
+<col width="30%" />\r
+<col width="70%" />\r
+<thead>\r
+<tr>\r
+<th align="left" valign="top">Name </th>\r
+<th align="left" valign="top"> Description</th>\r
+</tr>\r
+</thead>\r
+<tbody>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">autoconf compile/link</p></td>\r
+<td align="left" valign="top"><p class="table">Uncachable compilation or linking by an autoconf test.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">bad compiler arguments</p></td>\r
+<td align="left" valign="top"><p class="table">Malformed compiler argument, e.g. missing a value for an option that requires\r
+an argument or failure to read a file specified by an option argument.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">cache file missing</p></td>\r
+<td align="left" valign="top"><p class="table">A file was unexpectedly missing from the cache. This only happens in rare\r
+situations, e.g. if one ccache instance is about to get a file from the cache\r
+while another instance removed the file as part of cache cleanup.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">cache hit (direct)</p></td>\r
+<td align="left" valign="top"><p class="table">A result was successfully found using <a href="#_the_direct_mode">the direct mode</a>.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">cache hit (preprocessed)</p></td>\r
+<td align="left" valign="top"><p class="table">A result was successfully found using <a href="#_the_preprocessor_mode">the preprocessor mode</a>.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">cache miss</p></td>\r
+<td align="left" valign="top"><p class="table">No result was found.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">cache size</p></td>\r
+<td align="left" valign="top"><p class="table">Current size of the cache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">called for link</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler was called for linking, not compiling.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">called for preprocessing</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler was called for preprocessing, not compiling.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">can&#8217;t use precompiled header</p></td>\r
+<td align="left" valign="top"><p class="table">Preconditions for using <a href="#_precompiled_headers">precompiled headers</a> were not\r
+fulfilled.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">ccache internal error</p></td>\r
+<td align="left" valign="top"><p class="table">Unexpected failure, e.g. due to problems reading/writing the cache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">cleanups performed</p></td>\r
+<td align="left" valign="top"><p class="table">Number of cleanups performed, either implicitly due to the cache size limit\r
+being reached or due to explicit <strong>ccache -c/--cleanup</strong> calls.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">compile failed</p></td>\r
+<td align="left" valign="top"><p class="table">The compilation failed. No result stored in the cache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">compiler check failed</p></td>\r
+<td align="left" valign="top"><p class="table">A compiler check program specified by <strong>compiler_check</strong> (<strong>CCACHE_COMPILERCHECK</strong>)\r
+failed.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">compiler produced empty output</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler&#8217;s output file (typically an object file) was empty after\r
+compilation.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">compiler produced no output</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler&#8217;s output file (typically an object file) was missing after\r
+compilation.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">compiler produced stdout</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler wrote data to standard output. This is something that compilers\r
+normally never do, so ccache is not designed to store such output in the cache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">couldn&#8217;t find the compiler</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler to execute could not be found.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">error hashing extra file</p></td>\r
+<td align="left" valign="top"><p class="table">Failure reading a file specified by <strong>extra_files_to_hash</strong>\r
+(<strong>CCACHE_EXTRAFILES</strong>).</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">files in cache</p></td>\r
+<td align="left" valign="top"><p class="table">Current number of files in the cache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">multiple source files</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler was called to compile multiple source files in one go. This is not\r
+supported by ccache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">no input file</p></td>\r
+<td align="left" valign="top"><p class="table">No input file was specified to the compiler.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">output to a non-regular file</p></td>\r
+<td align="left" valign="top"><p class="table">The output path specified with <strong>-o</strong> is not a file (e.g. a directory or a device\r
+node).</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">output to stdout</p></td>\r
+<td align="left" valign="top"><p class="table">The compiler was instructed to write its output to standard output using <strong>-o\r
+-</strong>. This is not supported by ccache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">preprocessor error</p></td>\r
+<td align="left" valign="top"><p class="table">Preprocessing the source code using the compiler&#8217;s <strong>-E</strong> option failed.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">unsupported code directive</p></td>\r
+<td align="left" valign="top"><p class="table">Code like the assembler &#8220;.incbin&#8221; directive was found. This is not supported\r
+by ccache.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">unsupported compiler option</p></td>\r
+<td align="left" valign="top"><p class="table">A compiler option not supported by ccache was found.</p></td>\r
+</tr>\r
+<tr>\r
+<td align="left" valign="top"><p class="table">unsupported source language</p></td>\r
+<td align="left" valign="top"><p class="table">A source language e.g. specified with <strong>-x</strong> was unsupported by ccache.</p></td>\r
+</tr>\r
+</tbody>\r
+</table>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
 <h2 id="_how_ccache_works">How ccache works</h2>\r
 <div class="sectionbody">\r
 <div class="paragraph"><p>The basic idea is to detect when you are compiling exactly the same code a\r
@@ -1943,9 +2086,15 @@ Make sure that all users have write permission in the entire cache directory
 <p>\r
 Make sure that the setgid bit is set on all directories in the cache. This\r
   tells the filesystem to inherit group ownership for new directories. The\r
-  command &#8220;find $CCACHE_DIR -type d | xargs chmod g+s&#8221; might be useful for\r
-  this.\r
+  following command might be useful for this:\r
 </p>\r
+<div class="openblock">\r
+<div class="content">\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><code>find $CCACHE_DIR -type d | xargs chmod g+s</code></pre>\r
+</div></div>\r
+</div></div>\r
 </li>\r
 </ul></div>\r
 <div class="paragraph"><p>The reason to avoid the hard link mode is that the hard links cause unwanted\r
@@ -2222,9 +2371,9 @@ maintained by Joel Rosdahl. See AUTHORS.txt or AUTHORS.html and
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Version 3.3.3<br />\r
+Version 3.3.4<br />\r
 Last updated\r
- 2016-10-26 23:21:34 CEST\r
+ 2017-02-12 14:58:39 CET\r
 </div>\r
 </div>\r
 </body>\r
index dea2fdc869377f1ab9fb9759eda1914e357b75fc..c960979c20081ca1f39dbc1c74d0ad5256f81587 100644 (file)
@@ -163,10 +163,11 @@ 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. *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 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
@@ -297,8 +298,14 @@ _a command string_::
     separator. Examples:
 +
 --
-* +%compiler% -v+
-* +%compiler% -dumpmachine; %compiler% -dumpversion+
+
+----
+%compiler% -v
+----
+
+----
+%compiler% -dumpmachine; %compiler% -dumpversion
+----
 
 You should make sure that the specified command is as fast as possible since it
 will be run once for each ccache invocation.
@@ -374,15 +381,15 @@ WRAPPERS>>.
     when generating debug info (compiler option *-g* with variations).
     Exception: The CWD will not be included in the hash if *base_dir* is set
     (and matches the CWD) and the compiler option *-fdebug-prefix-map* is used.
-
-    The reason for including the CWD in the hash by default is to prevent a
-    problem with the storage of the current working directory in the debug info
-    of an object file, which can lead ccache to return a cached object file
-    that has the working directory in the debug info set incorrectly.
-
-    You can disable this setting to get cache hits when compiling the same
-    source code in different directories if you don't mind that CWD in the
-    debug info might be incorrect.
++
+The reason for including the CWD in the hash by default is to prevent a problem
+with the storage of the current working directory in the debug info of an
+object file, which can lead ccache to return a cached object file that has the
+working directory in the debug info set incorrectly.
++
+You can disable this setting to get cache hits when compiling the same source
+code in different directories if you don't mind that CWD in the debug info
+might be incorrect.
 
 *ignore_headers_in_manifest* (*CCACHE_IGNOREHEADERS*)::
 
@@ -462,13 +469,13 @@ WRAPPERS>>.
     code (see <<_the_preprocessor_mode,THE PREPROCESSOR MODE>>) and then on a
     cache miss run the compiler on the source code to get hold of the object
     file. This is the default.
-
-    If false, ccache will first run preprocessor to preprocess the source code
-    and then on a cache miss run the compiler on the _preprocessed source code_
-    instead of the original source code. This makes cache misses slightly
-    faster since the source code only has to be preprocessed once. The downside
-    is that some compilers won't produce the same result (for instance
-    diagnostics warnings) when compiling preprocessed source code.
++
+If false, ccache will first run preprocessor to preprocess the source code and
+then on a cache miss run the compiler on the _preprocessed source code_ instead
+of the original source code. This makes cache misses slightly faster since the
+source code only has to be preprocessed once. The downside is that some
+compilers won't produce the same result (for instance diagnostics warnings)
+when compiling preprocessed source code.
 
 *sloppiness* (*CCACHE_SLOPPINESS*)::
 
@@ -560,6 +567,116 @@ compression with the *compression* configuration setting and you can also tweak
 the compression level with *compression_level*.
 
 
+Cache statistics
+----------------
+
+*ccache -s/--show-stats* can show the following statistics:
+
+[options="header",cols="30%,70%"]
+|==============================================================================
+|Name | Description
+| autoconf compile/link |
+Uncachable compilation or linking by an autoconf test.
+
+| bad compiler arguments |
+Malformed compiler argument, e.g. missing a value for an option that requires
+an argument or failure to read a file specified by an option argument.
+
+| cache file missing |
+A file was unexpectedly missing from the cache. This only happens in rare
+situations, e.g. if one ccache instance is about to get a file from the cache
+while another instance removed the file as part of cache cleanup.
+
+| cache hit (direct) |
+A result was successfully found using <<_the_direct_mode,the direct mode>>.
+
+| cache hit (preprocessed) |
+A result was successfully found using <<_the_preprocessor_mode,the preprocessor
+mode>>.
+
+| cache miss |
+No result was found.
+
+| cache size |
+Current size of the cache.
+
+| called for link |
+The compiler was called for linking, not compiling.
+
+| called for preprocessing |
+The compiler was called for preprocessing, not compiling.
+
+| can't use precompiled header |
+Preconditions for using <<_precompiled_headers,precompiled headers>> were not
+fulfilled.
+
+| ccache internal error |
+Unexpected failure, e.g. due to problems reading/writing the cache.
+
+| cleanups performed |
+Number of cleanups performed, either implicitly due to the cache size limit
+being reached or due to explicit *ccache -c/--cleanup* calls.
+
+| compile failed |
+The compilation failed. No result stored in the cache.
+
+| compiler check failed |
+A compiler check program specified by *compiler_check* (*CCACHE_COMPILERCHECK*)
+failed.
+
+| compiler produced empty output |
+The compiler's output file (typically an object file) was empty after
+compilation.
+
+| compiler produced no output |
+The compiler's output file (typically an object file) was missing after
+compilation.
+
+| compiler produced stdout |
+The compiler wrote data to standard output. This is something that compilers
+normally never do, so ccache is not designed to store such output in the cache.
+
+| couldn't find the compiler |
+The compiler to execute could not be found.
+
+| error hashing extra file |
+Failure reading a file specified by *extra_files_to_hash*
+(*CCACHE_EXTRAFILES*).
+
+| files in cache |
+Current number of files in the cache.
+
+| multiple source files |
+The compiler was called to compile multiple source files in one go. This is not
+supported by ccache.
+
+| no input file |
+No input file was specified to the compiler.
+
+| output to a non-regular file |
+The output path specified with *-o* is not a file (e.g. a directory or a device
+node).
+
+| output to stdout |
+The compiler was instructed to write its output to standard output using *-o
+-*. This is not supported by ccache.
+
+| preprocessor error |
+Preprocessing the source code using the compiler's *-E* option failed.
+
+| unsupported code directive |
+Code like the assembler ``.incbin'' directive was found. This is not supported
+by ccache.
+
+| unsupported compiler option |
+A compiler option not supported by ccache was found.
+
+| unsupported source language |
+A source language e.g. specified with *-x* was unsupported by ccache.
+
+|==============================================================================
+
+
 How ccache works
 ----------------
 
@@ -741,8 +858,13 @@ conditions should to be met:
   (and that you trust all users of the shared cache).
 * Make sure that the setgid bit is set on all directories in the cache. This
   tells the filesystem to inherit group ownership for new directories. The
-  command ``find $CCACHE_DIR -type d | xargs chmod g+s'' might be useful for
-  this.
+  following command might be useful for this:
++
+--
+----
+find $CCACHE_DIR -type d | xargs chmod g+s
+----
+--
 
 The reason to avoid the hard link mode is that the hard links cause unwanted
 side effects, as all links to a cached file share the file's modification
index 7689f65d01292989e345c8560488470e4a563f15..6e8af4fb19549b2916870fb38265fd1fedd7e57b 100644 (file)
--- a/NEWS.html
+++ b/NEWS.html
@@ -734,7 +734,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>ccache news</h1>\r
-<span id="revnumber">version 3.3.3</span>\r
+<span id="revnumber">version 3.3.4</span>\r
 <div id="toc">
   <div id="toctitle">Table of Contents</div>
   <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
@@ -742,11 +742,51 @@ asciidoc.install(2);
 </div>\r
 <div id="content">\r
 <div class="sect1">\r
+<h2 id="_ccache_3_3_4">ccache 3.3.4</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>Release date: 2017-02-17</p></div>\r
+<div class="sect2">\r
+<h3 id="_new_features_and_improvements">New features and improvements</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Documented the different cache statistics counters.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+<div class="sect2">\r
+<h3 id="_bug_fixes">Bug fixes</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Fixed a regression in ccache 3.3 related to potentially bad content of\r
+  dependency files when compiling identical source code but with different\r
+  source paths. This was only partially fixed in 3.3.2 and reverts the new\r
+  &#8220;Names of included files are no longer included in the hash of the\r
+  compiler&#8217;s preprocessed output&#8221; feature in 3.3.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Corrected statistics counter for <code>-optf</code>/<code>--options-file</code> failure.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Fixed undefined behavior warnings in ccache found by <code>-fsanitize=undefined</code>.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
 <h2 id="_ccache_3_3_3">ccache 3.3.3</h2>\r
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-10-26</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes">Bug fixes</h3>\r
+<h3 id="_bug_fixes_2">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -763,7 +803,7 @@ ccache now detects usage of <code>.incbin</code> assembler directives in the sou
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-09-28</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_2">Bug fixes</h3>\r
+<h3 id="_bug_fixes_3">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -788,7 +828,7 @@ Fixed a regression in ccache 3.3.1: ccache could get confused when using the
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-09-07</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_3">Bug fixes</h3>\r
+<h3 id="_bug_fixes_4">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -823,7 +863,7 @@ A C99-compatible compiler is now required to build ccache.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_2">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -970,7 +1010,7 @@ Increased buffer size used when reading file data. This improves performance
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_4">Bug fixes</h3>\r
+<h3 id="_bug_fixes_5">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -996,7 +1036,7 @@ Fixed build and test for MinGW32 and Windows.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-09-28</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_5">Bug fixes</h3>\r
+<h3 id="_bug_fixes_6">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1014,7 +1054,7 @@ Fixed a regression in ccache 3.2.8: ccache could get confused when using the
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-09-07</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_6">Bug fixes</h3>\r
+<h3 id="_bug_fixes_7">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1038,7 +1078,7 @@ ccache now understands the undocumented <code>-coverage</code> (only one dash) G
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-07-20</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_7">Bug fixes</h3>\r
+<h3 id="_bug_fixes_8">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1061,7 +1101,7 @@ ccache now knows how to work around a glitch in the output of GCC 6&#8217;s
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-07-12</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_8">Bug fixes</h3>\r
+<h3 id="_bug_fixes_9">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1090,7 +1130,7 @@ Fixed a bug where (due to ccache rewriting paths) the compiler could choose
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-04-17</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_2">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_3">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1111,7 +1151,7 @@ Made it harder to misinterpret documentation of boolean environment settings'
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_9">Bug fixes</h3>\r
+<h3 id="_bug_fixes_10">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1171,7 +1211,7 @@ The man page is now built when running &#8220;make install&#8221; from Git repos
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2015-10-08</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_10">Bug fixes</h3>\r
+<h3 id="_bug_fixes_11">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1216,7 +1256,7 @@ Fixed a bug where cache cleanup could be run too early for caches larger than
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2015-08-16</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_3">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_4">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1226,7 +1266,7 @@ Added support for compiler option <code>-gsplit-dwarf</code>.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_11">Bug fixes</h3>\r
+<h3 id="_bug_fixes_12">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1263,7 +1303,7 @@ Only log "Disabling direct mode" once when failing to read potential include
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2015-05-10</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_4">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_5">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1280,7 +1320,7 @@ Add support for caching code coverage results (compiling for gcov).
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_12">Bug fixes</h3>\r
+<h3 id="_bug_fixes_13">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1351,7 +1391,7 @@ Fixed build error when compiling ccache with recent clang versions.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2014-12-10</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_13">Bug fixes</h3>\r
+<h3 id="_bug_fixes_14">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1392,7 +1432,7 @@ Added missing documentation for <code>max_files</code> and <code>max_size</code>
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2014-11-17</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_5">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_6">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1583,7 +1623,7 @@ Various other improvements of the test suite.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_14">Bug fixes</h3>\r
+<h3 id="_bug_fixes_15">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1614,7 +1654,7 @@ Fixed test suite failures when <code>CC</code> is a ccache-wrapped compiler.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2016-07-12</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_15">Bug fixes</h3>\r
+<h3 id="_bug_fixes_16">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1632,7 +1672,7 @@ Fixed a bug where (due to ccache rewriting paths) the compiler could choose
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2015-03-07</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_16">Bug fixes</h3>\r
+<h3 id="_bug_fixes_17">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1663,7 +1703,7 @@ Don&#8217;t try to reset a non-existing stats file. This avoids &#8220;No such f
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2014-10-19</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_6">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_7">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1715,7 +1755,7 @@ Stale files in the internal temporary directory (<code>&lt;ccache_dir&gt;/tmp</c
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_17">Bug fixes</h3>\r
+<h3 id="_bug_fixes_18">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1755,7 +1795,7 @@ Fixed problem with logging of current working directory.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2013-01-06</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_18">Bug fixes</h3>\r
+<h3 id="_bug_fixes_19">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1805,7 +1845,7 @@ Fixed test suite to work on ecryptfs.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2012-08-11</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_7">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_8">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1826,7 +1866,7 @@ Clang plugins are now hashed to catch plugin upgrades.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_19">Bug fixes</h3>\r
+<h3 id="_bug_fixes_20">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1874,7 +1914,7 @@ Fixed <code>static_assert</code> macro definition clash with GCC 4.7.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2012-01-08</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_20">Bug fixes</h3>\r
+<h3 id="_bug_fixes_21">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1947,7 +1987,7 @@ Improved documentation on how to fix bad object files in the cache.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2011-08-21</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_8">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_9">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1957,7 +1997,7 @@ Rewrite argument to <code>--sysroot</code> if <code>CCACHE_BASEDIR</code> is use
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_21">Bug fixes</h3>\r
+<h3 id="_bug_fixes_22">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1978,7 +2018,7 @@ Fixed alignment of &#8220;called for preprocessing&#8221; counter.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2011-05-29</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_9">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_10">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2010,7 +2050,7 @@ Improved order of statistics counters in <code>ccache -s</code> output.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_22">Bug fixes</h3>\r
+<h3 id="_bug_fixes_23">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2043,7 +2083,7 @@ Systems that lack (and don&#8217;t need to be linked with) libm are now supporte
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2011-01-09</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_23">Bug fixes</h3>\r
+<h3 id="_bug_fixes_24">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2076,7 +2116,7 @@ The file handle in now correctly closed on write error when trying to create
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2010-11-28</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_24">Bug fixes</h3>\r
+<h3 id="_bug_fixes_25">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2103,7 +2143,7 @@ Portability fixes for HP-UX 11.00 and other esoteric systems.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2010-11-21</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_25">Bug fixes</h3>\r
+<h3 id="_bug_fixes_26">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2151,7 +2191,7 @@ The test suite now also works on systems that lack a /dev/zero.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2010-11-07</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_26">Bug fixes</h3>\r
+<h3 id="_bug_fixes_27">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2205,7 +2245,7 @@ Minor debug log message improvements.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2010-09-16</p></div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_10">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_11">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2273,7 +2313,7 @@ Added <code>-install_name</code> as an option known to take an argument. (This i
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_27">Bug fixes</h3>\r
+<h3 id="_bug_fixes_28">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2359,7 +2399,7 @@ New <code>HACKING.txt</code> file with some notes about ccache code conventions.
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2010-07-15</p></div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_28">Bug fixes</h3>\r
+<h3 id="_bug_fixes_29">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2405,7 +2445,7 @@ The way the hashes are calculated has changed, so you won&#8217;t get cache hits
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_new_features_and_improvements_11">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_12">New features and improvements</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2548,7 +2588,7 @@ The following options are no longer hashed in the preprocessor mode:
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_29">Bug fixes</h3>\r
+<h3 id="_bug_fixes_30">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2693,9 +2733,9 @@ Statistics counters are now correctly updated for -E option failures and
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Version 3.3.3<br />\r
+Version 3.3.4<br />\r
 Last updated\r
- 2016-10-26 23:30:56 CEST\r
+ 2017-02-17 22:28:35 CET\r
 </div>\r
 </div>\r
 </body>\r
index f24bc20c96726fcaaaa4c4059931cb843ab8cc52..e15f18cd1c2d895c5f6d0ad016593de910244071 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,30 @@
 ccache news
 ===========
 
+ccache 3.3.4
+------------
+Release date: 2017-02-17
+
+New features and improvements
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- Documented the different cache statistics counters.
+
+
+Bug fixes
+~~~~~~~~~
+
+- Fixed a regression in ccache 3.3 related to potentially bad content of
+  dependency files when compiling identical source code but with different
+  source paths. This was only partially fixed in 3.3.2 and reverts the new
+  ``Names of included files are no longer included in the hash of the
+  compiler's preprocessed output'' feature in 3.3.
+
+- Corrected statistics counter for `-optf`/`--options-file` failure.
+
+- Fixed undefined behavior warnings in ccache found by `-fsanitize=undefined`.
+
+
 ccache 3.3.3
 ------------
 Release date: 2016-10-26
index 1af5191866e4348a4f65b1c107ebfd65cf55524f..f0de31b54c84a053fe084896df9aef03ef971444 100644 (file)
--- a/ccache.1
+++ b/ccache.1
@@ -2,12 +2,12 @@
 .\"     Title: ccache
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 10/26/2016
+.\"      Date: 02/17/2017
 .\"    Manual: ccache Manual
-.\"    Source: ccache 3.3.3
+.\"    Source: ccache 3.3.4
 .\"  Language: English
 .\"
-.TH "CCACHE" "1" "10/26/2016" "ccache 3\&.3\&.3" "ccache Manual"
+.TH "CCACHE" "1" "02/17/2017" "ccache 3\&.3\&.4" "ccache Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -270,7 +270,23 @@ Zero the cache statistics (but not the configuration options)\&.
 .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\&. \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\&.
+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\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+.sp
+\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 .5v
+.RE
 .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
@@ -413,27 +429,25 @@ Hash the standard output and standard error output of the specified command\&. T
 \fB%compiler%\fR
 will be replaced with the path to the compiler\&. Several commands can be specified with semicolon as separator\&. Examples:
 .sp
+.if n \{\
 .RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
 .\}
+.nf
 %compiler% \-v
+.fi
+.if n \{\
 .RE
+.\}
 .sp
+.if n \{\
 .RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
 .\}
+.nf
 %compiler% \-dumpmachine; %compiler% \-dumpversion
+.fi
+.if n \{\
 .RE
+.\}
 .sp
 You should make sure that the specified command is as fast as possible since it will be run once for each ccache invocation\&.
 .sp
@@ -499,30 +513,9 @@ is set (and matches the CWD) and the compiler option
 \fB\-fdebug\-prefix\-map\fR
 is used\&.
 .sp
-.if n \{\
-.RS 4
-.\}
-.nf
-The reason for including the CWD in the hash by default is to prevent a
-problem with the storage of the current working directory in the debug info
-of an object file, which can lead ccache to return a cached object file
-that has the working directory in the debug info set incorrectly\&.
-.fi
-.if n \{\
-.RE
-.\}
+The reason for including the CWD in the hash by default is to prevent a problem with the storage of the current working directory in the debug info of an object file, which can lead ccache to return a cached object file that has the working directory in the debug info set incorrectly\&.
 .sp
-.if n \{\
-.RS 4
-.\}
-.nf
-You can disable this setting to get cache hits when compiling the same
-source code in different directories if you don\*(Aqt mind that CWD in the
-debug info might be incorrect\&.
-.fi
-.if n \{\
-.RE
-.\}
+You can disable this setting to get cache hits when compiling the same source code in different directories if you don\(cqt mind that CWD in the debug info might be incorrect\&.
 .RE
 .PP
 \fBignore_headers_in_manifest\fR (\fBCCACHE_IGNOREHEADERS\fR)
@@ -602,20 +595,9 @@ If true, ccache will not use any previously stored result\&. New results will st
 If true, ccache will first run the preprocessor to preprocess the source code (see
 THE PREPROCESSOR MODE) and then on a cache miss run the compiler on the source code to get hold of the object file\&. This is the default\&.
 .sp
-.if n \{\
-.RS 4
-.\}
-.nf
-If false, ccache will first run preprocessor to preprocess the source code
-and then on a cache miss run the compiler on the _preprocessed source code_
-instead of the original source code\&. This makes cache misses slightly
-faster since the source code only has to be preprocessed once\&. The downside
-is that some compilers won\*(Aqt produce the same result (for instance
-diagnostics warnings) when compiling preprocessed source code\&.
-.fi
-.if n \{\
-.RE
-.\}
+If false, ccache will first run preprocessor to preprocess the source code and then on a cache miss run the compiler on the
+\fIpreprocessed source code\fR
+instead of the original source code\&. This makes cache misses slightly faster since the source code only has to be preprocessed once\&. The downside is that some compilers won\(cqt produce the same result (for instance diagnostics warnings) when compiling preprocessed source code\&.
 .RE
 .PP
 \fBsloppiness\fR (\fBCCACHE_SLOPPINESS\fR)
@@ -719,6 +701,244 @@ By default, ccache has a five gigabyte limit on the total size of files in the c
 .SH "CACHE COMPRESSION"
 .sp
 ccache can optionally compress all files it puts into the cache using the compression library zlib\&. While this may involve a tiny performance slowdown, it increases the number of files that fit in the cache\&. You can turn on compression with the \fBcompression\fR configuration setting and you can also tweak the compression level with \fBcompression_level\fR\&.
+.SH "CACHE STATISTICS"
+.sp
+\fBccache \-s/\-\-show\-stats\fR can show the following statistics:
+.TS
+allbox tab(:);
+ltB ltB.
+T{
+Name
+T}:T{
+Description
+T}
+.T&
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt
+lt lt.
+T{
+.sp
+autoconf compile/link
+T}:T{
+.sp
+Uncachable compilation or linking by an autoconf test\&.
+T}
+T{
+.sp
+bad compiler arguments
+T}:T{
+.sp
+Malformed compiler argument, e\&.g\&. missing a value for an option that requires an argument or failure to read a file specified by an option argument\&.
+T}
+T{
+.sp
+cache file missing
+T}:T{
+.sp
+A file was unexpectedly missing from the cache\&. This only happens in rare situations, e\&.g\&. if one ccache instance is about to get a file from the cache while another instance removed the file as part of cache cleanup\&.
+T}
+T{
+.sp
+cache hit (direct)
+T}:T{
+.sp
+A result was successfully found using the direct mode\&.
+T}
+T{
+.sp
+cache hit (preprocessed)
+T}:T{
+.sp
+A result was successfully found using the preprocessor mode\&.
+T}
+T{
+.sp
+cache miss
+T}:T{
+.sp
+No result was found\&.
+T}
+T{
+.sp
+cache size
+T}:T{
+.sp
+Current size of the cache\&.
+T}
+T{
+.sp
+called for link
+T}:T{
+.sp
+The compiler was called for linking, not compiling\&.
+T}
+T{
+.sp
+called for preprocessing
+T}:T{
+.sp
+The compiler was called for preprocessing, not compiling\&.
+T}
+T{
+.sp
+can\(cqt use precompiled header
+T}:T{
+.sp
+Preconditions for using precompiled headers were not fulfilled\&.
+T}
+T{
+.sp
+ccache internal error
+T}:T{
+.sp
+Unexpected failure, e\&.g\&. due to problems reading/writing the cache\&.
+T}
+T{
+.sp
+cleanups performed
+T}:T{
+.sp
+Number of cleanups performed, either implicitly due to the cache size limit being reached or due to explicit \fBccache \-c/\-\-cleanup\fR calls\&.
+T}
+T{
+.sp
+compile failed
+T}:T{
+.sp
+The compilation failed\&. No result stored in the cache\&.
+T}
+T{
+.sp
+compiler check failed
+T}:T{
+.sp
+A compiler check program specified by \fBcompiler_check\fR (\fBCCACHE_COMPILERCHECK\fR) failed\&.
+T}
+T{
+.sp
+compiler produced empty output
+T}:T{
+.sp
+The compiler\(cqs output file (typically an object file) was empty after compilation\&.
+T}
+T{
+.sp
+compiler produced no output
+T}:T{
+.sp
+The compiler\(cqs output file (typically an object file) was missing after compilation\&.
+T}
+T{
+.sp
+compiler produced stdout
+T}:T{
+.sp
+The compiler wrote data to standard output\&. This is something that compilers normally never do, so ccache is not designed to store such output in the cache\&.
+T}
+T{
+.sp
+couldn\(cqt find the compiler
+T}:T{
+.sp
+The compiler to execute could not be found\&.
+T}
+T{
+.sp
+error hashing extra file
+T}:T{
+.sp
+Failure reading a file specified by \fBextra_files_to_hash\fR (\fBCCACHE_EXTRAFILES\fR)\&.
+T}
+T{
+.sp
+files in cache
+T}:T{
+.sp
+Current number of files in the cache\&.
+T}
+T{
+.sp
+multiple source files
+T}:T{
+.sp
+The compiler was called to compile multiple source files in one go\&. This is not supported by ccache\&.
+T}
+T{
+.sp
+no input file
+T}:T{
+.sp
+No input file was specified to the compiler\&.
+T}
+T{
+.sp
+output to a non\-regular file
+T}:T{
+.sp
+The output path specified with \fB\-o\fR is not a file (e\&.g\&. a directory or a device node)\&.
+T}
+T{
+.sp
+output to stdout
+T}:T{
+.sp
+The compiler was instructed to write its output to standard output using \fB\-o \-\fR\&. This is not supported by ccache\&.
+T}
+T{
+.sp
+preprocessor error
+T}:T{
+.sp
+Preprocessing the source code using the compiler\(cqs \fB\-E\fR option failed\&.
+T}
+T{
+.sp
+unsupported code directive
+T}:T{
+.sp
+Code like the assembler \(lq\&.incbin\(rq directive was found\&. This is not supported by ccache\&.
+T}
+T{
+.sp
+unsupported compiler option
+T}:T{
+.sp
+A compiler option not supported by ccache was found\&.
+T}
+T{
+.sp
+unsupported source language
+T}:T{
+.sp
+A source language e\&.g\&. specified with \fB\-x\fR was unsupported by ccache\&.
+T}
+.TE
+.sp 1
 .SH "HOW CCACHE WORKS"
 .sp
 The basic idea is to detect when you are compiling exactly the same code a second time and reuse the previously produced output\&. The detection is done by hashing different kinds of information that should be unique for the compilation and then using the hash sum to identify the cached output\&. ccache uses MD4, a very fast cryptographic hash algorithm, for the hashing\&. (MD4 is nowadays too weak to be useful in cryptographic contexts, but it should be safe enough to be used to identify recompilations\&.) On a cache hit, ccache is able to supply all of the correct compiler outputs (including all warnings, dependency file, etc) from the cache\&.
@@ -1231,7 +1451,17 @@ Make sure that all users have write permission in the entire cache directory (an
 .sp -1
 .IP \(bu 2.3
 .\}
-Make sure that the setgid bit is set on all directories in the cache\&. This tells the filesystem to inherit group ownership for new directories\&. The command \(lqfind $CCACHE_DIR \-type d | xargs chmod g+s\(rq might be useful for this\&.
+Make sure that the setgid bit is set on all directories in the cache\&. This tells the filesystem to inherit group ownership for new directories\&. The following command might be useful for this:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+find $CCACHE_DIR \-type d | xargs chmod g+s
+.fi
+.if n \{\
+.RE
+.\}
 .RE
 .sp
 The reason to avoid the hard link mode is that the hard links cause unwanted side effects, as all links to a cached file share the file\(cqs modification timestamp\&. This results in false dependencies to be triggered by timestamp\-based build systems whenever another user links to an existing file\&. Typically, users will see that their libraries and binaries are relinked without reason\&.
index b93e027ff710140708f1203e2c5de33a525389a0..de2b1e3d53670762b206dd2eb8c3b2b2478716f7 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1,7 +1,7 @@
 // ccache -- a fast C/C++ compiler cache
 //
 // Copyright (C) 2002-2007 Andrew Tridgell
-// Copyright (C) 2009-2016 Joel Rosdahl
+// Copyright (C) 2009-2017 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,7 +37,7 @@ static const char VERSION_TEXT[] =
   MYNAME " version %s\n"
   "\n"
   "Copyright (C) 2002-2007 Andrew Tridgell\n"
-  "Copyright (C) 2009-2016 Joel Rosdahl\n"
+  "Copyright (C) 2009-2017 Joel Rosdahl\n"
   "\n"
   "This program is free software; you can redistribute it and/or modify it under\n"
   "the terms of the GNU General Public License as published by the Free Software\n"
@@ -557,7 +557,6 @@ remember_include_file(char *path, struct mdfour *cpp_hash, bool system)
                }
        }
 
-       // Let's hash the include file.
        if (!(conf->sloppiness & SLOPPY_INCLUDE_FILE_MTIME)
            && st.st_mtime >= time_of_compilation) {
                cc_log("Include file %s too new", path);
@@ -570,6 +569,7 @@ remember_include_file(char *path, struct mdfour *cpp_hash, bool system)
                goto failure;
        }
 
+       // Let's hash the include file content.
        struct mdfour fhash;
        hash_start(&fhash);
 
@@ -813,8 +813,28 @@ process_preprocessed_file(struct mdfour *hash, const char *path)
                                has_absolute_include_headers = is_absolute_path(inc_path);
                        }
                        inc_path = make_relative_path(inc_path);
+
+                       bool should_hash_inc_path = true;
+                       if (!conf->hash_dir) {
+                               char *cwd = gnu_getcwd();
+                               if (str_startswith(inc_path, cwd) && str_endswith(inc_path, "//")) {
+                                       // When compiling with -g or similar, GCC adds the absolute path to
+                                       // CWD like this:
+                                       //
+                                       //   # 1 "CWD//"
+                                       //
+                                       // If the user has opted out of including the CWD in the hash, don't
+                                       // hash it. See also how debug_prefix_map is handled.
+                                       should_hash_inc_path = false;
+                               }
+                               free(cwd);
+                       }
+                       if (should_hash_inc_path) {
+                               hash_string(hash, inc_path);
+                       }
+
                        remember_include_file(inc_path, hash, system);
-                       p = q;
+                       p = q; // Everything of interest between p and q has been hashed now.
                } else if (q[0] == '.' && q[1] == 'i' && q[2] == 'n' && q[3] == 'c'
                           && q[4] == 'b' && q[5] == 'i' && q[6] == 'n') {
                        // An assembler .incbin statement (which could be part of inline
@@ -1106,7 +1126,9 @@ to_cache(struct args *args)
                if (tmp_cov) {
                        tmp_unlink(tmp_cov);
                }
-               tmp_unlink(tmp_dwo);
+               if (tmp_dwo) {
+                       tmp_unlink(tmp_dwo);
+               }
                failed();
        }
        if (st.st_size != 0) {
@@ -1117,7 +1139,9 @@ to_cache(struct args *args)
                if (tmp_cov) {
                        tmp_unlink(tmp_cov);
                }
-               tmp_unlink(tmp_dwo);
+               if (tmp_dwo) {
+                       tmp_unlink(tmp_dwo);
+               }
                failed();
        }
        tmp_unlink(tmp_stdout);
@@ -1178,7 +1202,9 @@ to_cache(struct args *args)
                if (tmp_cov) {
                        tmp_unlink(tmp_cov);
                }
-               tmp_unlink(tmp_dwo);
+               if (tmp_dwo) {
+                       tmp_unlink(tmp_dwo);
+               }
 
                failed();
        }
@@ -1545,13 +1571,6 @@ calculate_common_hash(struct args *args, struct mdfour *hash)
                }
        }
 
-       // Possibly hash input file location to avoid false positive cache hits since
-       // the dependency file includes the source file path.
-       if (generating_dependencies) {
-               hash_delimiter(hash, "inputfile");
-               hash_string(hash, input_file);
-       }
-
        // Possibly hash the coverage data file path.
        if (generating_coverage && profile_arcs) {
                char *dir = dirname(output_obj);
@@ -2145,7 +2164,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                if (str_eq(argv[i], "-optf") || str_eq(argv[i], "--options-file")) {
                        if (i > argc) {
                                cc_log("Expected argument after -optf/--options-file");
-                               stats_update(STATS_UNSUPPORTED_OPTION);
+                               stats_update(STATS_ARGS);
                                result = false;
                                goto out;
                        }
index 86b124eefe85fe3e9bd50befd456a7de9f5d02f1..f21410a4edddcf666660dfef751a931d0b44e524 100755 (executable)
--- a/configure
+++ b/configure
@@ -2348,6 +2348,166 @@ esac
 
 
 
+
+# The later defininition of _XOPEN_SOURCE disables certain features
+# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
+
+$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
+# them.
+
+$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
+# them.
+
+$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
+
+
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
+
+$as_echo "#define _BSD_TYPES 1" >>confdefs.h
+
+
+# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
+# them.
+
+$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+
+define_xopen_source=yes
+
+ac_sys_system=`uname -s`
+if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
+   -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
+        ac_sys_release=`uname -v`
+else
+        ac_sys_release=`uname -r`
+fi
+
+# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
+# disable features if it is defined, without any means to access these
+# features as extensions. For these systems, we skip the definition of
+# _XOPEN_SOURCE. Before adding a system to the list to gain access to
+# some feature, make sure there is no alternative way to access this
+# feature. Also, when using wildcards, make sure you have verified the
+# need for not defining _XOPEN_SOURCE on all systems matching the
+# wildcard, and that the wildcard does not include future systems
+# (which may remove their limitations).
+case $ac_sys_system/$ac_sys_release in
+  # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
+  # even though select is a POSIX function. Reported by J. Ribbens.
+  # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
+  OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
+    define_xopen_source=no
+    # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
+    # also defined. This can be overridden by defining _BSD_SOURCE
+    # As this has a different meaning on Linux, only define it on OpenBSD
+
+$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
+
+    ;;
+  # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
+  # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
+  # Marc Recht
+  NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
+    define_xopen_source=no;;
+  # On Solaris 2.6, sys/wait.h is inconsistent in the usage
+  # of union __?sigval. Reported by Stuart Bishop.
+  SunOS/5.6)
+    define_xopen_source=no;;
+  # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
+  # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
+  # Reconfirmed for 7.1.4 by Martin v. Loewis.
+  OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
+    define_xopen_source=no;;
+  # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
+  # but used in struct sockaddr.sa_family. Reported by Tim Rice.
+  SCO_SV/3.2)
+    define_xopen_source=no;;
+  # On FreeBSD 4, the math functions C89 does not cover are never defined
+  # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
+  FreeBSD/4.*)
+    define_xopen_source=no;;
+  # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
+  # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
+  # identifies itself as Darwin/7.*
+  # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
+  # disables platform specific features beyond repair.
+  # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
+  # has no effect, don't bother defining them
+  Darwin/[6789].*)
+    define_xopen_source=no;;
+  # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
+  # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
+  # or has another value. By not (re)defining it, the defaults come in place.
+  AIX/4)
+    define_xopen_source=no;;
+  AIX/5|AIX/7)
+    if test `uname -r` -eq 1; then
+      define_xopen_source=no
+    fi
+    ;;
+  # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
+  # defining NI_NUMERICHOST.
+  QNX/6.3.2)
+    define_xopen_source=no
+    ;;
+
+esac
+
+if test $define_xopen_source = yes
+then
+  # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
+  # defined precisely as g++ defines it
+  # Furthermore, on Solaris 10, XPG6 requires the use of a C99
+  # compiler
+  case $ac_sys_system/$ac_sys_release in
+    SunOS/5.8|SunOS/5.9|SunOS/5.10)
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+      ;;
+    *)
+
+$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
+
+      ;;
+  esac
+
+  # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
+  # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
+  # several APIs are not declared. Since this is also needed in some
+  # cases for HP-UX, we define it globally.
+  # except for Solaris 10, where it must not be defined,
+  # as it implies XPG4.2
+  case $ac_sys_system/$ac_sys_release in
+    SunOS/5.10|SunOS/5.11)
+
+$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+      ;;
+    *)
+
+$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
+
+
+fi
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3736,166 +3896,6 @@ if test -z "$AR"; then
     as_fn_error $? "cannot find ar" "$LINENO" 5
 fi
 
-
-# The later defininition of _XOPEN_SOURCE disables certain features
-# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
-
-$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
-
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
-# them.
-
-$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
-
-
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
-# them.
-
-$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
-
-
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
-
-$as_echo "#define _BSD_TYPES 1" >>confdefs.h
-
-
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
-# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
-# them.
-
-$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
-
-
-define_xopen_source=yes
-
-ac_sys_system=`uname -s`
-if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
-   -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
-        ac_sys_release=`uname -v`
-else
-        ac_sys_release=`uname -r`
-fi
-
-# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
-# disable features if it is defined, without any means to access these
-# features as extensions. For these systems, we skip the definition of
-# _XOPEN_SOURCE. Before adding a system to the list to gain access to
-# some feature, make sure there is no alternative way to access this
-# feature. Also, when using wildcards, make sure you have verified the
-# need for not defining _XOPEN_SOURCE on all systems matching the
-# wildcard, and that the wildcard does not include future systems
-# (which may remove their limitations).
-case $ac_sys_system/$ac_sys_release in
-  # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
-  # even though select is a POSIX function. Reported by J. Ribbens.
-  # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
-  OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
-    define_xopen_source=no
-    # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
-    # also defined. This can be overridden by defining _BSD_SOURCE
-    # As this has a different meaning on Linux, only define it on OpenBSD
-
-$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
-
-    ;;
-  # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
-  # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
-  # Marc Recht
-  NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
-    define_xopen_source=no;;
-  # On Solaris 2.6, sys/wait.h is inconsistent in the usage
-  # of union __?sigval. Reported by Stuart Bishop.
-  SunOS/5.6)
-    define_xopen_source=no;;
-  # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
-  # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
-  # Reconfirmed for 7.1.4 by Martin v. Loewis.
-  OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
-    define_xopen_source=no;;
-  # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
-  # but used in struct sockaddr.sa_family. Reported by Tim Rice.
-  SCO_SV/3.2)
-    define_xopen_source=no;;
-  # On FreeBSD 4, the math functions C89 does not cover are never defined
-  # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
-  FreeBSD/4.*)
-    define_xopen_source=no;;
-  # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
-  # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
-  # identifies itself as Darwin/7.*
-  # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
-  # disables platform specific features beyond repair.
-  # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
-  # has no effect, don't bother defining them
-  Darwin/[6789].*)
-    define_xopen_source=no;;
-  # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
-  # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
-  # or has another value. By not (re)defining it, the defaults come in place.
-  AIX/4)
-    define_xopen_source=no;;
-  AIX/5|AIX/7)
-    if test `uname -r` -eq 1; then
-      define_xopen_source=no
-    fi
-    ;;
-  # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
-  # defining NI_NUMERICHOST.
-  QNX/6.3.2)
-    define_xopen_source=no
-    ;;
-
-esac
-
-if test $define_xopen_source = yes
-then
-  # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
-  # defined precisely as g++ defines it
-  # Furthermore, on Solaris 10, XPG6 requires the use of a C99
-  # compiler
-  case $ac_sys_system/$ac_sys_release in
-    SunOS/5.8|SunOS/5.9|SunOS/5.10)
-
-$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
-
-      ;;
-    *)
-
-$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
-
-      ;;
-  esac
-
-  # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
-  # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
-  # several APIs are not declared. Since this is also needed in some
-  # cases for HP-UX, we define it globally.
-  # except for Solaris 10, where it must not be defined,
-  # as it implies XPG4.2
-  case $ac_sys_system/$ac_sys_release in
-    SunOS/5.10|SunOS/5.11)
-
-$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
-      ;;
-    *)
-
-$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
-
-      ;;
-  esac
-
-
-$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
-
-
-fi
-
-
 # If GCC, turn on warnings.
 if test "x$GCC" = "xyes"; then
     CFLAGS="$CFLAGS -Wall -W"
index a35fac08ebbed4993c6555c4e63b71009227e571..4095f4b9cc7170c092592b76e2f2b97f71a33e46 100644 (file)
@@ -20,6 +20,8 @@ AC_SUBST(extra_libs)
 AC_SUBST(include_dev_mk)
 AC_SUBST(test_suites)
 
+m4_include(m4/feature_macros.m4)
+
 dnl Checks for programs.
 AC_PROG_CC_C99
 if test "$ac_cv_prog_cc_c99" = no; then
@@ -34,8 +36,6 @@ if test -z "$AR"; then
     AC_MSG_ERROR(cannot find ar)
 fi
 
-m4_include(m4/feature_macros.m4)
-
 # If GCC, turn on warnings.
 if test "x$GCC" = "xyes"; then
     CFLAGS="$CFLAGS -Wall -W"
index 28ee35d5d65c56b9d245fb8a1d22dba8cf79dee0..7c019e18395502e1f99ed222206653745b06fb73 100644 (file)
@@ -165,15 +165,16 @@ free_manifest(struct manifest *mf)
 
 #define READ_INT(size, var) \
   do { \
-               (var) = 0; \
+               uint64_t u_ = 0; \
                for (size_t i_ = 0; i_ < (size); i_++) { \
                        int ch_ = gzgetc(f); \
                        if (ch_ == EOF) { \
                                goto error; \
                        } \
-                       (var) <<= 8; \
-                       (var) |= ch_ & 0xFF; \
+                       u_ <<= 8; \
+                       u_ |= ch_ & 0xFF; \
                } \
+               (var) = u_; \
        } while (false)
 
 #define READ_STR(var) \
@@ -289,10 +290,11 @@ error:
 
 #define WRITE_INT(size, var) \
   do { \
+               uint64_t u_ = (var); \
                uint8_t ch_; \
                size_t i_; \
                for (i_ = 0; i_ < (size); i_++) { \
-                       ch_ = ((var) >> (8 * ((size) - i_ - 1))); \
+                       ch_ = (u_ >> (8 * ((size) - i_ - 1))); \
                        if (gzputc(f, ch_) == EOF) { \
                                goto error; \
                        } \
index b568af65744ec1b552d2352759128ae1cb869167..53319dfb658bdf439b9e7f9a00c1c21bdeda9bd8 100644 (file)
@@ -13,9 +13,9 @@ murmurhashneutral2(const void *key, int len, unsigned int seed)
 
        while (len >= 4) {
                unsigned int k = data[0];
-               k |= data[1] << 8;
-               k |= data[2] << 16;
-               k |= data[3] << 24;
+               k |= ((unsigned int) data[1]) << 8;
+               k |= ((unsigned int) data[2]) << 16;
+               k |= ((unsigned int) data[3]) << 24;
 
                k *= m;
                k ^= k >> r;
@@ -30,9 +30,9 @@ murmurhashneutral2(const void *key, int len, unsigned int seed)
 
        switch (len)
        {
-       case 3: h ^= data[2] << 16;
-       case 2: h ^= data[1] << 8;
-       case 1: h ^= data[0];
+       case 3: h ^= ((unsigned int) data[2]) << 16;
+       case 2: h ^= ((unsigned int) data[1]) << 8;
+       case 1: h ^= ((unsigned int) data[0]);
                h *= m;
        };
 
diff --git a/test.sh b/test.sh
index ada8697363f585ff5dd2b5cdee2df816b549b4ce..b4c95b1af528abbd75a5eac8014a4c646a80b961 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -3,7 +3,7 @@
 # A simple test suite for ccache.
 #
 # Copyright (C) 2002-2007 Andrew Tridgell
-# Copyright (C) 2009-2016 Joel Rosdahl
+# Copyright (C) 2009-2017 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
@@ -975,20 +975,6 @@ EOF
     expect_stat 'cache miss' 0
     expect_stat 'unsupported compiler option' 1
 
-    # -------------------------------------------------------------------------
-    TEST "-MMD for different source files"
-
-    mkdir a b
-    touch a/source.c b/source.c
-    $CCACHE_COMPILE -MMD -c a/source.c
-    expect_file_content source.d "source.o: a/source.c"
-
-    $CCACHE_COMPILE -MMD -c b/source.c
-    expect_file_content source.d "source.o: b/source.c"
-
-    $CCACHE_COMPILE -MMD -c a/source.c
-    expect_file_content source.d "source.o: a/source.c"
-
     # -------------------------------------------------------------------------
     TEST "-Wp,-P"
 
@@ -1483,7 +1469,7 @@ SUITE_direct() {
     # -------------------------------------------------------------------------
     TEST "CCACHE_NODIRECT"
 
-    $CCACHE_COMPILE -c test.c
+    CCACHE_NODIRECT=1 $CCACHE_COMPILE -c test.c
     expect_stat 'cache hit (direct)' 0
     expect_stat 'cache hit (preprocessed)' 0
     expect_stat 'cache miss' 1
@@ -1553,6 +1539,37 @@ EOF
     done
     expect_stat 'files in cache' 12
 
+    # -------------------------------------------------------------------------
+    TEST "-MMD for different source files"
+
+    mkdir a b
+    touch a/source.c b/source.c
+    backdate a/source.h b/source.h
+    $CCACHE_COMPILE -MMD -c a/source.c
+    expect_file_content source.d "source.o: a/source.c"
+
+    $CCACHE_COMPILE -MMD -c b/source.c
+    expect_file_content source.d "source.o: b/source.c"
+
+    $CCACHE_COMPILE -MMD -c a/source.c
+    expect_file_content source.d "source.o: a/source.c"
+
+    # -------------------------------------------------------------------------
+    TEST "-MMD for different include file paths"
+
+    mkdir a b
+    touch a/source.h b/source.h
+    backdate a/source.h b/source.h
+    echo '#include <source.h>' >source.c
+    $CCACHE_COMPILE -MMD -Ia -c source.c
+    expect_file_content source.d "source.o: source.c a/source.h"
+
+    $CCACHE_COMPILE -MMD -Ib -c source.c
+    expect_file_content source.d "source.o: source.c b/source.h"
+
+    $CCACHE_COMPILE -MMD -Ia -c source.c
+    expect_file_content source.d "source.o: source.c a/source.h"
+
     # -------------------------------------------------------------------------
     TEST "-Wp,-MD"
 
@@ -1887,8 +1904,8 @@ EOF
 
     $CCACHE_COMPILE -c `pwd`/file.c
     expect_stat 'cache hit (direct)' 1
-    expect_stat 'cache hit (preprocessed)' 1
-    expect_stat 'cache miss' 1
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 2
 
     # -------------------------------------------------------------------------
     TEST "__FILE__ in include file disables direct mode"
@@ -1916,8 +1933,8 @@ EOF
 
     $CCACHE_COMPILE -c `pwd`/file2_h.c
     expect_stat 'cache hit (direct)' 1
-    expect_stat 'cache hit (preprocessed)' 1
-    expect_stat 'cache miss' 1
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 2
 
     # -------------------------------------------------------------------------
     TEST "__FILE__ in source file ignored if sloppy"
@@ -2123,13 +2140,13 @@ EOF
 
     CPATH=subdir2 $CCACHE_COMPILE -c foo.c
     expect_stat 'cache hit (direct)' 1
-    expect_stat 'cache hit (preprocessed)' 1
-    expect_stat 'cache miss' 1
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 2 # subdir2 is part of the preprocessor output
 
     CPATH=subdir2 $CCACHE_COMPILE -c foo.c
     expect_stat 'cache hit (direct)' 2
-    expect_stat 'cache hit (preprocessed)' 1
-    expect_stat 'cache miss' 1
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 2
 
     # -------------------------------------------------------------------------
     TEST "Comment in strings"
@@ -2278,8 +2295,8 @@ SUITE_basedir() {
     # CCACHE_BASEDIR="" is the default:
     $CCACHE_COMPILE -I`pwd`/include -c src/test.c
     expect_stat 'cache hit (direct)' 0
-    expect_stat 'cache hit (preprocessed)' 1
-    expect_stat 'cache miss' 1
+    expect_stat 'cache hit (preprocessed)' 0
+    expect_stat 'cache miss' 2
 
     # -------------------------------------------------------------------------
     TEST "Path normalization"
index ba8a4da334047e73c845c13a0bd0843fb180db92..7866f76f623ed8aca238a1408c0b6469eebec607 100644 (file)
--- a/version.c
+++ b/version.c
@@ -1 +1 @@
-const char CCACHE_VERSION[] = "3.3.3";
+const char CCACHE_VERSION[] = "3.3.4";