qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] microblaze build failure due to definition clash on ris


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] microblaze build failure due to definition clash on riscv
Date: Thu, 2 Aug 2018 00:57:48 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Oops I just realized I forgot to Cc the QEMU list, doing it now.

On 07/31/2018 07:40 AM, Edgar E. Iglesias wrote:
> On Mon, Jul 30, 2018 at 03:22:46PM -0300, Philippe Mathieu-Daudé wrote:
>> Hi, I'm getting this error while building microblaze on riscv host:
>>
>>   ...
>>   CC      disas/microblaze.o
>> disas/microblaze.c:179:0: error: "REG_SP" redefined [-Werror]
>>
>>  #define REG_SP  1 /* stack pointer */
>>
>> In file included from /usr/include/signal.h:306:0,
>>                  from include/qemu/osdep.h:101,
>>                  from disas/microblaze.c:36:
>> /usr/include/sys/ucontext.h:36:0: note: this is the location of the
>> previous definition
>>  # define REG_SP 2
>>
>> cc1: all warnings being treated as errors
>> make: *** [rules.mak:69: disas/microblaze.o] Error 1
>>
>>
>> Having /usr/include/sys/ucontext.h:
>>
>>      31 #ifdef __USE_MISC
>>      32 # define NGREG  32
>>      33
>>      34 # define REG_PC 0
>>      35 # define REG_RA 1
>>      36 # define REG_SP 2
>>      37 # define REG_TP 4
>>      38 # define REG_S0 8
>>      39 # define REG_S1 9
>>      40 # define REG_A0 10
>>      41 # define REG_S2 18
>>      42 # define REG_NARGS 8
>>
>> Edgar is it OK to rename REG_* -> MB_REG_*?
> 
> Yes, no problems with me!
> 
> Allthough it doesn't seem to be a good idea to have such generic names in 
> riscv system header files.

OK this might be a Linux problem indeed, maybe this file lacks some
#ifdef __riscv (previous to the __USE_MISC?).

I'll wait for the riscv folks before to send a dumb rename patch.

Regards,

Phil.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]