Imported Upstream version 3.7.4 upstream/3.7.4
authorJinWang An <jinwang.an@samsung.com>
Tue, 3 Aug 2021 07:28:41 +0000 (16:28 +0900)
committerJinWang An <jinwang.an@samsung.com>
Tue, 3 Aug 2021 07:28:41 +0000 (16:28 +0900)
LICENSE.html
doc/AUTHORS.adoc
doc/AUTHORS.html
doc/MANUAL.html
doc/NEWS.adoc
doc/NEWS.html
doc/ccache.1
src/ccache.c
src/version.c
test/suites/base.bash

index bb7d6c1..b2a1584 100644 (file)
@@ -735,7 +735,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>ccache copyright and license</h1>\r
-<span id="revnumber">version 3.7.3</span>\r
+<span id="revnumber">version 3.7.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>
@@ -1235,9 +1235,9 @@ following license:</p></div>
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Version 3.7.3<br />\r
+Version 3.7.4<br />\r
 Last updated\r
- 2019-08-17 22:37:25 CEST\r
+ 2019-09-12 21:14:17 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 9e7e3f4..c9a9921 100644 (file)
@@ -20,6 +20,7 @@ ccache is a collective work with contributions from many people, including:
 * Chiaki Ishikawa
 * Chris AtLee
 * Clemens Rabe
+* Cristian Adam
 * David Givone
 * Doug Anderson
 * Edward Z. Yang
index ce41f65..e34d35f 100644 (file)
@@ -735,7 +735,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>ccache authors</h1>\r
-<span id="revnumber">version 3.7.3</span>\r
+<span id="revnumber">version 3.7.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>
@@ -820,6 +820,11 @@ Clemens Rabe
 </li>\r
 <li>\r
 <p>\r
+Cristian Adam\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
 David Givone\r
 </p>\r
 </li>\r
@@ -1241,9 +1246,9 @@ Yvan Janssens
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Version 3.7.3<br />\r
+Version 3.7.4<br />\r
 Last updated\r
- 2019-08-17 22:37:25 CEST\r
+ 2019-09-12 21:14:17 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 36b175c..fc8b2e1 100644 (file)
@@ -735,7 +735,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>CCACHE(1)</h1>\r
-<span id="revnumber">version 3.7.3</span>\r
+<span id="revnumber">version 3.7.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>
@@ -2746,9 +2746,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.7.3<br />\r
+Version 3.7.4<br />\r
 Last updated\r
- 2019-08-17 22:37:25 CEST\r
+ 2019-09-12 21:14:17 CEST\r
 </div>\r
 </div>\r
 </body>\r
index ec502c3..7322475 100644 (file)
@@ -1,6 +1,21 @@
 ccache news
 ===========
 
+ccache 3.7.4
+------------
+Release date: 2019-09-12
+
+Improvements
+~~~~~~~~~~~~
+
+- Added support for GCC 9’s `-gz[=type]` option (previously ccache would think
+  that “-gz” alone would enable debug information, thus potentially including
+  the current directory in the hash).
+
+- Added support for converting paths like “/c/users” into relative paths on
+  Windows.
+
+
 ccache 3.7.3
 ------------
 Release date: 2019-08-17
index 69cafa3..e09eb5d 100644 (file)
@@ -735,7 +735,7 @@ asciidoc.install(2);
 <body class="article">\r
 <div id="header">\r
 <h1>ccache news</h1>\r
-<span id="revnumber">version 3.7.3</span>\r
+<span id="revnumber">version 3.7.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>
@@ -743,6 +743,30 @@ asciidoc.install(2);
 </div>\r
 <div id="content">\r
 <div class="sect1">\r
+<h2 id="_ccache_3_7_4">ccache 3.7.4</h2>\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>Release date: 2019-09-12</p></div>\r
+<div class="sect2">\r
+<h3 id="_improvements">Improvements</h3>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Added support for GCC 9’s <code>-gz[=type]</code> option (previously ccache would think\r
+  that “-gz” alone would enable debug information, thus potentially including\r
+  the current directory in the hash).\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Added support for converting paths like “/c/users” into relative paths on\r
+  Windows.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\r
+<div class="sect1">\r
 <h2 id="_ccache_3_7_3">ccache 3.7.3</h2>\r
 <div class="sectionbody">\r
 <div class="paragraph"><p>Release date: 2019-08-17</p></div>\r
