Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 623614 - media-libs/opencv ignore CFLAGS
Summary: media-libs/opencv ignore CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords:
: 623612 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-03 01:29 UTC by YM
Modified: 2017-08-05 11:00 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description YM 2017-07-03 01:29:20 UTC
OpenCV get cpu flags from cmake options. In ebuild:
...
-DENABLE_SSE42=OFF
...

Then package compile, gcc set next options:
x86_64-pc-linux-gnu-g++ ...  -maes -O2 -pipe -mmmx -msse4.2 -ftracer -mfpmath=sse -msse -msse2 -mssse3 -msse4.1 -msse4.2  ...  -mno-sse2 -mno-avx -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 ...

I use simd_count script (http://optimization.hardlinux.ru/wp-content/uploads/2013/03/simd_count.zip) to test, which instruction use /usr/lib/libopencv_core.so, /usr/lib/libopencv_imgproc.so  and that libs don't use sse{2,3,4} instructions.

bash /simd_count  /usr/lib/libopencv_core.so

cpuid:          2
nop:            11675
call:           23406
i586:           1
i686:           1330
sse:            7552



Reproducible: Always

Steps to Reproduce:
1. Compile opencv
2. See flags, which use compiler.
3. bash /simd_count  /usr/lib/libopencv_core.so  to see result.
Actual Results:  
No some CPU instruction on *so libs.

Expected Results:  
*so libs use cpu optimization instructions.

I create pull request, which fix some CPU flags: https://github.com/gentoo/gentoo/pull/5036.
It doesn't fix -fomit-frame-pointer
Comment 1 YM 2017-07-03 09:12:09 UTC
*** Bug 623612 has been marked as a duplicate of this bug. ***
Comment 2 Amy Liffey gentoo-dev 2017-08-05 11:00:13 UTC
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

media-libs/opencv: Fix usage CPU instructions


author	Amy Liffey <amynka@gentoo.org>	2017-07-27 20:50:07 +0200
committer	Amy Liffey <amynka@gentoo.org>	2017-07-27 20:53:52 +0200
commit	0bf608a00f6466cb09e7d55b9e2579f0ca0b07c6 

media-libs/opencv: fix mno-sse2