PKGBUILDs/extra/x265/arm.patch

77 lines
2.9 KiB
Diff
Raw Normal View History

2020-06-09 18:55:00 +00:00
diff -r 2a65b7209850 source/CMakeLists.txt
--- a/source/CMakeLists.txt Fri May 29 23:09:35 2020 +0530
+++ b/source/CMakeLists.txt Tue Jun 09 12:49:19 2020 -0600
2018-10-08 16:07:35 +00:00
@@ -40,7 +40,7 @@
2016-07-23 15:53:32 +00:00
# System architecture detection
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
set(X86_ALIASES x86 i386 i686 x86_64 amd64)
2020-06-09 18:55:00 +00:00
-set(ARM_ALIASES armv6l armv7l aarch64)
+set(ARM_ALIASES armv5tel armv6l armv7l aarch64)
2016-07-23 15:53:32 +00:00
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
set(POWER_ALIASES ppc64 ppc64le)
2020-06-09 18:55:00 +00:00
@@ -76,8 +76,16 @@
set(ARM64 1)
add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=1 -DHAVE_ARMV6=0)
2016-07-23 15:53:32 +00:00
else()
2020-06-09 18:55:00 +00:00
- message(STATUS "Detected ARM target processor")
- add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=1)
+ if(${SYSPROC} MATCHES "armv5.*")
+ message(STATUS "Detected ARMV5 system processor")
+ add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=0 -DHAVE_NEON=0)
+ elseif(${SYSPROC} STREQUAL "armv6l")
+ message(STATUS "Detected ARMV6 system processor")
+ add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=0 -DHAVE_NEON=0)
+ elseif(${SYSPROC} STREQUAL "armv7l")
+ message(STATUS "Detected ARMV7 system processor")
+ add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=0 -DHAVE_NEON=0 -fPIC)
+ endif()
2016-07-23 15:53:32 +00:00
endif()
2014-03-30 04:59:56 +00:00
else()
message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown")
2020-06-09 18:55:00 +00:00
@@ -238,28 +246,11 @@
2016-10-02 14:45:31 +00:00
endif()
2016-07-23 15:53:32 +00:00
endif()
2014-03-30 04:59:56 +00:00
endif()
2016-07-23 15:53:32 +00:00
- if(ARM AND CROSS_COMPILE_ARM)
2020-06-09 18:55:00 +00:00
- if(ARM64)
- set(ARM_ARGS -fPIC)
- else()
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
- endif()
- message(STATUS "cross compile arm")
2016-07-23 15:53:32 +00:00
- elseif(ARM)
2020-06-09 18:55:00 +00:00
- if(ARM64)
- set(ARM_ARGS -fPIC)
2016-07-23 15:53:32 +00:00
- add_definitions(-DHAVE_NEON)
- else()
2020-06-09 18:55:00 +00:00
- find_package(Neon)
- if(CPU_HAS_NEON)
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
- add_definitions(-DHAVE_NEON)
- else()
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
- endif()
2016-07-23 15:53:32 +00:00
- endif()
2020-06-09 18:55:00 +00:00
+ if(ARM64)
+ set(ARM_ARGS -fPIC)
+ add_definitions(-DHAVE_NEON)
+ add_definitions(${ARM_ARGS})
endif()
2016-07-23 15:53:32 +00:00
- add_definitions(${ARM_ARGS})
2015-10-11 14:21:16 +00:00
if(FPROFILE_GENERATE)
if(INTEL_CXX)
2016-07-23 15:53:32 +00:00
add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}")
2020-06-09 18:55:00 +00:00
diff -r 2a65b7209850 source/common/cpu.cpp
--- a/source/common/cpu.cpp Fri May 29 23:09:35 2020 +0530
+++ b/source/common/cpu.cpp Tue Jun 09 12:49:19 2020 -0600
@@ -39,7 +39,7 @@
2014-03-30 04:59:56 +00:00
#include <machine/cpu.h>
#endif
-#if X265_ARCH_ARM && !defined(HAVE_NEON)
+#if X265_ARCH_ARM && (!defined(HAVE_NEON) || HAVE_NEON==0)
#include <signal.h>
#include <setjmp.h>
static sigjmp_buf jmpbuf;