From: Johannes Schneider Date: Thu, 20 Jun 2024 11:51:27 +0000 (+0200) Subject: systemd: bpf-framework: pass 'recipe-sysroot' to BPF compiler X-Git-Tag: uninative-4.6~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25560c19ac7629615adb2b1a71b05d36b0d157d5;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git systemd: bpf-framework: pass 'recipe-sysroot' to BPF compiler 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 Signed-off-by: Alexandre Belloni --- diff --git a/meta/recipes-core/systemd/systemd_255.6.bb b/meta/recipes-core/systemd/systemd_255.6.bb index d2c5e09697f..0376412f61e 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}"