diff mbox series

[2/3] selftests/rseq: Build with LDFLAGS

Message ID 20200117165330.17015-2-daniel.diaz@linaro.org (mailing list archive)
State New
Headers show
Series [1/3] selftests/x86: Build with LDFLAGS and LDLIBS | expand

Commit Message

Daniel Díaz Jan. 17, 2020, 4:53 p.m. UTC
During cross-compilation, it was discovered that LDFLAGS 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>
---
 tools/testing/selftests/rseq/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/rseq/Makefile b/tools/testing/selftests/rseq/Makefile
index d6469535630a..2d2d0c283de1 100644
--- a/tools/testing/selftests/rseq/Makefile
+++ b/tools/testing/selftests/rseq/Makefile
@@ -22,15 +22,15 @@  TEST_PROGS = run_param_test.sh
 include ../lib.mk
 
 $(OUTPUT)/librseq.so: rseq.c rseq.h rseq-*.h
-	$(CC) $(CFLAGS) -shared -fPIC $< $(LDLIBS) -o $@
+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fPIC $< $(LDLIBS) -o $@
 
 $(OUTPUT)/%: %.c $(TEST_GEN_PROGS_EXTENDED) rseq.h rseq-*.h
-	$(CC) $(CFLAGS) $< $(LDLIBS) -lrseq -o $@
+	$(CC) $(CFLAGS) $(LDFLAGS) $< $(LDLIBS) -lrseq -o $@
 
 $(OUTPUT)/param_test_benchmark: param_test.c $(TEST_GEN_PROGS_EXTENDED) \
 					rseq.h rseq-*.h
-	$(CC) $(CFLAGS) -DBENCHMARK $< $(LDLIBS) -lrseq -o $@
+	$(CC) $(CFLAGS) $(LDFLAGS) -DBENCHMARK $< $(LDLIBS) -lrseq -o $@
 
 $(OUTPUT)/param_test_compare_twice: param_test.c $(TEST_GEN_PROGS_EXTENDED) \
 					rseq.h rseq-*.h
-	$(CC) $(CFLAGS) -DRSEQ_COMPARE_TWICE $< $(LDLIBS) -lrseq -o $@
+	$(CC) $(CFLAGS) $(LDFLAGS) -DRSEQ_COMPARE_TWICE $< $(LDLIBS) -lrseq -o $@