From: Mykyta Yatsenko <mykyta.yatsenko5@gmail.com>
To: Paul Chaignon <paul.chaignon@gmail.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>
Subject: Re: [PATCH bpf] selftests/bpf: Fix pkg-config call on static builds
Date: Tue, 10 Mar 2026 14:56:06 +0000 [thread overview]
Message-ID: <87qzpru41l.fsf@gmail.com> (raw)
In-Reply-To: <abADBwn_ykblpABE@mail.gmail.com>
Paul Chaignon <paul.chaignon@gmail.com> writes:
> For commit b0dcdcb9ae75 ("resolve_btfids: Fix linker flags detection"),
> I suggested setting HOSTPKG_CONFIG to $PKG_CONFIG when compiling
> resolve_btfids, but I forgot the quotes around that variable.
>
> As a result, when running vmtest.sh with static linking, it fails as
> follows:
>
> $ LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh
> [...]
> make: unrecognized option '--static'
> Usage: make [options] [target] ...
> [...]
>
> This worked when I tested it because HOSTPKG_CONFIG didn't have a
> default value in the resolve_btfids Makefile, but once it does, the
> quotes aren't preserved and it fails on the next make call.
>
> Fixes: b0dcdcb9ae75 ("resolve_btfids: Fix linker flags detection")
> Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
> ---
Acked-by: Mykyta Yatsenko <yatsenko@meta.com>
> tools/testing/selftests/bpf/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index d5acbeba0383..65485967c968 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -409,7 +409,7 @@ $(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \
> CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)" \
> LIBBPF_INCLUDE=$(HOST_INCLUDE_DIR) \
> EXTRA_LDFLAGS='$(SAN_LDFLAGS) $(EXTRA_LDFLAGS)' \
> - HOSTPKG_CONFIG=$(PKG_CONFIG) \
> + HOSTPKG_CONFIG='$(PKG_CONFIG)' \
> OUTPUT=$(HOST_BUILD_DIR)/resolve_btfids/ BPFOBJ=$(HOST_BPFOBJ)
>
> # Get Clang's default includes on this system, as opposed to those seen by
> --
> 2.43.0
next prev parent reply other threads:[~2026-03-10 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 11:39 [PATCH bpf] selftests/bpf: Fix pkg-config call on static builds Paul Chaignon
2026-03-10 14:56 ` Mykyta Yatsenko [this message]
2026-03-10 16:32 ` Ihor Solodrai
2026-03-10 19:10 ` patchwork-bot+netdevbpf
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=87qzpru41l.fsf@gmail.com \
--to=mykyta.yatsenko5@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=paul.chaignon@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox