[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] error compiling hw/sh7750.c
From: |
Ben Taylor |
Subject: |
[Qemu-devel] error compiling hw/sh7750.c |
Date: |
Sun, 11 Nov 2007 9:30:26 -0500 |
I'm getting this error compiling hw/sh7750.c
I believe the problem comes from the include in hw/sh_intc.h
with the macro
#define _INTC_ARRAY(a) a, sizeof(a)/sizeof(*a)
in line 587 of hw/7750.c, I see
sh_intc_register_sources(&s->intc,
_INTC_ARRAY(vectors_irlm),
_INTC_ARRAY(NULL));
So the macro turns the last _INTC_ARRAY(NULL) into
"NULL, sizeof(NULL)/sizeof(*NULL)
Since sizeof(*NULL) doesn't make any sense, the compiler barfs
on Solaris 10/x86_64.
gcc -Wall -O2 -g -fno-strict-aliasing -m64 -I. -I..
-I/export-1/bent/src/qemu/111107/qemu/target-sh4
-I/export-1/bent/src/qemu/111107/qemu -MMD -MP -DNEED_CPU_H -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/export-1/bent/src/qemu/111107/qemu/fpu -I/usr/gnu/include
-I/export-1/bent/src/qemu/111107/qemu/slirp -m64 -c -o sh7750.o
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c: In function `error_access':
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:184: warning: unsigned int
format, different type arg (arg 5)
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c: In function `ignore_access':
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:190: warning: unsigned int
format, different type arg (arg 5)
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c: In function `sh7750_init':
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:576: error: invalid type
argument of `unary *'
/export-1/bent/src/qemu/111107/qemu/hw/sh7750.c:589: error: invalid type
argument of `unary *'
gmake[1]: *** [sh7750.o] Error 1
gmake[1]: Leaving directory `/export-1/bent/src/qemu/111107/qemu/sh4-softmmu'
gmake: *** [subdir-sh4-softmmu] Error 2
In this case, I've replaced _INTC_ARRAY(NULL) with "NULL, NULL" and it
succesfully compiles, but I don't have any sh emulation to do.
Ben
- [Qemu-devel] error compiling hw/sh7750.c,
Ben Taylor <=