diff options
author | Johannes Schanda <schanda@itestra.de> | 2013-08-22 16:08:31 +0200 |
---|---|---|
committer | Johannes Schanda <schanda@itestra.de> | 2013-08-22 17:06:01 +0200 |
commit | 391338e95ce7d4190211d7b63c49c1cf71fb0bed (patch) | |
tree | 23ae3c61d84bfb4fe505f9f1a6071bec9c2665ba | |
parent | ddc9dc7b5e32c85579deda648c00ef97ab1b8684 (diff) | |
download | genivi-common-api-runtime-391338e95ce7d4190211d7b63c49c1cf71fb0bed.tar.gz |
Describe lining requirements for bindings and glue code
Change-Id: Iac2383baa0ed3cd1b076068993699eb72f376371
-rw-r--r-- | CommonAPI.pc.in | 2 | ||||
-rw-r--r-- | README | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/CommonAPI.pc.in b/CommonAPI.pc.in index 4b47bcf..1c3fe1c 100644 --- a/CommonAPI.pc.in +++ b/CommonAPI.pc.in @@ -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 @@ -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 |