Module: xenomai-3
Branch: master
Commit: a7243543ecca5d8cfe9b7a4d76cdb57ae252f6a9
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a7243543ecca5d8cfe9b7a4d76cdb57ae252f6a9

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Mar 12 12:21:18 2017 +0100

lib/cobalt: move mode checking wrappers to static archive

The mode checking wrappers must reside in a static archive, so that
the linker will pull them on demand, dropping the requirement for
providing potentially conflicting placeholders for wrapped symbols
which may not be present in both C and C++ support libraries
(e.g. __cxa_guard_acquire/release/abort from the one-time C++
constructor API).

See http://www.xenomai.org/pipermail/xenomai/2017-March/037184.html

---

 configure.ac                                     |   15 ++++++----
 debian/libxenomai-dev.install                    |    2 +-
 demo/alchemy/Makefile.am                         |    5 ++--
 demo/alchemy/cobalt/Makefile.am                  |   16 +++++------
 demo/posix/cobalt/Makefile.am                    |    2 +-
 demo/posix/cyclictest/Makefile.am                |    6 ++--
 lib/boilerplate/init/bootstrap.c                 |   12 ++++----
 lib/cobalt/Makefile.am                           |   24 ++++++++++++++--
 lib/cobalt/assert_context.c                      |   13 ---------
 lib/cobalt/malloc-nowrap.c                       |   30 ++++++++++++++++++++
 lib/cobalt/malloc.c                              |   33 ++++++++++++++++++++++
 lib/cobalt/{assert.wrappers => modechk.wrappers} |    0
 lib/cobalt/wrappers.c                            |   12 --------
 lib/copperplate/regd/Makefile.am                 |    2 +-
 scripts/wrap-link.sh                             |    6 ++--
 scripts/xeno-config-cobalt.in                    |    4 +--
 testsuite/clocktest/Makefile.am                  |    2 +-
 testsuite/gpiotest/Makefile.am                   |    4 +--
 testsuite/latency/Makefile.am                    |    6 ++--
 testsuite/smokey/Makefile.am                     |    2 +-
 testsuite/smokey/net_common/Makefile.am          |    2 +-
 testsuite/spitest/Makefile.am                    |    4 +--
 testsuite/switchtest/Makefile.am                 |    6 ++--
 utils/analogy/Makefile.am                        |   18 ++++++------
 utils/autotune/Makefile.am                       |    2 +-
 utils/can/Makefile.am                            |    6 ++--
 utils/corectl/Makefile.am                        |    2 +-
 utils/hdb/Makefile.am                            |    4 +--
 28 files changed, 150 insertions(+), 90 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4792e46..d5c5aaa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -796,19 +796,19 @@ dnl Build wrapping information. XENO_POSIX_WRAPPERS lists 
all wrapping
 dnl directives in a format the linker understands, for building the
 dnl in-tree executables which require POSIX symbol wrapping.
 
-   assert_wrappers="$topdir/lib/cobalt/assert.wrappers"
+   modechk_wrappers="$topdir/lib/cobalt/modechk.wrappers"
    cobalt_wrappers="$topdir/lib/cobalt/cobalt.wrappers"
    if [[ $ac_cv_ld_file_option = yes ]]; then
-       XENO_POSIX_WRAPPERS="-Wl,@$assert_wrappers -Wl,@$cobalt_wrappers"
+       XENO_POSIX_WRAPPERS="-Wl,@$modechk_wrappers -Wl,@$cobalt_wrappers"
    else
