1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00
openwrt-packages/lang/node/patches/005-powerpc32_musl_support.patch
Hirokazu MORIKAWA af0a02b8df node: support ppc32 musl
support powerpc32 musl
https://downloads.openwrt.org/snapshots/faillogs/powerpc_464fp/packages/node/compile.txt

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2019-04-15 09:52:05 +09:00

17 lines
825 B
Diff

--- a/deps/v8/src/libsampler/sampler.cc
+++ b/deps/v8/src/libsampler/sampler.cc
@@ -456,8 +456,12 @@
reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R1]);
state->fp =
reinterpret_cast<void*>(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<void*>(ucontext->uc_mcontext.gregs[32]);
+ state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[1]);
+ state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[31]);
+#else
state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[32]);
state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[1]);
state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[31]);