Skip to content

Commit

Permalink
handle cross compiling on same arch for x86 (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterTea authored Mar 14, 2021
1 parent 269652b commit 7197ebc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cmake/FindUnwind.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ find_library (Unwind_LIBRARY NAMES unwind DOC "unwind library")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
set (Unwind_ARCH "arm")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set (Unwind_ARCH "aarch64")
set (Unwind_ARCH "unwind-aarch64")
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "corei7-64")
set (Unwind_ARCH "x86_64")
set (Unwind_ARCH "unwind-x86_64" "unwind-x86")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
set (Unwind_ARCH "x86")
set (Unwind_ARCH "unwind-x86" "unwind-x86_64")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64")
set (Unwind_ARCH "ppc64")
set (Unwind_ARCH "unwind-ppc64")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc")
set (Unwind_ARCH "ppc32")
set (Unwind_ARCH "unwind-ppc32")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set (Unwind_ARCH "mips")
set (Unwind_ARCH "unwind-mips")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^hppa")
set (Unwind_ARCH "hppa")
set (Unwind_ARCH "unwind-hppa")
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^ia64")
set (Unwind_ARCH "ia64")
set (Unwind_ARCH "unwind-ia64")
endif (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")

find_library (Unwind_PLATFORM_LIBRARY NAMES "unwind-${Unwind_ARCH}"
find_library (Unwind_PLATFORM_LIBRARY NAMES ${Unwind_ARCH}
DOC "unwind library platform")

mark_as_advanced (Unwind_INCLUDE_DIR Unwind_LIBRARY Unwind_PLATFORM_LIBRARY)
Expand Down Expand Up @@ -81,4 +81,4 @@ if (Unwind_FOUND)
IMPORTED_CONFIGURATIONS RELEASE
)
endif (NOT TARGET unwind::unwind)
endif (Unwind_FOUND)
endif (Unwind_FOUND)

0 comments on commit 7197ebc

Please sign in to comment.