summaryrefslogtreecommitdiff
path: root/databases/tarantool/files/patch-cmake-BuildLibUnwind.cmake
blob: f7394d98e4cbdad85dfdc41e7a7a22f3c49e5fc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- cmake/BuildLibUnwind.cmake.orig	2022-05-21 03:40:03.175123000 +0300
+++ cmake/BuildLibUnwind.cmake	2022-05-21 03:40:11.327052000 +0300
@@ -18,6 +18,11 @@
   The paths to the libunwind libraries.
 #]========================================================================]
 
+set(SYSTEM_ARCH ${CMAKE_SYSTEM_PROCESSOR})
+if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND SYSTEM_ARCH STREQUAL amd64)
+	set(SYSTEM_ARCH x86_64)
+endif()
+
 macro(libunwind_build)
     set(LIBUNWIND_SOURCE_DIR ${PROJECT_SOURCE_DIR}/third_party/libunwind)
     set(LIBUNWIND_BUILD_DIR ${PROJECT_BINARY_DIR}/build/libunwind)
@@ -81,12 +86,12 @@
     add_library(bundled-libunwind-platform STATIC IMPORTED GLOBAL)
     set_target_properties(bundled-libunwind-platform PROPERTIES
                           IMPORTED_LOCATION
-                          ${LIBUNWIND_INSTALL_DIR}/lib/libunwind-${CMAKE_SYSTEM_PROCESSOR}.a)
+			  ${LIBUNWIND_INSTALL_DIR}/lib/libunwind-${SYSTEM_ARCH}.a)
     add_dependencies(bundled-libunwind-platform bundled-libunwind-project)
 
     set(LIBUNWIND_INCLUDE_DIR ${LIBUNWIND_INSTALL_DIR}/include)
     set(LIBUNWIND_LIBRARIES
-        ${LIBUNWIND_INSTALL_DIR}/lib/libunwind-${CMAKE_SYSTEM_PROCESSOR}.a
+	    ${LIBUNWIND_INSTALL_DIR}/lib/libunwind-${SYSTEM_ARCH}.a
         ${LIBUNWIND_INSTALL_DIR}/lib/libunwind.a)
 
     message(STATUS "Using bundled libunwind")