From patchwork Mon Jul 12 06:08:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 476337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4B5EC07E9E for ; Mon, 12 Jul 2021 06:22:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C11CE6117A for ; Mon, 12 Jul 2021 06:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235385AbhGLGZA (ORCPT ); Mon, 12 Jul 2021 02:25:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:39904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234646AbhGLGX0 (ORCPT ); Mon, 12 Jul 2021 02:23:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B8C161152; Mon, 12 Jul 2021 06:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626070804; bh=39LKZJUB+Tgb98s9dzK/Pe8GjXLJrSAZhffOSDlpeuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lGc/tPp87+AF12WYfmN43U0BJWrFc/yWQWsZ+IjxXTC+lfX/9MlpE7rjW3GEzn/u3 gD83exV7kp4xnUz+mgZt+fpQ2el6PmgFsk4CGgu72lg6pah+NdXJpmZC+g9g2ZA5xU jt2XzcDeIw+u8NI0Svw00w08cI/ytHgpGlFP16FA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luc Van Oostenryck , Masahiro Yamada , Sasha Levin Subject: [PATCH 5.4 146/348] kbuild: run the checker after the compiler Date: Mon, 12 Jul 2021 08:08:50 +0200 Message-Id: <20210712060720.455882445@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060659.886176320@linuxfoundation.org> References: <20210712060659.886176320@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Luc Van Oostenryck [ Upstream commit 0c33f125732d0d33392ba6774d85469d565d3496 ] Since the pre-git time the checker is run first, before the compiler. But if the source file contains some syntax error, the warnings from the compiler are more useful than those from sparse (and other checker most probably too). So move the 'check' command to run after the compiler. Signed-off-by: Luc Van Oostenryck Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/Makefile.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 9c689d011bce..03df22412f86 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -240,9 +240,9 @@ undefined_syms = $(NM) $< | $(AWK) '$$1 == "U" { printf("%s%s", x++ ? " " : "", endif define rule_cc_o_c - $(call cmd,checksrc) $(call cmd_and_fixdep,cc_o_c) $(call cmd,gen_ksymdeps) + $(call cmd,checksrc) $(call cmd,checkdoc) $(call cmd,objtool) $(call cmd,modversions_c) @@ -258,8 +258,8 @@ endef # Built-in and composite module parts $(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE - $(call cmd,force_checksrc) $(call if_changed_rule,cc_o_c) + $(call cmd,force_checksrc) cmd_mod = { \ echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \