[opencv] 01/01: d/rules: handle CPU optimization the way OpenCV 3.3 expects us to.

Mattia Rizzolo mattia at debian.org
Wed Oct 18 07:39:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository opencv.

commit 1a7b75fb0a1563e8086abfec363875c17a7f5306
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Wed Oct 18 09:33:26 2017 +0200

    d/rules: handle CPU optimization the way OpenCV 3.3 expects us to.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 debian/rules | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/debian/rules b/debian/rules
index 3185dc8..3d8e803 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,11 +5,22 @@ include /usr/share/dpkg/architecture.mk
 
 BUILDDIR = obj-$(DEB_HOST_MULTIARCH)
 
-# SSE options
+CMAKE_ARCH_FLAGS :=
+
+# Comply with Debian architectures baseline.
+# See cmake/OpenCVCompilerOptimizations.cmake for a list of known features.
+# Don't try to autodetect CPU features
+CMAKE_ARCH_FLAGS += -DCPU_DISPATCH=
 ifeq ($(DEB_HOST_ARCH_CPU),amd64)
-CMAKE_ARCH_FLAGS = -DENABLE_MSSE=ON -DENABLE_MSSE2=ON -DENABLE_MSSE3=OFF
-else
-CMAKE_ARCH_FLAGS = -DENABLE_MSSE=OFF -DENABLE_MSSE2=OFF -DENABLE_MSSE3=OFF
+ # Only SSE2 on amd64
+ CMAKE_ARCH_FLAGS += -DCPU_BASELINE=SSE2
+ CMAKE_ARCH_FLAGS += -DCPU_BASELINE_REQUIRE=SSE2
+ CMAKE_ARCH_FLAGS += -DCPU_BASELINE_DISABLE=SSE3
+else ifeq ($(DEB_HOST_ARCH_CPU),armhf)
+ CMAKE_ARCH_FLAGS += -DCPU_BASELINE_DISABLE="VFPV3 NEON"
+else ifeq ($(DEB_HOST_ARCH_CPU),i386)
+ # Be extra sure SSE is not picked up on i386
+ CMAKE_ARCH_FLAGS += -DCPU_BASELINE_DISABLE="SSE SSE2"
 endif
 
 # TBB support

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list