[PATCH] Fix build for mips targets
Baruch Siach
baruch at tkos.co.il
Wed Jan 9 19:26:05 UTC 2019
Hi Dmitry,
Dmitry V. Levin writes:
> 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.
I confirm that commit 2c8b6de91397 fixes the build.
Thanks,
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
More information about the Strace-devel
mailing list