netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/bpf: add LDFLAGS when building test_verifier
@ 2021-03-29 18:06 Jisheng Zhang
  2021-03-29 20:04 ` Song Liu
  2021-03-31 19:02 ` Andrii Nakryiko
  0 siblings, 2 replies; 3+ messages in thread
From: Jisheng Zhang @ 2021-03-29 18:06 UTC (permalink / raw)
  To: Shuah Khan, Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh
  Cc: linux-kselftest, netdev, bpf, linux-kernel

From: Jisheng Zhang <jszhang@kernel.org>

This is useful for cross compile process to point linker to the
correct libelf, libcap, libz path.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 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 044bfdcf5b74..dac1c5094e28 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -447,7 +447,7 @@ verifier/tests.h: verifier/*.c
 		) > verifier/tests.h)
 $(OUTPUT)/test_verifier: test_verifier.c verifier/tests.h $(BPFOBJ) | $(OUTPUT)
 	$(call msg,BINARY,,$@)
-	$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
+	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
 
 # Make sure we are able to include and link libbpf against c++.
 $(OUTPUT)/test_cpp: test_cpp.cpp $(OUTPUT)/test_core_extern.skel.h $(BPFOBJ)
-- 
2.31.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-31 19:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 18:06 [PATCH] selftests/bpf: add LDFLAGS when building test_verifier Jisheng Zhang
2021-03-29 20:04 ` Song Liu
2021-03-31 19:02 ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).