From patchwork Mon Aug 16 20:20:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12439261 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.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 97DDFC4338F for ; Mon, 16 Aug 2021 20:21:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79BB660EE4 for ; Mon, 16 Aug 2021 20:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231307AbhHPUVx (ORCPT ); Mon, 16 Aug 2021 16:21:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:53802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231203AbhHPUVx (ORCPT ); Mon, 16 Aug 2021 16:21:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3938960F22; Mon, 16 Aug 2021 20:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629145281; bh=ozav1COS+cnUYWjDVK9ITXmp/DIBcRtnXWwWHkf2Vyc=; h=From:To:Cc:Subject:Date:From; b=YvNzK5lmSESL+nuHXNiyL3EQSiME2AcEhkOpC8Dr406Tk+eL2ciRv7bJ3JL0w8Z2/ TcVZwUjcr9iKP4nlsBVrtHOeFOdD2VqZVzs26/32S/KAmpfQN1iZVSfCAqvCzatXc0 G/qNDTgLjV8yFKlYNe7lcWdnQY3wbufOMBT36T/Rg67B9pALEvNvIqMR1mlbGBYIV4 8mVbxEC8eMadD5PQEUl3ewg2bKzl+mZ0ky1krSrsd+qLaqdLaPzmgsnu2b8u7WKNIn CtXz4swad1BXCcpW/EW9bgJ3K4536l4xncEB1t7d37O4wOEkeLRqrMBSzShP27a41M CXQAHbpvLOS3Q== From: Nathan Chancellor To: Masahiro Yamada , Nick Desaulniers Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 1/3] kbuild: Remove -Wno-format-invalid-specifier from clang block Date: Mon, 16 Aug 2021 13:20:54 -0700 Message-Id: <20210816202056.4586-1-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc2 MIME-Version: 1.0 X-Patchwork-Bot: notify Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Turning on -Wformat does not reveal any instances of this warning across several different builds so remove this line to keep the number of disabled warnings as slim as possible. This has been disabled since commit 61163efae020 ("kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang"), which does not explain exactly why it was turned off but since it was so long ago in terms of both the kernel and LLVM so it is possible that some bug got fixed along the way. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers --- Makefile | 1 - 1 file changed, 1 deletion(-) base-commit: f12b034afeb3a977bbb1c6584dedc0f3dc666f14 diff --git a/Makefile b/Makefile index 891866af0787..3900f5824721 100644 --- a/Makefile +++ b/Makefile @@ -777,7 +777,6 @@ KBUILD_CFLAGS += $(stackp-flags-y) ifdef CONFIG_CC_IS_CLANG KBUILD_CPPFLAGS += -Qunused-arguments -KBUILD_CFLAGS += -Wno-format-invalid-specifier KBUILD_CFLAGS += -Wno-gnu # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the # source of a reference will be _MergedGlobals and not on of the whitelisted names. From patchwork Mon Aug 16 20:20:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12439263 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.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 3BFE6C4338F for ; Mon, 16 Aug 2021 20:21:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 225CC60F22 for ; Mon, 16 Aug 2021 20:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231877AbhHPUV5 (ORCPT ); Mon, 16 Aug 2021 16:21:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:53882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231203AbhHPUV4 (ORCPT ); Mon, 16 Aug 2021 16:21:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 91D4C60EE4; Mon, 16 Aug 2021 20:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629145284; bh=qGJV1Mh6XW8/olRerNEsJb0Qw8ULXjJ4v5IofuIlKRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KmgZBT6a4HERZoWyIfVQh+jv8irgAQxJ0ZYRAybbunCV30rLZjHhjhqm2HOhxZ6T0 bRYyR440M7Vs+zQz3gtZ0sbLuxJtSOic4pYXq/jrjZmrpMMAWQloAZAQ68N+z13b78 8TCW8sn08i4iTWjzJtBi6TJInEYBIDjp7Fi/LoAhjovP+Rt3AHxv5Nu3OV+xETcMI4 BsUJKt6DSSc/GrKyMk2mi7Ddw9IXNZOhWMU5rkWDfJgOS4LYLjjIwHoyO+klbC5G4N kyiWd2PuX7nbkle9B1zR0Q7mp0ROYl1sbZyxUS6ZhgCqoJuR7Rl+y3b4kDX+e/5FWw u3Dlj0u7gMq/A== From: Nathan Chancellor To: Masahiro Yamada , Nick Desaulniers Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 2/3] kbuild: Add a comment above -Wno-gnu Date: Mon, 16 Aug 2021 13:20:55 -0700 Message-Id: <20210816202056.4586-2-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc2 In-Reply-To: <20210816202056.4586-1-nathan@kernel.org> References: <20210816202056.4586-1-nathan@kernel.org> MIME-Version: 1.0 X-Patchwork-Bot: notify Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Whenever a warning is disabled, it is helpful for future travelers to understand why the warning is disabled and why it is acceptable to do so. Add a comment for -Wno-gnu so that people understand why it is disabled. Signed-off-by: Nathan Chancellor --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 3900f5824721..07b76274396e 100644 --- a/Makefile +++ b/Makefile @@ -777,6 +777,7 @@ KBUILD_CFLAGS += $(stackp-flags-y) ifdef CONFIG_CC_IS_CLANG KBUILD_CPPFLAGS += -Qunused-arguments +# The kernel builds with '-std=gnu89' so use of GNU extensions is acceptable. KBUILD_CFLAGS += -Wno-gnu # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the # source of a reference will be _MergedGlobals and not on of the whitelisted names. From patchwork Mon Aug 16 20:20:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12439265 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.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 542EDC4338F for ; Mon, 16 Aug 2021 20:21:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CA3660F5C for ; Mon, 16 Aug 2021 20:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231203AbhHPUWA (ORCPT ); Mon, 16 Aug 2021 16:22:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:53926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbhHPUV7 (ORCPT ); Mon, 16 Aug 2021 16:21:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0C33A60F35; Mon, 16 Aug 2021 20:21:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629145287; bh=DZeJgaBVOuro+yCALFSGg+G7kUBtualFHpqyFlfXJlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNpRW+iMog1tMCCH//whIBeMwOu/Iqw0xTxSH0sK2cO0OEgEHaFwN/PpX8zo1PLvU RSVn+m+lUanW4g7B25rxiHtWT40GNc2DJay6+UOvR/h+Wtvp7fvEaPhlBbMsV1rrMn hB26Xt7S1CSayjlK51WJUHsjOO3sT/A+Lswwn4NBcKZGf7qOR4eVLj8mZOlsGbwU/J kynDYbKI1eJyyNxNx57wqp3vqb3L1QrYcbIOFWYCcWApsh1H/meKhQ7ZSB4d2mWEkE KxDkiXKRg8cyBFS6auM+nHYOffHpH+3ZbTkrRJx7qj/v0SUI06yKy5YTzyqTojQwYI 9juZoAMIUvxnQ== From: Nathan Chancellor To: Masahiro Yamada , Nick Desaulniers Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 3/3] kbuild: Shuffle blank line to improve comment meaning Date: Mon, 16 Aug 2021 13:20:56 -0700 Message-Id: <20210816202056.4586-3-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.rc2 In-Reply-To: <20210816202056.4586-1-nathan@kernel.org> References: <20210816202056.4586-1-nathan@kernel.org> MIME-Version: 1.0 X-Patchwork-Bot: notify Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org -Wunused-but-set-variable and -Wunused-const-variable are both disabled for the same reason but there is a blank line between them and no blank line between -Wno-unused-const-variable and the block. Shuffle the new line so that it is clear that the comment applied to both flags and the next block is separate from them. Signed-off-by: Nathan Chancellor --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 07b76274396e..7d5007cdfa5c 100644 --- a/Makefile +++ b/Makefile @@ -794,8 +794,8 @@ endif # These warnings generated too much noise in a regular build. # Use make W=1 to enable them (see scripts/Makefile.extrawarn) KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) - KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) + ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls else