From dfcbfc49ca468c9ae20ccde88edfdb8b9ef16c27 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Wed, 27 Dec 2023 12:20:35 +0800 Subject: systemd-boot: upgrade to 255.1 0030-meson-Pass-all-static-pie-args-to-linker.patch is dropped as it's a backported patch and is now in the new 255.1 version. (From OE-Core rev: 6fdf03bd950e55ef7881041606f6e76141033716) Signed-off-by: Chen Qi Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-core/systemd/systemd-boot_254.4.bb | 71 ---------------------- meta/recipes-core/systemd/systemd-boot_255.1.bb | 67 ++++++++++++++++++++ ...-meson-Pass-all-static-pie-args-to-linker.patch | 35 ----------- 3 files changed, 67 insertions(+), 106 deletions(-) delete mode 100644 meta/recipes-core/systemd/systemd-boot_254.4.bb create mode 100644 meta/recipes-core/systemd/systemd-boot_255.1.bb delete mode 100644 meta/recipes-core/systemd/systemd/0030-meson-Pass-all-static-pie-args-to-linker.patch (limited to 'meta') diff --git a/meta/recipes-core/systemd/systemd-boot_254.4.bb b/meta/recipes-core/systemd/systemd-boot_254.4.bb deleted file mode 100644 index 2b43ccf243..0000000000 --- a/meta/recipes-core/systemd/systemd-boot_254.4.bb +++ /dev/null @@ -1,71 +0,0 @@ -require systemd.inc -FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" - -require conf/image-uefi.conf - -DEPENDS = "intltool-native libcap util-linux gperf-native python3-jinja2-native python3-pyelftools-native" - -inherit meson pkgconfig gettext -inherit deploy - -SRC_URI += " \ - file://0030-meson-Pass-all-static-pie-args-to-linker.patch \ - " - -LDFLAGS:prepend = "${@ " ".join(d.getVar('LD').split()[1:])} " - -EFI_LD = "bfd" -LDFLAGS:append = " -fuse-ld=${EFI_LD}" - -do_write_config[vardeps] += "EFI_LD" -do_write_config:append() { - cat >${WORKDIR}/meson-${PN}.cross <${WORKDIR}/meson-${PN}.cross < -Date: Sun, 1 Oct 2023 09:55:48 +0200 -Subject: [PATCH] meson: Pass all -static-pie args to linker - -Fixes: #29381 - -Upstream-Status: Backport [https://github.com/systemd/systemd/commit/cecbb162a3134b43d2ca160e13198c73ff34c3ef] -Signed-off-by: Viswanath Kraleti ---- - src/boot/efi/meson.build | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build -index 2773eaf286..9a60a57329 100644 ---- a/src/boot/efi/meson.build -+++ b/src/boot/efi/meson.build -@@ -161,9 +161,14 @@ efi_c_ld_args = [ - '-Wl,--entry=efi_main', - '-Wl,--fatal-warnings', - -- # These flags should be passed by -static-pie, but seem to be missing sometimes. -- '-Wl,--no-dynamic-linker', -- '-z', 'text', -+ # These flags should be passed by -static-pie, but for whatever reason the flag translation -+ # is not enabled on all architectures. Not passing `-static` would just allow the linker to -+ # use dynamic libraries, (which we can't/don't use anyway). But if `-pie` is missing and the -+ # gcc build does not default to `-pie` we get a regular (no-pie) binary that will be -+ # rightfully rejected by elf2efi. Note that meson also passes `-pie` to the linker driver, -+ # but it is overridden by our `-static-pie`. We also need to pass these directly to the -+ # linker as `-static`+`-pie` seem to get translated differently. -+ '-Wl,-static,-pie,--no-dynamic-linker,-z,text', - - # EFI has 4KiB pages. - '-z', 'common-page-size=4096', -- cgit v1.2.3-54-g00ecf