package/llvm: add BPF backend
authorJugurtha BELKALEM <jugurtha.belkalem@smile.fr>
Sun, 20 Dec 2020 15:11:59 +0000 (16:11 +0100)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 20 May 2021 19:54:07 +0000 (21:54 +0200)
bcc is a front-end tool for eBPF :
https://github.com/iovisor/bcc/blob/master/README.md.
eBPF is the most powerful Linux tracer, and bcc
allows to write eBPF scripts in C and PYTHON3.

BCC requires enabling LLVM backend BPF support.

Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Tested-by: Qais Yousef <qais.yousef@arm.com>
Reviewed-by: Qais Yousef <qais.yousef@arm.com>
Cc: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/llvm/Config.in
package/llvm/llvm.mk

index 1d21d879daa357a889c903ae845c3aab06253ac2..6ec2ffcfe6031c47c0ab4e1d828f4da77dd02a75 100644 (file)
@@ -47,6 +47,12 @@ config BR2_PACKAGE_LLVM_RTTI
 
          https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html
 
+config BR2_PACKAGE_LLVM_BPF
+       bool "BPF backend"
+       help
+         Build BPF target. Select this option if you are going
+         to install bcc on the target.
+
 endif
 
 comment "llvm needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, dynamic library"
index 7d60fe7f8c05fe07b76ff86b7cc07369caba73e7..6c721c30b98dc71c0448cea7821bbcba591b7563 100644 (file)
@@ -62,6 +62,11 @@ ifeq ($(BR2_PACKAGE_LLVM_AMDGPU),y)
 LLVM_TARGETS_TO_BUILD += AMDGPU
 endif
 
+# Build BPF backend
+ifeq ($(BR2_PACKAGE_LLVM_BPF),y)
+LLVM_TARGETS_TO_BUILD += BPF
+endif
+
 # Use native llvm-tblgen from host-llvm (needed for cross-compilation)
 LLVM_CONF_OPTS += -DLLVM_TABLEGEN=$(HOST_DIR)/bin/llvm-tblgen