c-ares: update to 1.33.1

This commit is contained in:
coolsnowwolf 2025-02-06 18:10:53 +08:00
parent a25e98fb55
commit 8069d99a7b
12 changed files with 58 additions and 131 deletions

View File

@ -7,9 +7,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=node
ifeq ($(CONFIG_NODEJS_22),y)
PKG_VERSION:=v22.11.0
PKG_VERSION:=v22.13.1
PKG_RELEASE:=1
PKG_HASH:=bbf0297761d53aefda9d7855c57c7d2c272b83a7b5bad4fea9cb29006d8e1d35
PKG_HASH:=cfce282119390f7e0c2220410924428e90dadcb2df1744c0c4a0e7baae387cc2
PATCH_DIR:=./patches/v22.x
else
ifeq ($(CONFIG_NODEJS_20),y)

View File

@ -1,6 +1,6 @@
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1779,7 +1779,8 @@ Module._initPaths = function() {
@@ -1789,7 +1789,8 @@ Module._initPaths = function() {
path.resolve(process.execPath, '..') :
path.resolve(process.execPath, '..', '..');

View File

@ -1,20 +0,0 @@
--- a/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js
+++ b/deps/npm/node_modules/@npmcli/config/lib/definitions/definitions.js
@@ -1212,7 +1212,7 @@ const definitions = {
},
}),
loglevel: new Definition('loglevel', {
- default: 'notice',
+ default: 'info',
type: [
'silent',
'error',
@@ -1993,7 +1993,7 @@ const definitions = {
flatten,
}),
'strict-ssl': new Definition('strict-ssl', {
- default: true,
+ default: false,
type: Boolean,
description: `
Whether or not to do SSL key validation when making requests to the

View File

@ -1,6 +1,6 @@
--- a/deps/uv/uv.gyp
+++ b/deps/uv/uv.gyp
@@ -155,6 +155,7 @@
@@ -156,6 +156,7 @@
'target_name': 'libuv',
'toolsets': ['host', 'target'],
'type': '<(uv_library)',

View File

@ -1,10 +1,18 @@
--- a/node.gyp
+++ b/node.gyp
@@ -1350,6 +1350,7 @@
'dependencies': [
'deps/simdutf/simdutf.gyp:simdutf#host',
@@ -1138,6 +1138,7 @@
'includes': [
'node.gypi'
],
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'include_dirs': [
'src',
'tools/msvs/genfiles',
@@ -1354,6 +1355,7 @@
'tools',
'src',
],
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'sources': [
'tools/js2c.cc',
'tools/executable_wrapper.h',

View File

@ -28,7 +28,7 @@
'sources': [
'<(V8_ROOT)/src/init/setup-isolate-full.cc',
],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
}, # v8_init
{
# This target is used to work around a GCC issue that causes the
@ -40,36 +40,36 @@
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)',
'<(generate_bytecode_output_root)',
+ '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
+ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
],
'sources': [
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_initializers.*?sources = ")',
@@ -820,6 +826,7 @@
@@ -825,6 +831,7 @@
'toolsets': ['host', 'target'],
'direct_dependent_settings': {
'sources': ['<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources = ")'],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'conditions': [
['v8_target_arch=="ia32"', {
'sources': [
@@ -929,6 +936,8 @@
@@ -939,6 +946,8 @@
'target_name': 'v8_turboshaft',
'type': 'static_library',
'toolsets': ['host', 'target'],
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'dependencies': [
'generate_bytecode_builtins_list',
'run_torque',
@@ -968,6 +977,7 @@
@@ -978,6 +987,7 @@
'run_torque',
'v8_maybe_icu',
],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'conditions': [
['(is_component_build and not v8_optimized_debug and v8_enable_fast_mksnapshot) or v8_enable_turbofan==0', {
'dependencies': [
@@ -1010,6 +1020,7 @@
@@ -1020,6 +1030,7 @@
],
'includes': ['inspector.gypi'],
'direct_dependent_settings': {
@ -77,7 +77,7 @@
'include_dirs': [
'<(generate_bytecode_output_root)',
'<(SHARED_INTERMEDIATE_DIR)',
@@ -1647,6 +1658,7 @@
@@ -1674,6 +1685,7 @@
}],
],
'direct_dependent_settings': {
@ -85,7 +85,7 @@
'include_dirs': [
'<(V8_ROOT)/include',
],
@@ -1667,6 +1679,7 @@
@@ -1694,6 +1706,7 @@
{
'target_name': 'bytecode_builtins_list_generator',
'type': 'executable',
@ -93,17 +93,17 @@
'conditions': [
['want_separate_host_toolset', {
'toolsets': ['host'],
@@ -1695,6 +1708,9 @@
@@ -1722,6 +1735,9 @@
{
'target_name': 'mksnapshot',
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ],
+ 'include_dirs': [ '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
+ 'include_dirs': [ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)' ],
'dependencies': [
'v8_base_without_compiler',
'v8_compiler_for_mksnapshot',
@@ -1723,6 +1739,7 @@
@@ -1750,6 +1766,7 @@
{
'target_name': 'torque',
'type': 'executable',
@ -111,7 +111,7 @@
'dependencies': [
'torque_base',
# "build/win:default_exe_manifest",
@@ -1765,6 +1782,7 @@
@@ -1792,6 +1809,7 @@
{
'target_name': 'torque-language-server',
'type': 'executable',
@ -119,7 +119,7 @@
'conditions': [
['want_separate_host_toolset', {
'toolsets': ['host'],
@@ -1796,6 +1814,8 @@
@@ -1823,6 +1841,8 @@
{
'target_name': 'gen-regexp-special-case',
'type': 'executable',
@ -128,7 +128,7 @@
'dependencies': [
'v8_libbase',
# "build/win:default_exe_manifest",
@@ -2036,6 +2056,7 @@
@@ -2063,6 +2083,7 @@
}],
],
'direct_dependent_settings': {
@ -136,7 +136,7 @@
'include_dirs': [
'<(V8_ROOT)/include',
],
@@ -2175,15 +2196,19 @@
@@ -2202,15 +2223,19 @@
}],
],
'direct_dependent_settings': {
@ -144,7 +144,7 @@
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
+ '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
+ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
],
},
'defines': [ 'ZLIB_IMPLEMENTATION' ],
@ -152,7 +152,15 @@
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
'<(V8_ROOT)/third_party/zlib/google',
+ '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
+ '../../deps/v8/third_party/abseil-cpp', '<!@(echo "$STAGING_DIR"/usr/../usr/include)',
],
'sources': [
'<(V8_ROOT)/third_party/zlib/adler32.c',
@@ -2255,6 +2280,7 @@
'variables': {
'ABSEIL_ROOT': '../../deps/v8/third_party/abseil-cpp',
},
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'direct_dependent_settings': {
'include_dirs': [
'<(ABSEIL_ROOT)',

View File

@ -1,10 +0,0 @@
--- a/deps/v8/src/base/small-vector.h
+++ b/deps/v8/src/base/small-vector.h
@@ -22,7 +22,6 @@ template <typename T, size_t kSize, type
class SmallVector {
// Currently only support trivially copyable and trivially destructible data
// types, as it uses memcpy to copy elements and never calls destructors.
- ASSERT_TRIVIALLY_COPYABLE(T);
static_assert(std::is_trivially_destructible<T>::value);
public:

View File

@ -1,25 +0,0 @@
From 54299ac3a3d4e4520b8604dce43c2584092ccde2 Mon Sep 17 00:00:00 2001
From: Michael Cho <michael@michaelcho.dev>
Date: Sun, 27 Oct 2024 10:08:07 -0400
Subject: [PATCH] build: fix building with system icu 76
ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
add `icu-uc` when linking to shared libraries. This results in undefined
symbols/references when trying to build with system ICU 76.
[^1]: unicode-org/icu@199bc82
---
configure.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configure.py
+++ b/configure.py
@@ -1876,7 +1876,7 @@ def configure_intl(o):
elif with_intl == 'system-icu':
# ICU from pkg-config.
o['variables']['v8_enable_i18n_support'] = 1
- pkgicu = pkg_config('icu-i18n')
+ pkgicu = pkg_config(['icu-i18n', 'icu-uc'])
if not pkgicu[0]:
error('''Could not load pkg-config data for "icu-i18n".
See above errors or the README.md.''')

View File

@ -1,38 +0,0 @@
--- a/deps/v8/src/compiler/backend/ia32/instruction-selector-ia32.cc
+++ b/deps/v8/src/compiler/backend/ia32/instruction-selector-ia32.cc
@@ -1161,7 +1161,7 @@ template <typename Adapter>
void VisitAtomicExchange(InstructionSelectorT<Adapter>* selector,
typename Adapter::node_t node, ArchOpcode opcode,
MachineRepresentation rep) {
- using node_t = Adapter::node_t;
+ using node_t = typename Adapter::node_t;
IA32OperandGeneratorT<Adapter> g(selector);
node_t base = selector->input_at(node, 0);
node_t index = selector->input_at(node, 1);
@@ -1732,7 +1732,7 @@ template <typename Adapter>
void VisitWord32PairShift(InstructionSelectorT<Adapter>* selector,
InstructionCode opcode,
typename Adapter::node_t node) {
- using node_t = Adapter::node_t;
+ using node_t = typename Adapter::node_t;
IA32OperandGeneratorT<Adapter> g(selector);
node_t shift = selector->input_at(node, 2);
@@ -2507,7 +2507,7 @@ template <typename Adapter>
void VisitAtomicBinOp(InstructionSelectorT<Adapter>* selector,
typename Adapter::node_t node, ArchOpcode opcode,
MachineRepresentation rep) {
- using node_t = Adapter::node_t;
+ using node_t = typename Adapter::node_t;
AddressingMode addressing_mode;
IA32OperandGeneratorT<Adapter> g(selector);
node_t base = selector->input_at(node, 0);
@@ -2528,7 +2528,7 @@ void VisitAtomicBinOp(InstructionSelecto
template <typename Adapter>
void VisitPairAtomicBinOp(InstructionSelectorT<Adapter>* selector,
typename Adapter::node_t node, ArchOpcode opcode) {
- using node_t = Adapter::node_t;
+ using node_t = typename Adapter::node_t;
IA32OperandGeneratorT<Adapter> g(selector);
node_t base = selector->input_at(node, 0);
node_t index = selector->input_at(node, 1);

View File

@ -13,7 +13,7 @@ Forwarded: https://github.com/nodejs/node/issues/33816
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
@@ -1342,13 +1343,6 @@ function lookupAndConnect(self, options)
@@ -1368,13 +1369,6 @@ function lookupAndConnect(self, options)
hints: options.hints || 0,
};

View File

@ -1,10 +1,10 @@
--- a/node.gyp
+++ b/node.gyp
@@ -1351,6 +1351,7 @@
'deps/simdutf/simdutf.gyp:simdutf#host',
@@ -1139,6 +1139,7 @@
'node.gypi'
],
'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'cflags!': ['-mbranch-protection=standard'],
'include_dirs': [
'tools',
'src',
'tools/msvs/genfiles',

View File

@ -9,12 +9,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=c-ares
PKG_VERSION:=1.18.1
PKG_VERSION:=1.33.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://c-ares.org/download
PKG_HASH:=1a7d52a8a84a9fbffb1be9133c0f6e17217d91ea5a6fa61f6b4729cda78ebbcf
PKG_SOURCE_URL:=https://github.com/c-ares/c-ares/releases/download/v$(PKG_VERSION)
PKG_HASH:=06869824094745872fa26efd4c48e622b9bd82a89ef0ce693dc682a23604f415
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.md
@ -29,7 +29,7 @@ define Package/libcares
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Library for asyncronous DNS Requests (including name resolves)
URL:=http://c-ares.haxx.se/
URL:=https://c-ares.org/
MAINTAINER:=Karl Palsson <karlp@etactica.com>
endef
@ -42,12 +42,16 @@ Netware, Android and many more operating systems.
endef
CMAKE_OPTIONS += \
-DCARES_STATIC=OFF \
-DCARES_SHARED=ON \
-DCARES_STATIC_PIC=ON \
-DCARES_BUILD_TESTS=OFF \
-DCARES_BUILD_TOOLS=OFF
define Build/InstallDev
$(call Build/InstallDev/cmake,$(1))
$(SED) 's,/usr/bin,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcares.pc
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libcares.pc
$(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcares.pc
endef
define Package/libcares/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcares.so.* $(1)/usr/lib/