[ccache] [PATCH] Add support for coverage (compiling for gcov)
joel at rosdahl.net
Wed Feb 4 13:52:45 MST 2015
(Sorry about the very delayed answer.)
The patch looks good! I plan to only apply fixes to serious bugs on
3.1-maint, so I'll focus on the 3.2-maint version.
1. I get this test suite failure with GCC >= 4.7:
% CC=gcc-4.7 ./test.sh direct
version: gcc-4.7 (Ubuntu/Linaro 4.7.4-2ubuntu1) 4.7.4 Copyright © 2012 Free
Software Foundation, Inc. This is free software; see the source for copying
conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.
test dir: testdir.16070
starting testsuite direct
SUITE: "direct", TEST: "coverage (empty)" - gcov 1
secondary config (readonly)
cache hit (direct) 0
cache hit (preprocessed) 0
cache miss 1
files in cache 15
cache size 61.4 kB
max cache size 5.0 GB
Test data and log file have been left in testdir.16070
% test -r testdir.16070/test.gcno && echo exists
No failure with GCC <= 4.6.
I guess that the "coverage (empty)" test should check that the two runs
either both produce no test.gcno files or both produce identical test.gcno
2. You wrote "Please include these in ccache, under GNU General Public
License v3". Just to clarify: Do you agree to use the same license as the
rest of ccache does, which is "GPLv3 or any later version"?
On 6 January 2015 at 23:21, Anders Björklund <anders at itension.se> wrote:
> We've added support for gcc --coverage (including -fprofile-arcs and
> -ftest-coverage) to ccache.
> You can find the patches, for the maint versions, over on
> It works by storing the .gcno file in the cache (next to the .o file),
> when using --coverage.
> It also needs to hash the absolute path to the .gcda file, that is created
> later at runtime.
> Please include these in ccache, under GNU General Public License v3. I am
> their author.
> ccache mailing list
> ccache at lists.samba.org
More information about the ccache