diff --git a/srcpkgs/gnu-efi-libs/patches/musl-wchar.patch b/srcpkgs/gnu-efi-libs/patches/musl-wchar.patch new file mode 100644 index 00000000000..9b7d516fd7b --- /dev/null +++ b/srcpkgs/gnu-efi-libs/patches/musl-wchar.patch @@ -0,0 +1,141 @@ +From edfda7c396134c7109444b230ce4b0da1e61d524 Mon Sep 17 00:00:00 2001 +From: Callum Farmer +Date: Wed, 29 May 2024 16:22:50 +0100 +Subject: [PATCH] Make CHAR16 use uint16_t + +musl-libc doesn't like fshort-wchar so remove wchar_t usage +Use uint16_t as char16_t can be up to 32bits +Fixes ncroxon/gnu-efi#16 + +Signed-off-by: Callum Farmer +--- + Make.defaults | 4 ++-- + inc/aarch64/efibind.h | 2 +- + inc/arm/efibind.h | 2 +- + inc/ia32/efibind.h | 2 +- + inc/ia64/efibind.h | 2 +- + inc/loongarch64/efibind.h | 2 +- + inc/mips64el/efibind.h | 2 +- + inc/riscv64/efibind.h | 5 ++--- + inc/x86_64/efibind.h | 2 +- + 9 files changed, 11 insertions(+), 12 deletions(-) + +diff --git a/inc/aarch64/efibind.h b/inc/aarch64/efibind.h +index c670f84..827b066 100644 +--- a/inc/aarch64/efibind.h ++++ b/inc/aarch64/efibind.h +@@ -40,7 +40,7 @@ typedef int64_t intptr_t; + + #include + +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + + typedef uint64_t UINT64; +diff --git a/inc/arm/efibind.h b/inc/arm/efibind.h +index 3a95e85..6094c65 100644 +--- a/inc/arm/efibind.h ++++ b/inc/arm/efibind.h +@@ -48,7 +48,7 @@ typedef int32_t intptr_t; + + #include + +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + + typedef uint64_t UINT64; +diff --git a/inc/ia32/efibind.h b/inc/ia32/efibind.h +index accedce..a82aef6 100644 +--- a/inc/ia32/efibind.h ++++ b/inc/ia32/efibind.h +@@ -87,7 +87,7 @@ Revision History + + #include + +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + + +diff --git a/inc/ia64/efibind.h b/inc/ia64/efibind.h +index efdbd0e..e68b0d8 100644 +--- a/inc/ia64/efibind.h ++++ b/inc/ia64/efibind.h +@@ -74,7 +74,7 @@ Revision History + + #include + +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + + typedef uint64_t UINT64; +diff --git a/inc/loongarch64/efibind.h b/inc/loongarch64/efibind.h +index e5b2318..6fc7b65 100644 +--- a/inc/loongarch64/efibind.h ++++ b/inc/loongarch64/efibind.h +@@ -44,7 +44,7 @@ typedef int64_t intptr_t; + + #include + +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + + typedef uint64_t UINT64; +diff --git a/inc/mips64el/efibind.h b/inc/mips64el/efibind.h +index fbdff30..63b1b23 100644 +--- a/inc/mips64el/efibind.h ++++ b/inc/mips64el/efibind.h +@@ -42,7 +42,7 @@ typedef int64_t intptr_t; + + #include + +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + + typedef uint64_t UINT64; +diff --git a/inc/riscv64/efibind.h b/inc/riscv64/efibind.h +index 1a8b1dc..5558e8b 100644 +--- a/inc/riscv64/efibind.h ++++ b/inc/riscv64/efibind.h +@@ -17,13 +17,12 @@ + */ + + #include ++#include + + // + // Basic EFI types of various widths + // + +-#include +- + typedef uint64_t UINT64; + typedef int64_t INT64; + typedef uint32_t UINT32; +@@ -33,7 +32,7 @@ typedef int16_t INT16; + typedef uint8_t UINT8; + typedef int8_t INT8; + typedef char CHAR8; +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + #undef VOID + typedef void VOID; +diff --git a/inc/x86_64/efibind.h b/inc/x86_64/efibind.h +index e454ed2..8f431cb 100644 +--- a/inc/x86_64/efibind.h ++++ b/inc/x86_64/efibind.h +@@ -98,7 +98,7 @@ Revision History + + #include + +-typedef wchar_t CHAR16; ++typedef uint16_t CHAR16; + #define WCHAR CHAR16 + + typedef uint64_t UINT64; diff --git a/srcpkgs/gnu-efi-libs/template b/srcpkgs/gnu-efi-libs/template index c47d33046f2..d1c1d4ee8b4 100644 --- a/srcpkgs/gnu-efi-libs/template +++ b/srcpkgs/gnu-efi-libs/template @@ -2,7 +2,7 @@ pkgname=gnu-efi-libs reverts="3.0w_1" # Not an actual revert, xbps considers 3.0w higher than 3.0.8 version=3.0.18 -revision=1 +revision=2 makedepends="pciutils-devel" short_desc="Library for building UEFI Applications using GNU toolchain" maintainer="Orphaned "