diff mbox series

[4/9] systemd-boot: improve cross file generation

Message ID 20230810162451.1766532-4-ross.burton@arm.com
State Accepted, archived
Commit 302551de19edb1eb7333a6d1d5fdddacdbb9c349
Headers show
Series [1/9] meson.bbclass: add MESON_TARGET | expand

Commit Message

Ross Burton Aug. 10, 2023, 4:24 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

The meson.cross generated by the class already has c and objcopy
entries, so these can be removed.

Pass the --cross-file option in MESON_CROSS_FILE to ensure the ordering
is always correct.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-core/systemd/systemd-boot_254.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd-boot_254.bb b/meta/recipes-core/systemd/systemd-boot_254.bb
index 43eb05ade84..4fee99beada 100644
--- a/meta/recipes-core/systemd/systemd-boot_254.bb
+++ b/meta/recipes-core/systemd/systemd-boot_254.bb
@@ -13,22 +13,21 @@  LDFLAGS:prepend = "${@ " ".join(d.getVar('LD').split()[1:])} "
 EFI_LD = "bfd"
 LDFLAGS:append = " -fuse-ld=${EFI_LD}"
 
-do_write_config[vardeps] += "CC OBJCOPY EFI_LD"
+do_write_config[vardeps] += "EFI_LD"
 do_write_config:append() {
     cat >${WORKDIR}/meson-${PN}.cross <<EOF
 [binaries]
-c = ${@meson_array('CC', d)}
-objcopy = ${@meson_array('OBJCOPY', d)}
 c_ld = ${@meson_array('EFI_LD', d)}
 EOF
 }
 
+MESON_CROSS_FILE:append = " --cross-file ${WORKDIR}/meson-${PN}.cross"
+
 MESON_TARGET = "systemd-boot"
 
 EXTRA_OEMESON += "-Defi=true \
                   -Dbootloader=true \
                   -Dman=false \
-                  --cross-file ${WORKDIR}/meson-${PN}.cross \
                   "
 
 # install to the image as boot*.efi if its the EFI_PROVIDER,