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: 3719931 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 BE8FCBF40C for ; Wed, 26 Feb 2014 01:09:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3263201FB for ; Wed, 26 Feb 2014 01:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E44052020E for ; Wed, 26 Feb 2014 01:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751914AbaBZBJg (ORCPT ); Tue, 25 Feb 2014 20:09:36 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33020 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751918AbaBZBJa (ORCPT ); Tue, 25 Feb 2014 20:09:30 -0500 Received: by mail-pa0-f47.google.com with SMTP id kp14so219045pab.20 for ; Tue, 25 Feb 2014 17:09:30 -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=SM2YCkNWdqm6K7n7rf4oh1jeWstB68PU17/gxWhJnM0=; b=dOCkAG4YySAXTEib4GB9MFzh1v3zNHsTqNlyf97ANTxMdKfHJW0sPw9nMsQq4riEqS kMFwoWSgATtXfH6VG9CsSlqnXLgP0COF/EI+HjXfUlhyb0ePL5cCe2U2XajyZDYdvTO3 QqWmrm9hgZhLTfoXb/06Ec0VgjGz6JtC9BQIU= 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=SM2YCkNWdqm6K7n7rf4oh1jeWstB68PU17/gxWhJnM0=; b=ahECzXy6JEsYDWTPT+zZz8RRXfuAUbpBZp6TNL+KqtLw2srwXBUgQ7ydzpQUIgcY5Y 4B7R/ZUFDctokiEw53wfraaUCSAXjjrVXkCbw+gMloBPleMf+UcSALUZ0+a6pNi6NSh+ 9Fh0GAuP2swSctyRounFELREC+3y6aOq/8nQ4P9B+U+kw3xevJXrBaDUd57N9SInzinW EaQ1jtkTM2p/pfq4nNHL1blDzZPQQnr7d9W18fhO+nLyQRQCscKm7IUrm4giTPwX9G4+ 86Rb5G/OUQLQ90/m4//AVWjAfc+60qtm4cCPnJvtmrZ2BHuSCKG9HsLfuTFfvUi2l+37 YU3g== X-Gm-Message-State: ALoCoQnwkLAEo+5QPZwp7cvCmVwj5exyCiDxaJyAPG/g0iIGgm3klHODCShMyYCYiGO0b/n0TJcV 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-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=unavailable 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 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