Re: build error at rpc code

From: Dimitry Andric <dimitry_at_andric.com>
Date: Fri, 24 Aug 2012 15:20:15 +0200
On 2012-08-24 15:07, Dima Panov wrote:
> 24.08.2012 19:12, Dimitry Andric пишет:
...
>> You are most likely setting CPP as follows:
>>
>>    CPP=clang -E
>>
>> Don't do that, use the following instead:
>>
>>    CPP=clang-cpp
>>
>> If there is no clang-cpp symlink in /usr/bin yet, just make it manually
>> for now.  It will also be created by installworld.
>
> Oh, indeed. Thanks for advice.
> However, why such different results in preprocessor invocation style?

When you invoke either clang or gcc with -E, files with unknown
extensions are not preprocessed, and considered to be linker input
files.

When you invoke clang-cpp or cpp, files with unknown extensions are
considered to be C instead.

Since our RPC-related files use the .x extension, -E doesn't work as
expected, and the resulting files will give a compile error later on.
Received on Fri Aug 24 2012 - 11:20:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC