Problem with using ccache during kernel compilation

Piotr Kiszka <[email protected]>
Newsgroups gmane.comp.compilers.ccache
Message-ID <[email protected]>
Hi,

I am trying to use ccache during kernel building.But there is always
zero cache hits during second kernel compilation:

-- ccache -s -------------------------------------------------------
cache directory                     /home/kernelbuild/.ccache
cache hit (direct)                     0
cache hit (preprocessed)               0
cache miss                         21551
called for link                       77
called for preprocessing            4427
unsupported source language          131
no input file                       3992
files in cache                     53462
cache size                           4.4 Gbytes
max cache size                       5.0 Gbytes
----------------------------------------------------------------------

Tested on2 machines with Debian Wheezy:
uname: Linux ______ 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
ccache version: 3.1.7-1

How ccache is added to PATH in building script:
----------------------------------------------------------------------
ccache_path_dir="/usr/lib/ccache"
        if [ -d "$ccache_path_dir" ] ; then
                echo "Detected ccache directory, adding to path:
$ccache_path_dir"
                PATH="$ccache_path_dir:$PATH"
        else
                echo "WARNING: not using ccache (this is OK, but will
take longer overall)"
        fi
----------------------------------------------------------------------

Build command:
----------------------------------------------------------------------
faketime "$TIMESTAMP_RFC3339"   nice -n "$BUILD_NICENESS" time make-kpkg
--rootcmd fakeroot kernel_image kernel_headers --initrd --revision
"$DEBIAN_REVISION" --overlay-dir "$overlay_dir" 2>&1 | tee
../buildlog/build.result
----------------------------------------------------------------------

Link to part of logfile:
http://pastebin.com/GLhcuZVA

Link to file where ccache is used:
https://github.com/vyrly/deterministic-kernel/blob/master/kernel-build/linux-3.2.54-mempo-0.1.22-shell/build.sh


It will be great if someone could help me with tis problem.
Best regards

Piotr Kiszka
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.