debuggers.hg

changeset 21906:2b768d52bc7f

x86: Add -fno-exceptions to list of possibly-supported CFLAGS for embedded targets.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sun Jul 25 22:20:47 2010 +0100 (2010-07-25)
parents ac7e4c6ec6c7
children fb3649141e19
files Config.mk stubdom/Makefile tools/firmware/Rules.mk tools/tests/blowfish.mk xen/arch/x86/Rules.mk xen/arch/x86/boot/build32.mk
line diff
     1.1 --- a/Config.mk	Fri Jul 23 19:23:49 2010 +0100
     1.2 +++ b/Config.mk	Sun Jul 25 22:20:47 2010 +0100
     1.3 @@ -59,6 +59,8 @@ define cc-option-add-closure
     1.4      endif
     1.5  endef
     1.6  
     1.7 +cc-options-add = $(foreach o,$(3),$(call cc-option-add,$(1),$(2),$(o)))
     1.8 +
     1.9  # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
    1.10  # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
    1.11  cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
    1.12 @@ -134,6 +136,9 @@ CFLAGS += -Wno-unused-value
    1.13  LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
    1.14  CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
    1.15  
    1.16 +EMBEDDED_EXTRA_CFLAGS := -nopie -fno-stack-protector -fno-stack-protector-all
    1.17 +EMBEDDED_EXTRA_CFLAGS += -fno-exceptions
    1.18 +
    1.19  # Enable XSM security module.  Enabling XSM requires selection of an 
    1.20  # XSM security module (FLASK_ENABLE or ACM_SECURITY).
    1.21  XSM_ENABLE ?= n
     2.1 --- a/stubdom/Makefile	Fri Jul 23 19:23:49 2010 +0100
     2.2 +++ b/stubdom/Makefile	Sun Jul 25 22:20:47 2010 +0100
     2.3 @@ -58,9 +58,7 @@ CROSS_PREFIX=$(CURDIR)/$(CROSS_ROOT)
     2.4  # Disable PIE/SSP if GCC supports them. They can break us.
     2.5  TARGET_CFLAGS += $(CFLAGS)
     2.6  TARGET_CPPFLAGS += $(CPPFLAGS)
     2.7 -TARGET_CFLAGS += $(call cc-option,$(CC),-nopie,)
     2.8 -TARGET_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
     2.9 -TARGET_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
    2.10 +$(call cc-options-add,TARGET_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
    2.11  
    2.12  # Do not use host headers and libs
    2.13  GCC_INSTALL = $(shell LANG=C gcc -print-search-dirs | sed -n -e 's/install: \(.*\)/\1/p')
     3.1 --- a/tools/firmware/Rules.mk	Fri Jul 23 19:23:49 2010 +0100
     3.2 +++ b/tools/firmware/Rules.mk	Sun Jul 25 22:20:47 2010 +0100
     3.3 @@ -12,10 +12,7 @@ endif
     3.4  
     3.5  CFLAGS += -Werror
     3.6  
     3.7 -# Disable PIE/SSP if GCC supports them. They can break us.
     3.8 -$(call cc-option-add,CFLAGS,CC,-nopie)
     3.9 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
    3.10 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
    3.11 +$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
    3.12  
    3.13  # Extra CFLAGS suitable for an embedded type of environment.
    3.14  CFLAGS += -fno-builtin -msoft-float
     4.1 --- a/tools/tests/blowfish.mk	Fri Jul 23 19:23:49 2010 +0100
     4.2 +++ b/tools/tests/blowfish.mk	Sun Jul 25 22:20:47 2010 +0100
     4.3 @@ -4,10 +4,7 @@ XEN_ROOT = ../..
     4.4  CFLAGS =
     4.5  include $(XEN_ROOT)/tools/Rules.mk
     4.6  
     4.7 -# Disable PIE/SSP if GCC supports them. They can break us.
     4.8 -$(call cc-option-add,CFLAGS,CC,-nopie)
     4.9 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
    4.10 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
    4.11 +$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
    4.12  
    4.13  CFLAGS += -fno-builtin -msoft-float
    4.14  
     5.1 --- a/xen/arch/x86/Rules.mk	Fri Jul 23 19:23:49 2010 +0100
     5.2 +++ b/xen/arch/x86/Rules.mk	Sun Jul 25 22:20:47 2010 +0100
     5.3 @@ -25,10 +25,7 @@ CFLAGS += -I$(BASEDIR)/include/asm-x86/m
     5.4  # Prevent floating-point variables from creeping into Xen.
     5.5  CFLAGS += -msoft-float
     5.6  
     5.7 -# Disable PIE/SSP if GCC supports them. They can break us.
     5.8 -$(call cc-option-add,CFLAGS,CC,-nopie)
     5.9 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
    5.10 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
    5.11 +$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
    5.12  
    5.13  ifeq ($(supervisor_mode_kernel),y)
    5.14  CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
     6.1 --- a/xen/arch/x86/boot/build32.mk	Fri Jul 23 19:23:49 2010 +0100
     6.2 +++ b/xen/arch/x86/boot/build32.mk	Sun Jul 25 22:20:47 2010 +0100
     6.3 @@ -3,10 +3,7 @@ override XEN_TARGET_ARCH=x86_32
     6.4  CFLAGS =
     6.5  include $(XEN_ROOT)/Config.mk
     6.6  
     6.7 -# Disable PIE/SSP if GCC supports them. They can break us.
     6.8 -$(call cc-option-add,CFLAGS,CC,-nopie)
     6.9 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
    6.10 -$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
    6.11 +$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
    6.12  
    6.13  CFLAGS += -Werror -fno-builtin -msoft-float
    6.14