--- qemu/target-i386/helper.c.orig 2007-04-22 17:17:29.297385382 -0500 +++ qemu/target-i386/helper.c.orig 2007-04-22 17:20:39.872245625 -0500 @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "exec.h" +#include "stdlib.h" #ifdef USE_KVM extern int kvm_allowed; #endif @@ -1594,6 +1595,9 @@ EDX = (uint32_t)r; } +/* GCC 4 has a hard time with this helper */ + +#ifndef CONFIG_KVM void helper_cmpxchg8b(void) { uint64_t d; @@ -1611,6 +1615,7 @@ } CC_SRC = eflags; } +#endif void helper_cpuid(void) { @@ -2968,6 +2973,10 @@ CC_SRC = eflags | CC_Z; } +/* GCC 4 has a hard time with the FPU helpers */ +#ifndef CONFIG_KVM + + /* FPU helpers */ void helper_fldt_ST0_A0(void) @@ -3485,6 +3494,7 @@ } } } +#endif #ifndef USE_X86LDOUBLE