diff options
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs')
14 files changed, 296 insertions, 199 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.16/oe-npm-cache index eb0f143eae..eb0f143eae 100755 --- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache +++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.16/oe-npm-cache | |||
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.12.bb b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.16.bb index a61dd5018f..1dcd1f7926 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_20.12.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.16.bb | |||
@@ -8,10 +8,12 @@ SRC_URI = "\ | |||
8 | 8 | ||
9 | inherit native | 9 | inherit native |
10 | 10 | ||
11 | S = "${UNPACKDIR}" | ||
12 | |||
11 | B = "${WORKDIR}/build" | 13 | B = "${WORKDIR}/build" |
12 | 14 | ||
13 | do_configure() { | 15 | do_configure() { |
14 | sed -e 's!@@libdir@@!${libdir}!g' < '${WORKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' | 16 | sed -e 's!@@libdir@@!${libdir}!g' < '${UNPACKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' |
15 | } | 17 | } |
16 | 18 | ||
17 | do_install() { | 19 | do_install() { |
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 @@ | |||
1 | From 7d94bfe53beeb2d25eb5f2ff6b1d509df7e6ab80 Mon Sep 17 00:00:00 2001 | 1 | From 689e098cbde130ecde523ae39df3567456271fda Mon Sep 17 00:00:00 2001 |
2 | From: Zuzana Svetlikova <zsvetlik@redhat.com> | 2 | From: Zuzana Svetlikova <zsvetlik@redhat.com> |
3 | Date: Thu, 27 Apr 2017 14:25:42 +0200 | 3 | Date: Thu, 27 Apr 2017 14:25:42 +0200 |
4 | Subject: [PATCH] Disable running gyp on shared deps | 4 | Subject: [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 | } |
30 | do_unpack[postfuncs] += "prune_sources" | 30 | do_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 | ||
35 | diff --git a/Makefile b/Makefile | ||
36 | index 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-Do-not-use-glob-in-deps.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch new file mode 100644 index 0000000000..551869523e --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | // Revert the patch found here https://github.com/nodejs/node/commit/fe1dd26398e1887b96b2dc51ab59371ad4d6bc20?diff=unified&w=0 | ||
2 | // so that the dependencies are still explicitly enumerated. That way we | ||
3 | // can pick and choose which pieces to build and which to use existing system | ||
4 | // packages for. | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | |||
8 | |||
9 | --- a/Makefile 2025-01-11 14:37:29.059536707 -0500 | ||
10 | +++ b/Makefile 2025-01-11 14:39:52.419867046 -0500 | ||
11 | @@ -171,7 +171,8 @@ | ||
12 | $(warning '$@' target is a noop) | ||
13 | |||
14 | out/Makefile: config.gypi common.gypi common_node.gypi node.gyp \ | ||
15 | - deps/*/*.gyp \ | ||
16 | + deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ | ||
17 | + deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \ | ||
18 | tools/v8_gypfiles/toolchain.gypi \ | ||
19 | tools/v8_gypfiles/features.gypi \ | ||
20 | tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp | ||
21 | |||
22 | |||
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch deleted file mode 100644 index 39026d0742..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-build-with-Python-3.12.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 656f6c91f1da7f1e1ffb01e2de7d9026a84958b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Luigi Pinca <luigipinca@gmail.com> | ||
3 | Date: Wed, 8 Nov 2023 21:20:53 +0100 | ||
4 | Subject: [PATCH] build: fix build with Python 3.12 | ||
5 | |||
6 | Replace `distutils.version.StrictVersion` with | ||
7 | `packaging.version.Version`. | ||
8 | |||
9 | Refs: https://github.com/nodejs/node/pull/50209#issuecomment-1795852539 | ||
10 | PR-URL: https://github.com/nodejs/node/pull/50582 | ||
11 | Reviewed-By: Richard Lau <rlau@redhat.com> | ||
12 | Reviewed-By: Chengzhong Wu <legendecas@gmail.com> | ||
13 | |||
14 | Upstream-Status: Backport [https://github.com/nodejs/node/commit/95534ad82f4e33f53fd50efe633d43f8da70cba6] | ||
15 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
16 | --- | ||
17 | configure.py | 11 +++++------ | ||
18 | 1 file changed, 5 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/configure.py b/configure.py | ||
21 | index 62f041ce..18fe7c14 100755 | ||
22 | --- a/configure.py | ||
23 | +++ b/configure.py | ||
24 | @@ -14,8 +14,6 @@ import bz2 | ||
25 | import io | ||
26 | from pathlib import Path | ||
27 | |||
28 | -from distutils.version import StrictVersion | ||
29 | - | ||
30 | # If not run from node/, cd to node/. | ||
31 | os.chdir(Path(__file__).parent) | ||
32 | |||
33 | @@ -30,6 +28,7 @@ tools_path = Path('tools') | ||
34 | |||
35 | sys.path.insert(0, str(tools_path / 'gyp' / 'pylib')) | ||
36 | from gyp.common import GetFlavor | ||
37 | +from packaging.version import Version | ||
38 | |||
39 | # imports in tools/configure.d | ||
40 | sys.path.insert(0, str(tools_path / 'configure.d')) | ||
41 | @@ -1565,10 +1564,10 @@ def configure_openssl(o): | ||
42 | # supported asm compiler for AVX2. See https://github.com/openssl/openssl/ | ||
43 | # blob/OpenSSL_1_1_0-stable/crypto/modes/asm/aesni-gcm-x86_64.pl#L52-L69 | ||
44 | openssl110_asm_supported = \ | ||
45 | - ('gas_version' in variables and StrictVersion(variables['gas_version']) >= StrictVersion('2.23')) or \ | ||
46 | - ('xcode_version' in variables and StrictVersion(variables['xcode_version']) >= StrictVersion('5.0')) or \ | ||
47 | - ('llvm_version' in variables and StrictVersion(variables['llvm_version']) >= StrictVersion('3.3')) or \ | ||
48 | - ('nasm_version' in variables and StrictVersion(variables['nasm_version']) >= StrictVersion('2.10')) | ||
49 | + ('gas_version' in variables and Version(variables['gas_version']) >= Version('2.23')) or \ | ||
50 | + ('xcode_version' in variables and Version(variables['xcode_version']) >= Version('5.0')) or \ | ||
51 | + ('llvm_version' in variables and Version(variables['llvm_version']) >= Version('3.3')) or \ | ||
52 | + ('nasm_version' in variables and Version(variables['nasm_version']) >= Version('2.10')) | ||
53 | |||
54 | if is_x86 and not openssl110_asm_supported: | ||
55 | error('''Did not find a new enough assembler, install one or build with | ||
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 @@ | |||
1 | From 9c1a31afdcf368f794b9f5378cb3fe759570f905 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Schonberg <schonm@gmail.com> | ||
3 | Date: Tue, 30 Apr 2024 21:48:33 -0400 | ||
4 | Subject: [PATCH] Update to nodejs 22.0.0 | ||
5 | |||
6 | Upstream-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 | |||
11 | diff --git a/test/fixtures/run-script/node_modules/.bin/custom-env b/test/fixtures/run-script/node_modules/.bin/custom-env | ||
12 | index 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..01ae50cdc4 --- /dev/null +++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 79af9bd6ac1040f1fe3c6cab26b2d040ad907870 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 1 Mar 2024 15:46:11 +0800 | ||
4 | Subject: [PATCH] deps: disable io_uring support in libuv | ||
5 | |||
6 | Refer [1], Pseudo fails to intercept some of the syscalls when io_uring | ||
7 | enabled. Refer [2], always disable io_uring support in libuv to fix | ||
8 | issue in [1]. | ||
9 | |||
10 | [1] https://git.openembedded.org/meta-openembedded/commit/?id=d08453978c31ee41d28206c6ff198d7d9d701d88 | ||
11 | [2] https://github.com/nodejs/node/commit/686da19abb | ||
12 | |||
13 | Upstream-Status: Inappropriate [oe specific] | ||
14 | |||
15 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
16 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
17 | --- | ||
18 | deps/uv/src/unix/linux.c | 29 +---------------------------- | ||
19 | 1 file changed, 1 insertion(+), 28 deletions(-) | ||
20 | |||
21 | diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c | ||
22 | index 803a9a9d3f0..a4735f56cf0 100644 | ||
23 | --- a/deps/uv/src/unix/linux.c | ||
24 | +++ b/deps/uv/src/unix/linux.c | ||
25 | @@ -465,34 +465,7 @@ static int uv__use_io_uring(void) { | ||
26 | /* See https://github.com/libuv/libuv/issues/4283. */ | ||
27 | return 0; /* Random SIGSEGV in signal handler. */ | ||
28 | #else | ||
29 | - /* Ternary: unknown=0, yes=1, no=-1 */ | ||
30 | - static _Atomic int use_io_uring; | ||
31 | - char* val; | ||
32 | - int use; | ||
33 | - | ||
34 | - use = atomic_load_explicit(&use_io_uring, memory_order_relaxed); | ||
35 | - | ||
36 | - if (use == 0) { | ||
37 | - use = uv__kernel_version() >= | ||
38 | -#if defined(__hppa__) | ||
39 | - /* io_uring first supported on parisc in 6.1, functional in .51 */ | ||
40 | - /* https://lore.kernel.org/all/cb912694-b1fe-dbb0-4d8c-d608f3526905@gmx.de/ */ | ||
41 | - /* 6.1.51 */ 0x060133 | ||
42 | -#else | ||
43 | - /* Older kernels have a bug where the sqpoll thread uses 100% CPU. */ | ||
44 | - /* 5.10.186 */ 0x050ABA | ||
45 | -#endif | ||
46 | - ? 1 : -1; | ||
47 | - | ||
48 | - /* But users can still enable it if they so desire. */ | ||
49 | - val = getenv("UV_USE_IO_URING"); | ||
50 | - if (val != NULL) | ||
51 | - use = atoi(val) ? 1 : -1; | ||
52 | - | ||
53 | - atomic_store_explicit(&use_io_uring, use, memory_order_relaxed); | ||
54 | - } | ||
55 | - | ||
56 | - return use > 0; | ||
57 | + return 0; /* pseudo doesn't support io_uring https://bugzilla.yoctoproject.org/show_bug.cgi?id=15244 */ | ||
58 | #endif | ||
59 | } | ||
60 | |||
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch deleted file mode 100644 index 9d878dfb8d..0000000000 --- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-gyp-resolve-python-3.12-issues.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From bf8c96ba6936050ed4a0de5bc8aeeaf2b3c50dc1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Thu, 7 Dec 2023 12:54:30 +0100 | ||
4 | Subject: [PATCH] gyp: resolve python 3.12 issues | ||
5 | |||
6 | Upstream has updated gyp wholesale in the main branch, so | ||
7 | this patch can be dropped in due time. | ||
8 | |||
9 | Upstream-Status: Inappropriate [issue will be fixed upstream with the next nodejs LTS update] | ||
10 | |||
11 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
12 | --- | ||
13 | deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py | 4 ++-- | ||
14 | tools/gyp/pylib/gyp/input.py | 4 ++-- | ||
15 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
16 | |||
17 | 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 | ||
18 | index d9699a0a..173e9465 100644 | ||
19 | --- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py | ||
20 | +++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py | ||
21 | @@ -16,7 +16,7 @@ import subprocess | ||
22 | import sys | ||
23 | import threading | ||
24 | import traceback | ||
25 | -from distutils.version import StrictVersion | ||
26 | +from packaging.version import Version | ||
27 | from gyp.common import GypError | ||
28 | from gyp.common import OrderedSet | ||
29 | |||
30 | @@ -1183,7 +1183,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil | ||
31 | else: | ||
32 | ast_code = compile(cond_expr_expanded, "<string>", "eval") | ||
33 | cached_conditions_asts[cond_expr_expanded] = ast_code | ||
34 | - env = {"__builtins__": {}, "v": StrictVersion} | ||
35 | + env = {"__builtins__": {}, "v": Version} | ||
36 | if eval(ast_code, env, variables): | ||
37 | return true_dict | ||
38 | return false_dict | ||
39 | diff --git a/tools/gyp/pylib/gyp/input.py b/tools/gyp/pylib/gyp/input.py | ||
40 | index 354958bf..ab6112e5 100644 | ||
41 | --- a/tools/gyp/pylib/gyp/input.py | ||
42 | +++ b/tools/gyp/pylib/gyp/input.py | ||
43 | @@ -16,7 +16,7 @@ import subprocess | ||
44 | import sys | ||
45 | import threading | ||
46 | import traceback | ||
47 | -from distutils.version import StrictVersion | ||
48 | +from packaging.version import Version | ||
49 | from gyp.common import GypError | ||
50 | from gyp.common import OrderedSet | ||
51 | |||
52 | @@ -1190,7 +1190,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil | ||
53 | else: | ||
54 | ast_code = compile(cond_expr_expanded, "<string>", "eval") | ||
55 | cached_conditions_asts[cond_expr_expanded] = ast_code | ||
56 | - env = {"__builtins__": {}, "v": StrictVersion} | ||
57 | + env = {"__builtins__": {}, "v": Version} | ||
58 | if eval(ast_code, env, variables): | ||
59 | return true_dict | ||
60 | return false_dict | ||
61 | -- | ||
62 | 2.39.2 | ||
63 | |||
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 @@ | |||
1 | From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001 | 1 | From 33393507ba8209f0d6b85b391c525b4c70807275 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 3 Jul 2023 12:33:16 +0000 | 3 | Date: Mon, 3 Jul 2023 12:33:16 +0000 |
4 | Subject: [PATCH] [liftoff] Correct function signatures | 4 | Subject: [PATCH] Correct function signatures |
5 | 5 | ||
6 | Fixes builds on mips where clang reports an error | 6 | Fixes 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 | |||
13 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | 13 | Signed-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 | ||
20 | diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h | 20 | diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h |
21 | index aef63c64..f2a11b01 100644 | 21 | index 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); |
44 | diff --git a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | 44 | diff --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 |
45 | index 96cba24c..53e1842d 100644 | 45 | index 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); |
57 | diff --git a/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h b/deps/v8/src/wasm/baseline/riscv/liftoff-assembler-riscv64.h | 57 | diff --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 |
58 | index 1d6ae09e..397e82b2 100644 | 58 | index 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 | -- | ||
71 | 2.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 @@ | |||
1 | From 07ee84863fa4a9e4d5f155632478587b0acbf71a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Schonberg <schonm@gmail.com> | ||
3 | Date: Tue, 30 Apr 2024 21:48:33 -0400 | ||
4 | Subject: [PATCH] Update to nodejs 22.0.0 | ||
5 | |||
6 | Upstream-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 | |||
11 | diff --git a/test/fixtures/run-script/node_modules/.bin/positional-args b/test/fixtures/run-script/node_modules/.bin/positional-args | ||
12 | index 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 @@ | |||
1 | From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001 | 1 | From afc085af7b6b935a5e14fc3f40db47df02ca3af2 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> | 2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> |
3 | Date: Sat, 9 Nov 2019 14:45:30 +0000 | 3 | Date: Sat, 9 Nov 2019 14:45:30 +0000 |
4 | Subject: [PATCH] v8: don't override ARM CFLAGS | 4 | Subject: [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 | ||
30 | diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi | 30 | diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi |
31 | index 264b3e478e..0b41848145 100644 | 31 | index 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 | -- | ||
101 | 2.20.1 | ||
102 | |||
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch index cb0237309e..d987ac50be 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch +++ b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch | |||
@@ -1,21 +1,77 @@ | |||
1 | Link mksnapshot with libatomic on x86 | 1 | From 15e751e4b79475fb34e4b32a3ca54119b20c564a Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Sat, 17 Aug 2024 21:33:18 +0800 | ||
4 | Subject: [PATCH] link libatomic for clang conditionally | ||
2 | 5 | ||
3 | Clang-12 on x86 emits atomic builtins | 6 | Clang emits atomic builtin, explicitly link libatomic conditionally: |
7 | - For target build, always link -latomic for clang as usual | ||
8 | - For host build, if host and target have same bit width, cross compiling | ||
9 | is enabled, and host toolchain is gcc which does not link -latomic; | ||
10 | if host and target have different bit width, no cross compiling, | ||
11 | host build is the same with target build that requires to link | ||
12 | -latomic; | ||
4 | 13 | ||
5 | Fixes | 14 | Fix: |
6 | | module-compiler.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x558): un | 15 | |tmp-glibc/work/core2-64-wrs-linux/nodejs/20.13.0/node-v20.13.0/out/Release/node_js2c: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory |
7 | defined reference to `__atomic_load' | ||
8 | 16 | ||
9 | Upstream-Status: Pending | 17 | Upstream-Status: Inappropriate [OE specific] |
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | 18 | ||
19 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
20 | --- | ||
21 | node.gyp | 13 ++++++++++++- | ||
22 | tools/v8_gypfiles/v8.gyp | 15 ++++++++++++--- | ||
23 | 2 files changed, 24 insertions(+), 4 deletions(-) | ||
24 | |||
25 | diff --git a/node.gyp b/node.gyp | ||
26 | index b425f443..f296f35c 100644 | ||
27 | --- a/node.gyp | ||
28 | +++ b/node.gyp | ||
29 | @@ -487,7 +487,18 @@ | ||
30 | ], | ||
31 | }], | ||
32 | ['OS=="linux" and clang==1', { | ||
33 | - 'libraries': ['-latomic'], | ||
34 | + 'target_conditions': [ | ||
35 | + ['_toolset=="host"', { | ||
36 | + 'conditions': [ | ||
37 | + ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', { | ||
38 | + 'libraries': ['-latomic'], | ||
39 | + }], | ||
40 | + ], | ||
41 | + }], | ||
42 | + ['_toolset=="target"', { | ||
43 | + 'libraries': ['-latomic'], | ||
44 | + }], | ||
45 | + ], | ||
46 | }], | ||
47 | ], | ||
48 | }, | ||
49 | diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp | ||
50 | index b23263cf..dcabf4ca 100644 | ||
12 | --- a/tools/v8_gypfiles/v8.gyp | 51 | --- a/tools/v8_gypfiles/v8.gyp |
13 | +++ b/tools/v8_gypfiles/v8.gyp | 52 | +++ b/tools/v8_gypfiles/v8.gyp |
14 | @@ -1436,6 +1436,7 @@ | 53 | @@ -1100,9 +1100,18 @@ |
15 | { | 54 | # Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library |
16 | 'target_name': 'mksnapshot', | 55 | # to implement atomic memory access |
17 | 'type': 'executable', | 56 | ['v8_current_cpu in ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', { |
18 | + 'libraries': [ '-latomic' ], | 57 | - 'link_settings': { |
19 | 'dependencies': [ | 58 | - 'libraries': ['-latomic', ], |
20 | 'v8_base_without_compiler', | 59 | - }, |
21 | 'v8_compiler_for_mksnapshot', | 60 | + 'target_conditions': [ |
61 | + ['_toolset=="host"', { | ||
62 | + 'conditions': [ | ||
63 | + ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', { | ||
64 | + 'libraries': ['-latomic'], | ||
65 | + }], | ||
66 | + ], | ||
67 | + }], | ||
68 | + ['_toolset=="target"', { | ||
69 | + 'libraries': ['-latomic', ], | ||
70 | + }], | ||
71 | + ], | ||
72 | }], | ||
73 | ], | ||
74 | }, # v8_base_without_compiler | ||
75 | -- | ||
76 | 2.35.5 | ||
77 | |||
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 @@ | |||
1 | keep nodejs compatible with c-ares 1.17.1 | 1 | From ce931ad5f5aba60e8e77f39e0af43bce7d25d287 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 4 Mar 2024 11:05:25 -0500 | ||
4 | Subject: [PATCH] keep nodejs compatible with c-ares 1.17.1 | ||
2 | 5 | ||
3 | Upstream-Status: Inappropriate [c-ares specific] | 6 | Upstream-Status: Inappropriate [c-ares specific] |
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 7 | Signed-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 | ||
12 | diff --git a/src/cares_wrap.h b/src/cares_wrap.h | ||
13 | index 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.12.2.bb b/meta-oe/recipes-devtools/nodejs/nodejs_22.16.0.bb index d86c38f2fc..4bc829f140 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_20.12.2.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_22.16.0.bb | |||
@@ -1,15 +1,15 @@ | |||
1 | DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" | 1 | DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" |
2 | HOMEPAGE = "http://nodejs.org" | 2 | HOMEPAGE = "http://nodejs.org" |
3 | LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" | 3 | LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0" |
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9a7fcce64128730251dbc58aa41b4674" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=b4f41dcacabc8f07b9ca7dee2f188a00" |
5 | 5 | ||
6 | CVE_PRODUCT = "nodejs node.js" | 6 | CVE_PRODUCT = "nodejs node.js" |
7 | 7 | ||
8 | DEPENDS = "openssl file-replacement-native python3-packaging-native" | 8 | DEPENDS = "openssl openssl-native file-replacement-native python3-packaging-native" |
9 | DEPENDS:append:class-target = " qemu-native" | 9 | DEPENDS:append:class-target = " qemu-native" |
10 | DEPENDS:append:class-native = " c-ares-native" | 10 | DEPENDS:append:class-native = " c-ares-native" |
11 | 11 | ||
12 | inherit pkgconfig python3native qemu ptest | 12 | inherit pkgconfig python3native qemu ptest siteinfo |
13 | 13 | ||
14 | COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" | 14 | COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*" |
15 | COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" | 15 | COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*" |
@@ -18,27 +18,29 @@ COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*" | |||
18 | COMPATIBLE_HOST:riscv64 = "null" | 18 | COMPATIBLE_HOST:riscv64 = "null" |
19 | COMPATIBLE_HOST:riscv32 = "null" | 19 | COMPATIBLE_HOST:riscv32 = "null" |
20 | COMPATIBLE_HOST:powerpc = "null" | 20 | COMPATIBLE_HOST:powerpc = "null" |
21 | COMPATIBLE_HOST:powerpc64le = "null" | ||
21 | 22 | ||
22 | SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ | 23 | SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ |
24 | file://0001-Do-not-use-glob-in-deps.patch \ | ||
23 | file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ | 25 | file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ |
24 | file://0004-v8-don-t-override-ARM-CFLAGS.patch \ | 26 | file://0004-v8-don-t-override-ARM-CFLAGS.patch \ |
25 | file://system-c-ares.patch \ | 27 | file://system-c-ares.patch \ |
26 | file://0001-liftoff-Correct-function-signatures.patch \ | 28 | file://0001-liftoff-Correct-function-signatures.patch \ |
29 | file://libatomic.patch \ | ||
30 | file://0001-deps-disable-io_uring-support-in-libuv.patch \ | ||
31 | file://0001-positional-args.patch \ | ||
32 | file://0001-custom-env.patch \ | ||
27 | file://run-ptest \ | 33 | file://run-ptest \ |
28 | " | 34 | " |
29 | |||
30 | SRC_URI:append:class-target = " \ | 35 | SRC_URI:append:class-target = " \ |
31 | file://0001-Using-native-binaries.patch \ | 36 | file://0001-Using-native-binaries.patch \ |
32 | " | 37 | " |
33 | SRC_URI:append:toolchain-clang:x86 = " \ | ||
34 | file://libatomic.patch \ | ||
35 | " | ||
36 | SRC_URI:append:toolchain-clang:powerpc64le = " \ | 38 | SRC_URI:append:toolchain-clang:powerpc64le = " \ |
37 | file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ | 39 | file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ |
38 | " | 40 | " |
39 | SRC_URI[sha256sum] = "d7cbcc5fbfb31e9001f3f0150bbeda59abe5dd7137aaa6273958cd59ce35ced7" | 41 | SRC_URI[sha256sum] = "720894f323e5c1ac24968eb2676660c90730d715cb7f090be71a668662a17c37" |
40 | 42 | ||
41 | S = "${WORKDIR}/node-v${PV}" | 43 | S = "${UNPACKDIR}/node-v${PV}" |
42 | 44 | ||
43 | CVE_PRODUCT += "node.js" | 45 | CVE_PRODUCT += "node.js" |
44 | 46 | ||
@@ -66,28 +68,14 @@ ARCHFLAGS ?= "" | |||
66 | 68 | ||
67 | PACKAGECONFIG ??= "ares brotli icu zlib" | 69 | PACKAGECONFIG ??= "ares brotli icu zlib" |
68 | 70 | ||
69 | PACKAGECONFIG[ares] = "--shared-cares,,c-ares" | 71 | PACKAGECONFIG[ares] = "--shared-cares,,c-ares c-ares-native" |
70 | PACKAGECONFIG[brotli] = "--shared-brotli,,brotli" | 72 | PACKAGECONFIG[brotli] = "--shared-brotli,,brotli brotli-native" |
71 | PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu" | 73 | PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu icu-native" |
72 | PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" | 74 | PACKAGECONFIG[libuv] = "--shared-libuv,,libuv" |
73 | PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" | 75 | PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2" |
74 | PACKAGECONFIG[shared] = "--shared" | 76 | PACKAGECONFIG[shared] = "--shared" |
75 | PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" | 77 | PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" |
76 | 78 | ||
77 | # We don't want to cross-compile during target compile, | ||
78 | # and we need to use the right flags during host compile, | ||
79 | # too. | ||
80 | EXTRA_OEMAKE = "\ | ||
81 | CC.host='${CC} -pie -fPIE' \ | ||
82 | CFLAGS.host='${CPPFLAGS} ${CFLAGS}' \ | ||
83 | CXX.host='${CXX} -pie -fPIE' \ | ||
84 | CXXFLAGS.host='${CPPFLAGS} ${CXXFLAGS}' \ | ||
85 | LDFLAGS.host='${LDFLAGS}' \ | ||
86 | AR.host='${AR}' \ | ||
87 | \ | ||
88 | builddir_name=./ \ | ||
89 | " | ||
90 | |||
91 | EXTRANATIVEPATH += "file-native" | 79 | EXTRANATIVEPATH += "file-native" |
92 | 80 | ||
93 | python prune_sources() { | 81 | python prune_sources() { |
@@ -110,9 +98,11 @@ do_unpack[postfuncs] += "prune_sources" | |||
110 | # V8's JIT infrastructure requires binaries such as mksnapshot and | 98 | # V8's JIT infrastructure requires binaries such as mksnapshot and |
111 | # mkpeephole to be run in the host during the build. However, these | 99 | # mkpeephole to be run in the host during the build. However, these |
112 | # binaries must have the same bit-width as the target (e.g. a x86_64 | 100 | # binaries must have the same bit-width as the target (e.g. a x86_64 |
113 | # host targeting ARMv6 needs to produce a 32-bit binary). Instead of | 101 | # host targeting ARMv6 needs to produce a 32-bit binary). |
114 | # depending on a third Yocto toolchain, we just build those binaries | 102 | # 1. If host and target have the different bit width, run those |
115 | # for the target and run them on the host with QEMU. | 103 | # binaries for the target and run them on the host with QEMU. |
104 | # 2. If host and target have the same bit width, enable upstream | ||
105 | # cross compile support and no QEMU | ||
116 | python do_create_v8_qemu_wrapper () { | 106 | python do_create_v8_qemu_wrapper () { |
117 | """Creates a small wrapper that invokes QEMU to run some target V8 binaries | 107 | """Creates a small wrapper that invokes QEMU to run some target V8 binaries |
118 | on the host.""" | 108 | on the host.""" |
@@ -120,6 +110,10 @@ python do_create_v8_qemu_wrapper () { | |||
120 | d.expand('${STAGING_DIR_HOST}${base_libdir}')] | 110 | d.expand('${STAGING_DIR_HOST}${base_libdir}')] |
121 | qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), | 111 | qemu_cmd = qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), |
122 | qemu_libdirs) | 112 | qemu_libdirs) |
113 | |||
114 | if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": | ||
115 | qemu_cmd = "" | ||
116 | |||
123 | wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') | 117 | wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh') |
124 | with open(wrapper_path, 'w') as wrapper_file: | 118 | with open(wrapper_path, 'w') as wrapper_file: |
125 | wrapper_file.write("""#!/bin/sh | 119 | wrapper_file.write("""#!/bin/sh |
@@ -138,6 +132,14 @@ addtask create_v8_qemu_wrapper after do_configure before do_compile | |||
138 | 132 | ||
139 | LDFLAGS:append:x86 = " -latomic" | 133 | LDFLAGS:append:x86 = " -latomic" |
140 | 134 | ||
135 | export CC_host | ||
136 | export CFLAGS_host | ||
137 | export CXX_host | ||
138 | export CXXFLAGS_host | ||
139 | export LDFLAGS_host | ||
140 | export AR_host | ||
141 | export HOST_AND_TARGET_SAME_WIDTH | ||
142 | |||
141 | CROSS_FLAGS = "--cross-compiling" | 143 | CROSS_FLAGS = "--cross-compiling" |
142 | CROSS_FLAGS:class-native = "--no-cross-compiling" | 144 | CROSS_FLAGS:class-native = "--no-cross-compiling" |
143 | 145 | ||
@@ -179,4 +181,36 @@ RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \ | |||
179 | PACKAGES =+ "${PN}-systemtap" | 181 | PACKAGES =+ "${PN}-systemtap" |
180 | FILES:${PN}-systemtap = "${datadir}/systemtap" | 182 | FILES:${PN}-systemtap = "${datadir}/systemtap" |
181 | 183 | ||
184 | do_configure[prefuncs] += "set_gyp_variables" | ||
185 | do_compile[prefuncs] += "set_gyp_variables" | ||
186 | do_install[prefuncs] += "set_gyp_variables" | ||
187 | python set_gyp_variables () { | ||
188 | if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "0": | ||
189 | # We don't want to cross-compile during target compile, | ||
190 | # and we need to use the right flags during host compile, | ||
191 | # too. | ||
192 | d.setVar("CC_host", d.getVar("CC") + " -pie -fPIE") | ||
193 | d.setVar("CFLAGS_host", d.getVar("CFLAGS")) | ||
194 | d.setVar("CXX_host", d.getVar("CXX") + " -pie -fPIE") | ||
195 | d.setVar("CXXFLAGS_host", d.getVar("CXXFLAGS")) | ||
196 | d.setVar("LDFLAGS_host", d.getVar("LDFLAGS")) | ||
197 | d.setVar("AR_host", d.getVar("AR")) | ||
198 | elif d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1": | ||
199 | # Enable upstream cross compile support | ||
200 | d.setVar("CC_host", d.getVar("BUILD_CC")) | ||
201 | d.setVar("CFLAGS_host", d.getVar("BUILD_CFLAGS")) | ||
202 | d.setVar("CXX_host", d.getVar("BUILD_CXX")) | ||
203 | d.setVar("CXXFLAGS_host", d.getVar("BUILD_CXXFLAGS")) | ||
204 | d.setVar("LDFLAGS_host", d.getVar("BUILD_LDFLAGS")) | ||
205 | d.setVar("AR_host", d.getVar("BUILD_AR")) | ||
206 | } | ||
207 | |||
208 | python __anonymous () { | ||
209 | # 32 bit target and 64 bit host (x86-64 or aarch64) have different bit width | ||
210 | if d.getVar("SITEINFO_BITS") == "32" and "64" in d.getVar("BUILD_ARCH"): | ||
211 | d.setVar("HOST_AND_TARGET_SAME_WIDTH", "0") | ||
212 | else: | ||
213 | d.setVar("HOST_AND_TARGET_SAME_WIDTH", "1") | ||
214 | } | ||
215 | |||
182 | BBCLASSEXTEND = "native" | 216 | BBCLASSEXTEND = "native" |