-       XENO_POSIX_WRAPPERS=`cat $assert_wrappers $cobalt_wrappers | \
+       XENO_POSIX_WRAPPERS=`cat $modechk_wrappers $cobalt_wrappers | \
                        while read wrap_option symbol ; do \
                                echo -n "-Wl,$wrap_option,$symbol " ; \
                        done`
    fi
 
    AC_SUBST(XENO_POSIX_WRAPPERS)
-   AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ["$assert_wrappers 
$cobalt_wrappers"])
+   AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ["$modechk_wrappers 
$cobalt_wrappers"])
 fi
 
 dnl
@@ -818,8 +818,11 @@ dnl
 
XENO_AUTOINIT_LDFLAGS='$(top_builddir)/lib/boilerplate/init/bootstrap-internal.o'"
 -Wl,--wrap=main -Wl,--dynamic-list=$topdir/scripts/dynlist.ld"
 AC_SUBST(XENO_AUTOINIT_LDFLAGS)
 
-XENO_CORE_LIB=$rtcore_type/lib${rtcore_type}.la
-AC_SUBST(XENO_CORE_LIB)
+XENO_CORE_LDADD="\$(top_builddir)/lib/$rtcore_type/lib${rtcore_type}.la"
+if test $rtcore_type = cobalt; then
+   XENO_CORE_LDADD="$XENO_CORE_LDADD \$(top_builddir)/lib/cobalt/libmodechk.a"
+fi
+AC_SUBST(XENO_CORE_LDADD)
 
 AC_SUBST(DOXYGEN_SHOW_INCLUDE_FILES)
 AC_SUBST(DOXYGEN_HAVE_DOT)
diff --git a/debian/libxenomai-dev.install b/debian/libxenomai-dev.install
index 6d7eb7b..9f95c35 100644
--- a/debian/libxenomai-dev.install
+++ b/debian/libxenomai-dev.install
@@ -2,6 +2,6 @@ usr/include
 usr/lib/*.la
 usr/lib/*.a
 usr/lib/*.so
-usr/lib/assert.wrappers
+usr/lib/modechk.wrappers
 usr/lib/cobalt.wrappers
 usr/lib/dynlist.ld
diff --git a/demo/alchemy/Makefile.am b/demo/alchemy/Makefile.am
index e6cda07..80def4f 100644
--- a/demo/alchemy/Makefile.am
+++ b/demo/alchemy/Makefile.am
@@ -13,8 +13,9 @@ cppflags =                            \
 ldadd =                                        \
        ../../lib/alchemy/libalchemy.la         \
        ../../lib/copperplate/libcopperplate.la \
-       ../../lib/@XENO_CORE_LIB@               \
-        @XENO_USER_LDADD@
+       @XENO_CORE_LDADD@                       \
+       @XENO_USER_LDADD@                       \
+       -lpthread -lrt -lm
 
 altency_SOURCES = altency.c
 altency_CPPFLAGS = $(cppflags)
diff --git a/demo/alchemy/cobalt/Makefile.am b/demo/alchemy/cobalt/Makefile.am
index dad5c32..98d2345 100644
--- a/demo/alchemy/cobalt/Makefile.am
+++ b/demo/alchemy/cobalt/Makefile.am
@@ -8,14 +8,14 @@ cppflags =                    \
        $(XENO_USER_CFLAGS)     \
        -I$(top_srcdir)/include
 
-ldadd =                                                \
-       ../../../lib/alchemy/libalchemy.la              \
-       ../../../lib/copperplate/libcopperplate.la      \
-       ../../../lib/cobalt/libcobalt.la                \
-       @XENO_AUTOINIT_LDFLAGS@                         \
-       $(XENO_POSIX_WRAPPERS)                          \
-        @XENO_USER_LDADD@                              \
-       -lpthread -lrt
+ldadd =                                        \
+       @XENO_AUTOINIT_LDFLAGS@                 \
+       $(XENO_POSIX_WRAPPERS)                  \
+       ../../../lib/alchemy/libalchemy.la      \
+       ../../../lib/copperplate/libcopperplate.la \
+       @XENO_CORE_LDADD@                       \
+       @XENO_USER_LDADD@                       \
+       -lrt -lpthread -lm
 
 cross_link_SOURCES = cross-link.c
 cross_link_CPPFLAGS = $(cppflags)
diff --git a/demo/posix/cobalt/Makefile.am b/demo/posix/cobalt/Makefile.am
index eedc346..cba9247 100644
--- a/demo/posix/cobalt/Makefile.am
+++ b/demo/posix/cobalt/Makefile.am
@@ -20,7 +20,7 @@ cppflags =                    \
 ldflags = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 
 ldadd =                                        \
-       ../../../lib/cobalt/libcobalt.la        \
+        @XENO_CORE_LDADD@                      \
         @XENO_USER_LDADD@                      \
        -lpthread -lrt
 
diff --git a/demo/posix/cyclictest/Makefile.am 
b/demo/posix/cyclictest/Makefile.am
index a35fdca..248e406 100644
--- a/demo/posix/cyclictest/Makefile.am
+++ b/demo/posix/cyclictest/Makefile.am
@@ -27,7 +27,7 @@ cyclictest_SOURCES =  \
 
 cyclictest_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 
-cyclictest_LDADD =                     \
-       ../../../lib/@XENO_CORE_LIB@    \
-        @XENO_USER_LDADD@              \
+cyclictest_LDADD =             \
+       @XENO_CORE_LDADD@       \
+       @XENO_USER_LDADD@       \
        -lpthread -lrt -lm
diff --git a/lib/boilerplate/init/bootstrap.c b/lib/boilerplate/init/bootstrap.c
index 118f861..54d1c46 100644
--- a/lib/boilerplate/init/bootstrap.c
+++ b/lib/boilerplate/init/bootstrap.c
@@ -17,7 +17,7 @@
  */
 #include <sys/types.h>
 #include <unistd.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <xenomai/init.h>
@@ -77,7 +77,7 @@ __bootstrap_ctor static void xenomai_bootstrap(void)
                if (fd < 0)
                        return;
 
-               arglist = malloc(len);
+               arglist = __STD(malloc(len));
                if (arglist == NULL) {
                        __STD(close(fd));
                        return;
@@ -87,14 +87,14 @@ __bootstrap_ctor static void xenomai_bootstrap(void)
                __STD(close(fd));
 
                if (ret < 0) {
-                       free(arglist);
+                       __STD(free(arglist));
                        return;
                }
 
                if (ret < len)
                        break;
 
-               free(arglist);
+               __STD(free(arglist));
                len <<= 1;
        }
 
@@ -106,9 +106,9 @@ __bootstrap_ctor static void xenomai_bootstrap(void)
                p += strlen(p) + 1;
        }
 
-       v = malloc((n + 1) * sizeof(char *));
+       v = __STD(malloc((n + 1) * sizeof(char *)));
        if (v == NULL) {
-               free(arglist);
+               __STD(free(arglist));
                return;
        }
 
diff --git a/lib/cobalt/Makefile.am b/lib/cobalt/Makefile.am
index 459b207..6189755 100644
--- a/lib/cobalt/Makefile.am
+++ b/lib/cobalt/Makefile.am
@@ -43,15 +43,33 @@ libcobalt_la_CPPFLAGS =                     \
        -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
+# The mode checking wrappers must reside in a static archive, so that
+# the linker will pull them on demand, dropping the requirement for
+# providing potentially conflicting placeholders for wrapped symbols
+# which may not be present in both C and C++ support libraries
+# (e.g. __cxa_guard_acquire/release/abort from the one-time C++
+# constructor API).
+
+lib_LIBRARIES = libmodechk.a
+
+libmodechk_a_SOURCES = \
+       malloc.c        \
+       malloc-nowrap.c
+
+libmodechk_a_CPPFLAGS =                        \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(top_srcdir)/include/cobalt  \
+       -I$(top_srcdir)/include
+
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(libdir)
        $(INSTALL_DATA) $(srcdir)/cobalt.wrappers $(DESTDIR)$(libdir)
-       $(INSTALL_DATA) $(srcdir)/assert.wrappers $(DESTDIR)$(libdir)
+       $(INSTALL_DATA) $(srcdir)/modechk.wrappers $(DESTDIR)$(libdir)
 
 uninstall-local:
        $(RM) $(DESTDIR)$(libdir)/cobalt.wrappers
-       $(RM) $(DESTDIR)$(libdir)/assert.wrappers
+       $(RM) $(DESTDIR)$(libdir)/modechk.wrappers
 
-EXTRA_DIST = cobalt.wrappers assert.wrappers
+EXTRA_DIST = cobalt.wrappers modechk.wrappers
 
 SUBDIRS = arch
diff --git a/lib/cobalt/assert_context.c b/lib/cobalt/assert_context.c
index 2085953..625cb76 100644
--- a/lib/cobalt/assert_context.c
+++ b/lib/cobalt/assert_context.c
@@ -53,16 +53,3 @@ void assert_nrt_fast(void)   /* OBSOLETE */
 {
        assert_nrt();
 }
-
-/* Memory allocation services */
-COBALT_IMPL(void *, malloc, (size_t size))
-{
-       assert_nrt();
-       return __STD(malloc(size));
-}
-
-COBALT_IMPL(void, free, (void *ptr))
-{
-       assert_nrt();
-       __STD(free(ptr));
-}
diff --git a/lib/cobalt/malloc-nowrap.c b/lib/cobalt/malloc-nowrap.c
new file mode 100644
index 0000000..416fbad
--- /dev/null
+++ b/lib/cobalt/malloc-nowrap.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2008, 2009 Jan Kiszka <jan.kis...@siemens.com>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+ */
+#include <stdlib.h>
+
+__weak
+void *__real_malloc(size_t size)
+{
+       return malloc(size);
+}
+
+__weak
+void __real_free(void *ptr)
+{
+       free(ptr);
+}
diff --git a/lib/cobalt/malloc.c b/lib/cobalt/malloc.c
new file mode 100644
index 0000000..3f39d06
--- /dev/null
+++ b/lib/cobalt/malloc.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2008, 2009 Jan Kiszka <jan.kis...@siemens.com>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+ */
+#include <stdlib.h>
+
+void assert_nrt(void);
+
+/* Memory allocation services */
+COBALT_IMPL(void *, malloc, (size_t size))
+{
+       assert_nrt();
+       return __STD(malloc(size));
+}
+
+COBALT_IMPL(void, free, (void *ptr))
+{
+       assert_nrt();
+       __STD(free(ptr));
+}
diff --git a/lib/cobalt/assert.wrappers b/lib/cobalt/modechk.wrappers
similarity index 100%
rename from lib/cobalt/assert.wrappers
rename to lib/cobalt/modechk.wrappers
diff --git a/lib/cobalt/wrappers.c b/lib/cobalt/wrappers.c
index 09c74e5..bf1fdf4 100644
--- a/lib/cobalt/wrappers.c
+++ b/lib/cobalt/wrappers.c
@@ -473,18 +473,6 @@ void __real_vsyslog(int priority, const char *fmt, va_list 
ap)
 }
 
 __weak
-void *__real_malloc(size_t size)
-{
-       return malloc(size);
-}
-
-__weak
-void __real_free(void *ptr)
-{
-       free(ptr);
-}
-
-__weak
 int __real_gettimeofday(struct timeval *tv, struct timezone *tz)
 {
        return gettimeofday(tv, tz);
diff --git a/lib/copperplate/regd/Makefile.am b/lib/copperplate/regd/Makefile.am
index 69c7e07..c1893c1 100644
--- a/lib/copperplate/regd/Makefile.am
+++ b/lib/copperplate/regd/Makefile.am
@@ -10,7 +10,7 @@ LDFLAGS = $(XENO_POSIX_WRAPPERS)
 
 LDADD =                        \
        ../libcopperplate.la    \
-       ../../@XENO_CORE_LIB@   \
+       @XENO_CORE_LDADD@       \
        @XENO_USER_LDADD@       \
        -lpthread -lrt
 
diff --git a/scripts/wrap-link.sh b/scripts/wrap-link.sh
index 1b8c3f4..aab7899 100755
--- a/scripts/wrap-link.sh
+++ b/scripts/wrap-link.sh
@@ -19,10 +19,10 @@ Options:
 -n dry run (print all commands but don't run any)
 
 Example:
-$1 -v gcc -o foo foo.o -Wl,@/usr/xenomai/lib/cobalt.wrappers 
-L/usr/xenomai/lib -lcobalt -lpthread -lrt
+$1 -v gcc -o foo foo.o -Wl,@/usr/xenomai/lib/cobalt.wrappers 
-L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt
 will print and run:
-+ gcc -o foo.tmp -Wl,-Ur -nostdlib foo.o -Wl,@/usr/xenomai/lib/cobalt.wrappers 
-L/usr/xenomai/lib
-+ gcc -o foo foo.tmp -L/usr/xenomai/lib -lcobalt -lpthread -lrt
++ gcc -o foo.tmp -Wl,-Ur -nostdlib foo.o -Wl,@/usr/xenomai/lib/cobalt.wrappers 
-Wl,@/usr/xenomai/lib/modechk.wrappers -L/usr/xenomai/lib
++ gcc -o foo foo.tmp -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt
 + rm foo.tmp
 EOF
 }
diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in
index 3e1f64c..c014176 100644
--- a/scripts/xeno-config-cobalt.in
+++ b/scripts/xeno-config-cobalt.in
@@ -15,7 +15,7 @@ XENO_CC="@CC@"
 XENO_TARGET_ARCH="@XENO_TARGET_ARCH@"
 XENO_INCLUDE_DIR="${staging}${includedir}"
 XENO_BASE_CFLAGS="-I$XENO_INCLUDE_DIR/cobalt -I$XENO_INCLUDE_DIR 
@XENO_USER_APP_CFLAGS@ -D__COBALT__"
-XENO_POSIX_LDFLAGS="-L${staging}${libdir} -lcobalt -lpthread -lrt 
@XENO_USER_APP_LDFLAGS@"
+XENO_POSIX_LDFLAGS="-L${staging}${libdir} -lcobalt -lmodechk -lpthread -lrt 
@XENO_USER_APP_LDFLAGS@"
 XENO_LIBRARY_DIR="${staging}${libdir}"
 LD_FILE_OPTION="@LD_FILE_OPTION@"
 
@@ -235,7 +235,7 @@ if test x$do_ldflags = xy; then
        echo "no API specified, missing --skin before --ldflags" 1>&2
        exit 1
     fi
-    ldflags="`dump_wrappers assert.wrappers`"
+    ldflags="`dump_wrappers modechk.wrappers`"
     test x$compat = xy && ldflags="-ltrank $ldflags"
     copperplate=
     for skin in $skin_list; do
diff --git a/testsuite/clocktest/Makefile.am b/testsuite/clocktest/Makefile.am
index 7290063..424f59d 100644
--- a/testsuite/clocktest/Makefile.am
+++ b/testsuite/clocktest/Makefile.am
@@ -13,6 +13,6 @@ clocktest_CPPFLAGS =                                  \
 clocktest_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 
 clocktest_LDADD =                      \
-       ../../lib/cobalt/libcobalt.la   \
+        @XENO_CORE_LDADD@              \
         @XENO_USER_LDADD@              \
        -lpthread -lrt
diff --git a/testsuite/gpiotest/Makefile.am b/testsuite/gpiotest/Makefile.am
index b01427b..7615439 100644
--- a/testsuite/gpiotest/Makefile.am
+++ b/testsuite/gpiotest/Makefile.am
@@ -14,6 +14,6 @@ gpiotest_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ 
$(XENO_POSIX_WRAPPERS)
 
 gpiotest_LDADD =                       \
        ../../lib/smokey/libsmokey.la   \
-       ../../lib/@XENO_CORE_LIB@       \
-        @XENO_USER_LDADD@              \
+       @XENO_CORE_LDADD@               \
+       @XENO_USER_LDADD@               \
        -lpthread -lrt
diff --git a/testsuite/latency/Makefile.am b/testsuite/latency/Makefile.am
index cfa18c4..9471615 100644
--- a/testsuite/latency/Makefile.am
+++ b/testsuite/latency/Makefile.am
@@ -12,7 +12,7 @@ latency_CPPFLAGS =            \
 
 latency_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 
-latency_LDADD =                                \
-       ../../lib/@XENO_CORE_LIB@       \
-        @XENO_USER_LDADD@              \
+latency_LDADD =                        \
+       @XENO_CORE_LDADD@       \
+       @XENO_USER_LDADD@       \
        -lpthread -lrt -lm
diff --git a/testsuite/smokey/Makefile.am b/testsuite/smokey/Makefile.am
index b0904d2..5a82018 100644
--- a/testsuite/smokey/Makefile.am
+++ b/testsuite/smokey/Makefile.am
@@ -59,6 +59,6 @@ smokey_LDADD =                                        \
        $(plugin_list)                          \
        ../../lib/smokey/libsmokey.la           \
        ../../lib/copperplate/libcopperplate.la \
-       ../../lib/@XENO_CORE_LIB@               \
+       @XENO_CORE_LDADD@                       \
         @XENO_USER_LDADD@                      \
        -lpthread -lrt
diff --git a/testsuite/smokey/net_common/Makefile.am 
b/testsuite/smokey/net_common/Makefile.am
index a0c6522..5185449 100644
--- a/testsuite/smokey/net_common/Makefile.am
+++ b/testsuite/smokey/net_common/Makefile.am
@@ -22,6 +22,6 @@ smokey_net_server_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@
 
 smokey_net_server_LDADD = \
        libnet_common.a \
-       $(top_builddir)/lib/@XENO_CORE_LIB@ \
+       @XENO_CORE_LDADD@ \
        @XENO_USER_LDADD@ \
        -lpthread -lrt
diff --git a/testsuite/spitest/Makefile.am b/testsuite/spitest/Makefile.am
index ccdd392..f5c3091 100644
--- a/testsuite/spitest/Makefile.am
+++ b/testsuite/spitest/Makefile.am
@@ -14,6 +14,6 @@ spitest_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ 
$(XENO_POSIX_WRAPPERS)
 
 spitest_LDADD =                        \
        ../../lib/smokey/libsmokey.la   \
-       ../../lib/@XENO_CORE_LIB@       \
-        @XENO_USER_LDADD@              \
+       @XENO_CORE_LDADD@               \
+       @XENO_USER_LDADD@               \
        -lpthread -lrt
diff --git a/testsuite/switchtest/Makefile.am b/testsuite/switchtest/Makefile.am
index c479cc3..9ccfa98 100644
--- a/testsuite/switchtest/Makefile.am
+++ b/testsuite/switchtest/Makefile.am
@@ -12,7 +12,7 @@ switchtest_CPPFLAGS =                 \
 
 switchtest_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 
-switchtest_LDADD =                     \
-       ../../lib/@XENO_CORE_LIB@       \
-       @XENO_USER_LDADD@               \
+switchtest_LDADD =             \
+       @XENO_CORE_LDADD@       \
+       @XENO_USER_LDADD@       \
        -lpthread -lrt
diff --git a/utils/analogy/Makefile.am b/utils/analogy/Makefile.am
index 6b91121..31da2e0 100644
--- a/utils/analogy/Makefile.am
+++ b/utils/analogy/Makefile.am
@@ -25,7 +25,7 @@ analogy_config_SOURCES = analogy_config.c
 analogy_config_LDADD = \
        @XENO_AUTOINIT_LDFLAGS@         \
        ../../lib/analogy/libanalogy.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
 
@@ -34,7 +34,7 @@ analogy_calibrate.c: calibration_ni_m.h
 analogy_calibrate_LDADD = \
        @XENO_AUTOINIT_LDFLAGS@         \
        ../../lib/analogy/libanalogy.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lpthread -lrt -lm
 
@@ -44,7 +44,7 @@ cmd_read_LDADD = \
        ../../lib/analogy/libanalogy.la \
        ../../lib/alchemy/libalchemy.la \
        ../../lib/copperplate/libcopperplate.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
 
@@ -54,7 +54,7 @@ cmd_write_LDADD = \
        ../../lib/analogy/libanalogy.la \
        ../../lib/alchemy/libalchemy.la \
        ../../lib/copperplate/libcopperplate.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
 
@@ -62,7 +62,7 @@ cmd_bits_SOURCES = cmd_bits.c
 cmd_bits_LDADD = \
        @XENO_AUTOINIT_LDFLAGS@         \
        ../../lib/analogy/libanalogy.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
 
@@ -70,7 +70,7 @@ insn_read_SOURCES = insn_read.c
 insn_read_LDADD = \
        @XENO_AUTOINIT_LDFLAGS@         \
        ../../lib/analogy/libanalogy.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
 
@@ -78,7 +78,7 @@ insn_write_SOURCES = insn_write.c
 insn_write_LDADD = \
        @XENO_AUTOINIT_LDFLAGS@         \
        ../../lib/analogy/libanalogy.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
 
@@ -86,7 +86,7 @@ insn_bits_SOURCES = insn_bits.c
 insn_bits_LDADD = \
        @XENO_AUTOINIT_LDFLAGS@         \
        ../../lib/analogy/libanalogy.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
 
@@ -95,6 +95,6 @@ wf_generate_LDADD = \
        @XENO_AUTOINIT_LDFLAGS@         \
         ./libwaveform.la \
        ../../lib/analogy/libanalogy.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lrt -lpthread -lm
diff --git a/utils/autotune/Makefile.am b/utils/autotune/Makefile.am
index 3ba6032..7d2143e 100644
--- a/utils/autotune/Makefile.am
+++ b/utils/autotune/Makefile.am
@@ -12,6 +12,6 @@ autotune_CPPFLAGS =           \
 autotune_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 
 autotune_LDADD =                       \
-       ../../lib/cobalt/libcobalt.la   \
+        @XENO_CORE_LDADD@              \
         @XENO_USER_LDADD@              \
        -lpthread -lrt
diff --git a/utils/can/Makefile.am b/utils/can/Makefile.am
index 2d67fa5..570758d 100644
--- a/utils/can/Makefile.am
+++ b/utils/can/Makefile.am
@@ -13,7 +13,7 @@ LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 rtcanconfig_SOURCES = rtcanconfig.c
 
 rtcanconfig_LDADD = \
-       ../../lib/cobalt/libcobalt.la   \
+        @XENO_CORE_LDADD@              \
         @XENO_USER_LDADD@              \
        -lpthread -lrt
 
@@ -22,7 +22,7 @@ rtcanrecv_SOURCES = rtcanrecv.c
 rtcanrecv_LDADD = \
        ../../lib/alchemy/libalchemy.la \
        ../../lib/copperplate/libcopperplate.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lpthread -lrt
 
@@ -31,6 +31,6 @@ rtcansend_SOURCES = rtcansend.c
 rtcansend_LDADD = \
        ../../lib/alchemy/libalchemy.la \
        ../../lib/copperplate/libcopperplate.la \
-       ../../lib/cobalt/libcobalt.la   \
+       @XENO_CORE_LDADD@               \
        @XENO_USER_LDADD@               \
        -lpthread -lrt
diff --git a/utils/corectl/Makefile.am b/utils/corectl/Makefile.am
index 4840488..4d9382c 100644
--- a/utils/corectl/Makefile.am
+++ b/utils/corectl/Makefile.am
@@ -12,6 +12,6 @@ corectl_CPPFLAGS =            \
 corectl_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS)
 
 corectl_LDADD =                                        \
-       ../../lib/cobalt/libcobalt.la           \
+        @XENO_CORE_LDADD@                      \
         @XENO_USER_LDADD@                      \
        -lpthread -lrt
diff --git a/utils/hdb/Makefile.am b/utils/hdb/Makefile.am
index b7e5dc0..5eb3d3d 100644
--- a/utils/hdb/Makefile.am
+++ b/utils/hdb/Makefile.am
@@ -10,6 +10,6 @@ hdb_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@
 
 hdb_LDADD =                                    \
        ../../lib/copperplate/libcopperplate.la \
-       ../../lib/@XENO_CORE_LIB@               \
-        @XENO_USER_LDADD@                      \
+       @XENO_CORE_LDADD@                       \
+       @XENO_USER_LDADD@                       \
        -lpthread -lrt


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to