[SCM] x265/master: Fix flags
sramacher at users.alioth.debian.org
sramacher at users.alioth.debian.org
Thu Aug 18 20:25:22 UTC 2016
The following commit has been merged in the master branch:
commit 32f70bf5dae5b4136d77cb59ab30f66fd81d5b72
Author: Sebastian Ramacher <sramacher at debian.org>
Date: Thu Aug 18 21:23:42 2016 +0200
Fix flags
diff --git a/debian/patches/compile-flags.patch b/debian/patches/compile-flags.patch
index 1df8bba..9d93404 100644
--- a/debian/patches/compile-flags.patch
+++ b/debian/patches/compile-flags.patch
@@ -1,25 +1,32 @@
-Description: Use -fPIC everywhere
- Also remove platform specific gcc flags that do not match our defaults.
+Description: Remove platform specific compile flags
+ We set HAVE_ARMV6 from d/rules and always want runtime detection of NEON.
Author: Sebastian Ramacher <sramacher at debian.org>
Last-Update: 2014-11-30
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
-@@ -186,17 +186,6 @@
- add_definitions(-march=i686)
- endif()
+@@ -68,7 +68,10 @@
endif()
-- if(ARM AND CROSS_COMPILE_ARM)
-- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
-- elseif(ARM)
+ message(STATUS "Detected ARM target processor")
+ set(ARM 1)
+- add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1)
++ add_definitions(-DX265_ARCH_ARM=1)
++ if(HAVE_ARMV6)
++ add_definitions(-DHAVE_ARMV6=1)
++ endif()
+ else()
+ message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown")
+ message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}")
+@@ -189,12 +192,8 @@
+ if(ARM AND CROSS_COMPILE_ARM)
+ set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
+ elseif(ARM)
- find_package(Neon)
-- if(CPU_HAS_NEON)
+ if(CPU_HAS_NEON)
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
-- add_definitions(-DHAVE_NEON)
+ add_definitions(-DHAVE_NEON)
- else()
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
-- endif()
-- endif()
+ endif()
+ endif()
add_definitions(${ARM_ARGS})
- if(FPROFILE_GENERATE)
- if(INTEL_CXX)
diff --git a/debian/patches/fix-x32.patch b/debian/patches/fix-x32.patch
index 7e90a52..8790f18 100644
--- a/debian/patches/fix-x32.patch
+++ b/debian/patches/fix-x32.patch
@@ -16,7 +16,7 @@ Last-Update: 2015-07-19
set(X64 1)
add_definitions(-DX86_64=1)
message(STATUS "Detected x86_64 target processor")
-@@ -109,6 +112,8 @@
+@@ -112,6 +115,8 @@
if(X64 AND NOT WIN32)
option(ENABLE_PIC "Enable Position Independent Code" ON)
@@ -25,7 +25,7 @@ Last-Update: 2015-07-19
else()
option(ENABLE_PIC "Enable Position Independent Code" OFF)
endif(X64 AND NOT WIN32)
-@@ -180,7 +185,7 @@
+@@ -183,7 +188,7 @@
else()
add_definitions(-march=native)
endif()
diff --git a/debian/rules b/debian/rules
index e701d06..8b2245b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,10 +21,13 @@ else
FLAGS += -DENABLE_ASSEMBLY=OFF
endif
-# build with NEON support on armhf and arm64
-# actual support by the CPU will be detected during runtime
+# rely on NEON runtime detection on armhf and arm64
+ifneq (,$(filter $(DEB_HOST_ARCH),armel armhf arm64))
+FLAGS += -DCPU_HAS_NEON=0
+endif
+# enable support for armv6 and above on arhf and arm64
ifneq (,$(filter $(DEB_HOST_ARCH),armhf arm64))
-FLAGS += -DCPU_HAS_NEON
+FLAGS += -DHAVE_ARMV6=1
endif
%:
--
x265 packaging
More information about the pkg-multimedia-commits
mailing list