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