Make sure the searching header file path when building Linux kernel

Nan Xiao xiaonan830818 at gmail.com
Wed Aug 5 23:18:11 EDT 2015


"gcc -xc -E -v -" can show the include search paths.

Best Regards
Nan Xiao

On Wed, Aug 5, 2015 at 6:34 PM, Abhilash Mhaisne <abhilashmhaisne at gmail.com>
wrote:

> By default gcc does search under /usr/include. I am not sure about
> /usr/local/include though.
> If header files at the top are #included as
> "your_build_direc/include/some_header_file.h" then gcc will look into that
> path.
> Otherwise if it is #include <some_header_file.h> , it will search under
> /usr/include and anything that is under C_INCLUDE_PATH variable. See man
> page of gcc for more.
>
> Regards,
> Abhilash Mhaisne
>
> On Wed, Aug 5, 2015 at 3:13 PM, Nan Xiao <xiaonan830818 at gmail.com> wrote:
>
>> Hi all,
>>
>> I want to make sure the searching header file path when building Linux
>> kernel:
>> Per my understanding, the gcc only find header files in current building
>> linux
>> directory: include/*, won't search system header file path: such as
>> /usr/inclue,
>>  /usr/local/include, etc.
>>
>> Is my understanding right? Thanks very much in advance!
>>
>> Best Regards
>> Nan Xiao
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150806/e65b4a3b/attachment.html 


More information about the Kernelnewbies mailing list