]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
systemd: bpf-framework: pass 'recipe-sysroot' to BPF compiler
authorJohannes Schneider <johannes.schneider@leica-geosystems.com>
Thu, 20 Jun 2024 11:51:27 +0000 (13:51 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 25 Jun 2024 10:49:54 +0000 (11:49 +0100)
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>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-core/systemd/systemd_255.6.bb

index d2c5e09697fae0888f57373750cd1c508b136309..0376412f61e0fe40ed0a7d6af42579646668e4c2 100644 (file)
@@ -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}"