Message ID | 20241211093114.263742-1-leo.yan@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | bpftool: Fix the static linkage failure | expand |
On Wed, Dec 11, 2024 at 09:31:11AM +0000, Leo Yan wrote: > This series follows up on the discussion in [1] for fixing the static > linkage issue in bpftool. > > Patch 01 introduces a new feature for libelf-zstd. If this feature > is detected, it means the zstd lib is required by libelf. > > Patch 02 is a minor improvement for linking the zstd lib in the perf. > > Patch 03 fixes the static build failure by linking the zstd lib when > the feature-libelf-zstd is detected. > > [1] https://lore.kernel.org/linux-perf-users/Z1H9-9xrWM4FBbNI@mini-arch/T/#m2300b127424e9e2ace7da497a20d88534eb6866f So, this was originally reported as a perf build failure when trying a static build, so something not so common, no urgency, I guess, but it involves a tools/perf/bpftool/Makefile change, I think I can process this as I'll then test it in the many build containers for old distros I have, ok? - Arnaldo > > Leo Yan (3): > tools build: Add feature test for libelf with ZSTD > perf: build: Minor improvement for linking libzstd > bpftool: Link zstd lib required by libelf > > tools/bpf/bpftool/Makefile | 8 ++++++++ > tools/build/Makefile.feature | 1 + > tools/build/feature/Makefile | 4 ++++ > tools/build/feature/test-all.c | 4 ++++ > tools/build/feature/test-libelf-zstd.c | 9 +++++++++ > tools/perf/Makefile.config | 8 +++++++- > 6 files changed, 33 insertions(+), 1 deletion(-) > create mode 100644 tools/build/feature/test-libelf-zstd.c > > -- > 2.34.1
On Wed, Dec 11, 2024 at 09:31:11AM +0000, Leo Yan wrote: > This series follows up on the discussion in [1] for fixing the static > linkage issue in bpftool. > > Patch 01 introduces a new feature for libelf-zstd. If this feature > is detected, it means the zstd lib is required by libelf. > > Patch 02 is a minor improvement for linking the zstd lib in the perf. > > Patch 03 fixes the static build failure by linking the zstd lib when > the feature-libelf-zstd is detected. > > [1] https://lore.kernel.org/linux-perf-users/Z1H9-9xrWM4FBbNI@mini-arch/T/#m2300b127424e9e2ace7da497a20d88534eb6866f > > > Leo Yan (3): > tools build: Add feature test for libelf with ZSTD > perf: build: Minor improvement for linking libzstd > bpftool: Link zstd lib required by libelf Tested-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > > tools/bpf/bpftool/Makefile | 8 ++++++++ > tools/build/Makefile.feature | 1 + > tools/build/feature/Makefile | 4 ++++ > tools/build/feature/test-all.c | 4 ++++ > tools/build/feature/test-libelf-zstd.c | 9 +++++++++ > tools/perf/Makefile.config | 8 +++++++- > 6 files changed, 33 insertions(+), 1 deletion(-) > create mode 100644 tools/build/feature/test-libelf-zstd.c > > -- > 2.34.1 >
On Wed, Dec 11, 2024 at 10:18:10AM -0300, Arnaldo Carvalho de Melo wrote: > On Wed, Dec 11, 2024 at 09:31:11AM +0000, Leo Yan wrote: > > This series follows up on the discussion in [1] for fixing the static > > linkage issue in bpftool. > > > > Patch 01 introduces a new feature for libelf-zstd. If this feature > > is detected, it means the zstd lib is required by libelf. > > > > Patch 02 is a minor improvement for linking the zstd lib in the perf. > > > > Patch 03 fixes the static build failure by linking the zstd lib when > > the feature-libelf-zstd is detected. > > So, this was originally reported as a perf build failure when trying a > static build, so something not so common, no urgency, I guess, but it > involves a tools/perf/bpftool/Makefile change, I think I can process > this as I'll then test it in the many build containers for old distros I > have, ok? As Quentin said in another reply, there is a delta change between the Linux perf tree and bpf-next tree. So this series has a conflict on bpf-next tree but it can be applied cleanly on perf tree. Before I respin to update the commit logs based on comments, I need BPF maintainers agreement with Arnaldo on proceeding on which source tree to proceed with. Thanks, Leo
On Wed, Dec 11, 2024 at 12:26 PM Leo Yan <leo.yan@arm.com> wrote: > > On Wed, Dec 11, 2024 at 10:18:10AM -0300, Arnaldo Carvalho de Melo wrote: > > On Wed, Dec 11, 2024 at 09:31:11AM +0000, Leo Yan wrote: > > > This series follows up on the discussion in [1] for fixing the static > > > linkage issue in bpftool. > > > > > > Patch 01 introduces a new feature for libelf-zstd. If this feature > > > is detected, it means the zstd lib is required by libelf. > > > > > > Patch 02 is a minor improvement for linking the zstd lib in the perf. > > > > > > Patch 03 fixes the static build failure by linking the zstd lib when > > > the feature-libelf-zstd is detected. > > > > So, this was originally reported as a perf build failure when trying a > > static build, so something not so common, no urgency, I guess, but it > > involves a tools/perf/bpftool/Makefile change, I think I can process > > this as I'll then test it in the many build containers for old distros I > > have, ok? > > As Quentin said in another reply, there is a delta change between the > Linux perf tree and bpf-next tree. So this series has a conflict on > bpf-next tree but it can be applied cleanly on perf tree. > > Before I respin to update the commit logs based on comments, I need BPF > maintainers agreement with Arnaldo on proceeding on which source tree > to proceed with. > I think it's fine to route this through a perf tree. Acked-by: Andrii Nakryiko <andrii@kernel.org> > Thanks, > Leo