mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 06:11:25 +08:00
node: update to v12.18.4
This commit is contained in:
parent
c2632091b8
commit
71fe7bde07
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=node
|
||||
PKG_VERSION:=v12.16.1
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=v12.18.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION)
|
||||
PKG_HASH:=0a95845ba02c46102b5671d0c5732460073f2d397488337e18d1fc30146d412d
|
||||
PKG_HASH:=25f03cb18e53b6d0959d0c219e701a85eb4693f526bdda7c72bc6199b364f609
|
||||
|
||||
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>, Adrian Panella <ianchi74@outlook.com>
|
||||
PKG_LICENSE:=MIT
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/lib/internal/modules/cjs/loader.js
|
||||
+++ b/lib/internal/modules/cjs/loader.js
|
||||
@@ -1260,7 +1260,8 @@
|
||||
@@ -1239,7 +1239,8 @@
|
||||
path.resolve(process.execPath, '..') :
|
||||
path.resolve(process.execPath, '..', '..');
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390x')
|
||||
valid_arm_float_abi = ('soft', 'softfp', 'hard')
|
||||
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
|
||||
@@ -896,6 +896,9 @@
|
||||
@@ -956,6 +956,9 @@
|
||||
if rtn == 'mipsel' and '_LP64' in k:
|
||||
rtn = 'mips64el'
|
||||
|
||||
@ -19,12 +19,12 @@
|
||||
return rtn
|
||||
|
||||
|
||||
@@ -1001,7 +1004,7 @@
|
||||
@@ -1063,7 +1066,7 @@
|
||||
|
||||
if target_arch == 'arm':
|
||||
configure_arm(o)
|
||||
- elif target_arch in ('mips', 'mipsel', 'mips64el'):
|
||||
+ elif target_arch in ('mips', 'mipsel', 'mips64', 'mips64el'):
|
||||
configure_mips(o)
|
||||
configure_mips(o, target_arch)
|
||||
|
||||
if flavor == 'aix':
|
||||
|
@ -34,7 +34,7 @@
|
||||
'<@(icu_src_genccode)',
|
||||
--- a/tools/v8_gypfiles/v8.gyp 2019-06-27 19:12:20.000000000 +0900
|
||||
+++ b/tools/v8_gypfiles/v8.gyp 2019-07-01 14:40:48.292020880 +0900
|
||||
@@ -1265,6 +1265,7 @@
|
||||
@@ -1255,6 +1255,7 @@
|
||||
{
|
||||
'target_name': 'bytecode_builtins_list_generator',
|
||||
'type': 'executable',
|
||||
@ -42,7 +42,7 @@
|
||||
'conditions': [
|
||||
['want_separate_host_toolset', {
|
||||
'toolsets': ['host'],
|
||||
@@ -1288,6 +1289,8 @@
|
||||
@@ -1278,6 +1279,8 @@
|
||||
{
|
||||
'target_name': 'mksnapshot',
|
||||
'type': 'executable',
|
||||
@ -51,7 +51,7 @@
|
||||
'dependencies': [
|
||||
'v8_base_without_compiler',
|
||||
'v8_compiler_for_mksnapshot',
|
||||
@@ -1310,6 +1313,7 @@
|
||||
@@ -1300,6 +1303,7 @@
|
||||
{
|
||||
'target_name': 'torque',
|
||||
'type': 'executable',
|
||||
@ -59,7 +59,7 @@
|
||||
'dependencies': [
|
||||
'torque_base',
|
||||
# "build/win:default_exe_manifest",
|
||||
@@ -1348,6 +1352,7 @@
|
||||
@@ -1338,6 +1342,7 @@
|
||||
{
|
||||
'target_name': 'torque-language-server',
|
||||
'type': 'executable',
|
||||
@ -67,7 +67,7 @@
|
||||
'conditions': [
|
||||
['want_separate_host_toolset', {
|
||||
'toolsets': ['host'],
|
||||
@@ -1375,6 +1380,8 @@
|
||||
@@ -1365,6 +1370,8 @@
|
||||
{
|
||||
'target_name': 'gen-regexp-special-case',
|
||||
'type': 'executable',
|
||||
|
29
lang/node/patches/999-localhost-no-addrconfig.patch
Normal file
29
lang/node/patches/999-localhost-no-addrconfig.patch
Normal file
@ -0,0 +1,29 @@
|
||||
Description: do not use dns.ADDRCONFIG for localhost
|
||||
it fails on IPv6-only systems. Setting it with libc fails on linux.
|
||||
https://github.com/nodejs/node/issues/33279
|
||||
Author: Jérémy Lal <kapouer@melix.org>
|
||||
Last-Update: 2020-06-11
|
||||
Bug-Debian: https://bugs.debian.org/962318
|
||||
Forwarded: https://github.com/nodejs/node/issues/33816
|
||||
--- a/lib/net.js
|
||||
+++ b/lib/net.js
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
+
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the
|
||||
@@ -1028,13 +1029,6 @@
|
||||
hints: options.hints || 0
|
||||
};
|
||||
|
||||
- if (!isWindows &&
|
||||
- dnsopts.family !== 4 &&
|
||||
- dnsopts.family !== 6 &&
|
||||
- dnsopts.hints === 0) {
|
||||
- dnsopts.hints = dns.ADDRCONFIG;
|
||||
- }
|
||||
-
|
||||
debug('connect: find host', host);
|
||||
debug('connect: dns options', dnsopts);
|
||||
self._host = host;
|
210
lang/node/patches/999-mips-fix.patch
Normal file
210
lang/node/patches/999-mips-fix.patch
Normal file
@ -0,0 +1,210 @@
|
||||
Description: upstream mips fix
|
||||
Origin: https://github.com/nodejs/node/issues/31118
|
||||
Last-Update: 2020-05-30
|
||||
|
||||
--- a/deps/v8/AUTHORS
|
||||
+++ b/deps/v8/AUTHORS
|
||||
@@ -106,6 +106,7 @@
|
||||
James M Snell <jasnell@gmail.com>
|
||||
Jianghua Yang <jianghua.yjh@alibaba-inc.com>
|
||||
Jiawen Geng <technicalcute@gmail.com>
|
||||
+Jiaxun Yang <jiaxun.yang@flygoat.com>
|
||||
Joel Stanley <joel@jms.id.au>
|
||||
Johan Bergström <johan@bergstroem.nu>
|
||||
Jonathan Liu <net147@gmail.com>
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.cc
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.cc
|
||||
@@ -94,10 +94,6 @@
|
||||
|
||||
void PlatformEmbeddedFileWriterAIX::DeclareFunctionEnd(const char* name) {}
|
||||
|
||||
-int PlatformEmbeddedFileWriterAIX::HexLiteral(uint64_t value) {
|
||||
- return fprintf(fp_, "0x%" PRIx64, value);
|
||||
-}
|
||||
-
|
||||
void PlatformEmbeddedFileWriterAIX::FilePrologue() {}
|
||||
|
||||
void PlatformEmbeddedFileWriterAIX::DeclareExternalFilename(
|
||||
@@ -120,12 +116,6 @@
|
||||
return kLong;
|
||||
}
|
||||
|
||||
-int PlatformEmbeddedFileWriterAIX::WriteByteChunk(const uint8_t* data) {
|
||||
- DCHECK_EQ(ByteChunkDataDirective(), kLong);
|
||||
- const uint32_t* long_ptr = reinterpret_cast<const uint32_t*>(data);
|
||||
- return HexLiteral(*long_ptr);
|
||||
-}
|
||||
-
|
||||
#undef SYMBOL_PREFIX
|
||||
|
||||
} // namespace internal
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.h
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.h
|
||||
@@ -37,8 +37,6 @@
|
||||
void DeclareFunctionBegin(const char* name) override;
|
||||
void DeclareFunctionEnd(const char* name) override;
|
||||
|
||||
- int HexLiteral(uint64_t value) override;
|
||||
-
|
||||
void Comment(const char* string) override;
|
||||
|
||||
void FilePrologue() override;
|
||||
@@ -48,7 +46,6 @@
|
||||
int IndentedDataDirective(DataDirective directive) override;
|
||||
|
||||
DataDirective ByteChunkDataDirective() const override;
|
||||
- int WriteByteChunk(const uint8_t* data) override;
|
||||
|
||||
private:
|
||||
void DeclareSymbolGlobal(const char* name);
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
|
||||
@@ -24,6 +24,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
+int PlatformEmbeddedFileWriterBase::HexLiteral(uint64_t value) {
|
||||
+ return fprintf(fp_, "0x%" PRIx64, value);
|
||||
+}
|
||||
+
|
||||
int DataDirectiveSize(DataDirective directive) {
|
||||
switch (directive) {
|
||||
case kByte:
|
||||
@@ -39,24 +43,37 @@
|
||||
}
|
||||
|
||||
int PlatformEmbeddedFileWriterBase::WriteByteChunk(const uint8_t* data) {
|
||||
- DCHECK_EQ(ByteChunkDataDirective(), kOcta);
|
||||
-
|
||||
- static constexpr size_t kSize = kInt64Size;
|
||||
-
|
||||
- uint64_t part1, part2;
|
||||
- // Use memcpy for the reads since {data} is not guaranteed to be aligned.
|
||||
+ size_t kSize = DataDirectiveSize(ByteChunkDataDirective());
|
||||
+ size_t kHalfSize = kSize / 2;
|
||||
+ uint64_t high = 0, low = 0;
|
||||
+
|
||||
+ switch (kSize) {
|
||||
+ case 1:
|
||||
+ low = *data;
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ low = *reinterpret_cast<const uint32_t*>(data);
|
||||
+ break;
|
||||
+ case 8:
|
||||
+ low = *reinterpret_cast<const uint64_t*>(data);
|
||||
+ break;
|
||||
+ case 16:
|
||||
#ifdef V8_TARGET_BIG_ENDIAN
|
||||
- memcpy(&part1, data, kSize);
|
||||
- memcpy(&part2, data + kSize, kSize);
|
||||
+ memcpy(&high, data, kHalfSize);
|
||||
+ memcpy(&low, data + kHalfSize, kHalfSize);
|
||||
#else
|
||||
- memcpy(&part1, data + kSize, kSize);
|
||||
- memcpy(&part2, data, kSize);
|
||||
+ memcpy(&high, data + kHalfSize, kHalfSize);
|
||||
+ memcpy(&low, data, kHalfSize);
|
||||
#endif // V8_TARGET_BIG_ENDIAN
|
||||
+ break;
|
||||
+ default:
|
||||
+ UNREACHABLE();
|
||||
+ }
|
||||
|
||||
- if (part1 != 0) {
|
||||
- return fprintf(fp(), "0x%" PRIx64 "%016" PRIx64, part1, part2);
|
||||
+ if (high != 0) {
|
||||
+ return fprintf(fp(), "0x%" PRIx64 "%016" PRIx64, high, low);
|
||||
} else {
|
||||
- return fprintf(fp(), "0x%" PRIx64, part2);
|
||||
+ return fprintf(fp(), "0x%" PRIx64, low);
|
||||
}
|
||||
}
|
||||
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
|
||||
@@ -67,7 +67,7 @@
|
||||
virtual void DeclareFunctionEnd(const char* name) = 0;
|
||||
|
||||
// Returns the number of printed characters.
|
||||
- virtual int HexLiteral(uint64_t value) = 0;
|
||||
+ virtual int HexLiteral(uint64_t value);
|
||||
|
||||
virtual void Comment(const char* string) = 0;
|
||||
virtual void Newline() { fprintf(fp_, "\n"); }
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
|
||||
@@ -112,10 +112,6 @@
|
||||
|
||||
void PlatformEmbeddedFileWriterGeneric::DeclareFunctionEnd(const char* name) {}
|
||||
|
||||
-int PlatformEmbeddedFileWriterGeneric::HexLiteral(uint64_t value) {
|
||||
- return fprintf(fp_, "0x%" PRIx64, value);
|
||||
-}
|
||||
-
|
||||
void PlatformEmbeddedFileWriterGeneric::FilePrologue() {}
|
||||
|
||||
void PlatformEmbeddedFileWriterGeneric::DeclareExternalFilename(
|
||||
@@ -142,6 +138,18 @@
|
||||
return fprintf(fp_, " %s ", DirectiveAsString(directive));
|
||||
}
|
||||
|
||||
+DataDirective PlatformEmbeddedFileWriterGeneric::ByteChunkDataDirective()
|
||||
+ const {
|
||||
+#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64)
|
||||
+ // MIPS uses a fixed 4 byte instruction set, using .long
|
||||
+ // to prevent any unnecessary padding.
|
||||
+ return kLong;
|
||||
+#else
|
||||
+ // Other ISAs just listen to the base
|
||||
+ return PlatformEmbeddedFileWriterBase::ByteChunkDataDirective();
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
#undef SYMBOL_PREFIX
|
||||
|
||||
} // namespace internal
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.h
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.h
|
||||
@@ -39,8 +39,6 @@
|
||||
void DeclareFunctionBegin(const char* name) override;
|
||||
void DeclareFunctionEnd(const char* name) override;
|
||||
|
||||
- int HexLiteral(uint64_t value) override;
|
||||
-
|
||||
void Comment(const char* string) override;
|
||||
|
||||
void FilePrologue() override;
|
||||
@@ -49,6 +47,8 @@
|
||||
|
||||
int IndentedDataDirective(DataDirective directive) override;
|
||||
|
||||
+ DataDirective ByteChunkDataDirective() const override;
|
||||
+
|
||||
private:
|
||||
void DeclareSymbolGlobal(const char* name);
|
||||
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.cc
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.cc
|
||||
@@ -87,10 +87,6 @@
|
||||
|
||||
void PlatformEmbeddedFileWriterMac::DeclareFunctionEnd(const char* name) {}
|
||||
|
||||
-int PlatformEmbeddedFileWriterMac::HexLiteral(uint64_t value) {
|
||||
- return fprintf(fp_, "0x%" PRIx64, value);
|
||||
-}
|
||||
-
|
||||
void PlatformEmbeddedFileWriterMac::FilePrologue() {}
|
||||
|
||||
void PlatformEmbeddedFileWriterMac::DeclareExternalFilename(
|
||||
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.h
|
||||
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.h
|
||||
@@ -37,8 +37,6 @@
|
||||
void DeclareFunctionBegin(const char* name) override;
|
||||
void DeclareFunctionEnd(const char* name) override;
|
||||
|
||||
- int HexLiteral(uint64_t value) override;
|
||||
-
|
||||
void Comment(const char* string) override;
|
||||
|
||||
void FilePrologue() override;
|
26
lang/node/patches/999-mips-less-memory.patch
Normal file
26
lang/node/patches/999-mips-less-memory.patch
Normal file
@ -0,0 +1,26 @@
|
||||
Description: mksnapshot uses too much memory on 32-bit mipsel
|
||||
Author: Jérémy Lal <kapouer@melix.org>
|
||||
Last-Update: 2020-06-03
|
||||
Forwarded: https://bugs.chromium.org/p/v8/issues/detail?id=10586
|
||||
--- a/deps/v8/src/common/globals.h
|
||||
+++ b/deps/v8/src/common/globals.h
|
||||
@@ -206,7 +206,7 @@
|
||||
constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux
|
||||
#elif V8_TARGET_ARCH_MIPS
|
||||
constexpr bool kRequiresCodeRange = false;
|
||||
-constexpr size_t kMaximalCodeRangeSize = 2048LL * MB;
|
||||
+constexpr size_t kMaximalCodeRangeSize = 512 * MB;
|
||||
constexpr size_t kMinimumCodeRangeSize = 0 * MB;
|
||||
constexpr size_t kMinExpectedOSPageSize = 4 * KB; // OS page.
|
||||
#else
|
||||
--- a/deps/v8/src/codegen/mips/constants-mips.h
|
||||
+++ b/deps/v8/src/codegen/mips/constants-mips.h
|
||||
@@ -137,7 +137,7 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
-constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096;
|
||||
+constexpr size_t kMaxPCRelativeCodeRangeInMB = 1024;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Registers and FPURegisters.
|
@ -1,7 +1,7 @@
|
||||
diff -urN a/configure.py b/configure.py
|
||||
--- a/configure.py 2019-09-05 00:36:21.000000000 +0900
|
||||
+++ b/configure.py 2019-09-27 11:49:55.445800884 +0900
|
||||
@@ -1223,6 +1223,25 @@
|
||||
@@ -1276,6 +1276,15 @@
|
||||
options.build_v8_with_gn = FetchDeps(v8_path)
|
||||
o['variables']['build_v8_with_gn'] = b(options.build_v8_with_gn)
|
||||
|
||||
@ -14,20 +14,10 @@ diff -urN a/configure.py b/configure.py
|
||||
+
|
||||
+ if target_arch in ('mips', 'mips64'):
|
||||
+ o['variables']['v8_use_snapshot'] = 'false'
|
||||
+ elif target_arch in ('mipsel', 'mips64el'):
|
||||
+ o['variables']['v8_enable_embedded_builtins'] = 0
|
||||
+ elif target_arch == 'x64':
|
||||
+ if options.with_intl in (None, 'none'):
|
||||
+ o['variables']['v8_enable_embedded_builtins'] = 1
|
||||
+ elif target_arch == 'ia32':
|
||||
+ if options.with_intl in (None, 'none'):
|
||||
+ o['variables']['v8_use_snapshot'] = 'false'
|
||||
+ else:
|
||||
+ o['variables']['v8_enable_embedded_builtins'] = 0
|
||||
|
||||
def configure_openssl(o):
|
||||
variables = o['variables']
|
||||
@@ -1654,6 +1673,7 @@
|
||||
@@ -1713,6 +1732,7 @@
|
||||
configure_intl(output)
|
||||
configure_static(output)
|
||||
configure_inspector(output)
|
||||
|
Loading…
Reference in New Issue
Block a user