-MD flag and absolute path problem

tal zilcer <[email protected]>
Newsgroups gmane.comp.compilers.ccache
Message-ID <CAFciY32s=X_am5k7hnwdowvVKLzV2=_gvLyn_4jmwRS_8UzQWw@mail.gmail.com>
hi,

I use a shared cache over NFS to increase cache hits for users on different
servers.

*some more info:*
1) ccache version is 3.19
2) CCACHE_BASEDIR=/home (to get hits from different folders)
3) the toolchain is located in the user home folder

*when i try to rebuild busybox i get an error:*
fixdep: /home/*other_user*/................./gcc/....../4.8.0/include-fixed/limits.h:
No such file or directory

i compile busybox in my home directory /home/*talz*.
so when i compile i get a cache hit and retrieve the .d file from the cache
and get /home/*other_user*/.... in the .d file(previous hit by another
user).
this is because the -MD flag that causes h files in the toolchain to
be absolute path in the .d file.
*(FYI, this could  also happen if my makefile targets were absolute path
and not relative.....)*

i though about one solution which is to add  the path of the toolchain
to CCACHE_COMPILERCHECK, resulting in getting cache misses if the toolchain
is not from the user folder.
this will of course cause many not code related cache misses which i wish
to prevent.
also this will not work if the makefile targets are absolute path.

what else can i do???

thanks,
tal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.