[packages/nodejs] add fix for llhttp build failure on armv7hnl
atler
atler at pld-linux.org
Wed Oct 29 22:29:44 CET 2025
commit 819a2c5dbc5fb334adb794f02d8c6a375a713d1b
Author: Jan Palus <atler at pld-linux.org>
Date: Tue Oct 28 23:20:34 2025 +0100
add fix for llhttp build failure on armv7hnl
submitted upstream:
https://github.com/nodejs/llparse/pull/79
but it does not look like it's gonna be merged any time soon
llhttp-neon.patch | 32 ++++++++++++++++++++++++++++++++
nodejs.spec | 2 ++
2 files changed, 34 insertions(+)
---
diff --git a/nodejs.spec b/nodejs.spec
index 60e6b45..9b82ba4 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: llhttp-neon.patch
URL: https://nodejs.org/
BuildRequires: c-ares-devel >= 1.17.2
BuildRequires: gcc >= 6:6.3
@@ -155,6 +156,7 @@ Ten pakiet zawiera dokumentację Node.js.
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
+%patch -P5 -p1
grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python$,#!%{__python3},'
diff --git a/llhttp-neon.patch b/llhttp-neon.patch
new file mode 100644
index 0000000..b98270d
--- /dev/null
+++ b/llhttp-neon.patch
@@ -0,0 +1,32 @@
+--- node-v24.11.0/deps/llhttp/src/llhttp.c.orig 2025-10-28 06:48:10.000000000 +0100
++++ node-v24.11.0/deps/llhttp/src/llhttp.c 2025-10-28 23:17:38.577808680 +0100
+@@ -2639,17 +2639,17 @@
+ /* Find first character that does not match `ranges` */
+ single = vceqq_u8(input, vdupq_n_u8(0x9));
+ mask = single;
+- single = vandq_u16(
++ single = vandq_u8(
+ vcgeq_u8(input, vdupq_n_u8(' ')),
+ vcleq_u8(input, vdupq_n_u8('~'))
+ );
+- mask = vorrq_u16(mask, single);
+- single = vandq_u16(
++ mask = vorrq_u8(mask, single);
++ single = vandq_u8(
+ vcgeq_u8(input, vdupq_n_u8(0x80)),
+ vcleq_u8(input, vdupq_n_u8(0xff))
+ );
+- mask = vorrq_u16(mask, single);
+- narrow = vshrn_n_u16(mask, 4);
++ mask = vorrq_u8(mask, single);
++ narrow = vshrn_n_u16(vreinterpretq_u16_u8(mask), 4);
+ match_mask = ~vget_lane_u64(vreinterpret_u64_u8(narrow), 0);
+ match_len = __builtin_ctzll(match_mask) >> 2;
+ if (match_len != 16) {
+@@ -10096,4 +10096,4 @@
+ }
+
+ return 0;
+-}
+\ No newline at end of file
++}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nodejs.git/commitdiff/2b362ece6b4c77abaadb2c4eaa56459b3df469d3
More information about the pld-cvs-commit
mailing list