From: Daniel Díaz Date: Wed, 22 Jan 2020 16:44:24 +0000 (+0100) Subject: selftests/bpf: Build urandom_read with LDFLAGS and LDLIBS X-Git-Tag: baikal/mips/sdk5.9~14444^2~46^2~3 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=7b8ce2155da30d12e3cd846bd16dc8b40626aa37;p=kernel.git selftests/bpf: Build urandom_read with LDFLAGS and LDLIBS During cross-compilation, it was discovered that LDFLAGS and LDLIBS were not being used while building binaries, leading to defaults which were not necessarily correct. OpenEmbedded reported this kind of problem: ERROR: QA Issue: No GNU_HASH in the ELF binary [...], didn't pass LDFLAGS? Signed-off-by: Daniel Díaz Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend --- diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index be8fe404a086c..5f41f5bd8033f 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -122,7 +122,7 @@ $(OUTPUT)/%:%.c $(OUTPUT)/urandom_read: urandom_read.c $(call msg,BINARY,,$@) - $(CC) -o $@ $< -Wl,--build-id + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) -Wl,--build-id $(OUTPUT)/test_stub.o: test_stub.c $(BPFOBJ) $(call msg,CC,,$@)