Building on ARM host
PATCH 1/1 Building on ARM host
This patch cleans up some bitrot that prevented qemu from building on arm. It includes a fix for dyngen.h suggested by Chih-Chung Chang. The resulting binary runs simple i386 programs like 'ls' on an arm host.
Steve
Index: cpu-exec.c
===================================================================
RCS file: /cvsroot/qemu/qemu/cpu-exec.c,v
retrieving revision 1.72
cpu-exec.c 21 Dec 2005 15:32:54 -0000 renamed from cpu-exec.c 19 Dec 2005 01:42:32 -0000 1.72 +1 -1
@@ -1326,7 +1326,7 @@ is_write = 0; return handle_cpu_signal(pc, (unsigned long)info->si_addr, is_write, - &uc->uc_sigmask); + &uc->uc_sigmask, puc); } #elif defined(__mc68000)
Index: disas.c
===================================================================
RCS file: /cvsroot/qemu/qemu/disas.c,v
retrieving revision 1.29
disas.c 21 Dec 2005 15:32:54 -0000 renamed from disas.c 17 Dec 2005 01:10:04 -0000 1.29 +1 -3
@@ -270,9 +270,7 @@ #ifdef __arm__ /* since data are included in the code, it is better to display code data too */ - if (is_host) { - fprintf(out, "%08x ", (int)bfd_getl32((const bfd_byte *)pc)); - } + fprintf(out, "%08x ", (int)bfd_getl32((const bfd_byte *)pc)); #endif count = print_insn(pc, &disasm_info); fprintf(out, "\n");
Index: dyngen.h
===================================================================
RCS file: /cvsroot/qemu/qemu/dyngen.h,v
retrieving revision 1.8
dyngen.h 21 Dec 2005 15:32:54 -0000 renamed from dyngen.h 7 Apr 2005 22:20:28 -0000 1.8 +6 -0
@@ -19,7 +19,13 @@ */ int __op_param1, __op_param2, __op_param3; +#ifdef __arm__ +void __op_gen_label1(){} +void __op_gen_label2(){} +void __op_gen_label3(){} +#else int __op_gen_label1, __op_gen_label2, __op_gen_label3; +#endif int __op_jmp0, __op_jmp1, __op_jmp2, __op_jmp3; #ifdef __i386__
Steve