Re: Make sure the searching header file path when building Linux kernel

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

 



"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@xxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux