diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-18 19:14:34 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-18 19:14:34 +0100 |
commit | f9038804d68bc97bfe33ded8e0b3b761689d6530 (patch) | |
tree | 78571db4b5c464e9c10be376f807051f52971462 /xen/arch/x86/Rules.mk | |
parent | 923fbdf607ad3b0a2127c279176bb171a49f4822 (diff) | |
download | xen-f9038804d68bc97bfe33ded8e0b3b761689d6530.tar.gz xen-f9038804d68bc97bfe33ded8e0b3b761689d6530.tar.bz2 xen-f9038804d68bc97bfe33ded8e0b3b761689d6530.zip |
Replace test-gcc-flag with Linux-style cc-option.
Improve on Linux implementation by looking for any output
on stdout/stderr. This indicates badness.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/Rules.mk')
-rw-r--r-- | xen/arch/x86/Rules.mk | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 33eb5b53a4..fd1a52e365 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -11,26 +11,26 @@ HAS_VGA := y pae ?= n supervisor_mode_kernel ?= n -CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe -CFLAGS += -I$(BASEDIR)/include -CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic -CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default +CFLAGS += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing +CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe +CFLAGS += -I$(BASEDIR)/include +CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic +CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default # Prevent floating-point variables from creeping into Xen. -CFLAGS += -msoft-float +CFLAGS += -msoft-float # Disable PIE/SSP if GCC supports them. They can break us. -CFLAGS += $(call test-gcc-flag,$(CC),-nopie) -CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector) -CFLAGS += $(call test-gcc-flag,$(CC),-fno-stack-protector-all) +CFLAGS += $(call cc-option,$(CC),-nopie,) +CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) +CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,) ifeq ($(TARGET_SUBARCH)$(pae),x86_32y) -CFLAGS += -DCONFIG_X86_PAE=1 +CFLAGS += -DCONFIG_X86_PAE=1 endif ifeq ($(supervisor_mode_kernel),y) -CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1 +CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1 endif ifeq ($(XEN_TARGET_ARCH),x86_32) @@ -39,11 +39,11 @@ x86_64 := n endif ifeq ($(TARGET_SUBARCH),x86_64) -CFLAGS += -mno-red-zone -fpic -fno-reorder-blocks -CFLAGS += -fno-asynchronous-unwind-tables +CFLAGS += -mno-red-zone -fpic -fno-reorder-blocks +CFLAGS += -fno-asynchronous-unwind-tables # -fvisibility=hidden reduces -fpic cost, if it's available -CFLAGS += $(shell $(CC) -v --help 2>&1 | grep " -fvisibility=" | \ - grep -q hidden && echo "-DGCC_HAS_VISIBILITY_ATTRIBUTE") +CFLAGS += $(call cc-option,$(CC),-fvisibility=hidden,) +CFLAGS := $(subst -fvisibility=hidden,-DGCC_HAS_VISIBILITY_ATTRIBUTE,$(CFLAGS)) x86_32 := n x86_64 := y endif |