ia64/xen-unstable

view Config.mk @ 17042:a905c582a406

Add stubdomain support. See stubdom/README for usage details.

- Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in
arch_limits.h so as to permit getting them from there without
pulling all the internal Mini-OS defines.
- Setup a xen-elf cross-compilation environment in stubdom/cross-root
- Add a POSIX layer on top of Mini-OS by linking against the newlib C
library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c
- Cross-compile zlib and libpci too.
- Add an xs.h-compatible layer on top of Mini-OS' xenbus.
- Cross-compile libxc with an additional xc_minios.c and a few things
disabled.
- Cross-compile ioemu with an additional block-vbd, but without sound,
tpm and other details. A few hacks are needed:
- Align ide and scsi buffers at least on sector size to permit
direct transmission to the block backend. While we are at it, just
page-align it to possibly save a segment. Also, limit the scsi
buffer size because of limitations of the block paravirtualization
protocol.
- Allocate big tables dynamically rather that letting them go to
bss: when Mini-OS gets installed in memory, bss is not lazily
allocated, and doing so during Mini-OS is unnecessarily trick while
we can simply use malloc.
- Had to change the Mini-OS compilation somehow, so as to export
Mini-OS compilation flags to the Makefiles of libxc and ioemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 12 14:35:39 2008 +0000 (2008-02-12)
parents 0faf620bc749
children 7e91007fa727
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
25 DISTDIR ?= $(XEN_ROOT)/dist
26 DESTDIR ?= /
28 include $(XEN_ROOT)/config/$(XEN_OS).mk
29 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
31 ifeq ($(stubdom),y)
32 include $(XEN_ROOT)/extras/mini-os/Config.mk
33 CFLAGS += $(DEF_CFLAGS) $(ARCH_CFLAGS)
34 CPPFLAGS += $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS) $(extra_incl)
35 ASFLAGS += $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
36 LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
37 endif
39 ifneq ($(EXTRA_PREFIX),)
40 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
41 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
42 endif
44 # cc-option: Check if compiler supports first option, else fall back to second.
45 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
46 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
47 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
49 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
50 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
51 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
52 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
53 then echo y; else echo n; fi ;)
55 # cc-ver-check: Check compiler is at least specified version, else fail.
56 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
57 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
58 define cc-ver-check-closure
59 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
60 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
61 cc-option := n
62 endif
63 endef
65 ifeq ($(debug),y)
66 CFLAGS += -g
67 endif
69 CFLAGS += -fno-strict-aliasing
71 CFLAGS += -std=gnu99
73 CFLAGS += -Wall -Wstrict-prototypes
75 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
76 # result of any casted expression causes a warning.
77 CFLAGS += -Wno-unused-value
79 HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
80 CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
82 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
83 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
85 # Enable XSM security module. Enabling XSM requires selection of an
86 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
87 XSM_ENABLE ?= n
88 FLASK_ENABLE ?= n
89 ACM_SECURITY ?= n
91 # Optional components
92 XENSTAT_XENTOP ?= y
93 VTPM_TOOLS ?= n
94 LIBXENAPI_BINDINGS ?= n
95 PYTHON_TOOLS ?= y
96 CONFIG_MINITERM ?= n
97 CONFIG_LOMOUNT ?= n
99 -include $(XEN_ROOT)/.config