Message ID | 20241123-resolve_btfids-v1-1-927700b641d1@weissschuh.net (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | kbuild: propagate CONFIG_WERROR to resolve_btfids | expand |
On Sat, Nov 23, 2024 at 02:33:37PM +0100, Thomas Weißschuh wrote: > resolve_btfids is used by link-vmlinux.sh. > In contrast to other configuration options and targets no transitive > dependency between resolve_btfids and vmlinux. > Add an explicit one. hi, there's prepare dependency in root Makefile, isn't it enough? ifdef CONFIG_BPF ifdef CONFIG_DEBUG_INFO_BTF prepare: tools/bpf/resolve_btfids endif endif thanks, jirka > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > --- > scripts/Makefile.vmlinux | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux > index 1284f05555b97f726c6d167a09f6b92f20e120a2..599b486adb31cfb653e54707b7d77052d372b7c1 100644 > --- a/scripts/Makefile.vmlinux > +++ b/scripts/Makefile.vmlinux > @@ -32,6 +32,9 @@ cmd_link_vmlinux = \ > targets += vmlinux > vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE > +$(call if_changed_dep,link_vmlinux) > +ifdef CONFIG_DEBUG_INFO_BTF > +vmlinux: $(RESOLVE_BTFIDS) > +endif > > # module.builtin.ranges > # --------------------------------------------------------------------------- > > -- > 2.47.0 >
On 2024-11-24 21:33:34+0100, Jiri Olsa wrote: > On Sat, Nov 23, 2024 at 02:33:37PM +0100, Thomas Weißschuh wrote: > > resolve_btfids is used by link-vmlinux.sh. > > In contrast to other configuration options and targets no transitive > > dependency between resolve_btfids and vmlinux. > > Add an explicit one. > > hi, > there's prepare dependency in root Makefile, isn't it enough? It doesn't seem for me. If the source of resolve_btfids is changed, it itself is recompiled as per the current Makefile, but vmlinux is not relinked/BTFID'd. > ifdef CONFIG_BPF > ifdef CONFIG_DEBUG_INFO_BTF > prepare: tools/bpf/resolve_btfids > endif > endif > > thanks, > jirka > > > > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > > --- > > scripts/Makefile.vmlinux | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux > > index 1284f05555b97f726c6d167a09f6b92f20e120a2..599b486adb31cfb653e54707b7d77052d372b7c1 100644 > > --- a/scripts/Makefile.vmlinux > > +++ b/scripts/Makefile.vmlinux > > @@ -32,6 +32,9 @@ cmd_link_vmlinux = \ > > targets += vmlinux > > vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE > > +$(call if_changed_dep,link_vmlinux) > > +ifdef CONFIG_DEBUG_INFO_BTF > > +vmlinux: $(RESOLVE_BTFIDS) > > +endif > > > > # module.builtin.ranges > > # --------------------------------------------------------------------------- > > > > -- > > 2.47.0 > >
On Mon, Nov 25, 2024 at 5:58 AM Thomas Weißschuh <linux@weissschuh.net> wrote: > > On 2024-11-24 21:33:34+0100, Jiri Olsa wrote: > > On Sat, Nov 23, 2024 at 02:33:37PM +0100, Thomas Weißschuh wrote: > > > resolve_btfids is used by link-vmlinux.sh. > > > In contrast to other configuration options and targets no transitive > > > dependency between resolve_btfids and vmlinux. > > > Add an explicit one. > > > > hi, > > there's prepare dependency in root Makefile, isn't it enough? > > It doesn't seem for me. > If the source of resolve_btfids is changed, it itself is recompiled as > per the current Makefile, but vmlinux is not relinked/BTFID'd. If we need rebuilding vmlinux, this seems correct Acked-by: Masahiro Yamada <masahiroy@kernel.org> I can pick up this during the current MW. > > ifdef CONFIG_BPF > > ifdef CONFIG_DEBUG_INFO_BTF > > prepare: tools/bpf/resolve_btfids > > endif > > endif > > > > thanks, > > jirka > > > > > > > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > > > --- > > > scripts/Makefile.vmlinux | 3 +++ > > > 1 file changed, 3 insertions(+) > > > > > > diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux > > > index 1284f05555b97f726c6d167a09f6b92f20e120a2..599b486adb31cfb653e54707b7d77052d372b7c1 100644 > > > --- a/scripts/Makefile.vmlinux > > > +++ b/scripts/Makefile.vmlinux > > > @@ -32,6 +32,9 @@ cmd_link_vmlinux = \ > > > targets += vmlinux > > > vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE > > > +$(call if_changed_dep,link_vmlinux) > > > +ifdef CONFIG_DEBUG_INFO_BTF > > > +vmlinux: $(RESOLVE_BTFIDS) > > > +endif > > > > > > # module.builtin.ranges > > > # --------------------------------------------------------------------------- > > > > > > -- > > > 2.47.0 > > >
On Sat, Nov 23, 2024 at 10:33 PM Thomas Weißschuh <linux@weissschuh.net> wrote: > > resolve_btfids is used by link-vmlinux.sh. > In contrast to other configuration options and targets no transitive > dependency between resolve_btfids and vmlinux. > Add an explicit one. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > --- 1/3, applied to linux-kbuild. Thanks. > scripts/Makefile.vmlinux | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux > index 1284f05555b97f726c6d167a09f6b92f20e120a2..599b486adb31cfb653e54707b7d77052d372b7c1 100644 > --- a/scripts/Makefile.vmlinux > +++ b/scripts/Makefile.vmlinux > @@ -32,6 +32,9 @@ cmd_link_vmlinux = \ > targets += vmlinux > vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE > +$(call if_changed_dep,link_vmlinux) > +ifdef CONFIG_DEBUG_INFO_BTF > +vmlinux: $(RESOLVE_BTFIDS) > +endif > > # module.builtin.ranges > # --------------------------------------------------------------------------- > > -- > 2.47.0 >
diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index 1284f05555b97f726c6d167a09f6b92f20e120a2..599b486adb31cfb653e54707b7d77052d372b7c1 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -32,6 +32,9 @@ cmd_link_vmlinux = \ targets += vmlinux vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE +$(call if_changed_dep,link_vmlinux) +ifdef CONFIG_DEBUG_INFO_BTF +vmlinux: $(RESOLVE_BTFIDS) +endif # module.builtin.ranges # ---------------------------------------------------------------------------
resolve_btfids is used by link-vmlinux.sh. In contrast to other configuration options and targets no transitive dependency between resolve_btfids and vmlinux. Add an explicit one. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- scripts/Makefile.vmlinux | 3 +++ 1 file changed, 3 insertions(+)