]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
x86: Add -fno-exceptions to list of possibly-supported CFLAGS for
authorKeith Coleman <keith.coleman@n2servers.com>
Wed, 21 Dec 2011 01:16:47 +0000 (20:16 -0500)
committerKeith Coleman <keith.coleman@n2servers.com>
Wed, 21 Dec 2011 01:16:47 +0000 (20:16 -0500)
embedded targets.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   21860:2b768d52bc7f
xen-unstable date:        Sun Jul 25 22:20:47 2010 +0100

Config.mk
stubdom/Makefile
tools/firmware/Rules.mk
tools/tests/blowfish.mk
xen/arch/x86/Rules.mk
xen/arch/x86/boot/build32.mk

index e1442c838f3c49548c91c5815055f9a0e235ee6d..9a4244ae17b6b3150430cd3ea136a2e7e0ce012f 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -55,6 +55,8 @@ define cc-option-add-closure
     endif
 endef
 
+cc-options-add = $(foreach o,$(3),$(call cc-option-add,$(1),$(2),$(o)))
+
 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
@@ -107,6 +109,9 @@ $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) 
 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
 
+EMBEDDED_EXTRA_CFLAGS := -nopie -fno-stack-protector -fno-stack-protector-all
+EMBEDDED_EXTRA_CFLAGS += -fno-exceptions
+
 # Enable XSM security module.  Enabling XSM requires selection of an 
 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
 XSM_ENABLE ?= n
index 41b2c97d893d2fad1f01e5f3b1dd057af78eaa47..55b67f46fae89eb75c7516270a036c825599c76f 100644 (file)
@@ -54,9 +54,7 @@ CROSS_PREFIX=$(CURDIR)/$(CROSS_ROOT)
 # Disable PIE/SSP if GCC supports them. They can break us.
 TARGET_CFLAGS += $(CFLAGS)
 TARGET_CPPFLAGS += $(CPPFLAGS)
-TARGET_CFLAGS += $(call cc-option,$(CC),-nopie,)
-TARGET_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
-TARGET_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
+$(call cc-options-add,TARGET_CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 
 # Do not use host headers and libs
 GCC_INSTALL = $(shell LANG=C gcc -print-search-dirs | sed -n -e 's/install: \(.*\)/\1/p')
index 901bbf2434cb6fe3d216773c867152958531b854..8a8830911be539b55b3a6feda1e551d84c463747 100644 (file)
@@ -12,10 +12,7 @@ endif
 
 CFLAGS += -Werror
 
-# Disable PIE/SSP if GCC supports them. They can break us.
-$(call cc-option-add,CFLAGS,CC,-nopie)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
+$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 
 # Extra CFLAGS suitable for an embedded type of environment.
 CFLAGS += -fno-builtin -msoft-float
index ae7888267ddc3a098e1b3ea79ab41dfea0151ad9..a8ede7f615895c862a156af2c65f9af0d7458427 100644 (file)
@@ -4,10 +4,7 @@ XEN_ROOT = ../..
 CFLAGS =
 include $(XEN_ROOT)/tools/Rules.mk
 
-# Disable PIE/SSP if GCC supports them. They can break us.
-$(call cc-option-add,CFLAGS,CC,-nopie)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
+$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 
 CFLAGS += -fno-builtin -msoft-float
 
index d97cea47778f9f54e38586a82c7cef0a22ab2686..d8663a6184b4c0d2b0941dd5144563057d727af1 100644 (file)
@@ -25,10 +25,7 @@ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
 # Prevent floating-point variables from creeping into Xen.
 CFLAGS += -msoft-float
 
-# Disable PIE/SSP if GCC supports them. They can break us.
-$(call cc-option-add,CFLAGS,CC,-nopie)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
+$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 
 ifeq ($(supervisor_mode_kernel),y)
 CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
index 0de9c15af2878cca6dea96eb7f996e8e2c8c83ef..c061560bdfea492e16d88e9103db8d1ed086ca1a 100644 (file)
@@ -3,10 +3,7 @@ override XEN_TARGET_ARCH=x86_32
 CFLAGS =
 include $(XEN_ROOT)/Config.mk
 
-# Disable PIE/SSP if GCC supports them. They can break us.
-$(call cc-option-add,CFLAGS,CC,-nopie)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector)
-$(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
+$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 
 CFLAGS += -Werror -fno-builtin -msoft-float