Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5608134imu; Mon, 26 Nov 2018 02:56:58 -0800 (PST) X-Google-Smtp-Source: AJdET5f78x1+hd3HrZ2ne3x/itOudY2HNcagzQIQVkDBCnUbfSZHYBuM2W+a3cP5DFsaYVM9yxr5 X-Received: by 2002:a62:1447:: with SMTP id 68mr27052198pfu.257.1543229818210; Mon, 26 Nov 2018 02:56:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543229818; cv=none; d=google.com; s=arc-20160816; b=KUE/5pYcoEY4CQbGtMmg+wE+nRs4gOOIErh16D8CoauaS1KkaC8rmRB6pMLVrbXecH lWki1iwE0wbW2xTZhYh3lHpGDgziwShy07myB1+a+CQtP7PB+rZ2hxzI1mOXKbaw59II auJOefwgW9mz7Afff8BswJKOoHPlGnHd05/uUu7KFv2QeEIxvhLc2QsvsaJA4ed1cdC3 Ka2l55HUBvoOqh7PZQA7krpGBaTIS6Z0sBuaAhAH0pnh/b+8zEMHGt+AYCEQWNdsJEp/ yN9BEh5JYxgfaO8fwkwQH/Mc6ruxkM2PDH1MxfMBHWwo4r9F33zFtCfKUtIoMbmyBGCM 6Ccg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ft0Fvfl0v9DBJANdfk6MyxG56LLbRcArjwazfI50FxQ=; b=Aqz0Qejw3l9ePNrVQIKlMI4blwqzMQULraTwCETPaCTjvXUxKjB00M+53KQyV4MBFS K64wpIFbWbphPBGp6zHUZ12BFeiOrVRH+ONTMPj5Amp89FaomyPxNlfl5iCeaY8Ycdw2 sQqTkmvOC2AX9BWiEAYv5OmmQzthKR1t0F94L5VijIXtoZF2ggSLu+jmSrKn2vQeIwFi Lmw99a0qnbSDg/TsX4lWvXAJcmUBCqYAOmrJ3T55xg+nLDT6rdN6g+4cxWnZSfW08oGM yWz/HcpqEzUH9TdRJ8gyGqGEJ094cI/QVzGm3LblL9HMn+YLAwyNx9gQJZ2Y8d5hwMLn +yig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S2mWZXyV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si51381433pgn.325.2018.11.26.02.56.42; Mon, 26 Nov 2018 02:56:58 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S2mWZXyV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727975AbeKZVtJ (ORCPT + 99 others); Mon, 26 Nov 2018 16:49:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:57982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbeKZVtJ (ORCPT ); Mon, 26 Nov 2018 16:49:09 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5CF192089F; Mon, 26 Nov 2018 10:55:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229724; bh=VlzQdNDX0XuOBPnDpM4SI5xfFn5RC00AAbsrMEjB9FY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S2mWZXyVIuGXPtNF+z1MzpDEXn+xv3Vt1/fP43334GKwiVIUTt0UORvjbMn9NoN0d Pu0l9pGmksbH8fE/Tt0r03oyhXPjJxzR6PJ9Lvc8lETPDtM7aPDWGWcuS1Ge+ACEkU O9MnL298BxWwDfDjKNoB/PZ8dRNrikdZi9Ji5vMI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Charlebois , Behan Webster , =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= , Arnd Bergmann , Kees Cook , Masahiro Yamada , Nathan Chancellor Subject: [PATCH 4.4 12/70] kbuild, LLVMLinux: Add -Werror to cc-option to support clang Date: Mon, 26 Nov 2018 11:50:27 +0100 Message-Id: <20181126105048.064487973@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105046.722096341@linuxfoundation.org> References: <20181126105046.722096341@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mark Charlebois commit c3f0d0bc5b01ad90c45276952802455750444b4f upstream. 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. [arnd: it turns out we need the same patch for testing whether -ffunction-sections works right with gcc. I've build tested extensively with this patch applied, so let's just merge this one now.] Signed-off-by: Mark Charlebois Signed-off-by: Behan Webster Reviewed-by: Jan-Simon Möller Signed-off-by: Arnd Bergmann Acked-by: Kees Cook Signed-off-by: Masahiro Yamada [nc: Adjust context due to lack of d26e94149276f] Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- scripts/Kbuild.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -112,12 +112,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 @@ -127,7 +127,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-name # Expands to either gcc or clang