nodejs: Fix -Wc++11-narrowing on mips

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2020-04-15 11:22:55 -07:00
parent 4f1db78cce
commit db0075f503
2 changed files with 20 additions and 0 deletions

View File

@ -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();

View File

@ -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 \