mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
nodejs20, fixes for 32bit build (#12479)
Co-authored-by: Oscar Lesta <oscar.lesta@gmail.com>
This commit is contained in:
@@ -1,90 +0,0 @@
|
||||
SUMMARY="A JavaScript runtime built on Chrome's V8 Engine"
|
||||
DESCRIPTION="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. \
|
||||
As an asynchronous event driven JavaScript runtime, Node is designed to build scalable \
|
||||
network applications. In the following \"hello world\" example, many connections can be \
|
||||
handled concurrently. Upon each connection the callback is fired, but if there is no work \
|
||||
to be done, Node will sleep."
|
||||
HOMEPAGE="https://nodejs.org/"
|
||||
COPYRIGHT="2006-2019 The Node.js Foundation"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/nodejs/node/archive/v$portVersion/nodejs-$portVersion.tar.gz"
|
||||
SOURCE_DIR="node-$portVersion"
|
||||
CHECKSUM_SHA256="cae2cee190c66d1c077f9284ff001b05901daf16e6bc0082fe2069f5623109cf"
|
||||
PATCHES="nodejs-$portVersion.patchset"
|
||||
|
||||
# keep around for 32bit!
|
||||
ARCHITECTURES="?all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
nodejs16$secondaryArchSuffix = $portVersion
|
||||
cmd:node = $portVersion compat >= 16
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libcares$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libexecinfo$secondaryArchSuffix
|
||||
lib:libnghttp2$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libuv$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
nodejs16${secondaryArchSuffix}_devel
|
||||
"
|
||||
REQUIRES_devel="
|
||||
nodejs16$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libcares$secondaryArchSuffix
|
||||
devel:libexecinfo$secondaryArchSuffix
|
||||
devel:libnghttp2$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libuv$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:ninja
|
||||
cmd:python3.10
|
||||
cmd:which
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
./configure --with-intl=none --dest-os=haiku \
|
||||
--shared-cares --shared-libuv --shared-nghttp2 --shared-openssl \
|
||||
--shared-zlib \
|
||||
--prefix=$prefix --without-npm
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
mkdir -p $(dirname $docDir $includeDir $manDir)
|
||||
mv $prefix/include $includeDir
|
||||
mv $prefix/share/man $manDir
|
||||
mv $prefix/share/doc $docDir
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
|
||||
strip $prefix/bin/node
|
||||
rm -rf $prefix/share
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make test-only
|
||||
}
|
||||
@@ -12,6 +12,11 @@ SOURCE_URI="https://nodejs.org/dist/v$portVersion/node-v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="da228a0c27922f02001d9a781793696432096ab2da658eb77d7fc21693f4c5cb"
|
||||
SOURCE_DIR="node-v$portVersion"
|
||||
PATCHES="nodejs-$portVersion.patchset"
|
||||
if [ $effectiveTargetArchitecture = x86 ]; then
|
||||
PATCHES+="
|
||||
nodejs_x86-$portVersion.patchset
|
||||
"
|
||||
fi
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
@@ -1,672 +0,0 @@
|
||||
From 3717978298bf0876ca4dfeb0b4733a8ea56ea9ec Mon Sep 17 00:00:00 2001
|
||||
From: Calvin Hill <calvin@hakobaito.co.uk>
|
||||
Date: Wed, 22 May 2019 11:23:37 +0000
|
||||
Subject: Initial Haiku support for Node.js
|
||||
|
||||
|
||||
diff --git a/common.gypi b/common.gypi
|
||||
index 6862acc..bd05e77 100644
|
||||
--- a/common.gypi
|
||||
+++ b/common.gypi
|
||||
@@ -265,6 +265,9 @@
|
||||
'_target_name!="<(node_core_target_name)")', {
|
||||
'cflags!': ['-Werror'],
|
||||
}],
|
||||
+ ['OS=="haiku"', {
|
||||
+ 'clang%': 0,
|
||||
+ }],
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCCLCompilerTool': {
|
||||
@@ -294,6 +297,10 @@
|
||||
['target_arch=="arm64"', {
|
||||
'TargetMachine' : 0, # NotSet. MACHINE:ARM64 is inferred from the input files.
|
||||
}],
|
||||
+ ['OS == "haiku"', {
|
||||
+ 'cflags': [ '-fPIC' ],
|
||||
+ 'ldflags': [ '-fPIC']
|
||||
+ }],
|
||||
],
|
||||
'GenerateDebugInformation': 'true',
|
||||
'SuppressStartupBanner': 'true',
|
||||
@@ -354,6 +361,10 @@
|
||||
['_type!="static_library"', {
|
||||
'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']},
|
||||
}],
|
||||
+ ['OS == "haiku"', {
|
||||
+ 'cflags': [ '-fPIC' ],
|
||||
+ 'ldflags': [ '-fPIC']
|
||||
+ }],
|
||||
],
|
||||
}],
|
||||
['v8_enable_pointer_compression == 1', {
|
||||
@@ -384,7 +395,7 @@
|
||||
'cflags': [ '-pthread' ],
|
||||
'ldflags': [ '-pthread' ],
|
||||
}],
|
||||
- [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', {
|
||||
+ [ 'OS in "linux freebsd openbsd solaris android aix cloudabi haiku"', {
|
||||
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
|
||||
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++14' ],
|
||||
'defines': [ '__STDC_FORMAT_MACROS' ],
|
||||
@@ -398,6 +409,10 @@
|
||||
'cflags': [ '-I/usr/local/include' ],
|
||||
'ldflags': [ '-Wl,-z,wxneeded' ],
|
||||
}],
|
||||
+ ['OS=="haiku"', {
|
||||
+ 'cflags': [ '-fPIC' ],
|
||||
+ 'ldflags': [ '-fPIC' ],
|
||||
+ }],
|
||||
],
|
||||
'conditions': [
|
||||
[ 'target_arch=="ia32"', {
|
||||
@@ -556,6 +571,12 @@
|
||||
'OPENSSL_NO_PINSHARED'
|
||||
],
|
||||
}],
|
||||
+ ['OS=="haiku"', {
|
||||
+ 'ldflags': [ '-lroot', '-lbsd', '-lstdc++', '-lnetwork', '-Wl,-Bsymbolic', '-Wl,--export-dynamic', '-fPIC' ],
|
||||
+ 'ldflags!': [ '-pthreads', '-pthread', '-rdynamic' ],
|
||||
+ 'clang%': 0,
|
||||
+ '%v8_use_snapshot':0,
|
||||
+ }],
|
||||
['node_shared_openssl!="true"', {
|
||||
# `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures.
|
||||
'defines': [
|
||||
diff --git a/configure.py b/configure.py
|
||||
index 6efb98c..0ca9798 100755
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -51,7 +51,7 @@ from utils import SearchFiles
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
|
||||
- 'android', 'aix', 'cloudabi')
|
||||
+ 'android', 'aix', 'cloudabi', 'haiku')
|
||||
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
|
||||
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390x', 'riscv64')
|
||||
valid_arm_float_abi = ('soft', 'softfp', 'hard')
|
||||
diff --git a/deps/openssl/config/archs/linux-x86_64/no-asm/openssl-cl.gypi b/deps/openssl/config/archs/linux-x86_64/no-asm/openssl-cl.gypi
|
||||
index 76984d4..eda4459 100644
|
||||
--- a/deps/openssl/config/archs/linux-x86_64/no-asm/openssl-cl.gypi
|
||||
+++ b/deps/openssl/config/archs/linux-x86_64/no-asm/openssl-cl.gypi
|
||||
@@ -8,11 +8,9 @@
|
||||
],
|
||||
'openssl_cflags_linux-x86_64': [
|
||||
'-Wall -O3',
|
||||
- '-pthread -m64',
|
||||
- '-Wall -O3',
|
||||
+ '-m64',
|
||||
],
|
||||
'openssl_ex_libs_linux-x86_64': [
|
||||
- '-ldl -pthread',
|
||||
],
|
||||
'openssl_cli_srcs_linux-x86_64': [
|
||||
'openssl/apps/asn1pars.c',
|
||||
diff --git a/deps/openssl/config/archs/linux-x86_64/no-asm/openssl.gypi b/deps/openssl/config/archs/linux-x86_64/no-asm/openssl.gypi
|
||||
index d473731..291779a 100644
|
||||
--- a/deps/openssl/config/archs/linux-x86_64/no-asm/openssl.gypi
|
||||
+++ b/deps/openssl/config/archs/linux-x86_64/no-asm/openssl.gypi
|
||||
@@ -694,11 +694,10 @@
|
||||
],
|
||||
'openssl_cflags_linux-x86_64': [
|
||||
'-Wall -O3',
|
||||
- '-pthread -m64',
|
||||
+ '-m64',
|
||||
'-Wall -O3',
|
||||
],
|
||||
- 'openssl_ex_libs_linux-x86_64': [
|
||||
- '-ldl -pthread',
|
||||
+ 'openssl_ex_libs_linux-x86_64': [
|
||||
],
|
||||
},
|
||||
'include_dirs': [
|
||||
diff --git a/deps/openssl/openssl/crypto/rand/rand_unix.c b/deps/openssl/openssl/crypto/rand/rand_unix.c
|
||||
index 43f1069..63b38f2 100644
|
||||
--- a/deps/openssl/openssl/crypto/rand/rand_unix.c
|
||||
+++ b/deps/openssl/openssl/crypto/rand/rand_unix.c
|
||||
@@ -372,7 +372,7 @@ static ssize_t syscall_random(void *buf, size_t buflen)
|
||||
* Note: Sometimes getentropy() can be provided but not implemented
|
||||
* internally. So we need to check errno for ENOSYS
|
||||
*/
|
||||
-# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux)
|
||||
+# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux) && !defined(__HAIKU__)
|
||||
extern int getentropy(void *buffer, size_t length) __attribute__((weak));
|
||||
|
||||
if (getentropy != NULL) {
|
||||
diff --git a/deps/openssl/openssl_common.gypi b/deps/openssl/openssl_common.gypi
|
||||
index d866630..52558d8 100644
|
||||
--- a/deps/openssl/openssl_common.gypi
|
||||
+++ b/deps/openssl/openssl_common.gypi
|
||||
@@ -56,7 +56,14 @@
|
||||
'ENGINESDIR="/dev/null"',
|
||||
'__EXTENSIONS__'
|
||||
],
|
||||
- }, {
|
||||
+ },'OS=="haiku"', {
|
||||
+ '!ldflags': ['-pthread', '-pthreads'],
|
||||
+ 'defines': [
|
||||
+ 'OPENSSLDIR="/boot/system/data/ssl/"',
|
||||
+ 'ENGINESDIR="/dev/null"',
|
||||
+ 'TERMIOS',
|
||||
+ ],
|
||||
+ },{
|
||||
# linux and others
|
||||
'cflags': ['-Wno-missing-field-initializers',],
|
||||
'defines': [
|
||||
diff --git a/node.gypi b/node.gypi
|
||||
index 713ddbb..5249ffe 100644
|
||||
--- a/node.gypi
|
||||
+++ b/node.gypi
|
||||
@@ -256,6 +256,16 @@
|
||||
'NODE_PLATFORM="sunos"',
|
||||
],
|
||||
}],
|
||||
+ [ 'OS=="haiku"', {
|
||||
+ 'libraries': [
|
||||
+ '-lroot',
|
||||
+ '-lnetwork',
|
||||
+ '-lbsd',
|
||||
+ ],
|
||||
+ 'defines': [
|
||||
+ 'NODE_PLATFORM="haiku"',
|
||||
+ ],
|
||||
+ }],
|
||||
[ '(OS=="freebsd" or OS=="linux") and node_shared=="false"'
|
||||
' and force_load=="true"', {
|
||||
'ldflags': [
|
||||
diff --git a/src/node.cc b/src/node.cc
|
||||
index acf4f0f..58ac3d1 100644
|
||||
--- a/src/node.cc
|
||||
+++ b/src/node.cc
|
||||
@@ -622,7 +622,7 @@ inline void PlatformInit() {
|
||||
if (nr == SIGKILL || nr == SIGSTOP)
|
||||
continue;
|
||||
act.sa_handler = (nr == SIGPIPE || nr == SIGXFSZ) ? SIG_IGN : SIG_DFL;
|
||||
- CHECK_EQ(0, sigaction(nr, &act, nullptr));
|
||||
+ //CHECK_EQ(0, sigaction(nr, &act, nullptr));
|
||||
}
|
||||
#endif // !NODE_SHARED_MODE
|
||||
|
||||
diff --git a/src/node_os.cc b/src/node_os.cc
|
||||
index 2bbb56a..ff3c466 100644
|
||||
--- a/src/node_os.cc
|
||||
+++ b/src/node_os.cc
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <array>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
-
|
||||
+#include <iostream>
|
||||
namespace node {
|
||||
namespace os {
|
||||
|
||||
@@ -115,7 +115,17 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
|
||||
std::vector<Local<Value>> result;
|
||||
result.reserve(count * 7);
|
||||
for (int i = 0; i < count; i++) {
|
||||
+ /*
|
||||
uv_cpu_info_t* ci = cpu_infos + i;
|
||||
+
|
||||
+ std::cout << ci->speed << std::endl;
|
||||
+ std::cout << ci->model << std::endl;
|
||||
+ std::cout << ci->cpu_times.user << std::endl;
|
||||
+ std::cout << ci->cpu_times.nice << std::endl;
|
||||
+ std::cout << ci->cpu_times.sys << std::endl;
|
||||
+ std::cout << ci->cpu_times.idle << std::endl;
|
||||
+ std::cout << ci->cpu_times.irq << std::endl;
|
||||
+
|
||||
result.emplace_back(OneByteString(isolate, ci->model));
|
||||
result.emplace_back(Number::New(isolate, ci->speed));
|
||||
result.emplace_back(
|
||||
@@ -128,10 +138,11 @@ static void GetCPUInfo(const FunctionCallbackInfo<Value>& args) {
|
||||
Number::New(isolate, static_cast<double>(ci->cpu_times.idle)));
|
||||
result.emplace_back(
|
||||
Number::New(isolate, static_cast<double>(ci->cpu_times.irq)));
|
||||
+ */
|
||||
}
|
||||
|
||||
uv_free_cpu_info(cpu_infos, count);
|
||||
- args.GetReturnValue().Set(Array::New(isolate, result.data(), result.size()));
|
||||
+ // args.GetReturnValue().Set(Array::New(isolate, result.data(), result.size()));
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/node_report.cc b/src/node_report.cc
|
||||
index f1d8d19..bfd8f64 100644
|
||||
--- a/src/node_report.cc
|
||||
+++ b/src/node_report.cc
|
||||
@@ -720,16 +720,16 @@ static void PrintSystemInformation(JSONWriter* writer) {
|
||||
{"core_file_size_blocks", RLIMIT_CORE},
|
||||
{"data_seg_size_kbytes", RLIMIT_DATA},
|
||||
{"file_size_blocks", RLIMIT_FSIZE},
|
||||
-#if !(defined(_AIX) || defined(__sun))
|
||||
+#if !(defined(_AIX) || defined(__sun) || defined(__HAIKU__))
|
||||
{"max_locked_memory_bytes", RLIMIT_MEMLOCK},
|
||||
#endif
|
||||
-#ifndef __sun
|
||||
+#if !(defined(__sun) || defined(__HAIKU__))
|
||||
{"max_memory_size_kbytes", RLIMIT_RSS},
|
||||
#endif
|
||||
{"open_files", RLIMIT_NOFILE},
|
||||
{"stack_size_bytes", RLIMIT_STACK},
|
||||
{"cpu_time_seconds", RLIMIT_CPU},
|
||||
-#ifndef __sun
|
||||
+#if !(defined(__sun) || defined(__HAIKU__))
|
||||
{"max_user_processes", RLIMIT_NPROC},
|
||||
#endif
|
||||
#ifndef __OpenBSD__
|
||||
diff --git a/tools/utils.py b/tools/utils.py
|
||||
index 9d53bd5..236fabb 100644
|
||||
--- a/tools/utils.py
|
||||
+++ b/tools/utils.py
|
||||
@@ -59,6 +59,8 @@ def GuessOS():
|
||||
return 'win32'
|
||||
elif id == 'FreeBSD':
|
||||
return 'freebsd'
|
||||
+ elif id == 'Haiku':
|
||||
+ return 'haiku'
|
||||
elif id == 'OpenBSD':
|
||||
return 'openbsd'
|
||||
elif id == 'SunOS':
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 586c6ac1cc9dd7f5601616172061dffe0a2ee493 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 27 Mar 2021 14:01:44 +0100
|
||||
Subject: Haiku v8 patches
|
||||
|
||||
|
||||
diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn
|
||||
index 3e48fb1..5088c13 100644
|
||||
--- a/deps/v8/BUILD.gn
|
||||
+++ b/deps/v8/BUILD.gn
|
||||
@@ -378,7 +378,7 @@ if (v8_enable_snapshot_native_code_counters == "") {
|
||||
}
|
||||
if (v8_enable_pointer_compression == "") {
|
||||
v8_enable_pointer_compression =
|
||||
- v8_current_cpu == "arm64" || v8_current_cpu == "x64"
|
||||
+ (v8_current_cpu == "arm64" || v8_current_cpu == "x64") && !is_haiku
|
||||
}
|
||||
if (v8_enable_pointer_compression_shared_cage == "") {
|
||||
v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression
|
||||
@@ -1185,7 +1185,7 @@ config("toolchain") {
|
||||
}
|
||||
}
|
||||
|
||||
- if (is_clang) {
|
||||
+ if (is_clang && !is_haiku) {
|
||||
cflags += [ "-Wmissing-field-initializers" ]
|
||||
|
||||
if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") {
|
||||
@@ -4850,6 +4850,11 @@ v8_component("v8_libbase") {
|
||||
"src/base/platform/platform-fuchsia.cc",
|
||||
]
|
||||
deps += [ "//third_party/fuchsia-sdk/sdk/pkg/zx" ]
|
||||
+ } else if (is_haiku) {
|
||||
+ sources += [
|
||||
+ "src/base/debug/stack_trace_posix.cc",
|
||||
+ "src/base/platform/platform-haiku.cc",
|
||||
+ ]
|
||||
} else if (is_mac || is_ios) {
|
||||
sources += [
|
||||
"src/base/debug/stack_trace_posix.cc",
|
||||
@@ -5609,6 +5614,13 @@ if (is_fuchsia && !build_with_chromium) {
|
||||
|
||||
group("v8_fuzzers") {
|
||||
testonly = true
|
||||
+
|
||||
+ if(host_os == "haiku"){
|
||||
+ data_deps = []
|
||||
+ }
|
||||
+
|
||||
+ if (host_os != "haiku") {
|
||||
+
|
||||
data_deps = [
|
||||
":v8_simple_inspector_fuzzer",
|
||||
":v8_simple_json_fuzzer",
|
||||
@@ -5814,6 +5826,8 @@ v8_executable("v8_hello_world") {
|
||||
":v8_libplatform",
|
||||
"//build/win:default_exe_manifest",
|
||||
]
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
v8_executable("v8_sample_process") {
|
||||
diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h
|
||||
index b010b65..304764d 100644
|
||||
--- a/deps/v8/include/v8config.h
|
||||
+++ b/deps/v8/include/v8config.h
|
||||
@@ -69,6 +69,7 @@ path. Add it with -I<path> to the command line
|
||||
// V8_OS_CYGWIN - Cygwin
|
||||
// V8_OS_DRAGONFLYBSD - DragonFlyBSD
|
||||
// V8_OS_FREEBSD - FreeBSD
|
||||
+// V8_OS_HAIKU - Haiku
|
||||
// V8_OS_FUCHSIA - Fuchsia
|
||||
// V8_OS_LINUX - Linux
|
||||
// V8_OS_MACOSX - Mac OS X
|
||||
@@ -129,6 +130,11 @@ path. Add it with -I<path> to the command line
|
||||
# define V8_OS_POSIX 1
|
||||
# define V8_OS_STRING "freebsd"
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+# define V8_OS_HAIKU 1
|
||||
+# define V8_OS_POSIX 1
|
||||
+# define V8_OS_STRING "haiku"
|
||||
+
|
||||
#elif defined(__Fuchsia__)
|
||||
# define V8_OS_FUCHSIA 1
|
||||
# define V8_OS_POSIX 1
|
||||
diff --git a/deps/v8/src/base/debug/stack_trace_posix.cc b/deps/v8/src/base/debug/stack_trace_posix.cc
|
||||
index 270f1ca..f3b680f 100644
|
||||
--- a/deps/v8/src/base/debug/stack_trace_posix.cc
|
||||
+++ b/deps/v8/src/base/debug/stack_trace_posix.cc
|
||||
@@ -25,14 +25,15 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
-#if V8_LIBC_GLIBC || V8_LIBC_BSD || V8_LIBC_UCLIBC || V8_OS_SOLARIS
|
||||
+#if V8_LIBC_GLIBC || V8_LIBC_BSD || V8_LIBC_UCLIBC || V8_OS_SOLARIS || V8_OS_HAIKU
|
||||
#define HAVE_EXECINFO_H 1
|
||||
#endif
|
||||
|
||||
-#if HAVE_EXECINFO_H
|
||||
+#if defined(HAVE_EXECINFO_H)
|
||||
#include <cxxabi.h>
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
+
|
||||
#if V8_OS_MACOSX
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
diff --git a/deps/v8/src/base/export-template.h b/deps/v8/src/base/export-template.h
|
||||
index 861cfe4..8c6d885 100644
|
||||
--- a/deps/v8/src/base/export-template.h
|
||||
+++ b/deps/v8/src/base/export-template.h
|
||||
@@ -83,6 +83,7 @@
|
||||
// definition sites instead.
|
||||
#define EXPORT_TEMPLATE_DECLARE_MSVC_HACK(export, _)
|
||||
#define EXPORT_TEMPLATE_DEFINE_MSVC_HACK(export, _) export
|
||||
+#define EXPORT_TEMPLATE_TEST_MSVC_HACK_DEFAULT(...) true
|
||||
|
||||
// EXPORT_TEMPLATE_STYLE is an internal helper macro that identifies which
|
||||
// export style needs to be used for the provided FOO_EXPORT macro definition.
|
||||
@@ -159,5 +160,5 @@ EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport));
|
||||
#undef EXPORT_TEMPLATE_TEST
|
||||
#undef EXPORT_TEMPLATE_TEST_DEFAULT_DEFAULT
|
||||
#undef EXPORT_TEMPLATE_TEST_MSVC_HACK_MSVC_HACK
|
||||
-
|
||||
+#undef EXPORT_TEMPLATE_TEST_MSVC_HACK_DEFAULT
|
||||
#endif // V8_BASE_EXPORT_TEMPLATE_H_
|
||||
diff --git a/deps/v8/src/base/platform/platform-haiku.cc b/deps/v8/src/base/platform/platform-haiku.cc
|
||||
new file mode 100644
|
||||
index 0000000..fa6656e
|
||||
--- /dev/null
|
||||
+++ b/deps/v8/src/base/platform/platform-haiku.cc
|
||||
@@ -0,0 +1,59 @@
|
||||
+// Copyright 2012 the V8 project authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+// Platform-specific code for Haiku goes here. For the POSIX-compatible
|
||||
+// parts, the implementation is in platform-posix.cc.
|
||||
+
|
||||
+#include <pthread.h>
|
||||
+#include <semaphore.h>
|
||||
+#include <signal.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <sys/resource.h>
|
||||
+#include <sys/time.h>
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
+#include <fcntl.h> // open
|
||||
+#include <sys/mman.h> // mmap & munmap
|
||||
+#include <sys/stat.h> // open
|
||||
+#include <unistd.h> // sysconf
|
||||
+#include <errno.h>
|
||||
+#include <limits.h>
|
||||
+#include <stdarg.h>
|
||||
+#include <strings.h> // index
|
||||
+
|
||||
+#include <cmath>
|
||||
+
|
||||
+#include <OS.h>
|
||||
+
|
||||
+#undef MAP_TYPE
|
||||
+
|
||||
+#include "src/base/macros.h"
|
||||
+#include "src/base/platform/platform-posix-time.h"
|
||||
+#include "src/base/platform/platform-posix.h"
|
||||
+#include "src/base/platform/platform.h"
|
||||
+
|
||||
+namespace v8 {
|
||||
+namespace base {
|
||||
+
|
||||
+TimezoneCache* OS::CreateTimezoneCache() {
|
||||
+ return new PosixDefaultTimezoneCache();
|
||||
+}
|
||||
+
|
||||
+std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
|
||||
+ return std::vector<SharedLibraryAddress>();
|
||||
+}
|
||||
+
|
||||
+void OS::SignalCodeMovingGC() {}
|
||||
+
|
||||
+void OS::AdjustSchedulingParams() {}
|
||||
+
|
||||
+// static
|
||||
+Stack::StackSlot Stack::GetStackStart() {
|
||||
+ thread_info threadInfo;
|
||||
+ get_thread_info(find_thread(NULL), &threadInfo);
|
||||
+ return threadInfo.stack_base;
|
||||
+}
|
||||
+
|
||||
+} // namespace base
|
||||
+} // namespace v8
|
||||
diff --git a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc
|
||||
index 179a17c..87985a4 100644
|
||||
--- a/deps/v8/src/base/platform/platform-posix.cc
|
||||
+++ b/deps/v8/src/base/platform/platform-posix.cc
|
||||
@@ -61,7 +61,7 @@
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
-#if !defined(_AIX) && !defined(V8_OS_FUCHSIA)
|
||||
+#if !defined(_AIX) && !defined(V8_OS_FUCHSIA) && !defined(__HAIKU__)
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
@@ -77,6 +77,14 @@ extern int madvise(caddr_t, size_t, int);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#if defined(__HAIKU__)
|
||||
+extern "C" int posix_madvise(void*, size_t, int);
|
||||
+#endif
|
||||
+
|
||||
+#if defined(__HAIKU__)
|
||||
+#define MADV_FREE POSIX_MADV_DONTNEED
|
||||
+#endif
|
||||
+
|
||||
#ifndef MADV_FREE
|
||||
#define MADV_FREE MADV_DONTNEED
|
||||
#endif
|
||||
@@ -473,6 +481,8 @@ bool OS::DiscardSystemPages(void* address, size_t size) {
|
||||
int ret = madvise(address, size, MADV_FREE_REUSABLE);
|
||||
#elif defined(_AIX) || defined(V8_OS_SOLARIS)
|
||||
int ret = madvise(reinterpret_cast<caddr_t>(address), size, MADV_FREE);
|
||||
+#elif defined(__HAIKU__)
|
||||
+ int ret = posix_madvise(address, size, MADV_FREE);
|
||||
#else
|
||||
int ret = madvise(address, size, MADV_FREE);
|
||||
#endif
|
||||
@@ -484,6 +494,8 @@ bool OS::DiscardSystemPages(void* address, size_t size) {
|
||||
// imply runtime support.
|
||||
#if defined(_AIX) || defined(V8_OS_SOLARIS)
|
||||
ret = madvise(reinterpret_cast<caddr_t>(address), size, MADV_DONTNEED);
|
||||
+#elif defined(__HAIKU__)
|
||||
+ ret = posix_madvise(address, size, MADV_FREE);
|
||||
#else
|
||||
ret = madvise(address, size, MADV_DONTNEED);
|
||||
#endif
|
||||
@@ -1030,7 +1042,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
|
||||
// keep this version in POSIX as most Linux-compatible derivatives will
|
||||
// support it. MacOS and FreeBSD are different here.
|
||||
#if !defined(V8_OS_FREEBSD) && !defined(V8_OS_MACOSX) && !defined(_AIX) && \
|
||||
- !defined(V8_OS_SOLARIS)
|
||||
+ !defined(V8_OS_SOLARIS) && !defined(V8_OS_HAIKU)
|
||||
|
||||
// static
|
||||
Stack::StackSlot Stack::GetStackStart() {
|
||||
diff --git a/deps/v8/src/libsampler/sampler.cc b/deps/v8/src/libsampler/sampler.cc
|
||||
index 49c8406..c8e8ee7 100644
|
||||
--- a/deps/v8/src/libsampler/sampler.cc
|
||||
+++ b/deps/v8/src/libsampler/sampler.cc
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <atomic>
|
||||
|
||||
-#if !V8_OS_QNX && !V8_OS_AIX
|
||||
+#if !V8_OS_QNX && !V8_OS_AIX && !V8_OS_HAIKU
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <mach/mach.h>
|
||||
// OpenBSD doesn't have <ucontext.h>. ucontext_t lives in <signal.h>
|
||||
// and is a typedef for struct sigcontext. There is no uc_mcontext.
|
||||
-#elif !V8_OS_OPENBSD
|
||||
+#elif !V8_OS_OPENBSD && !V8_OS_HAIKU
|
||||
#include <ucontext.h>
|
||||
#endif
|
||||
|
||||
@@ -491,6 +491,16 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
|
||||
state->sp = reinterpret_cast<void*>(mcontext.__gregs[_REG_SP]);
|
||||
state->fp = reinterpret_cast<void*>(mcontext.__gregs[_REG_FP]);
|
||||
#endif // V8_HOST_ARCH_*
|
||||
+#elif V8_OS_HAIKU
|
||||
+#if V8_HOST_ARCH_IA32
|
||||
+ state->pc = reinterpret_cast<void*>(mcontext.eip);
|
||||
+ state->sp = reinterpret_cast<void*>(mcontext.esp);
|
||||
+ state->fp = reinterpret_cast<void*>(mcontext.ebp);
|
||||
+#elif V8_HOST_ARCH_X64
|
||||
+ state->pc = reinterpret_cast<void*>(mcontext.rip);
|
||||
+ state->sp = reinterpret_cast<void*>(mcontext.rsp);
|
||||
+ state->fp = reinterpret_cast<void*>(mcontext.rbp);
|
||||
+#endif // V8_HOST_ARCH_*
|
||||
#elif V8_OS_NETBSD
|
||||
#if V8_HOST_ARCH_IA32
|
||||
state->pc = reinterpret_cast<void*>(mcontext.__gregs[_REG_EIP]);
|
||||
diff --git a/deps/v8/tools/mb/mb.py b/deps/v8/tools/mb/mb.py
|
||||
index 42ed60c..5217fca 100755
|
||||
--- a/deps/v8/tools/mb/mb.py
|
||||
+++ b/deps/v8/tools/mb/mb.py
|
||||
@@ -903,12 +903,15 @@ class MetaBuildWrapper(object):
|
||||
subdir, exe = 'linux64', 'gn'
|
||||
elif self.platform == 'darwin':
|
||||
subdir, exe = 'mac', 'gn'
|
||||
+ elif self.platform == 'haiku1':
|
||||
+ subdir, exe = 'haiku','gn'
|
||||
+ gn_path = "/bin/gn"
|
||||
else:
|
||||
subdir, exe = 'win', 'gn.exe'
|
||||
|
||||
arch = platform.machine()
|
||||
if (arch.startswith('s390') or arch.startswith('ppc') or
|
||||
- self.platform.startswith('aix')):
|
||||
+ self.platform.startswith('aix') or self.platform.startswith('haiku')):
|
||||
# use gn in PATH
|
||||
gn_path = 'gn'
|
||||
else:
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 0463d29b702b80935ffb03b77811318be7c7e60c Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 27 Mar 2021 18:23:32 +0100
|
||||
Subject: v8 gyp build for Haiku
|
||||
|
||||
|
||||
diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi
|
||||
index 272f358..ad803a6 100644
|
||||
--- a/tools/v8_gypfiles/features.gypi
|
||||
+++ b/tools/v8_gypfiles/features.gypi
|
||||
@@ -46,6 +46,11 @@
|
||||
}, {
|
||||
'is_fuchsia': 0,
|
||||
}],
|
||||
+ ['OS == "haiku"', {
|
||||
+ 'is_haiku': 1,
|
||||
+ }, {
|
||||
+ 'is_haiku': 0,
|
||||
+ }],
|
||||
['OS=="android"', { # GYP reverts OS to linux so use `-D OS=android`
|
||||
'is_android': 1,
|
||||
}, {
|
||||
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
|
||||
index 0a39f77..97994fe 100644
|
||||
--- a/tools/v8_gypfiles/v8.gyp
|
||||
+++ b/tools/v8_gypfiles/v8.gyp
|
||||
@@ -1152,6 +1152,17 @@
|
||||
'<(V8_ROOT)/src/base/platform/platform-fuchsia.cc',
|
||||
]
|
||||
}],
|
||||
+ ['is_haiku', {
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-lexecinfo',
|
||||
+ ]
|
||||
+ },
|
||||
+ 'sources': [
|
||||
+ '<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
|
||||
+ '<(V8_ROOT)/src/base/platform/platform-haiku.cc',
|
||||
+ ]
|
||||
+ }],
|
||||
['OS == "mac" or OS == "ios"', {
|
||||
'sources': [
|
||||
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From ebd237e4ac5522e4240135759f810322792ded2a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 15 Oct 2021 22:06:57 +0200
|
||||
Subject: ares compat
|
||||
|
||||
our gcc/binutils doesn't seem to handle "extern thread_local", so
|
||||
switch to __thread.
|
||||
|
||||
diff --git a/deps/v8/src/trap-handler/trap-handler.h b/deps/v8/src/trap-handler/trap-handler.h
|
||||
index 0b3a6e0..78e664a 100644
|
||||
--- a/deps/v8/src/trap-handler/trap-handler.h
|
||||
+++ b/deps/v8/src/trap-handler/trap-handler.h
|
||||
@@ -118,7 +118,7 @@ inline bool IsTrapHandlerEnabled() {
|
||||
return g_is_trap_handler_enabled;
|
||||
}
|
||||
|
||||
-#if defined(V8_OS_AIX)
|
||||
+#if defined(V8_OS_AIX) || defined(V8_OS_HAIKU)
|
||||
// `thread_local` does not link on AIX:
|
||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100641
|
||||
extern __thread int g_thread_in_wasm_code;
|
||||
diff --git a/src/cares_wrap.h b/src/cares_wrap.h
|
||||
index 60f99e6..44e254b 100644
|
||||
--- a/src/cares_wrap.h
|
||||
+++ b/src/cares_wrap.h
|
||||
@@ -22,7 +22,7 @@
|
||||
# include <netdb.h>
|
||||
#endif // __POSIX__
|
||||
|
||||
-# include <ares_nameser.h>
|
||||
+# include <arpa/nameser.h>
|
||||
|
||||
namespace node {
|
||||
namespace cares_wrap {
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 85e2fbaf4ccb8edcfd2d21728ec49a2dc8a76e1c Mon Sep 17 00:00:00 2001
|
||||
From f108b32da8c955ff9c4cbd1fc2582fe5e4c68df0 Mon Sep 17 00:00:00 2001
|
||||
From: Calvin Hill <calvin@hakobaito.co.uk>
|
||||
Date: Wed, 22 May 2019 11:23:37 +0000
|
||||
Subject: Initial support for Node.js
|
||||
@@ -273,10 +273,10 @@ index f0172b3..d7cb21a 100644
|
||||
return 'openbsd'
|
||||
elif id == 'SunOS':
|
||||
--
|
||||
2.45.2
|
||||
2.48.1
|
||||
|
||||
|
||||
From 945e896f009f266c9176512c2dfb2a7109d2c69a Mon Sep 17 00:00:00 2001
|
||||
From 0491eddd1e16a3b9f171239ed1894a0739152cc8 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 27 Mar 2021 14:01:44 +0100
|
||||
Subject: Haiku v8 patches
|
||||
@@ -598,10 +598,10 @@ index f42b52b..1b59e8c 100755
|
||||
gn_path = 'gn'
|
||||
else:
|
||||
--
|
||||
2.45.2
|
||||
2.48.1
|
||||
|
||||
|
||||
From eac024fb73493ffca36ed55b3557116c820adadb Mon Sep 17 00:00:00 2001
|
||||
From 9f0942025bfb493a6685a3f82788ef02feed2a70 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sat, 27 Mar 2021 18:23:32 +0100
|
||||
Subject: v8 gyp build for Haiku
|
||||
@@ -646,10 +646,10 @@ index 9ffa6e9..d4aab88 100644
|
||||
'sources': [
|
||||
'<(V8_ROOT)/src/base/debug/stack_trace_posix.cc',
|
||||
--
|
||||
2.45.2
|
||||
2.48.1
|
||||
|
||||
|
||||
From 62d08ffefae3edafee09c3bd82d2fe9273288683 Mon Sep 17 00:00:00 2001
|
||||
From 69db013f67fbf46e326e9655fd01ab7f31054efc Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 15 Oct 2021 22:06:57 +0200
|
||||
Subject: ares compat
|
||||
@@ -685,5 +685,5 @@ index 021ef1c..a53ef2a 100644
|
||||
namespace node {
|
||||
namespace cares_wrap {
|
||||
--
|
||||
2.45.2
|
||||
2.48.1
|
||||
|
||||
|
||||
144
net-libs/nodejs/patches/nodejs_x86-20.15.1.patchset
Normal file
144
net-libs/nodejs/patches/nodejs_x86-20.15.1.patchset
Normal file
@@ -0,0 +1,144 @@
|
||||
From 49a0bf642387802b0842409bbd118d11ad1f71cd Mon Sep 17 00:00:00 2001
|
||||
From: Begasus <begasus@gmail.com>
|
||||
Date: Thu, 5 Jun 2025 12:06:13 +0200
|
||||
Subject: Fix up type-mismatch in function declarations
|
||||
|
||||
Co-authored-by: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
|
||||
diff --git a/deps/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h b/deps/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h
|
||||
index c3ecfca..df0f88d 100644
|
||||
--- a/deps/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h
|
||||
+++ b/deps/v8/src/wasm/baseline/ia32/liftoff-assembler-ia32.h
|
||||
@@ -43,7 +43,7 @@ static constexpr LiftoffRegList kByteRegs =
|
||||
LiftoffRegList::FromBits<RegList{eax, ecx, edx}.bits()>();
|
||||
|
||||
inline void Load(LiftoffAssembler* assm, LiftoffRegister dst, Register base,
|
||||
- int32_t offset, ValueKind kind) {
|
||||
+ uintptr_t offset, ValueKind kind) {
|
||||
Operand src(base, offset);
|
||||
switch (kind) {
|
||||
case kI32:
|
||||
@@ -70,7 +70,7 @@ inline void Load(LiftoffAssembler* assm, LiftoffRegister dst, Register base,
|
||||
}
|
||||
}
|
||||
|
||||
-inline void Store(LiftoffAssembler* assm, Register base, int32_t offset,
|
||||
+inline void Store(LiftoffAssembler* assm, Register base, uintptr_t offset,
|
||||
LiftoffRegister src, ValueKind kind) {
|
||||
Operand dst(base, offset);
|
||||
switch (kind) {
|
||||
@@ -419,7 +419,7 @@ void LiftoffAssembler::StoreTaggedPointer(Register dst_addr,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
|
||||
- Register offset_reg, uint32_t offset_imm,
|
||||
+ Register offset_reg, uintptr_t offset_imm,
|
||||
LoadType type, uint32_t* protected_load_pc,
|
||||
bool /* is_load_mem */, bool /* i64_offset */,
|
||||
bool needs_shift) {
|
||||
@@ -499,7 +499,7 @@ void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm, LiftoffRegister src,
|
||||
+ uintptr_t offset_imm, LiftoffRegister src,
|
||||
StoreType type, LiftoffRegList pinned,
|
||||
uint32_t* protected_store_pc,
|
||||
bool /* is_store_mem */, bool /* i64_offset */) {
|
||||
@@ -568,7 +568,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, Register src_addr,
|
||||
- Register offset_reg, uint32_t offset_imm,
|
||||
+ Register offset_reg, uintptr_t offset_imm,
|
||||
LoadType type, LiftoffRegList /* pinned */,
|
||||
bool /* i64_offset */) {
|
||||
if (type.value() != LoadType::kI64Load) {
|
||||
@@ -588,7 +588,7 @@ void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, Register src_addr,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicStore(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm, LiftoffRegister src,
|
||||
+ uintptr_t offset_imm, LiftoffRegister src,
|
||||
StoreType type, LiftoffRegList pinned,
|
||||
bool /* i64_offset */) {
|
||||
DCHECK_NE(offset_reg, no_reg);
|
||||
@@ -929,7 +929,7 @@ inline void AtomicBinop64(LiftoffAssembler* lasm, Binop op, Register dst_addr,
|
||||
} // namespace liftoff
|
||||
|
||||
void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm, LiftoffRegister value,
|
||||
+ uintptr_t offset_imm, LiftoffRegister value,
|
||||
LiftoffRegister result, StoreType type,
|
||||
bool /* i64_offset */) {
|
||||
if (type.value() == StoreType::kI64Store) {
|
||||
@@ -943,7 +943,7 @@ void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm, LiftoffRegister value,
|
||||
+ uintptr_t offset_imm, LiftoffRegister value,
|
||||
LiftoffRegister result, StoreType type,
|
||||
bool /* i64_offset */) {
|
||||
if (type.value() == StoreType::kI64Store) {
|
||||
@@ -956,7 +956,7 @@ void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicAnd(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm, LiftoffRegister value,
|
||||
+ uintptr_t offset_imm, LiftoffRegister value,
|
||||
LiftoffRegister result, StoreType type,
|
||||
bool /* i64_offset */) {
|
||||
if (type.value() == StoreType::kI64Store) {
|
||||
@@ -970,7 +970,7 @@ void LiftoffAssembler::AtomicAnd(Register dst_addr, Register offset_reg,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicOr(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm, LiftoffRegister value,
|
||||
+ uintptr_t offset_imm, LiftoffRegister value,
|
||||
LiftoffRegister result, StoreType type,
|
||||
bool /* i64_offset */) {
|
||||
if (type.value() == StoreType::kI64Store) {
|
||||
@@ -984,7 +984,7 @@ void LiftoffAssembler::AtomicOr(Register dst_addr, Register offset_reg,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm, LiftoffRegister value,
|
||||
+ uintptr_t offset_imm, LiftoffRegister value,
|
||||
LiftoffRegister result, StoreType type,
|
||||
bool /* i64_offset */) {
|
||||
if (type.value() == StoreType::kI64Store) {
|
||||
@@ -998,7 +998,7 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicExchange(Register dst_addr, Register offset_reg,
|
||||
- uint32_t offset_imm,
|
||||
+ uintptr_t offset_imm,
|
||||
LiftoffRegister value,
|
||||
LiftoffRegister result, StoreType type,
|
||||
bool /* i64_offset */) {
|
||||
@@ -1013,7 +1013,7 @@ void LiftoffAssembler::AtomicExchange(Register dst_addr, Register offset_reg,
|
||||
}
|
||||
|
||||
void LiftoffAssembler::AtomicCompareExchange(
|
||||
- Register dst_addr, Register offset_reg, uint32_t offset_imm,
|
||||
+ Register dst_addr, Register offset_reg, uintptr_t offset_imm,
|
||||
LiftoffRegister expected, LiftoffRegister new_value, LiftoffRegister result,
|
||||
StoreType type, bool /* i64_offset */) {
|
||||
// We expect that the offset has already been added to {dst_addr}, and no
|
||||
diff --git a/src/node_process_object.cc b/src/node_process_object.cc
|
||||
index 274f1f0..bae5e3d 100644
|
||||
--- a/src/node_process_object.cc
|
||||
+++ b/src/node_process_object.cc
|
||||
@@ -75,7 +75,7 @@ static void DebugPortSetter(Local<Name> property,
|
||||
|
||||
static void GetParentProcessId(Local<Name> property,
|
||||
const PropertyCallbackInfo<Value>& info) {
|
||||
- info.GetReturnValue().Set(uv_os_getppid());
|
||||
+ info.GetReturnValue().Set((int32_t)uv_os_getppid());
|
||||
}
|
||||
|
||||
MaybeLocal<Object> CreateProcessObject(Realm* realm) {
|
||||
--
|
||||
2.48.1
|
||||
|
||||
Reference in New Issue
Block a user