[cfe-dev] A couple of questions about include search paths

Andrew McGregor andrewmcgr at gmail.com
Sun Oct 17 13:58:40 PDT 2010


So, from the point of view of cross compilation, I'd like it to be possible to construct any header path you want.  I don't really mind what the defaults are, so long as it is possible to construct an exact search path that includes only what you want, with the builtin headers in a controllable place.  So combinations of -sysroot, -isysroot, -nostdinc, -nostdlib, -I, -Isystem and friends should lead to something predictable.  -nostdinc and -nostdlib are not that nice to have to use, but I have had projects where we did that... fortunately my present project works with -sysroot.

Andrew

On 18/10/2010, at 9:34 AM, Rafael EspĂ­ndola wrote:

>> I can't think of one too, but this is an area where it is probably
>> better to have bug by bug compatibility with gcc. In fact, this was
>> changed in 103912 so I assume the user had found a case where there
>> was a dependency on the gcc way.
> 
> To summarize a offline discussion I had with Chandler. My option is
> that by default clang should follow the system compiler. On windows it
> should read the registry, on linux it should do what the system
> compiler does. On every linux distro that I know that includes
> searching /usr/local/include first.
> 
> If designing a new system, I would highly recommend trying to do
> without /usr/local/include. But that is not the case on existing
> systems.
> 
> I fully support having a run time or compile time option to change
> this. Even better if it is easier to use than gcc's behaviour of doing
> things differently if it is a cross compiler.
> 
> Cheers,
> Rafael
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev





More information about the cfe-dev mailing list