James Carlson wrote:
> William Fulton writes:
>   
>> When I run the Sun Workshop compiler to get the preprocessor output using
>> -E, a warning is generated, for example:
>>
>> $ CC -c -E runme.cxx > runme.i
>> CC: Warning: "-E" redefines product from "object" to "source (stdout)"
>>     
>
> That looks to me like user error -- "-c" means "produce an object
> file", while "-E" means "don't produce an object file; just dump
> preprocessor output."
>
> Have you tried "CC -E runme.cxx"?
>
>   
Indeed and that works, but ccache doesn't attempt to tweak the compiler 
options to suite. The problem is the interpretation of -c is slightly 
different with gcc, which is basically saying don't link, whereas CC 
seems to expect that -c will generate a binary output and so warns when 
asked to generate preprocessor output. ccache works well with gcc 
(amongst other compilers) and clearly is not used much with CC. It's 
looking like a change to ccache is needed to deal with this slightly 
different behaviour of the workshop compilers in order to get the full 
efficiencies of cacheing.

William

Reply via email to