lkml.org 
[lkml]   [2017]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next] tools/bpftool: use version from the kernel source tree
On Wed, Dec 20, 2017 at 12:29:21PM -0800, Jakub Kicinski wrote:
> On Wed, 20 Dec 2017 20:19:43 +0000, Roman Gushchin wrote:
> > Bpftool determines it's own version based on the kernel
> > version, which is picked from the linux/version.h header.
> >
> > It's strange to use the version of the installed kernel
> > headers, and makes much more sense to use the version
> > of the actual source tree, where bpftool sources are.
> >
> > This patch adds $(srctree)/usr/include to the list
> > of include files, which causes bpftool to use the version
> > from the source tree.
> >
> > Example:
> > before:
> >
> > $ bpftool version
> > bpftool v4.14.6
> >
> > after:
> > $ bpftool version
> > bpftool v4.15.0
>
> Thanks for the patch, this would indeed use some improvement.
>
> How about we just run make to get the version like liblockdep does?
>
> LIBLOCKDEP_VERSION=$(shell make --no-print-directory -sC ../../.. kernelversion)
>
> probably s@../../..@$(srctree)@
>
> $(srctree)/usr/include is not going to be there for out-of-source builds.

Hm, why it's better? It's not only about the kernel version,
IMO it's generally better to use includes from the source tree,
rather then system-wide installed kernel headers.

I've got about out-of-source builds, but do we support it in general?
How can I build bpftool outside of the kernel tree?
I've tried a bit, but failed.

Thank you!

\
 
 \ /
  Last update: 2017-12-20 21:55    [W:0.061 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site