mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-31 13:20:03 +00:00
nodejs: upgrade 22.22.3 -> 24.16.0 (LTS)
Add Node.js 24.16.0 [1] recipe based on 22.22.3. Patches reviewed against
the 24.15.0 source tree and rebased where needed:
- 0001: rebased for Makefile changes (common_node.gypi removed, line
offsets shifted); merged with Disable-running-gyp-files patch since
both modify the same Makefile hunk. Remove deps/simdutf/simdutf.gyp;
no longer vendored here.
- 0005: rebased for v8.gyp libatomic condition change (clang condition
folded upstream, ppc removed)
- v24.16.0 bumps bundled llhttp to 9.3.1 (LLHTTP_VERSION_MAJOR/MINOR/PATCH
= 9/3/1 in deps/llhttp/include/llhttp.h).
Five patches dropped as no longer needed:
- build-remove-redundant-mXX-flags-for-V8: backport already merged
upstream in Node.js 24
- ppc64-Do-not-use-mminimal-toc-with-clang: Node.js 24 common.gypi
already gates -mminimal-toc behind clang==0
- fix-arm-Neon-intrinsics-types: the v24.16.0 source already uses
vandq_u8/vorrq_u8 and vshrn_n_u16(vreinterpretq_u16_u8(mask), 4).
- detect-aarch64-Neon-correctly: #ifdef __ARM_NEON__ →
#if defined(__ARM_NEON__) || defined(__ARM_NEON) — already present
at lines 13 and 2628.
- llhttp-fix-NEON-header-value-__builtin_ctzll-undefin: wanted the
match_mask == 0 guard around __builtin_ctzll — already present.
"This patch can be dropped when nodejs updates its bundled llhttp
to >= 9.3.1.")
Remaining 9 patches renumbered sequentially 0001-0009. All verified to
apply cleanly against the v24.16.0 source tarball.
NOTE: The "current" release is v26.2.0 [1], but this is not yet an LTS
release. Application stacks frequently lag new releases, so
it makes sense to have support for the v24 LTS release.
[1] https://nodejs.org/en/blog/release/v24.16.0
[2] https://nodejs.org/en/blog/release/v26.2.0
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
+13
-13
@@ -1,10 +1,13 @@
|
||||
// Revert the patch found here https://github.com/nodejs/node/commit/fe1dd26398e1887b96b2dc51ab59371ad4d6bc20?diff=unified&w=0
|
||||
// so that the dependencies are still explicitly enumerated. That way we
|
||||
// can pick and choose which pieces to build and which to use existing system
|
||||
// packages for.
|
||||
|
||||
From 689e098cbde130ecde523ae39df3567456271fda Mon Sep 17 00:00:00 2001
|
||||
From: Zuzana Svetlikova <zsvetlik@redhat.com>
|
||||
Date: Thu, 27 Apr 2017 14:25:42 +0200
|
||||
Subject: [PATCH] Disable running gyp on shared deps
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Probably imported from:
|
||||
https://src.fedoraproject.org/rpms/nodejs/c/41af04f2a3c050fb44628e91ac65fd225b927acb?branch=22609d8c1bfeaa21fe0057645af20b3a2ccc7f53
|
||||
which is probably based on dont-run-gyp-files-for-bundled-deps.patch added in:
|
||||
@@ -28,20 +31,17 @@ python prune_sources() {
|
||||
shutil.rmtree(d.getVar('S') + '/deps/zlib')
|
||||
}
|
||||
do_unpack[postfuncs] += "prune_sources"
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index dba16e5e..da4faffc 100644
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -173,7 +173,7 @@ with-code-cache test-code-cache:
|
||||
@@ -179,7 +179,7 @@ with-code-cache test-code-cache:
|
||||
$(warning '$@' target is a noop)
|
||||
|
||||
out/Makefile: config.gypi common.gypi common_node.gypi node.gyp \
|
||||
- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
|
||||
+ deps/llhttp/llhttp.gyp \
|
||||
deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
|
||||
|
||||
out/Makefile: config.gypi common.gypi node.gyp \
|
||||
- deps/*/*.gyp \
|
||||
+ deps/llhttp/llhttp.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
|
||||
tools/v8_gypfiles/toolchain.gypi \
|
||||
tools/v8_gypfiles/features.gypi \
|
||||
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
|
||||
+15
-16
@@ -23,11 +23,9 @@ Added libatomic library explicitly to x86 targets.
|
||||
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||
---
|
||||
node.gyp | 13 ++++++++++++-
|
||||
tools/v8_gypfiles/v8.gyp | 15 ++++++++++++---
|
||||
2 files changed, 24 insertions(+), 4 deletions(-)
|
||||
tools/v8_gypfiles/v8.gyp | 29 ++++++++++++++++++++++++-----
|
||||
2 files changed, 36 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/node.gyp b/node.gyp
|
||||
index b425f443..f296f35c 100644
|
||||
--- a/node.gyp
|
||||
+++ b/node.gyp
|
||||
@@ -503,7 +503,18 @@
|
||||
@@ -50,37 +48,38 @@ index b425f443..f296f35c 100644
|
||||
}],
|
||||
],
|
||||
},
|
||||
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
|
||||
index b23263cf..dcabf4ca 100644
|
||||
--- a/tools/v8_gypfiles/v8.gyp
|
||||
+++ b/tools/v8_gypfiles/v8.gyp
|
||||
@@ -1348,9 +1348,18 @@
|
||||
@@ -1324,10 +1324,24 @@
|
||||
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
|
||||
# to implement atomic memory access
|
||||
['v8_current_cpu in ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', {
|
||||
# to implement atomic memory access.
|
||||
# Clang needs it for some atomic operations (https://clang.llvm.org/docs/Toolchain.html#atomics-library).
|
||||
- ['(OS=="linux" and clang==1) or (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
|
||||
- 'link_settings': {
|
||||
- 'libraries': ['-latomic', ],
|
||||
- },
|
||||
+ ['(OS=="linux" and clang==1) or \
|
||||
+ (v8_current_cpu in ["mips64", "mips64el", "arm", "riscv64", "loong64"])', {
|
||||
+ 'target_conditions': [
|
||||
+ ['_toolset=="host"', {
|
||||
+ 'conditions': [
|
||||
+ ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', {
|
||||
+ 'libraries': ['-latomic'],
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': ['-latomic'],
|
||||
+ },
|
||||
+ }],
|
||||
+ ],
|
||||
+ }],
|
||||
+ ['_toolset=="target"', {
|
||||
+ 'libraries': ['-latomic', ],
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': ['-latomic', ],
|
||||
+ },
|
||||
+ }],
|
||||
+ ],
|
||||
}],
|
||||
],
|
||||
}, # v8_base_without_compiler
|
||||
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
|
||||
index cb82d4f15bc..65cb123b7bf 100644
|
||||
--- a/tools/v8_gypfiles/v8.gyp
|
||||
+++ b/tools/v8_gypfiles/v8.gyp
|
||||
@@ -1820,6 +1820,13 @@
|
||||
@@ -1793,6 +1805,13 @@
|
||||
['enable_lto=="true"', {
|
||||
'ldflags': [ '-fno-lto' ],
|
||||
}],
|
||||
@@ -1,22 +0,0 @@
|
||||
// Revert the patch found here https://github.com/nodejs/node/commit/fe1dd26398e1887b96b2dc51ab59371ad4d6bc20?diff=unified&w=0
|
||||
// so that the dependencies are still explicitly enumerated. That way we
|
||||
// can pick and choose which pieces to build and which to use existing system
|
||||
// packages for.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
|
||||
--- a/Makefile 2025-01-11 14:37:29.059536707 -0500
|
||||
+++ b/Makefile 2025-01-11 14:39:52.419867046 -0500
|
||||
@@ -171,7 +171,8 @@
|
||||
$(warning '$@' target is a noop)
|
||||
|
||||
out/Makefile: config.gypi common.gypi common_node.gypi node.gyp \
|
||||
- deps/*/*.gyp \
|
||||
+ deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
|
||||
+ deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
|
||||
tools/v8_gypfiles/toolchain.gypi \
|
||||
tools/v8_gypfiles/features.gypi \
|
||||
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
|
||||
|
||||
|
||||
-133
@@ -1,133 +0,0 @@
|
||||
From 403264c02edc2689671dbefaf032e3acb4fb713d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
|
||||
Date: Sat, 19 Apr 2025 12:22:10 +0200
|
||||
Subject: [PATCH] build: remove redundant `-mXX` flags for V8
|
||||
|
||||
They are already set by `common.gypi`.
|
||||
|
||||
|
||||
Needed to build on aarch64 build hosts with clang compiler
|
||||
Drop it when upgrading to 0.24.x or newer.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/nodejs/node/commit/403264c02edc2689671dbefaf032e3acb4fb713d]
|
||||
|
||||
PR-URL: https://github.com/nodejs/node/pull/57907
|
||||
Reviewed-By: James M Snell <jasnell@gmail.com>
|
||||
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
|
||||
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
|
||||
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
|
||||
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
||||
---
|
||||
tools/v8_gypfiles/toolchain.gypi | 91 --------------------------------
|
||||
1 file changed, 91 deletions(-)
|
||||
|
||||
Index: node-v22.16.0/tools/v8_gypfiles/toolchain.gypi
|
||||
===================================================================
|
||||
--- node-v22.16.0.orig/tools/v8_gypfiles/toolchain.gypi
|
||||
+++ node-v22.16.0/tools/v8_gypfiles/toolchain.gypi
|
||||
@@ -103,33 +103,6 @@
|
||||
# Indicates if gcmole tools are downloaded by a hook.
|
||||
'gcmole%': 0,
|
||||
},
|
||||
-
|
||||
- # [GYP] this needs to be outside of the top level 'variables'
|
||||
- 'conditions': [
|
||||
- ['host_arch=="ia32" or host_arch=="x64" or \
|
||||
- host_arch=="ppc" or host_arch=="ppc64" or \
|
||||
- host_arch=="s390x" or \
|
||||
- clang==1', {
|
||||
- 'variables': {
|
||||
- 'host_cxx_is_biarch%': 1,
|
||||
- },
|
||||
- }, {
|
||||
- 'variables': {
|
||||
- 'host_cxx_is_biarch%': 0,
|
||||
- },
|
||||
- }],
|
||||
- ['target_arch=="ia32" or target_arch=="x64" or \
|
||||
- target_arch=="ppc" or target_arch=="ppc64" or \
|
||||
- target_arch=="s390x" or clang==1', {
|
||||
- 'variables': {
|
||||
- 'target_cxx_is_biarch%': 1,
|
||||
- },
|
||||
- }, {
|
||||
- 'variables': {
|
||||
- 'target_cxx_is_biarch%': 0,
|
||||
- },
|
||||
- }],
|
||||
- ],
|
||||
'target_defaults': {
|
||||
'cflags!': ['-Wall', '-Wextra'],
|
||||
'conditions': [
|
||||
@@ -553,71 +526,6 @@
|
||||
'-mmmx', # Allows mmintrin.h for MMX intrinsics.
|
||||
],
|
||||
}],
|
||||
- ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
|
||||
- or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
|
||||
- (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
|
||||
- v8_target_arch=="ppc")', {
|
||||
- 'target_conditions': [
|
||||
- ['_toolset=="host"', {
|
||||
- 'conditions': [
|
||||
- ['host_cxx_is_biarch==1', {
|
||||
- 'conditions': [
|
||||
- ['host_arch=="s390x"', {
|
||||
- 'cflags': [ '-m31' ],
|
||||
- 'ldflags': [ '-m31' ]
|
||||
- },{
|
||||
- 'cflags': [ '-m32' ],
|
||||
- 'ldflags': [ '-m32' ]
|
||||
- }],
|
||||
- ],
|
||||
- }],
|
||||
- ],
|
||||
- 'xcode_settings': {
|
||||
- 'ARCHS': [ 'i386' ],
|
||||
- },
|
||||
- }],
|
||||
- ['_toolset=="target"', {
|
||||
- 'conditions': [
|
||||
- ['target_cxx_is_biarch==1', {
|
||||
- 'conditions': [
|
||||
- ['host_arch=="s390x"', {
|
||||
- 'cflags': [ '-m31' ],
|
||||
- 'ldflags': [ '-m31' ]
|
||||
- },{
|
||||
- 'cflags': [ '-m32' ],
|
||||
- 'ldflags': [ '-m32' ],
|
||||
- }],
|
||||
- ],
|
||||
- }],
|
||||
- ],
|
||||
- 'xcode_settings': {
|
||||
- 'ARCHS': [ 'i386' ],
|
||||
- },
|
||||
- }],
|
||||
- ],
|
||||
- }],
|
||||
- ['(OS=="linux" or OS=="android") and \
|
||||
- (v8_target_arch=="x64" or v8_target_arch=="arm64" or \
|
||||
- v8_target_arch=="ppc64" or v8_target_arch=="s390x")', {
|
||||
- 'target_conditions': [
|
||||
- ['_toolset=="host"', {
|
||||
- 'conditions': [
|
||||
- ['host_cxx_is_biarch==1', {
|
||||
- 'cflags': [ '-m64' ],
|
||||
- 'ldflags': [ '-m64' ]
|
||||
- }],
|
||||
- ],
|
||||
- }],
|
||||
- ['_toolset=="target"', {
|
||||
- 'conditions': [
|
||||
- ['target_cxx_is_biarch==1', {
|
||||
- 'cflags': [ '-m64' ],
|
||||
- 'ldflags': [ '-m64' ],
|
||||
- }],
|
||||
- ]
|
||||
- }],
|
||||
- ],
|
||||
- }],
|
||||
['OS=="android" and v8_android_log_stdout==1', {
|
||||
'defines': [
|
||||
'V8_ANDROID_LOG_STDOUT',
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
From 0976af0f3b328436ea44a74a406f311adb2ab211 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 15 Jun 2021 19:01:31 -0700
|
||||
Subject: [PATCH] ppc64: Do not use -mminimal-toc with clang
|
||||
|
||||
clang does not support this option
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
common.gypi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -417,7 +417,7 @@
|
||||
'ldflags': [ '-m32' ],
|
||||
}],
|
||||
[ 'target_arch=="ppc64" and OS!="aix"', {
|
||||
- 'cflags': [ '-m64', '-mminimal-toc' ],
|
||||
+ 'cflags': [ '-m64' ],
|
||||
'ldflags': [ '-m64' ],
|
||||
}],
|
||||
[ 'target_arch=="s390x"', {
|
||||
+11
-23
@@ -1,7 +1,8 @@
|
||||
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
|
||||
HOMEPAGE = "http://nodejs.org"
|
||||
LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0 & BlueOak-1.0.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=b195f4ea4368177a2fd84b879f09cba8"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=9f816753e8bdfe4576cb87159a0cd60c"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/nodejs-24:"
|
||||
|
||||
CVE_PRODUCT = "nodejs node.js"
|
||||
|
||||
@@ -22,24 +23,19 @@ COMPATIBLE_HOST:powerpc64le = "null"
|
||||
|
||||
SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
|
||||
file://0001-Do-not-use-glob-in-deps.patch \
|
||||
file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
|
||||
file://0004-v8-don-t-override-ARM-CFLAGS.patch \
|
||||
file://system-c-ares.patch \
|
||||
file://0001-liftoff-Correct-function-signatures.patch \
|
||||
file://libatomic.patch \
|
||||
file://0001-deps-disable-io_uring-support-in-libuv.patch \
|
||||
file://0001-positional-args.patch \
|
||||
file://0001-custom-env.patch \
|
||||
file://0001-build-remove-redundant-mXX-flags-for-V8.patch \
|
||||
file://0002-v8-don-t-override-ARM-CFLAGS.patch \
|
||||
file://0003-system-c-ares.patch \
|
||||
file://0004-liftoff-Correct-function-signatures.patch \
|
||||
file://0005-libatomic.patch \
|
||||
file://0006-deps-disable-io_uring-support-in-libuv.patch \
|
||||
file://0007-positional-args.patch \
|
||||
file://0008-custom-env.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRC_URI:append:class-target = " \
|
||||
file://0001-Using-native-binaries.patch \
|
||||
file://0009-Using-native-binaries.patch \
|
||||
"
|
||||
SRC_URI:append:toolchain-clang:powerpc64le = " \
|
||||
file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "f3e6a578db1ab335a4a72785c1e87ad18a2cf6d2fc25747a1d741fb34af0bd0f"
|
||||
SRC_URI[sha256sum] = "2ff84a6de70b6165290111b0fc656ded1ad207a799816fe720cc7c31232df30f"
|
||||
|
||||
S = "${UNPACKDIR}/node-v${PV}"
|
||||
|
||||
@@ -211,11 +207,3 @@ python __anonymous () {
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
CVE_STATUS[CVE-2026-21710] = "fixed-version: fixed since v22.22.2"
|
||||
CVE_STATUS[CVE-2026-21712] = "cpe-incorrect: only v24 and v25 are affected"
|
||||
CVE_STATUS[CVE-2026-21713] = "fixed-version: fixed since v22.22.2"
|
||||
CVE_STATUS[CVE-2026-21714] = "fixed-version: fixed since v22.22.2"
|
||||
CVE_STATUS[CVE-2026-21715] = "fixed-version: fixed since v22.22.2"
|
||||
CVE_STATUS[CVE-2026-21716] = "fixed-version: fixed since v22.22.2"
|
||||
CVE_STATUS[CVE-2026-21717] = "fixed-version: fixed since v22.22.2"
|
||||
Reference in New Issue
Block a user