All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Monnet <qmo@kernel.org>
To: John Hubbard <jhubbard@nvidia.com>, Shuah Khan <shuah@kernel.org>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	Justin Stitt <justinstitt@google.com>,
	Peter Hutterer <peter.hutterer@who-t.net>,
	Jason Gerecke <jason.gerecke@wacom.com>,
	Joshua Dickens <joshua@joshua-dickens.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>,
	bpf@vger.kernel.org, linux-input@vger.kernel.org,
	Valentin Obst <kernel@valentinobst.de>,
	linux-kselftest@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	llvm@lists.linux.dev
Subject: Re: [PATCH] bpftool, selftests/hid/bpf: fix 29 clang warnings
Date: Sun, 5 May 2024 23:51:07 +0100	[thread overview]
Message-ID: <e5c1d2c6-932c-4d25-8a71-bd8b13402ffd@kernel.org> (raw)
In-Reply-To: <c0a8ffa7-0609-4904-961c-3f4357c53237@nvidia.com>

On 05/05/2024 23:48, John Hubbard wrote:
> On 5/5/24 3:36 PM, Quentin Monnet wrote:
>> On 05/05/2024 22:56, John Hubbard wrote:
> ...
>> Thanks! If possible, I'd rather keep the warning enabled, and fix the
>> command line instead. Looking at the error and the Makefile, we may not
>> need the -lLLVM<version> in the CFLAGS at all, but only in $(LIBS). On
>> my setup, I can build successfully, without the warnings, with the
>> following patch:
>>
>> ------
>> 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))
>> ------
>>
>> Could you please check whether that works on your side, too?
>>
> 
> Yes, that works, and of course that's much better. Please let me
> know if you prefer me to post a v2 with that, or if you plan
> on sending it yourself?
Please go ahead!
Quentin

      reply	other threads:[~2024-05-05 22:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 21:56 [PATCH] bpftool, selftests/hid/bpf: fix 29 clang warnings John Hubbard
2024-05-05 22:36 ` Quentin Monnet
2024-05-05 22:48   ` John Hubbard
2024-05-05 22:51     ` Quentin Monnet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5c1d2c6-932c-4d25-8a71-bd8b13402ffd@kernel.org \
    --to=qmo@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=jason.gerecke@wacom.com \
    --cc=jhubbard@nvidia.com \
    --cc=jikos@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=joshua@joshua-dickens.com \
    --cc=justinstitt@google.com \
    --cc=kernel@valentinobst.de \
    --cc=kpsingh@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.lau@linux.dev \
    --cc=peter.hutterer@who-t.net \
    --cc=sdf@google.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.