From patchwork Wed Feb 26 01:08:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 25335 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5D3A320143 for ; Wed, 26 Feb 2014 01:10:34 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf559139pab.3 for ; Tue, 25 Feb 2014 17:10:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=l6Y/ur2+FhMBfDxb1sAJShJcx3NIqCej/0Dwj/s1itM=; b=YP4Rlqyd8Ffw41TLypYGlIZByWRvNsGc1xZ1Ta5QxwXcJC6AG7PP0RPPsilACf1plU KGO4sMdmiA3cgg7pZN691YOFFlO5+4dzbL1hqX3OckTNqgkUeNaZ9pleTq3989MwUBIK QzhmSPO2ZpqLOHY13SYuqR5WzMb1ER+G01TbrL7SzUxPTdloyiuzsvr1SettqNYZuUtg 8e1VSZPM7lx7R38Tsqa/esxu0alUy9s6ZfwnksU7it4N1JAQsXG7r9SRJSFh3S5Cz++c e7XaYK64AA6WbpgB7XbN/YSZyi6tTTMdSa0JFn6SfC9RgsETNdsFMSDHD7B8yr/0S1Lb sVCA== X-Gm-Message-State: ALoCoQkzM9t3/SwVq3JBbIIF9We9RjwR8d/WyDl2bG2FvvJF9Mr+S4dCFfe2NQAhea3g8kRXKqnx X-Received: by 10.66.189.163 with SMTP id gj3mr2036538pac.32.1393377034069; Tue, 25 Feb 2014 17:10:34 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.52 with SMTP id j49ls19109qge.7.gmail; Tue, 25 Feb 2014 17:10:33 -0800 (PST) X-Received: by 10.58.69.111 with SMTP id d15mr3507951veu.3.1393377033913; Tue, 25 Feb 2014 17:10:33 -0800 (PST) Received: from mail-ve0-x236.google.com (mail-ve0-x236.google.com [2607:f8b0:400c:c01::236]) by mx.google.com with ESMTPS id eo4si7262941vdb.108.2014.02.25.17.10.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:10:33 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::236 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::236; Received: by mail-ve0-f182.google.com with SMTP id jy13so1412974veb.41 for ; Tue, 25 Feb 2014 17:10:33 -0800 (PST) X-Received: by 10.52.171.39 with SMTP id ar7mr2954042vdc.5.1393377033815; Tue, 25 Feb 2014 17:10:33 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp179582vcz; Tue, 25 Feb 2014 17:10:33 -0800 (PST) X-Received: by 10.68.96.99 with SMTP id dr3mr3235934pbb.40.1393377032989; Tue, 25 Feb 2014 17:10:32 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si5303918pbl.328.2014.02.25.17.10.32; Tue, 25 Feb 2014 17:10:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbaBZBKY (ORCPT + 26 others); Tue, 25 Feb 2014 20:10:24 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:47842 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbaBZBJl (ORCPT ); Tue, 25 Feb 2014 20:09:41 -0500 Received: by mail-pa0-f45.google.com with SMTP id lf10so215035pab.32 for ; Tue, 25 Feb 2014 17:09:41 -0800 (PST) X-Received: by 10.68.190.200 with SMTP id gs8mr3150075pbc.130.1393376981049; Tue, 25 Feb 2014 17:09:41 -0800 (PST) Received: from galdor.websterwood.com ([207.6.123.58]) by mx.google.com with ESMTPSA id un5sm154425478pab.3.2014.02.25.17.09.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:09:40 -0800 (PST) From: behanw@converseincode.com To: mmarek@suse.cz, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, sparse@chrisli.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sparse@vger.kernel.org, torvalds@linux-foundation.org, dwmw2@infradead.org, pageexec@freemail.hu, =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= , Behan Webster , Mark Charlebois Subject: [PATCH 5/5] x86 kbuild: LLVMLinux: More cc-options added for clang Date: Tue, 25 Feb 2014 17:08:43 -0800 Message-Id: <1393376923-21892-6-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393376923-21892-1-git-send-email-behanw@converseincode.com> References: <1393376923-21892-1-git-send-email-behanw@converseincode.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: behanw@converseincode.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::236 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (bad format) header.i=@converseincode.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Jan-Simon Möller Protect more options for x86 with cc-option so that we don't get errors when using clang instead of gcc. Add more or different options when using clang as well. Also need to enforce that SSE is off for clang and the stack is 8-byte aligned. Signed-off-by: Jan-Simon Möller Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois --- arch/x86/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index eeda43a..852d8f0 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -108,7 +108,7 @@ else # this works around some issues with generating unwind tables in older gccs # newer gccs do it by default - KBUILD_CFLAGS += -maccumulate-outgoing-args + KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args) endif # Make sure compiler does not have buggy stack-protector support. @@ -144,6 +144,12 @@ endif sp-$(CONFIG_X86_32) := esp sp-$(CONFIG_X86_64) := rsp +# enforce no-sse for clang +ifneq ($(COMPILER),clang) + KBUILD_CFLAGS += $(call cc-option,-mno-sse) + KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=3) +endif + # do binutils support CFI? cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1) # is .cfi_signal_frame supported too?