Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3891045rdg; Wed, 18 Oct 2023 08:50:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8FrMZUM0Ajt1iw6gA2p/eeO/Bj2bg6EmGymArvINxzGHD/Gz8GMg3CfdAHNkA8/8j/ofB X-Received: by 2002:a05:6871:a205:b0:1d0:e372:6c2d with SMTP id vu5-20020a056871a20500b001d0e3726c2dmr5478116oab.0.1697644209577; Wed, 18 Oct 2023 08:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697644209; cv=none; d=google.com; s=arc-20160816; b=sPqSRQ5UMkoXZdn/cMgMIWGyHBNtR084rNk/rpXE+aKMbkikyrzYJQrZdbQPZvT18d C7O83Vw0LTgbPwAl/6zRgLGP1Mc5HuVV/AHvbq9PUkPODZQnNGBXG4UX0g9A+c7rRSkS c1ZyIB8ZHHL49je0s5se9Toju08HRmu1uEfxbmdpTr/fklIX9PDeizVLPwO1/81Xh8m9 lw7zBESl9u9oL1xjNMTc2WMVP4vQmc0TQ8y80hOPCDqeHhXqoTJf58I7TXLDAq75eQqG pBHH7kOgXf0dfXav3wfWK6hZXLjeAOpipcxxI4wIRkvBpAwSDhHz1Z8trL9FvQcZXqYa bVig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DdijaK4Q0EsnqgLbQE/yNoBx72JdY7/Z/gpNGvXD69w=; fh=Xrp1ERU7q9F6urzUfI77ukrq6HgM18fIz8up7ho0mWA=; b=pUyiWFBe1tZnLMUakLLwxPDoR2NBkwG8Ekah90sDFhBjdaIdAZhVeg0MzcGe/GlrXP pbR5GyOtBVBX0SLU2p7sSxiz2QE5j0wiSS68kz7HymTzArhytNYznX1HSD4VzbMCNWrD XCIo29ij5YM2eKm0vMYLTcfi9xpkHGQtCHKrEOXlAQuh1itFVs4U60sNTSONNsmZn89g q+1pVcHU8ucLUwFC1Myih2D4xUg5QQjkThEjqkuNjdBBiIzVET37P6mY+loyYyW/eTuf wscbytfROUdEp9FnTEIYFW2gGGU/6Xn+bOoP/R0FkSeFWkW27VaFr29bmElUZm8CIN9C EAyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fjasle.eu header.s=mail header.b=TDhaXrLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fjasle.eu Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id e4-20020a654784000000b005859c3a51c0si2348580pgs.421.2023.10.18.08.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:50:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@fjasle.eu header.s=mail header.b=TDhaXrLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fjasle.eu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1114F8069264; Wed, 18 Oct 2023 08:50:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232123AbjJRPtz (ORCPT + 99 others); Wed, 18 Oct 2023 11:49:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231764AbjJRPty (ORCPT ); Wed, 18 Oct 2023 11:49:54 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90ABB118; Wed, 18 Oct 2023 08:49:45 -0700 (PDT) Received: from leknes.fjasle.eu ([94.134.20.103]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MsI8Y-1rgyEM38Ru-00tiyo; Wed, 18 Oct 2023 17:49:20 +0200 Received: by leknes.fjasle.eu (Postfix, from userid 1000) id 517AF3F8DD; Wed, 18 Oct 2023 17:49:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fjasle.eu; s=mail; t=1697644159; bh=OH+EicPc7UzPOZaWyDPdScV+4OFzA+p27aCYY2OdDVw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TDhaXrLVKs6Z73PEcsZiScLBFOKbK3T2aAS5GNhPUaOXRB/yHkF1npRH2+wD2qh75 lLuF+dJVqiXlc2iPX+mvlKhqm+VvOb2cVZasXoZ7mlDSIM42UH+CwKnWvboFOMHH5O pRsRVpa5lnsARqIeuLBqMi6j1ZRBCW3oXJml9Z7s= Date: Wed, 18 Oct 2023 17:49:19 +0200 From: Nicolas Schier To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , bpf@vger.kernel.org Subject: Re: [bpf-next PATCH v2 4/4] kbuild: refactor module BTF rule Message-ID: References: <20231018151950.205265-1-masahiroy@kernel.org> <20231018151950.205265-4-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231018151950.205265-4-masahiroy@kernel.org> X-Provags-ID: V03:K1:B4LQ7Ajm1gUh2v3KsatjhnDxISg3jTEx6iRLsNOe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3lDZmG//7y15JIM4BYATN3gBOM6QTDhHlMoJpljWb8CPNqZ9 1RixvbBQ+Wgzb5w== X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 08:50:07 -0700 (PDT) On Thu, Oct 19, 2023 at 12:19:50AM +0900 Masahiro Yamada wrote: > newer_prereqs_except and if_changed_except are ugly hacks of the > newer-prereqs and if_changed in scripts/Kbuild.include. > > Remove. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v2: > - Fix if_changed_except to if_changed thanks Reviewed-by: Nicolas Schier > scripts/Makefile.modfinal | 25 ++++++------------------- > 1 file changed, 6 insertions(+), 19 deletions(-) > > diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal > index 9fd7a26e4fe9..fc07854bb7b9 100644 > --- a/scripts/Makefile.modfinal > +++ b/scripts/Makefile.modfinal > @@ -19,6 +19,9 @@ vmlinux := > ifdef CONFIG_DEBUG_INFO_BTF_MODULES > ifneq ($(wildcard vmlinux),) > vmlinux := vmlinux > +cmd_btf = ; \ > + LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) --btf_base vmlinux $@; \ > + $(RESOLVE_BTFIDS) -b vmlinux $@ > else > $(warning Skipping BTF generation due to unavailability of vmlinux) > endif > @@ -41,27 +44,11 @@ quiet_cmd_ld_ko_o = LD [M] $@ > cmd_ld_ko_o += \ > $(LD) -r $(KBUILD_LDFLAGS) \ > $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ > - -T scripts/module.lds -o $@ $(filter %.o, $^) > + -T scripts/module.lds -o $@ $(filter %.o, $^) \ > + $(cmd_btf) > > -quiet_cmd_btf_ko = BTF [M] $@ > - cmd_btf_ko = \ > - LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) --btf_base vmlinux $@; \ > - $(RESOLVE_BTFIDS) -b vmlinux $@ > - > -# Same as newer-prereqs, but allows to exclude specified extra dependencies > -newer_prereqs_except = $(filter-out $(PHONY) $(1),$?) > - > -# Same as if_changed, but allows to exclude specified extra dependencies > -if_changed_except = $(if $(call newer_prereqs_except,$(2))$(cmd-check), \ > - $(cmd); \ > - printf '%s\n' 'savedcmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) > - > -# Re-generate module BTFs if either module's .ko or vmlinux changed > %.ko: %.o %.mod.o scripts/module.lds $(vmlinux) FORCE > - +$(call if_changed_except,ld_ko_o,vmlinux) > -ifdef vmlinux > - +$(if $(newer-prereqs),$(call cmd,btf_ko)) > -endif > + +$(call if_changed,ld_ko_o) > > targets += $(modules:%.o=%.ko) $(modules:%.o=%.mod.o) > > -- > 2.40.1 -- epost|xmpp: nicolas@fjasle.eu irc://oftc.net/nsc ↳ gpg: 18ed 52db e34f 860e e9fb c82b 7d97 0932 55a0 ce7f -- frykten for herren er opphav til kunnskap --