[PATCH] Fix build for mips targets

Dmitry V. Levin ldv at altlinux.org
Wed Jan 9 02:46:44 UTC 2019


On Wed, Jan 09, 2019 at 01:14:58AM +0300, Dmitry V. Levin wrote:
> On Tue, Jan 08, 2019 at 10:15:23PM +0200, Baruch Siach wrote:
> > Dmitry V. Levin writes:
> > > On Tue, Jan 08, 2019 at 07:59:36PM +0200, Baruch Siach wrote:
> > >> Commit 917c2ccf3a67 ("Refactor stack pointers") removed
> > >> linux/mips/arch_regs.h that defines mips_REG_* macros and struct
> > >> mips_regs. These symbols are referenced in mips code. Restore
> > >> arch_regs.h to fix the build failure:
> > >
> > > These macros were moved from linux/mips/arch_regs.h to
> > > linux/mips/arch_regs.c because they are no longer used outside
> > > syscall.c or files included by syscall.c.
> > >
> > >> syscall.c: In function 'decode_syscall_subcall':
> > >> syscall.c:370:7: error: 'mips_REG_SP' undeclared (first use in this function)
> > >>        mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]),
> > >> 	   ^~~~~~~~~~~
> > >
> > > Interesting, I see no build failures on mips,
> > > you must be doing something unusual.
> > 
> > You can see the full build log at
> > 
> >   http://autobuild.buildroot.net/results/858/8585e75df6462b6d07476a81982e88ec81655c8b/build-end.log
> 
> I see, it's mips o32, I don't have such test boxes here.
>  
> The bug introduced by commit 917c2ccf3a67 is that on mips o32
> mips_REG_SP is used in syscall.c before it's defined.
> 
> I'll try to prepare a fix.

I've just moved decode_syscall_subcall() to linux/mips/get_syscall_args.c
which should fix build on mips o32.

Thanks,


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190109/6a9a6f5f/attachment.bin>


More information about the Strace-devel mailing list