Module: xenomai-forge
Branch: next
Commit: 37931827b6bf1f1361366a39468640a8109a68e4
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=37931827b6bf1f1361366a39468640a8109a68e4

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Sep 23 15:04:42 2014 +0200

scripts/xeno-config: introduce --no-wrap

---

 doc/asciidoc/man1/xeno-config.adoc |   18 +++++++++++++++++-
 scripts/xeno-config-cobalt.in      |   10 +++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/doc/asciidoc/man1/xeno-config.adoc 
b/doc/asciidoc/man1/xeno-config.adoc
index b10b97d..31079ce 100644
--- a/doc/asciidoc/man1/xeno-config.adoc
+++ b/doc/asciidoc/man1/xeno-config.adoc
@@ -35,7 +35,7 @@ SYNOPSIS
 
 *xeno-config* *--version*
 
-*xeno-config* [*--cc*] [*--ccld*] [*--arch*] [*--prefix*] 
[*--posix|alchemy|rtdm|psos|vxworks|smokey*] [*--compat*] 
[*--auto-init*|*no-auto-init*] [*--cflags*] [*--kcflags*] [*--ldflags*] 
[*--library-dir*|*--libdir*|*--user-libdir*]
+*xeno-config* [*--cc*] [*--ccld*] [*--arch*] [*--prefix*] 
[*--posix|alchemy|rtdm|psos|vxworks|smokey*] [*--compat*] 
[*--auto-init*|*no-auto-init*] [*--no-wrap*] [*--cflags*] [*--kcflags*] 
[*--ldflags*] [*--library-dir*|*--libdir*|*--user-libdir*]
 
 DESCRIPTION
 ------------
@@ -119,6 +119,22 @@ service is invoked.
 
 *xeno-config* enables the Copperplate auto-init feature by default.
 
+*--no-wrap*::
+By default, *xeno-config* assumes that mainly non-POSIX applications
+using additional POSIX services for which a Cobalt-enabled
+implementation exists, will want the latter to be automatically
+substituted to the regular glibc call.
+
+As a consequence of such wrapping, an _Alchemy_-based application for
+instance, may still call POSIX I/O routines such as open(2), read(2)
+and/or write(2) to communicate with a RTDM device driver, without
+resorting to a non-standard API.
+
+This Cobalt-specific option tells *xeno-config* to omit the linker
+flags used for wrapping such POSIX routines to the Cobalt API,
+normally issued by *--ldflags*. *--no-wrap* only makes sense for dual
+kernel configurations, with non-POSIX APIs/skins.
+
 *--core*::
 Output the name of the real-time core the current Xenomai installation
 was built for. The possible values are _cobalt_ or _mercury_,
diff --git a/scripts/xeno-config-cobalt.in b/scripts/xeno-config-cobalt.in
index 42ee2af..f2369be 100644
--- a/scripts/xeno-config-cobalt.in
+++ b/scripts/xeno-config-cobalt.in
@@ -21,7 +21,8 @@ LD_FILE_OPTION="@LD_FILE_OPTION@"
 WRAP_MAIN_OPT="-Wl,--wrap=main 
-Wl,--dynamic-list=${XENO_LIBRARY_DIR}/dynlist.ld"
 WRAP_MAIN="$WRAP_MAIN_OPT"
 
-unset prefix exec_prefix libdir datadir datarootdir pkgdatadir includedir 
skin_list compat
+unset prefix exec_prefix libdir datadir datarootdir pkgdatadir
+unset includedir skin_list compat no_wrap
 
 dump_wrappers()
 {
@@ -54,6 +55,7 @@ Options :
         --prefix
         --[skin=]posix/cobalt|vxworks|psos|alchemy|rtdm|smokey
         --auto-init|no-auto-init
+        --no-wrap
         --cflags
         --kcflags
         --ldflags
@@ -133,6 +135,9 @@ while test $# -gt 0; do
        --auto-init)
            WRAP_MAIN="$WRAP_MAIN_OPT"
            ;;
+       --no-wrap)
+           no_wrap=y
+           ;;
         --lib*-dir|--libdir|--user-libdir)
             echo $XENO_LIBRARY_DIR
             ;;
@@ -212,6 +217,9 @@ while test $# -gt 0; do
                    vxworks|psos|alchemy|smokey)
                        copperplate="$WRAP_MAIN -lcopperplate"
                        ldflags="$ldflags -l$skin"
+                       if test x$no_wrap = x; then
+                          ldflags="`dump_wrappers cobalt.wrappers` $ldflags"
+                       fi
                        if [ -r ${XENO_LIBRARY_DIR}/${skin}.wrappers ]; then
                            ldflags=" `dump_wrappers ${skin}.wrappers` $ldflags"
                        fi


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

Reply via email to