<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 17, 2016 at 5:00 AM <<a href="mailto:Valdis.Kletnieks@vt.edu">Valdis.Kletnieks@vt.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 16 Nov 2016 21:01:19 +0000, Amit Kumar said:<br class="gmail_msg">
<br class="gmail_msg">
> In linux/include/linux/atomic.h, there are two files included asm/atomic.h<br class="gmail_msg">
> and asm/barrier.h. Both files are present in linux/include/asm-generic and<br class="gmail_msg">
> linux/arch/arm/include/asm. If I build like,<br class="gmail_msg">
> CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make zImage dtbs<br class="gmail_msg">
> then which file is being used.<br class="gmail_msg">
<br class="gmail_msg">
Hint 1: Check for symlinks.<br class="gmail_msg">
Hint 2: Compile with 'make V=1' which will show the complete gcc command line,<br class="gmail_msg"></blockquote><div>Thank you for your hints.</div><div>I have used omap2plus_defconfig. After issuing command,</div><div> CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make zImage dtbs V=1 | tee mybuild.log</div><div>I have got something like this,</div><div>...</div><div>-nostdinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabi/5/include -I./arch/arm/include -I./arch/arm/include/generated/uapi -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h<br></div><div>...</div><div>First all -I is searched sequentially then -isystem dir is searched.</div><div>One additional thing I found that every file includes ./include/linux/kconfig.h which in turn includes generated/kconfig.h, which I think is generated on the basis of .config, to check features enabled.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
so you can see the order of -I parameters.<br class="gmail_msg">
</blockquote></div></div>