From patchwork Tue Aug 24 02:26:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12453823 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=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 C24EEC4338F for ; Tue, 24 Aug 2021 02:27:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2F4F613E6 for ; Tue, 24 Aug 2021 02:27:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230499AbhHXC2S (ORCPT ); Mon, 23 Aug 2021 22:28:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:36882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233170AbhHXC2S (ORCPT ); Mon, 23 Aug 2021 22:28:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8100F61373; Tue, 24 Aug 2021 02:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629772044; bh=FhBLzlnoS/C4efg4LBoQL/1xcceeOT2Nci0FeHlY0KY=; h=From:To:Cc:Subject:Date:From; b=kkx5au/F1QQInf2xhWZfLqu3vw4zyEnICeKZB/AZM6RhF4MYKRsy/1tsWA25Hs235 wDUlQNbjpTcPfBnmEmMtYmOrz5rkfzROaQwL+XNFaPXnOh18dAXLyqX7gszOiDzeNm y5wVVPwlaCiNC9eandJcAAPDudr5w3BqckTatwkEeUtPzP0/k4DZ+sSbSXFURryKZH gB6py4/lbjNLM+VaMvNpUSoOKc8HI4oinSPij+ZalbAsEZPasrZVWBzI5+x8yP1wzr ZU5WlAeYcIzNK6mOiCCjv0NckXk+6XyMe1j7WQYQu6TtJLa0aBdomF8DlUyyJ9bj75 b4Z37ZCFccKyg== From: Nathan Chancellor To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Masahiro Yamada Cc: "H. Peter Anvin" , Nick Desaulniers , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH 0/2] Harden clang against unknown flag options Date: Mon, 23 Aug 2021 19:26:38 -0700 Message-Id: <20210824022640.2170859-1-nathan@kernel.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Hi all, This series cleans up an issue that was noticed by the kernel test robot where flags that clang does not implement support for are unconditionally added to the command line, which causes all subsequent calls to cc-{disable-warning,option} to fail, meaning developers are flooded with unnecessary and pointless warnings. I hope the patches in and of themselves are reasonable and non-controversial. This is based on Masahiro's kbuild tree as there was a fairly large refactor around where clang's flags were added so I figured it would be best to go there with an x86 ack since the first patch does not depend on anything in -tip. Cheers, Nathan Nathan Chancellor (2): x86: Do not add -falign flags unconditionally for clang kbuild: Add -Werror=ignored-optimization-argument to CLANG_FLAGS arch/x86/Makefile_32.cpu | 12 +++++++++--- scripts/Makefile.clang | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) base-commit: fb3fdea450305d932d933d7e75eead0477249d8e