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: 3720001 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1BDAFBF13A for ; Wed, 26 Feb 2014 01:10:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26F4B200BE for ; Wed, 26 Feb 2014 01:10:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B426201FB for ; Wed, 26 Feb 2014 01:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751255AbaBZBKX (ORCPT ); Tue, 25 Feb 2014 20:10:23 -0500 Received: from mail-pd0-f174.google.com ([209.85.192.174]:44286 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752041AbaBZBJl (ORCPT ); Tue, 25 Feb 2014 20:09:41 -0500 Received: by mail-pd0-f174.google.com with SMTP id y13so213549pdi.5 for ; Tue, 25 Feb 2014 17:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=converseincode.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=nd9qDkRGOgGT7q4gGA6Bj1MkTFpopUTMgjhToTLjyRw=; b=bzEPD8SjAKvlnyFmcfYke9yR4PHvO/Gc84qyLr7RfHM+PNww8puf5rTd5/exuGCM1V aT3txyXVHFUVnxK/aFSYzxBczqkvJBahMcJy8AmOYgT3cP7JZK8XUMjODmk8p2Ow4SX5 D3+6Xeruy8JGKhBnOC//p25Ku/5o7+GMtxBYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=nd9qDkRGOgGT7q4gGA6Bj1MkTFpopUTMgjhToTLjyRw=; b=WY145J32UObr1NO0mbOoLC8L+wRYQxduL/lJeBuW8CVX6qUapNqKo65Tun4kD8U/rn 83lRGV6kxe6XrVPUe691ibkyRF5E/TB+UGGbteT5/F04DgxHqb7byaCxdTYg3rI35n4G Mc79sgBWgbj6HLMb+f4AyWCZTiohe2lNLQY5/PnDYPhcV98eexV8vsUaGJW4HFlwjnm7 wWz1alP9Q7fMRzpP19Jr/QASRBXEMOLzg1QZtc9s0WUzsQTyL6MnfKM3wISfiev8XiUN P9AMeddJNjTR+QxsxT6vM3fjkgjGYDiwfRjNW4vzT1nmZOV2wXKxKc43ZCy0PB5DbvOs ixSQ== X-Gm-Message-State: ALoCoQkmFNQKPdrCQMOVDYXDmib6jB77opOlsDxvbiAgSsanxmyHyPLam4zOcRwyJCf6ryzvDH7S 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-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, KHOP_BIG_TO_CC,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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?