Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp986680pxb; Fri, 15 Apr 2022 17:29:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbRnBzIVV9cbhOz48HVcD3j094OeD03hf1IH4ShfBXJsGYV4VC1mRXD6JdfTKIs7MbDgjU X-Received: by 2002:a17:902:bf06:b0:156:af5b:e6c with SMTP id bi6-20020a170902bf0600b00156af5b0e6cmr1457365plb.147.1650068955969; Fri, 15 Apr 2022 17:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068955; cv=none; d=google.com; s=arc-20160816; b=LcxcmiiTx1tJYoeIx7ck2YIioJD5eeBnFM7zXSgoDDAL/PuiGz1f4XwtZfTaIO72sx BUPLBs2dBy/uCFA3cUOtpiRo5VeZTpASSJB8gFrEsM6KOETcJ8x6FdTdGSw1MHz90pPi qN5SakZcQE0uo+fISTxv3X/tmLNAoeP2w0dylI8/RUsV10jVRedpRIZDfWmT+E59DQ/l qoz8EFnHC/Lkq3+y/JMNCT/scdvY1Xg22Ba8LxVzCJ56+VND4gdinANI/z9W0zQjy62W CvKgjnD5LpPmVQfMhZ2fFoo1sWT78y2qsPBLvqr08RWJL5lAd3lUlE1BrMyhUS74cX74 WM2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=pZAJtygSVmbKTNXuD7l5zcPaOSLqBFoMTTpuCRaKmGM=; b=GsNIeuGZZx8+cxtuUASTpXikwfRQC00bGUgLWKlrv97cDkOyf+Ckx4cPEi+1CmRA0f 2iPUzvc9LxHPWVSUOJdRPkJXlBAZLmRXHVrVc+hrdafFSzMtGn58IZGuil5Dk1dRsKyD 7TXbfp1MQo0f20lCqCIqzdI0n9x5GRRCo7gKYHhfl/UQrRV7qYRpevzd21enpsQwSbs4 dOhSLQjqIz2PFrTDFB2aUgR0JZ8FauSngxShiWKbYoPxTccDa1fAhhHZbMGN2EvBXU9a 6o1dtwYX6PhReFToztgjB019G99kPCj/omFrPaJRadoolYX4CbuyJomCAH3rSLD7YNlk JBjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=immBGPKV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id lx4-20020a17090b4b0400b001caa6143ea5si6480107pjb.10.2022.04.15.17.29.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=immBGPKV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DB441FD11; Fri, 15 Apr 2022 17:26:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237075AbiDNPss (ORCPT + 99 others); Thu, 14 Apr 2022 11:48:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344633AbiDNPjU (ORCPT ); Thu, 14 Apr 2022 11:39:20 -0400 Received: from conssluserg-01.nifty.com (conssluserg-01.nifty.com [210.131.2.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EBA0433B2; Thu, 14 Apr 2022 08:16:51 -0700 (PDT) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 23EFGbYq018720; Fri, 15 Apr 2022 00:16:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 23EFGbYq018720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1649949398; bh=pZAJtygSVmbKTNXuD7l5zcPaOSLqBFoMTTpuCRaKmGM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=immBGPKVEDIH9IfeoELrfMaGJ3K2KY9zHUDGtuJs406kRjHFl0yLRrEQALD4u1vAg rahtDxTVGxwcn9rU7/3d/Fv9vSCMx3C4iYz2Hhx0hMcc6Xydc7bsoHcKw3KG6ggH4S HDUJ62jqUwq0gIFISRWTxIRzRqgT/SxkQLTAammL+5+w4Tjdsf8oCnosTMI5nfEtjN EuZmz9+u9cbq+ltHoqY/NskG+uRKCXMOlA1gcnAwv6lWUHrYnogFwz6eMFYdD9Agx5 uig6mtJ5/5r3Xqo/7nrYmEY5BXF26dDqRHuMR8ylKSYLtSsgG5fR55GRuDwCJS8SWe MejJ3DVPaSTpg== X-Nifty-SrcIP: [209.85.216.48] Received: by mail-pj1-f48.google.com with SMTP id ll10so5408404pjb.5; Thu, 14 Apr 2022 08:16:37 -0700 (PDT) X-Gm-Message-State: AOAM531Hf6iTmruMkHe3sLeF0FuZejsTeagOz+mDSr+334hfRukJomzb RKsc4YLeq13C/GmTrR0LxA4kLZJ/5wL3X8HDM2k= X-Received: by 2002:a17:902:7083:b0:158:41f2:3a83 with SMTP id z3-20020a170902708300b0015841f23a83mr25282827plk.99.1649949396808; Thu, 14 Apr 2022 08:16:36 -0700 (PDT) MIME-Version: 1.0 References: <1422803720-14723-1-git-send-email-ydroneaud@opteya.com> <20220408084607.106468-1-ydroneaud@opteya.com> <81585705-6ed8-12e5-1355-332a6a5d2b17@infradead.org> In-Reply-To: From: Masahiro Yamada Date: Fri, 15 Apr 2022 00:15:40 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv1] kbuild: support W=e to make build abort in case of warning To: Nicolas Schier Cc: Randy Dunlap , Nick Desaulniers , Yann Droneaud , Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 14, 2022 at 10:19 PM Nicolas Schier wrote: > > P=C3=A5 l=C3=B8. 09. april 2022 kl. 10.47 +0000 skrev Masahiro Yamada: > > On Sat, Apr 9, 2022 at 5:36 AM Randy Dunlap Wro= te: > > > > > > > > > > > > On 4/8/22 13:29, Nick Desaulniers wrote: > > > > On Fri, Apr 8, 2022 at 4:06 AM Masahiro Yamada wrote: > > > >> > > > >> On Fri, Apr 8, 2022 at 5:46 PM Yann Droneaud wrote: > > > >>> > > > >>> When developing new code/feature, CONFIG_WERROR is most > > > >>> often turned off, especially for people using make W=3D12 to > > > >>> get more warnings. > > > >>> > > > >>> In such case, turning on -Werror temporarily would require > > > >>> switching on CONFIG_WERROR in the configuration, building, > > > >>> then switching off CONFIG_WERROR. > > > >>> > > > >>> For this use case, this patch introduces a new 'e' modifier > > > >>> to W=3D as a short hand for KCFLAGS+=3D-Werror" so that -Werror > > > >>> got added to the kernel (built-in) and modules' CFLAGS. > > > >>> > > > >>> Signed-off-by: Yann Droneaud > > > >>> --- > > > >>> Makefile | 1 + > > > >>> scripts/Makefile.extrawarn | 13 +++++++++++-- > > > >>> 2 files changed, 12 insertions(+), 2 deletions(-) > > > >>> > > > >>> Changes since v0[0]: > > > >>> > > > >>> - rebase on top of commit 64a91907c896 ("kbuild: refactor script= s/Makefile.extrawarn") > > > >>> - document use case after commit 3fe617ccafd6 ("Enable '-Werror'= by default for all kernel builds") > > > >>> > > > >>> [0] https://lore.kernel.org/all/1422803720-14723-1-git-send-email= -ydroneaud@opteya.com/ > > > >> > > > >> > > > >> I remembered the previous submission, I liked it, but I had lost i= t. > > > >> > > > >> It seems already 7 years ago, (before I became the Kbuild maintain= er). > > > >> Thanks for coming back to this. > > > >> > > > >> > > > >> I like this, but I will wait some time for review comments. > > > > > > > > Dunno, this seems pretty simple: > > > > > > > > $ ./scripts/config -e WERROR > > > > $ make ... W=3D12 > > > > > > Yeah, that's about what I was thinking too.. > > > > > > > > But, you cannot change the .config > > when you build external modules. > > > > "make W=3De" might be useful for people who strive to > > keep their downstream modules warning-free. > > > > > > W=3De is the same pattern. > > I do not see much downside. > > If I set CONFIG_WERROR=3Dy on the make command line, I could have the > same result, don't I? > > make CONFIG_WERROR=3D1 ... > > no matter if in-tree or for external kernel modules. Yes. If you can change the kernel configuration, you can enable CONFIG_WERROR. To build external modules against the read-only /lib/modules/$(uname -r)/build/, it is not so feasible to change the .config file, though. > > Kind regards, > Nicolas --=20 Best Regards Masahiro Yamada