Re: [hatari-devel] hatari fails to build on RISC-V architecture

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 23.10.2021 20.47, rvalue wrote:
I'm working on getting hatari packaged for Arch Linux on RISC-V
architecture, but it fails to build from source.
I found that there is a naming collision: the symbol `REG_A0` is
already defined in <sys/ucontext.h> on Linux RISC-V as follows:
--- /usr/include/sys/ucontext.h:38
# define REG_S0 8
# define REG_S1 9
# define REG_A0 10
# define REG_S2 18
# define REG_NARGS 8
---
And in ./src/m68000.h, `REG_A0` is defined to specify register A0 in
M68000. This causes hatari to fail to build on RISC-V machines. Would
it be better to change the identifier of these macros, like adding a
prefix like `M68K_REG_A0` or something else?

My workaround patch:
https://github.com/felixonmars/archriscv-packages/blob/ee43ac93844ed4d0f8997795d10eb76679515f47/hatari/fix-name-conflicts.patch

This seems fine for me.  If others are OK
with the change, I can push it.  Nicolas?

(Except for REG_D0 usage in gemdos.c, there
are not that many places where these defines
are used in Hatari code.)


	- Eero




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/