From af0a02b8dfab92b716f786450ad10d1c5cbf260a Mon Sep 17 00:00:00 2001 From: Hirokazu MORIKAWA Date: Mon, 15 Apr 2019 09:52:05 +0900 Subject: [PATCH] node: support ppc32 musl support powerpc32 musl https://downloads.openwrt.org/snapshots/faillogs/powerpc_464fp/packages/node/compile.txt Signed-off-by: Hirokazu MORIKAWA --- lang/node/Makefile | 2 +- .../patches/005-powerpc32_musl_support.patch | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lang/node/patches/005-powerpc32_musl_support.patch diff --git a/lang/node/Makefile b/lang/node/Makefile index 293da6aa3..849e17d91 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=node PKG_VERSION:=v8.15.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=node-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://nodejs.org/dist/${PKG_VERSION} PKG_HASH:=6b6486a3f452624941f6e11dd5f878c298d43e9c21b5f43ca1721dc7ce25add1 diff --git a/lang/node/patches/005-powerpc32_musl_support.patch b/lang/node/patches/005-powerpc32_musl_support.patch new file mode 100644 index 000000000..ba8be051c --- /dev/null +++ b/lang/node/patches/005-powerpc32_musl_support.patch @@ -0,0 +1,16 @@ +--- a/deps/v8/src/libsampler/sampler.cc ++++ b/deps/v8/src/libsampler/sampler.cc +@@ -456,8 +456,12 @@ + reinterpret_cast(ucontext->uc_mcontext.regs->gpr[PT_R1]); + state->fp = + reinterpret_cast(ucontext->uc_mcontext.regs->gpr[PT_R31]); +-#else ++#elif V8_TARGET_ARCH_32_BIT + // Some C libraries, notably Musl, define the regs member as a void pointer ++ state->pc = reinterpret_cast(ucontext->uc_mcontext.gregs[32]); ++ state->sp = reinterpret_cast(ucontext->uc_mcontext.gregs[1]); ++ state->fp = reinterpret_cast(ucontext->uc_mcontext.gregs[31]); ++#else + state->pc = reinterpret_cast(ucontext->uc_mcontext.gp_regs[32]); + state->sp = reinterpret_cast(ucontext->uc_mcontext.gp_regs[1]); + state->fp = reinterpret_cast(ucontext->uc_mcontext.gp_regs[31]);