Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35824
b: refs/heads/master
c: e241491
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Andi Kleen committed Sep 26, 2006
1 parent aeceb92 commit 20f8f2b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe7414a2882c953788af13a7f2c9d570ed8f71c5
refs/heads/master: e2414910f212c52d9d7c64c99a22863488ac5b48
5 changes: 5 additions & 0 deletions trunk/Documentation/kbuild/makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,11 @@ more details, with real examples.
The second argument is optional, and if supplied will be used
if first argument is not supported.

as-instr
as-instr checks if the assembler reports a specific instruction
and then outputs either option1 or option2
C escapes are supported in the test instruction

cc-option
cc-option is used to check if $(CC) supports a given option, and not
supported to use an optional second option.
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ endif
cflags-y += $(call cc-option,-funit-at-a-time)
# prevent gcc from generating any FP code by mistake
cflags-y += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
# 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)
CFLAGS_KERNEL += $(cflags-kernel-y)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-x86_64/dwarf2.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
away for older version.
*/

#ifdef CONFIG_UNWIND_INFO
#ifdef CONFIG_AS_CFI

#define CFI_STARTPROC .cfi_startproc
#define CFI_ENDPROC .cfi_endproc
Expand Down
7 changes: 7 additions & 0 deletions trunk/scripts/Kbuild.include
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 20f8f2b

Please sign in to comment.