diff mbox series

[2/4] bpftool: Complete libbfd feature detection

Message ID 20220719170555.2576993-2-roberto.sassu@huawei.com (mailing list archive)
State New, archived
Delegated to: BPF
Headers show
Series [1/4] tools, build: Retry detection of bfd-related features | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch
bpf/vmtest-bpf-next-PR success PR summary
bpf/vmtest-bpf-next-VM_Test-3 success Logs for Kernel LATEST on z15 with gcc
bpf/vmtest-bpf-next-VM_Test-1 success Logs for Kernel LATEST on ubuntu-latest with gcc
bpf/vmtest-bpf-next-VM_Test-2 success Logs for Kernel LATEST on ubuntu-latest with llvm-16

Commit Message

Roberto Sassu July 19, 2022, 5:05 p.m. UTC
Commit 6e8ccb4f624a7 ("tools/bpf: properly account for libbfd variations")
sets the linking flags depending on which flavor of the libbfd feature was
detected.

However, the flavors except libbfd cannot be detected, as they are not in
the feature list.

Complete the list of features to detect by adding libbfd-liberty and
libbfd-liberty-z.

Fixes: 6e8ccb4f624a7 ("tools/bpf: properly account for libbfd variations")
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
---
 tools/bpf/bpftool/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Quentin Monnet July 20, 2022, 8:07 p.m. UTC | #1
On Tue, 19 Jul 2022 at 18:06, Roberto Sassu <roberto.sassu@huawei.com> wrote:
>
> Commit 6e8ccb4f624a7 ("tools/bpf: properly account for libbfd variations")
> sets the linking flags depending on which flavor of the libbfd feature was
> detected.
>
> However, the flavors except libbfd cannot be detected, as they are not in
> the feature list.
>
> Complete the list of features to detect by adding libbfd-liberty and
> libbfd-liberty-z.
>
> Fixes: 6e8ccb4f624a7 ("tools/bpf: properly account for libbfd variations")
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
> ---
>  tools/bpf/bpftool/Makefile | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> index 6b5b3a99f79d..4b09a5c3b9f1 100644
> --- a/tools/bpf/bpftool/Makefile
> +++ b/tools/bpf/bpftool/Makefile
> @@ -93,8 +93,10 @@ INSTALL ?= install
>  RM ?= rm -f
>
>  FEATURE_USER = .bpftool
> -FEATURE_TESTS = libbfd disassembler-four-args libcap clang-bpf-co-re
> -FEATURE_DISPLAY = libbfd disassembler-four-args libcap clang-bpf-co-re
> +FEATURE_TESTS = libbfd libbfd-liberty libbfd-liberty-z \
> +               disassembler-four-args libcap clang-bpf-co-re
> +FEATURE_DISPLAY = libbfd libbfd-liberty libbfd-liberty-z \
> +                 disassembler-four-args libcap clang-bpf-co-re

Do you know if there is a way to fold the different feature-libbfd-*
features into a single one for FEATURE_DISPLAY? Or should the various
features be all moved under feature-libbfd with multiple attempts,
like you did for disassembler-four-args in patch 1? My concern is that
users may think some features could be missing when they compile and
see that detection fails for some items.
diff mbox series

Patch

diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 6b5b3a99f79d..4b09a5c3b9f1 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -93,8 +93,10 @@  INSTALL ?= install
 RM ?= rm -f
 
 FEATURE_USER = .bpftool
-FEATURE_TESTS = libbfd disassembler-four-args libcap clang-bpf-co-re
-FEATURE_DISPLAY = libbfd disassembler-four-args libcap clang-bpf-co-re
+FEATURE_TESTS = libbfd libbfd-liberty libbfd-liberty-z \
+		disassembler-four-args libcap clang-bpf-co-re
+FEATURE_DISPLAY = libbfd libbfd-liberty libbfd-liberty-z \
+		  disassembler-four-args libcap clang-bpf-co-re
 
 check_feat := 1
 NON_CHECK_FEAT_TARGETS := clean uninstall doc doc-clean doc-install doc-uninstall