Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 2004 13:24:11 +0200
From:      Jens Schweikhardt <schweikh@schweikhardt.net>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        Roman Kurakin <rik@cronyx.ru>
Subject:   Re: ccache support for make buildworld/make release
Message-ID:  <20040912112411.GA62181@schweikhardt.net>
In-Reply-To: <20040825183342.GA81434@xor.obsecurity.org>
References:  <412CBC91.3070900@portaone.com> <412CD983.2040700@cronyx.ru> <20040825183342.GA81434@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 25, 2004 at 11:33:42AM -0700, Kris Kennaway wrote:
...
# BTW, I don't think there's anything to set up..you just set
# CC="ccache cc" or similar.
# 
# Kris

Has anyone gotten this to work? I have fixed the "#ident" problem
by patching /usr/src/contrib/gcc/c-ppoutput.c to remove the double quotes,
see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16999
--- src/contrib/gcc/c-ppoutput.c        2004/08/26 14:10:04     1.1
+++ src/contrib/gcc/c-ppoutput.c        2004/08/26 14:10:32
@@ -292,7 +292,7 @@
          const cpp_string *str)
 {
   maybe_print_line (print.map, line);
-  fprintf (print.outf, "#ident \"%s\"\n", str->text);
+  fprintf (print.outf, "#ident %s\n", str->text);
   print.line++;
 }

and installed that cc et al in /usr/bin.

I can make it work for buildkernel (cuts down time to 30%, woohoo!), but

$ make -s CC='/usr/local/bin/ccache cc' CXX='/usr/local/bin/ccache c++' buildworld
and
$ make -s CC='/usr/local/bin/ccache /usr/bin/cc' CXX='/usr/local/bin/ccache /usr/bin/c++' buildworld

both fail with
[...]
===> lib/libpam/modules/pam_unix (all)
===> lib/libpam/libpam (all)
===> lib/libautofs (all)
/share/HEAD/src/lib/libautofs/libautofs.c:49:30: fs/autofs/autofs.h: No such file or directory
/share/HEAD/src/lib/libautofs/libautofs.c: In function `autoreq_get':
/share/HEAD/src/lib/libautofs/libautofs.c:253: error: invalid use of undefined type `struct autofs_userreq'
/share/HEAD/src/lib/libautofs/libautofs.c:253: error: dereferencing pointer to incomplete type
/share/HEAD/src/lib/libautofs/libautofs.c: In function `do_autoreq_get':
[...]

while without ccache the buildworld completes successfully as expected.
So it's not an issue with my src tree and it's not an issue of leftovers
from previous builds as I always start from scratch with cvs co src in
an empty directory. I rather expect some subtle interaction of ccache
and the CC environment/make variables with the build. A possible
candidate is /usr/bin/mkdep which is used a lot during builds and is
sensitive to CC settings.

Anyone successfully used ccache for a buildworld?

Regards,

	Jens
-- 
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040912112411.GA62181>