build: Propagate RPATH for crosscompilers
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 24 May 2017 16:33:51 +0000 (18:33 +0200)
committerPhil Coval <philippe.coval@osg.samsung.com>
Fri, 26 May 2017 21:37:46 +0000 (21:37 +0000)
commit443b33a031f275380d1a50ac8c2ac20b80292fb1
treec930c6537166fa584f2a12ea9615a7be5eddd332
parentc22b1d43107c93c0a1fe600386a3e6a8422b083f
build: Propagate RPATH for crosscompilers

Without this change,
depended libraries need to be specified explitly to linker.

Observed problem on Yocto:

  i586-poky-linux/i586-poky-linux-g++ (...) \
  -Lout/yocto/i586/release (...) \
  -lipca -lc_common -llogger -ldl -lpthread -luuid -lrt -lmbedcrypto (...)
  i586-poky-linux/6.3.0/ld: warning: liboc.so, \
  needed by out/yocto/i586/release/libipca.so, not found \
  (try using -rpath or -rpath-link) (...) \
  out/yocto/i586/release/libipca.so: \
  undefined reference to `OC::operator<<(std::ostream&, OC::AttributeType)'

Change-Id: I1dcbf18af601415c2261b44185a84225a2869281
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20273
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
build_common/SConscript