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

index 3b4a3ac6e3ee5e560c7b987c30a39f02cd4d0b63..2d4e9c18c06b9003633d559815f3fcdcecaf4cca 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+5_g3df7836_dirty</span>\r
+<span id="revnumber">version 3.3.2</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>
@@ -1065,9 +1065,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+5_g3df7836_dirty<br />\r
+Version 3.3.2<br />\r
 Last updated\r
- 2016-09-07 21:00:33 CEST\r
+ 2016-09-28 22:29:23 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 68009f65e8d55a042ee1755fc1ac13d8e9ad99d7..497fb5ee745b52a2dff85d743b2c14294e4f2d4b 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+5_g3df7836_dirty</span>\r
+<span id="revnumber">version 3.3.2</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>
@@ -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+5_g3df7836_dirty<br />\r
+Version 3.3.2<br />\r
 Last updated\r
- 2016-09-07 21:00:33 CEST\r
+ 2016-09-28 22:29:23 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 7595e26beebe9a024bb66b4addaa8bad5b9d7699..8e4ddaab75a6d68f002baa2151d06749cca1f632 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+5_g3df7836_dirty</span>\r
+<span id="revnumber">version 3.3.2</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>
@@ -2232,9 +2232,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+5_g3df7836_dirty<br />\r
+Version 3.3.2<br />\r
 Last updated\r
- 2016-09-07 21:00:33 CEST\r
+ 2016-09-28 22:29:23 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 0d8dd8bdb8b4ee9eb65bd9071669d94eaea004d2..c5f20cac2c853851e384e8586bcd725d9b106ec5 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.1</span>\r
+<span id="revnumber">version 3.3.2</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,36 @@ asciidoc.install(2);
 </div>\r
 <div id="content">\r
 <div class="sect1">\r
+<h2 id="_ccache_3_3_2">ccache 3.3.2</h2>\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">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.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Fixed a regression in ccache 3.3.1: ccache could get confused when using the\r
+  compiler option <code>-Wp,</code> to pass multiple options to the preprocessor,\r
+  resulting in missing dependency files from direct mode cache hits.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
 <h2 id="_ccache_3_3_1">ccache 3.3.1</h2>\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">Bug fixes</h3>\r
+<h3 id="_bug_fixes_2">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -928,7 +953,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_2">Bug fixes</h3>\r
+<h3 id="_bug_fixes_3">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -950,11 +975,29 @@ Fixed build and test for MinGW32 and Windows.
 </div>\r
 </div>\r
 <div class="sect1">\r
+<h2 id="_ccache_3_2_9">ccache 3.2.9</h2>\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
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Fixed a regression in ccache 3.2.8: ccache could get confused when using the\r
+  compiler option <code>-Wp,</code> to pass multiple options to the preprocessor,\r
+  resulting in missing dependency files from direct mode cache hits.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
 <h2 id="_ccache_3_2_8">ccache 3.2.8</h2>\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_3">Bug fixes</h3>\r
+<h3 id="_bug_fixes_5">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -978,7 +1021,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_4">Bug fixes</h3>\r
+<h3 id="_bug_fixes_6">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1001,7 +1044,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_5">Bug fixes</h3>\r
+<h3 id="_bug_fixes_7">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1051,7 +1094,7 @@ Made it harder to misinterpret documentation of boolean environment settings'
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_6">Bug fixes</h3>\r
+<h3 id="_bug_fixes_8">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1111,7 +1154,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_7">Bug fixes</h3>\r
+<h3 id="_bug_fixes_9">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1166,7 +1209,7 @@ Added support for compiler option <code>-gsplit-dwarf</code>.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_8">Bug fixes</h3>\r
+<h3 id="_bug_fixes_10">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1220,7 +1263,7 @@ Add support for caching code coverage results (compiling for gcov).
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_9">Bug fixes</h3>\r
+<h3 id="_bug_fixes_11">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1291,7 +1334,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_10">Bug fixes</h3>\r
+<h3 id="_bug_fixes_12">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1523,7 +1566,7 @@ Various other improvements of the test suite.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_11">Bug fixes</h3>\r
+<h3 id="_bug_fixes_13">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1554,7 +1597,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_12">Bug fixes</h3>\r
+<h3 id="_bug_fixes_14">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1572,7 +1615,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_13">Bug fixes</h3>\r
+<h3 id="_bug_fixes_15">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1655,7 +1698,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_14">Bug fixes</h3>\r
+<h3 id="_bug_fixes_16">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1695,7 +1738,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_15">Bug fixes</h3>\r
+<h3 id="_bug_fixes_17">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1766,7 +1809,7 @@ Clang plugins are now hashed to catch plugin upgrades.
 </ul></div>\r
 </div>\r
 <div class="sect2">\r
