[CRIU] [RFC PATCHv2 31/32] zdtm: Makefile: build TLS-using tests with -shared rather than -pie

Ivan Shapovalov intelfx at intelfx.name
Sat Mar 12 00:42:30 PST 2016


Somehow TLS-tests fail if build with -pie and loaded as shared objects
(as opposed to "if ran as usual executables").
For now, build them with -shared instead of -pie; this will prohibit
launching them in a standalone manner.

More information:
https://github.com/cloudius-systems/osv/issues/352
https://bugs.freedesktop.org/show_bug.cgi?id=35268

Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
 test/zdtm/static/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/zdtm/static/Makefile b/test/zdtm/static/Makefile
index 97898ec..f410112 100644
--- a/test/zdtm/static/Makefile
+++ b/test/zdtm/static/Makefile
@@ -278,7 +278,9 @@ uptime_grow:	override LDLIBS += -lrt -pthread
 unlink_largefile:	override CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
 inotify_system_nodel:	override CFLAGS += -DNODEL
 pthread00:		override LDLIBS += -pthread
+pthread00:		override LDFLAGS += -shared # -pie fails with TLS
 pthread01:		override LDLIBS += -pthread
+pthread01:		override LDFLAGS += -shared # -pie fails with TLS
 pthread02:		override LDLIBS += -pthread
 different_creds:	override LDLIBS += -pthread
 sigpending:		override LDLIBS += -pthread
-- 
2.7.2



More information about the CRIU mailing list