From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

tests: avoid GOLD linker on three problematic tests

Three tests fail if the system's default linker is gold. In OSv's makefile,
we explicitly choose the bfd linker because of gold's shortcomings, but in
the test Makefile we let the build machine's distribution to choose its own
default.

Fixes failures on tst-mmap, tst-elf-permissions and tst-tls.
Fixes #891 (this is more a work-around than a fix, but it will do for now).

Signed-off-by: Nadav Har'El <n...@scylladb.com>

---
diff --git a/modules/tests/Makefile b/modules/tests/Makefile
--- a/modules/tests/Makefile
+++ b/modules/tests/Makefile
@@ -97,6 +97,14 @@ tests += testrunner.so
 $(out)/tests/tst-mmap.so: COMMON += -Wl,-z,now
 $(out)/tests/tst-elf-permissions.so: COMMON += -Wl,-z,relro

+# The following tests use special linker trickery which apprarently
+# doesn't work as expected with GOLD linker, so we need to choose BFD.
+# TODO: figure out why this workaround was needed (the reason may be
+# different for each of these tests), and avoid this workaround!
+$(out)/tests/tst-mmap.so: COMMON += -fuse-ld=bfd
+$(out)/tests/tst-elf-permissions.so: COMMON += -fuse-ld=bfd
+$(out)/tests/tst-tls.so: COMMON += -fuse-ld=bfd
+
 $(out)/tests/tst-tls.so: \
                $(src)/tests/tst-tls.cc \
                $(out)/tests/libtls.so

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to