ia64/xen-unstable

view Config.mk @ 16412:8c305873f2b8

x86: Make IDT/GDT/LDT updates safe.

This involves either determining that the entry will not be
read/written while the update takes place, or atomically making the
entry 'present', or doing the entire write atomically, as appropriate.

This issue raised, and original patch provided, by Jan Beulich.

Signed-off-by: Keir Fraser <keir.fraser@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Nov 21 11:38:51 2007 +0000 (2007-11-21)
parents 1ed990bc8da9
children 822d4ec5cfb1
line source
1 # -*- mode: Makefile; -*-
3 # A debug build of Xen and tools?
4 debug ?= n
6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
7 -e s/ppc/powerpc/ -e s/i86pc/x86_32/ \
8 -e s/amd64/x86_64/)
9 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
10 XEN_OS ?= $(shell uname -s)
12 ifeq ($(XEN_TARGET_ARCH),x86_32)
13 XEN_TARGET_X86_PAE ?= y
14 endif
16 CONFIG_$(XEN_OS) := y
18 SHELL ?= /bin/sh
20 # Tools to run on system hosting the build
21 HOSTCC = gcc
22 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
23 HOSTCFLAGS += -fno-strict-aliasing
24 HOSTCFLAGS_x86_32 = -m32
25 HOSTCFLAGS_x86_64 = -m64
26 HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH))
28 DISTDIR ?= $(XEN_ROOT)/dist
29 DESTDIR ?= /
31 include $(XEN_ROOT)/config/$(XEN_OS).mk
32 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
34 ifneq ($(EXTRA_PREFIX),)
35 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
36 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
37 endif
39 # cc-option: Check if compiler supports first option, else fall back to second.
40 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
41 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
42 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
44 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
45 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
46 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
47 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
48 then echo y; else echo n; fi ;)
50 # cc-ver-check: Check compiler is at least specified version, else fail.
51 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
52 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
53 define cc-ver-check-closure
54 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
55 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
56 cc-option := n
57 endif
58 endef
60 ifneq ($(debug),y)
61 CFLAGS += -DNDEBUG
62 else
63 CFLAGS += -g
64 endif
66 CFLAGS += -fno-strict-aliasing
68 CFLAGS += -std=gnu99
70 CFLAGS += -Wall -Wstrict-prototypes
72 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
73 # result of any casted expression causes a warning.
74 CFLAGS += -Wno-unused-value
76 HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
77 CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
79 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
80 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
82 # Enable XSM security module. Enabling XSM requires selection of an
83 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
84 XSM_ENABLE ?= n
85 FLASK_ENABLE ?= n
86 ACM_SECURITY ?= n
88 # Optional components
89 XENSTAT_XENTOP ?= y
90 VTPM_TOOLS ?= n
91 LIBXENAPI_BINDINGS ?= n
92 PYTHON_TOOLS ?= y
94 -include $(XEN_ROOT)/.config