From patchwork Wed Feb 26 01:08:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 25334 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D3C9720143 for ; Wed, 26 Feb 2014 01:09:55 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id gq1sf292080obb.11 for ; Tue, 25 Feb 2014 17:09:55 -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=PwjiokaN36huIsE2NTMXTu9EY4N1C9LntqFkLzUtpHM=; b=gObor6c0Rd59SvffB92unecK/EXp88ngnECqGCGYH2SfLU++H+xXeyIvAOXsRld8jm N4TZ09HW8jzXJy6zC0ylU2CDlvjutY+frT8G9qv4NQZtW6qSjvW+Ll7BWE8Qj1GnAUQG wp+3/oWKpxi1j4riNaEFnSHjTF8I/y4jR4LNUgPgglH7+tuGWMCb614PgjaMa7hrsuvC yUGDj1UmRPPgokFNwY+9MBt5nD5Uf9GZdz5UU+T9D1HBahipa/hFBcPgDZhiZS0Smbu0 ID5+Qz9espXZxS57+eR59yuCE0eRjvhLKIy/TAX40tEOSGfq1U/E6dtEbv6WpHauhSLi xaVQ== X-Gm-Message-State: ALoCoQkv+4B1b/nDw1ONpi3MpeP+rwPIsGWaXc5PNdJb1DZAwObyMXK/m7w8gXuyNEd8dBcZ1Sui X-Received: by 10.182.116.39 with SMTP id jt7mr109156obb.33.1393376995119; Tue, 25 Feb 2014 17:09:55 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.46.98 with SMTP id j89ls23213qga.73.gmail; Tue, 25 Feb 2014 17:09:55 -0800 (PST) X-Received: by 10.220.250.203 with SMTP id mp11mr3544838vcb.2.1393376994976; Tue, 25 Feb 2014 17:09:54 -0800 (PST) Received: from mail-vc0-x22b.google.com (mail-vc0-x22b.google.com [2607:f8b0:400c:c03::22b]) by mx.google.com with ESMTPS id sl9si7293201veb.21.2014.02.25.17.09.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:09:54 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::22b 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:c03::22b; Received: by mail-vc0-f171.google.com with SMTP id le5so222192vcb.30 for ; Tue, 25 Feb 2014 17:09:54 -0800 (PST) X-Received: by 10.52.247.231 with SMTP id yh7mr2919047vdc.34.1393376994849; Tue, 25 Feb 2014 17:09:54 -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 u4csp179549vcz; Tue, 25 Feb 2014 17:09:54 -0800 (PST) X-Received: by 10.68.34.6 with SMTP id v6mr3036263pbi.61.1393376994011; Tue, 25 Feb 2014 17:09:54 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si20225240pab.145.2014.02.25.17.09.53; Tue, 25 Feb 2014 17:09:53 -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 S1752083AbaBZBJm (ORCPT + 26 others); Tue, 25 Feb 2014 20:09:42 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:48143 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbaBZBJa (ORCPT ); Tue, 25 Feb 2014 20:09:30 -0500 Received: by mail-pd0-f173.google.com with SMTP id z10so216077pdj.4 for ; Tue, 25 Feb 2014 17:09:30 -0800 (PST) X-Received: by 10.68.234.230 with SMTP id uh6mr2965373pbc.161.1393376970260; Tue, 25 Feb 2014 17:09:30 -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.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:09:29 -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 2/5] kbuild: LLVMLinux: Adapt warnings for compilation with clang Date: Tue, 25 Feb 2014 17:08:40 -0800 Message-Id: <1393376923-21892-3-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:c03::22b 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 When compiling kernel with clang, disable warnings which are too noisy, and add the clang flag catch-undefined-behavior. Signed-off-by: Jan-Simon Möller Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Cc: PaX Team --- scripts/Makefile.build | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d5d859c..27c4098 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -65,12 +65,23 @@ warning- := $(empty) warning-1 := -Wextra -Wunused -Wno-unused-parameter warning-1 += -Wmissing-declarations warning-1 += -Wmissing-format-attribute -warning-1 += -Wmissing-prototypes +warning-1 += $(call cc-option, -Wmissing-prototypes) warning-1 += -Wold-style-definition warning-1 += $(call cc-option, -Wmissing-include-dirs) warning-1 += $(call cc-option, -Wunused-but-set-variable) warning-1 += $(call cc-disable-warning, missing-field-initializers) +# Clang +warning-1 += $(call cc-disable-warning, initializer-overrides) +warning-1 += $(call cc-disable-warning, unused-value) +warning-1 += $(call cc-disable-warning, format) +warning-1 += $(call cc-disable-warning, unknown-warning-option) +warning-1 += $(call cc-disable-warning, self-assign) +warning-1 += $(call cc-disable-warning, sign-compare) +warning-1 += $(call cc-disable-warning, format-zero-length) +warning-1 += $(call cc-disable-warning, uninitialized) +warning-1 += $(call cc-option, -fcatch-undefined-behavior) + warning-2 := -Waggregate-return warning-2 += -Wcast-align warning-2 += -Wdisabled-optimization