From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-core] [PATCH 4/6] Mark libs nodlopen on initial-exec TLS
Date: Mon, 15 Dec 2008 15:34:36 +0100 [thread overview]
Message-ID: <20081215143436.15493.98981.stgit@domain.hid> (raw)
In-Reply-To: <20081215143435.15493.94798.stgit@domain.hid>
Mark libs with nodlopen if initial-exec __thread variables are used
because dlopen and this TLS model are in conflict.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
configure.in | 3 +++
src/skins/native/Makefile.am | 2 +-
src/skins/posix/Makefile.am | 2 +-
src/skins/psos+/Makefile.am | 2 +-
src/skins/rtai/Makefile.am | 2 +-
src/skins/rtdm/Makefile.am | 2 +-
src/skins/uitron/Makefile.am | 2 +-
src/skins/vrtx/Makefile.am | 2 +-
src/skins/vxworks/Makefile.am | 2 +-
9 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/configure.in b/configure.in
index 0a03057..6558ebf 100644
--- a/configure.in
+++ b/configure.in
@@ -764,6 +764,7 @@ LIBS="$LIBS -lrt"
AC_CHECK_FUNCS([shm_open shm_unlink])
LIBS="$save_LIBS"
+XENO_DLOPEN_CONSTRAINT=
AC_ARG_WITH([__thread],
AC_HELP_STRING([--without-__thread],
[do not use TLS features (allows for dlopen'ing Xenomai libs)]),
@@ -784,6 +785,7 @@ EOF
rm -f conftest*])
if test "$libc_cv_gcc___thread" = yes; then
AC_DEFINE(HAVE___THREAD,1,[config])
+ XENO_DLOPEN_CONSTRAINT="-Wl,-z -Wl,nodlopen"
fi
fi
@@ -805,6 +807,7 @@ AC_SUBST(XENO_USER_CFLAGS)
AC_SUBST(XENO_USER_LDFLAGS)
AC_SUBST(XENO_USER_APP_CFLAGS)
AC_SUBST(XENO_USER_APP_LDFLAGS)
+AC_SUBST(XENO_DLOPEN_CONSTRAINT)
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],
['$(top_srcdir)/src/skins/posix/posix.wrappers'])
AC_SUBST(XENO_POSIX_WRAPPERS)
diff --git a/src/skins/native/Makefile.am b/src/skins/native/Makefile.am
index a1f61d9..3497f90 100644
--- a/src/skins/native/Makefile.am
+++ b/src/skins/native/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = libnative.la
-libnative_la_LDFLAGS = -version-info 3:0:0 -lpthread
+libnative_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 3:0:0 -lpthread
libnative_la_SOURCES = \
alarm.c \
diff --git a/src/skins/posix/Makefile.am b/src/skins/posix/Makefile.am
index 2d42a28..d6a0912 100644
--- a/src/skins/posix/Makefile.am
+++ b/src/skins/posix/Makefile.am
@@ -4,7 +4,7 @@ lib_LTLIBRARIES = libpthread_rt.la
CPPFLAGS+=-I$(top_srcdir)/ksrc/skins
-libpthread_rt_la_LDFLAGS = -version-info 1:0:0 -lpthread
+libpthread_rt_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 1:0:0 -lpthread
libpthread_rt_la_SOURCES = \
init.c \
diff --git a/src/skins/psos+/Makefile.am b/src/skins/psos+/Makefile.am
index a579ebe..3e4464d 100644
--- a/src/skins/psos+/Makefile.am
+++ b/src/skins/psos+/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = libpsos.la
-libpsos_la_LDFLAGS = -version-info 0:0:0 -lpthread
+libpsos_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 0:0:0 -lpthread
libpsos_la_SOURCES = \
asr.c \
diff --git a/src/skins/rtai/Makefile.am b/src/skins/rtai/Makefile.am
index 8a92859..bae83c1 100644
--- a/src/skins/rtai/Makefile.am
+++ b/src/skins/rtai/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = librtai.la
-librtai_la_LDFLAGS = -version-info 0:0:0
+librtai_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 0:0:0
librtai_la_SOURCES = init.c \
shm.c
diff --git a/src/skins/rtdm/Makefile.am b/src/skins/rtdm/Makefile.am
index 00099be..73f97cf 100644
--- a/src/skins/rtdm/Makefile.am
+++ b/src/skins/rtdm/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = librtdm.la
-librtdm_la_LDFLAGS = -version-info 1:0:0 -lpthread
+librtdm_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 1:0:0 -lpthread
librtdm_la_SOURCES = \
core.c \
diff --git a/src/skins/uitron/Makefile.am b/src/skins/uitron/Makefile.am
index 3736a9b..a7ff65a 100644
--- a/src/skins/uitron/Makefile.am
+++ b/src/skins/uitron/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = libuitron.la
-libuitron_la_LDFLAGS = -version-info 0:0:0 -lpthread
+libuitron_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 0:0:0 -lpthread
libuitron_la_SOURCES = \
flag.c \
diff --git a/src/skins/vrtx/Makefile.am b/src/skins/vrtx/Makefile.am
index a5517f3..6233548 100644
--- a/src/skins/vrtx/Makefile.am
+++ b/src/skins/vrtx/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = libvrtx.la
-libvrtx_la_LDFLAGS = -version-info 0:0:0 -lpthread
+libvrtx_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 0:0:0 -lpthread
libvrtx_la_SOURCES = \
event.c \
diff --git a/src/skins/vxworks/Makefile.am b/src/skins/vxworks/Makefile.am
index 7a57055..b7b74e6 100644
--- a/src/skins/vxworks/Makefile.am
+++ b/src/skins/vxworks/Makefile.am
@@ -1,6 +1,6 @@
lib_LTLIBRARIES = libvxworks.la
-libvxworks_la_LDFLAGS = -version-info 1:0:0 -lpthread
+libvxworks_la_LDFLAGS = @XENO_DLOPEN_CONSTRAINT@ -version-info 1:0:0 -lpthread
libvxworks_la_SOURCES = \
errnoLib.c \
next prev parent reply other threads:[~2008-12-15 14:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 14:34 [Xenomai-core] [PATCH 0/6] Various fixes and cleanups Jan Kiszka
2008-12-15 14:34 ` Jan Kiszka [this message]
2008-12-15 14:34 ` [Xenomai-core] [PATCH 2/6] POSIX: Fix initialization of SCHED_RR threads Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 1/6] Handle priority changes of SCHED_RR tasks Jan Kiszka
2008-12-15 14:44 ` Gilles Chanteperdrix
2008-12-15 14:54 ` Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 3/6] POSIX: Optimize pthread_setschedparam fast path Jan Kiszka
2008-12-15 14:46 ` Gilles Chanteperdrix
2008-12-15 14:50 ` Jan Kiszka
2008-12-15 15:01 ` Gilles Chanteperdrix
2008-12-15 15:08 ` Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 6/6] POSIX: Do not auto-shadow main with dlopen enabled Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 5/6] Replace --without-__tread with --enable-dlopen-skins Jan Kiszka
2008-12-15 16:25 ` [Xenomai-core] [PATCH 0/6] Various fixes and cleanups Philippe Gerum
2008-12-15 16:34 ` Jan Kiszka
2008-12-15 16:50 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081215143436.15493.98981.stgit@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.