<body class="article">\r
<div id="header">\r
<h1>ccache authors</h1>\r
-<span id="revnumber">version 3.1.11</span>\r
+<span id="revnumber">version 3.1.12</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.11<br />\r
+Version 3.1.12<br />\r
Last updated\r
- 2015-03-07 16:37:34 CET\r
+ 2016-07-12 21:34:27 CEST\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>ccache installation</h1>\r
-<span id="revnumber">version 3.1.11</span>\r
+<span id="revnumber">version 3.1.12</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.11<br />\r
+Version 3.1.12<br />\r
Last updated\r
- 2015-03-07 16:37:34 CET\r
+ 2016-07-12 21:34:27 CEST\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>ccache copyright and license</h1>\r
-<span id="revnumber">version 3.1.11</span>\r
+<span id="revnumber">version 3.1.12</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div class="listingblock">\r
<div class="content">\r
<pre><code> Copyright (C) 2002-2007 Andrew Tridgell\r
- Copyright (C) 2009-2011 Joel Rosdahl</code></pre>\r
+ Copyright (C) 2009-2016 Joel Rosdahl</code></pre>\r
</div></div>\r
</div>\r
</div>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.11<br />\r
+Version 3.1.12<br />\r
Last updated\r
- 2015-03-07 16:37:34 CET\r
+ 2016-07-12 21:34:27 CEST\r
</div>\r
</div>\r
</body>\r
-------------------------------------------------------------------------------
Copyright (C) 2002-2007 Andrew Tridgell
- Copyright (C) 2009-2011 Joel Rosdahl
+ Copyright (C) 2009-2016 Joel Rosdahl
-------------------------------------------------------------------------------
<body class="article">\r
<div id="header">\r
<h1>CCACHE(1)</h1>\r
-<span id="revnumber">version 3.1.11</span>\r
+<span id="revnumber">version 3.1.12</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.11<br />\r
+Version 3.1.12<br />\r
Last updated\r
- 2015-03-07 16:37:34 CET\r
+ 2016-07-12 21:34:27 CEST\r
</div>\r
</div>\r
</body>\r
<body class="article">\r
<div id="header">\r
<h1>ccache news</h1>\r
-<span id="revnumber">version 3.1.11</span>\r
+<span id="revnumber">version 3.1.12</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>\r
<div id="content">\r
<div class="sect1">\r
+<h2 id="_ccache_3_1_12">ccache 3.1.12</h2>\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">Bug fixes</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Fixed a bug where (due to ccache rewriting paths) the compiler could choose\r
+ incorrect include files if <code>CCACHE_BASEDIR</code> is used and the source file path\r
+ is absolute and is a symlink.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
<h2 id="_ccache_3_1_11">ccache 3.1.11</h2>\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">Bug fixes</h3>\r
+<h3 id="_bug_fixes_2">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_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: 2013-01-06</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
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_bug_fixes_4">Bug fixes</h3>\r
+<h3 id="_bug_fixes_5">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2012-01-08</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="_bug_fixes_6">Bug fixes</h3>\r
+<h3 id="_bug_fixes_7">Bug fixes</h3>\r
<div class="ulist"><ul>\r
<li>\r
<p>\r
</ul></div>\r
</div>\r
<div class="sect2">\r
-<h3 id="_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: 2011-01-09</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: 2010-11-28</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: 2010-11-21</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: 2010-11-07</p></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
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-07-15</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
</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 id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.11<br />\r
+Version 3.1.12<br />\r
Last updated\r
- 2015-03-07 16:37:34 CET\r
+ 2016-07-12 21:34:27 CEST\r
</div>\r
</div>\r
</body>\r
===========
+ccache 3.1.12
+-------------
+Release date: 2016-07-12
+
+
+Bug fixes
+~~~~~~~~~
+
+- Fixed a bug where (due to ccache rewriting paths) the compiler could choose
+ incorrect include files if `CCACHE_BASEDIR` is used and the source file path
+ is absolute and is a symlink.
+
+
ccache 3.1.11
-------------
Release date: 2015-03-07
<body class="article">\r
<div id="header">\r
<h1>ccache README</h1>\r
-<span id="revnumber">version 3.1.11</span>\r
+<span id="revnumber">version 3.1.12</span>\r
<div id="toc">
<div id="toctitle">Table of Contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.1.11<br />\r
+Version 3.1.12<br />\r
Last updated\r
- 2012-11-07 19:42:42 CET\r
+ 2016-07-12 21:34:27 CEST\r
</div>\r
</div>\r
</body>\r
.\" Title: ccache
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 03/07/2015
+.\" Date: 07/12/2016
.\" Manual: ccache Manual
-.\" Source: ccache 3.1.11
+.\" Source: ccache 3.1.12
.\" Language: English
.\"
-.TH "CCACHE" "1" "03/07/2015" "ccache 3\&.1\&.11" "ccache Manual"
+.TH "CCACHE" "1" "07/12/2016" "ccache 3\&.1\&.12" "ccache Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
* ccache -- a fast C/C++ compiler cache
*
* Copyright (C) 2002-2007 Andrew Tridgell
- * Copyright (C) 2009-2015 Joel Rosdahl
+ * Copyright (C) 2009-2016 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
MYNAME " version %s\n"
"\n"
"Copyright (C) 2002-2007 Andrew Tridgell\n"
-"Copyright (C) 2009-2015 Joel Rosdahl\n"
+"Copyright (C) 2009-2016 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"
goto out;
}
- /* Rewrite to relative to increase hit rate. */
- input_file = make_relative_path(x_strdup(argv[i]));
+ lstat(argv[i], &st);
+ if (S_ISLNK(st.st_mode)) {
+ /* Don't rewrite source file path if it's a symlink since
+ make_relative_path resolves symlinks using realpath(3) and this leads
+ to potentially choosing incorrect relative header files. See the
+ "symlink to source file" test. */
+ input_file = x_strdup(argv[i]);
+ } else {
+ /* Rewrite to relative to increase hit rate. */
+ input_file = make_relative_path(x_strdup(argv[i]));
+ }
}
if (!input_file) {
# A simple test suite for ccache.
#
# Copyright (C) 2002-2007 Andrew Tridgell
-# Copyright (C) 2009-2015 Joel Rosdahl
+# Copyright (C) 2009-2016 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
checkstat 'cache miss' 2
}
+symlinks_suite() {
+ ##################################################################
+ testname="symlink to source directory"
+
+ mkdir dir
+ cd dir
+ mkdir -p d1/d2
+ echo '#define A "OK"' >d1/h.h
+ cat <<EOF >d1/d2/c.c
+#include <stdio.h>
+#include "../h.h"
+int main() { printf("%s\n", A); }
+EOF
+ echo '#define A "BUG"' >h.h
+ ln -s d1/d2 d3
+
+ CCACHE_BASEDIR=/ $CCACHE $COMPILER -c $PWD/d3/c.c
+ $COMPILER -c $PWD/d3/c.c
+ $COMPILER c.o -o c
+ result=$(./c)
+ if [ "$result" != OK ]; then
+ test_failed "Incorrect header file used"
+ fi
+
+ cd ..
+ rm -rf dir
+
+ ##################################################################
+ testname="symlink to source file"
+
+ mkdir dir
+ cd dir
+ mkdir d
+ echo '#define A "BUG"' >d/h.h
+ cat <<EOF >d/c.c
+#include <stdio.h>
+#include "h.h"
+int main() { printf("%s\n", A); }
+EOF
+ echo '#define A "OK"' >h.h
+ ln -s d/c.c c.c
+
+ CCACHE_BASEDIR=/ $CCACHE $COMPILER -c $PWD/c.c
+ $COMPILER c.o -o c
+ result=$(./c)
+ if [ "$result" != OK ]; then
+ test_failed "Incorrect header file used"
+ fi
+
+ cd ..
+ rm -rf dir
+}
+
######################################################################
# main program
extrafiles
cleanup
pch
+symlinks
"
host_os="`uname -s`"
-const char CCACHE_VERSION[] = "3.1.11";
+const char CCACHE_VERSION[] = "3.1.12";