ia64/xen-unstable

view xen/arch/x86/Rules.mk @ 19473:2fa1d38097da

Use unlikely() in BUG_ON()/WARN_ON()

-fno-reorder-blocks was added in c/s 1712, when x86-64 just started to
become enabled. The reason it got added is entirely unclear to me, and
it prevents the intended effect of unlikely() constructs (in
particular
the ones added here) of moving out of line code which is expected to
never get executed, as well as using forward branches (which are
statically predicted taken by various processors' branch prediction
units) preferably to reach infrequently executed code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 31 13:22:12 2009 +0100 (2009-03-31)
parents 27e9687c5b3d
children
line source
1 ########################################
2 # x86-specific definitions
4 HAS_ACPI := y
5 HAS_VGA := y
6 xenoprof := y
8 #
9 # If you change any of these configuration options then you must
10 # 'make clean' before rebuilding.
11 #
12 supervisor_mode_kernel ?= n
14 # Solaris grabs stdarg.h and friends from the system include directory.
15 ifneq ($(XEN_OS),SunOS)
16 CFLAGS += -nostdinc
17 endif
19 CFLAGS += -fno-builtin -fno-common
20 CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
21 CFLAGS += -I$(BASEDIR)/include
22 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
23 CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
25 # Prevent floating-point variables from creeping into Xen.
26 CFLAGS += -msoft-float
28 # Disable PIE/SSP if GCC supports them. They can break us.
29 $(call cc-option-add,CFLAGS,CC,-nopie)
30 $(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
31 $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
33 ifeq ($(supervisor_mode_kernel),y)
34 CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
35 endif
37 x86 := y
39 ifeq ($(TARGET_SUBARCH),x86_32)
40 x86_32 := y
41 x86_64 := n
42 endif
44 ifeq ($(TARGET_SUBARCH),x86_64)
45 CFLAGS += -mno-red-zone -fpic
46 CFLAGS += -fno-asynchronous-unwind-tables
47 # -fvisibility=hidden reduces -fpic cost, if it's available
48 ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n)
49 CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
50 endif
51 x86_32 := n
52 x86_64 := y
53 endif
55 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
56 $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")