direct-io.hg

view xen/arch/x86/Rules.mk @ 8365:25d0ba51338e

Fix calls to test-gcc-flag, to match previous changeset.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Wed Dec 14 12:52:02 2005 +0000 (2005-12-14)
parents 06d84bf87159
children ee8041b0ab86
line source
1 ########################################
2 # x86-specific definitions
4 #
5 # If you change any of these configuration options then you must
6 # 'make clean' before rebuilding.
7 #
8 pae ?= n
10 CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
11 CFLAGS += -iwithprefix include -Wall -Werror -Wno-pointer-arith -pipe
12 CFLAGS += -I$(BASEDIR)/include
13 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
14 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
16 ifneq ($(debug),y)
17 CFLAGS += -O3 -fomit-frame-pointer
18 endif
20 # Prevent floating-point variables from creeping into Xen.
21 CFLAGS += -msoft-float
23 # Disable PIE/SSP if GCC supports them. They can break us.
24 CFLAGS += $(call test-gcc-flag,$(CC),-nopie)
25 CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector)
26 CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all)
28 ifeq ($(TARGET_SUBARCH),x86_32)
29 CFLAGS += -m32 -march=i686
30 LDFLAGS += -m elf_i386
31 ifeq ($(pae),y)
32 CFLAGS += -DCONFIG_X86_PAE=1
33 endif
34 endif
36 ifeq ($(TARGET_SUBARCH),x86_64)
37 CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
38 CFLAGS += -fno-asynchronous-unwind-tables
39 LDFLAGS += -m elf_x86_64
40 endif
42 # Test for at least GCC v3.2.x.
43 gcc-ver = $(shell $(CC) -dumpversion | sed -e 's/^\(.\)\.\(.\)\.\(.\)/\$(1)/')
44 ifeq ($(call gcc-ver,1),1)
45 $(error gcc-1.x.x unsupported - upgrade to at least gcc-3.2.x)
46 endif
47 ifeq ($(call gcc-ver,1),2)
48 $(error gcc-2.x.x unsupported - upgrade to at least gcc-3.2.x)
49 endif
50 ifeq ($(call gcc-ver,1),3)
51 ifeq ($(call gcc-ver,2),0)
52 $(error gcc-3.0.x unsupported - upgrade to at least gcc-3.2.x)
53 endif
54 ifeq ($(call gcc-ver,2),1)
55 $(error gcc-3.1.x unsupported - upgrade to at least gcc-3.2.x)
56 endif
57 endif