* Which header file?
@ 2016-11-16 21:01 Amit Kumar
2016-11-16 23:30 ` Valdis.Kletnieks at vt.edu
0 siblings, 1 reply; 3+ messages in thread
From: Amit Kumar @ 2016-11-16 21:01 UTC (permalink / raw)
To: kernelnewbies
Hi,
In linux/include/linux/atomic.h, there are two files included asm/atomic.h
and asm/barrier.h. Both files are present in linux/include/asm-generic and
linux/arch/arm/include/asm. If I build like,
CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make zImage dtbs
then which file is being used.
A kernel newbie,
Amit Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161116/66f8fc13/attachment.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Which header file?
2016-11-16 21:01 Which header file? Amit Kumar
@ 2016-11-16 23:30 ` Valdis.Kletnieks at vt.edu
2016-11-17 7:38 ` Amit Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2016-11-16 23:30 UTC (permalink / raw)
To: kernelnewbies
On Wed, 16 Nov 2016 21:01:19 +0000, Amit Kumar said:
> In linux/include/linux/atomic.h, there are two files included asm/atomic.h
> and asm/barrier.h. Both files are present in linux/include/asm-generic and
> linux/arch/arm/include/asm. If I build like,
> CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make zImage dtbs
> then which file is being used.
Hint 1: Check for symlinks.
Hint 2: Compile with 'make V=1' which will show the complete gcc command line,
so you can see the order of -I parameters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161116/f358c6db/attachment.bin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Which header file?
2016-11-16 23:30 ` Valdis.Kletnieks at vt.edu
@ 2016-11-17 7:38 ` Amit Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Amit Kumar @ 2016-11-17 7:38 UTC (permalink / raw)
To: kernelnewbies
On Thu, Nov 17, 2016 at 5:00 AM <Valdis.Kletnieks@vt.edu> wrote:
> On Wed, 16 Nov 2016 21:01:19 +0000, Amit Kumar said:
>
> > In linux/include/linux/atomic.h, there are two files included
> asm/atomic.h
> > and asm/barrier.h. Both files are present in linux/include/asm-generic
> and
> > linux/arch/arm/include/asm. If I build like,
> > CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make zImage dtbs
> > then which file is being used.
>
> Hint 1: Check for symlinks.
> Hint 2: Compile with 'make V=1' which will show the complete gcc command
> line,
>
Thank you for your hints.
I have used omap2plus_defconfig. After issuing command,
CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm make zImage dtbs V=1 | tee
mybuild.log
I have got something like this,
...
-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
...
First all -I is searched sequentially then -isystem dir is searched.
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.
so you can see the order of -I parameters.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20161117/2bb6e712/attachment.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-17 7:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 21:01 Which header file? Amit Kumar
2016-11-16 23:30 ` Valdis.Kletnieks at vt.edu
2016-11-17 7:38 ` Amit Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).