Skip to content

Commit 119fc2c

Browse files
johnhubbardqmonnet
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 <[email protected]> Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 1e5b4c5 commit 119fc2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ ifeq ($(feature-llvm),1)
141141
# If LLVM is available, use it for JIT disassembly
142142
CFLAGS += -DHAVE_LLVM_SUPPORT
143143
LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets
144-
CFLAGS += $(shell $(LLVM_CONFIG) --cflags --libs $(LLVM_CONFIG_LIB_COMPONENTS))
144+
CFLAGS += $(shell $(LLVM_CONFIG) --cflags)
145145
LIBS += $(shell $(LLVM_CONFIG) --libs $(LLVM_CONFIG_LIB_COMPONENTS))
146146
ifeq ($(shell $(LLVM_CONFIG) --shared-mode),static)
147147
LIBS += $(shell $(LLVM_CONFIG) --system-libs $(LLVM_CONFIG_LIB_COMPONENTS))

0 commit comments

Comments
 (0)