Re: Question about include path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



into gcc/incpath.c  :

into remove_duplicates :

/LFS2011/include is removed because "it is a non-system directory that
duplicates a system directory"

Then the search order is :

 /LFS2011/bin/../lib/gcc/i586-pc-linux/4.5.2/include
 /LFS2011/bin/../lib/gcc/i586-pc-linux/4.5.2/include-fixed
 /LFS2011/include
 /usr/include

the problem is that a "limits.h" is into 
/LFS2011/bin/../lib/gcc/i586-pc-linux/4.5.2/include-fixed/

The "-I" option should not overwrite search order (and put
/LFS2011/include as first directory) ?

Thanks very much

Yann Le DoarÃ.


On Tue, 01 Feb 2011 11:47:01 -0800, Ian Lance Taylor <iant@xxxxxxxxxx>
wrote:
> <yann@xxxxxxxxxxxxxxxx> writes:
> 
>> I build gcc (4.5.2) from scratch, and i have a question with include
>> path.
>>
>> when i want to include "limits.h" (the good one is at
>> /LFS2011/include/limits.h), gcc uses
>> /LFS2011/bin/../lib/gcc/i686-pc-linux-gnu/4.5.1/include-fixed/limits.h
>>
>> When i add "-I/LFS2011/include" it does not look for
>> /LFS2011/include/limits.h (bad ?) but when I add "-I/tmp", it looks
>> for /tmp/limits.h (good)
>>
>> What is wrong, where can i look into gcc source code to debug it ?
> 
> The code in question is in the libcpp directory and in gcc/cppdefault.c.
> However, this seems like an unlikely scenario.  Are you sure that the
> directory /LFS2011/include exists?  Also, use the -v option to see the
> exact search path that gcc will use.
> 
> Ian



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux