Skip to contentSkip to conversation

silence libtool warnings

PATCH In review Jan Kiszka 2 participants 2 messages Aug 11, 2006 – Aug 18, 2006

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 silence libtool warnings

As we should not statically link the native/rtdm libraries against our new CAN tools (that code may reside on small embedded devices soon...), the old "Linking the executable XXXX ... is not portable!" warning now pops up again during Xenomai user-space build.

Here is an approach to work around that warnings already at libtool level (though I'm still convinced dropping "-module" would make more sense).

Jan

---
 configure.in                  |    8 ++++++++
 src/skins/native/Makefile.am  |    6 ------
 src/skins/posix/Makefile.am   |    6 ------
 src/skins/rtdm/Makefile.am    |    6 ------
 src/skins/vrtx/Makefile.am    |    6 ------
 src/skins/vxworks/Makefile.am |    6 ------
 6 files changed, 8 insertions(+), 30 deletions(-)
configure.in +8 -0
Index: xenomai/configure.in
===================================================================
@@ -632,3 +632,11 @@ if test \! x$XENO_MAYBE_DOCDIR = x; then
 fi
 
 AC_OUTPUT()
+
+dnl
+dnl This suppresses the warnings "Linking the executable XXXX against the
+dnl loadable module YYY.so is not portable!"
+dnl
+
+sed -e 's/shouldnotlink=\$module/shouldnotlink=no/' libtool > libtool.patched
+mv libtool.patched libtool
src/skins/native/Makefile.am +0 -6
Index: xenomai/src/skins/native/Makefile.am
===================================================================
@@ -20,9 +20,3 @@ libnative_la_SOURCES = \
 libnative_la_CPPFLAGS = \
 	@XENO_USER_CFLAGS@ \
 	-I$(top_srcdir)/include
-
-install-exec-hook:
-	for la in $(lib_LTLIBRARIES); do \
-	    sed -e 's/shouldnotlink=yes/shouldnotlink=no/' $(DESTDIR)$(libdir)/$$la > $(DESTDIR)$(libdir)/$$la.patched; \
-	    mv $(DESTDIR)$(libdir)/$$la.patched $(DESTDIR)$(libdir)/$$la; \
-	done
src/skins/posix/Makefile.am +0 -6
Index: xenomai/src/skins/posix/Makefile.am
===================================================================
@@ -30,10 +30,4 @@ install-data-local:
 uninstall-local:
 	$(RM) $(DESTDIR)$(libdir)/posix.wrappers
 
-install-exec-hook:
-	for la in $(lib_LTLIBRARIES); do \
-	    sed -e 's/shouldnotlink=yes/shouldnotlink=no/' $(DESTDIR)$(libdir)/$$la > $(DESTDIR)$(libdir)/$$la.patched; \
-	    mv $(DESTDIR)$(libdir)/$$la.patched $(DESTDIR)$(libdir)/$$la; \
-	done
-
 EXTRA_DIST = posix.wrappers
src/skins/rtdm/Makefile.am +0 -6
Index: xenomai/src/skins/rtdm/Makefile.am
===================================================================
@@ -9,9 +9,3 @@ librtdm_la_SOURCES = \
 librtdm_la_CPPFLAGS = \
 	@XENO_USER_CFLAGS@ \
 	-I$(top_srcdir)/include
-
-install-exec-hook:
-	for la in $(lib_LTLIBRARIES); do \
-	    sed -e 's/shouldnotlink=yes/shouldnotlink=no/' $(DESTDIR)$(libdir)/$$la > $(DESTDIR)$(libdir)/$$la.patched; \
-	    mv $(DESTDIR)$(libdir)/$$la.patched $(DESTDIR)$(libdir)/$$la; \
-	done
src/skins/vrtx/Makefile.am +0 -6
Index: xenomai/src/skins/vrtx/Makefile.am
===================================================================
@@ -17,9 +17,3 @@ libvrtx_la_SOURCES = \
 libvrtx_la_CPPFLAGS = \
 	@XENO_USER_CFLAGS@ \
 	-I$(top_srcdir)/include
-
-install-exec-hook:
-	for la in $(lib_LTLIBRARIES); do \
-	    sed -e 's/shouldnotlink=yes/shouldnotlink=no/' $(DESTDIR)$(libdir)/$$la > $(DESTDIR)$(libdir)/$$la.patched; \
-	    mv $(DESTDIR)$(libdir)/$$la.patched $(DESTDIR)$(libdir)/$$la; \
-	done
src/skins/vxworks/Makefile.am +0 -6
Index: xenomai/src/skins/vxworks/Makefile.am
===================================================================
@@ -18,9 +18,3 @@ libvxworks_la_SOURCES = \
 libvxworks_la_CPPFLAGS = \
 	@XENO_USER_CFLAGS@ \
 	-I$(top_srcdir)/include
-
-install-exec-hook:
-	for la in $(lib_LTLIBRARIES); do \
-	    sed -e 's/shouldnotlink=yes/shouldnotlink=no/' $(DESTDIR)$(libdir)/$$la > $(DESTDIR)$(libdir)/$$la.patched; \
-	    mv $(DESTDIR)$(libdir)/$$la.patched $(DESTDIR)$(libdir)/$$la; \
-	done
#1 lore raw

Making skin libraries not dlopenable (was: Re: [Xenomai-core] [PATCH] silence libtool warnings)

Quoted 7 lines · Jan Kiszka

As we should not statically link the native/rtdm libraries against our new CAN tools (that code may reside on small embedded devices soon...), the old "Linking the executable XXXX ... is not portable!" warning now pops up again during Xenomai user-space build.

Here is an approach to work around that warnings already at libtool level (though I'm still convinced dropping "-module" would make more sense).

I don't like the idea of patching the .la files, really. But thinking a bit more about the -module option than previously, it's likely that one would want to dlopen a library using the skin, rather than the skin itself. So I would eventually vote for getting rid of -module instead; it looks like much saner.

If people have objections so as making skin libraries not dlopenable anymore, it's the right time to express them.

Signature · 1 line
Philippe.