[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Update: qemu 0.7.0
- To: ports_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Update: qemu 0.7.0
- From: Matthias Kilian <kili_(_at_)_outback_(_dot_)_escape_(_dot_)_de>
- Date: Fri, 29 Apr 2005 19:21:49 +0200
- Mail-followup-to: ports_(_at_)_openbsd_(_dot_)_org
On Thu, Apr 28, 2005 at 04:00:41PM -0500, Todd T. Fries wrote:
> http://todd.fries.net/ports/qemu-0.7.0.tgz
Build fails on macppc (see below). It seems that there's some bug
in dyngen generating a broken op.h. So far, I got to adding an assert to
dyngen.c that fails:
--- dyngen.c.orig Wed Apr 27 22:52:05 2005
+++ dyngen.c Fri Apr 29 19:09:27 2005
@@ -29,6 +29,7 @@
#include <inttypes.h>
#include <unistd.h>
#include <fcntl.h>
+#include <assert.h>
#include "config-host.h"
@@ -1804,6 +1805,7 @@ void gen_code(const char *name, host_ulo
if (rel->r_offset >= start_offset &&
rel->r_offset < start_offset + copy_size) {
sym_name = strtab + symtab[ELFW(R_SYM)(rel->r_info)].st_name;
+ assert (sym_name && *sym_name);
if (strstart(sym_name, "__op_jmp", &p)) {
int n;
n = strtol(p, NULL, 10);
The problem is that sym_name is empty, which lets get_reloc_expr()
called some lines down to spill out incorrect code.
Ciao,
Kili
Here's an excerpt of the build output without the assertion:
...
gcc -O2 -pipe -D__powerpc__ -fno-reorder-blocks -fno-optimize-sibling-calls -I. -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/target-i386 -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG_GDB -DDEBUG -DDEBUG_KBD -DDEBUG_MOUSE -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/fpu -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/slirp -c -o op.o /usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/target-i386/op.c
../dyngen -o op.h op.o
../dyngen -c -o opc.h op.o
gcc -O2 -pipe -D__powerpc__ -I. -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/target-i386 -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG_GDB -DDEBUG -DDEBUG_KBD -DDEBUG_MOUSE -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/fpu -I/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/slirp -c -o translate-op.o /usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/translate-op.c
In file included from /usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/translate-op.c:36:
op.h: In function `dyngen_code':
op.h:7406: error: syntax error before ')' token
op.h:7407: error: syntax error before ')' token
op.h:7497: error: syntax error before ')' token
[more syntax error follow]
gmake[1]: *** [translate-op.o] Error 1
gmake[1]: Leaving directory `/usr/ports/mystuff/emulators/qemu-0.7.0/w-qemu-0.7.0/qemu-0.7.0/i386-softmmu'
gmake: *** [all] Error 2
*** Error code 2
Visit your host, monkey.org