diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-07-25 22:22:43 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-07-25 22:22:43 +0100 |
commit | 470427c7d682d2229cfc11fc8e917de81ac6913f (patch) | |
tree | bdae94a170889cbb62635a6e5e1db079fff7b53e | |
parent | 05ae586e30e515952363089c2c05ed3a39569ac1 (diff) | |
download | xen-470427c7d682d2229cfc11fc8e917de81ac6913f.tar.gz xen-470427c7d682d2229cfc11fc8e917de81ac6913f.tar.bz2 xen-470427c7d682d2229cfc11fc8e917de81ac6913f.zip |
x86: Add -fno-exceptions to list of possibly-supported CFLAGS for 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
-rw-r--r-- | Config.mk | 5 | ||||
-rw-r--r-- | stubdom/Makefile | 4 | ||||
-rw-r--r-- | tools/firmware/Rules.mk | 5 | ||||
-rw-r--r-- | tools/tests/blowfish.mk | 5 | ||||
-rw-r--r-- | xen/arch/x86/Rules.mk | 5 | ||||
-rw-r--r-- | xen/arch/x86/boot/build32.mk | 5 |
6 files changed, 10 insertions, 19 deletions
@@ -59,6 +59,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. \ @@ -134,6 +136,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 diff --git a/stubdom/Makefile b/stubdom/Makefile index 43e8e9217b..106993f3b3 100644 --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -58,9 +58,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') diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk index 901bbf2434..8a8830911b 100644 --- a/tools/firmware/Rules.mk +++ b/tools/firmware/Rules.mk @@ -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 diff --git a/tools/tests/blowfish.mk b/tools/tests/blowfish.mk index ae7888267d..a8ede7f615 100644 --- a/tools/tests/blowfish.mk +++ b/tools/tests/blowfish.mk @@ -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 diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index d97cea4777..d8663a6184 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -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 diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk index 0de9c15af2..c061560bdf 100644 --- a/xen/arch/x86/boot/build32.mk +++ b/xen/arch/x86/boot/build32.mk @@ -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 |