From: Avi Kivity <[EMAIL PROTECTED]>

appears to confuse some versions of gcc.

Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/user/config-i386.mak b/user/config-i386.mak
index 0908517..09175d5 100644
--- a/user/config-i386.mak
+++ b/user/config-i386.mak
@@ -2,7 +2,6 @@ TEST_DIR=test/x86
 cstart.o = $(TEST_DIR)/cstart.o
 bits = 32
 ldarch = elf32-i386
-CFLAGS += -m32
 CFLAGS += -D__i386__
 CFLAGS += -I $(KERNELDIR)/include
 
diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
index cfbc522..b0337c9 100644
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -12,6 +12,7 @@ cflatobjs += \
 $(libcflat): LDFLAGS += -nostdlib
 $(libcflat): CFLAGS += -ffreestanding -I test/lib
 
+CFLAGS += -m$(bits)
 
 FLATLIBS = test/lib/libcflat.a $(libgcc)
 %.flat: %.o $(FLATLIBS)
@@ -53,7 +54,7 @@ $(TEST_DIR)/tsc.flat: $(cstart.o) $(TEST_DIR)/tsc.o
 $(TEST_DIR)/realmode.flat: $(TEST_DIR)/realmode.o
        $(CC) -m32 -nostdlib -o $@ -Wl,-T,$(TEST_DIR)/realmode.lds $^
 
-$(TEST_DIR)/realmode.o: CFLAGS += -m32
+$(TEST_DIR)/realmode.o: bits = 32
 
 arch_clean:
        $(RM) $(TEST_DIR)/bootstrap $(TEST_DIR)/*.o $(TEST_DIR)/*.flat \
diff --git a/user/config-x86_64.mak b/user/config-x86_64.mak
index 9f37e6f..237f3c7 100644
--- a/user/config-x86_64.mak
+++ b/user/config-x86_64.mak
@@ -2,7 +2,6 @@ TEST_DIR=test/x86
 cstart.o = $(TEST_DIR)/cstart64.o
 bits = 64
 ldarch = elf64-x86-64
-CFLAGS += -m64
 CFLAGS += -D__x86_64__
 CFLAGS += -I $(KERNELDIR)/include
 
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to