Skip to content

Commit

Permalink
selftests/bpf: Build urandom_read with LDFLAGS and LDLIBS
Browse files Browse the repository at this point in the history
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 <daniel.diaz@linaro.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
  • Loading branch information
Daniel Díaz authored and Daniel Borkmann committed Jan 22, 2020
1 parent f59bbfc commit 1222653
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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,,$@)
Expand Down

0 comments on commit 1222653

Please sign in to comment.