Hi, The following patches makes it possible to build QEMU with GCC 4 on x86.
However, there is still a problem with x86_64-softmmu. It may be a genuine GCC bug though I don't see what's wrong with do_interrupt_real(). IOW, if I build this function with GCC 3.3, x86_64-softmmu works fine, otherwise QEMU hangs early. That's with GCC 4.0.3. With GCC 4.0.1, the problem looks elsewhere, namely cpu-exec.c needs to be compiled with GCC 3 to work... Anyhow, I am listing the current patches so that a GCC 4 compiled i386-softmmu binary works. Sorry, I don't have the time to look further the x86_64-softmmu problems. Patches are available at: <http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/contrib-SPECS/qemu/> * qemu-0.7.0-gcc4.patch Original patch from Paul Brook + an addition to correctly decode imul. * qemu-0.7.2-dyngen-check-stack-clobbers.patch Check stack is not clobbered in synthetic opcodes using GOTO_LABEL_PARAM [ this might exhibit a gcc4 performance regression though, insofar as gcc4 feels the need to generate stack variables ] * qemu-0.7.2-gcc4-hacks.patch Various workarounds to GCC ICEs. * qemu-0.7.2-gcc4-opts.patch Don't generate stack variables for x86_64-softmmu case in functions using GOTO_LABEL_PARAM. IMHO, it's not worth looking hard at compiling QEMU with GCC 4 on x86. The new hand written backend is a better alternative. Bye, Gwenolé. _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel