Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538564 - media-libs/libvpx has strange REQUIRED_USE"cpu_flags_x86_sse? ( cpu_flags_x86_sse2 )"
Summary: media-libs/libvpx has strange REQUIRED_USE"cpu_flags_x86_sse? ( cpu_flags_x86...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-02 17:19 UTC by Martin Väth
Modified: 2015-02-02 17:25 UTC (History)
0 users

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


Attachments
patch to omit CPU_FLAGS_X86="sse" from libvpx-1.3.0.ebuild (libvpx-1.3.0.ebuild.patch,1.15 KB, patch)
2015-02-02 17:19 UTC, Martin Väth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2015-02-02 17:19:51 UTC
Created attachment 395388 [details, diff]
patch to omit CPU_FLAGS_X86="sse" from libvpx-1.3.0.ebuild

In media-libs/libvpx there is
REQUIRED_USE"cpu_flags_x86_sse? ( cpu_flags_x86_sse2 )"

This is not very useful, since it means that users whose CPU can do sse but not sse2 (like AMD's athlon) and set CPU_FLAGS_X86 according to their processor's capabilities get an error when trying to emerge the package. They can fix it for this package by setting the value -cpu_flags_x86_sse in package.use. But this is strange for the user's cpu and also plays not well with temporarily overriding CPU_FLAGS_X86 in environment (e.g. when building binary packages for a different architecture).

There is a much better solution:

1. If every sse2 system can also do sse (I suppose that this is true), one can just omit cpu_flags_x86_sse completely (because in this case, it is pointless for the ebuild), and let cpu_flags_x86_sse2 imply the current behaviour of cpu_flags_x86_sse (patch attached).

2. If the asumption of 1. is false or you possibly want to support some exotic sse2 systems which cannot do sse, you can additionally add a REQUIRED_USE, but in the opposite direction, which in contrast to the current solution hurts only users of such (probably rare) systems:
REQUIRED_USE"cpu_flags_x86_sse2? ( cpu_flags_x86_sse )"

In addition (I do not want to open a separate bug report for this), one should similarly also avoid the other two REQUIRED_USE restriction (that sse3 uses sse2 and that sse2 uses mmx) and make sse3 automatically imply sse2, and sse2 automatically imply mmx.

However, in this case, the patch would be a bit longer. I will create and append it upon request.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-02 17:25:24 UTC
I'm sorry but you're late to the party :).

revision 1.17
date: 2015-02-02 15:33:55 +0100;  author: mgorny;  state: Exp;  lines: +3 -3;  commitid: 347954cf8ad24567;
Bug #498364: disable USE=sse implicitly without sse2 rather than forcing non-SSE2 users to enable SSE2.