guix_mirror_bot pushed a commit to branch master
in repository guix.

commit f2c664190f766b489d12d8e21840d7467ecdabe1
Author: Efraim Flashner <[email protected]>
AuthorDate: Mon Jan 19 12:19:09 2026 +0200

    gnu: efitools: Fix build on riscv64-linux.
    
    * gnu/packages/efi.scm (efitools)[source]: Add patch.
    * gnu/packages/patches/efitools-riscv64-support.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
    
    Change-Id: Ieb79d0ee219d1d3af85eb56b57b92e9d22b73dc9
    Signed-off-by: Efraim Flashner <[email protected]>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/efi.scm                               |  6 +++--
 .../patches/efitools-riscv64-support.patch         | 26 ++++++++++++++++++++++
 3 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index f114e326e5..07b2390315 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1207,6 +1207,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/dvdbackup-with-libdvdread-6.1.0+.patch  \
   %D%/packages/patches/dvd+rw-tools-add-include.patch          \
   %D%/packages/patches/dwarves-threading-reproducibility.patch \
+  %D%/packages/patches/efitools-riscv64-support.patch          \
   %D%/packages/patches/efivar-fix-fprint-format.patch          \
   %D%/packages/patches/eigen-fix-strict-aliasing-bug.patch     \
   %D%/packages/patches/einstein-build.patch                    \
diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm
index 9a80ca954c..7239e2b7e2 100644
--- a/gnu/packages/efi.scm
+++ b/gnu/packages/efi.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Danny Milosavljevic <[email protected]>
-;;; Copyright © 2019 Efraim Flashner <[email protected]>
+;;; Copyright © 2019, 2026 Efraim Flashner <[email protected]>
 ;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <[email protected]>
 ;;; Copyright © 2021 Vincent Legoll <[email protected]>
 ;;;
@@ -27,6 +27,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system gnu)
   #:use-module (guix download)
@@ -167,7 +168,8 @@ information.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0jabgl2pxvfl780yvghq131ylpf82k7banjz0ksjhlm66ik8gb1i"))))
+         "0jabgl2pxvfl780yvghq131ylpf82k7banjz0ksjhlm66ik8gb1i"))
+       (patches (search-patches "efitools-riscv64-support.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f  ; No tests exist.
diff --git a/gnu/packages/patches/efitools-riscv64-support.patch 
b/gnu/packages/patches/efitools-riscv64-support.patch
new file mode 100644
index 0000000000..c253159fc3
--- /dev/null
+++ b/gnu/packages/patches/efitools-riscv64-support.patch
@@ -0,0 +1,26 @@
+Patch downloaded from Debian
+https://sources.debian.org/data/main/e/efitools/1.9.2-4/debian/patches/allow-riscv64-build.patch
+
+--- a/Make.rules
++++ b/Make.rules
+@@ -8,6 +8,8 @@
+ ARCH3264 =
+ else ifeq ($(ARCH),aarch64)
+ ARCH3264 =
++else ifeq ($(ARCH),riscv64)
++ARCH3264 =
+ else ifeq ($(ARCH),arm)
+ ARCH3264 =
+ else
+@@ -55,6 +57,11 @@
+   LDFLAGS += --defsym=EFI_SUBSYSTEM=0x0a
+   FORMAT = -O binary
+ endif
++
++ifeq ($(ARCH),riscv64)
++  LDFLAGS += --defsym=EFI_SUBSYSTEM=0x0a
++  FORMAT = -O binary
++endif
+ 
+ %.efi: %.so
+       $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym \

Reply via email to