nodejs: disable openssl asm on ppc64 BE, add ppc32 musl patch

This commit is contained in:
q66 2019-08-10 02:26:59 +02:00 committed by Juan RP
parent ad34a8553c
commit 4d50d3331b
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,18 @@
--- deps/v8/src/libsampler/sampler.cc
+++ deps/v8/src/libsampler/sampler.cc
@@ -418,9 +418,15 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R31]);
#else
// Some C libraries, notably Musl, define the regs member as a void pointer
+ #if !V8_TARGET_ARCH_32_BIT
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]);
+ #else
+ 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]);
+ #endif
#endif
#elif V8_HOST_ARCH_S390
#if V8_TARGET_ARCH_32_BIT

View File

@ -72,6 +72,10 @@ do_configure() {
# to execute it within the build system fails # to execute it within the build system fails
_args+=" --cross-compiling" _args+=" --cross-compiling"
fi fi
# their pregenerated asm is for ELFv1...
case "$XBPS_TARGET_MACHINE" in
ppc64|ppc64-musl) _args+=" --openssl-no-asm" ;;
esac
./configure --prefix=/usr --shared-zlib \ ./configure --prefix=/usr --shared-zlib \
$(vopt_if icu --with-intl=system-icu) \ $(vopt_if icu --with-intl=system-icu) \
$(vopt_if http_parser --shared-http-parser) \ $(vopt_if http_parser --shared-http-parser) \