<body class="article">\r
<div id="header">\r
<h1>ccache authors</h1>\r
-<span id="revnumber">version 3.3.2</span>\r
+<span id="revnumber">version 3.3.3</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.2<br />\r
+Version 3.3.3<br />\r
Last updated\r
- 2016-09-28 22:29:23 CEST\r
+ 2016-10-26 23:04: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.3.2</span>\r
+<span id="revnumber">version 3.3.3</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.2<br />\r
+Version 3.3.3<br />\r
Last updated\r
- 2016-09-28 22:29:23 CEST\r
+ 2016-10-26 23:04:27 CEST\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.2</span>\r
+<span id="revnumber">version 3.3.3</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="ulist"><ul>\r
<li>\r
<p>\r
-ccache doesn’t handle the GNU Assembler’s <strong>.incbin</strong> directive correctly. This\r
- directive can be embedded in the source code inside an <strong><em>asm</em></strong> statement in\r
- order to include a file verbatim in the object file. If the included file is\r
- modified, ccache doesn’t pick up the change since the inclusion isn’t done by\r
- the preprocessor. A workaround of this problem is to set\r
- <strong>extra_files_to_hash</strong> to the path of the included file.\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
The direct mode fails to pick up new header files in some rare scenarios. See\r
<a href="#_the_direct_mode">THE DIRECT MODE</a> above.\r
</p>\r
<div id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.3.2<br />\r
+Version 3.3.3<br />\r
Last updated\r
- 2016-09-28 22:29:23 CEST\r
+ 2016-10-26 23:21:34 CEST\r
</div>\r
</div>\r
</body>\r
Caveats
-------
-* ccache doesn't handle the GNU Assembler's *.incbin* directive correctly. This
- directive can be embedded in the source code inside an *__asm__* statement in
- order to include a file verbatim in the object file. If the included file is
- modified, ccache doesn't pick up the change since the inclusion isn't done by
- the preprocessor. A workaround of this problem is to set
- *extra_files_to_hash* to the path of the included file.
-
* The direct mode fails to pick up new header files in some rare scenarios. See
<<_the_direct_mode,THE DIRECT MODE>> above.
<body class="article">\r
<div id="header">\r
<h1>ccache news</h1>\r
-<span id="revnumber">version 3.3.2</span>\r
+<span id="revnumber">version 3.3.3</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_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
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+ccache now detects usage of <code>.incbin</code> assembler directives in the source code\r
+ and avoids caching such compilations.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
+</div>\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
+<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: 2016-09-07</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
</ul></div>\r
</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-07-20</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2016-07-12</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
</ul></div>\r
</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: 2015-10-08</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
</ul></div>\r
</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
</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: 2014-12-10</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
</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: 2016-07-12</p></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: 2015-03-07</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
</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: 2013-01-06</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
</ul></div>\r
</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: 2012-01-08</p></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
</ul></div>\r
</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
</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: 2011-01-09</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: 2010-11-28</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-21</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
<div class="sectionbody">\r
<div class="paragraph"><p>Release date: 2010-11-07</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
</ul></div>\r
</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-07-15</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
</ul></div>\r
</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 id="footnotes"><hr /></div>\r
<div id="footer">\r
<div id="footer-text">\r
-Version 3.3.2<br />\r
+Version 3.3.3<br />\r
Last updated\r
- 2016-09-28 22:44:16 CEST\r
+ 2016-10-26 23:30:56 CEST\r
</div>\r
</div>\r
</body>\r
ccache news
===========
+ccache 3.3.3
+------------
+Release date: 2016-10-26
+
+Bug fixes
+~~~~~~~~~
+
+- ccache now detects usage of `.incbin` assembler directives in the source code
+ and avoids caching such compilations.
+
+
ccache 3.3.2
------------
Release date: 2016-09-28
'\" t
.\" Title: ccache
.\" Author: [see the "Author" section]
-.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 09/28/2016
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 10/26/2016
.\" Manual: ccache Manual
-.\" Source: ccache 3.3.2
+.\" Source: ccache 3.3.3
.\" Language: English
.\"
-.TH "CCACHE" "1" "09/28/2016" "ccache 3\&.3\&.2" "ccache Manual"
+.TH "CCACHE" "1" "10/26/2016" "ccache 3\&.3\&.3" "ccache Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.sp -1
.IP \(bu 2.3
.\}
-ccache doesn\(cqt handle the GNU Assembler\(cqs
-\fB\&.incbin\fR
-directive correctly\&. This directive can be embedded in the source code inside an
-\fB\fIasm\fR\fR
-statement in order to include a file verbatim in the object file\&. If the included file is modified, ccache doesn\(cqt pick up the change since the inclusion isn\(cqt done by the preprocessor\&. A workaround of this problem is to set
-\fBextra_files_to_hash\fR
-to the path of the included file\&.
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04'\(bu\h'+03'\c
-.\}
-.el \{\
-.sp -1
-.IP \(bu 2.3
-.\}
The direct mode fails to pick up new header files in some rare scenarios\&. See
THE DIRECT MODE
above\&.
inc_path = make_relative_path(inc_path);
remember_include_file(inc_path, hash, system);
p = q;
+ } 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");
+ stats_update(STATS_UNSUPPORTED_DIRECTIVE);
+ failed();
} else {
q++;
}
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);
+ stats_update(STATS_UNSUPPORTED_OPTION);
result = false;
goto out;
}
// These are always too hard.
if (compopt_too_hard(argv[i]) || str_startswith(argv[i], "-fdump-")) {
cc_log("Compiler option %s is unsupported", argv[i]);
- stats_update(STATS_UNSUPPORTED);
+ stats_update(STATS_UNSUPPORTED_OPTION);
result = false;
goto out;
}
// -Xarch_* options are too hard.
if (str_startswith(argv[i], "-Xarch_")) {
cc_log("Unsupported compiler option :%s", argv[i]);
- stats_update(STATS_UNSUPPORTED);
+ stats_update(STATS_UNSUPPORTED_OPTION);
result = false;
goto out;
}
if (arch_args_size == MAX_ARCH_ARGS - 1) {
cc_log("Too many -arch compiler options; ccache supports at most %d",
MAX_ARCH_ARGS);
- stats_update(STATS_UNSUPPORTED);
+ stats_update(STATS_UNSUPPORTED_OPTION);
result = false;
goto out;
}
// file from compiling the preprocessed file will not be equal to the
// object file produced when compiling without ccache.
cc_log("Too hard option -Wp,-P detected");
- stats_update(STATS_UNSUPPORTED);
+ stats_update(STATS_UNSUPPORTED_OPTION);
failed();
} else if (str_startswith(argv[i], "-Wp,-MD,")
&& !strchr(argv[i] + 8, ',')) {
STATS_NOINPUT = 17,
STATS_MULTIPLE = 18,
STATS_CONFTEST = 19,
- STATS_UNSUPPORTED = 20,
+ STATS_UNSUPPORTED_OPTION = 20,
STATS_OUTSTDOUT = 21,
STATS_CACHEHIT_DIR = 22,
STATS_NOOUTPUT = 23,
STATS_CANTUSEPCH = 27,
STATS_PREPROCESSING = 28,
STATS_NUMCLEANUPS = 29,
+ STATS_UNSUPPORTED_DIRECTIVE = 30,
STATS_END
};
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}'
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
void (*fn)(uint64_t);
unsigned flags;
} stats_info[] = {
- { STATS_CACHEHIT_DIR, "cache hit (direct) ", NULL, FLAG_ALWAYS },
- { STATS_CACHEHIT_CPP, "cache hit (preprocessed) ", NULL, FLAG_ALWAYS },
- { STATS_TOCACHE, "cache miss ", NULL, FLAG_ALWAYS },
- { STATS_LINK, "called for link ", NULL, 0 },
- { STATS_PREPROCESSING, "called for preprocessing ", NULL, 0 },
- { STATS_MULTIPLE, "multiple source files ", NULL, 0 },
- { STATS_STDOUT, "compiler produced stdout ", NULL, 0 },
- { STATS_NOOUTPUT, "compiler produced no output ", NULL, 0 },
- { STATS_EMPTYOUTPUT, "compiler produced empty output ", NULL, 0 },
- { STATS_STATUS, "compile failed ", NULL, 0 },
- { STATS_ERROR, "ccache internal error ", NULL, 0 },
- { STATS_PREPROCESSOR, "preprocessor error ", NULL, 0 },
- { STATS_CANTUSEPCH, "can't use precompiled header ", NULL, 0 },
- { STATS_COMPILER, "couldn't find the compiler ", NULL, 0 },
- { STATS_MISSING, "cache file missing ", NULL, 0 },
- { STATS_ARGS, "bad compiler arguments ", NULL, 0 },
- { STATS_SOURCELANG, "unsupported source language ", NULL, 0 },
- { STATS_COMPCHECK, "compiler check failed ", NULL, 0 },
- { STATS_CONFTEST, "autoconf compile/link ", NULL, 0 },
- { STATS_UNSUPPORTED, "unsupported compiler option ", NULL, 0 },
- { STATS_OUTSTDOUT, "output to stdout ", NULL, 0 },
- { STATS_DEVICE, "output to a non-regular file ", NULL, 0 },
- { STATS_NOINPUT, "no input file ", NULL, 0 },
- { STATS_BADEXTRAFILE, "error hashing extra file ", NULL, 0 },
- { STATS_NUMCLEANUPS, "cleanups performed ", NULL, FLAG_ALWAYS },
- { STATS_NUMFILES, "files in cache ", NULL,
- FLAG_NOZERO|FLAG_ALWAYS },
- { STATS_TOTALSIZE, "cache size ",
- display_size_times_1024, FLAG_NOZERO|FLAG_ALWAYS },
- { STATS_OBSOLETE_MAXFILES, "OBSOLETE", NULL,
- FLAG_NOZERO|FLAG_NEVER},
- { STATS_OBSOLETE_MAXSIZE, "OBSOLETE", NULL,
- FLAG_NOZERO|FLAG_NEVER},
- { STATS_NONE, NULL, NULL, 0 }
+ {
+ STATS_CACHEHIT_DIR,
+ "cache hit (direct)",
+ NULL,
+ FLAG_ALWAYS
+ },
+ {
+ STATS_CACHEHIT_CPP,
+ "cache hit (preprocessed)",
+ NULL,
+ FLAG_ALWAYS
+ },
+ {
+ STATS_TOCACHE,
+ "cache miss",
+ NULL,
+ FLAG_ALWAYS
+ },
+ {
+ STATS_LINK,
+ "called for link",
+ NULL,
+ 0
+ },
+ {
+ STATS_PREPROCESSING,
+ "called for preprocessing",
+ NULL,
+ 0
+ },
+ {
+ STATS_MULTIPLE,
+ "multiple source files",
+ NULL,
+ 0
+ },
+ {
+ STATS_STDOUT,
+ "compiler produced stdout",
+ NULL,
+ 0
+ },
+ {
+ STATS_NOOUTPUT,
+ "compiler produced no output",
+ NULL,
+ 0
+ },
+ {
+ STATS_EMPTYOUTPUT,
+ "compiler produced empty output",
+ NULL,
+ 0
+ },
+ {
+ STATS_STATUS,
+ "compile failed",
+ NULL,
+ 0
+ },
+ {
+ STATS_ERROR,
+ "ccache internal error",
+ NULL,
+ 0
+ },
+ {
+ STATS_PREPROCESSOR,
+ "preprocessor error",
+ NULL,
+ 0
+ },
+ {
+ STATS_CANTUSEPCH,
+ "can't use precompiled header",
+ NULL,
+ 0
+ },
+ {
+ STATS_COMPILER,
+ "couldn't find the compiler",
+ NULL,
+ 0
+ },
+ {
+ STATS_MISSING,
+ "cache file missing",
+ NULL,
+ 0
+ },
+ {
+ STATS_ARGS,
+ "bad compiler arguments",
+ NULL,
+ 0
+ },
+ {
+ STATS_SOURCELANG,
+ "unsupported source language",
+ NULL,
+ 0
+ },
+ {
+ STATS_COMPCHECK,
+ "compiler check failed",
+ NULL,
+ 0
+ },
+ {
+ STATS_CONFTEST,
+ "autoconf compile/link",
+ NULL,
+ 0
+ },
+ {
+ STATS_UNSUPPORTED_OPTION,
+ "unsupported compiler option",
+ NULL,
+ 0
+ },
+ {
+ STATS_UNSUPPORTED_DIRECTIVE,
+ "unsupported code directive",
+ NULL,
+ 0
+ },
+ {
+ STATS_OUTSTDOUT,
+ "output to stdout",
+ NULL,
+ 0
+ },
+ {
+ STATS_DEVICE,
+ "output to a non-regular file",
+ NULL,
+ 0
+ },
+ {
+ STATS_NOINPUT,
+ "no input file",
+ NULL,
+ 0
+ },
+ {
+ STATS_BADEXTRAFILE,
+ "error hashing extra file",
+ NULL,
+ 0
+ },
+ {
+ STATS_NUMCLEANUPS,
+ "cleanups performed",
+ NULL,
+ FLAG_ALWAYS
+ },
+ {
+ STATS_NUMFILES,
+ "files in cache",
+ NULL,
+ FLAG_NOZERO|FLAG_ALWAYS
+ },
+ {
+ STATS_TOTALSIZE,
+ "cache size",
+ display_size_times_1024,
+ FLAG_NOZERO|FLAG_ALWAYS
+ },
+ {
+ STATS_OBSOLETE_MAXFILES,
+ "OBSOLETE",
+ NULL,
+ FLAG_NOZERO|FLAG_NEVER
+ },
+ {
+ STATS_OBSOLETE_MAXSIZE,
+ "OBSOLETE",
+ NULL,
+ FLAG_NOZERO|FLAG_NEVER
+ },
+ {
+ STATS_NONE,
+ NULL,
+ NULL,
+ 0
+ }
};
static void
continue;
}
- printf("%s ", stats_info[i].message);
+ printf("%-31s ", stats_info[i].message);
if (stats_info[i].fn) {
stats_info[i].fn(counters->data[stat]);
printf("\n");
if [ "$(./c)" != OK ]; then
test_failed "Incorrect header file used"
fi
+
+ # -------------------------------------------------------------------------
+ TEST ".incbin"
+
+ cat <<EOF >incbin.c
+char x[] = ".incbin";
+EOF
+
+ $CCACHE_COMPILE -c incbin.c
+ expect_stat 'cache hit (preprocessed)' 0
+ expect_stat 'cache miss' 0
+ expect_stat 'unsupported code directive' 1
}
# =============================================================================
# ccache could try to parse and make sense of -Wp, with multiple arguments,
# but it currently doesn't, so we have to disable direct mode.
- $CCACHE_COMPILE -c -Wp,-DFOO,-DGOO test.c 2>/dev/null
+ touch source.c
+
+ $CCACHE_COMPILE -c -Wp,-MMD,source.d,-MT,source.o source.c 2>/dev/null
expect_stat 'cache hit (direct)' 0
expect_stat 'cache hit (preprocessed)' 0
expect_stat 'cache miss' 1
+ expect_file_content source.d "source.o: source.c"
- $CCACHE_COMPILE -c -Wp,-DFOO,-DGOO test.c 2>/dev/null
+ $CCACHE_COMPILE -c -Wp,-MMD,source.d,-MT,source.o source.c 2>/dev/null
expect_stat 'cache hit (direct)' 0
expect_stat 'cache hit (preprocessed)' 1
expect_stat 'cache miss' 1
+ expect_file_content source.d "source.o: source.c"
# -------------------------------------------------------------------------
TEST "-MMD for different source files"
create_file("foo.c", "");
CHECK(!cc_process_args(orig, &preprocessed, &compiler));
- CHECK_INT_EQ(1, stats_get_pending(STATS_UNSUPPORTED));
+ CHECK_INT_EQ(1, stats_get_pending(STATS_UNSUPPORTED_OPTION));
args_free(orig);
}
-const char CCACHE_VERSION[] = "3.3.2";
+const char CCACHE_VERSION[] = "3.3.3";