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>
This commit is contained in:
Johannes Schneider 2024-06-20 12:32:18 +02:00 committed by Yu Watanabe
parent d42edbf1b8
commit b608bf5620

View file

@ -1740,6 +1740,7 @@ if conf.get('BPF_FRAMEWORK') == 1
'-ffile-prefix-map=',
'-fdebug-prefix-map=',
'-fmacro-prefix-map=',
'--sysroot=',
]
foreach opt : c_args