[Lldb-commits] [lldb] r274121 - [LLDB][MIPS] Check if libatomic needs to be specified explicitly
Sagar Thakur via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 29 05:30:20 PDT 2016
Author: slthakur
Date: Wed Jun 29 07:30:18 2016
New Revision: 274121
URL: http://llvm.org/viewvc/llvm-project?rev=274121&view=rev
Log:
[LLDB][MIPS] Check if libatomic needs to be specified explicitly
Patch by Nitesh Jain.
Summary : The problem appears while linking liblldb.so. The class Address contain atomic variable m_offset. The loading and storing of variable is access via atomic_load_8 and atomic_store_8 functions. Some target fail to implicitly link libatomic, which cause undefine reference to atomic_store_8/atomic_load_8. This patch uses http://reviews.llvm.org/D20896 to check if libatomic need to be explicitly link.
Reviewed by labath.
Differential: D20464
Modified:
lldb/trunk/cmake/LLDBDependencies.cmake
Modified: lldb/trunk/cmake/LLDBDependencies.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=274121&r1=274120&r2=274121&view=diff
==============================================================================
--- lldb/trunk/cmake/LLDBDependencies.cmake (original)
+++ lldb/trunk/cmake/LLDBDependencies.cmake Wed Jun 29 07:30:18 2016
@@ -157,6 +157,11 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo
endif()
endif()
endif()
+
+if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
+ list(APPEND LLDB_SYSTEM_LIBS atomic)
+endif()
+
# On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc.
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
list(APPEND LLDB_SYSTEM_LIBS execinfo)
More information about the lldb-commits
mailing list