-<h3 id="_bug_fixes_16">Bug fixes</h3>\r
+<h3 id="_bug_fixes_18">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1814,7 +1857,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_17">Bug fixes</h3>\r
+<h3 id="_bug_fixes_19">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1897,7 +1940,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_18">Bug fixes</h3>\r
+<h3 id="_bug_fixes_20">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1950,7 +1993,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_19">Bug fixes</h3>\r
+<h3 id="_bug_fixes_21">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -1983,7 +2026,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_20">Bug fixes</h3>\r
+<h3 id="_bug_fixes_22">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2016,7 +2059,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_21">Bug fixes</h3>\r
+<h3 id="_bug_fixes_23">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2043,7 +2086,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_22">Bug fixes</h3>\r
+<h3 id="_bug_fixes_24">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2091,7 +2134,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_23">Bug fixes</h3>\r
+<h3 id="_bug_fixes_25">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2213,7 +2256,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_24">Bug fixes</h3>\r
+<h3 id="_bug_fixes_26">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2299,7 +2342,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_25">Bug fixes</h3>\r
+<h3 id="_bug_fixes_27">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2488,7 +2531,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_26">Bug fixes</h3>\r
+<h3 id="_bug_fixes_28">Bug fixes</h3>\r
 <div class="ulist"><ul>\r
 <li>\r
 <p>\r
@@ -2633,9 +2676,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.1<br />\r
+Version 3.3.2<br />\r
 Last updated\r
- 2016-09-07 21:19:19 CEST\r
+ 2016-09-28 22:44:16 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 8eaf4b6abb827ad52c2664f015020c9e9cbed043..2c95723c7d314c90327cac016ac09a0c3d9dd428 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,6 +1,22 @@
 ccache news
 ===========
 
+ccache 3.3.2
+------------
+Release date: 2016-09-28
+
+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.
+
+- Fixed a regression in ccache 3.3.1: ccache could get confused when using the
+  compiler option `-Wp,` to pass multiple options to the preprocessor,
+  resulting in missing dependency files from direct mode cache hits.
+
+
 ccache 3.3.1
 ------------
 Release date: 2016-09-07
@@ -111,6 +127,18 @@ Bug fixes
 - Fixed build and test for MinGW32 and Windows.
 
 
+ccache 3.2.9
+------------
+Release date: 2016-09-28
+
+Bug fixes
+~~~~~~~~~
+
+- Fixed a regression in ccache 3.2.8: ccache could get confused when using the
+  compiler option `-Wp,` to pass multiple options to the preprocessor,
+  resulting in missing dependency files from direct mode cache hits.
+
+
 ccache 3.2.8
 ------------
 Release date: 2016-09-07
index 9b777fe7feb82c475ab9dc28946bacd8f36b4aed..afa8a49529c7f2733ee314839ebaebbfdc6d9c15 100644 (file)
--- a/ccache.1
+++ b/ccache.1
@@ -2,12 +2,12 @@
 .\"     Title: ccache
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 09/07/2016
+.\"      Date: 09/28/2016
 .\"    Manual: ccache Manual
-.\"    Source: ccache 3.3.1
+.\"    Source: ccache 3.3.2
 .\"  Language: English
 .\"
-.TH "CCACHE" "1" "09/07/2016" "ccache 3\&.3\&.1" "ccache Manual"
+.TH "CCACHE" "1" "09/28/2016" "ccache 3\&.3\&.2" "ccache Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index 8ffadccc164ea11929801b87cec9c110bda8014c..c4070adee98be20ad036a7d988dc3eecb6880774 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1536,6 +1536,13 @@ 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);
@@ -2438,8 +2445,15 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                                // Treat it like -D.
                                args_add(cpp_args, argv[i] + 4);
                                continue;
-                       } else if (str_startswith(argv[i], "-Wp,-M")) {
-                               // -MF, -MP, -MQ, -MT, etc. TODO: Make argument to MF/MQ/MT relative.
+                       } else if (str_eq(argv[i], "-Wp,-MP")
+                                  || (strlen(argv[i]) > 8
+                                      && str_startswith(argv[i], "-Wp,-M")
+                                      && argv[i][7] == ','
+                                      && (argv[i][6] == 'F'
+                                          || argv[i][6] == 'Q'
+                                          || argv[i][6] == 'T')
+                                      && !strchr(argv[i] + 8, ','))) {
+                               // TODO: Make argument to MF/MQ/MT relative.
                                args_add(dep_args, argv[i]);
                                continue;
                        } else if (conf->direct_mode) {
diff --git a/test.sh b/test.sh
index 6ca18c9bf036a4e14b8252e92f8cb2b7cb751fe9..9c7314ea0a967226637f571c39534519f0f00ac6 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -975,6 +975,20 @@ 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"
 
@@ -1610,6 +1624,20 @@ EOF
     expect_stat 'cache hit (preprocessed)' 1
     expect_stat 'cache miss' 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 "Multiple object entries in manifest"
 
@@ -3380,11 +3408,11 @@ upgrade
 input_charset
 "
 
-compiler_location=$(which $COMPILER)
+compiler_location=$(which $(echo "$COMPILER" | awk '{print $1}'))
 if [ "$compiler_location" = "$COMPILER" ]; then
     echo "Compiler:         $COMPILER"
 else
-    echo "Compiler:         $COMPILER ($(which $COMPILER))"
+    echo "Compiler:         $COMPILER ($compiler_location)"
 fi
 echo "Compiler version: $($COMPILER --version | head -n 1)"
 echo
index 0e7b9ecf2a0dfb3f8555fb0cfa08a398d926deff..df441b8a5e0ca1f1a540e161eb6e47adf073a29e 100644 (file)
--- a/version.c
+++ b/version.c
@@ -1 +1 @@
-const char CCACHE_VERSION[] = "3.3.1";
+const char CCACHE_VERSION[] = "3.3.2";