From: Ming Liu <peter.x....@external.atlascopco.com>

This fixes following errors when compiling with clang:
| ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to 
'__atomic_load_4'
| ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to 
'__atomic_compare_exchange_4'
| ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to 
'__atomic_fetch_sub_4'
| ../json_spirit/libjson_spirit.so.4.0.8: error: undefined reference to 
'__atomic_fetch_add_4'

Signed-off-by: Ming Liu <peter.x....@external.atlascopco.com>
---
 meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb 
b/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
index 53bbf7e..2f456bf 100644
--- a/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
+++ b/meta-oe/recipes-devtools/json-spirit/json-spirit_4.08.bb
@@ -17,6 +17,8 @@ S = "${WORKDIR}/json_spirit_v${PV}"
 
 DEPENDS = "boost"
 
+LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed"
+
 inherit cmake
 
 FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibJsonSpirit.cmake"
-- 
2.7.4

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to