tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ccache version mystery

With help from pkgsrc-users and a colleague, I've partially figured out
a ccache mystery.  All is with HEAD pkgsrc. On a Mac, I started getting
constant cache misses.  I tested on NetBSD/i386 5.1ish, or so I thought,
and seemed to have the same problem.

Note that CCACHE_HASHCC was in 2.4 and has been withdrawn from 3.1.4.

On the mac, putting CCACHE_COMPILERCHECK in the environment resolves the
issue, and caching works as expected (but the old cache contents won't
hit, since they used a different compiler version hash).

On NetBSD, the following doesn't seem to have any effect.

I don't understand why this was ever needed, because work/.ccache/bin
seems to be a symlink to ccache, and the real compiler doesn't change.
But I don't fully understand the ccache/gcc layering.

So, can anyone explain why CCACHE_HASHCC was necessary?  And if so,
whether they think CCACHE_COMPILERCHECK should be set?

---   2009-10-05 08:36:46.000000000 -0400
+++   2011-03-30 16:38:04.000000000 -0400
@@ -119,9 +119,12 @@ BUILD_DEPENDS+=    ccache-[0-9]*:../../deve
 .  endif
 # Override the compiler-specific hash with the version string for the
-# compiler.
+# compiler (ccache 2.4).
+# Similar for modern ccache (ccache 3.1.4).  We ask ccache to run the
+# compiler with -v, and treat matching output as a matching compiler.
 # Create symlinks for the compiler into ${WRKDIR}.

Attachment: pgpmpD4ghvG9v.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index