[ccache] Direct mode with -B and -iprefix

vijay nag vijunag at gmail.com
Mon Apr 25 10:22:14 UTC 2016

On Sat, Apr 23, 2016 at 3:29 PM, Anders Björklund <anders at itension.se> wrote:
> vijay nag wrote:
>> Hello ccache,
>> Why isn't ccache converting -B and -iprefix paths to relative paths when
>> CCACHE_BASEDIR is set ? Should it be converted to relative path ?
> Historically, the base dir has been mostly about "your" code...
> So not everything with the toolchain, whether it was -MD or -B,
> was converted as the compiler was usually sitting still in /usr.
> Lately there has been some changes to this (e.g. 60178b7), so
> maybe there are more paths that _could_ be converted to relative.
> But personally I would probably need to have *two* base paths,
> for that to work (one for the source code, one for the toolchain)
> So that I could have a base dir of $HOME/myproject but a toolchain
> dir of e.g. /usr, just in case I wanted to relocate the toolchain.
> Do you have some more examples, of where this is useful (to you) ?
> /Anders
> _______________________________________________
> ccache mailing list
> ccache at lists.samba.org
> https://lists.samba.org/mailman/listinfo/ccache

The GCC libraries such as libgcc_s.a, libgcc.a are part of the source
tree we build every time. So, we first build these gcc related
libraries and then use the -B incantations in the cflags. Does direct
mode take into consideration compiler flags for hashing purposes ? We
can workaround -B problem by specifying GCC_EXEC_PREFIX, however I'm
not sure if we have to convert -iprefix to relative paths when basedir
is set ?

More information about the ccache mailing list