Describe lining requirements for bindings and glue code
authorJohannes Schanda <schanda@itestra.de>
Thu, 22 Aug 2013 14:08:31 +0000 (16:08 +0200)
committerJohannes Schanda <schanda@itestra.de>
Thu, 22 Aug 2013 15:06:01 +0000 (17:06 +0200)
Change-Id: Iac2383baa0ed3cd1b076068993699eb72f376371

CommonAPI.pc.in
README

index 4b47bcf..1c3fe1c 100644 (file)
@@ -6,5 +6,5 @@ includedir=@includedir@
 Name: Common API C++
 Description: GENIVI Common API C++ Library
 Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lCommonAPI
+Libs: -L${libdir} -lCommonAPI 
 Cflags: -I${includedir}/CommonAPI-@PACKAGE_VERSION@
\ No newline at end of file
diff --git a/README b/README
index 019a3f5..716a182 100644 (file)
--- a/README
+++ b/README
@@ -53,6 +53,27 @@ Use autotools to build this package:
 ----
 If the environment variable GTEST_CONFIG is set to the path of the gtest-config script in a Gtest tree test will also be built.
 
+== Linking against CommonAPI
+
+CommonAPI bindings requires successful activation of all static initialization code on library load. Therefore it is 
+necessary to activate certain linker flags to ensure this is always the case. These should be specified in the 
+pkg-config files of the respective bindings, but are also listed here. In case of dynamic linking (.so) 
+--no-as-needed must be specified:
+----
+-Wl,--no-as-needed -lbindingLib -Wl,--as-needed 
+----
+
+In case of static linking --whole-archive must be specified:
+----
+-Wl,--whole-archive bindingLib.a -Wl,--no-whole-archive 
+----
+
+=== Linking generated proxies & stubs
+
+Generated proxies and stubs also require successful activation of all static initialization code on load.
+If they are provided in either a static or dynamic library to the application they must also be linked wrapped in the
+flags described above.
+
 == Elements marked as deprecated
 
 All elements that are marked as deprecated on Common API level are considered to be redundant, and normally