summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2026-01-19 12:19:09 +0200
committerEfraim Flashner <efraim@flashner.co.il>2026-02-09 08:38:03 +0200
commitf2c664190f766b489d12d8e21840d7467ecdabe1 (patch)
tree6662c5c9ba56c5b43a68a60716f49b8203fd0c79 /gnu
parentb27066594408d89351b6e0f4706eb4fdf24dbf26 (diff)
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 <efraim@flashner.co.il>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/efi.scm6
-rw-r--r--gnu/packages/patches/efitools-riscv64-support.patch26
3 files changed, 31 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index f114e326e5e..07b2390315d 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 9a80ca954cd..7239e2b7e2b 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 <dannym@scratchpost.org>
-;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019, 2026 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;;
@@ -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 00000000000..c253159fc3f
--- /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 \