commit:     c505ecb1c66e512c95e8fa6579d238bc51e7b473
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 27 15:35:23 2025 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Mon Oct 27 15:35:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c505ecb1

sys-apps/cpu-x: backport patch for nasm-3

Closes: https://bugs.gentoo.org/964393
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 sys-apps/cpu-x/cpu-x-5.4.0.ebuild                  |  2 ++
 .../cpu-x/files/cpu-x-5.4.0-fix-for-nasm-3.patch   | 40 ++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/sys-apps/cpu-x/cpu-x-5.4.0.ebuild 
b/sys-apps/cpu-x/cpu-x-5.4.0.ebuild
index 22b510f54314..932f5c34c512 100644
--- a/sys-apps/cpu-x/cpu-x-5.4.0.ebuild
+++ b/sys-apps/cpu-x/cpu-x-5.4.0.ebuild
@@ -53,6 +53,8 @@ BDEPEND="
 
 RDEPEND="${COMMON_DEPEND}"
 
+PATCHES=( "${FILESDIR}"/cpu-x-5.4.0-fix-for-nasm-3.patch )
+
 src_configure() {
        local mycmakeargs=(
                -DFORCE_LIBSTATGRAB=$(usex force-libstatgrab)

diff --git a/sys-apps/cpu-x/files/cpu-x-5.4.0-fix-for-nasm-3.patch 
b/sys-apps/cpu-x/files/cpu-x-5.4.0-fix-for-nasm-3.patch
new file mode 100644
index 000000000000..262ab0aa3769
--- /dev/null
+++ b/sys-apps/cpu-x/files/cpu-x-5.4.0-fix-for-nasm-3.patch
@@ -0,0 +1,40 @@
+From 8b8e64253c27a8ad4f35f70db5627cf54ebfdb9c Mon Sep 17 00:00:00 2001
+From: Dominik 'Rathann' Mierzejewski <[email protected]>
+Date: Tue, 14 Oct 2025 13:37:48 +0200
+Subject: [PATCH] use default cpu instead of ia64
+
+Recent NASM release (3.0+) enforces cpu levels more strictly, causing
+assembly to fail otherwise.
+
+Fixes #401 .
+---
+ src/core/bandwidth/OOC/utility-x86-64bit.asm | 2 +-
+ src/core/bandwidth/routines-x86-64bit.asm    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/bandwidth/OOC/utility-x86-64bit.asm 
b/src/core/bandwidth/OOC/utility-x86-64bit.asm
+index 259d9f4b..9c360540 100644
+--- a/src/core/bandwidth/OOC/utility-x86-64bit.asm
++++ b/src/core/bandwidth/OOC/utility-x86-64bit.asm
+@@ -20,7 +20,7 @@
+ ;=============================================================================
+ 
+ bits  64
+-cpu   ia64
++cpu   default
+ 
+ ; Note:
+ ; Unix ABI says integer param are put in these registers in this order:
+diff --git a/src/core/bandwidth/routines-x86-64bit.asm 
b/src/core/bandwidth/routines-x86-64bit.asm
+index 67c9d5fe..675f8800 100644
+--- a/src/core/bandwidth/routines-x86-64bit.asm
++++ b/src/core/bandwidth/routines-x86-64bit.asm
+@@ -38,7 +38,7 @@
+ %endif
+ 
+ bits  64
+-cpu   ia64
++cpu   default
+ 
+ global        CopyWithMainRegisters
+ global        _CopyWithMainRegisters

Reply via email to