From f08fe7ef37fe81a63ff16d1c7f9ead6de5c6e11b Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 15 Oct 2021 22:16:25 +0200 Subject: [PATCH] nodejs: bump versions --- ...12.22.0.recipe => nodejs12-12.22.7.recipe} | 2 +- ...14.17.0.recipe => nodejs14-14.18.1.recipe} | 2 +- ...-16.3.0.recipe => nodejs16-16.11.1.recipe} | 2 +- ....22.0.patchset => nodejs-12.22.7.patchset} | 53 +++++-- ....17.0.patchset => nodejs-14.18.1.patchset} | 79 ++++++---- ...6.3.0.patchset => nodejs-16.11.1.patchset} | 138 +++++++++++------- 6 files changed, 181 insertions(+), 95 deletions(-) rename net-libs/nodejs/{nodejs12-12.22.0.recipe => nodejs12-12.22.7.recipe} (96%) rename net-libs/nodejs/{nodejs14-14.17.0.recipe => nodejs14-14.18.1.recipe} (96%) rename net-libs/nodejs/{nodejs16-16.3.0.recipe => nodejs16-16.11.1.recipe} (96%) rename net-libs/nodejs/patches/{nodejs-12.22.0.patchset => nodejs-12.22.7.patchset} (94%) rename net-libs/nodejs/patches/{nodejs-14.17.0.patchset => nodejs-14.18.1.patchset} (92%) rename net-libs/nodejs/patches/{nodejs-16.3.0.patchset => nodejs-16.11.1.patchset} (85%) diff --git a/net-libs/nodejs/nodejs12-12.22.0.recipe b/net-libs/nodejs/nodejs12-12.22.7.recipe similarity index 96% rename from net-libs/nodejs/nodejs12-12.22.0.recipe rename to net-libs/nodejs/nodejs12-12.22.7.recipe index be930f1c9..2d3095652 100644 --- a/net-libs/nodejs/nodejs12-12.22.0.recipe +++ b/net-libs/nodejs/nodejs12-12.22.7.recipe @@ -10,7 +10,7 @@ LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="https://nodejs.org/dist/v$portVersion/node-v$portVersion.tar.xz" SOURCE_DIR="node-v$portVersion" -CHECKSUM_SHA256="df5c5f0ebad4889f5dd24e565eaaa9cbe2ca3274f78af469d9a20cc36f60ba23" +CHECKSUM_SHA256="cc6a23b44870679a94bd8f3c8d4e1f4b77bb2712a36888ab87463459e6785f6b" PATCHES="nodejs-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2 ?x86" diff --git a/net-libs/nodejs/nodejs14-14.17.0.recipe b/net-libs/nodejs/nodejs14-14.18.1.recipe similarity index 96% rename from net-libs/nodejs/nodejs14-14.17.0.recipe rename to net-libs/nodejs/nodejs14-14.18.1.recipe index 0fe16593e..da479d802 100644 --- a/net-libs/nodejs/nodejs14-14.17.0.recipe +++ b/net-libs/nodejs/nodejs14-14.18.1.recipe @@ -10,7 +10,7 @@ LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="https://nodejs.org/dist/v$portVersion/node-v$portVersion.tar.xz" SOURCE_DIR="node-v$portVersion" -CHECKSUM_SHA256="56e05bff9331039317db417f772e635e0cd1c55f733f7b1b079d71ab5842c9ed" +CHECKSUM_SHA256="3fa1d71adddfab2f5e3e41874b4eddbdf92b65cade4a43922fb1e437afcf89ed" PATCHES="nodejs-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2 ?x86" diff --git a/net-libs/nodejs/nodejs16-16.3.0.recipe b/net-libs/nodejs/nodejs16-16.11.1.recipe similarity index 96% rename from net-libs/nodejs/nodejs16-16.3.0.recipe rename to net-libs/nodejs/nodejs16-16.11.1.recipe index ece7aa38f..35fcdc9cf 100644 --- a/net-libs/nodejs/nodejs16-16.3.0.recipe +++ b/net-libs/nodejs/nodejs16-16.11.1.recipe @@ -10,7 +10,7 @@ LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="https://github.com/nodejs/node/archive/v$portVersion/nodejs-$portVersion.tar.gz" SOURCE_DIR="node-$portVersion" -CHECKSUM_SHA256="4d2eb041b914566edbd2792c2cd9843b2a4200e4c9507bc5695e0a6d9d126933" +CHECKSUM_SHA256="cae2cee190c66d1c077f9284ff001b05901daf16e6bc0082fe2069f5623109cf" PATCHES="nodejs-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" diff --git a/net-libs/nodejs/patches/nodejs-12.22.0.patchset b/net-libs/nodejs/patches/nodejs-12.22.7.patchset similarity index 94% rename from net-libs/nodejs/patches/nodejs-12.22.0.patchset rename to net-libs/nodejs/patches/nodejs-12.22.7.patchset index 7059a8cb9..b3bf61d6e 100644 --- a/net-libs/nodejs/patches/nodejs-12.22.0.patchset +++ b/net-libs/nodejs/patches/nodejs-12.22.7.patchset @@ -1,11 +1,11 @@ -From 9419e88ca21e44917edfed599133d7f46fd0783c Mon Sep 17 00:00:00 2001 +From 7de02430ac25bb4f390c05634abfeb61ee9ca1b0 Mon Sep 17 00:00:00 2001 From: Calvin Hill 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 102f090..c7e57b9 100644 +index 34bf547..de9ab19 100644 --- a/common.gypi +++ b/common.gypi @@ -138,6 +138,9 @@ @@ -122,10 +122,10 @@ index 11d3aa6..aba5d54 100644 }, 'include_dirs': [ diff --git a/deps/openssl/openssl/crypto/rand/rand_unix.c b/deps/openssl/openssl/crypto/rand/rand_unix.c -index ec6be79..861f56a 100644 +index 43f1069..63b38f2 100644 --- a/deps/openssl/openssl/crypto/rand/rand_unix.c +++ b/deps/openssl/openssl/crypto/rand/rand_unix.c -@@ -369,7 +369,7 @@ static ssize_t syscall_random(void *buf, size_t buflen) +@@ -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 */ @@ -176,7 +176,7 @@ index 116c1c7..9d5e5f3 100644 ' and force_load=="true"', { 'ldflags': [ diff --git a/src/node.cc b/src/node.cc -index 00ae36c..87b8b03 100644 +index 46e8f74..b0452a7 100644 --- a/src/node.cc +++ b/src/node.cc @@ -554,7 +554,7 @@ inline void PlatformInit() { @@ -270,20 +270,20 @@ index 9734836..94e4d8c 100644 return 'openbsd' elif id == 'SunOS': -- -2.30.0 +2.30.2 -From 156f441d65fda25326d3c3a982dc02ac9a4ccb25 Mon Sep 17 00:00:00 2001 +From cdf8b535978b7be49f5d93473b52c16f95fa8cd5 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 27 Mar 2021 21:40:26 +0100 Subject: v8 Haiku patches diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn -index 90ec409..3f754fa 100644 +index 5c226f4..f46c2a8 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn -@@ -679,7 +679,7 @@ config("toolchain") { +@@ -682,7 +682,7 @@ config("toolchain") { } } @@ -292,7 +292,7 @@ index 90ec409..3f754fa 100644 cflags += [ "-Wmissing-field-initializers" ] if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") { -@@ -3638,6 +3638,11 @@ v8_component("v8_libbase") { +@@ -3607,6 +3607,11 @@ v8_component("v8_libbase") { "src/base/debug/stack_trace_fuchsia.cc", "src/base/platform/platform-fuchsia.cc", ] @@ -304,7 +304,7 @@ index 90ec409..3f754fa 100644 } else if (is_mac || is_ios) { sources += [ "src/base/debug/stack_trace_posix.cc", -@@ -4076,6 +4081,13 @@ if (is_fuchsia && !build_with_chromium) { +@@ -4045,6 +4050,13 @@ if (is_fuchsia && !build_with_chromium) { group("v8_fuzzers") { testonly = true @@ -318,7 +318,7 @@ index 90ec409..3f754fa 100644 data_deps = [ ":v8_simple_json_fuzzer", ":v8_simple_multi_return_fuzzer", -@@ -4087,6 +4099,8 @@ group("v8_fuzzers") { +@@ -4056,6 +4068,8 @@ group("v8_fuzzers") { ":v8_simple_wasm_compile_fuzzer", ":v8_simple_wasm_fuzzer", ] @@ -562,10 +562,10 @@ index f66f82a..f20ff24 100755 gn_path = 'gn' else: -- -2.30.0 +2.30.2 -From a42c21ff72c6dec2384fa78d0f3634a88d2fb0b7 Mon Sep 17 00:00:00 2001 +From cea68cd380b21e5cc0986582cb5d9c81e11f16d9 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sun, 28 Mar 2021 10:37:44 +0200 Subject: v8 gyp build for Haiku @@ -610,5 +610,28 @@ index 26b8e56..f480c04 100644 'sources': [ '<(V8_ROOT)/src/base/debug/stack_trace_posix.cc', -- -2.30.0 +2.30.2 + + +From e08620dab2d8116fc6f5c009f624bf2870eb8d94 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 15 Oct 2021 14:11:45 +0200 +Subject: ares compat + + +diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc +index d54e7c6..0643dd3 100644 +--- a/src/cares_wrap.cc ++++ b/src/cares_wrap.cc +@@ -39,7 +39,7 @@ + # include + #endif // __POSIX__ + +-# include ++# include + + // OpenBSD does not define these + #ifndef AI_ALL +-- +2.30.2 diff --git a/net-libs/nodejs/patches/nodejs-14.17.0.patchset b/net-libs/nodejs/patches/nodejs-14.18.1.patchset similarity index 92% rename from net-libs/nodejs/patches/nodejs-14.17.0.patchset rename to net-libs/nodejs/patches/nodejs-14.18.1.patchset index a27735dab..0dae7626c 100644 --- a/net-libs/nodejs/patches/nodejs-14.17.0.patchset +++ b/net-libs/nodejs/patches/nodejs-14.18.1.patchset @@ -1,14 +1,14 @@ -From 191875a030e72e75da3c85c80890544f10b4c258 Mon Sep 17 00:00:00 2001 +From 32f439c802b1fa9fd8cc76f2f70b0ba1e2fe70ed Mon Sep 17 00:00:00 2001 From: Calvin Hill 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 aa4279d..e81a699 100644 +index b16f643..d6b422c 100644 --- a/common.gypi +++ b/common.gypi -@@ -257,6 +257,9 @@ +@@ -264,6 +264,9 @@ '_target_name!="<(node_core_target_name)")', { 'cflags!': ['-Werror'], }], @@ -18,7 +18,7 @@ index aa4279d..e81a699 100644 ], 'msvs_settings': { 'VCCLCompilerTool': { -@@ -285,6 +288,10 @@ +@@ -292,6 +295,10 @@ ['target_arch=="arm64"', { 'TargetMachine' : 0, # NotSet. MACHINE:ARM64 is inferred from the input files. }], @@ -29,7 +29,7 @@ index aa4279d..e81a699 100644 ], 'GenerateDebugInformation': 'true', 'SuppressStartupBanner': 'true', -@@ -345,6 +352,10 @@ +@@ -352,6 +359,10 @@ ['_type!="static_library"', { 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, }], @@ -40,7 +40,7 @@ index aa4279d..e81a699 100644 ], }], ['v8_enable_pointer_compression == 1', { -@@ -372,7 +383,7 @@ +@@ -379,7 +390,7 @@ 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], }], @@ -49,7 +49,7 @@ index aa4279d..e81a699 100644 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++1y' ], 'defines': [ '__STDC_FORMAT_MACROS' ], -@@ -386,6 +397,10 @@ +@@ -393,6 +404,10 @@ 'cflags': [ '-I/usr/local/include' ], 'ldflags': [ '-Wl,-z,wxneeded' ], }], @@ -60,7 +60,7 @@ index aa4279d..e81a699 100644 ], 'conditions': [ [ 'target_arch=="ia32"', { -@@ -545,6 +560,12 @@ +@@ -552,6 +567,12 @@ 'OPENSSL_NO_PINSHARED' ], }], @@ -74,10 +74,10 @@ index aa4279d..e81a699 100644 # `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures. 'defines': [ diff --git a/configure.py b/configure.py -index a477bd1..32b5601 100755 +index 30cf672..06475d2 100755 --- a/configure.py +++ b/configure.py -@@ -48,7 +48,7 @@ from fetch_deps import FetchDeps +@@ -54,7 +54,7 @@ from fetch_deps import FetchDeps parser = optparse.OptionParser() valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', @@ -122,10 +122,10 @@ index 11d3aa6..aba5d54 100644 }, 'include_dirs': [ diff --git a/deps/openssl/openssl/crypto/rand/rand_unix.c b/deps/openssl/openssl/crypto/rand/rand_unix.c -index ec6be79..861f56a 100644 +index 43f1069..63b38f2 100644 --- a/deps/openssl/openssl/crypto/rand/rand_unix.c +++ b/deps/openssl/openssl/crypto/rand/rand_unix.c -@@ -369,7 +369,7 @@ static ssize_t syscall_random(void *buf, size_t buflen) +@@ -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 */ @@ -176,10 +176,10 @@ index 43dbda7..dc9933d 100644 ' and force_load=="true"', { 'ldflags': [ diff --git a/src/node.cc b/src/node.cc -index 905afd8..48ade67 100644 +index e0e74d8..9f18f95 100644 --- a/src/node.cc +++ b/src/node.cc -@@ -607,7 +607,7 @@ inline void PlatformInit() { +@@ -612,7 +612,7 @@ inline void PlatformInit() { if (nr == SIGKILL || nr == SIGSTOP) continue; act.sa_handler = (nr == SIGPIPE || nr == SIGXFSZ) ? SIG_IGN : SIG_DFL; @@ -233,10 +233,10 @@ index 3cde809..fac4b87 100644 diff --git a/src/node_report.cc b/src/node_report.cc -index 13f87b1..de4455e 100644 +index a91d16d..fdaaa3a 100644 --- a/src/node_report.cc +++ b/src/node_report.cc -@@ -688,16 +688,16 @@ static void PrintSystemInformation(JSONWriter* writer) { +@@ -690,16 +690,16 @@ static void PrintSystemInformation(JSONWriter* writer) { {"core_file_size_blocks", RLIMIT_CORE}, {"data_seg_size_kbytes", RLIMIT_DATA}, {"file_size_blocks", RLIMIT_FSIZE}, @@ -257,10 +257,10 @@ index 13f87b1..de4455e 100644 #endif #ifndef __OpenBSD__ diff --git a/tools/utils.py b/tools/utils.py -index 9734836..94e4d8c 100644 +index b8963e0..f8b7954 100644 --- a/tools/utils.py +++ b/tools/utils.py -@@ -57,6 +57,8 @@ def GuessOS(): +@@ -59,6 +59,8 @@ def GuessOS(): return 'win32' elif id == 'FreeBSD': return 'freebsd' @@ -270,17 +270,17 @@ index 9734836..94e4d8c 100644 return 'openbsd' elif id == 'SunOS': -- -2.30.0 +2.30.2 -From a0f6d91f118a6f94fc276bc0e53991263b807d8c Mon Sep 17 00:00:00 2001 +From 9c960a2d1f8d476cf66bb81464f08a7e5aa739e7 Mon Sep 17 00:00:00 2001 From: Jerome Duval 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 eaaeadf..118a3b3 100644 +index a8100ad..533beba 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -260,7 +260,7 @@ if (v8_enable_snapshot_native_code_counters == "") { @@ -292,7 +292,7 @@ index eaaeadf..118a3b3 100644 } if (v8_enable_fast_torque == "") { v8_enable_fast_torque = v8_enable_fast_mksnapshot -@@ -790,7 +790,7 @@ config("toolchain") { +@@ -794,7 +794,7 @@ config("toolchain") { } } @@ -301,7 +301,7 @@ index eaaeadf..118a3b3 100644 cflags += [ "-Wmissing-field-initializers" ] if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") { -@@ -3888,6 +3888,11 @@ v8_component("v8_libbase") { +@@ -3892,6 +3892,11 @@ v8_component("v8_libbase") { "src/base/debug/stack_trace_fuchsia.cc", "src/base/platform/platform-fuchsia.cc", ] @@ -313,7 +313,7 @@ index eaaeadf..118a3b3 100644 } else if (is_mac || is_ios) { sources += [ "src/base/debug/stack_trace_posix.cc", -@@ -4432,6 +4437,13 @@ if (is_fuchsia && !build_with_chromium) { +@@ -4436,6 +4441,13 @@ if (is_fuchsia && !build_with_chromium) { group("v8_fuzzers") { testonly = true @@ -327,7 +327,7 @@ index eaaeadf..118a3b3 100644 data_deps = [ ":v8_simple_json_fuzzer", ":v8_simple_multi_return_fuzzer", -@@ -4443,6 +4455,8 @@ group("v8_fuzzers") { +@@ -4447,6 +4459,8 @@ group("v8_fuzzers") { ":v8_simple_wasm_compile_fuzzer", ":v8_simple_wasm_fuzzer", ] @@ -580,10 +580,10 @@ index f3e4615..c3649ba 100755 gn_path = 'gn' else: -- -2.30.0 +2.30.2 -From fce649d6a0bc8a424efaeb6decbedf5369109036 Mon Sep 17 00:00:00 2001 +From d36ede92f62b5386f21bb20f2bcd95f5f88793e3 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 27 Mar 2021 18:23:32 +0100 Subject: v8 gyp build for Haiku @@ -628,5 +628,28 @@ index 48ec392..5e3c90c 100644 'sources': [ '<(V8_ROOT)/src/base/debug/stack_trace_posix.cc', -- -2.30.0 +2.30.2 + + +From b5ab564aba7d6d0158cbf3c1224632bcec2e2483 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Fri, 15 Oct 2021 14:42:17 +0200 +Subject: ares compat + + +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 + #endif // __POSIX__ + +-# include ++# include + + namespace node { + namespace cares_wrap { +-- +2.30.2 diff --git a/net-libs/nodejs/patches/nodejs-16.3.0.patchset b/net-libs/nodejs/patches/nodejs-16.11.1.patchset similarity index 85% rename from net-libs/nodejs/patches/nodejs-16.3.0.patchset rename to net-libs/nodejs/patches/nodejs-16.11.1.patchset index 5bfa363a3..a6cc01d62 100644 --- a/net-libs/nodejs/patches/nodejs-16.3.0.patchset +++ b/net-libs/nodejs/patches/nodejs-16.11.1.patchset @@ -1,11 +1,11 @@ -From 8f6fef89fb8ef098c3ee66b04e673efafd045272 Mon Sep 17 00:00:00 2001 +From 3717978298bf0876ca4dfeb0b4733a8ea56ea9ec Mon Sep 17 00:00:00 2001 From: Calvin Hill 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 ee91fb1..7e8ab3e 100644 +index 6862acc..bd05e77 100644 --- a/common.gypi +++ b/common.gypi @@ -265,6 +265,9 @@ @@ -18,7 +18,7 @@ index ee91fb1..7e8ab3e 100644 ], 'msvs_settings': { 'VCCLCompilerTool': { -@@ -293,6 +296,10 @@ +@@ -294,6 +297,10 @@ ['target_arch=="arm64"', { 'TargetMachine' : 0, # NotSet. MACHINE:ARM64 is inferred from the input files. }], @@ -29,7 +29,7 @@ index ee91fb1..7e8ab3e 100644 ], 'GenerateDebugInformation': 'true', 'SuppressStartupBanner': 'true', -@@ -353,6 +360,10 @@ +@@ -354,6 +361,10 @@ ['_type!="static_library"', { 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, }], @@ -40,7 +40,7 @@ index ee91fb1..7e8ab3e 100644 ], }], ['v8_enable_pointer_compression == 1', { -@@ -380,7 +391,7 @@ +@@ -384,7 +395,7 @@ 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], }], @@ -49,7 +49,7 @@ index ee91fb1..7e8ab3e 100644 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++14' ], 'defines': [ '__STDC_FORMAT_MACROS' ], -@@ -394,6 +405,10 @@ +@@ -398,6 +409,10 @@ 'cflags': [ '-I/usr/local/include' ], 'ldflags': [ '-Wl,-z,wxneeded' ], }], @@ -60,7 +60,7 @@ index ee91fb1..7e8ab3e 100644 ], 'conditions': [ [ 'target_arch=="ia32"', { -@@ -552,6 +567,12 @@ +@@ -556,6 +571,12 @@ 'OPENSSL_NO_PINSHARED' ], }], @@ -74,10 +74,10 @@ index ee91fb1..7e8ab3e 100644 # `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures. 'defines': [ diff --git a/configure.py b/configure.py -index 05d4315..2a00675 100755 +index 6efb98c..0ca9798 100755 --- a/configure.py +++ b/configure.py -@@ -50,7 +50,7 @@ from gyp_node import run_gyp +@@ -51,7 +51,7 @@ from utils import SearchFiles parser = argparse.ArgumentParser() valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', @@ -122,10 +122,10 @@ index d473731..291779a 100644 }, 'include_dirs': [ diff --git a/deps/openssl/openssl/crypto/rand/rand_unix.c b/deps/openssl/openssl/crypto/rand/rand_unix.c -index ec6be79..861f56a 100644 +index 43f1069..63b38f2 100644 --- a/deps/openssl/openssl/crypto/rand/rand_unix.c +++ b/deps/openssl/openssl/crypto/rand/rand_unix.c -@@ -369,7 +369,7 @@ static ssize_t syscall_random(void *buf, size_t buflen) +@@ -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 */ @@ -155,7 +155,7 @@ index d866630..52558d8 100644 'cflags': ['-Wno-missing-field-initializers',], 'defines': [ diff --git a/node.gypi b/node.gypi -index a3c9279..ada02d5 100644 +index 713ddbb..5249ffe 100644 --- a/node.gypi +++ b/node.gypi @@ -256,6 +256,16 @@ @@ -176,7 +176,7 @@ index a3c9279..ada02d5 100644 ' and force_load=="true"', { 'ldflags': [ diff --git a/src/node.cc b/src/node.cc -index 6c601fb..71ccec6 100644 +index acf4f0f..58ac3d1 100644 --- a/src/node.cc +++ b/src/node.cc @@ -622,7 +622,7 @@ inline void PlatformInit() { @@ -233,10 +233,10 @@ index 2bbb56a..ff3c466 100644 diff --git a/src/node_report.cc b/src/node_report.cc -index 0144d22..34e481b 100644 +index f1d8d19..bfd8f64 100644 --- a/src/node_report.cc +++ b/src/node_report.cc -@@ -718,16 +718,16 @@ static void PrintSystemInformation(JSONWriter* writer) { +@@ -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}, @@ -257,10 +257,10 @@ index 0144d22..34e481b 100644 #endif #ifndef __OpenBSD__ diff --git a/tools/utils.py b/tools/utils.py -index 9734836..94e4d8c 100644 +index 9d53bd5..236fabb 100644 --- a/tools/utils.py +++ b/tools/utils.py -@@ -57,6 +57,8 @@ def GuessOS(): +@@ -59,6 +59,8 @@ def GuessOS(): return 'win32' elif id == 'FreeBSD': return 'freebsd' @@ -270,29 +270,29 @@ index 9734836..94e4d8c 100644 return 'openbsd' elif id == 'SunOS': -- -2.30.0 +2.30.2 -From 322daeb233a92b56e8b7cef3cd848f14fa2fc9f7 Mon Sep 17 00:00:00 2001 +From 586c6ac1cc9dd7f5601616172061dffe0a2ee493 Mon Sep 17 00:00:00 2001 From: Jerome Duval 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 a9ab678..b87fbe0 100644 +index 3e48fb1..5088c13 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn -@@ -322,7 +322,7 @@ if (v8_enable_snapshot_native_code_counters == "") { +@@ -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_fast_torque == "") { - v8_enable_fast_torque = v8_enable_fast_mksnapshot -@@ -1018,7 +1018,7 @@ config("toolchain") { + if (v8_enable_pointer_compression_shared_cage == "") { + v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression +@@ -1185,7 +1185,7 @@ config("toolchain") { } } @@ -301,7 +301,7 @@ index a9ab678..b87fbe0 100644 cflags += [ "-Wmissing-field-initializers" ] if (v8_current_cpu != "mips" && v8_current_cpu != "mipsel") { -@@ -4484,6 +4484,11 @@ v8_component("v8_libbase") { +@@ -4850,6 +4850,11 @@ v8_component("v8_libbase") { "src/base/platform/platform-fuchsia.cc", ] deps += [ "//third_party/fuchsia-sdk/sdk/pkg/zx" ] @@ -313,7 +313,7 @@ index a9ab678..b87fbe0 100644 } else if (is_mac || is_ios) { sources += [ "src/base/debug/stack_trace_posix.cc", -@@ -5182,6 +5187,13 @@ if (is_fuchsia && !build_with_chromium) { +@@ -5609,6 +5614,13 @@ if (is_fuchsia && !build_with_chromium) { group("v8_fuzzers") { testonly = true @@ -327,17 +327,17 @@ index a9ab678..b87fbe0 100644 data_deps = [ ":v8_simple_inspector_fuzzer", ":v8_simple_json_fuzzer", -@@ -5194,6 +5206,8 @@ group("v8_fuzzers") { - ":v8_simple_wasm_compile_fuzzer", - ":v8_simple_wasm_fuzzer", +@@ -5814,6 +5826,8 @@ v8_executable("v8_hello_world") { + ":v8_libplatform", + "//build/win:default_exe_manifest", ] + } + } - if (is_component_build) { + v8_executable("v8_sample_process") { diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h -index acd34d7..32d751f 100644 +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 to the command line @@ -348,13 +348,15 @@ index acd34d7..32d751f 100644 // V8_OS_FUCHSIA - Fuchsia // V8_OS_LINUX - Linux // V8_OS_MACOSX - Mac OS X -@@ -111,6 +112,9 @@ path. Add it with -I to the command line - # define V8_OS_BSD 1 - # define V8_OS_FREEBSD 1 +@@ -129,6 +130,11 @@ path. Add it with -I 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 @@ -465,7 +467,7 @@ index 0000000..fa6656e +} // 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 9e3a045..f22ee7e 100644 +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 @@ @@ -492,7 +494,7 @@ index 9e3a045..f22ee7e 100644 #ifndef MADV_FREE #define MADV_FREE MADV_DONTNEED #endif -@@ -458,6 +466,8 @@ bool OS::DiscardSystemPages(void* address, size_t size) { +@@ -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(address), size, MADV_FREE); @@ -501,7 +503,7 @@ index 9e3a045..f22ee7e 100644 #else int ret = madvise(address, size, MADV_FREE); #endif -@@ -469,6 +479,8 @@ bool OS::DiscardSystemPages(void* address, size_t size) { +@@ -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(address), size, MADV_DONTNEED); @@ -510,7 +512,7 @@ index 9e3a045..f22ee7e 100644 #else ret = madvise(address, size, MADV_DONTNEED); #endif -@@ -1016,7 +1028,7 @@ void Thread::SetThreadLocal(LocalStorageKey key, void* value) { +@@ -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) && \ @@ -520,7 +522,7 @@ index 9e3a045..f22ee7e 100644 // static Stack::StackSlot Stack::GetStackStart() { diff --git a/deps/v8/src/libsampler/sampler.cc b/deps/v8/src/libsampler/sampler.cc -index e933c61..8cb384d 100644 +index 49c8406..c8e8ee7 100644 --- a/deps/v8/src/libsampler/sampler.cc +++ b/deps/v8/src/libsampler/sampler.cc @@ -12,7 +12,7 @@ @@ -529,7 +531,7 @@ index e933c61..8cb384d 100644 -#if !V8_OS_QNX && !V8_OS_AIX +#if !V8_OS_QNX && !V8_OS_AIX && !V8_OS_HAIKU - #include // NOLINT + #include #endif @@ -20,7 +20,7 @@ @@ -541,7 +543,7 @@ index e933c61..8cb384d 100644 #include #endif -@@ -489,6 +489,16 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) { +@@ -491,6 +491,16 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) { state->sp = reinterpret_cast(mcontext.__gregs[_REG_SP]); state->fp = reinterpret_cast(mcontext.__gregs[_REG_FP]); #endif // V8_HOST_ARCH_* @@ -559,10 +561,10 @@ index e933c61..8cb384d 100644 #if V8_HOST_ARCH_IA32 state->pc = reinterpret_cast(mcontext.__gregs[_REG_EIP]); diff --git a/deps/v8/tools/mb/mb.py b/deps/v8/tools/mb/mb.py -index 8ca9089..7615f31 100755 +index 42ed60c..5217fca 100755 --- a/deps/v8/tools/mb/mb.py +++ b/deps/v8/tools/mb/mb.py -@@ -873,12 +873,15 @@ class MetaBuildWrapper(object): +@@ -903,12 +903,15 @@ class MetaBuildWrapper(object): subdir, exe = 'linux64', 'gn' elif self.platform == 'darwin': subdir, exe = 'mac', 'gn' @@ -580,17 +582,17 @@ index 8ca9089..7615f31 100755 gn_path = 'gn' else: -- -2.30.0 +2.30.2 -From 9242030ae4d54237cfc85ac0c4ca4c8458afdf0a Mon Sep 17 00:00:00 2001 +From 0463d29b702b80935ffb03b77811318be7c7e60c Mon Sep 17 00:00:00 2001 From: Jerome Duval 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 9767630..55dbb38 100644 +index 272f358..ad803a6 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -46,6 +46,11 @@ @@ -606,10 +608,10 @@ index 9767630..55dbb38 100644 'is_android': 1, }, { diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp -index f20c9d5..7246f62 100644 +index 0a39f77..97994fe 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp -@@ -959,6 +959,17 @@ +@@ -1152,6 +1152,17 @@ '<(V8_ROOT)/src/base/platform/platform-fuchsia.cc', ] }], @@ -628,5 +630,43 @@ index f20c9d5..7246f62 100644 'sources': [ '<(V8_ROOT)/src/base/debug/stack_trace_posix.cc', -- -2.30.0 +2.30.2 + + +From ebd237e4ac5522e4240135759f810322792ded2a Mon Sep 17 00:00:00 2001 +From: Jerome Duval +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 + #endif // __POSIX__ + +-# include ++# include + + namespace node { + namespace cares_wrap { +-- +2.30.2