[hatari-devel] hatari fails to build on RISC-V architecture |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: [hatari-devel] hatari fails to build on RISC-V architecture
- From: rvalue <i@xxxxxxxxxx>
- Date: Sun, 24 Oct 2021 01:47:31 +0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rvalue.moe; s=titan1; t=1635011263; bh=tgVNexRfUTdm9faaDuipktBONNODsO9gvhTZqSGOMbM=; h=From:Date:Subject:To:From; b=MUKJSW7iwLtar0nOUCJM0ViRfPkpQKKslRmqhrSFPsxz7DrgA1AIJdVQDOgcup6no qHZEcKEFmVQY7WJtzvgHdDvDF7TqxDLDMygoYO+LQ3nHIcSMOUYZlFk04HdYKG6JbY RmsBFN6Xr61pmWoS//5jETuZ46bdgbpnyBaH7LEc=
- Feedback-id: :i@xxxxxxxxxx:rvalue.moe:flockmailId
Hi,
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
--
Albert Zhang (a.k.a. rvalue)