distribution/packages/emulators/libretro/ppsspp-lr/patches/000-armv8-build-fix.patch
2023-03-17 21:06:43 +00:00

33 lines
1.1 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90cd57ace..2ace6b70a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,10 @@ if(CMAKE_SYSTEM_PROCESSOR)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -target armv7a-none-linux-android")
endif()
endif()
+ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv8")
+ add_compile_options(-march=armv8-a+crc -mtune=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -fomit-frame-pointer)
+ add_definitions(-DPPSSPP_ARCH_ARM_NEON=1 -DPPSSPP_ARCH_ARMV8=1)
+ endif()
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^AMD64")
set(X86_DEVICE ON)
set(X86_64_DEVICE ON)
diff --git a/Common/ArmCPUDetect.cpp b/Common/ArmCPUDetect.cpp
index 437bd3158..d46cf19db 100644
--- a/Common/ArmCPUDetect.cpp
+++ b/Common/ArmCPUDetect.cpp
@@ -337,6 +337,13 @@ void CPUInfo::Detect()
bNEON = true;
bASIMD = true;
#endif
+
+#if PPSSPP_ARCH(ARMV8)
+ bNEON = true;
+ bASIMD = true;
+ bFP = true;
+#endif
+
}
// Turn the cpu info into a string we can show