All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Backport armv7 compilation failure fix.
@ 2023-11-27 13:19 Viswanath Kraleti
  2023-11-27 13:19 ` [PATCH v2] systemd-boot: fix build issues on armv7a-linux Viswanath Kraleti
  0 siblings, 1 reply; 3+ messages in thread
From: Viswanath Kraleti @ 2023-11-27 13:19 UTC (permalink / raw)
  To: openembedded-core

systemd v254-rc1 developed a bug that is causing build failures on armv7. https://github.com/systemd/systemd/issues/29381
Upstream fixed this but OE-Core recipe is yet to catch up. For now, backporting the fix to unblock.

Viswanath Kraleti (1):
  systemd-boot: fix build issues on armv7a-linux

 meta/recipes-core/systemd/systemd.inc         |  4 ++-
 ...n-Pass-all-static-pie-args-to-linker.patch | 35 +++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Pass-all-static-pie-args-to-linker.patch

-- 
2.25.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] systemd-boot: fix build issues on armv7a-linux
  2023-11-27 13:19 [PATCH 0/1] Backport armv7 compilation failure fix Viswanath Kraleti
@ 2023-11-27 13:19 ` Viswanath Kraleti
  2023-11-28 10:46   ` [OE-core] " Dmitry Baryshkov
  0 siblings, 1 reply; 3+ messages in thread
From: Viswanath Kraleti @ 2023-11-27 13:19 UTC (permalink / raw)
  To: openembedded-core

From: Viswanath Kraleti <vkraleti@qti.qualcomm.com>

Backport a fix to address the build failure on armv7a introduced
in systemd v254-rc1.

see
https://github.com/systemd/systemd/issues/29381

Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com>
---
 meta/recipes-core/systemd/systemd.inc         |  4 ++-
 ...n-Pass-all-static-pie-args-to-linker.patch | 35 +++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Pass-all-static-pie-args-to-linker.patch

diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index ccc3236457..f9caba2066 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -17,6 +17,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
 SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51"
 SRCBRANCH = "v254-stable"
-SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \
+           file://0001-meson-Pass-all-static-pie-args-to-linker.patch \
+           "
 
 S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/systemd/systemd/0001-meson-Pass-all-static-pie-args-to-linker.patch b/meta/recipes-core/systemd/systemd/0001-meson-Pass-all-static-pie-args-to-linker.patch
new file mode 100644
index 0000000000..efea95b6ac
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-meson-Pass-all-static-pie-args-to-linker.patch
@@ -0,0 +1,35 @@
+From f85a387a67900b02c69abccb88c2ef7191c67277 Mon Sep 17 00:00:00 2001
+From: Jan Janssen <medhefgo@web.de>
+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]
+
+---
+ 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',
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH v2] systemd-boot: fix build issues on armv7a-linux
  2023-11-27 13:19 ` [PATCH v2] systemd-boot: fix build issues on armv7a-linux Viswanath Kraleti
@ 2023-11-28 10:46   ` Dmitry Baryshkov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-11-28 10:46 UTC (permalink / raw)
  To: Viswanath Kraleti; +Cc: openembedded-core

On Mon, 27 Nov 2023 at 15:20, Viswanath Kraleti
<quic_vkraleti@quicinc.com> wrote:
>
> From: Viswanath Kraleti <vkraleti@qti.qualcomm.com>

Please skip this patch for now, this email address needs to be changed
to follow the S-o-B trailer.

>
> Backport a fix to address the build failure on armv7a introduced
> in systemd v254-rc1.
>
> see
> https://github.com/systemd/systemd/issues/29381
>
> Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com>
> ---
>  meta/recipes-core/systemd/systemd.inc         |  4 ++-
>  ...n-Pass-all-static-pie-args-to-linker.patch | 35 +++++++++++++++++++
>  2 files changed, 38 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Pass-all-static-pie-args-to-linker.patch


-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-28 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 13:19 [PATCH 0/1] Backport armv7 compilation failure fix Viswanath Kraleti
2023-11-27 13:19 ` [PATCH v2] systemd-boot: fix build issues on armv7a-linux Viswanath Kraleti
2023-11-28 10:46   ` [OE-core] " Dmitry Baryshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.