diff mbox series

[v2,3/3] systemd: bpf-framework: pass 'recipe-sysroot' to BPF compiler

Message ID 20240620115127.36172-4-johannes.schneider@leica-geosystems.com
State New
Headers show
Series systemd and RestrictNetworkInterfaces | expand

Commit Message

Johannes Schneider June 20, 2024, 11:51 a.m. UTC
Pass the "recipe-sysroot" path via the CFLAGS=--sysroot= to the
compiler used by systemd to build the BPF, so that it can find the
needed system includes.

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
---
 meta/recipes-core/systemd/systemd_255.6.bb | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd_255.6.bb b/meta/recipes-core/systemd/systemd_255.6.bb
index d2c5e09697..0376412f61 100644
--- a/meta/recipes-core/systemd/systemd_255.6.bb
+++ b/meta/recipes-core/systemd/systemd_255.6.bb
@@ -234,6 +234,10 @@  PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd"
 
 RESOLV_CONF ??= ""
 
+# bpf-framework: pass the recipe-sysroot to the compiler used to build
+# the eBPFs, so that it can find needed system includes in there.
+CFLAGS:append = " --sysroot=${STAGING_DIR_TARGET}"
+
 # Helper variables to clarify locations.  This mirrors the logic in systemd's
 # build system.
 rootprefix ?= "${root_prefix}"