summaryrefslogtreecommitdiff
path: root/meta-openembedded
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2024-05-26 11:20:28 +0300
committerkx <kx@radix.pro>2024-05-26 11:20:28 +0300
commit958ffed99b5bee6304474d531c943f64023ee6e0 (patch)
tree282a77661dba1dd21d14b7045ffc515f226ba75d /meta-openembedded
parent305f13e20111c63608c4b4dfeea5029a218c8666 (diff)
downloadopenbmc-958ffed99b5bee6304474d531c943f64023ee6e0.tar.xz
Renev versions of cracklib, unzip, perl, rpm, nodejs, util-linux, linxcrypt
Diffstat (limited to 'meta-openembedded')
-rwxr-xr-xmeta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.11/oe-npm-cache (renamed from meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.14/oe-npm-cache)0
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.11.bb (renamed from meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_16.14.bb)0
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch32
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch (renamed from meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch)70
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch55
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch63
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch42
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch34
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch2
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch96
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch151
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch18
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch32
-rwxr-xr-xmeta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest8
-rw-r--r--meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb (renamed from meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb)78
15 files changed, 261 insertions, 420 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.14/oe-npm-cache b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.11/oe-npm-cache
index f596207648..f596207648 100755
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-16.14/oe-npm-cache
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.11/oe-npm-cache
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_16.14.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.11.bb
index a61dd5018f..a61dd5018f 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_16.14.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.11.bb
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
index d6e439ba22..12f6cd8b96 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
@@ -3,20 +3,44 @@ 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:
+https://github.com/alpinelinux/aports/commit/6662eb3199902e8451fb20dce82554ad96f796bb
+
+We also explicitly prune some dependencies from source in the bitbake recipe:
+
+python prune_sources() {
+ import shutil
+
+ shutil.rmtree(d.getVar('S') + '/deps/openssl')
+ if 'ares' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/cares')
+ if 'brotli' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/brotli')
+ if 'libuv' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/uv')
+ if 'nghttp2' in d.getVar('PACKAGECONFIG'):
+ shutil.rmtree(d.getVar('S') + '/deps/nghttp2')
+ if 'zlib' in d.getVar('PACKAGECONFIG'):
+ 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 93d63110..79caaec2 100644
--- a/Makefile
+++ b/Makefile
-@@ -138,7 +138,7 @@ with-code-cache test-code-cache:
+@@ -169,7 +169,7 @@ with-code-cache test-code-cache:
$(warning '$@' target is a noop)
out/Makefile: config.gypi common.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 \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
- $(PYTHON) tools/gyp_node.py -f make
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch
index 8db1f1dd54..0178cec777 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch
@@ -3,29 +3,50 @@ From: Guillaume Burel <guillaume.burel@stormshield.eu>
Date: Fri, 3 Jan 2020 11:25:54 +0100
Subject: [PATCH] Using native binaries
+Upstream-Status: Inappropriate [embedded specific]
+
+Originally added in:
+https://git.openembedded.org/meta-openembedded/commit/?id=1c8e4a679ae382f953b2e5c7a4966a4646314f3e
+later extended and renamed in:
+https://git.openembedded.org/meta-openembedded/commit/?id=feeb172d1a8bf010490d22b8df9448b20d9d2aed
+
+Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
---
- node.gyp | 4 ++--
- tools/v8_gypfiles/v8.gyp | 11 ++++-------
- 2 files changed, 6 insertions(+), 9 deletions(-)
+ node.gyp | 3 +
+ tools/v8_gypfiles/v8.gyp | 5 +++++
+ 2 files changed, 6 insertions(+)
+diff --git a/node.gyp b/node.gyp
+index e8e1d9f9..e60ccc10 100644
--- a/node.gyp
+++ b/node.gyp
-@@ -294,6 +294,7 @@
- 'action_name': 'run_mkcodecache',
- 'process_outputs_as_sources': 1,
- 'inputs': [
-+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
- '<(mkcodecache_exec)',
- ],
- 'outputs': [
-@@ -319,6 +320,7 @@
- 'action_name': 'node_mksnapshot',
- 'process_outputs_as_sources': 1,
- 'inputs': [
-+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
- '<(node_mksnapshot_exec)',
- ],
- 'outputs': [
+@@ -320,6 +320,7 @@
+ 'action_name': 'node_mksnapshot',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(node_mksnapshot_exec)',
+ '<(node_snapshot_main)',
+ ],
+@@ -935,6 +935,7 @@
+ 'action_name': 'node_js2c',
+ 'process_outputs_as_sources': 1,
+ 'inputs': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(node_js2c_exec)',
+ '<@(library_files)',
+ '<@(deps_files)',
+@@ -944,6 +945,7 @@
+ '<(SHARED_INTERMEDIATE_DIR)/node_javascript.cc',
+ ],
+ 'action': [
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
+ '<(node_js2c_exec)',
+ '<@(_outputs)',
+ 'lib',
+
+diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
+index 42e26cd9..bc721991 100644
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -68,6 +68,7 @@
@@ -40,11 +61,11 @@ Subject: [PATCH] Using native binaries
'<@(torque_outputs_inc)',
],
'action': [
-+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
++ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)',
'-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated',
'-v8-root', '<(V8_ROOT)',
-@@ -225,6 +227,7 @@
+@@ -211,6 +213,7 @@
{
'action_name': 'generate_bytecode_builtins_list_action',
'inputs': [
@@ -52,7 +73,7 @@ Subject: [PATCH] Using native binaries
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)',
],
'outputs': [
-@@ -415,6 +418,7 @@
+@@ -400,6 +403,7 @@
],
},
'inputs': [
@@ -60,7 +81,7 @@ Subject: [PATCH] Using native binaries
'<(mksnapshot_exec)',
],
'outputs': [
-@@ -1548,6 +1552,7 @@
+@@ -1539,6 +1543,7 @@
{
'action_name': 'run_gen-regexp-special-case_action',
'inputs': [
@@ -68,3 +89,6 @@ Subject: [PATCH] Using native binaries
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen-regexp-special-case<(EXECUTABLE_SUFFIX)',
],
'outputs': [
+--
+2.34.1
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch
new file mode 100644
index 0000000000..39026d0742
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch
@@ -0,0 +1,55 @@
+From 656f6c91f1da7f1e1ffb01e2de7d9026a84958b5 Mon Sep 17 00:00:00 2001
+From: Luigi Pinca <luigipinca@gmail.com>
+Date: Wed, 8 Nov 2023 21:20:53 +0100
+Subject: [PATCH] build: fix build with Python 3.12
+
+Replace `distutils.version.StrictVersion` with
+`packaging.version.Version`.
+
+Refs: https://github.com/nodejs/node/pull/50209#issuecomment-1795852539
+PR-URL: https://github.com/nodejs/node/pull/50582
+Reviewed-By: Richard Lau <rlau@redhat.com>
+Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
+
+Upstream-Status: Backport [https://github.com/nodejs/node/commit/95534ad82f4e33f53fd50efe633d43f8da70cba6]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ configure.py | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index 62f041ce..18fe7c14 100755
+--- a/configure.py
++++ b/configure.py
+@@ -14,8 +14,6 @@ import bz2
+ import io
+ from pathlib import Path
+
+-from distutils.version import StrictVersion
+-
+ # If not run from node/, cd to node/.
+ os.chdir(Path(__file__).parent)
+
+@@ -30,6 +28,7 @@ tools_path = Path('tools')
+
+ sys.path.insert(0, str(tools_path / 'gyp' / 'pylib'))
+ from gyp.common import GetFlavor
++from packaging.version import Version
+
+ # imports in tools/configure.d
+ sys.path.insert(0, str(tools_path / 'configure.d'))
+@@ -1565,10 +1564,10 @@ def configure_openssl(o):
+ # supported asm compiler for AVX2. See https://github.com/openssl/openssl/
+ # blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69
+ openssl110_asm_supported = \
+- ('gas_version' in variables and StrictVersion(variables['gas_version']) >= StrictVersion('2.23')) or \
+- ('xcode_version' in variables and StrictVersion(variables['xcode_version']) >= StrictVersion('5.0')) or \
+- ('llvm_version' in variables and StrictVersion(variables['llvm_version']) >= StrictVersion('3.3')) or \
+- ('nasm_version' in variables and StrictVersion(variables['nasm_version']) >= StrictVersion('2.10'))
++ ('gas_version' in variables and Version(variables['gas_version']) >= Version('2.23')) or \
++ ('xcode_version' in variables and Version(variables['xcode_version']) >= Version('5.0')) or \
++ ('llvm_version' in variables and Version(variables['llvm_version']) >= Version('3.3')) or \
++ ('nasm_version' in variables and Version(variables['nasm_version']) >= Version('2.10'))
+
+ if is_x86 and not openssl110_asm_supported:
+ error('''Did not find a new enough assembler, install one or build with
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch
new file mode 100644
index 0000000000..9d878dfb8d
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch
@@ -0,0 +1,63 @@
+From bf8c96ba6936050ed4a0de5bc8aeeaf2b3c50dc1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Thu, 7 Dec 2023 12:54:30 +0100
+Subject: [PATCH] gyp: resolve python 3.12 issues
+
+Upstream has updated gyp wholesale in the main branch, so
+this patch can be dropped in due time.
+
+Upstream-Status: Inappropriate [issue will be fixed upstream with the next nodejs LTS update]
+
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py | 4 ++--
+ tools/gyp/pylib/gyp/input.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
+index d9699a0a..173e9465 100644
+--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
++++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
+@@ -16,7 +16,7 @@ import subprocess
+ import sys
+ import threading
+ import traceback
+-from distutils.version import StrictVersion
++from packaging.version import Version
+ from gyp.common import GypError
+ from gyp.common import OrderedSet
+
+@@ -1183,7 +1183,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil
+ else:
+ ast_code = compile(cond_expr_expanded, "<string>", "eval")
+ cached_conditions_asts[cond_expr_expanded] = ast_code
+- env = {"__builtins__": {}, "v": StrictVersion}
++ env = {"__builtins__": {}, "v": Version}
+ if eval(ast_code, env, variables):
+ return true_dict
+ return false_dict
+diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py
+index 354958bf..ab6112e5 100644
+--- a/tools/gyp/pylib/gyp/input.py
++++ b/tools/gyp/pylib/gyp/input.py
+@@ -16,7 +16,7 @@ import subprocess
+ import sys
+ import threading
+ import traceback
+-from distutils.version import StrictVersion
++from packaging.version import Version
+ from gyp.common import GypError
+ from gyp.common import OrderedSet
+
+@@ -1190,7 +1190,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil
+ else:
+ ast_code = compile(cond_expr_expanded, "<string>", "eval")
+ cached_conditions_asts[cond_expr_expanded] = ast_code
+- env = {"__builtins__": {}, "v": StrictVersion}
++ env = {"__builtins__": {}, "v": Version}
+ if eval(ast_code, env, variables):
+ return true_dict
+ return false_dict
+--
+2.39.2
+
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
index d7005ae972..5af87d866e 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
@@ -1,6 +1,6 @@
From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 20 Oct 2021 12:49:58 -0700
+Date: Mon, 3 Jul 2023 12:33:16 +0000
Subject: [PATCH] [liftoff] Correct function signatures
Fixes builds on mips where clang reports an error
@@ -9,14 +9,19 @@ Fixes builds on mips where clang reports an error
^~~~
Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3235674]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
---
- src/wasm/baseline/liftoff-assembler.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ deps/v8/src/wasm/baseline/liftoff-assembler.h | 6 +++---
+ deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | 2 +-
+ deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h
+index aef63c64..f2a11b01 100644
--- a/deps/v8/src/wasm/baseline/liftoff-assembler.h
+++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h
-@@ -613,7 +613,7 @@ class LiftoffAssembler : public TurboAss
+@@ -717,7 +717,7 @@ class LiftoffAssembler : public MacroAssembler {
void FinishCall(const ValueKindSig*, compiler::CallDescriptor*);
// Move {src} into {dst}. {src} and {dst} must be different.
@@ -25,7 +30,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
// Parallel register move: For a list of tuples <dst, src, kind>, move the
// {src} register of kind {kind} into {dst}. If {src} equals {dst}, ignore
-@@ -759,8 +759,8 @@ class LiftoffAssembler : public TurboAss
+@@ -884,8 +884,8 @@ class LiftoffAssembler : public MacroAssembler {
inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
ValueKind);
@@ -36,20 +41,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
inline void Spill(int offset, LiftoffRegister, ValueKind);
inline void Spill(int offset, WasmValue);
---- a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h
-+++ b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h
-@@ -658,7 +658,7 @@ void LiftoffAssembler::Store(Register ds
- pinned = pinned | LiftoffRegList::ForRegs(dst_op.rm(), src);
- LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned);
- // Save original value.
-- Move(tmp, src, type.value_type());
-+ Move(tmp, src, type.value_type().kind());
-
- src = tmp;
- pinned.set(tmp);
+diff --git a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h
+index 96cba24c..53e1842d 100644
--- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h
+++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h
-@@ -596,7 +596,7 @@ void LiftoffAssembler::Store(Register ds
+@@ -592,7 +592,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
pinned.set(dst_op.rm());
LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned);
// Save original value.
@@ -58,9 +54,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
src = tmp;
pinned.set(tmp);
---- a/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h
-+++ b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h
-@@ -580,7 +580,7 @@ void LiftoffAssembler::Store(Register ds
+diff --git a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h
+index 1d6ae09e..397e82b2 100644
+--- a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h
++++ b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h
+@@ -286,7 +286,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
pinned.set(dst_op.rm());
LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned);
// Save original value.
@@ -69,3 +67,5 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
src = tmp;
pinned.set(tmp);
+--
+2.40.0
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch
deleted file mode 100644
index a0242d8e18..0000000000
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From e65dde8db17da5acddeef7eb9316199c4e5e0811 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 19 Apr 2022 12:40:25 -0700
-Subject: [PATCH] mips: Use 32bit cast for operand on mips32
-
-Fixes
-deps/v8/src/compiler/backend/mips/code-generator-mips.cc: In member function 'void v8::internal::compiler::CodeGenerator::AssembleReturn(v8::internal::compiler::InstructionOperand*)':
-../deps/v8/src/compiler/backend/mips/code-generator-mips.cc:4233:48: error: call of overloaded 'Operand(int64_t)' is ambiguous
- 4233 | Operand(static_cast<int64_t>(0)));
- | ^
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- deps/v8/src/compiler/backend/mips/code-generator-mips.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc
-index 2b8197e..b226140 100644
---- a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc
-+++ b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc
-@@ -4230,7 +4230,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
- } else if (FLAG_debug_code) {
- __ Assert(eq, AbortReason::kUnexpectedAdditionalPopValue,
- g.ToRegister(additional_pop_count),
-- Operand(static_cast<int64_t>(0)));
-+ Operand(static_cast<int32_t>(0)));
- }
- }
- // Functions with JS linkage have at least one parameter (the receiver).
---
-2.36.0
-
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch
index 4773f05109..dd9c9015e2 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch
@@ -7,6 +7,8 @@ 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(-)
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch
deleted file mode 100644
index 5cb2e97015..0000000000
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Install-both-binaries-and-use-libdir.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 62ddf8499747fb1e366477d666c0634ad50039a9 Mon Sep 17 00:00:00 2001
-From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
-Date: Tue, 19 Mar 2019 23:22:40 -0400
-Subject: [PATCH 2/2] Install both binaries and use libdir.
-
-This allows us to build with a shared library for other users while
-still providing the normal executable.
-
-Taken from - https://src.fedoraproject.org/rpms/nodejs/raw/rawhide/f/0002-Install-both-binaries-and-use-libdir.patch
-
-Upstream-Status: Pending
-
-Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
-Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.py | 7 +++++++
- tools/install.py | 21 +++++++++------------
- 2 files changed, 16 insertions(+), 12 deletions(-)
-
-diff --git a/configure.py b/configure.py
-index 6efb98c2316f089f3167e486282593245373af3f..a6d2ec939e4480dfae703f3978067537abf9f0f0 100755
---- a/configure.py
-+++ b/configure.py
-@@ -721,10 +721,16 @@ parser.add_argument('--shared',
- dest='shared',
- default=None,
- help='compile shared library for embedding node in another project. ' +
- '(This mode is not officially supported for regular applications)')
-
-+parser.add_argument('--libdir',
-+ action='store',
-+ dest='libdir',
-+ default='lib',
-+ help='a directory to install the shared library into')
-+
- parser.add_argument('--without-v8-platform',
- action='store_true',
- dest='without_v8_platform',
- default=False,
- help='do not initialize v8 platform during node.js startup. ' +
-@@ -1305,10 +1311,11 @@ def configure_node(o):
- o['variables']['debug_nghttp2'] = 'false'
-
- o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
-
- o['variables']['node_shared'] = b(options.shared)
-+ o['variables']['libdir'] = options.libdir
- node_module_version = getmoduleversion.get_version()
-
- if options.dest_os == 'android':
- shlib_suffix = 'so'
- elif sys.platform == 'darwin':
-diff --git a/tools/install.py b/tools/install.py
-index 41cc1cbc60a9480cc08df3aa0ebe582c2becc3a2..11208f9e7166ab60da46d5ace2257c239a7e9263 100755
---- a/tools/install.py
-+++ b/tools/install.py
-@@ -128,26 +128,23 @@ def subdir_files(path, dest, action):
- for subdir, files_in_path in ret.items():
- action(files_in_path, subdir + '/')
-
- def files(action):
- is_windows = sys.platform == 'win32'
-- output_file = 'node'
- output_prefix = 'out/Release/'
-+ output_libprefix = output_prefix
-
-- if 'false' == variables.get('node_shared'):
-- if is_windows:
-- output_file += '.exe'
-+ if is_windows:
-+ output_bin = 'node.exe'
-+ output_lib = 'node.dll'
- else:
-- if is_windows:
-- output_file += '.dll'
-- else:
-- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
-+ output_bin = 'node'
-+ output_lib = 'libnode.' + variables.get('shlib_suffix')
-
-- if 'false' == variables.get('node_shared'):
-- action([output_prefix + output_file], 'bin/' + output_file)
-- else:
-- action([output_prefix + output_file], 'lib/' + output_file)
-+ action([output_prefix + output_bin], 'bin/' + output_bin)
-+ if 'true' == variables.get('node_shared'):
-+ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib)
-
- if 'true' == variables.get('node_use_dtrace'):
- action(['out/Release/node.d'], 'lib/dtrace/node.d')
-
- # behave similarly for systemtap
---
-2.33.0
-
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch
deleted file mode 100644
index 4d238c03f4..0000000000
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0005-add-openssl-legacy-provider-option.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From 86d1c0cc6a5dcf57e413a1cc1c29203e87cf9a14 Mon Sep 17 00:00:00 2001
-From: Daniel Bevenius <daniel.bevenius@gmail.com>
-Date: Sat, 16 Oct 2021 08:50:16 +0200
-Subject: [PATCH] src: add --openssl-legacy-provider option
-
-This commit adds an option to Node.js named --openssl-legacy-provider
-and if specified will load OpenSSL 3.0 Legacy provider.
-
-$ ./node --help
-...
---openssl-legacy-provider enable OpenSSL 3.0 legacy provider
-
-Example usage:
-
-$ ./node --openssl-legacy-provider -p 'crypto.createHash("md4")'
-Hash {
- _options: undefined,
- [Symbol(kHandle)]: Hash {},
- [Symbol(kState)]: { [Symbol(kFinalized)]: false }
-}
-
-Co-authored-by: Richard Lau <rlau@redhat.com>
-Signed-off-by: Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
-Upstream-Status: Backport [https://github.com/nodejs/node/issues/40455]
----
- doc/api/cli.md | 10 ++++++++++
- src/crypto/crypto_util.cc | 10 ++++++++++
- src/node_options.cc | 10 ++++++++++
- src/node_options.h | 7 +++++++
- .../test-process-env-allowed-flags-are-documented.js | 5 +++++
- 5 files changed, 42 insertions(+)
-
-diff --git a/doc/api/cli.md b/doc/api/cli.md
-index 74057706bf8d..608b9cdeddf1 100644
---- a/doc/api/cli.md
-+++ b/doc/api/cli.md
-@@ -687,6 +687,14 @@ Load an OpenSSL configuration file on startup. Among other uses, this can be
- used to enable FIPS-compliant crypto if Node.js is built
- against FIPS-enabled OpenSSL.
-
-+### `--openssl-legacy-provider`
-+<!-- YAML
-+added: REPLACEME
-+-->
-+
-+Enable OpenSSL 3.0 legacy provider. For more information please see
-+[providers readme][].
-+
- ### `--pending-deprecation`
-
- <!-- YAML
-@@ -1544,6 +1552,7 @@ Node.js options that are allowed are:
- * `--no-warnings`
- * `--node-memory-debug`
- * `--openssl-config`
-+* `--openssl-legacy-provider`
- * `--pending-deprecation`
- * `--policy-integrity`
- * `--preserve-symlinks-main`
-@@ -1933,6 +1942,7 @@ $ node --max-old-space-size=1536 index.js
- [emit_warning]: process.md#processemitwarningwarning-options
- [jitless]: https://v8.dev/blog/jitless
- [libuv threadpool documentation]: https://docs.libuv.org/en/latest/threadpool.html
-+[providers readme]: https://github.com/openssl/openssl/blob/openssl-3.0.0/README-PROVIDERS.md
- [remote code execution]: https://www.owasp.org/index.php/Code_Injection
- [security warning]: #warning-binding-inspector-to-a-public-ipport-combination-is-insecure
- [timezone IDs]: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
-diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
-index 7e0c8ba3eb60..796ea3025e41 100644
---- a/src/crypto/crypto_util.cc
-+++ b/src/crypto/crypto_util.cc
-@@ -148,6 +148,16 @@ void InitCryptoOnce() {
- }
- #endif
-
-+#if OPENSSL_VERSION_MAJOR >= 3
-+ // --openssl-legacy-provider
-+ if (per_process::cli_options->openssl_legacy_provider) {
-+ OSSL_PROVIDER* legacy_provider = OSSL_PROVIDER_load(nullptr, "legacy");
-+ if (legacy_provider == nullptr) {
-+ fprintf(stderr, "Unable to load legacy provider.\n");
-+ }
-+ }
-+#endif
-+
- OPENSSL_init_ssl(0, settings);
- OPENSSL_INIT_free(settings);
- settings = nullptr;
-diff --git a/src/node_options.cc b/src/node_options.cc
-index 00bdc6688a4c..3363860919a9 100644
---- a/src/node_options.cc
-+++ b/src/node_options.cc
-@@ -4,6 +4,9 @@
- #include "env-inl.h"
- #include "node_binding.h"
- #include "node_internals.h"
-+#if HAVE_OPENSSL
-+#include "openssl/opensslv.h"
-+#endif
-
- #include <errno.h>
- #include <sstream>
-diff --git a/src/node_options.h b/src/node_options.h
-index fd772478d04d..1c0e018ab16f 100644
---- a/src/node_options.h
-+++ b/src/node_options.h
-@@ -11,6 +11,10 @@
- #include "node_mutex.h"
- #include "util.h"
-
-+#if HAVE_OPENSSL
-+#include "openssl/opensslv.h"
-+#endif
-+
- namespace node {
-
- class HostPort {
-@@ -251,6 +255,9 @@ class PerProcessOptions : public Options {
- bool enable_fips_crypto = false;
- bool force_fips_crypto = false;
- #endif
-+#if OPENSSL_VERSION_MAJOR >= 3
-+ bool openssl_legacy_provider = false;
-+#endif
-
- // Per-process because reports can be triggered outside a known V8 context.
- bool report_on_fatalerror = false;
-diff --git a/test/parallel/test-process-env-allowed-flags-are-documented.js b/test/parallel/test-process-env-allowed-flags-are-documented.js
-index 64626b71f019..8a4e35997907 100644
---- a/test/parallel/test-process-env-allowed-flags-are-documented.js
-+++ b/test/parallel/test-process-env-allowed-flags-are-documented.js
-@@ -43,6 +43,10 @@ for (const line of [...nodeOptionsLines, ...v8OptionsLines]) {
- }
- }
-
-+if (!common.hasOpenSSL3) {
-+ documented.delete('--openssl-legacy-provider');
-+}
-+
- // Filter out options that are conditionally present.
- const conditionalOpts = [
- {
-@@ -50,6 +54,7 @@ const conditionalOpts = [
- filter: (opt) => {
- return [
- '--openssl-config',
-+ common.hasOpenSSL3 ? '--openssl-legacy-provider' : '',
- '--tls-cipher-list',
- '--use-bundled-ca',
- '--use-openssl-ca',
-
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch
deleted file mode 100644
index 529381842f..0000000000
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-
-https://github.com/v8/v8/commit/878ccb33bd3cf0e6dc018ff8d15843f585ac07be
-
-did some automated cleanups but it missed big-endian code.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/deps/v8/src/runtime/runtime-utils.h
-+++ b/deps/v8/src/runtime/runtime-utils.h
-@@ -126,7 +126,7 @@ static inline ObjectPair MakePair(Object
- #if defined(V8_TARGET_LITTLE_ENDIAN)
- return x.ptr() | (static_cast<ObjectPair>(y.ptr()) << 32);
- #elif defined(V8_TARGET_BIG_ENDIAN)
-- return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32);
-+ return y.ptr() | (static_cast<ObjectPair>(x.ptr()) << 32);
- #else
- #error Unknown endianness
- #endif
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch
deleted file mode 100644
index 56e93c50cf..0000000000
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-less-memory.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Description: mksnapshot uses too much memory on 32-bit mipsel
-Author: Jérémy Lal <kapouer@melix.org>
-Last-Update: 2020-06-03
-Forwarded: https://bugs.chromium.org/p/v8/issues/detail?id=10586
-
-This ensures that we reserve 500M instead of 2G range for codegen
-ensures that qemu-mips can allocate such large ranges
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
---- a/deps/v8/src/common/globals.h
-+++ b/deps/v8/src/common/globals.h
-@@ -224,7 +224,7 @@ constexpr size_t kMinimumCodeRangeSize =
- constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux
- #elif V8_TARGET_ARCH_MIPS
- constexpr bool kPlatformRequiresCodeRange = false;
--constexpr size_t kMaximalCodeRangeSize = 2048LL * MB;
-+constexpr size_t kMaximalCodeRangeSize = 512 * MB;
- constexpr size_t kMinimumCodeRangeSize = 0 * MB;
- constexpr size_t kMinExpectedOSPageSize = 4 * KB; // OS page.
- #else
---- a/deps/v8/src/codegen/mips/constants-mips.h
-+++ b/deps/v8/src/codegen/mips/constants-mips.h
-@@ -140,7 +140,7 @@ const uint32_t kLeastSignificantByteInIn
- namespace v8 {
- namespace internal {
-
--constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096;
-+constexpr size_t kMaxPCRelativeCodeRangeInMB = 1024;
-
- // -----------------------------------------------------------------------------
- // Registers and FPURegisters.
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest
new file mode 100755
index 0000000000..e82f373626
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+./cctest
+if [ $? = 0 ]; then
+ echo "PASS: nodejs"
+else
+ echo "FAIL: nodejs"
+fi
diff --git a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb
index 62188f94a7..9a61cfcf71 100644
--- a/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_16.14.2.bb
+++ b/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_20.11.1.bb
@@ -1,13 +1,15 @@
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
HOMEPAGE = "http://nodejs.org"
-LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=6ba5b21ac7a505195ca69344d3d7a94a"
+LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=78ad16dab3c1d15d4878c81770be0be7"
-DEPENDS = "openssl"
+CVE_PRODUCT = "nodejs node.js"
+
+DEPENDS = "openssl file-replacement-native python3-packaging-native"
DEPENDS:append:class-target = " qemu-native"
DEPENDS:append:class-native = " c-ares-native"
-inherit pkgconfig python3native qemu
+inherit pkgconfig python3native qemu ptest
COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*"
COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*"
@@ -19,17 +21,14 @@ COMPATIBLE_HOST:powerpc = "null"
SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
- file://0002-Install-both-binaries-and-use-libdir.patch \
file://0004-v8-don-t-override-ARM-CFLAGS.patch \
- file://0005-add-openssl-legacy-provider-option.patch \
- file://big-endian.patch \
- file://mips-less-memory.patch \
file://system-c-ares.patch \
file://0001-liftoff-Correct-function-signatures.patch \
- file://0001-mips-Use-32bit-cast-for-operand-on-mips32.patch \
+ file://run-ptest \
"
+
SRC_URI:append:class-target = " \
- file://0002-Using-native-binaries.patch \
+ file://0001-Using-native-binaries.patch \
"
SRC_URI:append:toolchain-clang:x86 = " \
file://libatomic.patch \
@@ -37,10 +36,12 @@ SRC_URI:append:toolchain-clang:x86 = " \
SRC_URI:append:toolchain-clang:powerpc64le = " \
file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
"
-SRC_URI[sha256sum] = "e922e215cc68eb5f94d33e8a0b61e2c863b7731cc8600ab955d3822da90ff8d1"
+SRC_URI[sha256sum] = "77813edbf3f7f16d2d35d3353443dee4e61d5ee84d9e3138c7538a3c0ca5209e"
S = "${WORKDIR}/node-v${PV}"
+CVE_PRODUCT += "node.js"
+
# v8 errors out if you have set CCACHE
CCACHE = ""
@@ -77,9 +78,9 @@ PACKAGECONFIG[zlib] = "--shared-zlib,,zlib"
# and we need to use the right flags during host compile,
# too.
EXTRA_OEMAKE = "\
- CC.host='${CC}' \
+ CC.host='${CC} -pie -fPIE' \
CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \
- CXX.host='${CXX}' \
+ CXX.host='${CXX} -pie -fPIE' \
CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \
LDFLAGS.host='${LDFLAGS}' \
AR.host='${AR}' \
@@ -87,22 +88,24 @@ EXTRA_OEMAKE = "\
builddir_name=./ \
"
-python do_unpack() {
+EXTRANATIVEPATH += "file-native"
+
+python prune_sources() {
import shutil
- bb.build.exec_func('base_do_unpack', d)
- shutil.rmtree(d.getVar('S') + '/deps/openssl', True)
+ shutil.rmtree(d.getVar('S') + '/deps/openssl')
if 'ares' in d.getVar('PACKAGECONFIG'):
- shutil.rmtree(d.getVar('S') + '/deps/cares', True)
+ shutil.rmtree(d.getVar('S') + '/deps/cares')
if 'brotli' in d.getVar('PACKAGECONFIG'):
- shutil.rmtree(d.getVar('S') + '/deps/brotli', True)
+ shutil.rmtree(d.getVar('S') + '/deps/brotli')
if 'libuv' in d.getVar('PACKAGECONFIG'):
- shutil.rmtree(d.getVar('S') + '/deps/uv', True)
+ shutil.rmtree(d.getVar('S') + '/deps/uv')
if 'nghttp2' in d.getVar('PACKAGECONFIG'):
- shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True)
+ shutil.rmtree(d.getVar('S') + '/deps/nghttp2')
if 'zlib' in d.getVar('PACKAGECONFIG'):
- shutil.rmtree(d.getVar('S') + '/deps/zlib', True)
+ shutil.rmtree(d.getVar('S') + '/deps/zlib')
}
+do_unpack[postfuncs] += "prune_sources"
# V8's JIT infrastructure requires binaries such as mksnapshot and
# mkpeephole to be run in the host during the build. However, these
@@ -115,7 +118,7 @@ python do_create_v8_qemu_wrapper () {
on the host."""
qemu_libdirs = [d.expand('${STAGING_DIR_HOST}${libdir}'),
d.expand('${STAGING_DIR_HOST}${base_libdir}')]
- qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST', True),
+ qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'),
qemu_libdirs)
wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh')
with open(wrapper_path, 'w') as wrapper_file:
@@ -135,24 +138,25 @@ addtask create_v8_qemu_wrapper after do_configure before do_compile
LDFLAGS:append:x86 = " -latomic"
+CROSS_FLAGS = "--cross-compiling"
+CROSS_FLAGS:class-native = "--no-cross-compiling"
+
# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
do_configure () {
- export LD="${CXX}"
GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
# $TARGET_ARCH settings don't match --dest-cpu settings
- python3 configure.py --prefix=${prefix} --cross-compiling \
+ python3 configure.py --verbose --prefix=${prefix} \
--shared-openssl \
- --without-dtrace \
- --without-etw \
--dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
--dest-os=linux \
- --libdir=${D}${libdir} \
+ --libdir=${baselib} \
+ ${CROSS_FLAGS} \
${ARCHFLAGS} \
${PACKAGECONFIG_CONFARGS}
}
do_compile () {
- export LD="${CXX}"
+ install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf
install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh
oe_runmake BUILDTYPE=Release
}
@@ -161,22 +165,14 @@ do_install () {
oe_runmake install DESTDIR=${D}
}
-BINARIES = " \
- bytecode_builtins_list_generator \
- ${@bb.utils.contains('PACKAGECONFIG', 'icu', 'gen-regexp-special-case', '', d)} \
- mkcodecache \
- node_mksnapshot \
- torque \
-"
-
-do_install:append:class-native() {
- # Install the native binaries to provide it within sysroot for the target compilation
- install -d ${D}${bindir}
- (cd ${S}/out/Release && install ${BINARIES} ${D}${bindir})
+do_install_ptest () {
+ cp -r ${B}/out/Release/cctest ${D}${PTEST_PATH}/
+ cp -r ${B}/test ${D}${PTEST_PATH}
+ chown -R root:root ${D}${PTEST_PATH}
}
PACKAGES =+ "${PN}-npm"
-FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx"
+FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx ${bindir}/corepack"
RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \
python3-misc python3-multiprocessing"