<body class="article">\r
<div id="header">\r
<h1>ccache authors</h1>\r
-<span id="revnumber">version 3.3.5</span>\r
+<span id="revnumber">version 3.3.6</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>
</li>\r
<li>\r
<p>\r
-Luboš Luňák <<a href="mailto:l.lunak@suse.cz">l.lunak@suse.cz</a>>\r
+Luboš Luňák <<a href="mailto:l.lunak@centrum.cz">l.lunak@centrum.cz</a>>\r
</p>\r
</li>\r
<li>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.3.5<br />\r
+Version 3.3.6<br />\r
Last updated\r
- 2018-01-13 19:31:06 CET\r
+ 2018-01-28 16:21:55 CET\r
</div>\r
</div>\r
</body>\r
* Lalit Chhabra <lchhabra@linuxmail.org>
* Lars Gustäbel <lars@gustaebel.de>
* Leanid Chaika <leanid.chaika@gmail.com>
-* Luboš Luňák <l.lunak@suse.cz>
+* Luboš Luňák <l.lunak@centrum.cz>
* Mark Starovoytov <starovoytov.mark@googlemail.com>
* Martin Pool <mbp@sourcefrog.net>
* Matthias Kretz <kretz@kde.org>
<body class="article">\r
<div id="header">\r
<h1>ccache copyright and license</h1>\r
-<span id="revnumber">version 3.3.5</span>\r
+<span id="revnumber">version 3.3.5+dirty</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.3.5<br />\r
+Version 3.3.5+dirty<br />\r
Last updated\r
- 2018-01-13 19:31:27 CET\r
+ 2018-01-13 19:38:26 CET\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>CCACHE(1)</h1>\r
-<span id="revnumber">version 3.3.5</span>\r
+<span id="revnumber">version 3.3.6</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>
rewrites absolute paths into relative paths before computing the hash that\r
identifies the compilation, but only for paths under the specified\r
directory. If set to the empty string (which is the default), no rewriting\r
- is done. See also the discussion under\r
- <a href="#_compiling_in_different_directories">COMPILING IN DIFFERENT DIRECTORIES</a>.\r
- If using GCC or newer versions of Clang, you might want to look into the\r
- <strong>-fdebug-prefix-map=old=new</strong> option for relocating debug info to a common\r
- prefix (mapping prefix with old=new).\r
+ is done. A typical path to use as the base directory is your home directory\r
+ or another directory that is a parent of your build directories. Don’t use\r
+ <code>/</code> as the base directory since that will make ccache also rewrite paths to\r
+ system header files, which doesn’t gain anything.\r
</p>\r
+<div class="paragraph"><p>See also the discussion under <a href="#_compiling_in_different_directories">COMPILING IN DIFFERENT DIRECTORIES</a>.</p></div>\r
</dd>\r
<dt class="hdlist1">\r
<strong>cache_dir</strong> (<strong>CCACHE_DIR</strong>)\r
when generating debug info (compiler option <strong>-g</strong> with variations).\r
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
+ See also the discussion under\r
+ <a href="#_compiling_in_different_directories">COMPILING IN DIFFERENT DIRECTORIES</a>.\r
</p>\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
<div class="sect1">\r
<h2 id="_compiling_in_different_directories">Compiling in different directories</h2>\r
<div class="sectionbody">\r
-<div class="paragraph"><p>Some information included in the hash that identifies a unique compilation may\r
+<div class="paragraph"><p>Some information included in the hash that identifies a unique compilation can\r
contain absolute paths:</p></div>\r
<div class="ulist"><ul>\r
<li>\r
</li>\r
<li>\r
<p>\r
-Paths specified by compiler options (such as <strong>-I</strong>, <strong>-MF</strong>, etc) may be\r
- absolute.\r
+Paths specified by compiler options (such as <strong>-I</strong>, <strong>-MF</strong>, etc) on the command\r
+ line may be absolute.\r
</p>\r
</li>\r
<li>\r
<div class="paragraph"><p>This means that if you compile the same code in different locations, you can’t\r
share compilation results between the different build directories since you get\r
cache misses because of the absolute build directory paths that are part of the\r
-hash. To mitigate this problem, you can specify a “base directory” in the\r
-configuration setting <strong>base_dir</strong> to an absolute path to the directory. ccache\r
-will then rewrite absolute paths that are under the base directory (i.e., paths\r
-that have the base directory as a prefix) to relative paths when constructing\r
-the hash. A typical path to use as the base directory is your home directory or\r
-another directory that is a parent of your build directories. (Don’t use <code>/</code> as\r
-the base directory since that will make ccache also rewrite paths to system\r
-header files, which doesn’t gain anything.)</p></div>\r
-<div class="paragraph"><p>The drawbacks of using a base directory are:</p></div>\r
+hash.</p></div>\r
+<div class="paragraph"><p>Here’s what can be done to enable cache hits between different build\r
+directories:</p></div>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+If you build with <strong>-g</strong> (or similar) to add debug information to the object\r
+ file, you must either:\r
+</p>\r
+<div class="openblock">\r
+<div class="content">\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
-If you specify an absolute path to the source code file, <strong>__FILE__</strong> macros\r
- will be expanded to a relative path instead.\r
+use the <strong>-fdebug-prefix-map=<em>old</em>=<em>new</em></strong> option for relocating debug info to\r
+ a common prefix (e.g. <strong>-fdebug-prefix-map=$PWD=.</strong>); or\r
</p>\r
</li>\r
<li>\r
<p>\r
-If you specify an absolute path to the source code file and compile with\r
- <strong>-g</strong>, the source code path stored in the object file may point to the wrong\r
- directory, which may prevent debuggers like GDB from finding the source code.\r
- Sometimes, a work-around is to change the directory explicitly with the\r
- “cd” command in GDB.\r
+set <strong>hash_dir = false</strong>.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div></div>\r
+</li>\r
+<li>\r
+<p>\r
+If you use absolute paths anywhere on the command line (e.g. the source code\r
+ file path or an argument to compiler options like <strong>-I</strong> and <strong>-MF</strong>), you must\r
+ to set <strong>base_dir</strong> to an absolute path to a “base directory”. ccache will\r
+ then rewrite absolute paths under that directory to relative before computing\r
+ the hash.\r
</p>\r
</li>\r
</ul></div>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.3.5<br />\r
+Version 3.3.6<br />\r
Last updated\r
- 2018-01-13 17:47:38 CET\r
+ 2018-01-28 16:20:40 CET\r
</div>\r
</div>\r
</body>\r
rewrites absolute paths into relative paths before computing the hash that
identifies the compilation, but only for paths under the specified
directory. If set to the empty string (which is the default), no rewriting
- is done. See also the discussion under
- <<_compiling_in_different_directories,COMPILING IN DIFFERENT DIRECTORIES>>.
- If using GCC or newer versions of Clang, you might want to look into the
- *-fdebug-prefix-map=old=new* option for relocating debug info to a common
- prefix (mapping prefix with old=new).
+ is done. 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
+ +/+ as the base directory since that will make ccache also rewrite paths to
+ system header files, which doesn't gain anything.
++
+See also the discussion under <<_compiling_in_different_directories,COMPILING
+IN DIFFERENT DIRECTORIES>>.
*cache_dir* (*CCACHE_DIR*)::
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.
+ See also the discussion under
+ <<_compiling_in_different_directories,COMPILING IN DIFFERENT DIRECTORIES>>.
+
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
Compiling in different directories
----------------------------------
-Some information included in the hash that identifies a unique compilation may
+Some information included in the hash that identifies a unique compilation can
contain absolute paths:
* The preprocessed source code may contain absolute paths to include files if
the compiler option *-g* is used or if absolute paths are given to *-I* and
similar compiler options.
-* Paths specified by compiler options (such as *-I*, *-MF*, etc) may be
- absolute.
+* Paths specified by compiler options (such as *-I*, *-MF*, etc) on the command
+ line may be absolute.
* The source code file path may be absolute, and that path may substituted for
*\_\_FILE__* macros in the source code or included in warnings emitted to
standard error by the preprocessor.
This means that if you compile the same code in different locations, you can't
share compilation results between the different build directories since you get
cache misses because of the absolute build directory paths that are part of the
-hash. To mitigate this problem, you can specify a ``base directory'' in the
-configuration setting *base_dir* to an absolute path to the directory. ccache
-will 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 +/+ as
-the base directory since that will make ccache also rewrite paths to system
-header files, which doesn't gain anything.)
-
-The drawbacks of using a base directory are:
-
-* If you specify an absolute path to the source code file, *\_\_FILE__* macros
- will be expanded to a relative path instead.
-* If you specify an absolute path to the source code file and compile with
- *-g*, the source code path stored in the object file may point to the wrong
- directory, which may prevent debuggers like GDB from finding the source code.
- Sometimes, a work-around is to change the directory explicitly with the
- ``cd'' command in GDB.
+hash.
+
+Here's what can be done to enable cache hits between different build
+directories:
+
+* If you build with *-g* (or similar) to add debug information to the object
+ file, you must either:
++
+--
+** use the *-fdebug-prefix-map=_old_=_new_* option for relocating debug info to
+ a common prefix (e.g. *-fdebug-prefix-map=$PWD=.*); or
+** set *hash_dir = false*.
+--
+* If you use absolute paths anywhere on the command line (e.g. the source code
+ file path or an argument to compiler options like *-I* and *-MF*), you must
+ to set *base_dir* to an absolute path to a ``base directory''. ccache will
+ then rewrite absolute paths under that directory to relative before computing
+ the hash.
Precompiled headers
<body class="article">\r
<div id="header">\r
<h1>ccache news</h1>\r
-<span id="revnumber">version 3.3.5</span>\r
+<span id="revnumber">version 3.3.6</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>\r
<div id="content">\r
<div class="sect1">\r
+<h2 id="_ccache_3_3_6">ccache 3.3.6</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>Release date: 2018-01-28</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
+Improved instructions on how to get cache hits between different working\r
+ directories.\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 regression in ccache 3.3.5 related to the <code>UNCACHED_ERR_FD</code> feature.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
<h2 id="_ccache_3_3_5">ccache 3.3.5</h2>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2018-01-13</p></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
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes">Bug fixes</h3>\r
+<h3 id="_bug_fixes_2">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<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_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
</ul></div>\r
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-10-26</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-09-28</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_4">Bug fixes</h3>\r
+<h3 id="_bug_fixes_5">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-09-07</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
</ul></div>\r
</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
</ul></div>\r
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-09-28</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-09-07</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_8">Bug fixes</h3>\r
+<h3 id="_bug_fixes_9">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-07-20</p></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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-07-12</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
<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_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
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_11">Bug fixes</h3>\r
+<h3 id="_bug_fixes_12">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2015-10-08</p></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
<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_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
</ul></div>\r
</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
<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_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
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2014-12-10</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
<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_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
</ul></div>\r
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-07-12</p></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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2015-03-07</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
<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_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
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2013-01-06</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
<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_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
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2012-01-08</p></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
<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_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
</ul></div>\r
</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
<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_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
</ul></div>\r
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2011-01-09</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-28</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-21</p></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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-07</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
<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_12">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_13">New features and improvements</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-07-15</p></div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_30">Bug fixes</h3>\r
+<h3 id="_bug_fixes_31">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_new_features_and_improvements_13">New features and improvements</h3>\r
+<h3 id="_new_features_and_improvements_14">New features and improvements</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_31">Bug fixes</h3>\r
+<h3 id="_bug_fixes_32">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.3.5<br />\r
+Version 3.3.6<br />\r
Last updated\r
- 2018-01-13 17:52:20 CET\r
+ 2018-01-28 16:21:15 CET\r
</div>\r
</div>\r
</body>\r
ccache news
===========
+ccache 3.3.6
+------------
+Release date: 2018-01-28
+
+New features and improvements
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- Improved instructions on how to get cache hits between different working
+ directories.
+
+
+Bug fixes
+~~~~~~~~~
+
+- Fixed regression in ccache 3.3.5 related to the `UNCACHED_ERR_FD` feature.
+
+
ccache 3.3.5
------------
Release date: 2018-01-13
.\" Title: ccache
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\" Date: 01/13/2018
+.\" Date: 01/28/2018
.\" Manual: ccache Manual
-.\" Source: ccache 3.3.5
+.\" Source: ccache 3.3.6
.\" Language: English
.\"
-.TH "CCACHE" "1" "01/13/2018" "ccache 3\&.3\&.5" "ccache Manual"
+.TH "CCACHE" "1" "01/28/2018" "ccache 3\&.3\&.6" "ccache Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.PP
\fBbase_dir\fR (\fBCCACHE_BASEDIR\fR)
.RS 4
-This setting should be an absolute path to a directory\&. ccache then rewrites absolute paths into relative paths before computing the hash that identifies the compilation, but only for paths under the specified directory\&. If set to the empty string (which is the default), no rewriting is done\&. See also the discussion under
-COMPILING IN DIFFERENT DIRECTORIES\&. If using GCC or newer versions of Clang, you might want to look into the
-\fB\-fdebug\-prefix\-map=old=new\fR
-option for relocating debug info to a common prefix (mapping prefix with old=new)\&.
+This setting should be an absolute path to a directory\&. ccache then rewrites absolute paths into relative paths before computing the hash that identifies the compilation, but only for paths under the specified directory\&. If set to the empty string (which is the default), no rewriting is done\&. 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\(cqt use
+/
+as the base directory since that will make ccache also rewrite paths to system header files, which doesn\(cqt gain anything\&.
+.sp
+See also the discussion under
+COMPILING IN DIFFERENT DIRECTORIES\&.
.RE
.PP
\fBcache_dir\fR (\fBCCACHE_DIR\fR)
\fBbase_dir\fR
is set (and matches the CWD) and the compiler option
\fB\-fdebug\-prefix\-map\fR
-is used\&.
+is used\&. See also the discussion under
+COMPILING IN DIFFERENT DIRECTORIES\&.
.sp
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
Based on the hash, the cached compilation result can be looked up directly in the cache\&.
.SH "COMPILING IN DIFFERENT DIRECTORIES"
.sp
-Some information included in the hash that identifies a unique compilation may contain absolute paths:
+Some information included in the hash that identifies a unique compilation can contain absolute paths:
.sp
.RS 4
.ie n \{\
.\}
Paths specified by compiler options (such as
\fB\-I\fR,
-\fB\-MF\fR, etc) may be absolute\&.
+\fB\-MF\fR, etc) on the command line may be absolute\&.
.RE
.sp
.RS 4
macros in the source code or included in warnings emitted to standard error by the preprocessor\&.
.RE
.sp
-This means that if you compile the same code in different locations, you can\(cqt share compilation results between the different build directories since you get cache misses because of the absolute build directory paths that are part of the hash\&. To mitigate this problem, you can specify a \(lqbase directory\(rq in the configuration setting \fBbase_dir\fR to an absolute path to the directory\&. ccache will 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\(cqt use / as the base directory since that will make ccache also rewrite paths to system header files, which doesn\(cqt gain anything\&.)
+This means that if you compile the same code in different locations, you can\(cqt share compilation results between the different build directories since you get cache misses because of the absolute build directory paths that are part of the hash\&.
.sp
-The drawbacks of using a base directory are:
+Here\(cqs what can be done to enable cache hits between different build directories:
.sp
.RS 4
.ie n \{\
.sp -1
.IP \(bu 2.3
.\}
-If you specify an absolute path to the source code file,
-\fB__FILE__\fR
-macros will be expanded to a relative path instead\&.
+If you build with
+\fB\-g\fR
+(or similar) to add debug information to the object file, you must either:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+use the
+\fB\-fdebug\-prefix\-map=\fR\fB\fIold\fR\fR\fB=\fR\fB\fInew\fR\fR
+option for relocating debug info to a common prefix (e\&.g\&.
+\fB\-fdebug\-prefix\-map=$PWD=\&.\fR); or
.RE
.sp
.RS 4
.sp -1
.IP \(bu 2.3
.\}
-If you specify an absolute path to the source code file and compile with
-\fB\-g\fR, the source code path stored in the object file may point to the wrong directory, which may prevent debuggers like GDB from finding the source code\&. Sometimes, a work\-around is to change the directory explicitly with the \(lqcd\(rq command in GDB\&.
+set
+\fBhash_dir = false\fR\&.
+.RE
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+If you use absolute paths anywhere on the command line (e\&.g\&. the source code file path or an argument to compiler options like
+\fB\-I\fR
+and
+\fB\-MF\fR), you must to set
+\fBbase_dir\fR
+to an absolute path to a \(lqbase directory\(rq\&. ccache will then rewrite absolute paths under that directory to relative before computing the hash\&.
.RE
.SH "PRECOMPILED HEADERS"
.sp
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
- // assembly) refers to an external file. If the file changes, the hash
- // should change as well, but finding out what file to hash is too hard
- // for ccache, so just bail out.
- cc_log("Found unsupported .incbin directive in source code");
+ // An assembler .inc bin (without the space) statement, which could be
+ // part of inline assembly, refers to an external file. If the file
+ // changes, the hash should change as well, but finding out what file to
+ // hash is too hard for ccache, so just bail out.
+ cc_log("Found unsupported .inc" "bin directive in source code");
stats_update(STATS_UNSUPPORTED_DIRECTIVE);
failed();
} else {
setup_uncached_err(void)
{
int uncached_fd = dup(2);
- set_cloexec_flag(uncached_fd);
if (uncached_fd == -1) {
cc_log("dup(2) failed: %s", strerror(errno));
failed();
}
+ // Leak the file descriptor.
// Leak a pointer to the environment.
char *buf = format("UNCACHED_ERR_FD=%d", uncached_fd);
// Copyright (C) 1997-1998 Andrew Tridgell
-// Copyright (C) 2009-2016 Joel Rosdahl
+// Copyright (C) 2009-2018 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
mdfour_update(struct mdfour *md, const unsigned char *in, size_t n)
{
#ifdef CCACHE_DEBUG_HASH
- if (getenv("CCACHE_DEBUG_HASH")) {
+ if (n > 0 && getenv("CCACHE_DEBUG_HASH")) {
FILE *f = fopen("ccache-debug-hash.bin", "a");
fwrite(in, 1, n, f);
fclose(f);
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 0
expect_stat 'unsupported code directive' 1
+
+ # -------------------------------------------------------------------------
+ TEST "UNCACHED_ERR_FD"
+
+ cat >compiler.sh <<'EOF'
+#!/bin/sh
+if [ "$1" = "-E" ]; then
+ echo preprocessed
+ printf ${N}Pu >&$UNCACHED_ERR_FD
+else
+ echo compiled >test1.o
+ printf ${N}Cc >&2
+ printf ${N}Cu >&$UNCACHED_ERR_FD
+fi
+EOF
+ chmod +x compiler.sh
+
+ N=1 $CCACHE ./compiler.sh -c test1.c 2>stderr.txt
+ stderr=$(cat stderr.txt)
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 1
+ if [ "$stderr" != "1Pu1Cu1Cc" ]; then
+ test_failed "Unexpected stderr: $stderr != 1Pu1Cu1Cc"
+ fi
+
+ N=2 $CCACHE ./compiler.sh -c test1.c 2>stderr.txt
+ stderr=$(cat stderr.txt)
+ expect_stat 'cache hit (preprocessed)' 1
+ expect_stat 'cache miss' 1
+ if [ "$stderr" != "2Pu1Cc" ]; then
+ test_failed "Unexpected stderr: $stderr != 2Pu1Cc"
+ fi
}
# =============================================================================
-const char CCACHE_VERSION[] = "3.3.5";
+const char CCACHE_VERSION[] = "3.3.6";