-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Receipe updated from meta-openembedded at this commit https://github.com/openembedded/meta-openembedded/tree/5c3518c2a5f173fd61b70544be57e9e34a8732d0/meta-oe/recipes-devtools/nodejs
- Loading branch information
Showing
14 changed files
with
753 additions
and
0 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
meta-alternatives/recipes-devtools/nodejs/nodejs-oe-cache-18.16/oe-npm-cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/env node | ||
|
||
/// Usage: oe-npm-cache <cache-dir> <type> <key> <file-name> | ||
/// <type> ... meta - metainformation about package | ||
/// tgz - tarball | ||
|
||
const process = require("node:process"); | ||
|
||
module.paths.unshift("@@libdir@@/node_modules/npm/node_modules"); | ||
|
||
const cacache = require('cacache') | ||
const fs = require('fs') | ||
|
||
// argv[0] is 'node', argv[1] is this script | ||
const cache_dir = process.argv[2] | ||
const type = process.argv[3] | ||
const key = process.argv[4] | ||
const file = process.argv[5] | ||
|
||
const data = fs.readFileSync(file) | ||
|
||
// metadata content is highly nodejs dependent; when cache entries are not | ||
// found, place debug statements in 'make-fetch-happen/lib/cache/policy.js' | ||
// (CachePolicy::satisfies()) | ||
const xlate = { | ||
'meta': { | ||
'key_prefix': 'make-fetch-happen:request-cache:', | ||
'metadata': function() { | ||
return { | ||
time: Date.now(), | ||
url: key, | ||
reqHeaders: { | ||
'accept': 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*', | ||
}, | ||
resHeaders: { | ||
"content-type": "application/json", | ||
"status": 200, | ||
}, | ||
options: { | ||
compress: true, | ||
} | ||
}; | ||
}, | ||
}, | ||
|
||
'tgz': { | ||
'key_prefix': 'make-fetch-happen:request-cache:', | ||
'metadata': function() { | ||
return { | ||
time: Date.now(), | ||
url: key, | ||
reqHeaders: { | ||
'accept': '*/*', | ||
}, | ||
resHeaders: { | ||
"content-type": "application/octet-stream", | ||
"status": 200, | ||
}, | ||
options: { | ||
compress: true, | ||
}, | ||
}; | ||
}, | ||
}, | ||
}; | ||
|
||
const info = xlate[type]; | ||
let opts = {} | ||
|
||
if (info.metadata) { | ||
opts['metadata'] = info.metadata(); | ||
} | ||
|
||
cacache.put(cache_dir, info.key_prefix + key, data, opts) | ||
.then(integrity => { | ||
console.log(`Saved content of ${key} (${file}).`); | ||
}) |
21 changes: 21 additions & 0 deletions
21
meta-alternatives/recipes-devtools/nodejs/nodejs-oe-cache-native_18.16.bb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
DESCRIPTION = "OE helper for manipulating npm cache" | ||
LICENSE = "Apache-2.0" | ||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" | ||
|
||
SRC_URI = "\ | ||
file://oe-npm-cache \ | ||
" | ||
|
||
inherit native | ||
|
||
B = "${WORKDIR}/build" | ||
|
||
do_configure() { | ||
sed -e 's!@@libdir@@!${libdir}!g' < '${WORKDIR}/oe-npm-cache' > '${B}/oe-npm-cache' | ||
} | ||
|
||
do_install() { | ||
install -D -p -m 0755 ${B}/oe-npm-cache ${D}${bindir}/oe-npm-cache | ||
} | ||
|
||
RDEPENDS:${PN} = "nodejs-native" |
46 changes: 46 additions & 0 deletions
46
...ives/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 7d94bfe53beeb2d25eb5f2ff6b1d509df7e6ab80 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: | ||
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(-) | ||
|
||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -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 |
77 changes: 77 additions & 0 deletions
77
meta-alternatives/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
From 6c3ac20477a4bac643088f24df3c042e627fafa9 Mon Sep 17 00:00:00 2001 | ||
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 | 1 + | ||
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 | ||
@@ -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)', | ||
], | ||
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 @@ | ||
{ | ||
'action_name': 'run_torque_action', | ||
'inputs': [ # Order matters. | ||
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', | ||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', | ||
'<@(torque_files)', | ||
], | ||
@@ -99,6 +100,7 @@ | ||
'<@(torque_outputs_inc)', | ||
], | ||
'action': [ | ||
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', | ||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)', | ||
'-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated', | ||
'-v8-root', '<(V8_ROOT)', | ||
@@ -211,6 +213,7 @@ | ||
{ | ||
'action_name': 'generate_bytecode_builtins_list_action', | ||
'inputs': [ | ||
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', | ||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)', | ||
], | ||
'outputs': [ | ||
@@ -400,6 +403,7 @@ | ||
], | ||
}, | ||
'inputs': [ | ||
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', | ||
'<(mksnapshot_exec)', | ||
], | ||
'outputs': [ | ||
@@ -1539,6 +1543,7 @@ | ||
{ | ||
'action_name': 'run_gen-regexp-special-case_action', | ||
'inputs': [ | ||
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh', | ||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen-regexp-special-case<(EXECUTABLE_SUFFIX)', | ||
], | ||
'outputs': [ | ||
-- | ||
2.34.1 | ||
|
85 changes: 85 additions & 0 deletions
85
...lternatives/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
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 | ||
Subject: [PATCH] [liftoff] Correct function signatures | ||
|
||
Fixes builds on mips where clang reports an error | ||
../deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h:661:5: error: no matching member function for call to 'Move' | ||
Move(tmp, src, type.value_type()); | ||
^~~~ | ||
|
||
Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3235674] | ||
|
||
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
--- | ||
deps/v8/src/wasm/baseline/liftoff-assembler.h | 6 +++--- | ||
deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h | 2 +- | ||
deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | 2 +- | ||
.../src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h | 2 +- | ||
4 files changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h | ||
index 22c7f73a..db4cb168 100644 | ||
--- a/deps/v8/src/wasm/baseline/liftoff-assembler.h | ||
+++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h | ||
@@ -646,7 +646,7 @@ class LiftoffAssembler : public TurboAssembler { | ||
void FinishCall(const ValueKindSig*, compiler::CallDescriptor*); | ||
|
||
// Move {src} into {dst}. {src} and {dst} must be different. | ||
- void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind); | ||
+ void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind kind); | ||
|
||
// 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 | ||
@@ -795,8 +795,8 @@ class LiftoffAssembler : public TurboAssembler { | ||
inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset, | ||
ValueKind); | ||
|
||
- inline void Move(Register dst, Register src, ValueKind); | ||
- inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind); | ||
+ inline void Move(Register dst, Register src, ValueKind kind); | ||
+ inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind kind); | ||
|
||
inline void Spill(int offset, LiftoffRegister, ValueKind); | ||
inline void Spill(int offset, WasmValue); | ||
diff --git a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h | ||
index c76fd2f4..0fffe231 100644 | ||
--- a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h | ||
+++ b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h | ||
@@ -661,7 +661,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg, | ||
pinned = pinned | LiftoffRegList{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 36413545..48207337 100644 | ||
--- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | ||
+++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | ||
@@ -593,7 +593,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. | ||
- 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/riscv64/liftoff-assembler-riscv64.h b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h | ||
index 642a7d2a..56ffcc2a 100644 | ||
--- a/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h | ||
+++ b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h | ||
@@ -589,7 +589,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. | ||
- Move(tmp, src, type.value_type()); | ||
+ Move(tmp, src, type.value_type().kind()); | ||
|
||
src = tmp; | ||
pinned.set(tmp); | ||
-- | ||
2.34.1 |
34 changes: 34 additions & 0 deletions
34
...tives/recipes-devtools/nodejs/nodejs/0001-mips-Use-32bit-cast-for-operand-on-mips32.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
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 | ||
|
23 changes: 23 additions & 0 deletions
23
...atives/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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> | ||
--- | ||
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"', { |
Oops, something went wrong.