Skip to content

Commit 84cf8d0

Browse files
committed
updpatch: nodejs 23.4.0-1
- Switch compiler to clang, this workarounds https://archriscv.felixc.at/.status/log.htm?url=logs/389-ds-base/389-ds-base-3.1.1-3.log See more details in riscv-forks/electron#7 - Cherry-pick icache flush fix, upstreamed: - nodejs/node#56781 - nodejs/node#56782 - Should still need nocheck
1 parent 93e93db commit 84cf8d0

File tree

1 file changed

+38
-9
lines changed

1 file changed

+38
-9
lines changed

nodejs/riscv64.patch

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,53 @@
11
--- PKGBUILD
22
+++ PKGBUILD
3-
@@ -41,6 +41,12 @@ validpgpkeys=(
4-
'C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C' # Richard Lau <rlau@redhat.com>
3+
@@ -48,15 +48,25 @@ validpgpkeys=(
4+
'C0D6248439F1D5604AAFFB4021D900FFDB233756' # Antoine du Hamel <duhamelantoine1995@gmail.com>
55
)
66

7-
+prepare() {
8-
+ cd node
9-
+ patch -Np1 -i ../fix-trap-handler.patch
10-
+ patch -Np1 -i ../v8-disable-trap-handler.patch
7+
+_set_compilation_env() {
8+
+ # https://github.com/riscv-forks/electron/issues/7
9+
+ export CC=/usr/bin/clang
10+
+ export CXX=/usr/bin/clang++
1111
+}
1212
+
13+
prepare() {
14+
cd node
15+
patch -Np1 -i ../0001-test-make-test-crypto-hash-compatible-with-OpenSSL-3.patch
16+
patch -Np1 -i ../0002-test-adjust-OpenSSL-error-code-for-3.4.0.patch
17+
patch -Np1 -i ../0001-test-disable-openssl-3.4.0-incompatible-tests.patch
18+
+ patch -Np1 -i ../fix-trap-handler.patch
19+
+ patch -Np1 -i ../v8-disable-trap-handler.patch
20+
+ patch -Np1 -d deps/v8 < ../0001-riscv-Flush-icache-in-both-local-and-remote-harts.patch
21+
}
22+
1323
build() {
1424
cd node
25+
+ _set_compilation_env
26+
27+
# /usr/lib/libnode.so uses malloc_usable_size, which is incompatible with fortification level 3
28+
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
29+
@@ -82,6 +92,7 @@ build() {
1530

16-
@@ -77,4 +83,8 @@ package() {
31+
check() {
32+
cd node
33+
+ _set_compilation_env
34+
# Running an individual test: tools/test.py test/parallel/test-tls-psk-circuit.js
35+
# OpenSSL 3.4 broke a few tests in nodejs:
36+
# - https://github.com/nodejs/node/issues/56159
37+
@@ -92,8 +103,16 @@ check() {
38+
39+
package() {
40+
cd node
41+
+ _set_compilation_env
42+
make DESTDIR="$pkgdir" install
1743
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/nodejs/
1844
}
1945

46+
+makedepends+=(clang)
2047
+source+=("fix-trap-handler.patch"
21-
+ "v8-disable-trap-handler.patch")
48+
+ "v8-disable-trap-handler.patch"
49+
+ "https://github.com/riscv-forks/electron/blob/d620bc038f02a412f396bc1bb84ea2bdd4c32114/patches/v8/0001-riscv-Flush-icache-in-both-local-and-remote-harts.patch")
2250
+sha512sums+=('f2ff6da8cf5dcc994a7a20342e2928dc1821fbbf42891009a6234b6051277e0200d7e3fbba63b9a2773887591d0ad5ceb1bb3d25e5efeb557f6d00109a80253c'
23-
+ 'b6495aefd36915969ee848cca350a565317c74864cd33e6a69a310ed9cbc71dfbd91f31e8c6176667f6f72daa1762eb4d519700a024cdbe8b18049100a9e3c80')
51+
+ 'b6495aefd36915969ee848cca350a565317c74864cd33e6a69a310ed9cbc71dfbd91f31e8c6176667f6f72daa1762eb4d519700a024cdbe8b18049100a9e3c80'
52+
+ 'f25b4f57c2623f4c6d7dec2741f3e53e95f34217e012d2a330846ec73bb0d797124ec57e86aa450ba9ee7ad59d19974c81f674eb65dca0deb2ebd5b10f125824')
2453
# vim:set ts=2 sw=2 et:

0 commit comments

Comments
 (0)