Index: common.gypi --- common.gypi.orig 2025-10-28 06:48:10.000000000 +0100 +++ common.gypi 2025-10-30 10:27:45.845114000 +0100 @@ -196,7 +196,7 @@ }], ], }, - 'cflags': [ '-O3' ], + 'cflags': [ '-O0' ], 'conditions': [ ['enable_lto=="true"', { 'cflags': ['<(lto)'], @@ -509,7 +509,7 @@ 'ldflags': [ '-pthread' ], }], [ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi openharmony"', { - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], + 'cflags': [ '-Wno-unused-parameter', ], 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', @@ -654,10 +654,7 @@ 'MACOSX_DEPLOYMENT_TARGET': '13.5', # -mmacosx-version-min=13.5 'USE_HEADERMAP': 'NO', 'WARNING_CFLAGS': [ - '-Wall', - '-Wendif-labels', - '-W', - '-Wno-unused-parameter', + '-Wno-unused-parameter' ], }, 'target_conditions': [ Index: configure --- configure.orig 2025-10-28 06:48:10.000000000 +0100 +++ configure 2025-10-30 10:28:24.114825000 +0100 @@ -22,7 +22,7 @@ from distutils.spawn import find_executable as which print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info)) -acceptable_pythons = ((3, 13), (3, 12), (3, 11), (3, 10), (3, 9)) +acceptable_pythons = ((3, 14), (3, 13), (3, 12), (3, 11), (3, 10), (3, 9)) if sys.version_info[:2] in acceptable_pythons: import configure else: Index: deps/uv/common.gypi --- deps/uv/common.gypi.orig 2025-10-28 06:48:12.000000000 +0100 +++ deps/uv/common.gypi 2025-10-30 10:27:45.845280000 +0100 @@ -46,7 +46,7 @@ 'Release': { 'defines': [ 'NDEBUG' ], 'cflags': [ - '-O3', + '-O0', ], 'msvs_settings': { 'VCCLCompilerTool': { Index: deps/uv/uv.gyp --- deps/uv/uv.gyp.orig 2025-10-28 06:48:12.000000000 +0100 +++ deps/uv/uv.gyp 2025-10-30 10:27:45.845429000 +0100 @@ -232,7 +232,7 @@ }], ['OS!="mac"', { 'libraries': [ - '-lm' + '-lz', -lm', ], }], ], Index: deps/v8/src/base/numbers/bignum.cc --- deps/v8/src/base/numbers/bignum.cc.orig 2025-10-28 06:48:12.000000000 +0100 +++ deps/v8/src/base/numbers/bignum.cc 2025-10-30 10:27:45.845635000 +0100 @@ -5,6 +5,7 @@ #include "src/base/numbers/bignum.h" #include "src/base/strings.h" +#include namespace v8 { namespace base { Index: deps/v8/src/base/platform/platform-freebsd.cc --- deps/v8/src/base/platform/platform-freebsd.cc.orig 2025-10-28 06:48:12.000000000 +0100 +++ deps/v8/src/base/platform/platform-freebsd.cc 2025-10-30 10:27:45.845752000 +0100 @@ -28,6 +28,7 @@ #include // index #include +#include #undef MAP_TYPE Index: deps/v8/src/base/strings.h --- deps/v8/src/base/strings.h.orig 2025-10-28 06:48:12.000000000 +0100 +++ deps/v8/src/base/strings.h 2025-10-30 10:27:45.845860000 +0100 @@ -8,6 +8,7 @@ #include "src/base/base-export.h" #include "src/base/macros.h" #include "src/base/vector.h" +#include namespace v8 { namespace base { Index: deps/v8/src/wasm/wasm-result.cc --- deps/v8/src/wasm/wasm-result.cc.orig 2025-10-28 06:48:13.000000000 +0100 +++ deps/v8/src/wasm/wasm-result.cc 2025-10-30 10:27:45.845972000 +0100 @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #include "src/wasm/wasm-result.h" #include "src/base/strings.h" Index: lib/dns.js --- lib/dns.js.orig 2025-10-28 06:48:14.000000000 +0100 +++ lib/dns.js 2025-10-30 10:27:45.846124000 +0100 @@ -233,6 +233,10 @@ order = DNS_ORDER_IPV6_FIRST; } + /* FreeBSD getaddrinfo(3) knows AI_V4MAPPED, but dislikes it */ + if (process.platform === "freebsd") + hints &= ~(exports.V4MAPPED); + const err = cares.getaddrinfo( req, hostname, family, hints, order, ); Index: lib/internal/modules/cjs/loader.js --- lib/internal/modules/cjs/loader.js.orig 2025-10-28 06:48:14.000000000 +0100 +++ lib/internal/modules/cjs/loader.js 2025-10-30 10:27:45.846503000 +0100 @@ -2001,7 +2001,10 @@ path.resolve(process.execPath, '..') : path.resolve(process.execPath, '..', '..'); - const paths = [path.resolve(prefixDir, 'lib', 'node')]; + const paths = [ + path.resolve(prefixDir, '..', 'lib', 'node', 'usr'), + path.resolve(prefixDir, '..', 'lib', 'node', 'pkg') + ]; if (homeDir) { ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); Index: src/crypto/crypto_aes.cc --- src/crypto/crypto_aes.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_aes.cc 2025-10-30 10:27:45.846674000 +0100 @@ -9,8 +9,8 @@ #include "threadpoolwork-inl.h" #include "v8.h" -#include -#include +#include "openssl/bn.h" +#include "openssl/aes.h" #include Index: src/crypto/crypto_bio.cc --- src/crypto/crypto_bio.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_bio.cc 2025-10-30 10:27:45.846819000 +0100 @@ -24,7 +24,7 @@ #include "memory_tracker-inl.h" #include "util-inl.h" -#include +#include "openssl/bio.h" #include #include Index: src/crypto/crypto_common.cc --- src/crypto/crypto_common.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_common.cc 2025-10-30 10:27:45.846943000 +0100 @@ -13,14 +13,14 @@ #include "string_bytes.h" #include "v8.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include "openssl/ec.h" +#include "openssl/ecdh.h" +#include "openssl/evp.h" +#include "openssl/pem.h" +#include "openssl/x509v3.h" +#include "openssl/hmac.h" +#include "openssl/rand.h" +#include "openssl/pkcs12.h" #include #include Index: src/crypto/crypto_common.h --- src/crypto/crypto_common.h.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_common.h 2025-10-30 10:27:45.847046000 +0100 @@ -3,8 +3,8 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#include -#include +#include "openssl/ssl.h" +#include "openssl/x509v3.h" #include "ncrypto.h" #include "node_crypto.h" #include "v8.h" Index: src/crypto/crypto_context.cc --- src/crypto/crypto_context.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_context.cc 2025-10-30 10:27:45.847397000 +0100 @@ -12,11 +12,11 @@ #include "util.h" #include "v8.h" -#include -#include -#include +#include "openssl/x509.h" +#include "openssl/pkcs12.h" +#include "openssl/rand.h" #ifndef OPENSSL_NO_ENGINE -#include +#include "openssl/engine.h" #endif // !OPENSSL_NO_ENGINE #ifdef __APPLE__ #include Index: src/crypto/crypto_dsa.cc --- src/crypto/crypto_dsa.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_dsa.cc 2025-10-30 10:27:45.847503000 +0100 @@ -7,8 +7,8 @@ #include "threadpoolwork-inl.h" #include "v8.h" -#include -#include +#include "openssl/bn.h" +#include "openssl/dsa.h" #include Index: src/crypto/crypto_keys.h --- src/crypto/crypto_keys.h.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_keys.h 2025-10-30 10:27:45.847639000 +0100 @@ -11,7 +11,7 @@ #include "node_worker.h" #include "v8.h" -#include +#include "openssl/evp.h" #include #include Index: src/crypto/crypto_rsa.cc --- src/crypto/crypto_rsa.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_rsa.cc 2025-10-30 10:27:45.847778000 +0100 @@ -9,8 +9,8 @@ #include "threadpoolwork-inl.h" #include "v8.h" -#include -#include +#include "openssl/bn.h" +#include "openssl/rsa.h" namespace node { Index: src/crypto/crypto_spkac.h --- src/crypto/crypto_spkac.h.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_spkac.h 2025-10-30 10:27:45.847864000 +0100 @@ -6,7 +6,7 @@ #include "env.h" #include "v8.h" -#include +#include "openssl/evp.h" namespace node { namespace crypto { Index: src/crypto/crypto_timing.cc --- src/crypto/crypto_timing.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_timing.cc 2025-10-30 10:27:45.847966000 +0100 @@ -6,7 +6,7 @@ #include "node_errors.h" #include "v8.h" -#include +#include "openssl/crypto.h" namespace node { Index: src/crypto/crypto_tls.h --- src/crypto/crypto_tls.h.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/crypto/crypto_tls.h 2025-10-30 10:27:45.848089000 +0100 @@ -31,7 +31,7 @@ #include "stream_wrap.h" #include "v8.h" -#include +#include "openssl/ssl.h" #include #include Index: src/inspector_socket_server.cc --- src/inspector_socket_server.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/inspector_socket_server.cc 2025-10-30 10:27:45.848284000 +0100 @@ -20,7 +20,7 @@ bool include_protocol); namespace { -static const uint8_t PROTOCOL_JSON[] = { +static uint8_t PROTOCOL_JSON[] = { #include "v8_inspector_protocol_json.h" // NOLINT(build/include_order) }; Index: src/node_constants.cc --- src/node_constants.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/node_constants.cc 2025-10-30 10:27:45.848550000 +0100 @@ -37,10 +37,10 @@ #if HAVE_OPENSSL -#include -#include +#include "openssl/ec.h" +#include "openssl/ssl.h" #ifndef OPENSSL_NO_ENGINE -#include +#include "openssl/engine.h" #endif // !OPENSSL_NO_ENGINE #endif // HAVE_OPENSSL Index: src/node_metadata.cc --- src/node_metadata.cc.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/node_metadata.cc 2025-10-30 10:27:45.848692000 +0100 @@ -28,10 +28,10 @@ #endif // NODE_BUNDLED_ZLIB #if HAVE_OPENSSL -#include +#include "openssl/crypto.h" #include "ncrypto.h" #if NODE_OPENSSL_HAS_QUIC -#include +#include "openssl/quic.h" #endif #endif // HAVE_OPENSSL Index: src/util.h --- src/util.h.orig 2025-10-28 06:48:14.000000000 +0100 +++ src/util.h 2025-10-30 10:27:45.848977000 +0100 @@ -181,14 +181,23 @@ } \ } while (0) +#undef CHECK_EQ #define CHECK_EQ(a, b) CHECK((a) == (b)) +#undef CHECK_GE #define CHECK_GE(a, b) CHECK((a) >= (b)) +#undef CHECK_GT #define CHECK_GT(a, b) CHECK((a) > (b)) +#undef CHECK_LE #define CHECK_LE(a, b) CHECK((a) <= (b)) +#undef CHECK_LT #define CHECK_LT(a, b) CHECK((a) < (b)) +#undef CHECK_NE #define CHECK_NE(a, b) CHECK((a) != (b)) +#undef CHECK_NULL #define CHECK_NULL(val) CHECK((val) == nullptr) +#undef CHECK_NOT_NULL #define CHECK_NOT_NULL(val) CHECK((val) != nullptr) +#undef CHECK_IMPLIES #define CHECK_IMPLIES(a, b) CHECK(!(a) || (b)) #ifdef DEBUG @@ -216,6 +225,7 @@ #endif +#undef UNREACHABLE #define UNREACHABLE(...) \ ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__) Index: tools/install.py --- tools/install.py.orig 2025-10-28 06:48:15.000000000 +0100 +++ tools/install.py 2025-10-30 10:27:45.849180000 +0100 @@ -198,10 +198,7 @@ action(options, [os.path.join(options.v8_dir, 'tools/gdbinit')], 'share/doc/node/') action(options, [os.path.join(options.v8_dir, 'tools/lldb_commands.py')], 'share/doc/node/') - if 'openbsd' in sys.platform: - action(options, ['doc/node.1'], 'man/man1/') - else: - action(options, ['doc/node.1'], 'share/man/man1/') + action(options, ['doc/node.1'], 'man/man1/') if 'true' == options.variables.get('node_install_npm'): npm_files(options, action) Index: tools/v8_gypfiles/toolchain.gypi --- tools/v8_gypfiles/toolchain.gypi.orig 2025-10-28 06:48:15.000000000 +0100 +++ tools/v8_gypfiles/toolchain.gypi 2025-10-30 10:27:45.849454000 +0100 @@ -579,12 +579,6 @@ ['OS=="solaris"', { 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. }], - ['OS=="freebsd" or OS=="openbsd"', { - 'cflags': [ '-I/usr/local/include' ], - }], - ['OS=="netbsd"', { - 'cflags': [ '-I/usr/pkg/include' ], - }], ['OS=="aix" or OS=="os400"', { 'defines': [ # Support for malloc(0) @@ -716,8 +710,8 @@ # Don't use -O3 with sanitizers. ['asan==0 and msan==0 and lsan==0 \ and tsan==0 and ubsan==0 and ubsan_vptr==0', { - 'cflags': ['-O3'], - 'cflags!': ['-O2'], + 'cflags': ['-O0'], + 'cflags!': ['-O0'], }, { 'cflags': ['-O2'], 'cflags!': ['-O3'], @@ -765,8 +759,8 @@ # Don't use -O3 with sanitizers. ['asan==0 and msan==0 and lsan==0 \ and tsan==0 and ubsan==0 and ubsan_vptr==0', { - 'cflags': ['-O3'], - 'cflags!': ['-O2'], + 'cflags': ['-O0'], + 'cflags!': ['-O0'], }, { 'cflags': ['-O2'], 'cflags!': ['-O3'],