[clc-devel] RFC: wrapper for ccache and distcc

Johannes Winkelmann jw at tks6.net
Wed Sep 1 13:23:34 UTC 2004


A work collegue of mine brought to my attention that building tcl fails
when using ccache, and I realized that the error is quite simple (not to
say stupid ;-)); ccache comes with wrappers for gcc and g++ which just
call 'ccache gcc $*' or 'ccache g++ $*'. Unfortunately this creates a
problem when the Makefile calls the wrapper like this:
  ccache-gcc [...] -DTCL_WIDE_INT_TYPE=long\ long

Since the wrapper is a shell script and will call
  ccache gcc $*
This will break the last argument into two ("-DTCL_WIDE_INT_TYPE=long"
and "long"). Maybe there's a way to work around that, but I wouldn't
know about it.
This e.g. breaks tcl, and I remember it also broke gimp < 2 (not sure
about >= 2).

Anyway, if ccache (the application) is called as gcc (by renaming it or
creating a symlink called 'gcc'), it works fine. The additional
advantage of this is that even if a Makefile doesn't use the CC and CXX
variables, this will work. 
The problem (and reason why I didn't do it like this earlier) is that
those symlinks must be put somewhere, and I'm not sure what the right
place is; IMO it should be something which isn't in the path usually,
which means that /bin shouldn't even be considered.

gentoo uses /usr/lib/bin/{gcc,cc,g++,c++}, not sure what others use. Are
there any suggestions what might be a good path for CRUX?

Kind regards, Johannes
Johannes Winkelmann              mailto:jw at tks6.net
Bern, Switzerland                http://jw.tks6.net

More information about the crux-devel mailing list