This is because the dynamic linker of android 6.0 requires soname.
see https://developer.android.com/intl/ko/about/versions/marshmallow/android-6.0-changes.html#behavior-runtime.
Change-Id: I6908631d7bb734df262a86c98e3699af5fccfc14
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7595
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
liboctbstack_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
if target_os not in ['arduino']:
liboctbstack_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
+if target_os == 'android':
+ liboctbstack_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,liboctbstack.so'])
if env.get('SECURED') == '1':
liboctbstack_env.AppendUnique(LIBS = ['tinydtls'])
print "Include path is %s" % env.get('CPPPATH')
print "Files path is %s" % env.get('CA_SRC')
+
+lib_env = env.Clone()
+
+if ca_os == 'android':
+ lib_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libconnectivity_abstraction.so'])
+
if ca_os in ['android', 'tizen']:
- env.AppendUnique(LIBS = ['coap'])
- if env.get('SECURED') == '1':
- env.AppendUnique(LIBS = ['tinydtls'])
- env.AppendUnique(LIBS = ['timer'])
+ lib_env.AppendUnique(LIBS = ['coap'])
+ if lib_env.get('SECURED') == '1':
+ lib_env.AppendUnique(LIBS = ['tinydtls'])
+ lib_env.AppendUnique(LIBS = ['timer'])
if ca_os != 'android':
- env.AppendUnique(LIBS = ['rt'])
- calib = env.SharedLibrary('connectivity_abstraction', env.get('CA_SRC'))
+ lib_env.AppendUnique(LIBS = ['rt'])
+ calib = lib_env.SharedLibrary('connectivity_abstraction', lib_env.get('CA_SRC'))
else:
- calib = env.StaticLibrary('connectivity_abstraction', env.get('CA_SRC'))
-env.InstallTarget(calib, 'libconnectivity_abstraction')
-env.UserInstallTargetLib(calib, 'libconnectivity_abstraction')
+ calib = lib_env.StaticLibrary('connectivity_abstraction', lib_env.get('CA_SRC'))
+lib_env.InstallTarget(calib, 'libconnectivity_abstraction')
+lib_env.UserInstallTargetLib(calib, 'libconnectivity_abstraction')
if target_os == 'android':
liboc_logger_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
liboc_logger_env.AppendUnique(LIBS = ['gnustl_shared', 'log'])
+ liboc_logger_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,liboc_logger.so'])
if target_os not in ['arduino', 'windows', 'winrt']:
liboc_logger_env.AppendUnique(CFLAGS = ['-Wall', '-std=c99', '-fPIC'])
oclib_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
if target_os == 'android':
- oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
- oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
+ oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
+ oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
+ oclib_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,liboc.so'])
if target_os == 'tizen':
oclib_env.AppendUnique(CPPDEFINES = ['__TIZEN__'])