source: trunk/packages/xen-3.1/xen-3.1/xen/arch/x86/Rules.mk @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 1.8 KB
Line 
1########################################
2# x86-specific definitions
3
4HAS_ACPI := y
5HAS_VGA  := y
6xenoprof := y
7
8#
9# If you change any of these configuration options then you must
10# 'make clean' before rebuilding.
11#
12pae ?= n
13supervisor_mode_kernel ?= n
14
15# Solaris grabs stdarg.h and friends from the system include directory.
16ifneq ($(XEN_OS),SunOS)
17CFLAGS += -nostdinc
18endif
19
20CFLAGS += -fno-builtin -fno-common -fno-strict-aliasing
21CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
22CFLAGS += -I$(BASEDIR)/include
23CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
24CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
25
26# Prevent floating-point variables from creeping into Xen.
27CFLAGS += -msoft-float
28
29# Disable PIE/SSP if GCC supports them. They can break us.
30CFLAGS += $(call cc-option,$(CC),-nopie,)
31CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
32CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
33
34ifeq ($(TARGET_SUBARCH)$(pae),x86_32y)
35CFLAGS += -DCONFIG_X86_PAE=1
36endif
37
38ifeq ($(supervisor_mode_kernel),y)
39CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
40endif
41
42ifeq ($(XEN_TARGET_ARCH),x86_32)
43x86_32 := y
44x86_64 := n
45endif
46
47ifeq ($(TARGET_SUBARCH),x86_64)
48CFLAGS += -mno-red-zone -fpic -fno-reorder-blocks
49CFLAGS += -fno-asynchronous-unwind-tables
50# -fvisibility=hidden reduces -fpic cost, if it's available
51CFLAGS += $(call cc-option,$(CC),-fvisibility=hidden,)
52CFLAGS := $(subst -fvisibility=hidden,-DGCC_HAS_VISIBILITY_ATTRIBUTE,$(CFLAGS))
53x86_32 := n
54x86_64 := y
55endif
56
57HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/*.h)
58HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/svm/*.h)
59HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/vmx/*.h)
60
61# Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
62$(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
Note: See TracBrowser for help on using the repository browser.