Building systemd on build host with gnu-efi triggers the following compile-host-path QA error: ERROR: QA Issue: systemd: The compile log indicates that host include and/or library paths were used. It looks like systemd recipe needs PACKAGECONFIG gnu-efi so that it doesn't assume host gnu-efi: https://github.com/systemd/systemd-stable/blob/v242-stable/meson_options.txt#L304 log.do_configure reported these host paths: EFI lib directory: /usr/lib EFI lds directory: /usr/lib EFI include directory: /usr/include/efi log.do_compile contains the following warnings: cc1: warning: include location "/usr/include/efi" is unsafe for cross-compilation [-Wpoison-system-directories] cc1: warning: include location "/usr/include/efi/x86_64" is unsafe for cross-compilation [-Wpoison-system-directories] cc1: warning: SSE instruction set disabled, using 387 arithmetics x86_64-oe-linux-ld: warning: library search path "/usr/lib" is unsafe for cross-compilation
Probably add this line to systemd recipe: PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi"
Filed upstream at https://github.com/systemd/systemd/issues/13371
Tested that oneliner, patch sent.
http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=master&id=58ab85d3e005476ab5bcc288ad421c0c5d1e0582