From owner-svn-ports-head@FreeBSD.ORG Sun Jun 14 21:48:05 2015 Return-Path: Delivered-To: svn-ports-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94A5F990; Sun, 14 Jun 2015 21:48:05 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay110.isp.belgacom.be (mailrelay110.isp.belgacom.be [195.238.20.137]) by mx1.freebsd.org (Postfix) with ESMTP id 7F48D7B9; Sun, 14 Jun 2015 21:48:03 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=eWtaKQUTUbzTvYESxgzcVvJXO5dQmjbJ/tTWSlQWV0k= c=1 sm=2 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=GFgOM9uZ7mZcJuiL1lgA:9 a=CjuIK1q_8ugA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2ABDgBA9X1V/++YsFtcgxBUUg2/aoV6AoEhPRABAQEBAQEBgQpBBYNdAQEEOhwjEAsSAgQJJQ8SGBAOBhOIGgMWAQjDJw2FTAEBAQEBAQEDAQEBAQEBARcEi0SCTYIGMweELQEEk1uEUIUSgV+Qe4cWJoI8gT88MYJHAQEB Received: from 239.152-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.152.239]) by relay.skynet.be with ESMTP; 14 Jun 2015 23:46:54 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id t5ELkqut004655; Sun, 14 Jun 2015 23:46:52 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 14 Jun 2015 23:46:52 +0200 From: Tijl Coosemans To: "Jason E. Hale" Cc: ports-committers , "svn-ports-all@freebsd.org" , "svn-ports-head@freebsd.org" Subject: Re: svn commit: r389642 - in head/graphics: opencv opencv-core opencv-java py-opencv Message-ID: <20150614234652.4cc1175d@kalimero.tijl.coosemans.org> In-Reply-To: References: <201506141528.t5EFS3Ou060777@svn.freebsd.org> <20150614180031.0a62314f@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 21:48:05 -0000 On Sun, 14 Jun 2015 15:03:43 -0400 "Jason E. Hale" wrote: > On Sun, Jun 14, 2015 at 12:00 PM, Tijl Coosemans wrote: >> On Sun, 14 Jun 2015 15:28:03 +0000 (UTC) "Jason E. Hale" 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 [1], sasamotikomi@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.