diff --git a/srcpkgs/gnu-efi-libs/patches/riscv64.patch b/srcpkgs/gnu-efi-libs/patches/riscv64.patch new file mode 100644 index 00000000000..eb10d1bb176 --- /dev/null +++ b/srcpkgs/gnu-efi-libs/patches/riscv64.patch @@ -0,0 +1,22 @@ +riscv64: adjust type definitions + +CHAR8 needs to be defined while BOOLEAN should be removed +here to prevent typedef conflicts + +Source: https://sourceforge.net/p/gnu-efi/code/ci/1de509497826faa0ad84b82f5e2c3d21ee613459/ +--- +--- a/inc/riscv64/efibind.h 2023-05-02 13:51:45.000000000 +0200 ++++ - 2024-02-16 17:14:57.455180520 +0100 +@@ -32,11 +32,9 @@ + typedef int16_t INT16; + typedef uint8_t UINT8; + typedef int8_t INT8; ++typedef char CHAR8; + typedef wchar_t CHAR16; + #define WCHAR CHAR16 +-#ifndef BOOLEAN +-typedef uint8_t BOOLEAN; +-#endif + #undef VOID + typedef void VOID; + typedef int64_t INTN; diff --git a/srcpkgs/gnu-efi-libs/template b/srcpkgs/gnu-efi-libs/template index 2f088744633..5c25df7ef5b 100644 --- a/srcpkgs/gnu-efi-libs/template +++ b/srcpkgs/gnu-efi-libs/template @@ -27,6 +27,7 @@ case "$XBPS_MACHINE" in i686*) HOST_ARCH=ia32 ;; arm*) HOST_ARCH=arm ;; aarch64*) HOST_ARCH=aarch64 ;; + riscv64*) HOST_ARCH=riscv64 ;; esac # Filter our arches for the target machines @@ -37,6 +38,7 @@ case "$XBPS_TARGET_MACHINE" in i686*) TARGET_ARCH=ia32 ;; arm*) TARGET_ARCH=arm ;; aarch64*) TARGET_ARCH=aarch64 ;; + riscv64*) TARGET_ARCH=riscv64 ;; *) broken="${XBPS_TARGET_MACHINE} is untested, please add support if possible" ;; esac