| Summary: | media-sound/mpg123-1.10.1 doesn't honor sse,mmx,3dnow USE flag | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Shark <shark> |
| Component: | New packages | Assignee: | Gentoo Sound Team <sound> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | mpg123 ebuild with enabled asm optimizations | ||
|
Description
Shark
2010-04-07 19:03:32 UTC
Works fine here on amd64, the logic is similar on x86, so don't see how that could fail. Post `emerge --info`, emerge -pv mpg123, and full build.log Example of working setup, [ebuild R ] media-sound/mpg123-1.10.1 USE="alsa ipv6 network sdl sse (-3dnow) (-3dnowext) (-altivec) -jack (-mmx) -nas -oss -portaudio -pulseaudio" 0 kB ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu [ .. ] default-audio=alsa --with-cpu=x86-64 --enable-network --enable-ipv6 I was looking quickly at the ebuild,
46 if [[ ${ABI} = x86 ]]; then
47 _cpu=i586
48 use mmx && _cpu=mmx
49 use 3dnow && _cpu=3dnow
50 use sse && _cpu=x86
51 use 3dnowext && _cpu=x86
Maybe _cpu should be set to sse and not x86 on line 50? Same goes for 3dnowext in the next line. Tomorrow i will post the emerge --info and the other logs as requested.
With the correct _cpu in the ebuild, mpg123 compiles with the correct optimizations: config.status: executing libtool commands mpg123 1.10.1 Install path ............ /usr CPU Optimisation......... sse Compiler Optimization ... 0 ... The only problem with the ebuild is that mpg123 will be compiled with only one cpu-type even if multiple USE flags has been set. In may case (athlon-xp) sse is faster than 3dnowext so i've moved sse to the last line. Created attachment 226983 [details]
mpg123 ebuild with enabled asm optimizations
"--with-cpu=x86 Pack all x86 opts into one binary" so with USE "sse" or "3dnowext" all of the optimizations are enabled, your patch would reduce the opts, rather than add them. I chose this method over one single "enable-all-optimizations" USE flag because if you have a CPU with 3dnowext or sse, you also have 3dnow and mmx, so it makes sense to grab them all then. You're 100% right, i've noticed that ${ABI} isn't set here, only ${ARCH}, i think it's the origin of my problem. Who should exports ${ABI}?
reopen, too many bugs for same issue *** This bug has been marked as a duplicate of bug 295075 *** |