Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 623612

Summary: media-libs/opencv ignore CFLAGS
Product: Gentoo Linux Reporter: YM <ymuv>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description YM 2017-07-03 01:26:02 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.


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

*** This bug has been marked as a duplicate of bug 623614 ***