llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] bpftool, selftests/hid/bpf: fix 29 clang warnings
@ 2024-05-05 23:00 John Hubbard
  2024-05-06  0:00 ` Quentin Monnet
  2024-05-06 21:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: John Hubbard @ 2024-05-05 23:00 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Jiri Kosina, Benjamin Tissoires, Justin Stitt, Peter Hutterer,
	Jason Gerecke, Joshua Dickens, Quentin Monnet,
	Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	bpf, linux-input, Valentin Obst, linux-kselftest, LKML, llvm,
	John Hubbard

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>
---
 tools/bpf/bpftool/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index e9154ace80ff..a5445a422109 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -143,7 +143,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))

base-commit: f462ae0edd3703edd6f22fe41d336369c38b884b
prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27
-- 
2.45.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] bpftool, selftests/hid/bpf: fix 29 clang warnings
  2024-05-05 23:00 [PATCH v2] bpftool, selftests/hid/bpf: fix 29 clang warnings John Hubbard
@ 2024-05-06  0:00 ` Quentin Monnet
  2024-05-06 21:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Quentin Monnet @ 2024-05-06  0:00 UTC (permalink / raw)
  To: John Hubbard, Shuah Khan
  Cc: Jiri Kosina, Benjamin Tissoires, Justin Stitt, Peter Hutterer,
	Jason Gerecke, Joshua Dickens, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau,
	Eduard Zingerman, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, bpf,
	linux-input, Valentin Obst, linux-kselftest, LKML, llvm

On 06/05/2024 00:00, John Hubbard wrote:
> 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>
Acked-by: Quentin Monnet <qmo@kernel.org>

Thank you!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] bpftool, selftests/hid/bpf: fix 29 clang warnings
  2024-05-05 23:00 [PATCH v2] bpftool, selftests/hid/bpf: fix 29 clang warnings John Hubbard
  2024-05-06  0:00 ` Quentin Monnet
@ 2024-05-06 21:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-06 21:50 UTC (permalink / raw)
  To: John Hubbard
  Cc: shuah, jikos, bentiss, justinstitt, peter.hutterer,
	jason.gerecke, joshua, qmo, ast, daniel, andrii, martin.lau,
	eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
	haoluo, jolsa, bpf, linux-input, kernel, linux-kselftest,
	linux-kernel, llvm

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Sun,  5 May 2024 16:00:54 -0700 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [v2] bpftool, selftests/hid/bpf: fix 29 clang warnings
    https://git.kernel.org/bpf/bpf-next/c/41b307ad756e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-06 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-05 23:00 [PATCH v2] bpftool, selftests/hid/bpf: fix 29 clang warnings John Hubbard
2024-05-06  0:00 ` Quentin Monnet
2024-05-06 21:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).