diff options
author | Alexey Neyman <stilor@att.net> | 2019-02-15 13:39:50 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-02-15 13:39:50 -0800 |
commit | d5c73fd9e688ccb4b060d3295574e9333c4bbff5 (patch) | |
tree | 96796f59797a4374dde43bbf109548c9bef01c81 /packages/strace | |
parent | 2c6b185c418c128aed36b91199c064be28c163d0 (diff) | |
download | crosstool-ng-d5c73fd9e688ccb4b060d3295574e9333c4bbff5.tar.gz crosstool-ng-d5c73fd9e688ccb4b060d3295574e9333c4bbff5.tar.bz2 crosstool-ng-d5c73fd9e688ccb4b060d3295574e9333c4bbff5.zip |
strace 4.26 doesn't build on mips/o32
... so pick up a patch from upstream.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'packages/strace')
-rw-r--r-- | packages/strace/4.26/0000-mips-o32-fix-build.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/packages/strace/4.26/0000-mips-o32-fix-build.patch b/packages/strace/4.26/0000-mips-o32-fix-build.patch new file mode 100644 index 00000000..d3c828ec --- /dev/null +++ b/packages/strace/4.26/0000-mips-o32-fix-build.patch @@ -0,0 +1,91 @@ +commit 2c8b6de913973274e877639658e9e7273a012adb +Author: Dmitry V. Levin <ldv@altlinux.org> +Date: Tue Jan 8 19:23:44 2019 +0000 + + mips o32: fix build + + Commit 917c2ccf3a67 "Refactor stack pointers" moved mips_REG_* macros + from linux/mips/arch_regs.h to linux/mips/arch_regs.c because these + macros are no longer used outside syscall.c or files included by + syscall.c, but this caused a build regression on mips o32 because + decode_syscall_subcall() uses mips_REG_SP prior to its definition. + + * syscall.c (decode_syscall_subcall): Move ... + * linux/mips/get_syscall_args.c: ... here. + * NEWS: Mention this fix. + + Reported-by: Baruch Siach <baruch@tkos.co.il> + Fixes: v4.26~61 "Refactor stack pointers" + +diff --git a/linux/mips/get_syscall_args.c b/linux/mips/get_syscall_args.c +index 387aa852..e2889f98 100644 +--- a/linux/mips/get_syscall_args.c ++++ b/linux/mips/get_syscall_args.c +@@ -37,3 +37,29 @@ arch_get_syscall_args(struct tcb *tcp) + #endif + return 1; + } ++ ++#ifdef SYS_syscall_subcall ++static void ++decode_syscall_subcall(struct tcb *tcp) ++{ ++ if (!scno_is_valid(tcp->u_arg[0])) ++ return; ++ tcp->scno = tcp->u_arg[0]; ++ tcp->qual_flg = qual_flags(tcp->scno); ++ tcp->s_ent = &sysent[tcp->scno]; ++ memmove(&tcp->u_arg[0], &tcp->u_arg[1], ++ sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); ++ /* ++ * Fetching the last arg of 7-arg syscalls (fadvise64_64 ++ * and sync_file_range) requires additional code, ++ * see linux/mips/get_syscall_args.c ++ */ ++ if (tcp->s_ent->nargs == MAX_ARGS) { ++ if (umoven(tcp, ++ mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), ++ sizeof(tcp->u_arg[0]), ++ &tcp->u_arg[MAX_ARGS - 1]) < 0) ++ tcp->u_arg[MAX_ARGS - 1] = 0; ++ } ++} ++#endif /* SYS_syscall_subcall */ +diff --git a/syscall.c b/syscall.c +index d78f51dd..51fcc721 100644 +--- a/syscall.c ++++ b/syscall.c +@@ -349,31 +349,8 @@ decode_ipc_subcall(struct tcb *tcp) + #endif /* SYS_ipc_subcall */ + + #ifdef SYS_syscall_subcall +-static void +-decode_syscall_subcall(struct tcb *tcp) +-{ +- if (!scno_is_valid(tcp->u_arg[0])) +- return; +- tcp->scno = tcp->u_arg[0]; +- tcp->qual_flg = qual_flags(tcp->scno); +- tcp->s_ent = &sysent[tcp->scno]; +- memmove(&tcp->u_arg[0], &tcp->u_arg[1], +- sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0])); +-# ifdef LINUX_MIPSO32 +- /* +- * Fetching the last arg of 7-arg syscalls (fadvise64_64 +- * and sync_file_range) requires additional code, +- * see linux/mips/get_syscall_args.c +- */ +- if (tcp->s_ent->nargs == MAX_ARGS) { +- if (umoven(tcp, +- mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]), +- sizeof(tcp->u_arg[0]), +- &tcp->u_arg[MAX_ARGS - 1]) < 0) +- tcp->u_arg[MAX_ARGS - 1] = 0; +- } +-# endif /* LINUX_MIPSO32 */ +-} ++/* The implementation is architecture specific. */ ++static void decode_syscall_subcall(struct tcb *); + #endif /* SYS_syscall_subcall */ + + static void |