Skip to content

Commit 819a2c5

Browse files
committed
add fix for llhttp build failure on armv7hnl
submitted upstream: nodejs/llparse#79 but it does not look like it's gonna be merged any time soon
1 parent 4a9a390 commit 819a2c5

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

llhttp-neon.patch

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--- node-v24.11.0/deps/llhttp/src/llhttp.c.orig 2025-10-28 06:48:10.000000000 +0100
2+
+++ node-v24.11.0/deps/llhttp/src/llhttp.c 2025-10-28 23:17:38.577808680 +0100
3+
@@ -2639,17 +2639,17 @@
4+
/* Find first character that does not match `ranges` */
5+
single = vceqq_u8(input, vdupq_n_u8(0x9));
6+
mask = single;
7+
- single = vandq_u16(
8+
+ single = vandq_u8(
9+
vcgeq_u8(input, vdupq_n_u8(' ')),
10+
vcleq_u8(input, vdupq_n_u8('~'))
11+
);
12+
- mask = vorrq_u16(mask, single);
13+
- single = vandq_u16(
14+
+ mask = vorrq_u8(mask, single);
15+
+ single = vandq_u8(
16+
vcgeq_u8(input, vdupq_n_u8(0x80)),
17+
vcleq_u8(input, vdupq_n_u8(0xff))
18+
);
19+
- mask = vorrq_u16(mask, single);
20+
- narrow = vshrn_n_u16(mask, 4);
21+
+ mask = vorrq_u8(mask, single);
22+
+ narrow = vshrn_n_u16(vreinterpretq_u16_u8(mask), 4);
23+
match_mask = ~vget_lane_u64(vreinterpret_u64_u8(narrow), 0);
24+
match_len = __builtin_ctzll(match_mask) >> 2;
25+
if (match_len != 16) {
26+
@@ -10096,4 +10096,4 @@
27+
}
28+
29+
return 0;
30+
-}
31+
\ No newline at end of file
32+
+}

nodejs.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Patch1: %{name}-lib64path.patch
4242
Patch2: 0001-Remove-unused-OpenSSL-config.patch
4343
Patch3: arm-yield.patch
4444
Patch4: cflags.patch
45+
Patch5: llhttp-neon.patch
4546
URL: https://nodejs.org/
4647
BuildRequires: c-ares-devel >= 1.17.2
4748
BuildRequires: gcc >= 6:6.3
@@ -155,6 +156,7 @@ Ten pakiet zawiera dokumentację Node.js.
155156
%patch -P2 -p1
156157
%patch -P3 -p1
157158
%patch -P4 -p1
159+
%patch -P5 -p1
158160

159161
grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python$,#!%{__python3},'
160162

0 commit comments

Comments
 (0)