Bug 213583 - multimedia/ffmpeg: enable MMX/SSE by default on i386
Summary: multimedia/ffmpeg: enable MMX/SSE by default on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: patch
Depends on: 205958 213706
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-18 02:30 UTC by Jan Beich
Modified: 2016-11-20 20:03 UTC (History)
3 users (show)

See Also:
riggs: maintainer-feedback+


Attachments
v1 (682 bytes, patch)
2016-10-18 02:30 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2016-10-18 02:30:35 UTC
Created attachment 175893 [details]
v1

With stack alignment crashes fixed SIMD should be safe to use by default given the code is gated by CPUID check at runtime. CPUID is also used on amd64 to enable SSE4 or AVX at runtime but we haven't seen crashes there, so there's no corresponding compile-time options.
Comment 1 Jan Beich freebsd_committer freebsd_triage 2016-11-01 21:26:50 UTC
Maintainer timeout ? ;)
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2016-11-02 11:12:18 UTC
If I remember correctly there used to be some use of MMX code not covered by a cpuid check, but I can't find it now so it's probably ok.  The SSE option currently adds -msse to CFLAGS.  The patch should remove that.
Comment 3 Hans Petter Selasky freebsd_committer freebsd_triage 2016-11-02 11:26:50 UTC
Hi,

Is there a similar problem with firefox?

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213706

--HPS
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-11-20 18:50:36 UTC
A commit references this bug:

Author: riggs
Date: Sun Nov 20 18:49:59 UTC 2016
New revision: 426611
URL: https://svnweb.freebsd.org/changeset/ports/426611

Log:
  Re-enable MMX/SSE by default on i386 after stack alignment fixes

  PR:		213583
  Submitted by:	jbeich

Changes:
  head/multimedia/ffmpeg/Makefile
Comment 5 Jan Beich freebsd_committer freebsd_triage 2016-11-20 19:39:52 UTC
Can you also drop the following line per comment 2? It appeared in ports r135093 when ffmpeg didn't have --{en,dis}able-sse knob yet despite CPUID support for detecting SSE.

  SSE_VARS=               FFMPEG_CFLAGS+="-msse"
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-11-20 20:03:46 UTC
A commit references this bug:

Author: riggs
Date: Sun Nov 20 20:03:39 UTC 2016
New revision: 426618
URL: https://svnweb.freebsd.org/changeset/ports/426618

Log:
  Remove -msse from CFLAGS; fixes runtime issue for non-sse CPUs

  As mentioned in the discussion trail of bug 213583, this is necessary for
  certain i386 CPUs.

  PR:		213583
  Submitted by:	jbeich

Changes:
  head/multimedia/ffmpeg/Makefile