From patchwork Tue Sep 23 19:28:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 37752 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 50E0820970 for ; Tue, 23 Sep 2014 19:29:10 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id hi2sf2867814wib.10 for ; Tue, 23 Sep 2014 12:29:09 -0700 (PDT) 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 :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=X40Zp9V+VVRd/MJkQ9sQLEG3e8v/WffsbjZYOu/ODr8=; b=eBsY7SzrfBMPtXR/k6a2KJf5QDqB75R6kJcxMGyKth4d8Acf3bB8Lry+DEPDlhTsyl bG6KTDX2GO4xSMXnw33AtOiF5xK/q3wUzlip1MehQvjWOIQPKlp5nb6lm4nzENbs6Wye 00CYnZKpH/j5k/rhNihCQtYMRCGpv60T5qzc7CTI5ZQkFrhyoMODemzuTGhwmXEXbF39 oG2Kdf88Jks/Mp7y/Yt4nfN+ER3UOwXMHyCnhMucSxJdrbus9v+1Rx8XHAqK70KF11dn qvuntHFFcwd4X9WzkQhkhl7RVAXx2aT0BwJZpei5zgrek/PWRM625wZinbMJInm9A6lf Oo+A== X-Gm-Message-State: ALoCoQlQGWwfxdx1HXarryrZ2FtQ6DebTjaLNMohCFrl2mN0qJoCTFa4d8n+ZMd09axS90IdC4gQ X-Received: by 10.112.182.8 with SMTP id ea8mr238294lbc.11.1411500549113; Tue, 23 Sep 2014 12:29:09 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.133 with SMTP id q5ls87960laj.80.gmail; Tue, 23 Sep 2014 12:29:08 -0700 (PDT) X-Received: by 10.112.146.103 with SMTP id tb7mr1742048lbb.26.1411500548941; Tue, 23 Sep 2014 12:29:08 -0700 (PDT) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com [2a00:1450:4010:c04::22d]) by mx.google.com with ESMTPS id dc3si11656644lac.13.2014.09.23.12.29.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Sep 2014 12:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22d as permitted sender) client-ip=2a00:1450:4010:c04::22d; Received: by mail-lb0-f173.google.com with SMTP id 10so7661431lbg.32 for ; Tue, 23 Sep 2014 12:29:08 -0700 (PDT) X-Received: by 10.112.4.33 with SMTP id h1mr1446521lbh.67.1411500547992; Tue, 23 Sep 2014 12:29:07 -0700 (PDT) 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.112.130.169 with SMTP id of9csp472328lbb; Tue, 23 Sep 2014 12:29:07 -0700 (PDT) X-Received: by 10.70.37.7 with SMTP id u7mr2549210pdj.155.1411500546384; Tue, 23 Sep 2014 12:29:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rh5si21438063pbc.189.2014.09.23.12.29.05 for ; Tue, 23 Sep 2014 12:29:06 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756205AbaIWT3B (ORCPT + 27 others); Tue, 23 Sep 2014 15:29:01 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33205 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbaIWT3A (ORCPT ); Tue, 23 Sep 2014 15:29:00 -0400 Received: by mail-pa0-f41.google.com with SMTP id ey11so7966598pad.28 for ; Tue, 23 Sep 2014 12:28:59 -0700 (PDT) X-Received: by 10.68.57.131 with SMTP id i3mr2213806pbq.103.1411500539527; Tue, 23 Sep 2014 12:28:59 -0700 (PDT) Received: from galdor.websterwood.com (S0106dc9fdb80cffd.gv.shawcable.net. [96.50.97.138]) by mx.google.com with ESMTPSA id cz1sm12780515pdb.85.2014.09.23.12.28.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Sep 2014 12:28:58 -0700 (PDT) From: behanw@converseincode.com To: ak@linux.intel.com, mmarek@suse.cz, yamada.m@jp.panasonic.com Cc: hpa@linux.intel.com, linux-kernel@vger.kernel.org, sam@ravnborg.org, Mark Charlebois , Behan Webster Subject: [PATCH] kbuild, LLVMLinux: Add -Werror to cc-option to support clang Date: Tue, 23 Sep 2014 12:28:42 -0700 Message-Id: <1411500522-11480-1-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.9.1 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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22d as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ 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: Mark Charlebois Clang will warn about unknown warnings but will not return false unless -Werror is set. GCC will return false if an unknown warning is passed. Adding -Werror make both compiler behave the same. Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster Reviewed-by: Jan-Simon Möller --- scripts/Kbuild.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 8a9a4e1..e37ca5c 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -111,12 +111,12 @@ as-instr = $(call try-run,\ # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) cc-option = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) # cc-option-yn # Usage: flag := $(call cc-option-yn,-march=winchip-c6) cc-option-yn = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) # cc-option-align # Prefix align with either -falign or -malign @@ -126,7 +126,7 @@ cc-option-align = $(subst -functions=0,,\ # cc-disable-warning # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) cc-disable-warning = $(call try-run,\ - $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) + $(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) # cc-version # Usage gcc-ver := $(call cc-version)