summaryrefslogtreecommitdiffstats
path: root/arch/i386/Makefile
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 10:52:30 +0200
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 10:52:30 +0200
commite2414910f212c52d9d7c64c99a22863488ac5b48 (patch)
tree5a7e55191ace4aa755c0684bcefc9cf1b124128c /arch/i386/Makefile
parentfe7414a2882c953788af13a7f2c9d570ed8f71c5 (diff)
downloadkernel-crypto-e2414910f212c52d9d7c64c99a22863488ac5b48.tar.gz
kernel-crypto-e2414910f212c52d9d7c64c99a22863488ac5b48.tar.xz
kernel-crypto-e2414910f212c52d9d7c64c99a22863488ac5b48.zip
[PATCH] x86: Detect CFI support in the assembler at runtime
... instead of using a CONFIG option. The config option still controls if the resulting executable actually has unwind information. This is useful to prevent compilation errors when users select CONFIG_STACK_UNWIND on old binutils and also allows to use CFI in the future for non kernel debugging applications. Cc: jbeulich@novell.com Cc: sam@ravnborg.org Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/Makefile')
-rw-r--r--arch/i386/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 3e4adb1e224..508cdbeb3a0 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -46,6 +46,10 @@ cflags-y += -ffreestanding
# a lot more stack due to the lack of sharing of stacklots:
CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
+# do binutils support CFI?
+cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
+AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
+
CFLAGS += $(cflags-y)
# Default subarch .c files