]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: bpf: propagate 'sysroot' for cross compilation
authorJohannes Schneider <johannes.schneider@leica-geosystems.com>
Thu, 20 Jun 2024 10:32:18 +0000 (12:32 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 Jun 2024 23:25:58 +0000 (08:25 +0900)
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>
meson.build

index dd335c12445e271d45328ee52f48972eced7bb49..aa36e72b024fc31e9d58e5cbe02d4943fa6ab1bc 100644 (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