* [PATCH bpf] selftests/bpf: Fix pkg-config call on static builds
@ 2026-03-10 11:39 Paul Chaignon
2026-03-10 14:56 ` Mykyta Yatsenko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paul Chaignon @ 2026-03-10 11:39 UTC (permalink / raw)
To: bpf
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Eduard Zingerman, Ihor Solodrai
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH bpf] selftests/bpf: Fix pkg-config call on static builds
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
2026-03-10 16:32 ` Ihor Solodrai
2026-03-10 19:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Mykyta Yatsenko @ 2026-03-10 14:56 UTC (permalink / raw)
To: Paul Chaignon, bpf
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Eduard Zingerman, Ihor Solodrai
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf] selftests/bpf: Fix pkg-config call on static builds
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
@ 2026-03-10 16:32 ` Ihor Solodrai
2026-03-10 19:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Ihor Solodrai @ 2026-03-10 16:32 UTC (permalink / raw)
To: Paul Chaignon, bpf
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Eduard Zingerman
On 3/10/26 4:39 AM, Paul Chaignon wrote:
> 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>
> ---
> 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)' \
That's an oopsie... Thanks for fixing.
Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> OUTPUT=$(HOST_BUILD_DIR)/resolve_btfids/ BPFOBJ=$(HOST_BPFOBJ)
>
> # Get Clang's default includes on this system, as opposed to those seen by
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH bpf] selftests/bpf: Fix pkg-config call on static builds
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
2026-03-10 16:32 ` Ihor Solodrai
@ 2026-03-10 19:10 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-10 19:10 UTC (permalink / raw)
To: Paul Chaignon; +Cc: bpf, ast, daniel, andrii, eddyz87, ihor.solodrai
Hello:
This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Tue, 10 Mar 2026 12:39:51 +0100 you wrote:
> 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:
>
> [...]
Here is the summary with links:
- [bpf] selftests/bpf: Fix pkg-config call on static builds
https://git.kernel.org/bpf/bpf/c/e06e6b800123
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] 4+ messages in thread
end of thread, other threads:[~2026-03-10 19:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2026-03-10 16:32 ` Ihor Solodrai
2026-03-10 19:10 ` 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