Skip to content

Commit

Permalink
meson: bpf: propagate 'sysroot' for cross compilation
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
js731ca authored and yuwata committed Jun 20, 2024
1 parent d42edbf commit b608bf5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -1740,6 +1740,7 @@ if conf.get('BPF_FRAMEWORK') == 1
'-ffile-prefix-map=',
'-fdebug-prefix-map=',
'-fmacro-prefix-map=',
'--sysroot=',
]

foreach opt : c_args
Expand Down

0 comments on commit b608bf5

Please sign in to comment.