Update to v12.15.0 Support Python3 : https://github.com/openwrt/packages/issues/8893 Preparing to deprecate nosnapshot builds. Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>lilik-openwrt-22.03
@ -1,10 +1,10 @@ | |||
--- a/deps/uv/src/unix/getaddrinfo.c | |||
+++ b/deps/uv/src/unix/getaddrinfo.c | |||
@@ -100,6 +100,7 @@ | |||
@@ -103,6 +103,7 @@ | |||
int err; | |||
req = container_of(w, uv_getaddrinfo_t, work_req); | |||
+ req->hints->ai_flags &= ~AI_V4MAPPED; | |||
+ req->hints->ai_flags &= ~AI_V4MAPPED; | |||
err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo); | |||
req->retcode = uv__getaddrinfo_translate_error(err); | |||
} |
@ -1,11 +1,11 @@ | |||
--- a/lib/module.js | |||
+++ b/lib/module.js | |||
@@ -715,7 +715,8 @@ | |||
} else { | |||
prefixDir = path.resolve(process.execPath, '..', '..'); | |||
} | |||
- var paths = [path.resolve(prefixDir, 'lib', 'node')]; | |||
+ var paths = [path.resolve(prefixDir, 'lib', 'node'), | |||
--- a/lib/internal/modules/cjs/loader.js | |||
+++ b/lib/internal/modules/cjs/loader.js | |||
@@ -1095,7 +1095,8 @@ | |||
path.resolve(process.execPath, '..') : | |||
path.resolve(process.execPath, '..', '..'); | |||
- let paths = [path.resolve(prefixDir, 'lib', 'node')]; | |||
+ let paths = [path.resolve(prefixDir, 'lib', 'node'), | |||
+ path.resolve(prefixDir, 'lib', 'node_modules')]; | |||
if (homeDir) { | |||
@ -0,0 +1,61 @@ | |||
diff -urN a/deps/v8/src/base/platform/condition-variable.cc b/deps/v8/src/base/platform/condition-variable.cc | |||
--- a/deps/v8/src/base/platform/condition-variable.cc 2019-09-05 00:36:23.000000000 +0900 | |||
+++ b/deps/v8/src/base/platform/condition-variable.cc 2019-09-12 15:10:01.063792083 +0900 | |||
@@ -16,7 +16,7 @@ | |||
ConditionVariable::ConditionVariable() { | |||
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \ | |||
- (V8_OS_LINUX && V8_LIBC_GLIBC)) | |||
+ V8_OS_LINUX) | |||
// On Free/Net/OpenBSD and Linux with glibc we can change the time | |||
// source for pthread_cond_timedwait() to use the monotonic clock. | |||
pthread_condattr_t attr; | |||
@@ -92,7 +92,7 @@ | |||
&native_handle_, &mutex->native_handle(), &ts); | |||
#else | |||
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \ | |||
- (V8_OS_LINUX && V8_LIBC_GLIBC)) | |||
+ V8_OS_LINUX) | |||
// On Free/Net/OpenBSD and Linux with glibc we can change the time | |||
// source for pthread_cond_timedwait() to use the monotonic clock. | |||
result = clock_gettime(CLOCK_MONOTONIC, &ts); | |||
diff -urN a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc | |||
--- a/deps/v8/src/base/platform/platform-posix.cc 2019-09-05 00:36:23.000000000 +0900 | |||
+++ b/deps/v8/src/base/platform/platform-posix.cc 2019-09-12 15:10:01.063792083 +0900 | |||
@@ -773,7 +773,7 @@ | |||
#if V8_OS_MACOSX | |||
// Default on Mac OS X is 512kB -- bump up to 1MB | |||
stack_size = 1 * 1024 * 1024; | |||
-#elif V8_OS_AIX | |||
+#elif V8_OS_AIX || !defined(__GLIBC__) | |||
// Default on AIX is 96kB -- bump up to 2MB | |||
stack_size = 2 * 1024 * 1024; | |||
#endif | |||
diff -urN a/deps/v8/src/codegen/external-reference-table.cc b/deps/v8/src/codegen/external-reference-table.cc | |||
--- a/deps/v8/src/codegen/external-reference-table.cc 2019-09-05 00:36:23.000000000 +0900 | |||
+++ b/deps/v8/src/codegen/external-reference-table.cc 2019-09-12 15:09:41.959828134 +0900 | |||
@@ -9,7 +9,7 @@ | |||
#include "src/ic/stub-cache.h" | |||
#include "src/logging/counters.h" | |||
-#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) | |||
+#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) && defined(V8_LIBC_GLIBC) | |||
#define SYMBOLIZE_FUNCTION | |||
#include <execinfo.h> | |||
#include <vector> | |||
diff -urN a/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc b/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc | |||
--- a/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc 2019-09-05 00:36:23.000000000 +0900 | |||
+++ b/deps/v8/src/compiler-dispatcher/optimizing-compile-dispatcher.cc 2019-09-12 15:10:01.063792083 +0900 | |||
@@ -134,8 +134,10 @@ | |||
// The function may have already been optimized by OSR. Simply continue. | |||
// Use a mutex to make sure that functions marked for install | |||
// are always also queued. | |||
- base::MutexGuard access_output_queue_(&output_queue_mutex_); | |||
- output_queue_.push(job); | |||
+ { | |||
+ base::MutexGuard access_output_queue_(&output_queue_mutex_); | |||
+ output_queue_.push(job); | |||
+ } | |||
} | |||
isolate_->stack_guard()->RequestInstallCode(); |
@ -1,96 +0,0 @@ | |||
diff --git a/src/node_crypto.cc b/src/node_crypto.cc | |||
index c3779c0..611fb43 100644 | |||
--- a/src/node_crypto.cc | |||
+++ b/src/node_crypto.cc | |||
@@ -43,6 +43,11 @@ | |||
#include <string.h> | |||
#include <vector> | |||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L | |||
+#define X509_get0_notBefore X509_get_notBefore | |||
+#define X509_get0_notAfter X509_get_notAfter | |||
+#endif | |||
+ | |||
#define THROW_AND_RETURN_IF_NOT_STRING_OR_BUFFER(val, prefix) \ | |||
do { \ | |||
if (!Buffer::HasInstance(val) && !val->IsString()) { \ | |||
@@ -536,6 +541,7 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) { | |||
method = SSLv23_server_method(); | |||
} else if (strcmp(*sslmethod, "SSLv23_client_method") == 0) { | |||
method = SSLv23_client_method(); | |||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L | |||
} else if (strcmp(*sslmethod, "TLSv1_method") == 0) { | |||
method = TLSv1_method(); | |||
} else if (strcmp(*sslmethod, "TLSv1_server_method") == 0) { | |||
@@ -554,6 +560,14 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) { | |||
method = TLSv1_2_server_method(); | |||
} else if (strcmp(*sslmethod, "TLSv1_2_client_method") == 0) { | |||
method = TLSv1_2_client_method(); | |||
+#else | |||
+ } else if (strcmp(*sslmethod, "TLS_method") == 0) { | |||
+ method = TLS_method(); | |||
+ } else if (strcmp(*sslmethod, "TLS_server_method") == 0) { | |||
+ method = TLS_server_method(); | |||
+ } else if (strcmp(*sslmethod, "TLS_client_method") == 0) { | |||
+ method = TLS_client_method(); | |||
+#endif | |||
} else { | |||
return env->ThrowError("Unknown method"); | |||
} | |||
@@ -1799,7 +1813,7 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) { | |||
rsa = nullptr; | |||
} | |||
- ASN1_TIME_print(bio, X509_get_notBefore(cert)); | |||
+ ASN1_TIME_print(bio, X509_get0_notBefore(cert)); | |||
BIO_get_mem_ptr(bio, &mem); | |||
info->Set(context, env->valid_from_string(), | |||
String::NewFromUtf8(env->isolate(), mem->data, | |||
@@ -1807,7 +1821,7 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) { | |||
mem->length)).FromJust(); | |||
(void) BIO_reset(bio); | |||
- ASN1_TIME_print(bio, X509_get_notAfter(cert)); | |||
+ ASN1_TIME_print(bio, X509_get0_notAfter(cert)); | |||
BIO_get_mem_ptr(bio, &mem); | |||
info->Set(context, env->valid_to_string(), | |||
String::NewFromUtf8(env->isolate(), mem->data, | |||
@@ -6191,8 +6205,12 @@ void TimingSafeEqual(const FunctionCallbackInfo<Value>& args) { | |||
} | |||
void InitCryptoOnce() { | |||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L | |||
SSL_load_error_strings(); | |||
OPENSSL_no_config(); | |||
+#else | |||
+ OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL); | |||
+#endif | |||
// --openssl-config=... | |||
if (!openssl_config.empty()) { | |||
@@ -6214,10 +6232,10 @@ void InitCryptoOnce() { | |||
} | |||
} | |||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L | |||
SSL_library_init(); | |||
OpenSSL_add_all_algorithms(); | |||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L | |||
crypto_lock_init(); | |||
CRYPTO_set_locking_callback(crypto_lock_cb); | |||
CRYPTO_THREADID_set_callback(crypto_threadid_cb); | |||
diff --git a/src/node_crypto.h b/src/node_crypto.h | |||
index 58f5b72..875a787 100644 | |||
--- a/src/node_crypto.h | |||
+++ b/src/node_crypto.h | |||
@@ -37,6 +37,9 @@ | |||
#include "v8.h" | |||
#include <openssl/ssl.h> | |||
+#include <openssl/bn.h> | |||
+#include <openssl/rsa.h> | |||
+#include <openssl/dh.h> | |||
#include <openssl/ec.h> | |||
#include <openssl/ecdh.h> | |||
#ifndef OPENSSL_NO_ENGINE |
@ -1,16 +0,0 @@ | |||
--- a/deps/v8/src/libsampler/sampler.cc | |||
+++ b/deps/v8/src/libsampler/sampler.cc | |||
@@ -456,8 +456,12 @@ | |||
reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R1]); | |||
state->fp = | |||
reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R31]); | |||
-#else | |||
+#elif V8_TARGET_ARCH_32_BIT | |||
// Some C libraries, notably Musl, define the regs member as a void pointer | |||
+ state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[32]); | |||
+ state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[1]); | |||
+ state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[31]); | |||
+#else | |||
state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[32]); | |||
state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[1]); | |||
state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[31]); |
@ -0,0 +1,11 @@ | |||
--- a/deps/v8/src/runtime/runtime-utils.h | |||
+++ b/deps/v8/src/runtime/runtime-utils.h | |||
@@ -126,7 +126,7 @@ | |||
#if defined(V8_TARGET_LITTLE_ENDIAN) | |||
return x.ptr() | (static_cast<ObjectPair>(y.ptr()) << 32); | |||
#elif defined(V8_TARGET_BIG_ENDIAN) | |||
- return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32); | |||
+ return y.ptr() | (static_cast<ObjectPair>(x.ptr()) << 32); | |||
#else | |||
#error Unknown endianness | |||
#endif |
@ -0,0 +1,78 @@ | |||
--- a/tools/icu/icu-generic.gyp | |||
+++ b/tools/icu/icu-generic.gyp | |||
@@ -517,6 +517,7 @@ | |||
'target_name': 'genrb', | |||
'type': 'executable', | |||
'toolsets': [ 'host' ], | |||
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
'dependencies': [ 'icutools' ], | |||
'sources': [ | |||
'<@(icu_src_genrb)' | |||
@@ -533,6 +534,7 @@ | |||
'target_name': 'iculslocs', | |||
'toolsets': [ 'host' ], | |||
'type': 'executable', | |||
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
'dependencies': [ 'icutools' ], | |||
'sources': [ | |||
'iculslocs.cc', | |||
@@ -545,6 +547,7 @@ | |||
'target_name': 'icupkg', | |||
'toolsets': [ 'host' ], | |||
'type': 'executable', | |||
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
'dependencies': [ 'icutools' ], | |||
'sources': [ | |||
'<@(icu_src_icupkg)', | |||
@@ -556,6 +559,7 @@ | |||
'target_name': 'genccode', | |||
'toolsets': [ 'host' ], | |||
'type': 'executable', | |||
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
'dependencies': [ 'icutools' ], | |||
'sources': [ | |||
'<@(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 | |||
@@ -1258,6 +1258,7 @@ | |||
{ | |||
'target_name': 'bytecode_builtins_list_generator', | |||
'type': 'executable', | |||
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
'conditions': [ | |||
['want_separate_host_toolset', { | |||
'toolsets': ['host'], | |||
@@ -1281,6 +1282,8 @@ | |||
{ | |||
'target_name': 'mksnapshot', | |||
'type': 'executable', | |||
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/65.1/lib' ], | |||
'dependencies': [ | |||
'v8_base_without_compiler', | |||
'v8_compiler_for_mksnapshot', | |||
@@ -1303,6 +1306,7 @@ | |||
{ | |||
'target_name': 'torque', | |||
'type': 'executable', | |||
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
'dependencies': [ | |||
'torque_base', | |||
# "build/win:default_exe_manifest", | |||
@@ -1341,6 +1345,7 @@ | |||
{ | |||
'target_name': 'torque-language-server', | |||
'type': 'executable', | |||
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
'conditions': [ | |||
['want_separate_host_toolset', { | |||
'toolsets': ['host'], | |||
@@ -1368,6 +1373,8 @@ | |||
{ | |||
'target_name': 'gen-regexp-special-case', | |||
'type': 'executable', | |||
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], | |||
+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/65.1/lib' ], | |||
'dependencies': [ | |||
'v8_libbase', | |||
# "build/win:default_exe_manifest", |
@ -0,0 +1,14 @@ | |||
diff -urN a/node.gypi b/node.gypi | |||
--- a/node.gypi 2019-09-05 00:36:25.000000000 +0900 | |||
+++ b/node.gypi 2019-09-13 09:57:54.073191914 +0900 | |||
@@ -142,6 +142,10 @@ | |||
'deps/http_parser/http_parser.gyp:http_parser', | |||
'deps/llhttp/llhttp.gyp:llhttp' | |||
], | |||
+ }, { | |||
+ 'dependencies': [ | |||
+ 'deps/llhttp/llhttp.gyp:llhttp' | |||
+ ], | |||
} ], | |||
[ 'node_shared_cares=="false"', { |
@ -0,0 +1,37 @@ | |||
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 | |||
@@ -1202,6 +1202,25 @@ | |||
options.build_v8_with_gn = FetchDeps(v8_path) | |||
o['variables']['build_v8_with_gn'] = b(options.build_v8_with_gn) | |||
+def configure_v8_deprecated(o): | |||
+ target_arch = options.dest_cpu | |||
+ if target_arch == 'x86': | |||
+ target_arch = 'ia32' | |||
+ if target_arch == 'x86_64': | |||
+ target_arch = 'x64' | |||
+ | |||
+ 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'] = 0 | |||
+ elif target_arch == 'ia32': | |||
+ if options.with_intl in (None, 'none'): | |||
+ o['variables']['v8_enable_embedded_builtins'] = 1 | |||
+ else: | |||
+ o['variables']['v8_enable_embedded_builtins'] = 0 | |||
def configure_openssl(o): | |||
variables = o['variables'] | |||
@@ -1632,6 +1651,7 @@ | |||
configure_intl(output) | |||
configure_static(output) | |||
configure_inspector(output) | |||
+configure_v8_deprecated(output) | |||
# variables should be a root level element, | |||
# move everything else to target_defaults |