diff options
| author | cjy880927 <103977250+cjy880927@users.noreply.github.com> | 2025-04-07 15:34:42 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-07 09:34:42 +0200 |
| commit | 4aab7a02f42402fccb6e36eb3e6b1773ed9318cc (patch) | |
| tree | 3d07d6ca1cff7c77ebe5252ef3b2ff1dfd85a1f6 | |
| parent | 6d7af8674ad8faf565e9c8614aba6633f24c7839 (diff) | |
| download | box64-4aab7a02f42402fccb6e36eb3e6b1773ed9318cc.tar.gz box64-4aab7a02f42402fccb6e36eb3e6b1773ed9318cc.zip | |
[CMAKE]: Fix arm64 build (#2507)
Log: Ensure successful compilation on devices that do not support
cortex-a77.cortex-a55, such as those with CPU Model Cortex-A55.
Signed-off-by: chenjiangyi <chenjiangyi@uniontech.com>
Co-authored-by: chenjiangyi <chenjiangyi@uniontech.com>| -rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 26eba18b..cbe57806 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,8 +230,12 @@ elseif(ARM64) #add_definitions(-pipe -march=native) endif() if(ARM_DYNAREC) - #putting a random cpu that have 8.2 architecture so assembly can be build. the use of the feature are conditionnal anyway - set(ASMFLAGS -pipe -mcpu=cortex-a76) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "9.0") + set(ASMFLAGS -pipe -march=armv8.2-a+crc+simd+crypto) + else() + #putting a random cpu that have 8.2 architecture so assembly can be build. the use of the feature are conditionnal anyway + set(ASMFLAGS -pipe -mcpu=cortex-a76) + endif() endif() if(ANDROID) add_definitions(-DANDROID) |