commit: 5debd81e87d0bb239ad3199d9067b9ea5015fc89 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Wed Jan 21 18:43:43 2026 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Wed Jan 21 18:46:30 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5debd81e
sys-firmware/edk2: fix build with nasm-3 Closes: https://bugs.gentoo.org/964058 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> sys-firmware/edk2/edk2-202502-r1.ebuild | 5 +-- sys-firmware/edk2/files/edk2-202502-nasm-3.patch | 44 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/sys-firmware/edk2/edk2-202502-r1.ebuild b/sys-firmware/edk2/edk2-202502-r1.ebuild index 00871d7446f5..b663c2b9e906 100644 --- a/sys-firmware/edk2/edk2-202502-r1.ebuild +++ b/sys-firmware/edk2/edk2-202502-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -55,7 +55,7 @@ BDEPEND=" app-emulation/qemu app-emulation/virt-firmware >=sys-power/iasl-20160729 - amd64? ( <dev-lang/nasm-3 ) + amd64? ( >=dev-lang/nasm-2.0.7 ) " RDEPEND=" @@ -65,6 +65,7 @@ RDEPEND=" PATCHES=( "${FILESDIR}/${PN}-202411-werror.patch" "${FILESDIR}/${PN}-202408-binutils-2.41-textrels.patch" + "${FILESDIR}/edk2-202502-nasm-3.patch" ) DISABLE_AUTOFORMATTING="true" diff --git a/sys-firmware/edk2/files/edk2-202502-nasm-3.patch b/sys-firmware/edk2/files/edk2-202502-nasm-3.patch new file mode 100644 index 000000000000..0a61e2249a1b --- /dev/null +++ b/sys-firmware/edk2/files/edk2-202502-nasm-3.patch @@ -0,0 +1,44 @@ +https://bugs.gentoo.org/964058 +https://github.com/tianocore/edk2/issues/11635 +https://github.com/tianocore/edk2/pull/11691 + +From 034d24a3afb9f7ffe12c896c597e9872dfae0e02 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <[email protected]> +Date: Mon, 3 Nov 2025 09:56:52 +0100 +Subject: [PATCH] UefiCpuPkg/CpuExceptionHandlerLib: fix push instructions + +Nasm 3.0 complains about 'dword' being invalid. The comment talks about +a '8-byte value' so 'qword' should be correct here. + +With this change the extra comment explaining that the instruction +actually pushes an 8-byte value despite the 'dword' keyword is not +needed any more. Drop it. + +Fixes: https://github.com/tianocore/edk2/issues/11635 +Signed-off-by: Gerd Hoffmann <[email protected]> +--- + .../CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm +index 3d64ac908010..671ed98f8525 100644 +--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm ++++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm +@@ -57,7 +57,7 @@ ALIGN 8 + AsmIdtVectorBegin: + %assign Vector 0 + %rep 256 +- push strict dword %[Vector] ; This instruction pushes sign-extended 8-byte value on stack ++ push strict qword %[Vector] + push rax + %ifdef NO_ABSOLUTE_RELOCS_IN_TEXT + mov rax, strict qword 0 ; mov rax, ASM_PFX(CommonInterruptEntry) +@@ -70,7 +70,7 @@ AsmIdtVectorBegin: + AsmIdtVectorEnd: + + HookAfterStubHeaderBegin: +- push strict dword 0 ; 0 will be fixed ++ push strict qword 0 ; 0 will be fixed + VectorNum: + push rax + %ifdef NO_ABSOLUTE_RELOCS_IN_TEXT
