new file mode 100644
@@ -0,0 +1,31 @@
+From 3bb29e3e924af117c0ade4f38d7c051897dd84e0 Mon Sep 17 00:00:00 2001
+From: Mikko Rapeli <mikko.rapeli@linaro.org>
+Date: Wed, 7 May 2025 08:02:17 +0000
+Subject: [PATCH] systemd meson.build: disable linker warnings as errors
+
+aarch64 builds with GCS branch protection have issues when linking
+to asm code in libraries without GCS support and linking fails.
+This happens with openssl. Ignore the non-fatal error for now.
+
+Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
+---
+ meson.build | 1 -
+ 1 file changed, 1 deletion(-)
+
+Upstream-Status: Inappropriate [configuration]
+
+diff --git a/meson.build b/meson.build
+index 957e00ecadf..0295a65253c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -455,7 +455,6 @@ endif
+ # --as-needed and --no-undefined are provided by meson by default,
+ # run 'meson configure' to see what is enabled
+ possible_link_flags = [
+- '-Wl,--fatal-warnings',
+ '-Wl,-z,now',
+ '-Wl,-z,relro',
+ ]
+--
+2.43.0
+
@@ -1,3 +1,6 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+SRC_URI:append:aarch64 = " file://0001-systemd-meson.build-disable-linker-warnings-as-error.patch"
+
PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'tpm2', '', d)}"
# for encrypted filesystems
openssl asm code is missing GCS branch protections and linker throws a warning which currently fails the build. Ignore the warnings for now since some branch protection is still applied and only GCS is missing. Works around: .../recipe-sysroot/usr/lib/libcrypto.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking. collect2: error: ld returned 1 exit status Cc: Sathishkumar Duraisamy <sathishkumar.d.cbe@gmail.com> Cc: Khem Raj <raj.khem@gmail.com> Cc: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> --- ...ild-disable-linker-warnings-as-error.patch | 31 +++++++++++++++++++ .../recipes-core/systemd/systemd_%.bbappend | 3 ++ 2 files changed, 34 insertions(+) create mode 100644 meta-tpm/recipes-core/systemd/files/0001-systemd-meson.build-disable-linker-warnings-as-error.patch