@@ -3518,9 +3542,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.7.3<br />\r
+Version 3.7.4<br />\r
 Last updated\r
- 2019-08-17 22:37:25 CEST\r
+ 2019-09-12 21:14:17 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 525220a..7442b37 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: ccache
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 08/17/2019
+.\"      Date: 09/12/2019
 .\"    Manual: ccache Manual
-.\"    Source: ccache 3.7.3
+.\"    Source: ccache 3.7.4
 .\"  Language: English
 .\"
-.TH "CCACHE" "1" "08/17/2019" "ccache 3\&.7\&.3" "ccache Manual"
+.TH "CCACHE" "1" "09/12/2019" "ccache 3\&.7\&.4" "ccache Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
index ca3b961..f56445b 100644 (file)
@@ -791,7 +791,15 @@ make_relative_path(char *path)
 
 #ifdef _WIN32
        if (path[0] == '/') {
-               path++;  // Skip leading slash.
+               char *p = NULL;
+               if (isalpha(path[1]) && path[2] == '/') {
+                       // Transform /c/path... to c:/path...
+                       p = format("%c:/%s", path[1], &path[3]);
+               } else {
+                       p = x_strdup(path+1); // Skip leading slash.
+               }
+               free(path);
+               path = p;
        }
 #endif
 
@@ -2770,6 +2778,11 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                                continue;
                        }
 
+                       if (str_startswith(argv[i], "-gz")) {
+                               // -gz[=type] neither disables nor enables debug info.
+                               continue;
+                       }
+
                        char last_char = argv[i][strlen(argv[i]) - 1];
                        if (last_char == '0') {
                                // "-g0", "-ggdb0" or similar: All debug information disabled.
index 8b285dd..1945261 100644 (file)
@@ -1 +1 @@
-extern const char CCACHE_VERSION[]; const char CCACHE_VERSION[] = "3.7.3";
+extern const char CCACHE_VERSION[]; const char CCACHE_VERSION[] = "3.7.4";
index 6fb76d8..5e9cd4d 100644 (file)
@@ -371,6 +371,50 @@ base_tests() {
     expect_stat 'cache miss' 1
 
     # -------------------------------------------------------------------------
+    TEST "Directory is not hashed if using -gz"
+
+    if $REAL_COMPILER -c test1.c -gz -o /dev/null 2>/dev/null; then
+        mkdir dir1 dir2
+        cp test1.c dir1
+        cp test1.c dir2
+
+        cd dir1
+        $CCACHE_COMPILE -c test1.c -gz
+        expect_stat 'cache hit (preprocessed)' 0
+        expect_stat 'cache miss' 1
+        $CCACHE_COMPILE -c test1.c -gz
+        expect_stat 'cache hit (preprocessed)' 1
+        expect_stat 'cache miss' 1
+
+        cd ../dir2
+        $CCACHE_COMPILE -c test1.c -gz
+        expect_stat 'cache hit (preprocessed)' 2
+        expect_stat 'cache miss' 1
+    fi
+
+    # -------------------------------------------------------------------------
+    TEST "Directory is not hashed if using -gz=zlib"
+
+    if $REAL_COMPILER -c test1.c -gz=zlib -o /dev/null 2>/dev/null; then
+        mkdir dir1 dir2
+        cp test1.c dir1
+        cp test1.c dir2
+
+        cd dir1
+        $CCACHE_COMPILE -c test1.c -gz=zlib
+        expect_stat 'cache hit (preprocessed)' 0
+        expect_stat 'cache miss' 1
+        $CCACHE_COMPILE -c test1.c -gz=zlib
+        expect_stat 'cache hit (preprocessed)' 1
+        expect_stat 'cache miss' 1
+
+        cd ../dir2
+        $CCACHE_COMPILE -c test1.c -gz=zlib
+        expect_stat 'cache hit (preprocessed)' 2
+        expect_stat 'cache miss' 1
+    fi
+
+    # -------------------------------------------------------------------------
     TEST "CCACHE_NOHASHDIR"
 
     mkdir dir1 dir2