Force linking of liboctbstack to require all symbols resolved
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 6 May 2015 23:28:48 +0000 (16:28 -0700)
committerErich Keane <erich.keane@intel.com>
Thu, 14 May 2015 16:32:28 +0000 (16:32 +0000)
The --no-undefined option (same as -z defs) causes the linker to refuse
to create its output if there are any symbols still unresolved after
searching all the dependent shared libraries. The default on ELF systems
is to allow shared libraries to link even if there are symbols
undefined, which has caused many a developer a lot of headache.

Unfortunately, changing ELF design flaws is not within our grasp.

Change-Id: I0d4913955e3745b69672ffff13dbc5f36ac07b3d
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/921
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/SConscript

index 5004f84..9a6fced 100644 (file)
@@ -77,6 +77,8 @@ elif target_os not in ['darwin','ios']:
 if target_os in ['darwin', 'ios']:
        liboctbstack_env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
        liboctbstack_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
+if target_os not in ['arduino']:
+       liboctbstack_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
 
 if env.get('SECURED') == '1':
        liboctbstack_env.AppendUnique(LIBS = ['tinydtls'])