From cfecdc92b34a8dde022b6c117dcf7fb0e905e5e2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 1 Nov 2026 06:44:36 -0800 Subject: [PATCH] fwupd-efi: Use the cross linker instead of the host ld.bfd fwupd-efi finds the linker with find_program(cc.get_linker_id()), which looks for a program named ld.bfd. meson.cross only sets ld, so meson falls back to PATH and picks up ld.bfd from HOSTTOOLS. That breaks cross builds on an x86-64 host: hosttools/ld.bfd: cannot represent machine `aarch64' and on x86-64 targets it silently links with the host linker. Set ld.bfd in an additional cross file Signed-off-by: Khem Raj --- meta-oe/recipes-bsp/fwupd/fwupd-efi_1.8.bb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.8.bb b/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.8.bb index 8682d97c06..44d1f1807b 100644 --- a/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.8.bb +++ b/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.8.bb @@ -12,6 +12,16 @@ COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" inherit meson pkgconfig python3native +# without this meson finds the build host linker in HOSTTOOLS. +do_write_config:append() { + cat >${WORKDIR}/meson-${PN}.cross <