Skip to content

Commit 0a4c5c4

Browse files
authored
Merge pull request #2807 from martin-frbg/issue2804
Work around ARMV8 build-time cpu detection problems on non-Linux systems
2 parents 59e01b1 + 3210a42 commit 0a4c5c4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cmake/system_check.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
5454
endif()
5555
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
5656
set(X86 1)
57-
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
58-
set(ARM 1)
59-
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
57+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
6058
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
6159
set(ARM64 1)
6260
else()
6361
set(ARM 1)
6462
endif()
63+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
64+
set(ARM 1)
6565
elseif (${CMAKE_CROSSCOMPILING})
6666
if (${TARGET} STREQUAL "CORE2")
6767
if (NOT BINARY)

cpuid_arm64.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ int detect(void)
197197

198198

199199
}
200+
#else
201+
return CPU_ARMV8;
200202
#endif
201203

202204
return CPU_UNKNOWN;

0 commit comments

Comments
 (0)