Summary: | Generator Ebuild ignores SSE use flag | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Eric Andry <ericandry> |
Component: | New packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED INVALID | ||
Severity: | trivial | ||
Priority: | Lowest | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Result of trying to build on Pentium 4 with SSE enabled |
Description
Eric Andry
2005-03-08 22:05:09 UTC
Created attachment 52990 [details]
Result of trying to build on Pentium 4 with SSE enabled
The ebuild ignores the flag and consequently, SSE optimizations are not used.
You have -mfpmath=sse in your CFLAGS. Most likely your compiler was configured to disable SSE instructions, fall-back to floating poiunt. You must add -msse (and, optionally, -mmmx or -msse2) into your variables CFLAGS and CXXFLAGS. See 'man 1 gcc': "-mfpmath=sse: Use scalar floating point instructions present in the SSE instruction set. This instruction set is supported by Pentium3 and newer chips, in the AMD line by Athlon-4, Athlon-xp and Athlon-mp chips. The earlier version of SSE instruction set supports only single precision arithmetics, thus the double and extended precision arithmetics is still done using 387. Later version, present only in Pentium4 and the future AMD x86-64 chips supports double precision arithmetics too. For i387 you need to use -march=cpu-type, -msse or -msse2 switches to enable SSE extensions and make this option effec- tive. For x86-64 compiler, these extensions are enabled by default. The resulting code should be considerably faster in the major- ity of cases and avoid the numerical instability problems of 387 code, but may break some existing code that expects tempo- raries to be 80bit." Why do you have -march and -mtune set? You should pick one not both. Also SSE is enabled when -march is set to pentium4 so no need to have in your CFLAGS. Other than because other people set both flags I don't have a reason. http://lunar-linux.org/?q=node/view/289 http://forums.gentoo.org/viewtopic.php?t=248245&start=50 Closing bug. |