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(-)

Index: xenomai/configure.in
===================================================================
--- xenomai.orig/configure.in
+++ 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
Index: xenomai/src/skins/native/Makefile.am
===================================================================
--- xenomai.orig/src/skins/native/Makefile.am
+++ 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
Index: xenomai/src/skins/posix/Makefile.am
===================================================================
--- xenomai.orig/src/skins/posix/Makefile.am
+++ 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
Index: xenomai/src/skins/rtdm/Makefile.am
===================================================================
--- xenomai.orig/src/skins/rtdm/Makefile.am
+++ 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
Index: xenomai/src/skins/vrtx/Makefile.am
===================================================================
--- xenomai.orig/src/skins/vrtx/Makefile.am
+++ 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
Index: xenomai/src/skins/vxworks/Makefile.am
===================================================================
--- xenomai.orig/src/skins/vxworks/Makefile.am
+++ 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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to