Hi,
On 05/01/2011 09:56 AM, David Timms wrote:
On 01/05/11 17:41, Hans de Goede wrote:
> Erm, specifying a minimum support CPU in the package description is
> not acceptable IMHO. The fix here is to patch the packages buildsystem,
> so that it gets build for the minimum cpu level which is supported by
> Fedora, and thus will work out of the box on all systems Fedora
> supports.
Where is that stated currently, and for older releases ?
I was hoping someone who knows the exact answer knows... All I can give
you is:
http://docs.fedoraproject.org/en-US/Fedora/13/html/Release_Notes/index.ht...
Which is not really exact...
> No tricks / hacks with multiple compilation, cpu detect scripts,
etc.
> will be necessary then.
Though it comes at the cost of audio lag/latency increase when we are
trying to achieve near real time (eg live guitar input to sound effect
generation output). Even on the my machine (4x core amd 3Ghz), the
calculations the app performs for difficult presets (convolution) can
cause jack to abort because rakarrack didn't finish it's calculations
before it was required to deliver data.
Should I be suggesting to upstream to attempt to detect CPU before
running non-available instructions, eg as part of app startup ?
Can that even be done (reliably) ?
As already answered by others ideal would be one binary, which runtime
chooses between normal C and mmx/sse#/whatever variants based
on CPU capabilities.
This is definitely something to ask to upstream, as this won't
be trivial.
In the mean time, you need to patch the build-system so that
you can control what cpu features it will enable, then you
can build a number of variants, install them as
/usr/libexec/%{name}-$cpufeaturepostfix
And make /usr/bin/%{name} a shell script which checks
/cpu/procinfo for features and then executes the right
binary (passing through all cmdline args using the
"$@" magic var for proper quoting)
For which variants it makes sense to build, you would
need to talk to someone who is more of a cpu head then me,
try starting a new thread, with an appropriate $subject.
Note that all of this is only really needed on 32 bits,
on 64 bit I believe (*) all cpu's have at least sse2, so unless
you want to use sse3 you'll only need 1 binary there.
Which brings us to a simpler alternative, build a no cpu
specific optimizations 32 bit version and use sse2 on x86_64,
which is nice and simple.
You could then add a README.fedora advising people to use
the 64 bit version.
Regards,
Hans
*) Still no CPU head, better verify this with someone who is.