aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-03-22 09:00:30 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-03-22 09:00:30 +0000
commitab78c96aeb1680458f7f4ff021c3114dc657b434 (patch)
tree50d24d5fad7a207f95d694c4bd49b61c1f0e8c20 /xen
parent63bebd7510b1427e6edca1a67e379f4902dc758c (diff)
downloadxen-ab78c96aeb1680458f7f4ff021c3114dc657b434.tar.gz
xen-ab78c96aeb1680458f7f4ff021c3114dc657b434.tar.bz2
xen-ab78c96aeb1680458f7f4ff021c3114dc657b434.zip
bitkeeper revision 1.1236.1.105 (423fdeaeuXmbQUj74cWh1nItpSKUjw)
Improved cross-compilation support. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen')
-rw-r--r--xen/Rules.mk8
-rw-r--r--xen/arch/x86/Rules.mk9
-rw-r--r--xen/tools/figlet/Makefile4
3 files changed, 7 insertions, 14 deletions
diff --git a/xen/Rules.mk b/xen/Rules.mk
index e604985ee8..f9650fc744 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -7,9 +7,7 @@ optimize ?= y
domu_debug ?= n
crash_debug ?= n
-# Currently supported architectures: x86_32, x86_64
-XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/)
-XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
+include $(BASEDIR)/../Config.mk
# Set ARCH/SUBARCH appropriately.
override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
@@ -39,10 +37,8 @@ ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
ALL_OBJS += $(BASEDIR)/drivers/pci/driver.o
ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
-HOSTCC = gcc
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-test-gcc-flag = $(shell gcc -v --help 2>&1 | grep -q " $(1) " && echo $(1))
+test-gcc-flag = $(shell $(CC) -v --help 2>&1 | grep -q " $(1) " && echo $(1))
include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 1eda23b416..370bf3d0a8 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -1,10 +1,7 @@
########################################
# x86-specific definitions
-CC := gcc
-LD := ld
-
-CFLAGS := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
+CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
CFLAGS += -iwithprefix include -Wall -Werror -Wno-format -pipe
CFLAGS += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls
@@ -24,13 +21,13 @@ CFLAGS += $(call test-gcc-flag,-fno-stack-protector-all)
ifeq ($(TARGET_SUBARCH),x86_32)
CFLAGS += -m32 -march=i686
-LDFLAGS := -m elf_i386
+LDFLAGS += -m elf_i386
endif
ifeq ($(TARGET_SUBARCH),x86_64)
CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
CFLAGS += -fno-asynchronous-unwind-tables
-LDFLAGS := -m elf_x86_64
+LDFLAGS += -m elf_x86_64
endif
# Test for at least GCC v3.2.x.
diff --git a/xen/tools/figlet/Makefile b/xen/tools/figlet/Makefile
index 9ed8fdff9c..ed4d3fa574 100644
--- a/xen/tools/figlet/Makefile
+++ b/xen/tools/figlet/Makefile
@@ -1,8 +1,8 @@
-CC := gcc
+include ../../Config.mk
figlet: figlet.c
- $(CC) -o $@ $<
+ $(HOSTCC) -o $@ $<
clean:
rm -f *.o figlet