summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. S. <schonm@gmail.com>2024-11-01 13:18:40 -0400
committerKhem Raj <raj.khem@gmail.com>2024-11-01 15:53:46 -0700
commit6652b031d7d4d9cabf16d481f3b82115f7d8e15a (patch)
tree5894fb3fc6ca5e02954f8f4755de5d286592f84c
parent1d47796fcf9613e4ca2f2c6beeb6f447d443fca0 (diff)
downloadmeta-openembedded-6652b031d7d4d9cabf16d481f3b82115f7d8e15a.tar.gz
nodejs: upgrade 20.18.0 -> 22.11.0
This moves us from the previous Long Term Support version codenamed 'Iron' to the newly released Long Term Support version 22.11.0 Codename 'Jod' Changelog: https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.11.0 License-Update: Add amaro dependency under MIT License. Add swc dependency under Aapche License Version 2.0. Add simdjson dependency under Apache License Version 2.0. Add on-exit-leak-free under MIT License. Remove ESLint. Remove base64 dependency. Removed patchs: 182d9c05e78.patch - This was a backport to 20.x it is now integrated in 22.x Added patches: Two small patches here to use Bourne Shell instad of BASH. 0001-custom-env.patch 0001-positional-args.patch This patch from https://github.com/nodejs/node/commit/686da19abb that addressed CVE-2024-22017 0001-deps-disable-io_uring-support-in-libuv.patch Other patches were refreshed. Signed-off-by: Jason Schonberg <schonm@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rwxr-xr-xmeta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.11/oe-npm-cache (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.18/oe-npm-cache)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.11.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.18.bb)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch15
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-custom-env.patch18
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch52
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch38
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-positional-args.patch19
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch11
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch182
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch12
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs_20.18.0.bb)12
11 files changed, 136 insertions, 223 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.18/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.11/oe-npm-cache
index eb0f143eae..eb0f143eae 100755
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.18/oe-npm-cache
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.11/oe-npm-cache
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.18.bb b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.11.bb
index d4b818f967..d4b818f967 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.18.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.11.bb
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
index 12f6cd8b96..f692eedd41 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
@@ -1,4 +1,4 @@
1From 7d94bfe53beeb2d25eb5f2ff6b1d509df7e6ab80 Mon Sep 17 00:00:00 2001 1From 689e098cbde130ecde523ae39df3567456271fda Mon Sep 17 00:00:00 2001
2From: Zuzana Svetlikova <zsvetlik@redhat.com> 2From: Zuzana Svetlikova <zsvetlik@redhat.com>
3Date: Thu, 27 Apr 2017 14:25:42 +0200 3Date: Thu, 27 Apr 2017 14:25:42 +0200
4Subject: [PATCH] Disable running gyp on shared deps 4Subject: [PATCH] Disable running gyp on shared deps
@@ -28,19 +28,20 @@ python prune_sources() {
28 shutil.rmtree(d.getVar('S') + '/deps/zlib') 28 shutil.rmtree(d.getVar('S') + '/deps/zlib')
29} 29}
30do_unpack[postfuncs] += "prune_sources" 30do_unpack[postfuncs] += "prune_sources"
31
32--- 31---
33 Makefile | 2 +- 32 Makefile | 2 +-
34 1 file changed, 1 insertion(+), 1 deletion(-) 33 1 file changed, 1 insertion(+), 1 deletion(-)
35 34
35diff --git a/Makefile b/Makefile
36index dba16e5e..da4faffc 100644
36--- a/Makefile 37--- a/Makefile
37+++ b/Makefile 38+++ b/Makefile
38@@ -169,7 +169,7 @@ with-code-cache test-code-cache: 39@@ -173,7 +173,7 @@ with-code-cache test-code-cache:
39 $(warning '$@' target is a noop) 40 $(warning '$@' target is a noop)
40 41
41 out/Makefile: config.gypi common.gypi node.gyp \ 42 out/Makefile: config.gypi common.gypi common_node.gypi node.gyp \
42- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ 43- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
43+ deps/llhttp/llhttp.gyp \ 44+ deps/llhttp/llhttp.gyp \
44 deps/simdutf/simdutf.gyp deps/ada/ada.gyp \ 45 deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
45 tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \ 46 tools/v8_gypfiles/toolchain.gypi \
46 tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp 47 tools/v8_gypfiles/features.gypi \
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-custom-env.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-custom-env.patch
new file mode 100644
index 0000000000..532d3c5f51
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-custom-env.patch
@@ -0,0 +1,18 @@
1From 9c1a31afdcf368f794b9f5378cb3fe759570f905 Mon Sep 17 00:00:00 2001
2From: Jason Schonberg <schonm@gmail.com>
3Date: Tue, 30 Apr 2024 21:48:33 -0400
4Subject: [PATCH] Update to nodejs 22.0.0
5
6Upstream-Status: Inappropriate [embedded specific]
7---
8 test/fixtures/run-script/node_modules/.bin/custom-env | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/test/fixtures/run-script/node_modules/.bin/custom-env b/test/fixtures/run-script/node_modules/.bin/custom-env
12index e6f291c6..1430f2e9 100755
13--- a/test/fixtures/run-script/node_modules/.bin/custom-env
14+++ b/test/fixtures/run-script/node_modules/.bin/custom-env
15@@ -1,2 +1,2 @@
16-#!/bin/bash
17+#!/bin/sh
18 echo "$CUSTOM_ENV"
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
new file mode 100644
index 0000000000..04398ac687
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
@@ -0,0 +1,52 @@
1From 2bb296f169f86dbb04ee47e9a0dc1e3ee13d4f73 Mon Sep 17 00:00:00 2001
2From: Jason Schonberg <schonm@gmail.com>
3Date: Thu, 7 Mar 2024 12:55:56 -0500
4Subject: [PATCH] Update to nodejs 20.11.1
5
6Upstream-Status: Inappropriate [embedded specific]
7---
8 ...ps-disable-io_uring-support-in-libuv.patch | 35 +++++++++++++++++++
9 1 file changed, 35 insertions(+)
10 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
11
12diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
13new file mode 100644
14index 00000000..5ac711fb
15--- /dev/null
16+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
17@@ -0,0 +1,35 @@
18+From 9838be9c710ab4249df86726fa390232a3b6a6e7 Mon Sep 17 00:00:00 2001
19+From: Changqing Li <changqing.li@windriver.com>
20+Date: Fri, 1 Mar 2024 15:46:11 +0800
21+Subject: [PATCH] deps: disable io_uring support in libuv
22+
23+Refer [1], Pseudo fails to intercept some of the syscalls when io_uring
24+enabled. Refer [2], always disable io_uring support in libuv to fix
25+issue in [1].
26+
27+[1] https://git.openembedded.org/meta-openembedded/commit/?id=d08453978c31ee41d28206c6ff198d7d9d701d88
28+[2] https://github.com/nodejs/node/commit/686da19abb
29+
30+Upstream-Status: Inappropriate [oe-specific]
31+
32+Signed-off-by: Changqing Li <changqing.li@windriver.com>
33+---
34+ deps/uv/src/unix/linux.c | 2 +-
35+ 1 file changed, 1 insertion(+), 1 deletion(-)
36+
37+diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c
38+index 0c997185..7508409d 100644
39+--- a/deps/uv/src/unix/linux.c
40++++ b/deps/uv/src/unix/linux.c
41+@@ -433,7 +433,7 @@ static int uv__use_io_uring(void) {
42+ if (use == 0) {
43+ /* Disable io_uring by default due to CVE-2024-22017. */
44+ val = getenv("UV_USE_IO_URING");
45+- use = val != NULL && atoi(val) ? 1 : -1;
46++ use = 0;
47+ atomic_store_explicit(&use_io_uring, use, memory_order_relaxed);
48+ }
49+
50+--
51+2.25.1
52+
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
index 5af87d866e..5e617e6554 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
@@ -1,7 +1,7 @@
1From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001 1From 33393507ba8209f0d6b85b391c525b4c70807275 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 3 Jul 2023 12:33:16 +0000 3Date: Mon, 3 Jul 2023 12:33:16 +0000
4Subject: [PATCH] [liftoff] Correct function signatures 4Subject: [PATCH] Correct function signatures
5 5
6Fixes builds on mips where clang reports an error 6Fixes builds on mips where clang reports an error
7../deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h:661:5: error: no matching member function for call to 'Move' 7../deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h:661:5: error: no matching member function for call to 'Move'
@@ -13,15 +13,15 @@ Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3
13Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> 13Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
14--- 14---
15 deps/v8/src/wasm/baseline/liftoff-assembler.h | 6 +++--- 15 deps/v8/src/wasm/baseline/liftoff-assembler.h | 6 +++---
16 deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | 2 +- 16 .../src/wasm/baseline/mips64/liftoff-assembler-mips64-inl.h | 2 +-
17 deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h | 2 +- 17 .../src/wasm/baseline/riscv/liftoff-assembler-riscv64-inl.h | 2 +-
18 3 files changed, 5 insertions(+), 5 deletions(-) 18 3 files changed, 5 insertions(+), 5 deletions(-)
19 19
20diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h 20diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h
21index aef63c64..f2a11b01 100644 21index 7cb2f500..713d16db 100644
22--- a/deps/v8/src/wasm/baseline/liftoff-assembler.h 22--- a/deps/v8/src/wasm/baseline/liftoff-assembler.h
23+++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h 23+++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h
24@@ -717,7 +717,7 @@ class LiftoffAssembler : public MacroAssembler { 24@@ -681,7 +681,7 @@ class LiftoffAssembler : public MacroAssembler {
25 void FinishCall(const ValueKindSig*, compiler::CallDescriptor*); 25 void FinishCall(const ValueKindSig*, compiler::CallDescriptor*);
26 26
27 // Move {src} into {dst}. {src} and {dst} must be different. 27 // Move {src} into {dst}. {src} and {dst} must be different.
@@ -30,7 +30,7 @@ index aef63c64..f2a11b01 100644
30 30
31 // Parallel register move: For a list of tuples <dst, src, kind>, move the 31 // Parallel register move: For a list of tuples <dst, src, kind>, move the
32 // {src} register of kind {kind} into {dst}. If {src} equals {dst}, ignore 32 // {src} register of kind {kind} into {dst}. If {src} equals {dst}, ignore
33@@ -884,8 +884,8 @@ class LiftoffAssembler : public MacroAssembler { 33@@ -851,8 +851,8 @@ class LiftoffAssembler : public MacroAssembler {
34 inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset, 34 inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
35 ValueKind); 35 ValueKind);
36 36
@@ -41,24 +41,24 @@ index aef63c64..f2a11b01 100644
41 41
42 inline void Spill(int offset, LiftoffRegister, ValueKind); 42 inline void Spill(int offset, LiftoffRegister, ValueKind);
43 inline void Spill(int offset, WasmValue); 43 inline void Spill(int offset, WasmValue);
44diff --git a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h 44diff --git a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64-inl.h b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64-inl.h
45index 96cba24c..53e1842d 100644 45index bd59f162..56b4d70c 100644
46--- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h 46--- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64-inl.h
47+++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h 47+++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64-inl.h
48@@ -592,7 +592,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, 48@@ -672,7 +672,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
49 pinned.set(dst_op.rm()); 49 pinned.set(dst_op.rm());
50 LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); 50 LiftoffRegister tmp = kScratchReg2;
51 // Save original value. 51 // Save original value.
52- Move(tmp, src, type.value_type()); 52- Move(tmp, src, type.value_type());
53+ Move(tmp, src, type.value_type().kind()); 53+ Move(tmp, src, type.value_type().kind());
54 54
55 src = tmp; 55 src = tmp;
56 pinned.set(tmp); 56 pinned.set(tmp);
57diff --git a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h 57diff --git a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64-inl.h b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64-inl.h
58index 1d6ae09e..397e82b2 100644 58index a3c94af0..456e5334 100644
59--- a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h 59--- a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64-inl.h
60+++ b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h 60+++ b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64-inl.h
61@@ -286,7 +286,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, 61@@ -452,7 +452,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
62 pinned.set(dst_op.rm()); 62 pinned.set(dst_op.rm());
63 LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned); 63 LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned);
64 // Save original value. 64 // Save original value.
@@ -67,5 +67,3 @@ index 1d6ae09e..397e82b2 100644
67 67
68 src = tmp; 68 src = tmp;
69 pinned.set(tmp); 69 pinned.set(tmp);
70--
712.40.0
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-positional-args.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-positional-args.patch
new file mode 100644
index 0000000000..5fd6aee351
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-positional-args.patch
@@ -0,0 +1,19 @@
1From 07ee84863fa4a9e4d5f155632478587b0acbf71a Mon Sep 17 00:00:00 2001
2From: Jason Schonberg <schonm@gmail.com>
3Date: Tue, 30 Apr 2024 21:48:33 -0400
4Subject: [PATCH] Update to nodejs 22.0.0
5
6Upstream-Status: Inappropriate [embedded specific]
7---
8 test/fixtures/run-script/node_modules/.bin/positional-args | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/test/fixtures/run-script/node_modules/.bin/positional-args b/test/fixtures/run-script/node_modules/.bin/positional-args
12index 2d809237..3dc5314f 100755
13--- a/test/fixtures/run-script/node_modules/.bin/positional-args
14+++ b/test/fixtures/run-script/node_modules/.bin/positional-args
15@@ -1,3 +1,3 @@
16-#!/bin/bash
17+#!/bin/sh
18 echo "Arguments: '$@'"
19 echo "The total number of arguments are: $#"
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch
index 97ed972cee..cc920118a2 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch
@@ -1,4 +1,4 @@
1From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001 1From afc085af7b6b935a5e14fc3f40db47df02ca3af2 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> 2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
3Date: Sat, 9 Nov 2019 14:45:30 +0000 3Date: Sat, 9 Nov 2019 14:45:30 +0000
4Subject: [PATCH] v8: don't override ARM CFLAGS 4Subject: [PATCH] v8: don't override ARM CFLAGS
@@ -28,10 +28,10 @@ Signed-off-by: André Draszik <git@andred.net>
28 1 file changed, 2 insertions(+), 50 deletions(-) 28 1 file changed, 2 insertions(+), 50 deletions(-)
29 29
30diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi 30diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi
31index 264b3e478e..0b41848145 100644 31index 9d1b0987..4df15e60 100644
32--- a/tools/v8_gypfiles/toolchain.gypi 32--- a/tools/v8_gypfiles/toolchain.gypi
33+++ b/tools/v8_gypfiles/toolchain.gypi 33+++ b/tools/v8_gypfiles/toolchain.gypi
34@@ -211,31 +211,7 @@ 34@@ -203,31 +203,7 @@
35 'target_conditions': [ 35 'target_conditions': [
36 ['_toolset=="host"', { 36 ['_toolset=="host"', {
37 'conditions': [ 37 'conditions': [
@@ -64,7 +64,7 @@ index 264b3e478e..0b41848145 100644
64 # Host not built with an Arm CXX compiler (simulator build). 64 # Host not built with an Arm CXX compiler (simulator build).
65 'conditions': [ 65 'conditions': [
66 [ 'arm_float_abi=="hard"', { 66 [ 'arm_float_abi=="hard"', {
67@@ -254,31 +230,7 @@ 67@@ -246,31 +222,7 @@
68 }], # _toolset=="host" 68 }], # _toolset=="host"
69 ['_toolset=="target"', { 69 ['_toolset=="target"', {
70 'conditions': [ 70 'conditions': [
@@ -97,6 +97,3 @@ index 264b3e478e..0b41848145 100644
97 # Target not built with an Arm CXX compiler (simulator build). 97 # Target not built with an Arm CXX compiler (simulator build).
98 'conditions': [ 98 'conditions': [
99 [ 'arm_float_abi=="hard"', { 99 [ 'arm_float_abi=="hard"', {
100--
1012.20.1
102
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch b/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch
deleted file mode 100644
index 689512cb64..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/182d9c05e78.patch
+++ /dev/null
@@ -1,182 +0,0 @@
1From 182d9c05e78b1ddb1cb8242cd3628a7855a0336f Mon Sep 17 00:00:00 2001
2From: Andrey Kosyakov <caseq@chromium.org>
3Date: Thu, 17 Aug 2023 13:50:11 -0700
4Subject: [PATCH] Define UChar as char16_t
5
6We used to have UChar defined as uint16_t which does not go along
7with STL these days if you try to have an std::basic_string<> of it,
8as there are no standard std::char_traits<> specialization for uint16_t.
9
10This switches UChar to char16_t where practical, introducing a few
11compatibility shims to keep CL size small, as (1) this would likely
12have to be back-ported and (2) crdtp extensively uses uint16_t for
13wide chars.
14
15Bug: b:296390693
16Change-Id: I66a32d8f0050915225b187de56896c26dd76163d
17Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4789966
18Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
19Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
20Auto-Submit: Andrey Kosyakov <caseq@chromium.org>
21Cr-Commit-Position: refs/heads/main@{#89559}
22
23Upstream-Status: Backport [https://chromium-review.googlesource.com/c/v8/v8/+/4789966]
24Signed-off-by: Khem Raj <raj.khem@gmail.com>
25---
26 src/inspector/string-16.cc | 8 +++++++-
27 src/inspector/string-16.h | 10 ++++++++--
28 src/inspector/v8-string-conversions.cc | 6 +++---
29 src/inspector/v8-string-conversions.h | 6 ++++--
30 .../inspector_protocol/crdtp/test_platform_v8.cc | 9 ++++++---
31 5 files changed, 28 insertions(+), 11 deletions(-)
32
33--- a/deps/v8/src/inspector/string-16.cc
34+++ b/deps/v8/src/inspector/string-16.cc
35@@ -27,7 +27,7 @@ bool isSpaceOrNewLine(UChar c) {
36 return isASCII(c) && c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9));
37 }
38
39-int64_t charactersToInteger(const UChar* characters, size_t length,
40+int64_t charactersToInteger(const uint16_t* characters, size_t length,
41 bool* ok = nullptr) {
42 std::vector<char> buffer;
43 buffer.reserve(length + 1);
44@@ -50,6 +50,8 @@ int64_t charactersToInteger(const UChar*
45
46 String16::String16(const UChar* characters, size_t size)
47 : m_impl(characters, size) {}
48+String16::String16(const uint16_t* characters, size_t size)
49+ : m_impl(reinterpret_cast<const UChar*>(characters), size) {}
50
51 String16::String16(const UChar* characters) : m_impl(characters) {}
52
53@@ -241,6 +243,10 @@ String16 String16::fromUTF16LE(const UCh
54 #endif // V8_TARGET_BIG_ENDIAN
55 }
56
57+String16 String16::fromUTF16LE(const uint16_t* stringStart, size_t length) {
58+ return fromUTF16LE(reinterpret_cast<const UChar*>(stringStart), length);
59+}
60+
61 std::string String16::utf8() const {
62 return UTF16ToUTF8(m_impl.data(), m_impl.size());
63 }
64--- a/deps/v8/src/inspector/string-16.h
65+++ b/deps/v8/src/inspector/string-16.h
66@@ -6,6 +6,7 @@
67 #define V8_INSPECTOR_STRING_16_H_
68
69 #include <stdint.h>
70+#include <uchar.h>
71
72 #include <cctype>
73 #include <climits>
74@@ -17,7 +18,7 @@
75
76 namespace v8_inspector {
77
78-using UChar = uint16_t;
79+using UChar = char16_t;
80
81 class String16 {
82 public:
83@@ -27,6 +28,7 @@ class String16 {
84 String16(const String16&) V8_NOEXCEPT = default;
85 String16(String16&&) V8_NOEXCEPT = default;
86 String16(const UChar* characters, size_t size);
87+ String16(const uint16_t* characters, size_t size);
88 V8_EXPORT String16(const UChar* characters);
89 V8_EXPORT String16(const char* characters);
90 String16(const char* characters, size_t size);
91@@ -48,7 +50,9 @@ class String16 {
92 int toInteger(bool* ok = nullptr) const;
93 std::pair<size_t, size_t> getTrimmedOffsetAndLength() const;
94 String16 stripWhiteSpace() const;
95- const UChar* characters16() const { return m_impl.c_str(); }
96+ const uint16_t* characters16() const {
97+ return reinterpret_cast<const uint16_t*>(m_impl.c_str());
98+ }
99 size_t length() const { return m_impl.length(); }
100 bool isEmpty() const { return !m_impl.length(); }
101 UChar operator[](size_t index) const { return m_impl[index]; }
102@@ -78,6 +82,8 @@ class String16 {
103 // On Big endian architectures, byte order needs to be flipped.
104 V8_EXPORT static String16 fromUTF16LE(const UChar* stringStart,
105 size_t length);
106+ V8_EXPORT static String16 fromUTF16LE(const uint16_t* stringStart,
107+ size_t length);
108
109 std::size_t hash() const {
110 if (!hash_code) {
111--- a/deps/v8/src/inspector/v8-string-conversions.cc
112+++ b/deps/v8/src/inspector/v8-string-conversions.cc
113@@ -12,7 +12,7 @@
114
115 namespace v8_inspector {
116 namespace {
117-using UChar = uint16_t;
118+using UChar = char16_t;
119 using UChar32 = uint32_t;
120
121 bool isASCII(UChar c) { return !(c & ~0x7F); }
122@@ -386,7 +386,7 @@ std::string UTF16ToUTF8(const UChar* str
123
124 std::basic_string<UChar> UTF8ToUTF16(const char* stringStart, size_t length) {
125 if (!stringStart || !length) return std::basic_string<UChar>();
126- std::vector<uint16_t> buffer(length);
127+ std::vector<UChar> buffer(length);
128 UChar* bufferStart = buffer.data();
129
130 UChar* bufferCurrent = bufferStart;
131@@ -395,7 +395,7 @@ std::basic_string<UChar> UTF8ToUTF16(con
132 reinterpret_cast<const char*>(stringStart + length),
133 &bufferCurrent, bufferCurrent + buffer.size(), nullptr,
134 true) != conversionOK)
135- return std::basic_string<uint16_t>();
136+ return std::basic_string<UChar>();
137 size_t utf16Length = bufferCurrent - bufferStart;
138 return std::basic_string<UChar>(bufferStart, bufferStart + utf16Length);
139 }
140--- a/deps/v8/src/inspector/v8-string-conversions.h
141+++ b/deps/v8/src/inspector/v8-string-conversions.h
142@@ -5,14 +5,16 @@
143 #ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
144 #define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
145
146+#include <uchar.h>
147+
148 #include <cstdint>
149 #include <string>
150
151 // Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may
152 // want to use string-16.h directly rather than these.
153 namespace v8_inspector {
154-std::basic_string<uint16_t> UTF8ToUTF16(const char* stringStart, size_t length);
155-std::string UTF16ToUTF8(const uint16_t* stringStart, size_t length);
156+std::basic_string<char16_t> UTF8ToUTF16(const char* stringStart, size_t length);
157+std::string UTF16ToUTF8(const char16_t* stringStart, size_t length);
158 } // namespace v8_inspector
159
160 #endif // V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
161--- a/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc
162+++ b/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc
163@@ -11,13 +11,16 @@
164 namespace v8_crdtp {
165
166 std::string UTF16ToUTF8(span<uint16_t> in) {
167- return v8_inspector::UTF16ToUTF8(in.data(), in.size());
168+ return v8_inspector::UTF16ToUTF8(reinterpret_cast<const char16_t*>(in.data()),
169+ in.size());
170 }
171
172 std::vector<uint16_t> UTF8ToUTF16(span<uint8_t> in) {
173- std::basic_string<uint16_t> utf16 = v8_inspector::UTF8ToUTF16(
174+ std::basic_string<char16_t> utf16 = v8_inspector::UTF8ToUTF16(
175 reinterpret_cast<const char*>(in.data()), in.size());
176- return std::vector<uint16_t>(utf16.begin(), utf16.end());
177+ return std::vector<uint16_t>(
178+ reinterpret_cast<const uint16_t*>(utf16.data()),
179+ reinterpret_cast<const uint16_t*>(utf16.data()) + utf16.size());
180 }
181
182 } // namespace v8_crdtp
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch b/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch
index 141889ad23..6f08c71e18 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch
@@ -1,11 +1,19 @@
1keep nodejs compatible with c-ares 1.17.1 1From ce931ad5f5aba60e8e77f39e0af43bce7d25d287 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 4 Mar 2024 11:05:25 -0500
4Subject: [PATCH] keep nodejs compatible with c-ares 1.17.1
2 5
3Upstream-Status: Inappropriate [c-ares specific] 6Upstream-Status: Inappropriate [c-ares specific]
4Signed-off-by: Khem Raj <raj.khem@gmail.com> 7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 src/cares_wrap.h | 10 +++++++++-
10 1 file changed, 9 insertions(+), 1 deletion(-)
5 11
12diff --git a/src/cares_wrap.h b/src/cares_wrap.h
13index 021ef1c9..820c5d88 100644
6--- a/src/cares_wrap.h 14--- a/src/cares_wrap.h
7+++ b/src/cares_wrap.h 15+++ b/src/cares_wrap.h
8@@ -22,7 +22,15 @@ 16@@ -23,7 +23,15 @@
9 # include <netdb.h> 17 # include <netdb.h>
10 #endif // __POSIX__ 18 #endif // __POSIX__
11 19
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_20.18.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb
index cb11ad2965..49a5f350d9 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_20.18.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb
@@ -1,7 +1,7 @@
1DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" 1DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
2HOMEPAGE = "http://nodejs.org" 2HOMEPAGE = "http://nodejs.org"
3LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" 3LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=c83fcdcd43ab352be6429ee1fd8827a0" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=25e89142a2f4b075904a9986c45fbdb2"
5 5
6CVE_PRODUCT = "nodejs node.js" 6CVE_PRODUCT = "nodejs node.js"
7 7
@@ -25,7 +25,9 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
25 file://system-c-ares.patch \ 25 file://system-c-ares.patch \
26 file://0001-liftoff-Correct-function-signatures.patch \ 26 file://0001-liftoff-Correct-function-signatures.patch \
27 file://libatomic.patch \ 27 file://libatomic.patch \
28 file://182d9c05e78.patch \ 28 file://0001-deps-disable-io_uring-support-in-libuv.patch \
29 file://0001-positional-args.patch \
30 file://0001-custom-env.patch \
29 file://run-ptest \ 31 file://run-ptest \
30 " 32 "
31SRC_URI:append:class-target = " \ 33SRC_URI:append:class-target = " \
@@ -34,7 +36,7 @@ SRC_URI:append:class-target = " \
34SRC_URI:append:toolchain-clang:powerpc64le = " \ 36SRC_URI:append:toolchain-clang:powerpc64le = " \
35 file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ 37 file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
36 " 38 "
37SRC_URI[sha256sum] = "7d9433e91fd88d82ba8de86e711ec41907638e227993d22e95126b02f6cd714a" 39SRC_URI[sha256sum] = "bbf0297761d53aefda9d7855c57c7d2c272b83a7b5bad4fea9cb29006d8e1d35"
38 40
39S = "${WORKDIR}/node-v${PV}" 41S = "${WORKDIR}/node-v${PV}"
40 42
@@ -98,7 +100,7 @@ do_unpack[postfuncs] += "prune_sources"
98# 1. If host and target have the different bit width, run those 100# 1. If host and target have the different bit width, run those
99# binaries for the target and run them on the host with QEMU. 101# binaries for the target and run them on the host with QEMU.
100# 2. If host and target have the same bit width, enable upstream 102# 2. If host and target have the same bit width, enable upstream
101# cross crompile support and no QEMU 103# cross compile support and no QEMU
102python do_create_v8_qemu_wrapper () { 104python do_create_v8_qemu_wrapper () {
103 """Creates a small wrapper that invokes QEMU to run some target V8 binaries 105 """Creates a small wrapper that invokes QEMU to run some target V8 binaries
104 on the host.""" 106 on the host."""
@@ -192,7 +194,7 @@ python set_gyp_variables () {
192 d.setVar("LDFLAGS_host", d.getVar("LDFLAGS")) 194 d.setVar("LDFLAGS_host", d.getVar("LDFLAGS"))
193 d.setVar("AR_host", d.getVar("AR")) 195 d.setVar("AR_host", d.getVar("AR"))
194 elif d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": 196 elif d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1":
195 # Enable upstream cross crompile support 197 # Enable upstream cross compile support
196 d.setVar("CC_host", d.getVar("BUILD_CC")) 198 d.setVar("CC_host", d.getVar("BUILD_CC"))
197 d.setVar("CFLAGS_host", d.getVar("BUILD_CFLAGS")) 199 d.setVar("CFLAGS_host", d.getVar("BUILD_CFLAGS"))
198 d.setVar("CXX_host", d.getVar("BUILD_CXX")) 200 d.setVar("CXX_host", d.getVar("BUILD_CXX"))