Re: [ccache] problems with buildworld gcc45 on ports

2011-06-24 Thread Joel Rosdahl
On 2011-06-24 06:40, Beeblebrox wrote:
 Thanks for the answer. The main question has been posted on a forum
 for a while, and judging from the number of views / hits the post has
 had, this appears to be a broader issue. I have also gone through the
 ccache manual many times, to the best of my current ability, without
 success. The post in question:
 http://forums.freebsd.org/showthread.php?t=24286

Regarding issue 4 (about CCACHE_CPP2): I'm not familiar with BSD make
syntax and semantics, but I suspect that setting CCACHE_CPP2=yes in
make.conf only sets a make variable, not an environment variable that
ccache is able to see. I don't know how you're supposed to set
environment variables in FreeBSD (maybe in /etc/profile?), but you can
always set it yourself in your shell (export CCACHE_CPP2=yes or so)
before building.

As mentioned in the troubleshooting part of the manual, you can set the
environment variable CCACHE_LOGFILE to a file name, then perform the
build and then look at the file to get some clues about what happens.

 Also, one Major question I have is: does ccache handle a
 dual-gcc-setup (I suppose It should) without problems

I don't know what you mean with dual-gcc-setup, but if you have two
compilers with different names, then there should be nothing that can go
wrong. However, if there are multiple compilers behind the same name,
then ccache needs to be able to tell them apart. This is by default done
by looking at the compiler's mtime (and size). If the mtime doesn't
change when compilers are switched, then ccache will happily return
cached results from the previous compiler. One example when this can
happen is if (for instance) /usr/bin/gcc is a wrapper script that runs
one of several compilers depending on an environment variable or
configuation file. In that case, you can configure ccache to run
something like gcc -v instead to identify the compiler. See
CCACHE_COMPILERCHECK in the ccache manual.

 and what is the correct syntax for the gcc45 section?

I don't know what that means.

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] problems with buildworld gcc45 on ports

2011-06-23 Thread Joel Rosdahl
Hi,

On 2011-06-21 20:29, Beeblebrox wrote:
 [...FreeBSD-specific questions...]

You will will probably get better answers to these questions on some
FreeBSD list. At least I don't know much about FreeBSD. I have one
comment, though:

 2. Is is necessary to include cpp in the 1st conditional, or does ccache
 detect the correct pre-processor on its own from here? (I have created the
  symlinks)
 CPP:=${CPP:cpp45,/usr/local/libexec/ccache/world/cpp45,1}

ccache only understands how to cache object files when invoked as the
compiler -- using ccache with cpp will only result in a slightly slower
build. So: it's not necessary and not recommended.

Here are some general tips on troubleshooting ccache:
http://ccache.samba.org/manual.html#_troubleshooting

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] problems with buildworld gcc45 on ports

2011-06-22 Thread Martin Pool
This answer may be too shallow, but: do you need to get rid of the
whitespace around the CC=?  That won't work in shell.  I don't know
what parses that file.
Martin
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache