commit:     3e778afebb28dbb92ace1a4c66f52be6f744855e
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 14 08:39:39 2026 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Feb 14 09:04:50 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e778afe

sys-boot/gnu-efi: backport binutils-2.46 fix

Building with binutils 2.46 has been fixed by upstream in 4.x; backport
the fix to 3.0.19 because it is still needed for sys-boot/refind.

The patch is trivial, apply direct to stable.

Closes: https://bugs.gentoo.org/970040
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../files/gnu-efi-3.0.19-fix-binutils-2.46.patch      | 19 +++++++++++++++++++
 sys-boot/gnu-efi/gnu-efi-3.0.19.ebuild                |  3 ++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/sys-boot/gnu-efi/files/gnu-efi-3.0.19-fix-binutils-2.46.patch 
b/sys-boot/gnu-efi/files/gnu-efi-3.0.19-fix-binutils-2.46.patch
new file mode 100644
index 000000000000..3499371cfa81
--- /dev/null
+++ b/sys-boot/gnu-efi/files/gnu-efi-3.0.19-fix-binutils-2.46.patch
@@ -0,0 +1,19 @@
+Backport the fix from gnu-efi 4.0.4 to build with binutils-2.46.
+
+https://bugs.gentoo.org/970040
+
+--- a/apps/Makefile
++++ b/apps/Makefile
+@@ -66,9 +66,9 @@
+ 
+ ifneq ($(HAVE_EFI_OBJCOPY),)
+ 
+-FORMAT                := --target efi-app-$(ARCH)
+-$(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(ARCH)
+-$(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(ARCH)
++FORMAT                := -O efi-app-$(ARCH)
++$(TARGET_BSDRIVERS): FORMAT=-O efi-bsdrv-$(ARCH)
++$(TARGET_RTDRIVERS): FORMAT=-O efi-rtdrv-$(ARCH)
+ 
+ else
+ 

diff --git a/sys-boot/gnu-efi/gnu-efi-3.0.19.ebuild 
b/sys-boot/gnu-efi/gnu-efi-3.0.19.ebuild
index 8a02c4f63f01..61a919b1b4aa 100644
--- a/sys-boot/gnu-efi/gnu-efi-3.0.19.ebuild
+++ b/sys-boot/gnu-efi/gnu-efi-3.0.19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2004-2025 Gentoo Authors
+# Copyright 2004-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -34,6 +34,7 @@ RESTRICT="strip"
 PATCHES=(
        "${FILESDIR}"/${PN}-3.0.18-clang.patch
        "${FILESDIR}"/${PN}-3.0.18-remove-linux-headers.patch
+       "${FILESDIR}"/${PN}-3.0.19-fix-binutils-2.46.patch
 )
 
 check_and_set_objcopy() {

Reply via email to