aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-26 04:52:30 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:30 -0400
commite2414910f212c52d9d7c64c99a22863488ac5b48 (patch)
tree5a7e55191ace4aa755c0684bcefc9cf1b124128c /scripts/Kbuild.include
parentfe7414a2882c953788af13a7f2c9d570ed8f71c5 (diff)
[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 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 3d523899fdc0..7adef12a0c26 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -63,6 +63,13 @@ as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
63 -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \ 63 -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
64 else echo "$(2)"; fi ;) 64 else echo "$(2)"; fi ;)
65 65
66# as-instr
67# Usage: cflags-y += $(call as-instr, instr, option1, option2)
68
69as-instr = $(shell if echo -e "$(1)" | $(AS) -Z -o astest$$$$.out \
70 2>&1 >/dev/null ; then echo "$(2)"; else echo "$(3)"; fi; \
71 rm -f astest$$$$.out)
72
66# cc-option 73# cc-option
67# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) 74# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
68 75