Re: [PATCH bpf] samples/bpf: kbuild: add CONFIG_SAMPLE_BPF Kconfig

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

 



Hi Bjorn

On Tue, Oct 1, 2019 at 7:14 PM Björn Töpel <bjorn.topel@xxxxxxxxx> wrote:
>
> From: Björn Töpel <bjorn.topel@xxxxxxxxx>
>
> This commit makes it possible to build the BPF samples via a Kconfig
> option, CONFIG_SAMPLE_BPF. Further, it fixes that samples/bpf/ could
> not be built due to a missing samples/Makefile subdir-y entry, after
> the introduction of commit 394053f4a4b3 ("kbuild: make single targets
> work more correctly").
>
> Signed-off-by: Björn Töpel <bjorn.topel@xxxxxxxxx>
> ---
>  samples/Kconfig  | 4 ++++
>  samples/Makefile | 1 +
>  2 files changed, 5 insertions(+)
>
> diff --git a/samples/Kconfig b/samples/Kconfig
> index c8dacb4dda80..054297ac89ad 100644
> --- a/samples/Kconfig
> +++ b/samples/Kconfig
> @@ -169,4 +169,8 @@ config SAMPLE_VFS
>           as mount API and statx().  Note that this is restricted to the x86
>           arch whilst it accesses system calls that aren't yet in all arches.
>
> +config SAMPLE_BPF
> +       bool "BPF samples"
> +       depends on HEADERS_INSTALL
> +
>  endif # SAMPLES
> diff --git a/samples/Makefile b/samples/Makefile
> index 7d6e4ca28d69..49aa2f7d044b 100644
> --- a/samples/Makefile
> +++ b/samples/Makefile
> @@ -20,3 +20,4 @@ obj-$(CONFIG_SAMPLE_TRACE_PRINTK)     += trace_printk/
>  obj-$(CONFIG_VIDEO_PCI_SKELETON)       += v4l/
>  obj-y                                  += vfio-mdev/
>  subdir-$(CONFIG_SAMPLE_VFS)            += vfs
> +subdir-$(CONFIG_SAMPLE_BPF)            += bpf


Please keep samples/Makefile sorted alphabetically.




I am not checking samples/bpf/Makefile, but
allmodconfig no longer compiles for me.



samples/bpf/Makefile:209: WARNING: Detected possible issues with include path.
samples/bpf/Makefile:210: WARNING: Please install kernel headers
locally (make headers_install).
error: unable to create target: 'No available targets are compatible
with triple "bpf"'
1 error generated.
readelf: Error: './llvm_btf_verify.o': No such file
*** ERROR: LLVM (llc) does not support 'bpf' target
   NOTICE: LLVM version >= 3.7.1 required

-- 
Best Regards
Masahiro Yamada




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux