Add buildroot 2018-02
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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(-)
|
||||
|
||||
diff --git a/deps/v8/src/base/debug/stack_trace_posix.cc b/deps/v8/src/base/debug/stack_trace_posix.cc
|
||||
index 87c0a73..d2c182a 100644
|
||||
--- 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
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
81
buildroot/package/nodejs/Config.in
Normal file
81
buildroot/package/nodejs/Config.in
Normal file
@@ -0,0 +1,81 @@
|
||||
config BR2_PACKAGE_NODEJS_ARCH_SUPPORTS
|
||||
bool
|
||||
# On ARM, at least ARMv6+ with VFPv2+ is needed
|
||||
default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
|
||||
default y if BR2_mipsel && !BR2_MIPS_SOFT_FLOAT
|
||||
default y if BR2_aarch64 || BR2_i386 || BR2_x86_64
|
||||
# libuv
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
|
||||
comment "nodejs needs a toolchain w/ C++, dynamic library, NPTL, gcc >= 4.8, wchar"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
|
||||
!BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_NODEJS
|
||||
bool "nodejs"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_PACKAGE_NODEJS_ARCH_SUPPORTS
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_8
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||
depends on BR2_USE_WCHAR
|
||||
# uses fork()
|
||||
depends on BR2_USE_MMU
|
||||
# uses dlopen(). On ARMv5, we could technically support static
|
||||
# linking, but that's too much of a corner case to support it.
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_PACKAGE_C_ARES
|
||||
select BR2_PACKAGE_LIBHTTPPARSER
|
||||
select BR2_PACKAGE_LIBUV
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
Event-driven I/O server-side JavaScript environment based on
|
||||
V8.
|
||||
|
||||
http://nodejs.org/
|
||||
|
||||
if BR2_PACKAGE_NODEJS
|
||||
|
||||
config BR2_PACKAGE_NODEJS_NPM
|
||||
bool "NPM for the target"
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
NPM is the package manager for the Node JavaScript platform.
|
||||
Note that enabling NPM on the target also selects OpenSSL
|
||||
for the target.
|
||||
|
||||
http://www.npmjs.org
|
||||
|
||||
Note that NPM is always built for the buildroot host.
|
||||
|
||||
config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL
|
||||
string "Additional modules"
|
||||
help
|
||||
List of space-separated nodejs modules to install via npm.
|
||||
See https://npmjs.org/ to find modules and 'npm help install'
|
||||
for available installation methods. For repeatable builds,
|
||||
download and save tgz files or clone git repos for the
|
||||
components you care about.
|
||||
|
||||
Example:
|
||||
serialport uglify-js@1.3.4 /my/module/mymodule.tgz \
|
||||
git://github.com/someuser/somemodule.git#v1.2
|
||||
|
||||
This would install the serialport module (at the newest
|
||||
version), the uglify-js module at 1.3.4, a module from a
|
||||
filesystem path, and a module from a git repository.
|
||||
|
||||
config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS
|
||||
string "Additional module dependencies"
|
||||
help
|
||||
List of space-separated buildroot recipes which must be
|
||||
built before your npms can be installed. For example, if in
|
||||
'Additional modules' you specified 'node-curl' (see:
|
||||
https://github.com/jiangmiao/node-curl), you could then
|
||||
specify 'libcurl' here, to ensure that buildroot builds the
|
||||
libcurl package, and does so before building your node
|
||||
modules.
|
||||
|
||||
endif
|
||||
2
buildroot/package/nodejs/nodejs.hash
Normal file
2
buildroot/package/nodejs/nodejs.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# From http://nodejs.org/dist/v8.9.4/SHASUMS256.txt
|
||||
sha256 6cdcde9c9c1ca9f450a0b24eafa229ca759e576daa0fae892ce74d541ecdc86f node-v8.9.4.tar.xz
|
||||
184
buildroot/package/nodejs/nodejs.mk
Normal file
184
buildroot/package/nodejs/nodejs.mk
Normal file
@@ -0,0 +1,184 @@
|
||||
################################################################################
|
||||
#
|
||||
# nodejs
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NODEJS_VERSION = 8.9.4
|
||||
NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
|
||||
NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
|
||||
NODEJS_DEPENDENCIES = host-python host-nodejs c-ares \
|
||||
libhttpparser libuv zlib \
|
||||
$(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
|
||||
HOST_NODEJS_DEPENDENCIES = host-python host-zlib
|
||||
NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components)
|
||||
NODEJS_LICENSE_FILES = LICENSE
|
||||
|
||||
NODEJS_CONF_OPTS = \
|
||||
--without-snapshot \
|
||||
--shared-zlib \
|
||||
--shared-cares \
|
||||
--shared-http-parser \
|
||||
--shared-libuv \
|
||||
--without-dtrace \
|
||||
--without-etw \
|
||||
--dest-os=linux
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
NODEJS_DEPENDENCIES += openssl
|
||||
NODEJS_CONF_OPTS += --shared-openssl
|
||||
else
|
||||
NODEJS_CONF_OPTS += --without-ssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ICU),y)
|
||||
NODEJS_DEPENDENCIES += icu
|
||||
NODEJS_CONF_OPTS += --with-intl=system-icu
|
||||
else
|
||||
NODEJS_CONF_OPTS += --with-intl=none
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_NODEJS_NPM),y)
|
||||
NODEJS_CONF_OPTS += --without-npm
|
||||
endif
|
||||
|
||||
# nodejs build system is based on python, but only support python-2.6 or
|
||||
# python-2.7. So, we have to enforce PYTHON interpreter to be python2.
|
||||
define HOST_NODEJS_CONFIGURE_CMDS
|
||||
# The build system directly calls python. Work around this by forcing python2
|
||||
# into PATH. See https://github.com/nodejs/node/issues/2735
|
||||
mkdir -p $(@D)/bin
|
||||
ln -sf $(HOST_DIR)/bin/python2 $(@D)/bin/python
|
||||
|
||||
# Build with the static, built-in OpenSSL which is supplied as part of
|
||||
# the nodejs source distribution. This is needed on the host because
|
||||
# NPM is non-functional without it, and host-openssl isn't part of
|
||||
# buildroot.
|
||||
(cd $(@D); \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(HOST_DIR)/bin/python2 ./configure \
|
||||
--prefix=$(HOST_DIR) \
|
||||
--without-snapshot \
|
||||
--without-dtrace \
|
||||
--without-etw \
|
||||
--shared-zlib \
|
||||
--with-intl=none \
|
||||
)
|
||||
endef
|
||||
|
||||
define HOST_NODEJS_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH)
|
||||
endef
|
||||
|
||||
define HOST_NODEJS_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) install \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_i386),y)
|
||||
NODEJS_CPU = ia32
|
||||
else ifeq ($(BR2_x86_64),y)
|
||||
NODEJS_CPU = x64
|
||||
else ifeq ($(BR2_mips),y)
|
||||
NODEJS_CPU = mips
|
||||
else ifeq ($(BR2_mipsel),y)
|
||||
NODEJS_CPU = mipsel
|
||||
else ifeq ($(BR2_arm),y)
|
||||
NODEJS_CPU = arm
|
||||
else ifeq ($(BR2_aarch64),y)
|
||||
NODEJS_CPU = arm64
|
||||
# V8 needs to know what floating point ABI the target is using.
|
||||
NODEJS_ARM_FP = $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
|
||||
endif
|
||||
|
||||
# MIPS architecture specific options
|
||||
ifeq ($(BR2_mips)$(BR2_mipsel),y)
|
||||
ifeq ($(BR2_MIPS_CPU_MIPS32R6),y)
|
||||
NODEJS_MIPS_ARCH_VARIANT = r6
|
||||
NODEJS_MIPS_FPU_MODE = fp64
|
||||
else ifeq ($(BR2_MIPS_CPU_MIPS32R2),y)
|
||||
NODEJS_MIPS_ARCH_VARIANT = r2
|
||||
else ifeq ($(BR2_MIPS_CPU_MIPS32),y)
|
||||
NODEJS_MIPS_ARCH_VARIANT = r1
|
||||
endif
|
||||
endif
|
||||
|
||||
define NODEJS_CONFIGURE_CMDS
|
||||
mkdir -p $(@D)/bin
|
||||
ln -sf $(HOST_DIR)/bin/python2 $(@D)/bin/python
|
||||
|
||||
(cd $(@D); \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
LD="$(TARGET_CXX)" \
|
||||
PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(HOST_DIR)/bin/python2 ./configure \
|
||||
--prefix=/usr \
|
||||
--dest-cpu=$(NODEJS_CPU) \
|
||||
$(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
|
||||
$(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \
|
||||
$(if $(NODEJS_MIPS_FPU_MODE),--with-mips-fpu-mode=$(NODEJS_MIPS_FPU_MODE)) \
|
||||
$(NODEJS_CONF_OPTS) \
|
||||
)
|
||||
endef
|
||||
|
||||
define NODEJS_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
LD="$(TARGET_CXX)"
|
||||
endef
|
||||
|
||||
#
|
||||
# Build the list of modules to install.
|
||||
#
|
||||
NODEJS_MODULES_LIST= $(call qstrip,\
|
||||
$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL))
|
||||
|
||||
# Define NPM for other packages to use
|
||||
NPM = $(TARGET_CONFIGURE_OPTS) \
|
||||
LD="$(TARGET_CXX)" \
|
||||
npm_config_arch=$(NODEJS_CPU) \
|
||||
npm_config_target_arch=$(NODEJS_CPU) \
|
||||
npm_config_build_from_source=true \
|
||||
npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \
|
||||
npm_config_prefix=$(TARGET_DIR)/usr \
|
||||
$(HOST_DIR)/bin/npm
|
||||
|
||||
#
|
||||
# We can only call NPM if there's something to install.
|
||||
#
|
||||
ifneq ($(NODEJS_MODULES_LIST),)
|
||||
define NODEJS_INSTALL_MODULES
|
||||
# If you're having trouble with module installation, adding -d to the
|
||||
# npm install call below and setting npm_config_rollback=false can both
|
||||
# help in diagnosing the problem.
|
||||
$(NPM) install -g $(NODEJS_MODULES_LIST)
|
||||
endef
|
||||
endif
|
||||
|
||||
define NODEJS_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/bin/python2 \
|
||||
$(MAKE) -C $(@D) install \
|
||||
DESTDIR=$(TARGET_DIR) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
LD="$(TARGET_CXX)"
|
||||
$(NODEJS_INSTALL_MODULES)
|
||||
endef
|
||||
|
||||
# node.js configure is a Python script and does not use autotools
|
||||
$(eval $(generic-package))
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user