Skip to content

Commit 41b307a

Browse files
johnhubbardanakryiko
authored andcommitted
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
1 parent e549b39 commit 41b307a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/bpf/bpftool/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ ifeq ($(feature-llvm),1)
147147
# If LLVM is available, use it for JIT disassembly
148148
CFLAGS += -DHAVE_LLVM_SUPPORT
149149
LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets
150-
CFLAGS += $(shell $(LLVM_CONFIG) --cflags --libs $(LLVM_CONFIG_LIB_COMPONENTS))
150+
CFLAGS += $(shell $(LLVM_CONFIG) --cflags)
151151
LIBS += $(shell $(LLVM_CONFIG) --libs $(LLVM_CONFIG_LIB_COMPONENTS))
152152
ifeq ($(shell $(LLVM_CONFIG) --shared-mode),static)
153153
LIBS += $(shell $(LLVM_CONFIG) --system-libs $(LLVM_CONFIG_LIB_COMPONENTS))

0 commit comments

Comments
 (0)