From b61a8cf3f4091876ad0151d1bb2238c5a762f33a Mon Sep 17 00:00:00 2001
From: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Date: Thu, 20 Jun 2024 12:32:18 +0200
Subject: [PATCH 0719/1160] meson: bpf: propagate 'sysroot' for cross
compilation
During cross-compilation of systemd, the compiler used to build the bpf's needs
to be pointed at the correct include searchpath. Which can be done by passing
the corresponding directory in through the cflags; for example in yocto/bitbake
this would work: CFLAGS += "--sysroot=${STAGING_DIR_TARGET}"
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
(cherry picked from commit b608bf5620765de20851eca55cbd6c42ce1af450)
(cherry picked from commit 3174fae67beeae49f71eda09c9fa844316440522)
meson.build | 1 +
1 file changed, 1 insertion(+)
@@ -1691,6 +1691,7 @@ if conf.get('BPF_FRAMEWORK') == 1
'-ffile-prefix-map=',
'-fdebug-prefix-map=',
'-fmacro-prefix-map=',
+ '--sysroot=',
]
foreach opt : c_args
--
2.33.0