void-packages/srcpkgs/nodejs-lts/patches/ppc32.patch
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
961 B
Diff

--- a/deps/v8/src/libsampler/sampler.cc
+++ b/deps/v8/src/libsampler/sampler.cc
@@ -423,10 +423,17 @@
state->lr = reinterpret_cast<void*>(ucontext->uc_mcontext.regs->link);
#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]);
state->lr = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[36]);
+ #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]);
+ state->lr = reinterpret_cast<void*>(ucontext->uc_mcontext.gregs[36]);
+ #endif
#endif
#elif V8_HOST_ARCH_S390
#if V8_TARGET_ARCH_32_BIT