Re: Direct mode with -B and -iprefix
vijay nag <[email protected]> Mon, 25 Apr 2016 15:52:14 +0530
| Newsgroups | gmane.comp.compilers.ccache |
|---|---|
| Message-ID | <CAKhyrx-ZALf7RbTz36mrZOF1dRnVjh_EZXRv9p7o2yCwA1s4Kg@mail.gmail.com> |
On Sat, Apr 23, 2016 at 3:29 PM, Anders Björklund <[email protected]> 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 > [email protected] > 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 ?