mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
60 lines
2 KiB
Diff
60 lines
2 KiB
Diff
From a261a1e54c548e6806bf6a21e06da835af9934bb Mon Sep 17 00:00:00 2001
|
|
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
Date: Mon, 7 Feb 2022 04:13:22 +0000
|
|
Subject: [PATCH] arm fixes
|
|
|
|
---
|
|
source/CMakeLists.txt | 29 ++++++-----------------------
|
|
1 file changed, 6 insertions(+), 23 deletions(-)
|
|
|
|
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
|
index a407271b4..bfcd11f05 100755
|
|
--- a/source/CMakeLists.txt
|
|
+++ b/source/CMakeLists.txt
|
|
@@ -76,8 +76,8 @@ elseif(ARMMATCH GREATER "-1")
|
|
set(ARM64 1)
|
|
add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=1 -DHAVE_ARMV6=0)
|
|
else()
|
|
- message(STATUS "Detected ARM target processor")
|
|
- add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=1)
|
|
+ message(STATUS "Detected ARMV7 system processor")
|
|
+ add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=0 -DHAVE_NEON=1 -fPIC)
|
|
endif()
|
|
else()
|
|
message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown")
|
|
@@ -238,28 +238,11 @@ if(GCC)
|
|
endif()
|
|
endif()
|
|
endif()
|
|
- if(ARM AND CROSS_COMPILE_ARM)
|
|
- 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")
|
|
- elseif(ARM)
|
|
- if(ARM64)
|
|
- set(ARM_ARGS -fPIC)
|
|
- add_definitions(-DHAVE_NEON)
|
|
- else()
|
|
- 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()
|
|
- endif()
|
|
+ if(ARM64)
|
|
+ set(ARM_ARGS -fPIC)
|
|
+ add_definitions(-DHAVE_NEON)
|
|
+ add_definitions(${ARM_ARGS})
|
|
endif()
|
|
- add_definitions(${ARM_ARGS})
|
|
if(FPROFILE_GENERATE)
|
|
if(INTEL_CXX)
|
|
add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}")
|
|
--
|
|
2.33.0
|
|
|