Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3677769pxb; Mon, 24 Jan 2022 15:07:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyw0HYiVP3t6bGM+lMYef5pZ0VBie0ioR8r6kY16xP/gwdCmkJ9bkPSLJN62U+WBPhgp2hf X-Received: by 2002:a05:6a00:16d3:b0:4ba:4aee:2e34 with SMTP id l19-20020a056a0016d300b004ba4aee2e34mr15526760pfc.82.1643065661606; Mon, 24 Jan 2022 15:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643065661; cv=none; d=google.com; s=arc-20160816; b=qug9mtyWXtTS1628tSlL47qKL6+MkFh9uX6tmffpk9dz3Wz6hu6gP7W0PBJBB0Ooxa RBmuHFyeNtSU132ID/v+b1iuT+rkN7bbgXVeB8ugIOoq2TMKtxaHSfOpYP9n+BLMKcNs vxjze1D/rcieV+Nc8as+t+XNwbamii1dW2SDGA95ZtSar6TqfjUm3EnPxVPbFL1dVXPw Gq9slsDWUbGwqgVeU5b1u35+ajjWRWIOmSZkvVwvtOQfbKsgZ+5F6yFhIQRF0GUVWeOn DNRm9idGgcU35aiuG9hlNrmLp5aRZZPJOJyPdPqpd43dRuh2Fy6uHpo2Q5Aq9omA6CvN iIEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1LJGjDTYMuLmHfQpWatQs3kMJ9qbd2ha/UHX5cFngus=; b=UOqgDky3OdzA6+1tk/PJPwaJgBpt8AOraUpIweB3sIGQfchRtrQ4yCzsX0u4zgXxe7 6ftzML/AYJDWOg3b17oopexOOYFT9CP2rNkXxQWD88Qq+OD0rp3I/6MT0X/YJU+KbqSa /zbpGHCKU1bJy0gyQzpzq8RuQiNRSdW84hnZ2GFFPswTgjUhLmgPg+nC/oxljiETM4+K 7ko/byOvepx62jlL1+D//2u4E8nVOOezhorewCp1ASygS1Edeyt91GgI7dp5nBzHgeTX 5jbo5qmRWjHsPPV/wqUtqFx4BuWDRDaCCUVrdAJ3lcxoMAls8Oavgak0UhYyxGNGcur4 LnFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=mvCHYThb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si5605293plj.159.2022.01.24.15.07.29; Mon, 24 Jan 2022 15:07:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=mvCHYThb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1843213AbiAXXDd (ORCPT + 99 others); Mon, 24 Jan 2022 18:03:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1577991AbiAXWBY (ORCPT ); Mon, 24 Jan 2022 17:01:24 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BA62C024161 for ; Mon, 24 Jan 2022 12:41:12 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id bu18so52459020lfb.5 for ; Mon, 24 Jan 2022 12:41:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1LJGjDTYMuLmHfQpWatQs3kMJ9qbd2ha/UHX5cFngus=; b=mvCHYThbHbgCT4TsM9CfI+ZrMCLe2++pHQhdwPeI8vb/8sEb8D65Iom2uXnznuVmVS +nGb5Ow23gtXLzerVRkV3f3Uw+Z6842cwIsDw+5dB7yqFKE3AjaTZwN1OxOvhrrjaDh2 75UtaMM4hS2p9EATTlFqNg0mtAUeJig69pu4EtGEQtcCKDwuG+KfNOM4L3+EXZwrdQ7j TaqH65KfdgS3yLgVjAMhReY9jxu4RJWojw24J+Cl2+1KPAHeQ2TmTq2dOeVhSHk7T0DQ ikZdyLW3rbZhcNdw2hBGpnM2eaid1iX33aaQTP+GjCBH5HwNygxtlrFmGpLuLQXIMqWG Hmkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1LJGjDTYMuLmHfQpWatQs3kMJ9qbd2ha/UHX5cFngus=; b=fx4HLbL6ydRyCzLrYbtsGCaP+G93MjaDGGJA+JjIoJjbrZZr9vbMr9jBzWOEYIC8oi 7J5YMCdmU8G4Ngge5Di24g+4zWR121fT762AhPBYJodyZ+ElCJ42/Pngze5eVkwtuC47 N7Nh36uWapIKs+mGdF3BY6nQ1GqqNcRqiLAp/5iOGedd4LjvHeZm32wjgeT+t9v36R/5 75qbkUrrBxSXQUdCln9juHXQaD6lAcxtvpVp2xjtybKandAfHGeVw5PtBuHgcjbCSvYw 9x5sF0gXk4gQpaSRqMFh3Wf0VZdjJGcZAuBc8AzQNUDP+9vu5z3vDhy/FYqMilZjFBXF rmSA== X-Gm-Message-State: AOAM532JfA3Ww0u2u1nFxSCMRTvXNR/xLgwh875AQFxRQ324aZPLXOhg /rNFKUe/AJZA1jbBFiMZT2Ea9DvcHXQDvAfc34uViE9IDc+noQ== X-Received: by 2002:a05:6512:b0d:: with SMTP id w13mr14398285lfu.240.1643056870722; Mon, 24 Jan 2022 12:41:10 -0800 (PST) MIME-Version: 1.0 References: <20220120214001.1879469-1-nathan@kernel.org> <20220120214001.1879469-2-nathan@kernel.org> In-Reply-To: <20220120214001.1879469-2-nathan@kernel.org> From: Nick Desaulniers Date: Mon, 24 Jan 2022 12:40:58 -0800 Message-ID: Subject: Re: [PATCH 2/2] MIPS: Loongson64: Wrap -mno-branch-likely with cc-option To: Nathan Chancellor , Masahiro Yamada Cc: Huacai Chen , Jiaxun Yang , Thomas Bogendoerfer , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 20, 2022 at 1:40 PM Nathan Chancellor wrote: > > This flag is not supported by clang, which results in a warning: > > clang-14: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument] > > This breaks cc-option, which adds -Werror to make this warning fatal and > catch flags that are not supported. Wrap the flag in cc-option so that > it does not cause cc-option to fail, which can cause randconfigs to be > really noisy. > > Signed-off-by: Nathan Chancellor We should convert more of these tests to Kconfig checks that run once per configuration, rather than multiple times for a build. IIRC Linus mentioned this somewhere...yeah, the -Wimplicit-fallthrough patches. See dee2b702bcf06 ("kconfig: Add support for -Wimplicit-fallthrough") I wonder if we can check ARCH or SUBARCH in Kconfig to limit invoking the tool under test for certain arch specific command line flags? I'll take this patch over such a larger change, but I think towards the goal of speeding up already configured builds, we eventually want to be migrating cc-option and ld-option checks to Kconfig. Reviewed-by: Nick Desaulniers > --- > arch/mips/loongson64/Platform | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/loongson64/Platform b/arch/mips/loongson64/Platform > index 981d3abc150e..acf9edc9b15d 100644 > --- a/arch/mips/loongson64/Platform > +++ b/arch/mips/loongson64/Platform > @@ -26,5 +26,6 @@ cflags-y += $(call cc-option,-mno-loongson-mmi) > # Loongson Machines' Support > # > > -cflags-$(CONFIG_MACH_LOONGSON64) += -I$(srctree)/arch/mips/include/asm/mach-loongson64 -mno-branch-likely > +cflags-$(CONFIG_MACH_LOONGSON64) += -I$(srctree)/arch/mips/include/asm/mach-loongson64 > +cflags-$(CONFIG_MACH_LOONGSON64) += $(call cc-option,-mno-branch-likely) > load-$(CONFIG_CPU_LOONGSON64) += 0xffffffff80200000 > -- > 2.34.1 > > -- Thanks, ~Nick Desaulniers