commit:     34cd105a4b61cdbc9b9d6f722425fbbeaf405f13
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  7 18:03:34 2024 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Jun  7 18:05:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34cd105a

sys-apps/systemd-utils: restore patch to fix efi wchar_t on musl

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/systemd-utils/files/musl-efi-wchar.patch | 29 +++++++++++++++++++++++
 sys-apps/systemd-utils/systemd-utils-255.7.ebuild |  1 +
 2 files changed, 30 insertions(+)

diff --git a/sys-apps/systemd-utils/files/musl-efi-wchar.patch 
b/sys-apps/systemd-utils/files/musl-efi-wchar.patch
new file mode 100644
index 000000000000..a3681552d33f
--- /dev/null
+++ b/sys-apps/systemd-utils/files/musl-efi-wchar.patch
@@ -0,0 +1,29 @@
+From c4050bd401611f6223c00e58ac9c26b9caccd286 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <[email protected]>
+Date: Sat, 9 Sep 2023 13:10:53 -0400
+Subject: [PATCH] efi: append -D__DEFINED_wchar_t to LDFLAGS
+
+This forces systemd-boot to use the wchar_t type defined from
+__WCHAR_TYPE__ in efi.h, instead of the wchar_t defined in musl's
+alltypes.h. Adapted from openembedded's solution.
+
+Signed-off-by: Violet Purcell <[email protected]>
+---
+ src/boot/efi/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
+index 2773eaf286..3c1e09c729 100644
+--- a/src/boot/efi/meson.build
++++ b/src/boot/efi/meson.build
+@@ -130,6 +130,7 @@ efi_includes = [fundamental_include, 
include_directories('.')]
+ 
+ efi_c_args = [
+         '-DSD_BOOT=1',
++        '-D__DEFINED_wchar_t',
+         '-ffreestanding',
+         '-fno-strict-aliasing',
+         '-fshort-wchar',
+-- 
+2.42.0
+

diff --git a/sys-apps/systemd-utils/systemd-utils-255.7.ebuild 
b/sys-apps/systemd-utils/systemd-utils-255.7.ebuild
index 865a3e795381..7a71b20cb498 100644
--- a/sys-apps/systemd-utils/systemd-utils-255.7.ebuild
+++ b/sys-apps/systemd-utils/systemd-utils-255.7.ebuild
@@ -138,6 +138,7 @@ src_prepare() {
        if use elibc_musl; then
                PATCHES+=(
                        "${WORKDIR}/${MUSL_PATCHSET}"
+                       "${FILESDIR}/musl-efi-wchar.patch"
                )
        fi
        default

Reply via email to