[packages/nodejs] - fix x86 build of builtin hdrhistogram library
qboosh
qboosh at pld-linux.org
Sat Aug 29 22:16:26 CEST 2026
commit dc6d7a15710dc2c98618f45fec4b2f7b86aae9eb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Aug 29 22:16:27 2026 +0200
- fix x86 build of builtin hdrhistogram library
hdrhistogram-avx2.patch | 13 +++++++++++++
nodejs.spec | 2 ++
2 files changed, 15 insertions(+)
---
diff --git a/nodejs.spec b/nodejs.spec
index 1d311e0..3cb07ca 100644
--- a/nodejs.spec
+++ b/nodejs.spec
@@ -42,6 +42,7 @@ Patch1: %{name}-lib64path.patch
Patch2: 0001-Remove-unused-OpenSSL-config.patch
Patch3: arm-yield.patch
Patch4: cflags.patch
+Patch5: hdrhistogram-avx2.patch
Patch6: tuple-build-fix.patch
URL: https://nodejs.org/
BuildRequires: c-ares-devel >= 1.17.2
@@ -161,6 +162,7 @@ Ten pakiet zawiera dokumentację Node.js.
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
+%patch -P5 -p1
%patch -P6 -p1 -d deps/v8
grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python$,#!%{__python3},'
diff --git a/hdrhistogram-avx2.patch b/hdrhistogram-avx2.patch
new file mode 100644
index 0000000..a09db02
--- /dev/null
+++ b/hdrhistogram-avx2.patch
@@ -0,0 +1,13 @@
+In bundled hdrhistogram:
+AVX2 code uses 64-bit operation (_mm_extract_epi64)
+--- node-v24.20.0/deps/histogram/src/hdr_histogram.c.orig 2026-08-26 10:47:26.000000000 +0200
++++ node-v24.20.0/deps/histogram/src/hdr_histogram.c 2026-08-29 21:07:45.301736775 +0200
+@@ -36,7 +36,7 @@
+
+ /* Runtime-dispatched AVX2 path: keep the rest of this TU at the project's
+ baseline ISA so the shipped binary does not silently require AVX2. */
+-#if (defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)) \
++#if (defined(__x86_64__) || defined(_M_X64)) \
+ && (defined(__GNUC__) || defined(__clang__)) && !defined(__INTEL_COMPILER) && !defined(_MSC_VER)
+ # define HDR_HAS_AVX2_DISPATCH 1
+ # include <immintrin.h>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nodejs.git/commitdiff/dc6d7a15710dc2c98618f45fec4b2f7b86aae9eb
More information about the pld-cvs-commit
mailing list