gcc linked to ccache with installed version

Ian Lance Taylor iant@google.com
Fri Apr 22 10:03:00 GMT 2011


RR <rrsacct@gmail.com> writes:

> I think I understand what you are saying regarding -E, but given that,
> ccache would still have to determine whether the language in question
> was preprocessed. Does invoking gcc somehow signal to ccache that it
> is preprocessed? How does it do that?

That's how ccache works: by preprocessing.  Read the "How it Works"
section of the ccache man page.

    The basic idea is to detect when you are compiling exactly the same code
    a 2nd time and use the previously compiled output. You detect that it is
    the same code by forming a hash of:

    o the pre-processor output from running the compiler with -E
    o the command line options
    o the real compilers size and modification time
    o any stderr output generated by the compiler

Ian



More information about the Gcc-help mailing list