On Sat, Sep 28, 2002 at 02:07:38AM +0300, Oleg Goldshmidt wrote: > Muli Ben-Yehuda <[EMAIL PROTECTED]> writes: > > > On Fri, Sep 27, 2002 at 07:42:46PM +0300, Nadav Har'El wrote: > > > > > You guys got me curious. What is that ccache? What does it cache? Is it > > > free software? > > > > compiler cache. It caches intermediate object files, so that they > > don't need to be recompiled if you do the equivalent of 'make mrproper > > && make' while only changing one file. > > This seems to me somehow slippery - it tries to think for the > developer. If I do make clean|mrproper|dist etc I usually *want* to > recompile everything. It shouldn't say, in effect, "No, surely you > didn't mean that".
Nope. All it does is replaces a certain step in the build process, namely, compiling an object file, with an equivalent step, namely, fetching that exact object file from the cache. If those two steps weren't equivalent in their output in all cases (an object file) in all cases, ccache would be unusable. > I have never used it (ccache that is , I know nothing at all about > distcc), so I am not really qualified to discuss it (I think I have a > general understanding of how it works though), but I am a bit > concerned about the possibility that it may thwart make's dependency > tracking in some way when included files are deeply nested, some files > are generated, and yet others are not in C (and I've been in > situations like this quite often in my previous > incarn^H^H^H^H^H^Hjobs). Basically, it competes with make for > dependency tracking. It seems to try to do it in a smart way, but > having two tools trying to outsmart each other seeds doubt in my mind. > This doubt may have no foundation whatsoever, just unsubstantiated gut > feeling. No, it works on different levels than make. If make decides that a file needs to be compiled and ccache decides to fetch that file from the cache, that usually means that your Makefile dependencies are screwy. Also, lots of people do not trust make and routinely do 'make distclean; make', even when unnecessary. ccache makes that a lot less painful. > Also, how good is it for things other than kernel compilation? In very > large projects (and for small ones it is not worth the trouble, I > guess) it is often the case that the bulk of the build time is taken > by preprocessor and linker, not the compilation. It is my > understanding that ccache does not affect either preprocessing or > linking, only compilation of preprocessed files. I think I measured it at around 50% time saving for a second kernel compilation (hot cache in both cases). For syscalltrack it was more like 90% time saving. Try it - it's simple to use, all you need to do to use it in a controlled fashion is: CC="ccache gcc" make -- Muli Ben-Yehuda http://www.mulix.org/ [EMAIL PROTECTED]:~$ sctrace strace /bin/foo http://syscalltrack.sf.net/ Quis custodes ipsos custodiet?
msg22220/pgp00000.pgp
Description: PGP signature