# HG changeset patch
# User Hollis Blanchard <[EMAIL PROTECTED]>
# Date 1200436754 21600
# Node ID 05365f8559d584fb1e935a9a64b5fa4f7e894d1f
# Parent  f058f7e0e9e2f47beb19114a4ee3c7c44ac03aa0
This allows other architectures to build test executables in other ways.

Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]>

---
2 files changed, 6 insertions(+), 7 deletions(-)
user/Makefile              |    9 ++-------
user/config-x86-common.mak |    4 ++++


diff --git a/user/Makefile b/user/Makefile
--- a/user/Makefile
+++ b/user/Makefile
@@ -7,6 +7,8 @@ DESTDIR :=
 
 #make sure env CFLAGS variable is not used
 CFLAGS =
+
+libgcc := $(shell gcc --print-libgcc-file-name)
 
 #include architecure specific make rules
 include config-$(ARCH).mak
@@ -29,17 +31,10 @@ CXXFLAGS = $(autodepend-flags)
 
 autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
 
-libgcc := $(shell gcc --print-libgcc-file-name)
-
-FLATLIBS = $(TEST_DIR)/libcflat.a $(libgcc)
-
 kvmctl: LDFLAGS += -pthread -lrt
 
 kvmctl: $(kvmctl_objs)
        $(CC) $(LDFLAGS) $^ -o $@
-
-%.flat: %.o $(FLATLIBS)
-       $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS)
 
 %.o: %.S
        $(CC) $(CFLAGS) -c -nostdlib -o $@ $^
diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -5,6 +5,10 @@ kvmctl_objs= main.o iotable.o ../libkvm/
 kvmctl_objs= main.o iotable.o ../libkvm/libkvm.a
 
 balloon_ctl: balloon_ctl.o
+
+FLATLIBS = $(TEST_DIR)/libcflat.a $(libgcc)
+%.flat: %.o $(FLATLIBS)
+       $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^ $(FLATLIBS)
 
 tests-common = $(TEST_DIR)/bootstrap \
                        $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to