From: Linus Torvalds Date: Thu, 21 Oct 2010 20:06:00 +0000 (-0700) Subject: Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Tag: v2.6.37-rc1~211 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=e990c77d06dbacc8e5c5edd2c4a1005d318a4fa6;hp=-c Merge branch 'x86-asm-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86-64, asm: If the assembler supports fxsave64, use it i386: Make kernel_execve() suitable for stack unwinding --- e990c77d06dbacc8e5c5edd2c4a1005d318a4fa6 diff --combined arch/x86/Makefile index e8c8881351b3,40668a96ca0c..b02e509072a7 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@@ -74,7 -74,7 +74,7 @@@ endi ifdef CONFIG_CC_STACKPROTECTOR cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh - ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(biarch)),y) + ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(KBUILD_CPPFLAGS) $(biarch)),y) stackp-y := -fstack-protector KBUILD_CFLAGS += $(stackp-y) else @@@ -96,8 -96,12 +96,12 @@@ cfi := $(call as-instr,.cfi_startproc\n # is .cfi_signal_frame supported too? cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1) cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1) - KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) - KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) + + # does binutils support specific instructions? + asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1) + + KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) + KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) LDFLAGS := -m elf_$(UTS_MACHINE)