All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] nodejs: Fix -Wc++11-narrowing on mips
@ 2020-04-15 18:24 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2020-04-15 18:24 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../nodejs/nodejs/mips-warnings.patch         | 19 +++++++++++++++++++
 .../recipes-devtools/nodejs/nodejs_12.14.1.bb |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch

diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch b/meta-oe/recipes-devtools/nodejs/nodejs/mips-warnings.patch
new file mode 100644
index 0000000000..1a773f23d8
--- /dev/null
+++ b/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();
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb
index 28b4136a5a..d468fb3ffa 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb
@@ -22,6 +22,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://big-endian.patch \
            file://0001-build-allow-passing-multiple-libs-to-pkg_config.patch \
            file://0002-build-allow-use-of-system-installed-brotli.patch \
+           file://mips-warnings.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-binaries.patch \
-- 
2.26.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-15 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 18:24 [meta-oe][PATCH] nodejs: Fix -Wc++11-narrowing on mips Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.