# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= nodejs VERSION= 22.0.0 KEYWORDS= www lang VARIANTS= standard SDESC[standard]= Evented I/O for V8 JavaScript HOMEPAGE= https://nodejs.org/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://nodejs.org/dist/v22.0.0/ DISTFILE[1]= node-v22.0.0.tar.gz:main DF_INDEX= 1 SPKGS[standard]= complete primary dev man docs OPTIONS_AVAILABLE= SYSTEM SMALL_EMBED NO_SUPPORT OPTIONS_STANDARD= SYSTEM SMALL_EMBED NO_SUPPORT OPTGROUP_RADIO= ICU_OPTIONS OPTDESCR[ICU_OPTIONS]= Support for Unicode OPTGROUP[ICU_OPTIONS]= SYSTEM SMALL_EMBED NO_SUPPORT OPT_ON[freebsd]= SMALL_EMBED OPT_ON[sunos]= SMALL_EMBED OPT_ON[linux]= SMALL_EMBED OPT_ON[netbsd]= NO_SUPPORT OPT_ON[dragonfly]= SMALL_EMBED OPT_ON[midnightbsd]= SMALL_EMBED BROKEN[sunos]= The ld.sun linker does not support required options BUILD_DEPENDS= libnghttp2:dev:standard nghttp3:dev:standard libuv:dev:standard BUILDRUN_DEPENDS= libuv:primary:standard libnghttp2:primary:standard nghttp3:primary:standard USES= execinfo gmake pkgconfig shebangfix cpe zlib python:v11,build c++:primary DISTNAME= node-v22.0.0 LICENSE= MIT:primary LICENSE_FILE= MIT:{{WRKSRC}}/LICENSE LICENSE_SCHEME= solo CPE_PRODUCT= node.js CPE_VENDOR= nodejs FPC_EQUIVALENT= www/node SHEBANG_FILES= tools/specialize_node_d.py MUST_CONFIGURE= yes CONFIGURE_ARGS= --prefix={{PREFIX}} --without-npm --shared-libuv --shared-zlib --shared-nghttp2 --shared-nghttp3 MAKE_ENV= CC.host={{CC}} CXX.host={{CXX}} LINK.host={{CXX}} LINK.target={{CXX}} INSTALL_REQ_TOOLCHAIN= yes VAR_OPSYS[netbsd]= CONFIGURE_ARGS=--dest-os=netbsd CONFIGURE_ARGS=--experimental-enable-pointer-compression VAR_OPSYS[midnightbsd]= CONFIGURE_ARGS=--dest-os=freebsd [SYSTEM].DESCRIPTION= Link with installed ICU library [SYSTEM].BUILDRUN_DEPENDS_ON= icu:primary:standard [SYSTEM].BUILD_DEPENDS_ON= icu:dev:standard [SYSTEM].CONFIGURE_ARGS_ON= --with-intl=system-icu [NO_SUPPORT].DESCRIPTION= Build node without ICU support [NO_SUPPORT].CONFIGURE_ARGS_ON= --with-intl=none [SMALL_EMBED].DESCRIPTION= Embed a limited set of ICU data [SMALL_EMBED].CONFIGURE_ARGS_ON= --with-intl=small-icu post-configure-netbsd: # Fixes "Fatal process OOM in Failed to reserve virtual memory for CodeRange" error # in addition to enable-pointer-compression option ${REINPLACE_CMD} -E 's|(call do_cmd,link\))|\1\n\t${PAXCTL} +m $$@|'\ ${WRKSRC}/out/tools/v8_gypfiles/mksnapshot.target.mk \ ${WRKSRC}/out/node_mksnapshot.target.mk pre-configure-netbsd: # hack to avoid undefined reference to 'engine_load_devcrypto_int' ${REINPLACE_CMD} -e 's/ifndef OPENSSL_NO_DEVCRYPTOENG/if 0/' \ ${WRKSRC}/deps/openssl/openssl/crypto/init.c ${REINPLACE_CMD} -e 's/=="freebsd"/=="netbsd"/g' \ ${WRKSRC}/deps/openssl/*.gypi post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/node ${CHOWN} ${MANMODE} ${STAGEDIR}${PREFIX}/share/man/man1/node.1 pre-configure: ${GREP} -rl "/usr/local" ${WRKSRC} | \ ${XARGS} ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' # So many different ways to run python. Fix them all. ${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|' \ ${WRKSRC}/configure ${FIND} ${WRKSRC} -type f -name '*.gyp*' -print0 | \ ${XARGS} -0 ${REINPLACE_CMD} \ -e "s|'python'|'${PYTHON_CMD}'|" \ -e 's| #endif -#ifdef __linux__ +#if defined(__linux__) || defined(__DragonFly__) #include #endif -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__NetBSD__) +#include // For _lwp_self() +#endif + +#if defined(__MidnightBSD__) +#include +#endif + +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) #include #endif @@ -452,6 +460,24 @@ pid_t GetTID() { return getthrid(); } pid_t GetTID() { return static_cast(_lwp_self()); } +#elif defined(__DragonFly__) + +pid_t GetTID() { + return syscall(SYS_lwp_gettid); +} + +#elif defined(__NetBSD__) + +pid_t GetTID() { + return static_cast(_lwp_self()); +} + +#elif defined(__MidnightBSD__) + +pid_t GetTID() { + return static_cast(pthread_getthreadid_np()); +} + #elif defined(__native_client__) pid_t GetTID() { [FILE:449:patches/patch-absl_debugging_internal_vdso__support.cc] --- deps/v8/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc.orig 2024-04-24 14:03:52 UTC +++ deps/v8/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc @@ -54,7 +54,7 @@ using Elf32_auxv_t = Aux32Info; using Elf64_auxv_t = Aux64Info; #endif -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__ELF_WORD_SIZE) && __ELF_WORD_SIZE == 64 using Elf64_auxv_t = Elf64_Auxinfo; #endif [FILE:1551:patches/patch-absl_status_status.cc] --- deps/v8/third_party/abseil-cpp/absl/status/status.cc.orig 2024-04-24 14:03:53 UTC +++ deps/v8/third_party/abseil-cpp/absl/status/status.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "absl/status/status.h" -#include +#include #include #include @@ -273,15 +273,19 @@ StatusCode ErrnoToStatusCode(int error_n case EFAULT: // Bad address case EILSEQ: // Illegal byte sequence case ENOPROTOOPT: // Protocol not available +#ifdef ENOSTR case ENOSTR: // Not a STREAM +#endif case ENOTSOCK: // Not a socket case ENOTTY: // Inappropriate I/O control operation case EPROTOTYPE: // Protocol wrong type for socket case ESPIPE: // Invalid seek return StatusCode::kInvalidArgument; case ETIMEDOUT: // Connection timed out +#ifdef ETIME case ETIME: // Timer expired return StatusCode::kDeadlineExceeded; +#endif case ENODEV: // No such device case ENOENT: // No such file or directory #ifdef ENOMEDIUM @@ -339,9 +343,13 @@ StatusCode ErrnoToStatusCode(int error_n case EMLINK: // Too many links case ENFILE: // Too many open files in system case ENOBUFS: // No buffer space available +#ifdef ENODATA case ENODATA: // No message is available on the STREAM read queue +#endif case ENOMEM: // Not enough space +#ifdef ENOSR case ENOSR: // No STREAM resources +#endif #ifdef EUSERS case EUSERS: // Too many users #endif [FILE:563:patches/patch-absl_time_internal_cctz_src_time__zone__format.cc] --- deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc.orig 2024-04-24 14:03:53 UTC +++ deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc @@ -19,7 +19,7 @@ #endif #if defined(HAS_STRPTIME) && HAS_STRPTIME -#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) +#if !defined(_XOPEN_SOURCE) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) #define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98). #endif #endif [FILE:760:patches/patch-absl_time_internal_cctz_src_time__zone__lookup__test.cc] --- deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup_test.cc.orig 2024-04-24 14:03:53 UTC +++ deps/v8/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup_test.cc @@ -927,7 +927,7 @@ TEST(MakeTime, SysSecondsLimits) { const time_zone cut = LoadZone("libc:UTC"); const year_t max_tm_year = year_t{std::numeric_limits::max()} + 1900; tp = convert(civil_second(max_tm_year, 12, 31, 23, 59, 59), cut); -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) || defined(__DragonFly__) // Some gmtime_r() impls fail on extreme positive values. #else EXPECT_EQ("2147485547-12-31T23:59:59+00:00", [FILE:710:patches/patch-common.gypi] --- common.gypi.orig 2024-04-24 14:03:47 UTC +++ common.gypi @@ -460,11 +460,11 @@ 'BUILDING_UV_SHARED=1', ], }], - [ 'OS in "linux freebsd openbsd solaris aix os400"', { + [ 'OS in "linux freebsd openbsd netbsd solaris aix os400"', { 'cflags': [ '-pthread' ], 'ldflags': [ '-pthread' ], }], - [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', { + [ 'OS in "linux freebsd openbsd netbsd solaris android aix os400 cloudabi"', { 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ], 'defines': [ '__STDC_FORMAT_MACROS' ], [FILE:455:patches/patch-configure.py] --- configure.py.orig 2024-04-24 14:03:47 UTC +++ configure.py @@ -46,6 +46,7 @@ from utils import SearchFiles parser = argparse.ArgumentParser() valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', + 'netbsd', 'android', 'aix', 'cloudabi', 'os400', 'ios') valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', 'ppc64', 'x64', 'x86', 'x86_64', 's390x', 'riscv64', 'loong64') [FILE:501:patches/patch-deps_cares_cares.gyp] --- deps/cares/cares.gyp.orig 2024-04-24 14:03:47 UTC +++ deps/cares/cares.gyp @@ -212,6 +212,10 @@ 'include_dirs': [ 'config/freebsd' ], 'sources': [ 'config/freebsd/ares_config.h' ] }], + [ 'OS=="netbsd"', { + 'include_dirs': [ 'config/netbsd' ], + 'sources': [ 'config/netbsd/ares_config.h' ] + }], [ 'OS=="openbsd"', { 'include_dirs': [ 'config/openbsd' ], 'sources': [ 'config/openbsd/ares_config.h' ] [FILE:579:patches/patch-deps_openssl_openssl_util_perl_OpenSSL_config.pm] --- deps/openssl/openssl/util/perl/OpenSSL/config.pm.orig 2024-04-24 14:03:50 UTC +++ deps/openssl/openssl/util/perl/OpenSSL/config.pm @@ -793,6 +793,7 @@ EOF [ 'sparc64-.*-.*bsd.*', { target => "BSD-sparc64" } ], [ 'ia64-.*-.*bsd.*', { target => "BSD-ia64" } ], [ 'x86_64-.*-dragonfly.*', { target => "BSD-x86_64" } ], + [ 'x86_64-.*-*bsd.*', { target => "BSD-x86_64" } ], [ 'amd64-.*-.*bsd.*', { target => "BSD-x86_64" } ], [ 'arm64-.*-.*bsd.*', { target => "BSD-aarch64" } ], [ '.*86.*-.*-.*bsd.*', [FILE:426:patches/patch-deps_uv_common.gypi] --- deps/uv/common.gypi.orig 2024-04-24 14:03:50 UTC +++ deps/uv/common.gypi @@ -135,7 +135,7 @@ }] ] }], - ['OS in "freebsd dragonflybsd linux openbsd solaris android aix os400"', { + ['OS in "freebsd dragonflybsd linux openbsd netbsd solaris android aix os400"', { 'cflags': [ '-Wall' ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], 'target_conditions': [ [FILE:478:patches/patch-deps_v8_src_base_platform_condition-variable.cc] --- deps/v8/src/base/platform/condition-variable.cc.orig 2024-04-24 14:03:50 UTC +++ deps/v8/src/base/platform/condition-variable.cc @@ -20,6 +20,7 @@ namespace base { ConditionVariable::ConditionVariable() { #if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \ + V8_OS_DRAGONFLYBSD || \ (V8_OS_LINUX && V8_LIBC_GLIBC)) // On Free/Net/OpenBSD and Linux with glibc we can change the time // source for pthread_cond_timedwait() to use the monotonic clock. [FILE:596:patches/patch-deps_v8_src_base_platform_memory.h] --- deps/v8/src/base/platform/memory.h.orig 2024-04-24 14:03:50 UTC +++ deps/v8/src/base/platform/memory.h @@ -20,10 +20,12 @@ #if V8_OS_DARWIN #include #else // !V8_OS_DARWIN +# if !V8_OS_FREEBSD && !V8_OS_DRAGONFLYBSD #include +# endif #endif // !V8_OS_DARWIN -#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS) || V8_OS_WIN +#if (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS && !V8_OS_DRAGONFLYBSD && !V8_OS_FREEBSD && !V8_OS_NETBSD) || V8_OS_WIN #define V8_HAS_MALLOC_USABLE_SIZE 1 #endif // (V8_OS_POSIX && !V8_OS_AIX && !V8_OS_SOLARIS) || V8_OS_WIN [FILE:1134:patches/patch-deps_v8_src_base_platform_platform-freebsd.cc] --- deps/v8/src/base/platform/platform-freebsd.cc.orig 2024-04-24 14:03:50 UTC +++ deps/v8/src/base/platform/platform-freebsd.cc @@ -48,7 +48,10 @@ static unsigned StringToLong(char* buffe } std::vector OS::GetSharedLibraryAddresses() { - std::vector result; +#ifdef __DragonFly__ + return std::vector(); +#else + std::vector address_result; int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid()}; size_t miblen = sizeof(mib) / sizeof(mib[0]); size_t buffer_size; @@ -81,7 +84,7 @@ std::vector OS } else { lib_name = std::string(path); } - result.push_back(SharedLibraryAddress( + address_result.push_back(SharedLibraryAddress( lib_name, reinterpret_cast(map->kve_start), reinterpret_cast(map->kve_end))); } @@ -90,7 +93,8 @@ std::vector OS } } } - return result; + return address_result; +#endif } void OS::SignalCodeMovingGC() {} [FILE:3678:patches/patch-deps_v8_src_base_platform_platform-posix.cc] --- deps/v8/src/base/platform/platform-posix.cc.orig 2024-04-24 14:03:50 UTC +++ deps/v8/src/base/platform/platform-posix.cc @@ -55,7 +55,9 @@ #include #include #else +# if !V8_OS_FREEBSD && !V8_OS_DRAGONFLYBSD #include +# endif #endif #if V8_OS_LINUX @@ -72,17 +74,10 @@ #include #endif -#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_OPENBSD || V8_OS_SOLARIS +#if V8_OS_FREEBSD || V8_OS_DARWIN || V8_OS_OPENBSD || V8_OS_SOLARIS || V8_OS_DRAGONFLYBSD #define MAP_ANONYMOUS MAP_ANON #endif -#if defined(V8_OS_SOLARIS) -#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__) -extern "C" int madvise(caddr_t, size_t, int); -#else -extern int madvise(caddr_t, size_t, int); -#endif -#endif #ifndef MADV_FREE #define MADV_FREE MADV_DONTNEED @@ -132,7 +127,7 @@ int GetFlagsForMemoryPermission(OS::Memo int flags = MAP_ANONYMOUS; flags |= (page_type == PageType::kShared) ? MAP_SHARED : MAP_PRIVATE; if (access == OS::MemoryPermission::kNoAccess) { -#if !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX +#if !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX && !V8_OS_DRAGONFLYBSD flags |= MAP_NORESERVE; #endif // !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX #if V8_OS_QNX @@ -397,6 +392,13 @@ void* OS::GetRandomMmapAddr() { #endif #endif #endif +#if V8_OS_NETBSD + /* + * Avoid using a random hint, some low numbers cause spurious ENOMEM on netbsd + * (PR port-arm/55533) + */ + raw_addr = 0; +#endif return reinterpret_cast(raw_addr); } @@ -563,14 +565,11 @@ bool OS::DiscardSystemPages(void* addres // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. ret = madvise(address, size, MADV_DONTNEED); } -#elif defined(_AIX) || defined(V8_OS_SOLARIS) - int ret = madvise(reinterpret_cast(address), size, MADV_FREE); +#elif defined(POSIX_MADV_DONTNEED) + int ret = posix_madvise(address, size, POSIX_MADV_DONTNEED); if (ret != 0 && errno == ENOSYS) { return true; // madvise is not available on all systems. } - if (ret != 0 && errno == EINVAL) { - ret = madvise(reinterpret_cast(address), size, MADV_DONTNEED); - } #else int ret = madvise(address, size, MADV_DONTNEED); #endif @@ -1114,7 +1113,11 @@ Thread::Thread(const Options& options) stack_size_(options.stack_size()), priority_(options.priority()), start_semaphore_(nullptr) { +#if V8_OS_NETBSD + const int min_stack_size = sysconf(_SC_THREAD_STACK_MIN); +#else const int min_stack_size = static_cast(PTHREAD_STACK_MIN); +#endif if (stack_size_ > 0) stack_size_ = std::max(stack_size_, min_stack_size); set_name(options.name()); } @@ -1129,7 +1132,7 @@ static void SetThreadName(const char* na pthread_set_name_np(pthread_self(), name); #elif V8_OS_NETBSD static_assert(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP); - pthread_setname_np(pthread_self(), "%s", name); + pthread_setname_np(pthread_self(), "%s", (void *)name); #elif V8_OS_DARWIN // pthread_setname_np is only available in 10.6 or later, so test // for it at runtime. @@ -1305,6 +1308,7 @@ void Thread::SetThreadLocal(LocalStorage // support it. MacOS and FreeBSD are different here. #if !defined(V8_OS_FREEBSD) && !defined(V8_OS_DARWIN) && !defined(_AIX) && \ !defined(V8_OS_SOLARIS) +#if !defined(V8_OS_DRAGONFLYBSD) namespace { #if DEBUG @@ -1354,6 +1358,7 @@ Stack::StackSlot Stack::ObtainCurrentThr return stack_start; } +#endif // !defined(V8_OS_DRAGONFLYBSD) #endif // !defined(V8_OS_FREEBSD) && !defined(V8_OS_DARWIN) && // !defined(_AIX) && !defined(V8_OS_SOLARIS) [FILE:296:patches/patch-deps_v8_src_base_strings.h] --- deps/v8/src/base/strings.h.orig 2024-04-24 14:03:50 UTC +++ deps/v8/src/base/strings.h @@ -5,6 +5,7 @@ #ifndef V8_BASE_STRINGS_H_ #define V8_BASE_STRINGS_H_ +#include // for va_list #include "src/base/base-export.h" #include "src/base/macros.h" #include "src/base/vector.h" [FILE:598:patches/patch-deps_v8_src_base_utils_random-number-generator.cc] --- deps/v8/src/base/utils/random-number-generator.cc.orig 2024-04-24 14:03:50 UTC +++ deps/v8/src/base/utils/random-number-generator.cc @@ -56,7 +56,7 @@ RandomNumberGenerator::RandomNumberGener DCHECK_EQ(0, result); USE(result); SetSeed((static_cast(first_half) << 32) + second_half); -#elif V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD +#elif V8_OS_DARWIN || V8_OS_FREEBSD || V8_OS_OPENBSD || V8_OS_DRAGONFLYBSD // Despite its prefix suggests it is not RC4 algorithm anymore. // It always succeeds while having decent performance and // no file descriptor involved. [FILE:451:patches/patch-deps_v8_src_d8_d8-posix.cc] --- deps/v8/src/d8/d8-posix.cc.orig 2024-04-24 14:03:50 UTC +++ deps/v8/src/d8/d8-posix.cc @@ -339,7 +339,7 @@ static Local GetStdout(Isolate* i // See http://code.google.com/p/v8/issues/detail?id=401. #if defined(WNOWAIT) && !defined(ANDROID) && !defined(__APPLE__) && \ !defined(__NetBSD__) && !defined(__Fuchsia__) -#if !defined(__FreeBSD__) +#if !defined(__FreeBSD__) && !defined(__DragonFly__) #define HAS_WAITID 1 #endif #endif [FILE:484:patches/patch-deps_v8_src_libsampler_sampler.cc] --- deps/v8/src/libsampler/sampler.cc.orig 2024-04-24 14:03:51 UTC +++ deps/v8/src/libsampler/sampler.cc @@ -500,7 +500,7 @@ void SignalHandler::FillRegisterState(vo state->fp = reinterpret_cast(arm_thread_state64_get_fp(mcontext->__ss)); #endif // V8_HOST_ARCH_* -#elif V8_OS_FREEBSD +#elif V8_OS_FREEBSD || V8_OS_DRAGONFLYBSD #if V8_HOST_ARCH_IA32 state->pc = reinterpret_cast(mcontext.mc_eip); state->sp = reinterpret_cast(mcontext.mc_esp); [FILE:669:patches/patch-deps_v8_src_trap-handler_handler-inside-posix.cc] --- deps/v8/src/trap-handler/handler-inside-posix.cc.orig 2024-04-24 14:03:51 UTC +++ deps/v8/src/trap-handler/handler-inside-posix.cc @@ -27,7 +27,7 @@ #include -#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD) +#if V8_OS_LINUX || V8_OS_FREEBSD || V8_OS_DRAGONFLYBSD #include #elif V8_OS_DARWIN #include @@ -61,6 +61,8 @@ namespace trap_handler { #define CONTEXT_REG(reg, REG) &uc->uc_mcontext->__ss.__##reg #elif V8_OS_FREEBSD #define CONTEXT_REG(reg, REG) &uc->uc_mcontext.mc_##reg +#elif V8_OS_DRAGONFLYBSD +#define CONTEXT_REG(reg, REG) &uc->uc_mcontext.mc_##reg #else #error "Unsupported platform." #endif [FILE:426:patches/patch-deps_v8_src_trap-handler_handler-inside-posix.h] --- deps/v8/src/trap-handler/handler-inside-posix.h.orig 2024-04-24 14:03:51 UTC +++ deps/v8/src/trap-handler/handler-inside-posix.h @@ -13,7 +13,7 @@ namespace v8 { namespace internal { namespace trap_handler { -#if V8_OS_LINUX || V8_OS_FREEBSD +#if defined(V8_OS_LINUX) || defined(V8_OS_FREEBSD) || defined(V8_OS_DRAGONFLYBSD) constexpr int kOobSignal = SIGSEGV; #elif V8_OS_DARWIN constexpr int kOobSignal = SIGBUS; [FILE:482:patches/patch-deps_v8_src_trap-handler_trap-handler.h] --- deps/v8/src/trap-handler/trap-handler.h.orig 2024-04-24 14:03:51 UTC +++ deps/v8/src/trap-handler/trap-handler.h @@ -20,6 +20,7 @@ namespace trap_handler { // X64 on Linux, Windows, MacOS, FreeBSD. #if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \ ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \ + V8_OS_DRAGONFLYBSD || \ V8_OS_FREEBSD) #define V8_TRAP_HANDLER_SUPPORTED true // Arm64 (non-simulator) on Mac and Linux. [FILE:216:patches/patch-node.gypi] --- node.gypi.orig 2024-04-24 14:03:53 UTC +++ node.gypi @@ -270,6 +270,7 @@ [ 'OS=="solaris"', { 'libraries': [ '-lkstat', + '-lsocket', '-lumem', ], 'defines!': [ [FILE:640:patches/patch-src_inspector__agent.cc] --- src/inspector_agent.cc.orig 2024-04-24 14:03:53 UTC +++ src/inspector_agent.cc @@ -96,7 +96,7 @@ static int StartDebugSignalHandler() { CHECK_EQ(0, uv_sem_init(&start_io_thread_semaphore, 0)); pthread_attr_t attr; CHECK_EQ(0, pthread_attr_init(&attr)); -#if defined(PTHREAD_STACK_MIN) && !defined(__FreeBSD__) +#if defined(PTHREAD_STACK_MIN) && !defined(__FreeBSD__) && !defined(__NetBSD__) // PTHREAD_STACK_MIN is 2 KiB with musl libc, which is too small to safely // receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KiB on arm64, which // is the musl architecture with the biggest MINSIGSTKSZ so let's use that [FILE:600:patches/patch-src_node__postmortem__metadata.cc] --- src/node_postmortem_metadata.cc.orig 2024-04-24 14:03:53 UTC +++ src/node_postmortem_metadata.cc @@ -13,6 +13,10 @@ #define NODEDBG_OFFSET(Class, Member, Type) \ NODEDBG_SYMBOL(offset_ ## Class ## __ ## Member ## __ ## Type) +// Some systems provide macros for the types as well, which get expanded +// by the nested macros here. +#undef uintptr_t + // These are the constants describing Node internal structures. Every constant // should use the format described above. These constants are declared as // global integers so that they'll be present in the generated node binary. They [FILE:511:patches/patch-tools_gyp_pylib_gyp_generator_make.py] --- tools/gyp/pylib/gyp/generator/make.py.orig 2024-04-24 14:03:54 UTC +++ tools/gyp/pylib/gyp/generator/make.py @@ -2518,7 +2518,7 @@ def GenerateOutput(target_list, target_d "flock_index": 2, } ) - elif flavor == "freebsd": + elif flavor == "freebsd" or flavor == 'dragonflybsd' or flavor == 'netbsd': # Note: OpenBSD has sysutils/flock. lockf seems to be FreeBSD specific. header_params.update({"flock": "lockf"}) elif flavor == "openbsd": [FILE:980:patches/patch-tools_gyp_pylib_gyp_xcode__emulation.py] --- tools/gyp/pylib/gyp/xcode_emulation.py.orig 2024-04-24 14:03:54 UTC +++ tools/gyp/pylib/gyp/xcode_emulation.py @@ -608,7 +608,7 @@ class XcodeSettings: self._Appendf(cflags, "GCC_OPTIMIZATION_LEVEL", "-O%s", default="s") - if self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="YES"): + if self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="NO"): dbg_format = self._Settings().get("DEBUG_INFORMATION_FORMAT", "dwarf") if dbg_format == "dwarf": cflags.append("-gdwarf-2") @@ -1101,7 +1101,7 @@ class XcodeSettings: # For static libraries, no dSYMs are created. result = [] if ( - self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="YES") + self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="NO") and self._Test( "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym", default="dwarf" )