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

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