summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorJohn Hubbard <jhubbard@nvidia.com>2024-05-06 02:00:54 +0300
committerAndrii Nakryiko <andrii@kernel.org>2024-05-07 00:39:36 +0300
commit41b307ad756e1b7b618bf9d9c1cce3595705ede4 (patch)
treea41194186c6f374dc9093246364c1b0ed031553d /tools/bpf
parente549b39a0ab8880d7ae6c6495b00fc1cb8f36174 (diff)
downloadlinux-41b307ad756e1b7b618bf9d9c1cce3595705ede4.tar.xz
bpftool, selftests/hid/bpf: Fix 29 clang warnings
When building either tools/bpf/bpftool, or tools/testing/selftests/hid, (the same Makefile is used for these), clang generates many instances of the following: "clang: warning: -lLLVM-17: 'linker' input unused" Quentin points out that the LLVM version is only required in $(LIBS), not in $(CFLAGS), so the fix is to remove it from CFLAGS. Suggested-by: Quentin Monnet <qmo@kernel.org> Signed-off-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Quentin Monnet <qmo@kernel.org> Link: https://lore.kernel.org/bpf/20240505230054.13813-1-jhubbard@nvidia.com
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index b67454b45a49..dfa4f1bebbb3 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -147,7 +147,7 @@ ifeq ($(feature-llvm),1)
# If LLVM is available, use it for JIT disassembly
CFLAGS += -DHAVE_LLVM_SUPPORT
LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets
- CFLAGS += $(shell $(LLVM_CONFIG) --cflags --libs $(LLVM_CONFIG_LIB_COMPONENTS))
+ CFLAGS += $(shell $(LLVM_CONFIG) --cflags)
LIBS += $(shell $(LLVM_CONFIG) --libs $(LLVM_CONFIG_LIB_COMPONENTS))
ifeq ($(shell $(LLVM_CONFIG) --shared-mode),static)
LIBS += $(shell $(LLVM_CONFIG) --system-libs $(LLVM_CONFIG_LIB_COMPONENTS))