Re: a question about one part of gcc manual

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

 



Thank you for the explanation but you did not explain the role of
"include_next" here!! You only insisted on some path is ignored!!!

I know that when we use -I  and there is the same pathname in the
system , -I is ignored!! But WHERE "include_next" is used?
Is it used with -isystem and in the file it is introducing ONLY?
Please rewrite this part of gcc manual, it is not clear at all!!

On Sun, May 1, 2011 at 3:17 AM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Jonathan Wakely <jwakely.gcc@xxxxxxxxx> writes:
>
>> On 30 April 2011 12:39, ali hagigat wrote:
>>> 3.14 Options for Directory Search
>>> -Idir
>>> This is to ensure that GCC’s procedure to fix buggy system
>>> headers and the ordering for the include next directive are not
>>> inadvertently hanged.
>>> -----------------------------
>>> Sorry I do not have the answer yet!! I understood "include_next"
>>> directive but what is the procedure of GCC to fix the system headers?
>>
>> GCC installs fixed versions of buggy system headers, as part of the
>> gcc installation tree.  Those headers are used instead of the original
>> system ones.
>>
>>
>>> When we specify a path with -I and it is ignored because there is the
>>> same name in the system directories, how it can fix the system headers
>>> then?
>>
>> Because the system directories (including the one containing the fixed
>> headers) are still searched as normal.
>>
>> It really isn't complicated: if a directory is considered as a system
>> directory and it is also named with -I, then the -I option is ignored.
>>  BUT THE DIRECTORY IS STILL SEARCHED AS A SYSTEM DIRECTORY.
>>
>> Like Ian said, if you say:
>>   -isystem foo -I foo
>> then the -I option is ignored and it is equivalent to:
>>   -isystem foo
>>
>> This ensures that if 'foo' contains buggy system headers then those
>> headers will not be found before the fixed versions, because gcc
>> searches the directory containing the fixed headers before it searches
>> other system directories.
>
>
> It is straightforward to test these options with a working version of
> gcc, to help clarify the documentation in your own mind.
>
> 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