From 4280fd21f554b07e712880772216a2c68c44ced2 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 10 Aug 2019 02:27:30 +0200 Subject: [PATCH] nodejs-lts: disable openssl asm on ppc64 BE, add ppc32 musl patch [ci skip] --- srcpkgs/nodejs-lts/patches/ppc32.patch | 18 ++++++++++++++++++ srcpkgs/nodejs-lts/template | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 srcpkgs/nodejs-lts/patches/ppc32.patch diff --git a/srcpkgs/nodejs-lts/patches/ppc32.patch b/srcpkgs/nodejs-lts/patches/ppc32.patch new file mode 100644 index 0000000000..fe28ab7511 --- /dev/null +++ b/srcpkgs/nodejs-lts/patches/ppc32.patch @@ -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(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(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]); ++ #else ++ 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]); ++ #endif + #endif + #elif V8_HOST_ARCH_S390 + #if V8_TARGET_ARCH_32_BIT diff --git a/srcpkgs/nodejs-lts/template b/srcpkgs/nodejs-lts/template index 838ba60d85..1f4d6c6227 100644 --- a/srcpkgs/nodejs-lts/template +++ b/srcpkgs/nodejs-lts/template @@ -53,6 +53,10 @@ do_configure() { *) msg_error "$pkgver: cannot be cross compiled for ${XBPS_TARGET_MACHINE}.\n" ;; esac 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 \ $(vopt_if icu --with-intl=system-icu) \ $(vopt_if http_parser --shared-http-parser) \