On Fri, Jan 20, 2023 at 2:30 PM Martin KaFai Lau <martin.lau@xxxxxxxxx> wrote: > > On 1/19/23 2:15 PM, Stanislav Fomichev wrote: > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > > index e09bef2b7502..9c961d2d868e 100644 > > --- a/tools/testing/selftests/bpf/Makefile > > +++ b/tools/testing/selftests/bpf/Makefile > > @@ -83,7 +83,7 @@ TEST_PROGS_EXTENDED := with_addr.sh \ > > TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ > > flow_dissector_load test_flow_dissector test_tcp_check_syncookie_user \ > > test_lirc_mode2_user xdping test_cpp runqslower bench bpf_testmod.ko \ > > - xskxceiver xdp_redirect_multi xdp_synproxy veristat > > + xskxceiver xdp_redirect_multi xdp_synproxy veristat xdp_hw_metadata > > > > TEST_CUSTOM_PROGS = $(OUTPUT)/urandom_read $(OUTPUT)/sign-file > > TEST_GEN_FILES += liburandom_read.so > > @@ -383,6 +383,7 @@ test_subskeleton.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib > > test_subskeleton_lib.skel.h-deps := test_subskeleton_lib2.bpf.o test_subskeleton_lib.bpf.o > > test_usdt.skel.h-deps := test_usdt.bpf.o test_usdt_multispec.bpf.o > > xsk_xdp_progs.skel.h-deps := xsk_xdp_progs.bpf.o > > +xdp_hw_metadata.skel.h-deps := xdp_hw_metadata.bpf.o > > > > LINKED_BPF_SRCS := $(patsubst %.bpf.o,%.c,$(foreach skel,$(LINKED_SKELS),$($(skel)-deps))) > > > > @@ -580,6 +581,10 @@ $(OUTPUT)/xskxceiver: xskxceiver.c $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel. > > $(call msg,BINARY,,$@) > > $(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@ > > > > +$(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xdp_hw_metadata.skel.h | $(OUTPUT) > > + $(call msg,BINARY,,$@) > > + $(Q)$(CC) $(CFLAGS) -static $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@ > > My dev machine fails on '-static' :(. A few machines that I got also don't have > those static libraries, so likely the default environment that I got here. > > It seems to be the only binary using '-static' in this Makefile. Can it be > removed or at least not the default? Sure, I can leave it out. It's mostly here due to G's environment where it is easier to work with static binaries.