aboutsummaryrefslogtreecommitdiffstats
path: root/Config.mk
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-10 17:32:04 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-10 17:32:04 +0100
commit945758df892447c3c0cf9c6ba4cd6b2cc83da42b (patch)
tree8072d5ac3c907f5d617574fd9a7d75883bfe31b3 /Config.mk
parent27d7304ed79a09ab0fbf14269154a4a46a20e170 (diff)
downloadxen-945758df892447c3c0cf9c6ba4cd6b2cc83da42b.tar.gz
xen-945758df892447c3c0cf9c6ba4cd6b2cc83da42b.tar.bz2
xen-945758df892447c3c0cf9c6ba4cd6b2cc83da42b.zip
More build config changes:
- Build -O2 rather than -O3 - Build with -Wstrict-prototypes - Move target-specific generic compiler switches to Config.mk Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'Config.mk')
-rw-r--r--Config.mk26
1 files changed, 17 insertions, 9 deletions
diff --git a/Config.mk b/Config.mk
index a7c975d2bc..7cea3953c5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -12,14 +12,6 @@ XEN_TARGET_X86_PAE ?= n
HOSTCC = gcc
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-ifneq ($(debug),y)
-# Optimisation flags are overridable
-CFLAGS ?= -O3 -fomit-frame-pointer
-CFLAGS += -DNDEBUG
-else
-CFLAGS += -g
-endif
-
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
@@ -38,6 +30,22 @@ INSTALL_DIR = $(INSTALL) -d -m0755
INSTALL_DATA = $(INSTALL) -m0644
INSTALL_PROG = $(INSTALL) -m0755
+ifneq ($(debug),y)
+# Optimisation flags are overridable
+CFLAGS ?= -O2 -fomit-frame-pointer
+CFLAGS += -DNDEBUG
+else
+CFLAGS += -g
+endif
+
+ifeq ($(XEN_TARGET_ARCH),x86_32)
+CFLAGS += -m32 -march=i686
+endif
+
+ifeq ($(XEN_TARGET_ARCH),x86_64)
+CFLAGS += -m64
+endif
+
ifeq ($(XEN_TARGET_ARCH),x86_64)
LIBDIR = lib64
else
@@ -51,7 +59,7 @@ endif
test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2))
-CFLAGS += -Wall
+CFLAGS += -Wall -Wstrict-prototypes
HOSTCFLAGS += $(call test-gcc-flag,$(HOSTCC),-Wdeclaration-after-statement)
CFLAGS += $(call test-gcc-flag,$(CC),-Wdeclaration-after-statement)