-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* node.js: add node.js v16 - add node.js v16 as dedicated package - remove former nodejs (v10) package * add patch to fix arm64 build
- Loading branch information
Showing
12 changed files
with
98 additions
and
84 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
PKG_NAME = node | ||
PKG_VERS = 16.13.1 | ||
PKG_EXT = tar.xz | ||
PKG_DIST_NAME = $(PKG_NAME)-v$(PKG_VERS).$(PKG_EXT) | ||
PKG_DIST_SITE = https://nodejs.org/dist/v$(PKG_VERS) | ||
PKG_DIR = $(PKG_NAME)-v$(PKG_VERS) | ||
|
||
# C++ compiler (CXX=/spksrc/toolchain/syno-x64-7.0/work/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-g++, 7.3.0) too old, need g++ 8.3.0 or clang++ 8.0.0 | ||
# DSM 7 toolchains have g++ 7.3.0 only, but succeed to compile nodejs v16. | ||
# newest DSM 6 toolchains have g++ <= 4.9.3. | ||
REQUIRED_DSM = 7.0 | ||
# comcerto2k is supported by DSM 7, but toolchain has g++ 4.9.3 that is too old. | ||
UNSUPPORTED_ARCHS = comcerto2k | ||
|
||
HOMEPAGE = https://www.nodejs.org | ||
COMMENT = A JavaScript runtime built on Chrome\'s V8 JavaScript engine. | ||
LICENSE = https://github.com/nodejs/node/raw/master/LICENSE | ||
|
||
CONFIGURE_ARGS = --cross-compiling --dest-os=linux --prefix=$(INSTALL_PREFIX) | ||
|
||
# fix compilation with newer compilers | ||
ADDITIONAL_CPPFLAGS = -D_GLIBCXX_USE_C99_MATH -D_GLIBCXX_HAVE_OBSOLETE_ISNAN -D_GLIBCXX_HAVE_OBSOLETE_ISINF | ||
|
||
include ../../mk/spksrc.cross-cc.mk | ||
|
||
ifeq ($(findstring $(ARCH),$(64bit_ARCHS)),$(ARCH)) | ||
ENV += CC_host="gcc -m64" | ||
ENV += CXX_host="g++ -m64" | ||
else | ||
ENV += CC_host="gcc -m32" | ||
ENV += CXX_host="g++ -m32" | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --dest-cpu=arm | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --dest-cpu=arm64 | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --dest-cpu=x86 | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --dest-cpu=x86_64 | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
bin:bin/node | ||
rsc:bin/npm | ||
rsc:bin/npx | ||
rsc:lib/node_modules/npm/.npmrc | ||
rsc:lib/node_modules/npm/LICENSE | ||
rsc:lib/node_modules/npm/README.md | ||
rsc:lib/node_modules/npm/bin/ | ||
rsc:lib/node_modules/npm/lib/ | ||
rsc:lib/node_modules/npm/node_modules/ | ||
rsc:lib/node_modules/npm/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node-v16.13.1.tar.xz SHA1 a5f5c8ea1ef091923e07ea69f4a096ad32602c71 | ||
node-v16.13.1.tar.xz SHA256 4c23004fd75eaf799ad8e76fe34f53e0327f433d4acbfc883396f72e96cc63ad | ||
node-v16.13.1.tar.xz MD5 80667c769fd7d12da24d203585cead11 |
17 changes: 17 additions & 0 deletions
17
cross/nodejs_v16/patches/001.disable.v8-trap-handler.for.arm64.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# https://github.com/nodejs/node/issues/36287#issuecomment-939324717 | ||
# disable V8_TRAP_HANDLER for ARM64 | ||
--- deps/v8/src/trap-handler/trap-handler.h.orig 2022-01-01 21:51:12.918863800 +0000 | ||
+++ deps/v8/src/trap-handler/trap-handler.h 2022-01-02 17:22:11.340303717 +0000 | ||
@@ -25,10 +25,9 @@ | ||
// Arm64 (non-simulator) on Mac. | ||
#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && V8_OS_MACOSX | ||
#define V8_TRAP_HANDLER_SUPPORTED true | ||
-// Arm64 simulator on x64 on Linux or Mac. | ||
+// Arm64 simulator on x64 on Linux or Mac. -> patched to disable supported | ||
#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && (V8_OS_LINUX || V8_OS_MACOSX) | ||
-#define V8_TRAP_HANDLER_VIA_SIMULATOR | ||
-#define V8_TRAP_HANDLER_SUPPORTED true | ||
+#define V8_TRAP_HANDLER_SUPPORTED false | ||
// Everything else is unsupported. | ||
#else | ||
#define V8_TRAP_HANDLER_SUPPORTED false |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
SPK_NAME = nodejs_v16 | ||
SPK_VERS = 16.13.1 | ||
SPK_REV = 1 | ||
SPK_ICON = src/node.png | ||
|
||
DEPENDS = cross/$(SPK_NAME) | ||
|
||
MAINTAINER = SynoCommunity | ||
DESCRIPTION = Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. | ||
CHANGELOG = "Initial v16 package release." | ||
DISPLAY_NAME = Node.js® v16 | ||
|
||
HOMEPAGE = https://nodejs.org | ||
LICENSE = https://github.com/nodejs/node/raw/master/LICENSE | ||
|
||
STARTABLE = no | ||
|
||
SPK_COMMANDS = bin/node bin/npm bin/npx | ||
|
||
include ../../mk/spksrc.spk.mk |
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.