[Lldb-commits] [PATCH] Fix for aarch64 lldb-server native builds

Muhammad Omair Javaid omair.javaid at linaro.org
Thu Mar 19 10:07:26 PDT 2015


Hi zturner, vharron,

This patch fixes a glitch in cmake scripts which was routing to a wrong python library directory when building lldb-server on aarch64 natively.

I have skipped the hardcoded values once user provides a value for CMAKE_LIBRARY_ARCHITECTURE during configure.

http://reviews.llvm.org/D8447

Files:
  cmake/modules/LLDBConfig.cmake

Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -39,10 +39,14 @@
 endif()
 
 if (NOT LLDB_DISABLE_PYTHON)
-  if(UNIX)
+  if(UNIX AND (NOT CMAKE_LIBRARY_ARCHITECTURE))
     # This is necessary for crosscompile on Ubuntu 14.04 64bit. Need a proper fix.
-    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+    if(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64")
       set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
+    elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "aarch64")
+      set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu")
+    elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "arm")
+      set(CMAKE_LIBRARY_ARCHITECTURE "arm-linux-gnueabi")
     endif()
   endif()
   if (MSVC)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8447.22267.patch
Type: text/x-patch
Size: 825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150319/b24f7c29/attachment.bin>


More information about the lldb-commits mailing list