Skip to content

Commit

Permalink
bpf, vmtest: Build test_progs as statically linked
Browse files Browse the repository at this point in the history
  • Loading branch information
borkmann committed Feb 27, 2023
1 parent 68bfd65 commit 3a1cef4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/Makefile
Expand Up @@ -545,7 +545,7 @@ $(OUTPUT)/$(TRUNNER_BINARY): $(TRUNNER_TEST_OBJS) \
$(TRUNNER_BPFTOOL) \
| $(TRUNNER_BINARY)-extras
$$(call msg,BINARY,,$$@)
$(Q)$$(CC) $$(CFLAGS) $$(filter %.a %.o,$$^) $$(LDLIBS) -o $$@
$(Q)$$(CC) $$(CFLAGS) $(TRUNNER_LDFLAGS) $$(filter %.a %.o,$$^) $$(LDLIBS) -o $$@
$(Q)$(RESOLVE_BTFIDS) --btf $(TRUNNER_OUTPUT)/btf_data.bpf.o $$@
$(Q)ln -sf $(if $2,..,.)/tools/build/bpftool/$(USE_BOOTSTRAP)bpftool \
$(OUTPUT)/$(if $2,$2/)bpftool
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/vmtest.sh
Expand Up @@ -160,7 +160,7 @@ update_selftests()
local selftests_dir="${kernel_checkout}/tools/testing/selftests/bpf"

cd "${selftests_dir}"
${make_command}
TRUNNER_LDFLAGS=-static ${make_command}

# Mount the image and copy the selftests to the image.
mount_image
Expand Down

0 comments on commit 3a1cef4

Please sign in to comment.