Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
junhui93
packages
提交
82fdfd65
P
packages
项目概览
junhui93
/
packages
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
packages
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
82fdfd65
编写于
6月 20, 2021
作者:
L
lean
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
node: add nojs soft-float support for MIPS
上级
98460f85
变更
38
隐藏空白更改
内联
并排
Showing
38 changed file
with
1506 addition
and
21 deletion
+1506
-21
lang/node/Makefile
lang/node/Makefile
+63
-19
lang/node/patches/v10.x/001-hardfloat.patch
lang/node/patches/v10.x/001-hardfloat.patch
+10
-0
lang/node/patches/v10.x/003-path.patch
lang/node/patches/v10.x/003-path.patch
+12
-0
lang/node/patches/v10.x/004-musl_support.patch
lang/node/patches/v10.x/004-musl_support.patch
+42
-0
lang/node/patches/v10.x/007-fix_host_build_on_macos.patch
lang/node/patches/v10.x/007-fix_host_build_on_macos.patch
+11
-0
lang/node/patches/v10.x/010-execvp-arg-list-too-long.patch
lang/node/patches/v10.x/010-execvp-arg-list-too-long.patch
+172
-0
lang/node/patches/v10.x/012-changing-default-npm-settings.patch
...ode/patches/v10.x/012-changing-default-npm-settings.patch
+20
-0
lang/node/patches/v10.x/013-npm-unsafe-override-for-global-install.patch
...es/v10.x/013-npm-unsafe-override-for-global-install.patch
+21
-0
lang/node/patches/v10.x/015-mips64_support.patch
lang/node/patches/v10.x/015-mips64_support.patch
+30
-0
lang/node/patches/v10.x/999-delete_unnecessary_libraries_for_host_execute.patch
...x/999-delete_unnecessary_libraries_for_host_execute.patch
+53
-0
lang/node/patches/v10.x/999-deps_v8_Work_around_potentially_missing_madvise.patch
...999-deps_v8_Work_around_potentially_missing_madvise.patch
+23
-0
lang/node/patches/v10.x/999-v8_this_build_method_will_be_deprecated.patch
...s/v10.x/999-v8_this_build_method_will_be_deprecated.patch
+26
-0
lang/node/patches/v12.x/001-hardfloat.patch
lang/node/patches/v12.x/001-hardfloat.patch
+10
-0
lang/node/patches/v12.x/003-path.patch
lang/node/patches/v12.x/003-path.patch
+1
-1
lang/node/patches/v12.x/004-musl_support.patch
lang/node/patches/v12.x/004-musl_support.patch
+42
-0
lang/node/patches/v12.x/005-check-if-uclibc-has-backtrace-support.patch
...hes/v12.x/005-check-if-uclibc-has-backtrace-support.patch
+21
-0
lang/node/patches/v12.x/006-mips64_support.patch
lang/node/patches/v12.x/006-mips64_support.patch
+30
-0
lang/node/patches/v12.x/007-fix_host_build_on_macos.patch
lang/node/patches/v12.x/007-fix_host_build_on_macos.patch
+11
-0
lang/node/patches/v12.x/008-deps_v8_fix_big_endian.patch
lang/node/patches/v12.x/008-deps_v8_fix_big_endian.patch
+11
-0
lang/node/patches/v12.x/010-execvp-arg-list-too-long.patch
lang/node/patches/v12.x/010-execvp-arg-list-too-long.patch
+172
-0
lang/node/patches/v12.x/012-changing-default-npm-settings.patch
...ode/patches/v12.x/012-changing-default-npm-settings.patch
+20
-0
lang/node/patches/v12.x/013-npm-unsafe-override-for-global-install.patch
...es/v12.x/013-npm-unsafe-override-for-global-install.patch
+21
-0
lang/node/patches/v12.x/999-delete_unnecessary_libraries_for_host_execute.patch
...x/999-delete_unnecessary_libraries_for_host_execute.patch
+78
-0
lang/node/patches/v12.x/999-fix_icu_conflict.patch
lang/node/patches/v12.x/999-fix_icu_conflict.patch
+74
-0
lang/node/patches/v12.x/999-localhost-no-addrconfig.patch
lang/node/patches/v12.x/999-localhost-no-addrconfig.patch
+1
-1
lang/node/patches/v12.x/999-mips-fix.patch
lang/node/patches/v12.x/999-mips-fix.patch
+210
-0
lang/node/patches/v12.x/999-v8_this_build_method_will_be_deprecated.patch
...s/v12.x/999-v8_this_build_method_will_be_deprecated.patch
+26
-0
lang/node/patches/v14.x/001-hardfloat.patch
lang/node/patches/v14.x/001-hardfloat.patch
+10
-0
lang/node/patches/v14.x/003-path.patch
lang/node/patches/v14.x/003-path.patch
+12
-0
lang/node/patches/v14.x/004-musl_support.patch
lang/node/patches/v14.x/004-musl_support.patch
+0
-0
lang/node/patches/v14.x/007-fix_host_build_on_macos.patch
lang/node/patches/v14.x/007-fix_host_build_on_macos.patch
+0
-0
lang/node/patches/v14.x/010-execvp-arg-list-too-long.patch
lang/node/patches/v14.x/010-execvp-arg-list-too-long.patch
+200
-0
lang/node/patches/v14.x/012-changing-default-npm-settings.patch
...ode/patches/v14.x/012-changing-default-npm-settings.patch
+20
-0
lang/node/patches/v14.x/013-npm-unsafe-override-for-global-install.patch
...es/v14.x/013-npm-unsafe-override-for-global-install.patch
+21
-0
lang/node/patches/v14.x/999-delete_unnecessary_libraries_for_host_execute.patch
...x/999-delete_unnecessary_libraries_for_host_execute.patch
+0
-0
lang/node/patches/v14.x/999-fix_icu_conflict.patch
lang/node/patches/v14.x/999-fix_icu_conflict.patch
+0
-0
lang/node/patches/v14.x/999-localhost-no-addrconfig.patch
lang/node/patches/v14.x/999-localhost-no-addrconfig.patch
+29
-0
lang/node/test.sh
lang/node/test.sh
+3
-0
未找到文件。
lang/node/Makefile
浏览文件 @
82fdfd65
#
# Copyright (C) 2006-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# See /LICENSE for more information.
#
#
...
@@ -8,14 +5,30 @@
...
@@ -8,14 +5,30 @@
include
$(TOPDIR)/rules.mk
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
node
PKG_NAME
:=
node
PKG_VERSION
:=
v14.17.0
PKG_RELEASE
:=
2
ifeq
($(CONFIG_NODEJS_10),y)
PKG_VERSION
:=
v10.24.1
PKG_RELEASE
:=
3
PKG_HASH
:=
d72fc2c244603b4668da94081dc4d6067d467fdfa026e06a274012f16600480c
PATCH_DIR
:=
./patches/v10.x
else
ifeq
($(CONFIG_NODEJS_14),y)
PKG_VERSION
:=
v14.17.1
PKG_RELEASE
:=
1
PKG_HASH
:=
ddf1d2d56ddf35ecd98c5ea5ddcd690b245899f289559b4330c921255f5a247f
PATCH_DIR
:=
./patches/v14.x
else
PKG_VERSION
:=
v12.22.1
PKG_RELEASE
:=
4
PKG_HASH
:=
dd650df7773a6ed3e390320ba51ef33cba6499f0e9397709ea3d1debdcbcb989
PATCH_DIR
:=
./patches/v12.x
endif
endif
PKG_SOURCE
:=
$(PKG_NAME)
-
$(PKG_VERSION)
.tar.xz
PKG_SOURCE
:=
$(PKG_NAME)
-
$(PKG_VERSION)
.tar.xz
PKG_SOURCE_URL
:=
https://nodejs.org/dist/
$(PKG_VERSION)
PKG_SOURCE_URL
:=
https://nodejs.org/dist/
$(PKG_VERSION)
PKG_HASH
:=
56e05bff9331039317db417f772e635e0cd1c55f733f7b1b079d71ab5842c9ed
PKG_MAINTAINER
:=
Hirokazu MORIKAWA <morikw2@gmail.com>
, Adrian Panella <ianchi74@outlook.com>
PKG_MAINTAINER
:=
Hirokazu MORIKAWA <morikw2@gmail.com>
PKG_LICENSE
:=
MIT
PKG_LICENSE
:=
MIT
PKG_LICENSE_FILES
:=
LICENSE
PKG_LICENSE_FILES
:=
LICENSE
PKG_CPE_ID
:=
cpe:/a:nodejs:node.js
PKG_CPE_ID
:=
cpe:/a:nodejs:node.js
...
@@ -38,15 +51,16 @@ define Package/node
...
@@ -38,15 +51,16 @@ define Package/node
SUBMENU
:=
Node.js
SUBMENU
:=
Node.js
TITLE
:=
Node.js is a platform built on Chrome
's JavaScript runtime
TITLE
:=
Node.js is a platform built on Chrome
's JavaScript runtime
URL
:=
https://nodejs.org/
URL
:=
https://nodejs.org/
DEPENDS
:=
@
HAS_FPU @(i386||x86_64||arm||aarch64||mipsel)
\
DEPENDS
:=
@
(HAS_FPU||KERNEL_MIPS_FPU_EMULATOR||SOFT_FLOAT) @!arc @!armeb @!powerpc
\
+libstdcpp +libopenssl +zlib +libnghttp2
+libuv
\
+libstdcpp +libopenssl +zlib +libnghttp2 \
+lib
cares +lib
atomic +NODEJS_ICU_SYSTEM:icu +NODEJS_ICU_SYSTEM:icu-full-data
+libatomic +NODEJS_ICU_SYSTEM:icu +NODEJS_ICU_SYSTEM:icu-full-data
endef
endef
define
Package/node/description
define
Package/node/description
Node.js®
is
a
JavaScript
runtime
built
on
Chrome
's V8 JavaScript engine. Node.js uses
Node.js®
is
a
JavaScript
runtime
built
on
Chrome
's V8 JavaScript engine. Node.js uses
an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js'
an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js'
package
ecosystem,
npm,
is
the
largest
ecosystem
of
open
source
libraries
in
the
world.
package
ecosystem,
npm,
is
the
largest
ecosystem
of
open
source
libraries
in
the
world.
***
The
following
preparations
must
be
made
on
the
host
side.
***
***
The
following
preparations
must
be
made
on
the
host
side.
***
1.
gcc
6.3
or
higher
is
required.
1.
gcc
6.3
or
higher
is
required.
2.
To
build
a
32-bit
target,
gcc-multilib,
g++-multilib
are
required.
2.
To
build
a
32-bit
target,
gcc-multilib,
g++-multilib
are
required.
...
@@ -68,10 +82,30 @@ define Package/node-npm/description
...
@@ -68,10 +82,30 @@ define Package/node-npm/description
endef
endef
define
Package/node/config
define
Package/node/config
if
PACKAGE_node
menu
"Configuration"
depends
on
PACKAGE_node
choice
prompt
"Version Selection"
default
NODEJS_12
if
mips||mipsel||mips64||mips64el
default
NODEJS_14
help
Select
node.js
version.
config
NODEJS_10
bool "10.x End-of-life
:
NO LONGER SUPPORTED"
config
NODEJS_12
bool
"12.x Maintenance LTS"
config
NODEJS_14
depends
on
!(mips||mipsel||mips64||mips64el)
bool
"14.x Active LTS"
endchoice
choice
choice
prompt
"i18n features"
prompt
"i18n features"
default
NODEJS_ICU_
SMALL
default
NODEJS_ICU_
NONE
help
help
Select
i18n
features
Select
i18n
features
...
@@ -79,16 +113,22 @@ define Package/node/config
...
@@ -79,16 +113,22 @@ define Package/node/config
bool
"Disable"
bool
"Disable"
config
NODEJS_ICU_SMALL
config
NODEJS_ICU_SMALL
depends
on
!BIG_ENDIAN
bool
"small-icu"
bool
"small-icu"
config
NODEJS_ICU_SYSTEM
config
NODEJS_ICU_SYSTEM
depends
on
ARCH_64BIT
depends
on
ARCH_64BIT
&&!BIG_ENDIAN
bool
"system-icu"
bool
"system-icu"
endchoice
endchoice
endif
endmenu
endef
endef
NODEJS_CPU
:=
$(
subst
aarch64,arm64,
$(
subst
x86_64,x64,
$(
subst
i386,ia32,
$(ARCH)
)))
NODEJS_CPU
:=
$(
subst
powerpc,ppc,
$(
subst
aarch64,arm64,
$(
subst
x86_64,x64,
$(
subst
i386,ia32,
$(ARCH)
))))
ifeq
($(CONFIG_NODEJS_10),y)
TARGET_LDFLAGS
+=
-latomic
endif
ifneq
($(CONFIG_ARCH_64BIT),y)
ifneq
($(CONFIG_ARCH_64BIT),y)
FORCE_32BIT
:=
-m32
FORCE_32BIT
:=
-m32
...
@@ -114,9 +154,9 @@ CONFIGURE_ARGS:= \
...
@@ -114,9 +154,9 @@ CONFIGURE_ARGS:= \
--shared-zlib
\
--shared-zlib
\
--shared-openssl
\
--shared-openssl
\
--shared-nghttp2
\
--shared-nghttp2
\
--shared-libuv \
--shared-cares \
--with-intl
=
$(
if
$(CONFIG_NODEJS_ICU_SMALL)
,small-icu,
$(
if
$(CONFIG_NODEJS_ICU_SYSTEM)
,system-icu,none
))
\
--with-intl
=
$(
if
$(CONFIG_NODEJS_ICU_SMALL)
,small-icu,
$(
if
$(CONFIG_NODEJS_ICU_SYSTEM)
,system-icu,none
))
\
$(
if
$(
findstring
mips,
$(NODEJS_CPU)
)
,
\
$(
if
$(CONFIG_SOFT_FLOAT)
,--with-mips-float-abi
=
soft
))
\
$(
if
$(
findstring
+neon,
$(CONFIG_CPU_TYPE)
)
,--with-arm-fpu
=
neon
)
\
$(
if
$(
findstring
+neon,
$(CONFIG_CPU_TYPE)
)
,--with-arm-fpu
=
neon
)
\
$(
if
$(
findstring
+vfp
",
$(CONFIG_CPU_TYPE)
)
,--with-arm-fpu=vfp
)
\
$(
if
$(
findstring
+vfp
",
$(CONFIG_CPU_TYPE)
)
,--with-arm-fpu=vfp
)
\
$(
if
$(
findstring
+vfpv3"
,
$(CONFIG_CPU_TYPE)
)
,--with-arm-fpu
=
vfpv3-d16
)
\
$(
if
$(
findstring
+vfpv3"
,
$(CONFIG_CPU_TYPE)
)
,--with-arm-fpu
=
vfpv3-d16
)
\
...
@@ -124,7 +164,6 @@ CONFIGURE_ARGS:= \
...
@@ -124,7 +164,6 @@ CONFIGURE_ARGS:= \
--prefix=/usr
--prefix=/usr
HOST_CONFIGURE_VARS
:=
HOST_CONFIGURE_VARS
:=
HOST_CONFIGURE_ARGS
:=
\
HOST_CONFIGURE_ARGS
:=
\
--dest-os=
$(
if
$(
findstring
Darwin,
$(HOST_OS)
)
,mac,linux
)
\
--dest-os=
$(
if
$(
findstring
Darwin,
$(HOST_OS)
)
,mac,linux
)
\
--with-intl=small-icu
\
--with-intl=small-icu
\
...
@@ -141,7 +180,7 @@ define Package/node/install
...
@@ -141,7 +180,7 @@ define Package/node/install
endef
endef
define
Package/node-npm/install
define
Package/node-npm/install
$(INSTALL_DIR)
$(1)/usr/lib/node_modules/npm
$(INSTALL_DIR)
$(1)/usr/lib/node_modules/npm
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE}
\
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE}
\
$(1)/usr/lib/node_modules/npm/
$(1)/usr/lib/node_modules/npm/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{AUTHORS,*.md}
\
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{AUTHORS,*.md}
\
...
@@ -153,6 +192,11 @@ define Package/node-npm/install
...
@@ -153,6 +192,11 @@ define Package/node-npm/install
$(LN)
../lib/node_modules/npm/bin/npx-cli.js
$(1)/usr/bin/npx
$(LN)
../lib/node_modules/npm/bin/npx-cli.js
$(1)/usr/bin/npx
endef
endef
define
Package/node-npm/postrm
#!/bin/sh
rm
-rf
/usr/lib/node_modules/npm
||
true
endef
$(eval
$(call
HostBuild))
$(eval
$(call
HostBuild))
$(eval
$(call
BuildPackage,node))
$(eval
$(call
BuildPackage,node))
$(eval
$(call
BuildPackage,node-npm))
$(eval
$(call
BuildPackage,node-npm))
lang/node/patches/v10.x/001-hardfloat.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -143,6 +143,7 @@
int __detect_fp64_mode(void) {
".set push\n\t"
".set noreorder\n\t"
".set oddspreg\n\t"
+ ".set hardfloat\n\t"
"lui $t0, 0x3FF0\n\t"
"ldc1 $f0, %0\n\t"
"mtc1 $t0, $f1\n\t"
lang/node/patches/v10.x/003-path.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -863,7 +863,8 @@
Module._initPaths = function() {
} else {
prefixDir = path.resolve(process.execPath, '..', '..');
}
- var paths = [path.resolve(prefixDir, 'lib', 'node')];
+ var paths = [path.resolve(prefixDir, 'lib', 'node'),
+ path.resolve(prefixDir, 'lib', 'node_modules')];
if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
lang/node/patches/v10.x/004-musl_support.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/v8/src/base/platform/condition-variable.cc
+++ b/deps/v8/src/base/platform/condition-variable.cc
@@ -16,7 +16,7 @@
namespace base {
ConditionVariable::ConditionVariable() {
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
- (V8_OS_LINUX && V8_LIBC_GLIBC))
+ V8_OS_LINUX)
// On Free/Net/OpenBSD and Linux with glibc we can change the time
// source for pthread_cond_timedwait() to use the monotonic clock.
pthread_condattr_t attr;
@@ -92,7 +92,7 @@
bool ConditionVariable::WaitFor(Mutex* m
&native_handle_, &mutex->native_handle(), &ts);
#else
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
- (V8_OS_LINUX && V8_LIBC_GLIBC))
+ V8_OS_LINUX)
// On Free/Net/OpenBSD and Linux with glibc we can change the time
// source for pthread_cond_timedwait() to use the monotonic clock.
result = clock_gettime(CLOCK_MONOTONIC, &ts);
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -759,7 +759,7 @@
void Thread::Start() {
#if V8_OS_MACOSX
// Default on Mac OS X is 512kB -- bump up to 1MB
stack_size = 1 * 1024 * 1024;
-#elif V8_OS_AIX
+#elif V8_OS_AIX || !defined(__GLIBC__)
// Default on AIX is 96kB -- bump up to 2MB
stack_size = 2 * 1024 * 1024;
#endif
--- a/deps/v8/src/external-reference-table.cc
+++ b/deps/v8/src/external-reference-table.cc
@@ -9,7 +9,7 @@
#include "src/external-reference.h"
#include "src/ic/stub-cache.h"
-#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
+#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) && defined(V8_LIBC_GLIBC)
#define SYMBOLIZE_FUNCTION
#include <execinfo.h>
#include <vector>
lang/node/patches/v10.x/007-fix_host_build_on_macos.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -174,7 +174,7 @@
cmd_solink_module = $(LINK.$(TOOLSET)) -
LINK_COMMANDS_MAC = """\
quiet_cmd_alink = LIBTOOL-STATIC $@
-cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
+cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool /usr/bin/libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
lang/node/patches/v10.x/010-execvp-arg-list-too-long.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
@@ -151,6 +151,30 @@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOL
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
@@ -195,6 +219,30 @@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET))
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
@@ -1612,11 +1660,17 @@
$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
"Spaces in alink input filenames not supported (%s)" % link_dep)
if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
self.is_standalone_static_library):
- self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
- part_of_all, postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_thin_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
+ part_of_all, postbuilds=postbuilds)
else:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
- postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+ postbuilds=postbuilds)
elif self.type == 'shared_library':
self.WriteLn('%s: LD_INPUTS := %s' % (
QuoteSpaces(self.output_binary),
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -149,6 +149,30 @@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOL
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
@@ -193,6 +217,30 @@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET))
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
@@ -1589,11 +1637,17 @@
$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
"Spaces in alink input filenames not supported (%s)" % link_dep)
if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
self.is_standalone_static_library):
- self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
- part_of_all, postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_thin_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
+ part_of_all, postbuilds=postbuilds)
else:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
- postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+ postbuilds=postbuilds)
elif self.type == 'shared_library':
self.WriteLn('%s: LD_INPUTS := %s' % (
QuoteSpaces(self.output_binary),
lang/node/patches/v10.x/012-changing-default-npm-settings.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -175,7 +175,7 @@
Object.defineProperty(exports, 'defaults
'legacy-bundling': false,
link: false,
'local-address': undefined,
- loglevel: 'notice',
+ loglevel: 'info',
logstream: process.stderr,
'logs-max': 10,
long: false,
@@ -231,7 +231,7 @@
Object.defineProperty(exports, 'defaults
'sign-git-tag': false,
'sso-poll-frequency': 500,
'sso-type': 'oauth',
- 'strict-ssl': true,
+ 'strict-ssl': false,
tag: 'latest',
'tag-version-prefix': 'v',
timing: false,
lang/node/patches/v10.x/013-npm-unsafe-override-for-global-install.patch
0 → 100644
浏览文件 @
82fdfd65
From cdb02b95ed9b12f82620ae1652cba20464c2ccf0 Mon Sep 17 00:00:00 2001
From: Arturo Rinaldi <arty.net2@gmail.com>
Date: Wed, 1 Nov 2017 14:51:43 +0100
Subject: [PATCH] npm: overriding unsafe-perm setting to install packages
globally
---
deps/npm/lib/config/defaults.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -243,7 +243,7 @@
Object.defineProperty(exports, 'defaults
process.getgid && process.setgid) ||
process.getuid() !== 0,
'update-notifier': true,
- usage: false,
+ usage: true,
user: (process.platform === 'win32' || os.type() === 'OS400') ? 0 : 'nobody',
userconfig: path.resolve(home, '.npmrc'),
umask: process.umask ? process.umask() : umask.fromString('022'),
lang/node/patches/v10.x/015-mips64_support.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/configure.py
+++ b/configure.py
@@ -46,7 +46,7 @@
parser = optparse.OptionParser()
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
'android', 'aix', 'cloudabi')
-valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
+valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc',
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
@@ -872,6 +872,9 @@
def host_arch_cc():
if rtn == 'mipsel' and '_LP64' in k:
rtn = 'mips64el'
+ if rtn == 'mips' and '_LP64' in k:
+ rtn = 'mips64'
+
return rtn
@@ -963,7 +966,7 @@
def configure_node(o):
if target_arch == 'arm':
configure_arm(o)
- elif target_arch in ('mips', 'mipsel', 'mips64el'):
+ elif target_arch in ('mips', 'mipsel', 'mips64', 'mips64el'):
configure_mips(o)
if flavor == 'aix':
lang/node/patches/v10.x/999-delete_unnecessary_libraries_for_host_execute.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/tools/icu/icu-generic.gyp
+++ b/tools/icu/icu-generic.gyp
@@ -518,6 +518,7 @@
'target_name': 'genrb',
'type': 'executable',
'toolsets': [ 'host' ],
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_genrb)'
@@ -534,6 +535,7 @@
'target_name': 'iculslocs',
'toolsets': [ 'host' ],
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'iculslocs.cc',
@@ -546,6 +548,7 @@
'target_name': 'icupkg',
'toolsets': [ 'host' ],
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_icupkg)',
@@ -557,6 +560,7 @@
'target_name': 'genccode',
'toolsets': [ 'host' ],
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_genccode)',
--- a/deps/v8/gypfiles/v8.gyp
+++ b/deps/v8/gypfiles/v8.gyp
@@ -2447,6 +2447,7 @@
'target_name': 'torque',
'type': 'executable',
'toolsets': ['host'],
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': ['v8_libbase'],
'cflags_cc!': ['-fno-exceptions', '-fno-rtti'],
'xcode_settings': {
@@ -2904,6 +2905,8 @@
{
'target_name': 'mksnapshot',
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ],
'dependencies': [
'v8_base',
'v8_init',
lang/node/patches/v10.x/999-deps_v8_Work_around_potentially_missing_madvise.patch
0 → 100644
浏览文件 @
82fdfd65
From d9cc4774e3a065e7ad7dec942cb3bdb6ac9032c2 Mon Sep 17 00:00:00 2001
From: Anna Henningsen <anna@addaleax.net>
Date: Wed, 11 Jul 2018 01:08:55 +0200
Subject: [PATCH] [platform] Work around potentially missing `madvise()`
Some Linux kernels are built without `madvise()`. In that
case, do not crash but rather ignore the return value instead.
Refs: https://github.com/nodejs/node/issues/21562
Change-Id: Iff8d0d0e9e7935804e2fc994be7f8bd21c553846
---
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -156,6 +156,8 @@
int ReclaimInaccessibleMemory(void* addr
#else
int ret = madvise(address, size, MADV_FREE);
#endif
+ if (ret != 0 && errno == ENOSYS)
+ return 0; // madvise is not available on all systems.
if (ret != 0 && errno == EINVAL) {
// MADV_FREE only works on Linux 4.5+ . If request failed, retry with older
// MADV_DONTNEED . Note that MADV_FREE being defined at compile time doesn't
lang/node/patches/v10.x/999-v8_this_build_method_will_be_deprecated.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/configure.py
+++ b/configure.py
@@ -1203,6 +1203,15 @@
def configure_v8(o):
options.build_v8_with_gn = FetchDeps(v8_path)
o['variables']['build_v8_with_gn'] = b(options.build_v8_with_gn)
+def configure_v8_deprecated(o):
+ target_arch = options.dest_cpu
+ if target_arch == 'x86':
+ target_arch = 'ia32'
+ if target_arch == 'x86_64':
+ target_arch = 'x64'
+
+ if target_arch in ('mips', 'mips64'):
+ o['variables']['v8_use_snapshot'] = 'false'
def configure_openssl(o):
variables = o['variables']
@@ -1625,6 +1634,7 @@
configure_openssl(output)
configure_intl(output)
configure_static(output)
configure_inspector(output)
+configure_v8_deprecated(output)
# variables should be a root level element,
# move everything else to target_defaults
lang/node/patches/v12.x/001-hardfloat.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -143,6 +143,7 @@
int __detect_fp64_mode(void) {
".set push\n\t"
".set noreorder\n\t"
".set oddspreg\n\t"
+ ".set hardfloat\n\t"
"lui $t0, 0x3FF0\n\t"
"ldc1 $f0, %0\n\t"
"mtc1 $t0, $f1\n\t"
lang/node/patches/003-path.patch
→
lang/node/patches/
v12.x/
003-path.patch
浏览文件 @
82fdfd65
--- a/lib/internal/modules/cjs/loader.js
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -11
84,7 +1184
,8 @@
Module._initPaths = function() {
@@ -11
09,7 +1109
,8 @@
Module._initPaths = function() {
path.resolve(process.execPath, '..') :
path.resolve(process.execPath, '..') :
path.resolve(process.execPath, '..', '..');
path.resolve(process.execPath, '..', '..');
...
...
lang/node/patches/v12.x/004-musl_support.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/v8/src/base/platform/condition-variable.cc
+++ b/deps/v8/src/base/platform/condition-variable.cc
@@ -16,7 +16,7 @@
namespace base {
ConditionVariable::ConditionVariable() {
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
- (V8_OS_LINUX && V8_LIBC_GLIBC))
+ V8_OS_LINUX)
// On Free/Net/OpenBSD and Linux with glibc we can change the time
// source for pthread_cond_timedwait() to use the monotonic clock.
pthread_condattr_t attr;
@@ -92,7 +92,7 @@
bool ConditionVariable::WaitFor(Mutex* m
&native_handle_, &mutex->native_handle(), &ts);
#else
#if (V8_OS_FREEBSD || V8_OS_NETBSD || V8_OS_OPENBSD || \
- (V8_OS_LINUX && V8_LIBC_GLIBC))
+ V8_OS_LINUX)
// On Free/Net/OpenBSD and Linux with glibc we can change the time
// source for pthread_cond_timedwait() to use the monotonic clock.
result = clock_gettime(CLOCK_MONOTONIC, &ts);
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -772,7 +772,7 @@
bool Thread::Start() {
#if V8_OS_MACOSX
// Default on Mac OS X is 512kB -- bump up to 1MB
stack_size = 1 * 1024 * 1024;
-#elif V8_OS_AIX
+#elif V8_OS_AIX || !defined(__GLIBC__)
// Default on AIX is 96kB -- bump up to 2MB
stack_size = 2 * 1024 * 1024;
#endif
--- a/deps/v8/src/codegen/external-reference-table.cc
+++ b/deps/v8/src/codegen/external-reference-table.cc
@@ -9,7 +9,7 @@
#include "src/ic/stub-cache.h"
#include "src/logging/counters.h"
-#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
+#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) && defined(V8_LIBC_GLIBC)
#define SYMBOLIZE_FUNCTION
#include <execinfo.h>
#include <vector>
lang/node/patches/v12.x/005-check-if-uclibc-has-backtrace-support.patch
0 → 100644
浏览文件 @
82fdfd65
From 7c69553d7275bbcaa88fada8ccd0d2d9f787e1ad Mon Sep 17 00:00:00 2001
From: Martin Bark <martin@barkynet.com>
Date: Sat, 4 Mar 2017 20:41:40 +0000
Subject: [PATCH] check if uclibc has backtrace support
Signed-off-by: Martin Bark <martin@barkynet.com>
---
deps/v8/src/base/debug/stack_trace_posix.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/deps/v8/src/base/debug/stack_trace_posix.cc
+++ b/deps/v8/src/base/debug/stack_trace_posix.cc
@@ -25,7 +25,7 @@
#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 && __UCLIBC_HAS_BACKTRACE__ ) || V8_OS_SOLARIS
#define HAVE_EXECINFO_H 1
#endif
lang/node/patches/v12.x/006-mips64_support.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/configure.py
+++ b/configure.py
@@ -48,7 +48,7 @@
parser = optparse.OptionParser()
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
'android', 'aix', 'cloudabi')
-valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
+valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64', 'mips64el', 'ppc',
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390x')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
@@ -967,6 +967,9 @@
def host_arch_cc():
if rtn == 'mipsel' and '_LP64' in k:
rtn = 'mips64el'
+ if rtn == 'mips' and '_LP64' in k:
+ rtn = 'mips64'
+
return rtn
@@ -1074,7 +1077,7 @@
def configure_node(o):
if target_arch == 'arm':
configure_arm(o)
- elif target_arch in ('mips', 'mipsel', 'mips64el'):
+ elif target_arch in ('mips', 'mipsel', 'mips64', 'mips64el'):
configure_mips(o, target_arch)
if flavor == 'aix':
lang/node/patches/v12.x/007-fix_host_build_on_macos.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -176,7 +176,7 @@
cmd_solink_module = $(LINK.$(TOOLSET)) -
LINK_COMMANDS_MAC = """\
quiet_cmd_alink = LIBTOOL-STATIC $@
-cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
+cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool /usr/bin/libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
lang/node/patches/v12.x/008-deps_v8_fix_big_endian.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/v8/src/runtime/runtime-utils.h
+++ b/deps/v8/src/runtime/runtime-utils.h
@@ -126,7 +126,7 @@
static inline ObjectPair MakePair(Object
#if defined(V8_TARGET_LITTLE_ENDIAN)
return x.ptr() | (static_cast<ObjectPair>(y.ptr()) << 32);
#elif defined(V8_TARGET_BIG_ENDIAN)
- return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32);
+ return y.ptr() | (static_cast<ObjectPair>(x.ptr()) << 32);
#else
#error Unknown endianness
#endif
lang/node/patches/v12.x/010-execvp-arg-list-too-long.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
@@ -151,6 +151,30 @@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOL
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
@@ -195,6 +219,30 @@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET))
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
@@ -1612,11 +1660,17 @@
$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
"Spaces in alink input filenames not supported (%s)" % link_dep)
if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
self.is_standalone_static_library):
- self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
- part_of_all, postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_thin_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
+ part_of_all, postbuilds=postbuilds)
else:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
- postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+ postbuilds=postbuilds)
elif self.type == 'shared_library':
self.WriteLn('%s: LD_INPUTS := %s' % (
QuoteSpaces(self.output_binary),
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -151,6 +151,30 @@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOL
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
@@ -195,6 +219,30 @@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET))
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
@@ -1612,11 +1660,17 @@
$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
"Spaces in alink input filenames not supported (%s)" % link_dep)
if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
self.is_standalone_static_library):
- self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
- part_of_all, postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_thin_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
+ part_of_all, postbuilds=postbuilds)
else:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
- postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+ postbuilds=postbuilds)
elif self.type == 'shared_library':
self.WriteLn('%s: LD_INPUTS := %s' % (
QuoteSpaces(self.output_binary),
lang/node/patches/v12.x/012-changing-default-npm-settings.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -175,7 +175,7 @@
Object.defineProperty(exports, 'defaults
'legacy-bundling': false,
link: false,
'local-address': undefined,
- loglevel: 'notice',
+ loglevel: 'info',
logstream: process.stderr,
'logs-max': 10,
long: false,
@@ -231,7 +231,7 @@
Object.defineProperty(exports, 'defaults
'sign-git-tag': false,
'sso-poll-frequency': 500,
'sso-type': 'oauth',
- 'strict-ssl': true,
+ 'strict-ssl': false,
tag: 'latest',
'tag-version-prefix': 'v',
timing: false,
lang/node/patches/v12.x/013-npm-unsafe-override-for-global-install.patch
0 → 100644
浏览文件 @
82fdfd65
From cdb02b95ed9b12f82620ae1652cba20464c2ccf0 Mon Sep 17 00:00:00 2001
From: Arturo Rinaldi <arty.net2@gmail.com>
Date: Wed, 1 Nov 2017 14:51:43 +0100
Subject: [PATCH] npm: overriding unsafe-perm setting to install packages
globally
---
deps/npm/lib/config/defaults.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -243,7 +243,7 @@
Object.defineProperty(exports, 'defaults
process.getgid && process.setgid) ||
process.getuid() !== 0,
'update-notifier': true,
- usage: false,
+ usage: true,
user: (process.platform === 'win32' || os.type() === 'OS400') ? 0 : 'nobody',
userconfig: path.resolve(home, '.npmrc'),
umask: process.umask ? process.umask() : umask.fromString('022'),
lang/node/patches/v12.x/999-delete_unnecessary_libraries_for_host_execute.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/tools/icu/icu-generic.gyp
+++ b/tools/icu/icu-generic.gyp
@@ -517,6 +517,7 @@
'target_name': 'genrb',
'type': 'executable',
'toolsets': [ 'host' ],
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_genrb)'
@@ -533,6 +534,7 @@
'target_name': 'iculslocs',
'toolsets': [ 'host' ],
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'iculslocs.cc',
@@ -545,6 +547,7 @@
'target_name': 'icupkg',
'toolsets': [ 'host' ],
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_icupkg)',
@@ -556,6 +559,7 @@
'target_name': 'genccode',
'toolsets': [ 'host' ],
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [ 'icutools' ],
'sources': [
'<@(icu_src_genccode)',
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -1255,6 +1255,7 @@
{
'target_name': 'bytecode_builtins_list_generator',
'type': 'executable',
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'conditions': [
['want_separate_host_toolset', {
'toolsets': ['host'],
@@ -1278,6 +1279,8 @@
{
'target_name': 'mksnapshot',
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ],
'dependencies': [
'v8_base_without_compiler',
'v8_compiler_for_mksnapshot',
@@ -1300,6 +1303,7 @@
{
'target_name': 'torque',
'type': 'executable',
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'dependencies': [
'torque_base',
# "build/win:default_exe_manifest",
@@ -1338,6 +1342,7 @@
{
'target_name': 'torque-language-server',
'type': 'executable',
+ 'libraries!':[ '-licui18n', '-licuuc', '-licudata', '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
'conditions': [
['want_separate_host_toolset', {
'toolsets': ['host'],
@@ -1365,6 +1370,8 @@
{
'target_name': 'gen-regexp-special-case',
'type': 'executable',
+ 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ],
+ 'library_dirs':[ '../../../../staging_dir/hostpkg/share/icu/current/lib' ],
'dependencies': [
'v8_libbase',
# "build/win:default_exe_manifest",
lang/node/patches/v12.x/999-fix_icu_conflict.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/tools/icu/icu-generic.gyp
+++ b/tools/icu/icu-generic.gyp
@@ -181,6 +181,7 @@
'<(icu_path)/source/i18n/uspoof_wsconf.h',
]}],
],
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/i18n',
],
@@ -189,6 +190,7 @@
],
'dependencies': [ 'icuucx', 'icu_implementation', 'icu_uconfig', 'icu_uconfig_target' ],
'direct_dependent_settings': {
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/i18n',
],
@@ -274,6 +276,7 @@
# full data - just build the full data file, then we are done.
'sources': [ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)_dat.c' ],
'dependencies': [ 'genccode#host', 'icupkg#host', 'icu_implementation#host', 'icu_uconfig' ],
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/common',
],
@@ -354,6 +357,7 @@
# This file contains the small ICU data
'sources': [ '<(SHARED_INTERMEDIATE_DIR)/icusmdt<(icu_ver_major)_dat.c' ],
# for umachine.h
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/common',
],
@@ -370,6 +374,7 @@
'sources': [
'<@(icu_src_stubdata)'
],
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/common',
],
@@ -438,6 +443,7 @@
'_XOPEN_SOURCE_EXTENDED=0',
]}],
],
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/common',
],
@@ -447,6 +453,7 @@
'cflags_c': ['-std=c99'],
'export_dependent_settings': [ 'icu_uconfig', 'icu_uconfig_target' ],
'direct_dependent_settings': {
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/common',
],
@@ -477,6 +484,7 @@
'<(icu_path)/source/tools/toolutil/dbgutil.cpp',
'<(icu_path)/source/tools/toolutil/dbgutil.h',
],
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/common',
'<(icu_path)/source/i18n',
@@ -496,6 +504,7 @@
}]
],
'direct_dependent_settings': {
+ 'include_dirs!': [ '<!@(echo "$STAGING_DIR"/usr/include)' ],
'include_dirs': [
'<(icu_path)/source/common',
'<(icu_path)/source/i18n',
lang/node/patches/999-localhost-no-addrconfig.patch
→
lang/node/patches/
v12.x/
999-localhost-no-addrconfig.patch
浏览文件 @
82fdfd65
...
@@ -13,7 +13,7 @@ Forwarded: https://github.com/nodejs/node/issues/33816
...
@@ -13,7 +13,7 @@ Forwarded: https://github.com/nodejs/node/issues/33816
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// copy of this software and associated documentation files (the
@@ -102
6,13 +1027
,6 @@
function lookupAndConnect(self, options)
@@ -102
8,13 +1029
,6 @@
function lookupAndConnect(self, options)
hints: options.hints || 0
hints: options.hints || 0
};
};
...
...
lang/node/patches/v12.x/999-mips-fix.patch
0 → 100644
浏览文件 @
82fdfd65
Description: upstream mips fix
Origin: https://github.com/nodejs/node/issues/31118
Last-Update: 2020-05-30
--- a/deps/v8/AUTHORS
+++ b/deps/v8/AUTHORS
@@ -106,6 +106,7 @@
James Pike <g00gle@chilon.net>
James M Snell <jasnell@gmail.com>
Jianghua Yang <jianghua.yjh@alibaba-inc.com>
Jiawen Geng <technicalcute@gmail.com>
+Jiaxun Yang <jiaxun.yang@flygoat.com>
Joel Stanley <joel@jms.id.au>
Johan Bergström <johan@bergstroem.nu>
Jonathan Liu <net147@gmail.com>
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.cc
@@ -94,10 +94,6 @@
void PlatformEmbeddedFileWriterAIX::Decl
void PlatformEmbeddedFileWriterAIX::DeclareFunctionEnd(const char* name) {}
-int PlatformEmbeddedFileWriterAIX::HexLiteral(uint64_t value) {
- return fprintf(fp_, "0x%" PRIx64, value);
-}
-
void PlatformEmbeddedFileWriterAIX::FilePrologue() {}
void PlatformEmbeddedFileWriterAIX::DeclareExternalFilename(
@@ -120,12 +116,6 @@
DataDirective PlatformEmbeddedFileWriter
return kLong;
}
-int PlatformEmbeddedFileWriterAIX::WriteByteChunk(const uint8_t* data) {
- DCHECK_EQ(ByteChunkDataDirective(), kLong);
- const uint32_t* long_ptr = reinterpret_cast<const uint32_t*>(data);
- return HexLiteral(*long_ptr);
-}
-
#undef SYMBOL_PREFIX
} // namespace internal
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.h
@@ -37,8 +37,6 @@
class PlatformEmbeddedFileWriterAIX : pu
void DeclareFunctionBegin(const char* name) override;
void DeclareFunctionEnd(const char* name) override;
- int HexLiteral(uint64_t value) override;
-
void Comment(const char* string) override;
void FilePrologue() override;
@@ -48,7 +46,6 @@
class PlatformEmbeddedFileWriterAIX : pu
int IndentedDataDirective(DataDirective directive) override;
DataDirective ByteChunkDataDirective() const override;
- int WriteByteChunk(const uint8_t* data) override;
private:
void DeclareSymbolGlobal(const char* name);
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
@@ -24,6 +24,10 @@
DataDirective PointerSizeDirective() {
}
}
+int PlatformEmbeddedFileWriterBase::HexLiteral(uint64_t value) {
+ return fprintf(fp_, "0x%" PRIx64, value);
+}
+
int DataDirectiveSize(DataDirective directive) {
switch (directive) {
case kByte:
@@ -39,24 +43,37 @@
int DataDirectiveSize(DataDirective dire
}
int PlatformEmbeddedFileWriterBase::WriteByteChunk(const uint8_t* data) {
- DCHECK_EQ(ByteChunkDataDirective(), kOcta);
-
- static constexpr size_t kSize = kInt64Size;
-
- uint64_t part1, part2;
- // Use memcpy for the reads since {data} is not guaranteed to be aligned.
+ size_t kSize = DataDirectiveSize(ByteChunkDataDirective());
+ size_t kHalfSize = kSize / 2;
+ uint64_t high = 0, low = 0;
+
+ switch (kSize) {
+ case 1:
+ low = *data;
+ break;
+ case 4:
+ low = *reinterpret_cast<const uint32_t*>(data);
+ break;
+ case 8:
+ low = *reinterpret_cast<const uint64_t*>(data);
+ break;
+ case 16:
#ifdef V8_TARGET_BIG_ENDIAN
- memcpy(&part1, data, kSize);
- memcpy(&part2, data + kSize, kSize);
+ memcpy(&high, data, kHalfSize);
+ memcpy(&low, data + kHalfSize, kHalfSize);
#else
- memcpy(&part1, data + kSize, kSize);
- memcpy(&part2, data, kSize);
+ memcpy(&high, data + kHalfSize, kHalfSize);
+ memcpy(&low, data, kHalfSize);
#endif // V8_TARGET_BIG_ENDIAN
+ break;
+ default:
+ UNREACHABLE();
+ }
- if (part1 != 0) {
- return fprintf(fp(), "0x%" PRIx64 "%016" PRIx64, part1, part2);
+ if (high != 0) {
+ return fprintf(fp(), "0x%" PRIx64 "%016" PRIx64, high, low);
} else {
- return fprintf(fp(), "0x%" PRIx64, part2);
+ return fprintf(fp(), "0x%" PRIx64, low);
}
}
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
@@ -67,7 +67,7 @@
class PlatformEmbeddedFileWriterBase {
virtual void DeclareFunctionEnd(const char* name) = 0;
// Returns the number of printed characters.
- virtual int HexLiteral(uint64_t value) = 0;
+ virtual int HexLiteral(uint64_t value);
virtual void Comment(const char* string) = 0;
virtual void Newline() { fprintf(fp_, "\n"); }
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
@@ -112,10 +112,6 @@
void PlatformEmbeddedFileWriterGeneric::
void PlatformEmbeddedFileWriterGeneric::DeclareFunctionEnd(const char* name) {}
-int PlatformEmbeddedFileWriterGeneric::HexLiteral(uint64_t value) {
- return fprintf(fp_, "0x%" PRIx64, value);
-}
-
void PlatformEmbeddedFileWriterGeneric::FilePrologue() {}
void PlatformEmbeddedFileWriterGeneric::DeclareExternalFilename(
@@ -142,6 +138,18 @@
int PlatformEmbeddedFileWriterGeneric::I
return fprintf(fp_, " %s ", DirectiveAsString(directive));
}
+DataDirective PlatformEmbeddedFileWriterGeneric::ByteChunkDataDirective()
+ const {
+#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64)
+ // MIPS uses a fixed 4 byte instruction set, using .long
+ // to prevent any unnecessary padding.
+ return kLong;
+#else
+ // Other ISAs just listen to the base
+ return PlatformEmbeddedFileWriterBase::ByteChunkDataDirective();
+#endif
+}
+
#undef SYMBOL_PREFIX
} // namespace internal
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.h
@@ -39,8 +39,6 @@
class PlatformEmbeddedFileWriterGeneric
void DeclareFunctionBegin(const char* name) override;
void DeclareFunctionEnd(const char* name) override;
- int HexLiteral(uint64_t value) override;
-
void Comment(const char* string) override;
void FilePrologue() override;
@@ -49,6 +47,8 @@
class PlatformEmbeddedFileWriterGeneric
int IndentedDataDirective(DataDirective directive) override;
+ DataDirective ByteChunkDataDirective() const override;
+
private:
void DeclareSymbolGlobal(const char* name);
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.cc
@@ -87,10 +87,6 @@
void PlatformEmbeddedFileWriterMac::Decl
void PlatformEmbeddedFileWriterMac::DeclareFunctionEnd(const char* name) {}
-int PlatformEmbeddedFileWriterMac::HexLiteral(uint64_t value) {
- return fprintf(fp_, "0x%" PRIx64, value);
-}
-
void PlatformEmbeddedFileWriterMac::FilePrologue() {}
void PlatformEmbeddedFileWriterMac::DeclareExternalFilename(
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.h
@@ -37,8 +37,6 @@
class PlatformEmbeddedFileWriterMac : pu
void DeclareFunctionBegin(const char* name) override;
void DeclareFunctionEnd(const char* name) override;
- int HexLiteral(uint64_t value) override;
-
void Comment(const char* string) override;
void FilePrologue() override;
lang/node/patches/v12.x/999-v8_this_build_method_will_be_deprecated.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/configure.py
+++ b/configure.py
@@ -1288,6 +1288,15 @@
def configure_v8(o):
options.build_v8_with_gn = FetchDeps(v8_path)
o['variables']['build_v8_with_gn'] = b(options.build_v8_with_gn)
+def configure_v8_deprecated(o):
+ target_arch = options.dest_cpu
+ if target_arch == 'x86':
+ target_arch = 'ia32'
+ if target_arch == 'x86_64':
+ target_arch = 'x64'
+
+ if target_arch in ('mips', 'mips64'):
+ o['variables']['v8_use_snapshot'] = 'false'
def configure_openssl(o):
variables = o['variables']
@@ -1725,6 +1734,7 @@
configure_openssl(output)
configure_intl(output)
configure_static(output)
configure_inspector(output)
+configure_v8_deprecated(output)
# Forward OSS-Fuzz settings
output['variables']['ossfuzz'] = b(options.ossfuzz)
lang/node/patches/v14.x/001-hardfloat.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -146,6 +146,7 @@
int __detect_fp64_mode(void) {
".set push\n\t"
".set noreorder\n\t"
".set oddspreg\n\t"
+ ".set hardfloat\n\t"
"lui $t0, 0x3FF0\n\t"
"ldc1 $f0, %0\n\t"
"mtc1 $t0, $f1\n\t"
lang/node/patches/v14.x/003-path.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1202,7 +1202,8 @@
Module._initPaths = function() {
path.resolve(process.execPath, '..') :
path.resolve(process.execPath, '..', '..');
- let paths = [path.resolve(prefixDir, 'lib', 'node')];
+ let paths = [path.resolve(prefixDir, 'lib', 'node'),
+ path.resolve(prefixDir, 'lib', 'node_modules')];
if (homeDir) {
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));
lang/node/patches/004-musl_support.patch
→
lang/node/patches/
v14.x/
004-musl_support.patch
浏览文件 @
82fdfd65
文件已移动
lang/node/patches/007-fix_host_build_on_macos.patch
→
lang/node/patches/
v14.x/
007-fix_host_build_on_macos.patch
浏览文件 @
82fdfd65
文件已移动
lang/node/patches/v14.x/010-execvp-arg-list-too-long.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
@@ -151,6 +151,30 @@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOL
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
@@ -195,6 +219,30 @@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET))
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
@@ -1612,11 +1660,17 @@
$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
"Spaces in alink input filenames not supported (%s)" % link_dep)
if (self.flavor not in ('mac', 'openbsd', 'netbsd', 'win') and not
self.is_standalone_static_library):
- self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
- part_of_all, postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_thin_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink_thin',
+ part_of_all, postbuilds=postbuilds)
else:
- self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
- postbuilds=postbuilds)
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule([self.output_binary], link_deps, actions = ['$(call create_archive,$@,$^)'])
+ else:
+ self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all,
+ postbuilds=postbuilds)
elif self.type == 'shared_library':
self.WriteLn('%s: LD_INPUTS := %s' % (
QuoteSpaces(self.output_binary),
--- a/tools/gyp/pylib/gyp/generator/make.py
+++ b/tools/gyp/pylib/gyp/generator/make.py
@@ -155,6 +155,30 @@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOL
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
@@ -199,6 +223,30 @@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET))
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+define xargs
+$(1) $(wordlist 1,1000,$(2))
+$(if $(word 1001,$(2)),$(call xargs,$(1),$(wordlist 1001,$(words $(2)),$(2))))
+endef
+
+define write-to-file
+@: >$(1)
+$(call xargs,@printf "%s\\n" >>$(1),$(2))
+endef
+
+OBJ_FILE_LIST := ar-file-list
+
+define create_archive
+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
+define create_thin_archive
+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)`
+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2)))
+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST)
+endef
+
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
@@ -1766,21 +1814,35 @@
$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
self.flavor not in ("mac", "openbsd", "netbsd", "win")
and not self.is_standalone_static_library
):
- self.WriteDoCmd(
- [self.output_binary],
- link_deps,
- "alink_thin",
- part_of_all,
- postbuilds=postbuilds,
- )
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule(
+ [self.output_binary],
+ link_deps,
+ actions = ['$(call create_thin_archive,$@,$^)']
+ )
+ else:
+ self.WriteDoCmd(
+ [self.output_binary],
+ link_deps,
+ 'alink_thin',
+ part_of_all,
+ postbuilds=postbuilds
+ )
else:
- self.WriteDoCmd(
- [self.output_binary],
- link_deps,
- "alink",
- part_of_all,
- postbuilds=postbuilds,
- )
+ if self.flavor in ('linux', 'android'):
+ self.WriteMakeRule(
+ [self.output_binary],
+ link_deps,
+ actions = ['$(call create_archive,$@,$^)']
+ )
+ else:
+ self.WriteDoCmd(
+ [self.output_binary],
+ link_deps,
+ 'alink',
+ part_of_all,
+ postbuilds=postbuilds
+ )
elif self.type == "shared_library":
self.WriteLn(
"%s: LD_INPUTS := %s"
lang/node/patches/v14.x/012-changing-default-npm-settings.patch
0 → 100644
浏览文件 @
82fdfd65
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -175,7 +175,7 @@
Object.defineProperty(exports, 'defaults
'legacy-bundling': false,
link: false,
'local-address': undefined,
- loglevel: 'notice',
+ loglevel: 'info',
logstream: process.stderr,
'logs-max': 10,
long: false,
@@ -231,7 +231,7 @@
Object.defineProperty(exports, 'defaults
'sign-git-tag': false,
'sso-poll-frequency': 500,
'sso-type': 'oauth',
- 'strict-ssl': true,
+ 'strict-ssl': false,
tag: 'latest',
'tag-version-prefix': 'v',
timing: false,
lang/node/patches/v14.x/013-npm-unsafe-override-for-global-install.patch
0 → 100644
浏览文件 @
82fdfd65
From cdb02b95ed9b12f82620ae1652cba20464c2ccf0 Mon Sep 17 00:00:00 2001
From: Arturo Rinaldi <arty.net2@gmail.com>
Date: Wed, 1 Nov 2017 14:51:43 +0100
Subject: [PATCH] npm: overriding unsafe-perm setting to install packages
globally
---
deps/npm/lib/config/defaults.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -243,7 +243,7 @@
Object.defineProperty(exports, 'defaults
process.getgid && process.setgid) ||
process.getuid() !== 0,
'update-notifier': true,
- usage: false,
+ usage: true,
user: (process.platform === 'win32' || os.type() === 'OS400') ? 0 : 'nobody',
userconfig: path.resolve(home, '.npmrc'),
umask: process.umask ? process.umask() : umask.fromString('022'),
lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch
→
lang/node/patches/
v14.x/
999-delete_unnecessary_libraries_for_host_execute.patch
浏览文件 @
82fdfd65
文件已移动
lang/node/patches/999-fix_icu_conflict.patch
→
lang/node/patches/
v14.x/
999-fix_icu_conflict.patch
浏览文件 @
82fdfd65
文件已移动
lang/node/patches/v14.x/999-localhost-no-addrconfig.patch
0 → 100644
浏览文件 @
82fdfd65
Description: do not use dns.ADDRCONFIG for localhost
it fails on IPv6-only systems. Setting it with libc fails on linux.
https://github.com/nodejs/node/issues/33279
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2020-06-11
Bug-Debian: https://bugs.debian.org/962318
Forwarded: https://github.com/nodejs/node/issues/33816
--- a/lib/net.js
+++ b/lib/net.js
@@ -1,4 +1,5 @@
// Copyright Joyent, Inc. and other Node contributors.
+
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
@@ -1028,13 +1029,6 @@
function lookupAndConnect(self, options)
hints: options.hints || 0
};
- if (!isWindows &&
- dnsopts.family !== 4 &&
- dnsopts.family !== 6 &&
- dnsopts.hints === 0) {
- dnsopts.hints = dns.ADDRCONFIG;
- }
-
debug('connect: find host', host);
debug('connect: dns options', dnsopts);
self._host = host;
lang/node/test.sh
0 → 100755
浏览文件 @
82fdfd65
#!/bin/sh
node
-pe
'process.version'
|
grep
"
$2
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录