security: Force link to libm (workaround)
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 12 May 2017 18:50:10 +0000 (20:50 +0200)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Tue, 30 May 2017 23:06:58 +0000 (23:06 +0000)
commit36ec3eb10169fc96f4f6e0021757645716347109
tree9b57c2c5f83b593060e09f33bd2796134a9e1070
parent443b33a031f275380d1a50ac8c2ac20b80292fb1
security: Force link to libm (workaround)

This is a workaround for g++-4.7,

For some (really) weird reason ceil function was not found
when linking (even if added only at end of linker command line).

If doubled (-lm -lm) it worked.

Observed issue:

  scons VERBOSE=1 RELEASE=true WITH_RA=1 WITH_RA_IBB=1

  g++ -o out/linux/x86_64/release/resource/csdk/security/provisioning/unittest/sample_server1 \
  -m64 -pthread out/linux/x86_64/release/resource/csdk/security/provisioning/unittest/sampleserver1.o \
  -Lout/linux/x86_64/release -L. (...)
  -Lout/linux/x86_64/release/resource/c_common -Lresource/c_common \
  -Lout/linux/x86_64/release/resource/csdk/logger -Lresource/csdk/logger \
  -Lextlibs/gtest/googletest-release-1.7.0/lib/.libs
  -locpmapi_internal -loc -loctbstack_internal -locsrm -lroutingmanager \
  -loc_logger_internal -lconnectivity_abstraction_internal
  -lcoap -lgtest -lgtest_main -lc_common -llogger -ldl -lpthread -lstrophe -lssl -lcrypto -lresolv
  -lwksxmppxep -lm
  -lboost_system -lboost_thread -luuid -lrt -lmbedtls -lmbedx509 -lmbedcrypto -lsqlite3 -lgio-2.0 -lgobject-2.0 -lglib-2.0
  out/linux/x86_64/release/libwksxmppxep.so: undefined reference to `ceil'

  gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3

Bug: https://jira.iotivity.org/browse/IOT-2244
Change-Id: Ie8a69a4fdd99c346244cfaee17cc7e3780942b5a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19839
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/security/provisioning/unittest/SConscript