summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch28
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-allow-passing-multiple-libs-to-pkg_config.patch41
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch71
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-build-allow-use-of-system-installed-brotli.patch66
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch95
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch102
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch18
-rw-r--r--external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch19
8 files changed, 424 insertions, 16 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
index 324a4683..4dd121f4 100644
--- a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
@@ -4,26 +4,22 @@ Date: Thu, 27 Apr 2017 14:25:42 +0200
Subject: [PATCH] Disable running gyp on shared deps
---
- Makefile | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
-index 0a217bd893..e1229ad07f 100644
+index 0947300f24..6c98691984 100644
--- a/Makefile
+++ b/Makefile
-@@ -79,10 +79,9 @@ $(NODE_G_EXE): config.gypi out/Makefile
- $(MAKE) -C out BUILDTYPE=Debug V=$(V)
- if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
+@@ -141,7 +141,7 @@ test-code-cache: with-code-cache
+ echo "'test-code-cache' target is a noop"
--out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \
-- deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \
-- deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp \
-- config.gypi
-+out/Makefile: common.gypi deps/http_parser/http_parser.gyp \
-+ deps/v8/gypfiles/toolchain.gypi deps/v8/gypfiles/features.gypi \
-+ deps/v8/src/v8.gyp node.gyp config.gypi
+ out/Makefile: config.gypi common.gypi node.gyp \
+- deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp \
++ deps/http_parser/http_parser.gyp \
+ tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
+ tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
$(PYTHON) tools/gyp_node.py -f make
-
- config.gypi: configure
--
-2.12.2
+2.20.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-allow-passing-multiple-libs-to-pkg_config.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-allow-passing-multiple-libs-to-pkg_config.patch
new file mode 100644
index 00000000..13edf229
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-allow-passing-multiple-libs-to-pkg_config.patch
@@ -0,0 +1,41 @@
+From fdaa0e3bef93c5c72a7258b5f1e30718e7d81f9b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
+Date: Mon, 2 Mar 2020 12:17:09 +0000
+Subject: [PATCH 1/2] build: allow passing multiple libs to pkg_config
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Sometimes it's necessary to pass multiple library names to pkg-config,
+e.g. the brotli shared libraries can be pulled in with
+ pkg-config libbrotlienc libbrotlidec
+
+Update the code to handle both, strings (as used so far), and lists
+of strings.
+
+Signed-off-by: André Draszik <git@andred.net>
+---
+Upstream-Status: Submitted [https://github.com/nodejs/node/pull/32046]
+ configure.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.py b/configure.py
+index beb08df088..e3f78f2fed 100755
+--- a/configure.py
++++ b/configure.py
+@@ -680,7 +680,11 @@ def pkg_config(pkg):
+ retval = ()
+ for flag in ['--libs-only-l', '--cflags-only-I',
+ '--libs-only-L', '--modversion']:
+- args += [flag, pkg]
++ args += [flag]
++ if isinstance(pkg, list):
++ args += pkg
++ else:
++ args += [pkg]
+ try:
+ proc = subprocess.Popen(shlex.split(pkg_config) + args,
+ stdout=subprocess.PIPE)
+--
+2.25.0
+
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch
new file mode 100644
index 00000000..b5142dc9
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-Using-native-binaries.patch
@@ -0,0 +1,71 @@
+From 6c3ac20477a4bac643088f24df3c042e627fafa9 Mon Sep 17 00:00:00 2001
+From: Guillaume Burel <guillaume.burel@stormshield.eu>
+Date: Fri, 3 Jan 2020 11:25:54 +0100
+Subject: [PATCH] Using native binaries
+
+---
+ node.gyp | 4 ++--
+ tools/v8_gypfiles/v8.gyp | 11 ++++-------
+ 2 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/node.gyp b/node.gyp
+index 8f4dc518..d9389190 100644
+--- a/node.gyp
++++ b/node.gyp
+@@ -446,7 +446,7 @@
+ '<(SHARED_INTERMEDIATE_DIR)/node_code_cache.cc',
+ ],
+ 'action': [
+- '<@(_inputs)',
++ 'mkcodecache',
+ '<@(_outputs)',
+ ],
+ },
+@@ -471,7 +471,7 @@
+ '<(SHARED_INTERMEDIATE_DIR)/node_snapshot.cc',
+ ],
+ 'action': [
+- '<@(_inputs)',
++ 'node_mksnapshot',
+ '<@(_outputs)',
+ ],
+ },
+diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
+index a506a67d..c91f7dde 100644
+--- a/tools/v8_gypfiles/v8.gyp
++++ b/tools/v8_gypfiles/v8.gyp
+@@ -140,7 +140,8 @@
+ '<@(torque_outputs)',
+ ],
+ 'action': [
+- '<@(_inputs)',
++ 'torque',
++ '<@(torque_files)',
+ '-o', '<(torque_output_root)/torque-generated',
+ '-v8-root', '<(V8_ROOT)'
+ ],
+@@ -247,9 +248,7 @@
+ '<(generate_bytecode_builtins_list_output)',
+ ],
+ 'action': [
+- 'python',
+- '<(V8_ROOT)/tools/run.py',
+- '<@(_inputs)',
++ 'bytecode_builtins_list_generator',
+ '<@(_outputs)',
+ ],
+ },
+@@ -1396,9 +1395,7 @@
+ '<(SHARED_INTERMEDIATE_DIR)/src/regexp/special-case.cc',
+ ],
+ 'action': [
+- 'python',
+- '<(V8_ROOT)/tools/run.py',
+- '<@(_inputs)',
++ 'gen-regexp-special-case',
+ '<@(_outputs)',
+ ],
+ },
+--
+2.20.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-build-allow-use-of-system-installed-brotli.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-build-allow-use-of-system-installed-brotli.patch
new file mode 100644
index 00000000..fc038f3a
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0002-build-allow-use-of-system-installed-brotli.patch
@@ -0,0 +1,66 @@
+From f0f927feee8cb1fb173835d5c3f6beb6bf7d5e54 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
+Date: Mon, 2 Mar 2020 12:17:35 +0000
+Subject: [PATCH 2/2] build: allow use of system-installed brotli
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+brotli is available as a shared library since 2016, so it makes sense
+to allow its use as a system-installed version.
+
+Some of the infrastructure was in place already (node.gyp and
+node.gypi), but some bits in the configure script here were missing.
+
+Add them, keeping the default as before, to use the bundled version.
+
+Refs: https://github.com/google/brotli/pull/421
+Signed-off-by: André Draszik <git@andred.net>
+---
+Upstream-Status: Submitted [https://github.com/nodejs/node/pull/32046]
+ configure.py | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/configure.py b/configure.py
+index e3f78f2fed..0190e31b41 100755
+--- a/configure.py
++++ b/configure.py
+@@ -301,6 +301,27 @@ shared_optgroup.add_option('--shared-zlib-libpath',
+ dest='shared_zlib_libpath',
+ help='a directory to search for the shared zlib DLL')
+
++shared_optgroup.add_option('--shared-brotli',
++ action='store_true',
++ dest='shared_brotli',
++ help='link to a shared brotli DLL instead of static linking')
++
++shared_optgroup.add_option('--shared-brotli-includes',
++ action='store',
++ dest='shared_brotli_includes',
++ help='directory containing brotli header files')
++
++shared_optgroup.add_option('--shared-brotli-libname',
++ action='store',
++ dest='shared_brotli_libname',
++ default='brotlidec,brotlienc',
++ help='alternative lib name to link to [default: %default]')
++
++shared_optgroup.add_option('--shared-brotli-libpath',
++ action='store',
++ dest='shared_brotli_libpath',
++ help='a directory to search for the shared brotli DLL')
++
+ shared_optgroup.add_option('--shared-cares',
+ action='store_true',
+ dest='shared_cares',
+@@ -1692,6 +1713,7 @@ configure_napi(output)
+ configure_library('zlib', output)
+ configure_library('http_parser', output)
+ configure_library('libuv', output)
++configure_library('brotli', output, pkgname=['libbrotlidec', 'libbrotlienc'])
+ configure_library('cares', output, pkgname='libcares')
+ configure_library('nghttp2', output, pkgname='libnghttp2')
+ configure_v8(output)
+--
+2.25.0
+
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch
new file mode 100644
index 00000000..599f742b
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch
@@ -0,0 +1,95 @@
+From 5bfeffdf4b5de1c60a2ff0d1ddf65db2bb9a1533 Mon Sep 17 00:00:00 2001
+From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+Date: Tue, 19 Mar 2019 23:22:40 -0400
+Subject: [PATCH 3/3] Install both binaries and use libdir.
+
+This allows us to build with a shared library for other users while
+still providing the normal executable.
+
+Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
+
+Stolen from [1]
+
+[1] https://src.fedoraproject.org/rpms/nodejs/raw/master/f/0003-Install-both-binaries-and-use-libdir.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ configure.py | 7 +++++++
+ tools/install.py | 31 ++++++++++++++-----------------
+ 2 files changed, 21 insertions(+), 17 deletions(-)
+
+diff --git a/configure.py b/configure.py
+index 20cce214db..e2d78a2a51 100755
+--- a/configure.py
++++ b/configure.py
+@@ -559,6 +559,12 @@ parser.add_option('--shared',
+ help='compile shared library for embedding node in another project. ' +
+ '(This mode is not officially supported for regular applications)')
+
++parser.add_option('--libdir',
++ action='store',
++ dest='libdir',
++ default='lib',
++ help='a directory to install the shared library into')
++
+ parser.add_option('--without-v8-platform',
+ action='store_true',
+ dest='without_v8_platform',
+@@ -1103,6 +1109,7 @@ def configure_node(o):
+ if o['variables']['want_separate_host_toolset'] == 0:
+ o['variables']['node_code_cache'] = 'yes' # For testing
+ o['variables']['node_shared'] = b(options.shared)
++ o['variables']['libdir'] = options.libdir
+ node_module_version = getmoduleversion.get_version()
+
+ if sys.platform == 'darwin':
+diff --git a/tools/install.py b/tools/install.py
+index 655802980a..fe4723bf15 100755
+--- a/tools/install.py
++++ b/tools/install.py
+@@ -121,26 +121,23 @@ def subdir_files(path, dest, action):
+
+ def files(action):
+ is_windows = sys.platform == 'win32'
+- output_file = 'node'
+ output_prefix = 'out/Release/'
++ output_libprefix = output_prefix
+
+- if 'false' == variables.get('node_shared'):
+- if is_windows:
+- output_file += '.exe'
++ if is_windows:
++ output_bin = 'node.exe'
++ output_lib = 'node.dll'
+ else:
+- if is_windows:
+- output_file += '.dll'
+- else:
+- output_file = 'lib' + output_file + '.' + variables.get('shlib_suffix')
+- # GYP will output to lib.target except on OS X, this is hardcoded
+- # in its source - see the _InstallableTargetInstallPath function.
+- if sys.platform != 'darwin':
+- output_prefix += 'lib.target/'
+-
+- if 'false' == variables.get('node_shared'):
+- action([output_prefix + output_file], 'bin/' + output_file)
+- else:
+- action([output_prefix + output_file], 'lib/' + output_file)
++ output_bin = 'node'
++ output_lib = 'libnode.' + variables.get('shlib_suffix')
++ # GYP will output to lib.target except on OS X, this is hardcoded
++ # in its source - see the _InstallableTargetInstallPath function.
++ if sys.platform != 'darwin':
++ output_libprefix += 'lib.target/'
++
++ action([output_prefix + output_bin], 'bin/' + output_bin)
++ if 'true' == variables.get('node_shared'):
++ action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib)
+
+ if 'true' == variables.get('node_use_dtrace'):
+ action(['out/Release/node.d'], 'lib/dtrace/node.d')
+--
+2.20.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch
new file mode 100644
index 00000000..97ed972c
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch
@@ -0,0 +1,102 @@
+From 47ee5cc5501289205d3e8e9f27ea9daf18cebac1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
+Date: Sat, 9 Nov 2019 14:45:30 +0000
+Subject: [PATCH] v8: don't override ARM CFLAGS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This overrides yocto-provided build flags with its own, e.g we get
+ arm-poky-linux-musleabi-g++ -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \
+ ... \
+ -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm
+
+Causing the latter to override the former, and compiler warnings:
+ cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch
+
+Patch this out, so that yocto-provided flags take precedence.
+Note that in reality the same should probably be done for all the other
+supported architectures, too.
+
+Note that this also switches to Thumb(2) mode (in my case). No obvious
+problems have been noted during compilation or runtime.
+
+Upstream-Status: Inappropriate [oe-specific]
+Signed-off-by: André Draszik <git@andred.net>
+---
+ tools/v8_gypfiles/toolchain.gypi | 52 ++------------------------------
+ 1 file changed, 2 insertions(+), 50 deletions(-)
+
+diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi
+index 264b3e478e..0b41848145 100644
+--- a/tools/v8_gypfiles/toolchain.gypi
++++ b/tools/v8_gypfiles/toolchain.gypi
+@@ -211,31 +211,7 @@
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'conditions': [
+- ['v8_target_arch==host_arch', {
+- # Host built with an Arm CXX compiler.
+- 'conditions': [
+- [ 'arm_version==7', {
+- 'cflags': ['-march=armv7-a',],
+- }],
+- [ 'arm_version==7 or arm_version=="default"', {
+- 'conditions': [
+- [ 'arm_fpu!="default"', {
+- 'cflags': ['-mfpu=<(arm_fpu)',],
+- }],
+- ],
+- }],
+- [ 'arm_float_abi!="default"', {
+- 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
+- }],
+- [ 'arm_thumb==1', {
+- 'cflags': ['-mthumb',],
+- }],
+- [ 'arm_thumb==0', {
+- 'cflags': ['-marm',],
+- }],
+- ],
+- }, {
+- # 'v8_target_arch!=host_arch'
++ ['v8_target_arch!=host_arch', {
+ # Host not built with an Arm CXX compiler (simulator build).
+ 'conditions': [
+ [ 'arm_float_abi=="hard"', {
+@@ -254,31 +230,7 @@
+ }], # _toolset=="host"
+ ['_toolset=="target"', {
+ 'conditions': [
+- ['v8_target_arch==target_arch', {
+- # Target built with an Arm CXX compiler.
+- 'conditions': [
+- [ 'arm_version==7', {
+- 'cflags': ['-march=armv7-a',],
+- }],
+- [ 'arm_version==7 or arm_version=="default"', {
+- 'conditions': [
+- [ 'arm_fpu!="default"', {
+- 'cflags': ['-mfpu=<(arm_fpu)',],
+- }],
+- ],
+- }],
+- [ 'arm_float_abi!="default"', {
+- 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
+- }],
+- [ 'arm_thumb==1', {
+- 'cflags': ['-mthumb',],
+- }],
+- [ 'arm_thumb==0', {
+- 'cflags': ['-marm',],
+- }],
+- ],
+- }, {
+- # 'v8_target_arch!=target_arch'
++ ['v8_target_arch!=target_arch', {
+ # Target not built with an Arm CXX compiler (simulator build).
+ 'conditions': [
+ [ 'arm_float_abi=="hard"', {
+--
+2.20.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch
new file mode 100644
index 00000000..52938184
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/big-endian.patch
@@ -0,0 +1,18 @@
+
+https://github.com/v8/v8/commit/878ccb33bd3cf0e6dc018ff8d15843f585ac07be
+
+did some automated cleanups but it missed big-endian code.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- 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
diff --git a/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch
new file mode 100644
index 00000000..1a773f23
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch
@@ -0,0 +1,19 @@
+Add explicit static cast to fix narrowing warning
+
+Fixes
+deps/v8/src/codegen/mips/assembler-mips.cc:3556:44: error: non-constant-expression cannot be narrowed from type 'int' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/deps/v8/src/codegen/mips/assembler-mips.cc
++++ b/deps/v8/src/codegen/mips/assembler-mips.cc
+@@ -3553,7 +3553,7 @@ void Assembler::GrowBuffer() {
+ reloc_info_writer.last_pc() + pc_delta);
+
+ // Relocate runtime entries.
+- Vector<byte> instructions{buffer_start_, pc_offset()};
++ Vector<byte> instructions{buffer_start_, static_cast<size_t>(pc_offset())};
+ Vector<const byte> reloc_info{reloc_info_writer.pos(), reloc_size};
+ for (RelocIterator it(instructions, reloc_info, 0); !it.done(); it.next()) {
+ RelocInfo::Mode rmode = it.rinfo()->rmode();