From cbb4ac1f1f85f09967b30b0cfd3cf8b344a36173 Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Wed, 19 Apr 2017 18:53:58 -0700 Subject: [PATCH] [IOT-2090] Linux: Fix the link order of c_common and logger Don't prepend logger after c_common has been prepended, because the linker wants c_common followed by logger in its command line. Change-Id: I6cc0c6bfdb2d7e47609d98db8be42fc9e878b1ba Signed-off-by: Dan Mihai Reviewed-on: https://gerrit.iotivity.org/gerrit/19145 Tested-by: jenkins-iotivity --- resource/c_common/SConscript | 4 +++- resource/c_common/ocrandom/test/SConscript | 6 +----- resource/csdk/logger/SConscript | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/resource/c_common/SConscript b/resource/c_common/SConscript index c7d630a..048b8a4 100644 --- a/resource/c_common/SConscript +++ b/resource/c_common/SConscript @@ -212,4 +212,6 @@ common_env.UserInstallTargetHeader('iotivity_debug.h', 'c_common', 'iotivity_deb common_env.UserInstallTargetHeader('platform_features.h', 'c_common', 'platform_features.h') Clean(commonlib, config_h_file_path) -env.PrependUnique(LIBS = ['c_common']) + +# c_common calls into logger. +env.PrependUnique(LIBS = ['c_common', 'logger']) diff --git a/resource/c_common/ocrandom/test/SConscript b/resource/c_common/ocrandom/test/SConscript index 7ce000c..86de54b 100644 --- a/resource/c_common/ocrandom/test/SConscript +++ b/resource/c_common/ocrandom/test/SConscript @@ -38,14 +38,10 @@ randomtest_env.PrependUnique(CPPPATH = [ '../../../oc_logger/include', ]) -randomtest_env.PrependUnique(LIBS = ['octbstack', - 'connectivity_abstraction', - 'uuid']) +randomtest_env.PrependUnique(LIBS = ['uuid']) randomtest_env.PrependUnique(CPPPATH = ['../include']) -randomtest_env.PrependUnique(LIBS = ['c_common']) - if target_os in ['linux']: randomtest_env.AppendUnique(LIBS = ['m']) diff --git a/resource/csdk/logger/SConscript b/resource/csdk/logger/SConscript index c2b7fba..e149d01 100755 --- a/resource/csdk/logger/SConscript +++ b/resource/csdk/logger/SConscript @@ -17,8 +17,6 @@ else: if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True': env.AppendUnique(CPPDEFINES = ['OIC_SUPPORT_TIZEN_TRACE']) -env.PrependUnique(LIBS = ['logger']) - local_env = env.Clone() ###################################################################### -- 2.7.4