* [PATCH 3/5] Enable Makefile in user directory for cross compile
@ 2007-10-08 5:10 Jerone Young
0 siblings, 0 replies; only message in thread
From: Jerone Young @ 2007-10-08 5:10 UTC (permalink / raw)
To: kvm-devel
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
This patch enables the Makefile in "user" directory for cross compile.
It also adds new feature of having architecture specific make rules
split into their own respective files.
Signed-off-by: Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
[-- Attachment #2: user_dir_makefile_cross_compile --]
[-- Type: text/x-patch, Size: 1984 bytes --]
diff -r dc203848af90 user/Makefile
--- a/user/Makefile Sun Oct 07 23:11:14 2007 -0500
+++ b/user/Makefile Sun Oct 07 23:19:31 2007 -0500
@@ -1,5 +1,10 @@
include config.mak
+
+DESTDIR :=
+
+#include architecure specific make rules
+include config-$(ARCH).mak
# cc-option
# Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
@@ -8,7 +13,7 @@ cc-option = $(shell if $(CC) $(1) -S -o
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
CFLAGS = -I $(KERNELDIR)/include $(autodepend-flags) -g -fomit-frame-pointer \
- -Wall -m$(bits)
+ -Wall
CFLAGS += $(call cc-option, -fno-stack-protector, "")
CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
@@ -17,20 +22,6 @@ CXXFLAGS = $(autodepend-flags)
CXXFLAGS = $(autodepend-flags)
autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
-
-DESTDIR =
-
-ifeq ($(shell uname -m), x86_64)
-LIBDIR = /lib64
-cstart.o = test/cstart64.o
-bits = 64
-ldarch = elf64-x86-64
-else
-LIBDIR = /lib
-cstart.o = test/cstart.o
-bits = 32
-ldarch = elf32-i386
-endif
all: kvmctl libkvm.a flatfiles
@@ -45,11 +36,7 @@ libkvm.a: kvmctl.o
flatfiles-common = test/bootstrap test/vmexit.flat test/smp.flat
-flatfiles-32 =
-
-flatfiles-64 = test/access.flat test/irq.flat test/sieve.flat test/simple.flat test/stringio.flat test/memtest1.flat
-
-flatfiles: $(flatfiles-common) $(flatfiles-$(bits))
+flatfiles: $(flatfiles-common) $(flatfiles)
install:
install -D kvmctl.h $(DESTDIR)/$(PREFIX)/include/kvmctl.h
@@ -60,13 +47,13 @@ install:
install -D libkvm.a $(DESTDIR)/$(PREFIX)/$(LIBDIR)/libkvm.a
%.flat: %.o
- gcc $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^
+ $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^
test/bootstrap: test/bootstrap.o
- gcc -nostdlib -o $@ -Wl,-T,bootstrap.lds $^
+ $(CC) -nostdlib -o $@ -Wl,-T,bootstrap.lds $^
%.o: %.S
- gcc $(CFLAGS) -c -nostdlib -o $@ $^
+ $(CC) $(CFLAGS) -c -nostdlib -o $@ $^
test/irq.flat: test/print.o
[-- Attachment #3: Type: text/plain, Size: 314 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-08 5:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08 5:10 [PATCH 3/5] Enable Makefile in user directory for cross compile Jerone Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox