diff -ruN qemu.ORIG/Makefile.target qemu/Makefile.target --- qemu.ORIG/Makefile.target 2008-05-04 10:42:56.000000000 -0400 +++ qemu/Makefile.target 2008-05-04 12:02:56.068374000 -0400 @@ -96,6 +96,7 @@ ifeq ($(ARCH),i386) HELPER_CFLAGS+=-fomit-frame-pointer OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer +MTUNE_CFLAGS=-march=i486 -mtune=i686 endif ifeq ($(ARCH),ppc) @@ -279,6 +280,12 @@ LIBOBJS+=s390-dis.o endif +ifeq ($(ARCH), i386) + HCFLAGS=`echo $(CFLAGS) | sed 's,-march=i686,,'` +else + HCFLAGS=$(CFLAGS) +endif + # libqemu ifndef CONFIG_NO_DYNGEN_OP @@ -309,7 +316,7 @@ $(DYNGEN) -g -o $@ $< op.o: op.c - $(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $< + $(CC) $(OP_CFLAGS) $(CPPFLAGS) $(MTUNE_CFLAGS) -c -o $@ $< machine.o: machine.c $(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $< @@ -319,7 +326,7 @@ ifeq ($(TARGET_BASE_ARCH), i386) # XXX: rename helper.c to op_helper.c helper.o: helper.c - $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(MTUNE_CFLAGS) $(HCFLAGS) -c -o $@ $< else op_helper.o: op_helper.c $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<