diff mbox series

[1/3] kbuild: add dependency from vmlinux to resolve_btfids

Message ID 20241123-resolve_btfids-v1-1-927700b641d1@weissschuh.net (mailing list archive)
State Superseded
Headers show
Series kbuild: propagate CONFIG_WERROR to resolve_btfids | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch
bpf/vmtest-bpf-next-VM_Test-1 success Logs for ShellCheck
bpf/vmtest-bpf-next-VM_Test-2 success Logs for Unittests
bpf/vmtest-bpf-next-VM_Test-0 success Logs for Lint
bpf/vmtest-bpf-next-VM_Test-3 success Logs for Validate matrix.py
bpf/vmtest-bpf-next-VM_Test-5 success Logs for aarch64-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-4 success Logs for aarch64-gcc / build / build for aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-6 success Logs for aarch64-gcc / test (test_maps, false, 360) / test_maps on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-9 success Logs for aarch64-gcc / test (test_verifier, false, 360) / test_verifier on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-10 success Logs for aarch64-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-12 success Logs for s390x-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-13 success Logs for s390x-gcc / test
bpf/vmtest-bpf-next-VM_Test-11 fail Logs for s390x-gcc / build / build for s390x with gcc
bpf/vmtest-bpf-next-VM_Test-33 success Logs for x86_64-llvm-18 / test (test_verifier, false, 360) / test_verifier on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-34 success Logs for x86_64-llvm-18 / veristat
bpf/vmtest-bpf-next-VM_Test-14 success Logs for s390x-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-30 success Logs for x86_64-llvm-18 / test (test_progs, false, 360) / test_progs on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-17 success Logs for x86_64-gcc / build-release
bpf/vmtest-bpf-next-VM_Test-29 success Logs for x86_64-llvm-18 / test (test_maps, false, 360) / test_maps on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-20 success Logs for x86_64-llvm-17 / build / build for x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-15 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-21 success Logs for x86_64-llvm-17 / build-release / build for x86_64 with llvm-17-O2
bpf/vmtest-bpf-next-VM_Test-18 success Logs for x86_64-gcc / test
bpf/vmtest-bpf-next-VM_Test-24 success Logs for x86_64-llvm-17 / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-23 success Logs for x86_64-llvm-17 / test (test_progs, false, 360) / test_progs on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-32 success Logs for x86_64-llvm-18 / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-22 success Logs for x86_64-llvm-17 / test (test_maps, false, 360) / test_maps on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-16 fail Logs for x86_64-gcc / build / build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-27 success Logs for x86_64-llvm-18 / build / build for x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-26 success Logs for x86_64-llvm-17 / veristat
bpf/vmtest-bpf-next-VM_Test-25 success Logs for x86_64-llvm-17 / test (test_verifier, false, 360) / test_verifier on x86_64 with llvm-17
bpf/vmtest-bpf-next-VM_Test-28 success Logs for x86_64-llvm-18 / build-release / build for x86_64 with llvm-18-O2
bpf/vmtest-bpf-next-VM_Test-19 success Logs for x86_64-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-31 success Logs for x86_64-llvm-18 / test (test_progs_cpuv4, false, 360) / test_progs_cpuv4 on x86_64 with llvm-18
bpf/vmtest-bpf-next-VM_Test-7 success Logs for aarch64-gcc / test (test_progs, false, 360) / test_progs on aarch64 with gcc
bpf/vmtest-bpf-next-PR fail PR summary
bpf/vmtest-bpf-next-VM_Test-8 success Logs for aarch64-gcc / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on aarch64 with gcc

Commit Message

Thomas Weißschuh Nov. 23, 2024, 1:33 p.m. UTC
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(+)

Comments

Jiri Olsa Nov. 24, 2024, 8:33 p.m. UTC | #1
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
>
Thomas Weißschuh Nov. 24, 2024, 8:57 p.m. UTC | #2
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
> >
Masahiro Yamada Nov. 25, 2024, 8:35 a.m. UTC | #3
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
> > >
Masahiro Yamada Nov. 26, 2024, 4:52 p.m. UTC | #4
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 mbox series

Patch

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
 # ---------------------------------------------------------------------------