Fix linking failure when cross-compiling
authorAdrien Vergé <adrienverge@gmail.com>
Fri, 25 Apr 2014 16:12:24 +0000 (12:12 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 26 Apr 2014 21:52:11 +0000 (23:52 +0200)
commit4de5e07708b87957e055bb619045953a28267c79
treee31ed8b8edf11e7020c8b2260236ad9a0f58951e
parentf9ff7aa4f0f89c39d35c1e72f0beb99b69061d02
Fix linking failure when cross-compiling

Examples binaries in doc/examples require libs in liblttng-ust/.libs/,
and those libs require other libs in the same directory.  For instance
liblttng-ust.so uses liblttng-ust-tracepoint.so symbols, so the latter
is needed to properly link example programs.  Currently, ld is given
the lib dir only via -rpath (used for linking executables dependencies)
but not via -rpath-link (used for linking libs dependencies).

When compiling regularly, this does not seem to be a problem (maybe ld
is smart enough).  However when cross-compiling with the
arm-linux-gnueabihf toolchain, -rpath-link is needed otherwise linking
fails with:

arm-linux-gnueabihf/bin/ld: warning: liblttng-ust-tracepoint.so.0, needed by ../../../liblttng-ust/.libs//liblttng-ust.so, not found (try using -rpath or -rpath-link)

This patch adds -rpath-link to doc/examples/Makefile.am.

Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/examples/Makefile.am
This page took 0.025039 seconds and 4 git commands to generate.