[CRIU] [RFC PATCH 19/21] zdtm: Makefile: build TLS-using tests with -shared rather than -pie

Ivan Shapovalov intelfx at intelfx.name
Fri Feb 19 06:50:42 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/live/static/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
index 8d9340c..3ea47c4 100644
--- a/test/zdtm/live/static/Makefile
+++ b/test/zdtm/live/static/Makefile
@@ -264,7 +264,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.1



More information about the CRIU mailing list