Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -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/json',
},
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}).`);
})

View File

@@ -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"

View File

@@ -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

View File

@@ -0,0 +1,94 @@
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 | 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
@@ -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 @@
{
'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

View File

@@ -0,0 +1,71 @@
From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 3 Jul 2023 12:33:16 +0000
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/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
@@ -717,7 +717,7 @@ class LiftoffAssembler : public MacroAssembler {
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
@@ -884,8 +884,8 @@ class LiftoffAssembler : public MacroAssembler {
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/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
@@ -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.
- 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/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.
- Move(tmp, src, type.value_type());
+ Move(tmp, src, type.value_type().kind());
src = tmp;
pinned.set(tmp);
--
2.40.0

View File

@@ -0,0 +1,25 @@
From 0976af0f3b328436ea44a74a406f311adb2ab211 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 15 Jun 2021 19:01:31 -0700
Subject: [PATCH] ppc64: Do not use -mminimal-toc with clang
clang does not support this option
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
common.gypi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/common.gypi
+++ b/common.gypi
@@ -417,7 +417,7 @@
'ldflags': [ '-m32' ],
}],
[ 'target_arch=="ppc64" and OS!="aix"', {
- 'cflags': [ '-m64', '-mminimal-toc' ],
+ 'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'target_arch=="s390x"', {

View File

@@ -0,0 +1,102 @@
From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
Date: Sat, 9 Nov 2019 14:45:30 +0000
Subject: [PATCH] v8: don't override ARM CFLAGS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This overrides yocto-provided build flags with its own, e.g we get
arm-poky-linux-musleabi-g++ -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \
... \
-march=armv7-a -mfpu=neon -mfloat-abi=hard -marm
Causing the latter to override the former, and compiler warnings:
cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch
Patch this out, so that yocto-provided flags take precedence.
Note that in reality the same should probably be done for all the other
supported architectures, too.
Note that this also switches to Thumb(2) mode (in my case). No obvious
problems have been noted during compilation or runtime.
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: André Draszik <git@andred.net>
---
tools/v8_gypfiles/toolchain.gypi | 52 ++------------------------------
1 file changed, 2 insertions(+), 50 deletions(-)
diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi
index 264b3e478e..0b41848145 100644
--- a/tools/v8_gypfiles/toolchain.gypi
+++ b/tools/v8_gypfiles/toolchain.gypi
@@ -211,31 +211,7 @@
'target_conditions': [
['_toolset=="host"', {
'conditions': [
- ['v8_target_arch==host_arch', {
- # Host built with an Arm CXX compiler.
- 'conditions': [
- [ 'arm_version==7', {
- 'cflags': ['-march=armv7-a',],
- }],
- [ 'arm_version==7 or arm_version=="default"', {
- 'conditions': [
- [ 'arm_fpu!="default"', {
- 'cflags': ['-mfpu=<(arm_fpu)',],
- }],
- ],
- }],
- [ 'arm_float_abi!="default"', {
- 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
- }],
- [ 'arm_thumb==1', {
- 'cflags': ['-mthumb',],
- }],
- [ 'arm_thumb==0', {
- 'cflags': ['-marm',],
- }],
- ],
- }, {
- # 'v8_target_arch!=host_arch'
+ ['v8_target_arch!=host_arch', {
# Host not built with an Arm CXX compiler (simulator build).
'conditions': [
[ 'arm_float_abi=="hard"', {
@@ -254,31 +230,7 @@
}], # _toolset=="host"
['_toolset=="target"', {
'conditions': [
- ['v8_target_arch==target_arch', {
- # Target built with an Arm CXX compiler.
- 'conditions': [
- [ 'arm_version==7', {
- 'cflags': ['-march=armv7-a',],
- }],
- [ 'arm_version==7 or arm_version=="default"', {
- 'conditions': [
- [ 'arm_fpu!="default"', {
- 'cflags': ['-mfpu=<(arm_fpu)',],
- }],
- ],
- }],
- [ 'arm_float_abi!="default"', {
- 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
- }],
- [ 'arm_thumb==1', {
- 'cflags': ['-mthumb',],
- }],
- [ 'arm_thumb==0', {
- 'cflags': ['-marm',],
- }],
- ],
- }, {
- # 'v8_target_arch!=target_arch'
+ ['v8_target_arch!=target_arch', {
# Target not built with an Arm CXX compiler (simulator build).
'conditions': [
[ 'arm_float_abi=="hard"', {
--
2.20.1

View File

@@ -0,0 +1,182 @@
From 182d9c05e78b1ddb1cb8242cd3628a7855a0336f Mon Sep 17 00:00:00 2001
From: Andrey Kosyakov <caseq@chromium.org>
Date: Thu, 17 Aug 2023 13:50:11 -0700
Subject: [PATCH] Define UChar as char16_t
We used to have UChar defined as uint16_t which does not go along
with STL these days if you try to have an std::basic_string<> of it,
as there are no standard std::char_traits<> specialization for uint16_t.
This switches UChar to char16_t where practical, introducing a few
compatibility shims to keep CL size small, as (1) this would likely
have to be back-ported and (2) crdtp extensively uses uint16_t for
wide chars.
Bug: b:296390693
Change-Id: I66a32d8f0050915225b187de56896c26dd76163d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4789966
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Auto-Submit: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89559}
Upstream-Status: Backport [https://chromium-review.googlesource.com/c/v8/v8/+/4789966]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/inspector/string-16.cc | 8 +++++++-
src/inspector/string-16.h | 10 ++++++++--
src/inspector/v8-string-conversions.cc | 6 +++---
src/inspector/v8-string-conversions.h | 6 ++++--
.../inspector_protocol/crdtp/test_platform_v8.cc | 9 ++++++---
5 files changed, 28 insertions(+), 11 deletions(-)
--- a/deps/v8/src/inspector/string-16.cc
+++ b/deps/v8/src/inspector/string-16.cc
@@ -27,7 +27,7 @@ bool isSpaceOrNewLine(UChar c) {
return isASCII(c) && c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9));
}
-int64_t charactersToInteger(const UChar* characters, size_t length,
+int64_t charactersToInteger(const uint16_t* characters, size_t length,
bool* ok = nullptr) {
std::vector<char> buffer;
buffer.reserve(length + 1);
@@ -50,6 +50,8 @@ int64_t charactersToInteger(const UChar*
String16::String16(const UChar* characters, size_t size)
: m_impl(characters, size) {}
+String16::String16(const uint16_t* characters, size_t size)
+ : m_impl(reinterpret_cast<const UChar*>(characters), size) {}
String16::String16(const UChar* characters) : m_impl(characters) {}
@@ -241,6 +243,10 @@ String16 String16::fromUTF16LE(const UCh
#endif // V8_TARGET_BIG_ENDIAN
}
+String16 String16::fromUTF16LE(const uint16_t* stringStart, size_t length) {
+ return fromUTF16LE(reinterpret_cast<const UChar*>(stringStart), length);
+}
+
std::string String16::utf8() const {
return UTF16ToUTF8(m_impl.data(), m_impl.size());
}
--- a/deps/v8/src/inspector/string-16.h
+++ b/deps/v8/src/inspector/string-16.h
@@ -6,6 +6,7 @@
#define V8_INSPECTOR_STRING_16_H_
#include <stdint.h>
+#include <uchar.h>
#include <cctype>
#include <climits>
@@ -17,7 +18,7 @@
namespace v8_inspector {
-using UChar = uint16_t;
+using UChar = char16_t;
class String16 {
public:
@@ -27,6 +28,7 @@ class String16 {
String16(const String16&) V8_NOEXCEPT = default;
String16(String16&&) V8_NOEXCEPT = default;
String16(const UChar* characters, size_t size);
+ String16(const uint16_t* characters, size_t size);
V8_EXPORT String16(const UChar* characters);
V8_EXPORT String16(const char* characters);
String16(const char* characters, size_t size);
@@ -48,7 +50,9 @@ class String16 {
int toInteger(bool* ok = nullptr) const;
std::pair<size_t, size_t> getTrimmedOffsetAndLength() const;
String16 stripWhiteSpace() const;
- const UChar* characters16() const { return m_impl.c_str(); }
+ const uint16_t* characters16() const {
+ return reinterpret_cast<const uint16_t*>(m_impl.c_str());
+ }
size_t length() const { return m_impl.length(); }
bool isEmpty() const { return !m_impl.length(); }
UChar operator[](size_t index) const { return m_impl[index]; }
@@ -78,6 +82,8 @@ class String16 {
// On Big endian architectures, byte order needs to be flipped.
V8_EXPORT static String16 fromUTF16LE(const UChar* stringStart,
size_t length);
+ V8_EXPORT static String16 fromUTF16LE(const uint16_t* stringStart,
+ size_t length);
std::size_t hash() const {
if (!hash_code) {
--- a/deps/v8/src/inspector/v8-string-conversions.cc
+++ b/deps/v8/src/inspector/v8-string-conversions.cc
@@ -12,7 +12,7 @@
namespace v8_inspector {
namespace {
-using UChar = uint16_t;
+using UChar = char16_t;
using UChar32 = uint32_t;
bool isASCII(UChar c) { return !(c & ~0x7F); }
@@ -386,7 +386,7 @@ std::string UTF16ToUTF8(const UChar* str
std::basic_string<UChar> UTF8ToUTF16(const char* stringStart, size_t length) {
if (!stringStart || !length) return std::basic_string<UChar>();
- std::vector<uint16_t> buffer(length);
+ std::vector<UChar> buffer(length);
UChar* bufferStart = buffer.data();
UChar* bufferCurrent = bufferStart;
@@ -395,7 +395,7 @@ std::basic_string<UChar> UTF8ToUTF16(con
reinterpret_cast<const char*>(stringStart + length),
&bufferCurrent, bufferCurrent + buffer.size(), nullptr,
true) != conversionOK)
- return std::basic_string<uint16_t>();
+ return std::basic_string<UChar>();
size_t utf16Length = bufferCurrent - bufferStart;
return std::basic_string<UChar>(bufferStart, bufferStart + utf16Length);
}
--- a/deps/v8/src/inspector/v8-string-conversions.h
+++ b/deps/v8/src/inspector/v8-string-conversions.h
@@ -5,14 +5,16 @@
#ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
#define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
+#include <uchar.h>
+
#include <cstdint>
#include <string>
// Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may
// want to use string-16.h directly rather than these.
namespace v8_inspector {
-std::basic_string<uint16_t> UTF8ToUTF16(const char* stringStart, size_t length);
-std::string UTF16ToUTF8(const uint16_t* stringStart, size_t length);
+std::basic_string<char16_t> UTF8ToUTF16(const char* stringStart, size_t length);
+std::string UTF16ToUTF8(const char16_t* stringStart, size_t length);
} // namespace v8_inspector
#endif // V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
--- a/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc
+++ b/deps/v8/third_party/inspector_protocol/crdtp/test_platform_v8.cc
@@ -11,13 +11,16 @@
namespace v8_crdtp {
std::string UTF16ToUTF8(span<uint16_t> in) {
- return v8_inspector::UTF16ToUTF8(in.data(), in.size());
+ return v8_inspector::UTF16ToUTF8(reinterpret_cast<const char16_t*>(in.data()),
+ in.size());
}
std::vector<uint16_t> UTF8ToUTF16(span<uint8_t> in) {
- std::basic_string<uint16_t> utf16 = v8_inspector::UTF8ToUTF16(
+ std::basic_string<char16_t> utf16 = v8_inspector::UTF8ToUTF16(
reinterpret_cast<const char*>(in.data()), in.size());
- return std::vector<uint16_t>(utf16.begin(), utf16.end());
+ return std::vector<uint16_t>(
+ reinterpret_cast<const uint16_t*>(utf16.data()),
+ reinterpret_cast<const uint16_t*>(utf16.data()) + utf16.size());
}
} // namespace v8_crdtp

View File

@@ -0,0 +1,76 @@
From 15e751e4b79475fb34e4b32a3ca54119b20c564a Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Sat, 17 Aug 2024 21:33:18 +0800
Subject: [PATCH] link libatomic for clang conditionally
Clang emits atomic builtin, explicitly link libatomic conditionally:
- For target build, always link -latomic for clang as usual
- For host build, if host and target have same bit width, cross compiling
is enabled, and host toolchain is gcc which does not link -latomic;
if host and target have different bit width, no cross compiling,
host build is the same with target build that requires to link
-latomic;
Fix:
|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
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
node.gyp | 13 ++++++++++++-
tools/v8_gypfiles/v8.gyp | 15 ++++++++++++---
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/node.gyp b/node.gyp
index b425f443..f296f35c 100644
--- a/node.gyp
+++ b/node.gyp
@@ -487,7 +487,18 @@
],
}],
['OS=="linux" and clang==1', {
- 'libraries': ['-latomic'],
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'conditions': [
+ ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', {
+ 'libraries': ['-latomic'],
+ }],
+ ],
+ }],
+ ['_toolset=="target"', {
+ 'libraries': ['-latomic'],
+ }],
+ ],
}],
],
},
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
index b23263cf..dcabf4ca 100644
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -1100,9 +1100,18 @@
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# to implement atomic memory access
['v8_current_cpu in ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', {
- 'link_settings': {
- 'libraries': ['-latomic', ],
- },
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'conditions': [
+ ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', {
+ 'libraries': ['-latomic'],
+ }],
+ ],
+ }],
+ ['_toolset=="target"', {
+ 'libraries': ['-latomic', ],
+ }],
+ ],
}],
],
}, # v8_base_without_compiler
--
2.35.5

View File

@@ -0,0 +1,8 @@
#!/bin/sh
./cctest
if [ $? = 0 ]; then
echo "PASS: nodejs"
else
echo "FAIL: nodejs"
fi

View File

@@ -0,0 +1,24 @@
keep nodejs compatible with c-ares 1.17.1
Upstream-Status: Inappropriate [c-ares specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/src/cares_wrap.h
+++ b/src/cares_wrap.h
@@ -22,7 +22,15 @@
# include <netdb.h>
#endif // __POSIX__
-# include <ares_nameser.h>
+#if defined(__ANDROID__) || \
+ defined(__MINGW32__) || \
+ defined(__OpenBSD__) || \
+ defined(_MSC_VER)
+
+# include <nameser.h>
+#else
+# include <arpa/nameser.h>
+#endif
namespace node {
namespace cares_wrap {

View File

@@ -0,0 +1,64 @@
From bbcd1f33161fd9874e8a61999d2739b177f99723 Mon Sep 17 00:00:00 2001
From: Jeroen Hofstee <jhofstee@victronenergy.com>
Date: Mon, 28 Apr 2025 14:21:44 +0000
Subject: [PATCH] zlib: fix pointer alignment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The function AllocForBrotli prefixes the allocated memory with its
size, and returns a pointer to the region after it. This pointer can
however no longer be suitably aligned. Correct this by allocating
the maximum of the the size of the size_t and the max alignment.
On Arm 32bits the size_t is 4 bytes long, but the alignment is 8 for
some NEON instructions. When Brotli is compiled with optimizations
enabled newer GCC versions will use the NEON instructions and trigger
a bus error killing node.
see https://github.com/google/brotli/issues/1159
PR-URL: https://github.com/nodejs/node/pull/57727
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Upstream-Status: Backport [https://github.com/nodejs/node/commit/dc035bbc9b310ff8067bc0dad22230978489c061]
---
src/node_zlib.cc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 66370e41..a537e766 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -493,20 +493,22 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
}
static void* AllocForBrotli(void* data, size_t size) {
- size += sizeof(size_t);
+ constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t));
+ size += offset;
CompressionStream* ctx = static_cast<CompressionStream*>(data);
char* memory = UncheckedMalloc(size);
if (UNLIKELY(memory == nullptr)) return nullptr;
*reinterpret_cast<size_t*>(memory) = size;
ctx->unreported_allocations_.fetch_add(size,
std::memory_order_relaxed);
- return memory + sizeof(size_t);
+ return memory + offset;
}
static void FreeForZlib(void* data, void* pointer) {
if (UNLIKELY(pointer == nullptr)) return;
CompressionStream* ctx = static_cast<CompressionStream*>(data);
- char* real_pointer = static_cast<char*>(pointer) - sizeof(size_t);
+ constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t));
+ char* real_pointer = static_cast<char*>(pointer) - offset;
size_t real_size = *reinterpret_cast<size_t*>(real_pointer);
ctx->unreported_allocations_.fetch_sub(real_size,
std::memory_order_relaxed);
--
2.43.0

View File

@@ -0,0 +1,212 @@
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
HOMEPAGE = "http://nodejs.org"
LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=c83fcdcd43ab352be6429ee1fd8827a0"
CVE_PRODUCT = "nodejs node.js"
DEPENDS = "openssl openssl-native file-replacement-native python3-packaging-native"
DEPENDS:append:class-target = " qemu-native"
DEPENDS:append:class-native = " c-ares-native"
inherit pkgconfig python3native qemu ptest siteinfo
COMPATIBLE_MACHINE:armv4 = "(!.*armv4).*"
COMPATIBLE_MACHINE:armv5 = "(!.*armv5).*"
COMPATIBLE_MACHINE:mips64 = "(!.*mips64).*"
COMPATIBLE_HOST:riscv64 = "null"
COMPATIBLE_HOST:riscv32 = "null"
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://0004-v8-don-t-override-ARM-CFLAGS.patch \
file://system-c-ares.patch \
file://0001-liftoff-Correct-function-signatures.patch \
file://libatomic.patch \
file://182d9c05e78.patch \
file://zlib-fix-pointer-alignment.patch \
file://run-ptest \
"
SRC_URI:append:class-target = " \
file://0001-Using-native-binaries.patch \
"
SRC_URI:append:toolchain-clang:powerpc64le = " \
file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
"
SRC_URI[sha256sum] = "69bf81b70f3a95ae0763459f02860c282d7e3a47567c8afaf126cc778176a882"
S = "${WORKDIR}/node-v${PV}"
CVE_PRODUCT += "node.js"
# v8 errors out if you have set CCACHE
CCACHE = ""
def map_nodejs_arch(a, d):
import re
if re.match('i.86$', a): return 'ia32'
elif re.match('x86_64$', a): return 'x64'
elif re.match('aarch64$', a): return 'arm64'
elif re.match('(powerpc64|powerpc64le|ppc64le)$', a): return 'ppc64'
elif re.match('powerpc$', a): return 'ppc'
return a
ARCHFLAGS:arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
'--with-arm-fpu=vfp', d), d), d)}"
ARCHFLAGS:append:mips = " --v8-lite-mode"
ARCHFLAGS:append:mipsel = " --v8-lite-mode"
ARCHFLAGS ?= ""
PACKAGECONFIG ??= "ares brotli icu zlib"
PACKAGECONFIG[ares] = "--shared-cares,,c-ares c-ares-native"
PACKAGECONFIG[brotli] = "--shared-brotli,,brotli brotli-native"
PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu icu-native"
PACKAGECONFIG[libuv] = "--shared-libuv,,libuv"
PACKAGECONFIG[nghttp2] = "--shared-nghttp2,,nghttp2"
PACKAGECONFIG[shared] = "--shared"
PACKAGECONFIG[zlib] = "--shared-zlib,,zlib"
EXTRANATIVEPATH += "file-native"
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"
# V8's JIT infrastructure requires binaries such as mksnapshot and
# mkpeephole to be run in the host during the build. However, these
# binaries must have the same bit-width as the target (e.g. a x86_64
# host targeting ARMv6 needs to produce a 32-bit binary).
# 1. If host and target have the different bit width, run those
# binaries for the target and run them on the host with QEMU.
# 2. If host and target have the same bit width, enable upstream
# cross crompile support and no QEMU
python do_create_v8_qemu_wrapper () {
"""Creates a small wrapper that invokes QEMU to run some target V8 binaries
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'),
qemu_libdirs)
if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1":
qemu_cmd = ""
wrapper_path = d.expand('${B}/v8-qemu-wrapper.sh')
with open(wrapper_path, 'w') as wrapper_file:
wrapper_file.write("""#!/bin/sh
# This file has been generated automatically.
# It invokes QEMU to run binaries built for the target in the host during the
# build process.
%s "$@"
""" % qemu_cmd)
os.chmod(wrapper_path, 0o755)
}
do_create_v8_qemu_wrapper[dirs] = "${B}"
addtask create_v8_qemu_wrapper after do_configure before do_compile
LDFLAGS:append:x86 = " -latomic"
export CC_host
export CFLAGS_host
export CXX_host
export CXXFLAGS_host
export LDFLAGS_host
export AR_host
export HOST_AND_TARGET_SAME_WIDTH
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 () {
GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
# $TARGET_ARCH settings don't match --dest-cpu settings
python3 configure.py --verbose --prefix=${prefix} \
--shared-openssl \
--dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
--dest-os=linux \
--libdir=${baselib} \
${CROSS_FLAGS} \
${ARCHFLAGS} \
${PACKAGECONFIG_CONFARGS}
}
do_compile () {
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
}
do_install () {
oe_runmake install DESTDIR=${D}
}
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 ${bindir}/corepack"
RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \
python3-misc python3-multiprocessing"
PACKAGES =+ "${PN}-systemtap"
FILES:${PN}-systemtap = "${datadir}/systemtap"
do_configure[prefuncs] += "set_gyp_variables"
do_compile[prefuncs] += "set_gyp_variables"
do_install[prefuncs] += "set_gyp_variables"
python set_gyp_variables () {
if d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "0":
# We don't want to cross-compile during target compile,
# and we need to use the right flags during host compile,
# too.
d.setVar("CC_host", d.getVar("CC") + " -pie -fPIE")
d.setVar("CFLAGS_host", d.getVar("CFLAGS"))
d.setVar("CXX_host", d.getVar("CXX") + " -pie -fPIE")
d.setVar("CXXFLAGS_host", d.getVar("CXXFLAGS"))
d.setVar("LDFLAGS_host", d.getVar("LDFLAGS"))
d.setVar("AR_host", d.getVar("AR"))
elif d.getVar("HOST_AND_TARGET_SAME_WIDTH") == "1":
# Enable upstream cross crompile support
d.setVar("CC_host", d.getVar("BUILD_CC"))
d.setVar("CFLAGS_host", d.getVar("BUILD_CFLAGS"))
d.setVar("CXX_host", d.getVar("BUILD_CXX"))
d.setVar("CXXFLAGS_host", d.getVar("BUILD_CXXFLAGS"))
d.setVar("LDFLAGS_host", d.getVar("BUILD_LDFLAGS"))
d.setVar("AR_host", d.getVar("BUILD_AR"))
}
python __anonymous () {
# 32 bit target and 64 bit host (x86-64 or aarch64) have different bit width
if d.getVar("SITEINFO_BITS") == "32" and "64" in d.getVar("BUILD_ARCH"):
d.setVar("HOST_AND_TARGET_SAME_WIDTH", "0")
else:
d.setVar("HOST_AND_TARGET_SAME_WIDTH", "1")
}
BBCLASSEXTEND = "native"