diff options
author | Yurii Moskalenko <yuramuv@gmail.com> | 2017-07-03 04:21:32 +0300 |
---|---|---|
committer | Amy Liffey <amynka@gentoo.org> | 2017-07-27 20:36:55 +0200 |
commit | e62eff34b2ebd90b7b23812d793456df4dba22fc (patch) | |
tree | f2e1953e3b3bb18615e8116d503215ab433483ca /media-libs/opencv | |
parent | dev-util/kdevelop-pg-qt: Drop bogus EGIT_BRANCH (diff) | |
download | gentoo-e62eff34b2ebd90b7b23812d793456df4dba22fc.tar.gz gentoo-e62eff34b2ebd90b7b23812d793456df4dba22fc.tar.bz2 gentoo-e62eff34b2ebd90b7b23812d793456df4dba22fc.zip |
media-libs/opencv: Fix usage CPU instructions
Diffstat (limited to 'media-libs/opencv')
-rw-r--r-- | media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch | 64 | ||||
-rw-r--r-- | media-libs/opencv/opencv-3.2.0-r2.ebuild (renamed from media-libs/opencv/opencv-3.2.0-r1.ebuild) | 1 |
2 files changed, 65 insertions, 0 deletions
diff --git a/media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch b/media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch new file mode 100644 index 000000000000..7b88216f329a --- /dev/null +++ b/media-libs/opencv/files/opencv-3.2.0-fix_ussage_cpu_instructions.patch @@ -0,0 +1,64 @@ +--- a/cmake/OpenCVCompilerOptions.cmake ++++ b/cmake/OpenCVCompilerOptions.cmake +@@ -164,8 +164,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) + # Other optimizations + if(ENABLE_OMIT_FRAME_POINTER) + add_extra_compiler_option(-fomit-frame-pointer) +- else() +- add_extra_compiler_option(-fno-omit-frame-pointer) + endif() + if(ENABLE_FAST_MATH) + add_extra_compiler_option(-ffast-math) +@@ -195,8 +193,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) + if(NOT MINGW) + if(ENABLE_AVX) + add_extra_compiler_option(-mavx) +- elseif(X86 OR X86_64) +- add_extra_compiler_option(-mno-avx) + endif() + if(ENABLE_AVX2) + add_extra_compiler_option(-mavx2) +@@ -210,26 +206,18 @@ if(CMAKE_COMPILER_IS_GNUCXX) + if(NOT OPENCV_EXTRA_CXX_FLAGS MATCHES "-mavx") + if(ENABLE_SSE3) + add_extra_compiler_option(-msse3) +- elseif(X86 OR X86_64) +- add_extra_compiler_option(-mno-sse3) + endif() + + if(ENABLE_SSSE3) + add_extra_compiler_option(-mssse3) +- elseif(X86 OR X86_64) +- add_extra_compiler_option(-mno-ssse3) + endif() + + if(ENABLE_SSE41) + add_extra_compiler_option(-msse4.1) +- elseif(X86 OR X86_64) +- add_extra_compiler_option(-mno-sse4.1) + endif() + + if(ENABLE_SSE42) + add_extra_compiler_option(-msse4.2) +- elseif(X86 OR X86_64) +- add_extra_compiler_option(-mno-sse4.2) + endif() + + if(ENABLE_POPCNT) +@@ -238,16 +226,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) + endif() + endif(NOT MINGW) + +- if(X86 OR X86_64) +- if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4) +- if(OPENCV_EXTRA_CXX_FLAGS MATCHES "-m(sse2|avx)") +- add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers +- else() +- add_extra_compiler_option(-mfpmath=387) +- endif() +- endif() +- endif() +- + # Profiling? + if(ENABLE_PROFILING) + add_extra_compiler_option("-pg -g" diff --git a/media-libs/opencv/opencv-3.2.0-r1.ebuild b/media-libs/opencv/opencv-3.2.0-r2.ebuild index fc5c7aeb0291..e8fe383042fa 100644 --- a/media-libs/opencv/opencv-3.2.0-r1.ebuild +++ b/media-libs/opencv/opencv-3.2.0-r2.ebuild @@ -97,6 +97,7 @@ PATCHES=( "${FILESDIR}/${PN}-3.1.0-find-libraries-fix.patch" "${FILESDIR}/${P}-vtk.patch" "${FILESDIR}/${P}-gcc-6.0.patch" + "${FILESDIR}/${PN}-3.2.0-fix_ussage_cpu_instructions.patch" ) pkg_pretend() { |