You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.9 KiB

From b13839cceaae97d7d23b54586da1ad7ac85ab2b6 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Date: Tue, 21 Jul 2015 20:50:39 +0200
Subject: [PATCH] liboc: add missing depending library
liboc.so depends on liboctbstack.so, liboc_logger.so and pthread, this
patch adds these dependencies to the build.
Without this the dynamic loader will not automatically load these
libraries and it could result in unresolved dependencies at runtime.
Change-Id: I971b45669adef31dc9cca719884ebeb74aaf735e
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1794
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
---
resource/src/SConscript | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/resource/src/SConscript
+++ b/resource/src/SConscript
@@ -40,18 +40,20 @@ oclib_env.AppendUnique(CPPPATH = [
'../csdk/connectivity/lib/libcoap-4.1.1'
])
+oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+
+oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
+
target_os = env.get('TARGET_OS')
+if target_os == 'linux':
+ oclib_env.AppendUnique(LIBS = ['pthread'])
+
if target_os not in ['windows', 'winrt']:
oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
if target_os == 'android':
oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
- oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
-
-if target_os in ['darwin', 'ios']:
- oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
- oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
+ oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
######################################################################
# Source files and Targets