[MPlayer-dev-eng] ccache

Mark Zealey mark at zealos.org
Sun Jan 5 13:00:09 CET 2003


On Sun, Jan 05, 2003 at 03:05:07AM +0100, Arpi wrote:

> Hi,
> 
> > Hi.
> > 
> > How did you run ccache each time? Simply with make CC='ccache gcc' ?
> 
> even better:
> cd /usr/local/bin
> ln -s ccache gcc
> 
> (i have the real gcc at /usr/bin/)
Yeah that depends on the search path.. I made a patch because i wanted ccache to
be 'cgcc' as mplayer's configure wouldn't let CC='ccache gcc'. you export
CCACHE_CC='gcc' and ln -s /usr/local/bin/ccache /usr/bin/cgcc or so. Then run
with CC=cgcc. Patch attached.

I've sent it to tridge

-- 

Mark Zealey (aka JALH on irc.oftc.net: #zealos and many more)
mark at zealos.org; mark at itsolve.co.uk

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a17! C++++>$ P++++>+++++$ L+++>+++++$
!E---? W+++>$ !w--- r++ !t---?@ !X---?  !R- !tv b+ G+++ e>+++++ !h++* r!-- y
-------------- next part --------------
diff -urN ccache-1.9/ccache.1 ccache-1.9.patch/ccache.1
--- ccache-1.9/ccache.1	Mon Apr 29 10:14:11 2002
+++ ccache-1.9.patch/ccache.1	Sat Jan  4 12:31:02 2003
@@ -120,6 +120,13 @@
 where ccache will keep its cached compiler output\&. The default is
 "$HOME/\&.ccache"\&.
 .IP 
+.IP "\fBCCACHE_CC\fP" 
+the CCACHE_CC environment variable specifies the name of the executable that
+ccache will look for when it is invoked from a name different to 'ccache'. This
+lets you make a link to ccache from /usr/bin/cgcc for example, so you keep your
+gcc as standard but let some configure scripts have CC=cgcc for those you want
+to cache.
+.IP
 .IP "\fBCCACHE_LOGFILE\fP" 
 If you set the CCACHE_LOGFILE environment
 variable then ccache will write some log information on cache hits
diff -urN ccache-1.9/ccache.c ccache-1.9.patch/ccache.c
--- ccache-1.9/ccache.c	Sun May 12 10:55:35 2002
+++ ccache-1.9.patch/ccache.c	Sat Jan  4 12:22:32 2003
@@ -459,6 +459,10 @@
 		base = basename(argv[1]);
 	}
 
+	if(getenv("CCACHE_CC")) {
+		base = getenv("CCACHE_CC");
+	}
+
 	path = getenv("CCACHE_PATH");
 	if (!path) {
 		path = getenv("PATH");
diff -urN ccache-1.9/ccache.yo ccache-1.9.patch/ccache.yo
--- ccache-1.9/ccache.yo	Mon Apr 29 10:14:12 2002
+++ ccache-1.9.patch/ccache.yo	Sat Jan  4 12:33:12 2003
@@ -103,6 +103,12 @@
 where ccache will keep its cached compiler output. The default is
 "$HOME/.ccache".
 
+dit(bf(CCACHE_CC)) the CCACHE_CC environment variable specifies the name of the
+executable that ccache will look for when it is invoked from a name different to
+'ccache'. This lets you make a link to ccache from /usr/bin/cgcc for example, so
+you keep your gcc as standard but let some configure scripts have CC=cgcc for
+those you want to cache.
+
 dit(bf(CCACHE_LOGFILE)) If you set the CCACHE_LOGFILE environment
 variable then ccache will write some log information on cache hits
 and misses in that file. This is useful for tracking down problems.


More information about the MPlayer-dev-eng mailing list