svn commit: r389642 - in head/graphics: opencv opencv-core opencv-java py-opencv

Tijl Coosemans tijl at FreeBSD.org
Sun Jun 14 21:48:05 UTC 2015


On Sun, 14 Jun 2015 15:03:43 -0400 "Jason E. Hale" <jhale at FreeBSD.org> wrote:
> On Sun, Jun 14, 2015 at 12:00 PM, Tijl Coosemans <tijl at freebsd.org> wrote:
>> On Sun, 14 Jun 2015 15:28:03 +0000 (UTC) "Jason E. Hale" <jhale at FreeBSD.org> wrote:
>>> Author: jhale
>>> Date: Sun Jun 14 15:28:03 2015
>>> New Revision: 389642
>>> URL: https://svnweb.freebsd.org/changeset/ports/389642
>>>
>>> Log:
>>>   - Add SIMD option to specifically disable CPU optimizations and prevent crashes
>>>     with ffmpeg on processors that do not support SSE instructions.  OFF by
>>>     default for package building, ON with autodetect for ports to keep with
>>>     POLA. [1][2]
>>>   - Bump PORTREVISION on all opencv ports
>>>
>>>   PR:         199715 [1], 200234 [2]
>>>   Submitted by:       Randy Westlund <rwestlun at gmail.com> [1], sasamotikomi at gmail.com [2]
>>>
>>> Modified:
>>>   head/graphics/opencv-core/Makefile
>>>   head/graphics/opencv-java/Makefile
>>>   head/graphics/opencv/Makefile
>>>   head/graphics/py-opencv/Makefile
>>>
>>> Modified: head/graphics/opencv/Makefile
>>> ==============================================================================
>>> --- head/graphics/opencv/Makefile     Sun Jun 14 15:15:42 2015        (r389641)
>>> +++ head/graphics/opencv/Makefile     Sun Jun 14 15:28:03 2015        (r389642)
>>> @@ -3,7 +3,7 @@
>>>
>>>  PORTNAME?=   opencv
>>>  PORTVERSION= 2.4.9
>>> -PORTREVISION?=       4
>>> +PORTREVISION?=       5
>>>  CATEGORIES=  graphics
>>>  MASTER_SITES=        SF/${PORTNAME}library/${PORTNAME}-unix/${PORTVERSION}
>>>
>>> @@ -42,7 +42,7 @@ OCV_NONFREE_MODS=   nonfree
>>>  OCV_JAVA_MODS=               java
>>>  OCV_PYTHON_MODS=     python
>>>
>>> -OPTIONS_DEFINE=              DC1394 EXAMPLES NONFREE OPENGL
>>> +OPTIONS_DEFINE=              DC1394 EXAMPLES NONFREE OPENGL SIMD
>>>  OPTIONS_GROUP=               IMAGE PERFORMANCE VIDEO
>>>  OPTIONS_GROUP_IMAGE= JASPER JPEG OPENEXR PNG TIFF
>>>  OPTIONS_GROUP_PERFORMANCE=   EIGEN3 TBB
>>> @@ -50,6 +50,9 @@ OPTIONS_GROUP_VIDEO=        FFMPEG GSTREAMER V4
>>>  OPTIONS_RADIO=               GUI
>>>  OPTIONS_RADIO_GUI=   GTK2 QT4
>>>  OPTIONS_DEFAULT=     EIGEN3 JASPER JPEG PNG TIFF V4L
>>> +.if !defined(PACKAGE_BUILDING)
>>> +OPTIONS_DEFAULT=     SIMD
>>> +.endif
>>
>> This also disables SSE/SSE2 in the amd64 package.  You can just remove
>> this though.  The package builders will do the right thing.
> 
> There are probably a few amd64 processors that don't support SSE3,
> although all should support SSE and SSE2.  Trying to work all of that
> out so certain packages have a bare minimum of optimizations is a bit
> more work.  It was easier to just disable it all because it will just
> end up autodetecting whatever the package builder supports and making
> a package that might not work on some systems.

MACHINE_CPU is not derived from the build host CPU.  It's derived
from CPUTYPE (see /usr/share/mk/bsd.cpu.mk) which you can set in
/etc/make.conf.  When CPUTYPE isn't defined, as on the official
package builders, it is set to the minimum supported CPU for the
architecture (e.g. i486 for i386).  So, you can safely add SIMD to
OPTIONS_DEFAULT.

Actually, it's better to just remove the SIMD option, because when
CPUTYPE isn't set to an SSE capable CPU the option doesn't have any
effect and when it is it makes no sense to disable the option because
the compiler is still free to use SSE instructions anyway.


More information about the svn-ports-all mailing list