Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp231646ybz; Thu, 30 Apr 2020 20:32:22 -0700 (PDT) X-Google-Smtp-Source: APiQypLxQkTZXsMR3XcnpRyyYxc+acAMItc2O89D/CWhcEtenU0+mK7rciY1ibeCUcFA68lMfVb8 X-Received: by 2002:aa7:dd84:: with SMTP id g4mr1906217edv.257.1588303942106; Thu, 30 Apr 2020 20:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588303942; cv=none; d=google.com; s=arc-20160816; b=A8B7C/IUy2JVI3Z+sn4p1D6C4xxsSPMaaMV7ouxooKOlrmGKIBvhh5ZsnnOPW8nJw/ NUyJapHFxXMigveS7DUCkucetWbOQeD6DJhOU4xffoPVsWk/lhRZ607QQejOk2kFUOt2 tnnxf2GmKD4O5bAO6u45mVWG/wCtPO3YluKEsUJkpXIvLZU8gI3Xpu0VA6+fi+Zvx89c iuwewTDVg2/IstvwpwZPIB9cC8t2b2DPQY+680HpVbR1OXAEqSRKGehZPnVRG6mH0Izw 1JA7xKfXWN2LidT2hF7vwut0Pn7thBPqZs7c0Ev2DWp6hmy7fBHgvTtfFZPhbeCz8PD7 7IGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=dZPeCNSQY4aYFOOSP6Kq54wydMYSCKOA05XzY7vDE8Y=; b=OoS22ZFhvCTOVZtCWXv8xC4oM0cnp5HPFpl0eooFAhOZadl5Fhg8HLEdncTvEVdpml JlTizlE8j9CZBCOwKljDtjc64td4W5KfomK+Sv05gA3a2TfeHKPuPuTYpKsMQXsITTdJ 5/eA9i6Dg/M+k+UpCveWG9wizhi4N8uLno+yXeLO65OJiTMiY+0MwARFaiANSn0jrhMv H/nlrGL9tuJGXfVCHPTUwUF6vb1CG9YowSg2XRVPeQ2qxysAH9hSe2rhFt5nJ6eenaRO PlAIuVq7GHKOfXbVw2YaSFKV3bmOHXX4z4ZYYH6OhnD0BLxwSTbZyzS+IWRwTK0uAg/M YBJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=nAhYz0mm; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si978118ejq.79.2020.04.30.20.31.58; Thu, 30 Apr 2020 20:32:22 -0700 (PDT) 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=@nifty.com header.s=dec2015msa header.b=nAhYz0mm; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728181AbgEAD2S (ORCPT + 99 others); Thu, 30 Apr 2020 23:28:18 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:62324 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727889AbgEAD2R (ORCPT ); Thu, 30 Apr 2020 23:28:17 -0400 Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 0413Rtl3009806; Fri, 1 May 2020 12:27:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 0413Rtl3009806 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1588303676; bh=dZPeCNSQY4aYFOOSP6Kq54wydMYSCKOA05XzY7vDE8Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nAhYz0mmmmg7EKCXhCx1Qt6TbEkutIb9JwQPCTRki8n1uume/k39uZKQAkncgucjc 2PZcWdP2szP2/UmZf/OSw7Gu8CatIcAh52ut6gbx4dkaB2CzGTQDrGW25xLZ8RBU1K mPOSqV7Vyw24nWj5AM3QwSJ1Q3o3uvp3upy+R5le/twZ+2EzUyBh5RpGCbvVBYT30B q7WyB86luZvUf/q7vr5h/Js7Nqe+mG8JgPu+FbuT2ECfdt+F+jm2smoez/8UF2D/l3 cdtW/th7IGQCjDCS6ulgZ4uvyKVMGLJK8SmepMvswOaFii/31YbMPR2/U+Q3PaeMId 0AfQaUeV0uwVw== X-Nifty-SrcIP: [209.85.221.175] Received: by mail-vk1-f175.google.com with SMTP id 10so2432524vkr.7; Thu, 30 Apr 2020 20:27:56 -0700 (PDT) X-Gm-Message-State: AGi0Pub49ENNPIXVkv6OHV4oh/Pg8bJZTpLIHzwcQD0tuqjUvqex2CCq DhIOfHch4h9GiJOSend6e+sJaQvq6nN0WHb+7KA= X-Received: by 2002:a1f:d182:: with SMTP id i124mr1366860vkg.26.1588303675078; Thu, 30 Apr 2020 20:27:55 -0700 (PDT) MIME-Version: 1.0 References: <20200430131715.32c1a1f6@coco.lan> <20200430184948.27191975@coco.lan> <20200430211009.3fef03f3@coco.lan> <20200430212511.2115ed98@coco.lan> In-Reply-To: <20200430212511.2115ed98@coco.lan> From: Masahiro Yamada Date: Fri, 1 May 2020 12:27:19 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC] Kbuild: Makefile: warn if auto.conf is obsolete To: Mauro Carvalho Chehab Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Linux Media Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 1, 2020 at 4:25 AM Mauro Carvalho Chehab wrote: > > A new behavior on more recent kernels require to always call > "make modules_prepare" after *any* Kconfig changes. Again, this is the behavior since 2004. This commit: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=95065ad3fa787c417008a36d3a5d9a3bab17ab98 Shrug if you complain about what has been stable more than 15 years. > This is not what a poor mortal would be expecting on a building > system, as it should, IMHO, be able to detect and auto-run > whatever is needed to use the newer setup. No. External module builds should never ever attempt to update in-tree files. This is because the build environment for external modules is usually located in /lib/modules/$(uname -r)/build/, which is read-only. A number of upstream developers (ab)use M= to compile test individual directories, despite the fact Kbuild supports the single target 'make drivers/staging/media/stomisp/' You need to cope with this conflicting comment line: https://github.com/masahir0y/linux/blob/v5.6/Makefile#L681 since you care if auto.conf is up-to-date. > Yet, while this is not solved, let's at least stop the build > and produce a warning, to notify the user about that. > > Signed-off-by: Mauro Carvalho Chehab > --- > > I would still prefer to call "make modules_prepare" directly, > on such cases, but just calling "make -C . modules_prepare" doesn't > work. So, the next best thing would be to at least print a message > and don't try to do a build with a broken auto.conf file. > > Makefile | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Makefile b/Makefile > index 70def4907036..492ee2396ab9 100644 > --- a/Makefile > +++ b/Makefile > @@ -1632,6 +1632,11 @@ $(objtree)/Module.symvers: > build-dirs := $(KBUILD_EXTMOD) > PHONY += modules > modules: descend $(objtree)/Module.symvers > + @if [ $(KCONFIG_CONFIG) -nt include/config/auto.conf ]; then \ > + echo " WARNING: $(KCONFIG_CONFIG) was modified. Need to run:"; \ > + echo " $(MAKE) modules_prepare"; \ > + exit -1; \ > + fi > $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost > > PHONY += modules_install -- Best Regards Masahiro Yamada