Browse Source

Merge pull request #8683 from nxhack/support_ppc32

node: support ppc32 musl
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
5a9d99efec
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions
  1. +1
    -1
      lang/node/Makefile
  2. +16
    -0
      lang/node/patches/005-powerpc32_musl_support.patch

+ 1
- 1
lang/node/Makefile View File

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


+ 16
- 0
lang/node/patches/005-powerpc32_musl_support.patch View File

@ -0,0 +1,16 @@
--- 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]);

Loading…
Cancel
Save