[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Build breakage: error: "ARM_cpsr" redefined
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] Build breakage: error: "ARM_cpsr" redefined |
Date: |
Wed, 2 Mar 2016 13:59:48 +0000 |
On 2 March 2016 at 13:11, Christopher Covington <address@hidden> wrote:
> Hi,
>
> Attempting to build QEMU on aarch64, I got the following error.
Interesting -- I do do a full aarch64 build before merging
pulls so this must be a quirk of your host system header files.
Nonetheless we should fix the collision.
> ===
>
> ./configure
> --target-list=arm-softmmu,aarch64-softmmu,arm-linux-user,aarch64-linux-user
> make
> [...]
> CC arm-linux-user/exec.o
> In file included from /root/qemu/linux-user/qemu.h:16:0,
> from /root/qemu/exec.c:42:
> /root/qemu/linux-user/arm/target_syscall.h:11:0: error: "ARM_cpsr"
> redefined [-Werror]
> #define ARM_cpsr uregs[16]
> ^
> In file included from /usr/include/sys/user.h:25:0,
> from /usr/include/sys/procfs.h:34,
> from /usr/include/sys/ucontext.h:26,
> from /usr/include/signal.h:360,
> from /root/qemu/include/qemu/osdep.h:79,
> from /root/qemu/exec.c:19:
> /usr/include/asm/ptrace.h:64:0: note: this is the location of the
> previous definition
> #define ARM_cpsr pstate
> ^
Somewhat poor form for the headers to define all that
stuff just for including signal.h, but hey ho.
I think we should just drop our ARM_r0 etc #defines,
because most of them aren't used and uregs[0] is just
as clear as ARM_r0. uregs[16] to mean CPSR is not quite
so obvious, but we only do that in two places anyway.
thanks
-- PMM