From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbZH2Q0s (ORCPT ); Sat, 29 Aug 2009 12:26:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752001AbZH2Q0r (ORCPT ); Sat, 29 Aug 2009 12:26:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22051 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751967AbZH2Q0r (ORCPT ); Sat, 29 Aug 2009 12:26:47 -0400 Date: Sat, 29 Aug 2009 18:27:18 +0200 From: Michal Schmidt To: Ingo Molnar Cc: Tejun Heo , Jeremy Fitzhardinge , Linux Kernel Mailing List Subject: [PATCH] x86: detect stack protector for i386 builds on x86_64 Message-ID: <20090829182718.10f566b1@leela> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 1b68659..5e7db44 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -72,7 +72,7 @@ endif ifdef CONFIG_CC_STACKPROTECTOR cc_has_sp := $(srctree)/scripts/gcc-x86_$(BITS)-has-stack-protector.sh - ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC)),y) + ifeq ($(shell $(CONFIG_SHELL) $(cc_has_sp) $(CC) $(biarch)),y) stackp-y := -fstack-protector stackp-$(CONFIG_CC_STACKPROTECTOR_ALL) += -fstack-protector-all KBUILD_CFLAGS += $(stackp-y)