Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: Detect stack protector for i386 builds on x86_64

Stack protector support was not detected when building with
ARCH=i386 on x86_64 systems:

arch/x86/Makefile:80: stack protector enabled but no compiler support

The "-m32" argument needs to be passed to the detection script.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Arjan van de Ven <arjan@infradead.org>
LKML-Reference: <20090829182718.10f566b1@leela>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
--

authored by

Michal Schmidt and committed by
Ingo Molnar
23386d63 ab94fcf5

+1 -1
+1 -1
arch/x86/Makefile
··· 72 72 73 73 ifdef CONFIG_CC_STACKPROTECTOR 74 74 cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh 75 - ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC)),y) 75 + ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(biarch)),y) 76 76 stackp-y := -fstack-protector 77 77 stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += -fstack-protector-all 78 78 KBUILD_CFLAGS += $(stackp-y)