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 Aug 14, 2023
1 parent 6da4fea commit 05a3195
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
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,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
Original file line number Diff line number Diff line change
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 05a3195

Please sign in to comment.