Link with -latomic when mips* processor is detected
authorGianfranco Costamagna <locutusofborg@debian.org>
Tue, 8 Feb 2022 20:39:18 +0000 (20:39 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 8 Feb 2022 20:39:18 +0000 (20:39 +0000)
Last-Update: 2016-07-27

Gbp-Pq: Topic lldb
Gbp-Pq: Name lldb-link-atomic-cmake.patch

lldb/source/Utility/CMakeLists.txt

index 6790e47d69f25810e84c747cbead6490f3c36c53..2ecf8a45b78145245d21bbbdee73f737b89d58c8 100644 (file)
@@ -15,6 +15,13 @@ endif()
 
 list(APPEND LLDB_SYSTEM_LIBS ${CMAKE_DL_LIBS})
 
+if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips" OR
+   CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mipsel" OR
+   CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64el" OR
+   CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "powerpcspe")
+  list(APPEND LLDB_SYSTEM_LIBS atomic)
+endif()
+
 if (CMAKE_SYSTEM_NAME MATCHES "Windows")
   list(APPEND LLDB_SYSTEM_LIBS ws2_32 rpcrt4)
 endif ()