mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
[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>
This commit is contained in:
parent
fe7414a288
commit
e2414910f2
5 changed files with 20 additions and 1 deletions
|
@ -63,6 +63,13 @@ as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
|
|||
-xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
|
||||
else echo "$(2)"; fi ;)
|
||||
|
||||
# as-instr
|
||||
# Usage: cflags-y += $(call as-instr, instr, option1, option2)
|
||||
|
||||
as-instr = $(shell if echo -e "$(1)" | $(AS) -Z -o astest$$$$.out \
|
||||
2>&1 >/dev/null ; then echo "$(2)"; else echo "$(3)"; fi; \
|
||||
rm -f astest$$$$.out)
|
||||
|
||||
# cc-option
|
||||
# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue