Skip to contentSkip to conversation

libbpf: add native and nativesdk BBCLASSEXTEND

PATCH New Xiangyu Chen 1 participant 2 messages May 6, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libbpf: add native and nativesdk BBCLASSEXTEND

From: Gianluigi Spagnuolo <[email protected]>

To build pahole-native we need libbpf-native

(backport from commit a28b7fdbf4bf973112530219d63f7559060ec8c7)

---
 meta-oe/recipes-kernel/libbpf/libbpf_0.7.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-kernel/libbpf/libbpf_0.7.0.bb +2 -0
index 461e6b05e..4df920f7a 100644
@@ -27,3 +27,5 @@ do_compile() {
 do_install() {
 	oe_runmake install
 }
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 pahole: fix native package build error

From: Xiangyu Chen <[email protected]>

pahole-native package needs some uapi headers such like linux/btf.h, otherwise it would report error as below:

btf_loader.c:342:54: error: invalid use of undefined type ‘struct btf_enum64’

---
 meta-oe/recipes-devtools/pahole/pahole_1.22.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-devtools/pahole/pahole_1.22.bb +1 -0
index ec642ec3b..b790f5237 100644
@@ -4,6 +4,7 @@ LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
 DEPENDS = "elfutils zlib libbpf"
+DEPENDS:append:class-native = " linux-libc-headers"
 
 # Depends on MACHINE_ARCH libbpf
 PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
2.34.1