Bug#849536: limesuite FTBFS on mips and mipsel: error: undefined reference to `__atomic_load_8'
Hi,
Here is new generic patch that should work for all architectures.
I added "--as-needed" flag that ensures linking with latomic library only if it is necessary.
With this patch package builds successfully on mips, mipsel, mips64el and i386.
Regards,
Radovan
--- limesuite-16.8.23.819+git20161221+dfsg.orig/src/CMakeLists.txt
+++ limesuite-16.8.23.819+git20161221+dfsg/src/CMakeLists.txt
@@ -93,6 +93,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
list(APPEND LIME_SUITE_LIBRARIES -pthread)
endif(CMAKE_COMPILER_IS_GNUCXX)
+list(APPEND LIME_SUITE_LIBRARIES -Wl,--as-needed -latomic)
+
#sqlite depedency
list(APPEND LIME_SUITE_INCLUDES ${SQLITE3_INCLUDE_DIRS})
list(APPEND LIME_SUITE_LIBRARIES ${SQLITE3_LIBRARIES})
Reply to: