Skip to content

Commit e06e6b8

Browse files
pchaignoAlexei Starovoitov
authored andcommitted
selftests/bpf: Fix pkg-config call on static builds
For commit b0dcdcb ("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: b0dcdcb ("resolve_btfids: Fix linker flags detection") Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com> Acked-by: Mykyta Yatsenko <yatsenko@meta.com> Acked-by: Ihor Solodrai <ihor.solodrai@linux.dev> Link: https://lore.kernel.org/r/abADBwn_ykblpABE@mail.gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent 2321a95 commit e06e6b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/bpf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ $(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \
409409
CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)" \
410410
LIBBPF_INCLUDE=$(HOST_INCLUDE_DIR) \
411411
EXTRA_LDFLAGS='$(SAN_LDFLAGS) $(EXTRA_LDFLAGS)' \
412-
HOSTPKG_CONFIG=$(PKG_CONFIG) \
412+
HOSTPKG_CONFIG='$(PKG_CONFIG)' \
413413
OUTPUT=$(HOST_BUILD_DIR)/resolve_btfids/ BPFOBJ=$(HOST_BPFOBJ)
414414

415415
# Get Clang's default includes on this system, as opposed to those seen by

0 commit comments

Comments
 (0)